Storing method and apparatus for data acquisition
First Claim
1. A storing method for data acquisition performed at a computer having one or more processors and memory storing programs to be executed by the one or more processors, the method comprising:
- acquiring a plurality of data samples, wherein each data sample is associated with a generation time indicating when the data sample is sampled and a collection time indicating when the data sample is recorded, the generation time being prior to the collection time;
obtaining an offset for each data sample by computing a difference between the generation time and the collection time of the data sample;
acquiring a default offset threshold, wherein, for one or more data samples having the generation time but different collection time, at least a predefined percentage of the one or more data samples whose associated offsets are within the default offset;
determining, for each data sample, whether the offset of the data sample is less than the default offset threshold;
in accordance with a determination that a first offset of a first data sample is less than the default offset threshold, acquiring a hierarchical centralized storage directory corresponding to the plurality of data samples, wherein the hierarchical centralized storage directory is part of a file system managed by the computer;
identifying a first generation time sub-directory corresponding to the generation time of the first data sample from a plurality of generation time sub-directories in the file system under the hierarchical centralized storage directory, wherein each generation time sub-directory is used for storing one or more data samples having the same generation time and respectively different offsets less than the default offset threshold;
identifying a first offset sub-directory corresponding to the offset of the first data sample from a plurality of offset sub-directories under the first generation time sub-directory within the file system, wherein each offset sub-directory is used for storing one or more data samples having the same offset less than the default offset threshold;
storing the first data sample in the first offset sub-directory of the first generation time sub-directory within the hierarchical centralized storage directory of the file system such that the first data sample is sorted in the hierarchical centralized storage directory by both its generation time and its collection time;
receiving a user query including a search keyword for retrieving data samples from the file system based on the search keyword;
in accordance with a determination that the search keyword includes a generation time for retrieving data samples having the same generation time;
identifying, within the hierarchical centralized storage directory, a generation time sub-directory corresponding to the generation time in the search keyword; and
retrieving the data samples from the plurality of offset sub-directories under the identified generation time sub-directory; and
in accordance with a determination that the search keyword includes a collection time for retrieving data samples having the same collection time;
identifying, within the hierarchical centralized storage directory, a plurality of offset sub-directories each having a collection time corresponding to the collection time in the search keyword, wherein the plurality of offset sub-directories are respectively under different generation time sub-directories; and
retrieving the data samples from the identified plurality of offset sub-directories under respective generation time sub-directories.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a storing method for data acquisition, including: acquiring a collected data, and acquiring a generation time and a collection time for the collected data; obtaining an offset by computing a difference between the generation time and the collection time; and acquiring a default offset threshold, and determining whether the offset being less than the default offset threshold; if so, acquiring a centralized storage directory corresponding to the collected data, acquiring a generation time sub-directory corresponding to the generation time under the centralized storage directory, acquiring an offset sub-directory corresponding to the offset under the generation time sub-directory and storing the collected data in the offset sub-directory. The invention also provides a storing apparatus for data acquisition. The storing method and apparatus for data acquisition improve the data access efficiency.
6 Citations
18 Claims
-
1. A storing method for data acquisition performed at a computer having one or more processors and memory storing programs to be executed by the one or more processors, the method comprising:
-
acquiring a plurality of data samples, wherein each data sample is associated with a generation time indicating when the data sample is sampled and a collection time indicating when the data sample is recorded, the generation time being prior to the collection time; obtaining an offset for each data sample by computing a difference between the generation time and the collection time of the data sample; acquiring a default offset threshold, wherein, for one or more data samples having the generation time but different collection time, at least a predefined percentage of the one or more data samples whose associated offsets are within the default offset; determining, for each data sample, whether the offset of the data sample is less than the default offset threshold; in accordance with a determination that a first offset of a first data sample is less than the default offset threshold, acquiring a hierarchical centralized storage directory corresponding to the plurality of data samples, wherein the hierarchical centralized storage directory is part of a file system managed by the computer; identifying a first generation time sub-directory corresponding to the generation time of the first data sample from a plurality of generation time sub-directories in the file system under the hierarchical centralized storage directory, wherein each generation time sub-directory is used for storing one or more data samples having the same generation time and respectively different offsets less than the default offset threshold; identifying a first offset sub-directory corresponding to the offset of the first data sample from a plurality of offset sub-directories under the first generation time sub-directory within the file system, wherein each offset sub-directory is used for storing one or more data samples having the same offset less than the default offset threshold; storing the first data sample in the first offset sub-directory of the first generation time sub-directory within the hierarchical centralized storage directory of the file system such that the first data sample is sorted in the hierarchical centralized storage directory by both its generation time and its collection time; receiving a user query including a search keyword for retrieving data samples from the file system based on the search keyword; in accordance with a determination that the search keyword includes a generation time for retrieving data samples having the same generation time; identifying, within the hierarchical centralized storage directory, a generation time sub-directory corresponding to the generation time in the search keyword; and retrieving the data samples from the plurality of offset sub-directories under the identified generation time sub-directory; and in accordance with a determination that the search keyword includes a collection time for retrieving data samples having the same collection time; identifying, within the hierarchical centralized storage directory, a plurality of offset sub-directories each having a collection time corresponding to the collection time in the search keyword, wherein the plurality of offset sub-directories are respectively under different generation time sub-directories; and retrieving the data samples from the identified plurality of offset sub-directories under respective generation time sub-directories. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer for data acquisition having one or more processors and memory storing programs to be executed by the one or more processors, the memory storing instructions for:
-
acquiring a plurality of data samples, wherein each data samples is associated with a generation time indicating when the data sample is sampled and a collection time indicating when the data sample is recorded, the generation time being prior to the collection time; obtaining an offset for each data sample by computing a difference between the generation time and the collection time of the corresponding data sample; acquiring a default offset threshold, wherein, for one or more data samples having the generation time but different collection time, at least a predefined percentage of the one or more data samples whose associated offsets are within the default offset; determining, for each data sample, whether the offset of the data sample is less than the default offset threshold; in accordance with a determination that a first offset of a first data sample is less than the default offset threshold, acquiring a hierarchical centralized storage directory corresponding to the plurality of data samples, wherein the hierarchical centralized storage directory is part of a file system managed by the computer; identifying a first generation time sub-directory corresponding to the generation time of the first data sample from a plurality of generation time sub-directories in the file system under the hierarchical centralized storage directory, wherein each generation time sub-directory is used for storing one or more data samples having the same generation time and respectively different offsets less than the default offset threshold; identifying a first offset sub-directory corresponding to the offset of the first data sample from a plurality of offset sub-directories under the first generation time sub-directory within the file system, wherein each offset sub-directory is used for storing one or more data samples having the same offset less than the default offset threshold; storing the first data sample in the first offset sub-directory of the first generation time sub-directory within the hierarchical centralized storage directory of the file system such that the first data sample is sorted in the hierarchical centralized storage directory by both its generation time and its collection time; receiving a user query including a search keyword for retrieving data samples from the file system based on the search keyword; in accordance with a determination that the search keyword includes a generation time for retrieving data samples having the same generation time; identifying, within the hierarchical centralized storage directory, a generation time sub-directory corresponding to the generation time in the search keyword; and retrieving the data samples from the plurality of offset sub-directories under the identified generation time sub-directory; and in accordance with a determination that the search keyword includes a collection time for retrieving data samples having the same collection time; identifying, within the hierarchical centralized storage directory, a plurality of offset sub-directories each having a collection time corresponding to the collection time in the search keyword, wherein the plurality of offset sub-directories are respectively under different generation time sub-directories; and retrieving the data samples from the identified plurality of offset sub-directories under respective generation time sub-directories. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A non-transitory computer-readable storage medium comprising a set of instructions for data acquisition, the set of instructions to direct at least one processor to perform operations including:
-
acquiring a plurality of data samples, wherein each data sample is associated with a generation time indicating when the data sample is sampled and a collection time indicating when the data sample is recorded, the generation time being prior to the collection time; obtaining an offset for each data sample by computing a difference between the generation time and the collection time of the corresponding data sample; acquiring a default offset threshold, wherein, for one or more data samples having the generation time but different collection time, at least a predefined percentage of the one or more data samples whose associated offsets are within the default offset; determining, for each data sample, whether the offset of the corresponding data sample is less than the default offset threshold; in accordance with a determination that a first offset of a first data sample is less than the default offset threshold, acquiring a hierarchical centralized storage directory corresponding to the plurality of data samples, wherein the hierarchical centralized storage directory is part of a file system managed by the computer; identifying a first generation time sub-directory corresponding to the generation time of the first data sample from a plurality of generation time sub-directories in the file system under the hierarchical centralized storage directory, wherein each generation time sub-directory is used for storing one or more data samples having the same generation time and respectively different offsets less than the default offset threshold; identifying a first offset sub-directory corresponding to the offset of the first data sample from a plurality of offset sub-directories under the first generation time sub-directory within the file system, wherein each offset sub-directory is used for storing one or more data samples having the same offset less than the default offset threshold; storing the first data sample in the first offset sub-directory of the first generation time sub-directory within the hierarchical centralized storage directory of the file system such that the first data sample is sorted in the hierarchical centralized storage directory by both its generation time and its collection time; receiving a user query including a search keyword for retrieving data samples from the file system based on the search keyword; in accordance with a determination that the search keyword includes a generation time for retrieving data samples having the same generation time; identifying, within the hierarchical centralized storage directory, a generation time sub-directory corresponding to the generation time in the search keyword; and retrieving the data samples from the plurality of offset sub-directories under the identified generation time sub-directory; and in accordance with a determination that the search keyword includes a collection time for retrieving data samples having the same collection time; identifying, within the hierarchical centralized storage directory, a plurality of offset sub-directories each having a collection time corresponding to the collection time in the search keyword, wherein the plurality of offset sub-directories are respectively under different generation time sub-directories; and retrieving the data samples from the identified plurality of offset sub-directories under respective generation time sub-directories. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification