Storage devices
By designing memory and computing units in the storage device and using the first feature information as an index to access the stored data, the problem of low data handling efficiency in traditional data retrieval methods is solved, and more efficient data retrieval is achieved.
Patent Information
- Application Number
- CN202111050484.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-08
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-09-08
AI Technical Summary
Traditional data retrieval methods consume a lot of equipment power consumption during data handling, and because the data interface limits the handling speed, it is difficult to improve the retrieval efficiency.
A storage device is designed, including a memory and a computing unit, which is used to store the first feature information of the storage object and the corresponding storage data, and the computing unit is used to acquire the second feature information of the search data, and determine the target feature information based on the comparison result to obtain the target search data.
By reducing data handling, reducing equipment power consumption, improving retrieval efficiency, and by accessing the stored data as an index, the data processing volume is reduced and the retrieval speed is improved.
Smart Images

Figure CN113836332B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of data storage, and more specifically, embodiments of the present disclosure relate to a storage device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] In data retrieval applications, the amount of data to be compared stored in the storage system is usually very large, such as face retrieval or fingerprint retrieval.
[0004] The traditional data retrieval method usually uses the CPU or processing chip to move the data to be compared contained in the storage system to the memory in sequence, and compares and calculates the search object with the data to be compared to obtain the target data. However, in this method, a large amount of device power is consumed during the data transfer process, and the transfer speed is limited by the data interface, making it difficult to improve the retrieval efficiency. Summary of the invention
[0005] In view of this, the embodiments of the present disclosure at least provide a storage device to reduce data movement and improve retrieval efficiency in data retrieval applications.
[0006] The present disclosure provides a storage device, including a memory and a computing unit, wherein the memory is used to store first feature information of at least one storage object, at least one storage data corresponding to each storage object, and storage information of the at least one storage data, wherein the first feature information is obtained by extracting features of the at least one storage data corresponding to the storage object, and the first feature information of the storage object is associated with the storage information of the at least one storage data; the computing unit is used to obtain second feature information of retrieval data, determine target feature information according to a comparison result between the second feature information and the first feature information in the memory, and obtain target retrieval data corresponding to the storage information according to the storage information associated with the target feature information.
[0007] In some embodiments, when the computing unit is used to determine the target feature information based on the comparison result of the second feature information and the first feature information in the memory, it is specifically used to: compare the second feature information with the first feature information in the memory, and determine at least one first feature information with the highest similarity to the second feature information as the target feature information.
[0008] In some embodiments, the memory is further used to store the first characteristic information in a set storage area, and the set storage area is divided into multiple storage blocks according to the first characteristic information of the storage object, wherein each of the storage blocks corresponds to at least one storage object.
[0009] In some embodiments, the multiple storage blocks are obtained by dividing the set storage area based on a target sorting result, wherein the target sorting result is obtained by sorting the first feature information of multiple storage objects stored in the set storage area based on a preset rule.
[0010] In some embodiments, the multiple storage blocks are obtained by obtaining the similarity of the first feature information between every two storage objects among the multiple storage objects stored in the set storage area, and storing the first feature information of at least two storage objects whose similarity is higher than a set threshold in the same storage block.
[0011] In some embodiments, the calculation unit is further used to: compare the second feature information with third feature information corresponding to each storage block in the set storage area, wherein the third feature information corresponding to the storage block is determined based on the first feature information stored in the storage block; determine the storage block corresponding to the third feature information with the highest similarity to the second feature information as the target storage block; compare the second feature information with the first feature information in the target storage block, and determine at least one feature information with the highest similarity to the second feature as the target feature information.
[0012] In some implementations, the storage information includes a starting address and a storage length, wherein the storage length is determined based on a size of at least one piece of storage data corresponding to the storage object.
[0013] In some embodiments, the storage device is connected to a first processing device, and the first feature information is obtained in the following manner: the first processing device uses a pre-trained first feature extraction network to extract features from one of the storage data corresponding to the storage object to obtain sub-feature information, wherein the first feature extraction network is set in a storage device outside the storage device; based on the sub-feature information of at least one storage data corresponding to the storage object, the first feature information of the storage object is obtained; and the first feature information is sent to the storage device.
[0014] In some embodiments, the storage device is connected to a second processing device, and the second feature information is obtained in the following manner: the second processing device uses a pre-trained second feature extraction network to extract features from the retrieval data to obtain the second feature information, wherein the second feature extraction network is set in a storage device outside the storage device; and the second feature information is sent to the storage device.
[0015] In some implementations, the storage device is connected to a third processing device, and the storage device is further configured to send the target retrieval data to the third processing device.
[0016] In an embodiment of the present disclosure, a storage device includes a memory and a computing unit, wherein the memory is used to store first characteristic information of at least one storage object, at least one storage data corresponding to each storage object, and storage information of the at least one storage data, the first characteristic information of the storage object is associated with the storage information of the at least one storage data, and the computing unit is used to obtain second characteristic information of the retrieval data, determine target characteristic information according to a comparison result between the second characteristic information and the first characteristic information in the memory, and obtain target retrieval data corresponding to the storage information according to the storage information associated with the target characteristic information. The storage device can be used to access the corresponding storage data using the first characteristic information as an index, store the first characteristic information of the storage object and the storage data in different areas, and reduce data handling; and by using a computing unit set locally in the storage device to compare and obtain target retrieval data, data handling can be further reduced and retrieval speed can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0018] Figure 1 The structure diagram of the storage device proposed according to the embodiment of the present disclosure is schematically shown;
[0019] Figure 2 The structure diagram of the data storage system proposed according to the embodiment of the present disclosure is schematically shown;
[0020] Figure 3A and Figure 3B The structural diagrams of the solid state hard disks proposed according to the embodiments of the present disclosure are schematically shown respectively;
[0021] Figure 4A and Figure 4BThe schematic diagrams of the structures of the flash memory proposed according to the embodiments of the present disclosure are schematically shown respectively;
[0022] Figure 5 The structure diagram of the double rate synchronous dynamic random access memory proposed in accordance with the embodiment of the present disclosure is schematically shown;
[0023] Figure 6 The structure diagram of the data retrieval system according to the embodiment of the present disclosure is schematically shown;
[0024] Figure 7 A flowchart of a data storage method proposed according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 8 The flowchart of the data retrieval method proposed according to the embodiment of the present disclosure is schematically shown;
[0026] Fig. 9 The structure diagram of the data storage device according to the embodiment of the present disclosure is schematically shown;
[0027] Fig.10 The structural diagram of the data retrieval device according to the embodiment of the present disclosure is schematically shown.
[0028] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0029] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0030] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0031] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0032] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0033] In data retrieval applications, the amount of data to be compared stored in the storage system is usually very large. For example, for face retrieval or fingerprint retrieval, the amount of data may be more than 10G.
[0034] The traditional data retrieval method usually uses the CPU or processing chip to move the data to be compared in the storage system to the memory in sequence, and compare and calculate the search object with the data to be compared to obtain the target data. For example, in the image search scenario, the CPU or AI chip needs to move the images to be compared in the storage system to the memory in sequence, compare and calculate the search image with the image to be compared, and obtain the associated image corresponding to the search image. For example, based on the photos and portraits of the target person, search for corresponding or similar photos, attribute information, etc. from the database.
[0035] However, in this way, a large amount of device power is consumed during data transfer, and since the data interface limits the transfer speed, it is difficult to improve the retrieval efficiency.
[0036] Therefore, the embodiments of the present disclosure propose a storage device, which aims to reduce data movement in data retrieval applications to reduce device power consumption and improve search efficiency.
[0037] Figure 1 The structure diagram of the storage device proposed according to the embodiment of the present disclosure is schematically shown. Figure 1 As shown, the storage device 100 may include a computing unit 110 and a memory 120 .
[0038] The memory 120 is used to store first characteristic information of at least one storage object, at least one storage data corresponding to each storage object, and storage information of the at least one storage data.
[0039] In the embodiment of the present disclosure, data is stored in units of storage objects, which may include various types such as people, animals, objects, virtual objects, etc. The present disclosure does not limit the specific types of storage objects.
[0040] The first feature information is obtained by extracting features of at least one piece of storage data corresponding to the storage object.
[0041] For example, the stored data of the storage object may be images of people, and each person corresponds to one or more images. By performing feature extraction on the one or more images corresponding to each person, the first feature information corresponding to the storage object can be obtained.
[0042] For another example, the storage data of the storage object may be audio files of people, and each person corresponds to one or more audio files. By performing feature extraction on the one or more audio files corresponding to each person, the first feature information corresponding to the storage object can be obtained.
[0043] That is, in the disclosed embodiment, different storage data of the same storage object may correspond to the same first feature information. For example, multiple different images of the same person may correspond to the same first feature information; for another example, images of the same person wearing different clothes, or images of the same person from different angles, may correspond to the same first feature information; for another example, images of multiple people with similar appearances, such as images of twins or multiple births, may correspond to the same first feature value.
[0044] In the storage device, the first characteristic information of the storage object is associated with the storage information of at least one storage data of the storage object, that is, each storage object stored in the memory corresponds to the storage of the first characteristic information and storage information, and the storage information indicates the storage address of the storage data of the storage object.
[0045] For example, when a plurality of images of a person are stored in a memory, first feature information of the plurality of images of the person is stored in the memory, and the first feature information is associated with the storage information of the plurality of images.
[0046] By storing the first characteristic information of the storage object and the storage data in different areas while associating them, it is possible to access the storage data using the first characteristic information as an index. In a data retrieval scenario, when the storage device is a solid state disk (SSD) or flash memory, by using the first characteristic information as an index, part of the storage data can be screened out based on the local AI computing unit and moved to the memory for comparison processing, and then the processed part of the storage data is sent to the CPU or AI chip outside the storage device for further comparison processing to obtain the final retrieval result; compared to moving all the storage data to the memory for comparison processing, data movement is reduced and device power consumption is reduced. At the same time, by storing the first characteristic information of the storage object and the storage data in different areas, the first characteristic information can be separated from the storage data, so that changes in the first characteristic information do not affect the storage data.
[0047] For example, when the method for obtaining the first feature information of the storage object changes, such as the feature extraction algorithm is improved, so that the size of the feature map contained in the first feature information increases, however, since the first feature information and the stored data are stored separately, the actual stored data will not change.
[0048] In the scenario of data retrieval, the computing unit 110 is used to obtain second characteristic information of the retrieved data, determine the target characteristic information based on the comparison result between the second characteristic information and the first characteristic information in the memory, and obtain the target retrieval data corresponding to the storage information based on the storage information associated with the target characteristic information.
[0049] Among them, the similarity between the first feature information and the second feature information can be calculated, that is, the Euclidean distance between the feature vector corresponding to the first feature information and the feature vector corresponding to the second feature information is calculated, to perform comparison, and the target feature information can be determined according to the comparison result.
[0050] In an embodiment of the present disclosure, a storage device includes a memory and a computing unit, wherein the memory is used to store first characteristic information of at least one storage object, at least one storage data corresponding to each storage object, and storage information of the at least one storage data, the first characteristic information of the storage object is associated with the storage information of the at least one storage data, the computing unit is used to obtain second characteristic information of the retrieval data, determine target characteristic information based on a comparison result between the second characteristic information and the first characteristic information in the memory, and obtain target retrieval data corresponding to the storage information based on the storage information associated with the target characteristic information.
[0051] The storage device can be used to access corresponding storage data using the first characteristic information as an index, and store the first characteristic information of the storage object and the storage data in different areas, thereby reducing data movement; and by using a computing unit locally set in the storage device to compare and obtain target retrieval data, data movement can be further reduced and the retrieval speed can be improved.
[0052] In some embodiments, the second feature information may be compared with the first feature information in the memory to determine at least one first feature information having the highest similarity to the second feature information as the target feature information.
[0053] In some embodiments, the first characteristic information of the storage object may be stored in a set storage area of the memory. For example, a set address segment in the memory may be used as a set storage area to store the first characteristic information of the storage object. That is, for the first characteristic information of multiple storage objects obtained, the first characteristic information of these storage objects are stored together in the set storage area.
[0054] The at least one storage data corresponding to the storage object may be stored in an area outside the set storage area. The storage information of the storage data includes a starting address and a storage length of the at least one storage data corresponding to the storage object. The storage length is determined according to the size of the at least one storage data corresponding to the storage object.
[0055] In some implementations, the set storage area of the memory may be divided into a plurality of storage blocks according to the first characteristic information of the storage object to implement area division of the set storage area, wherein each of the storage blocks corresponds to at least one storage object.
[0056] The set storage area may be divided into regions in a multi-level manner. For example, when the first characteristic information of multiple storage objects is stored in the set storage area of the memory, one or more of the multiple storage objects may be divided into the same storage block to obtain multiple storage blocks of the first level. When any storage block of the first level still contains multiple storage objects, further division may be performed in a similar manner to obtain multiple storage blocks of the second level, and so on.
[0057] In an example, the setting storage area may be divided into areas in the following manner.
[0058] First, based on a preset rule, first feature information of a plurality of storage objects stored in the set storage area is sorted.
[0059] The preset rule may be set according to the characteristics of the storage object itself. For example, when multiple images of people are stored in the memory, they may be sorted according to their ages. For example, the first characteristic information corresponding to the younger the person, the higher the storage position.
[0060] The sorting can also be performed according to other rules, for example, the sorting can be performed according to the number of times the first characteristic information is searched. For example, the more times the first characteristic information of a storage object is searched, the higher the first characteristic information of the storage object is ranked. Then, when applied to the data retrieval scenario, the first characteristic information will be compared earlier.
[0061] Next, the setting storage of the memory is divided into a plurality of storage blocks according to the sorting result.
[0062] For first feature information with similar sorting results, it can be stored in the same storage block. For example, when the set storage area includes first feature information of multiple storage objects, the first feature information of every n storage objects can be stored in the same storage block according to the sorting results of the first feature information.
[0063] In the embodiment of the present disclosure, by dividing the set storage area according to the ranking result of the first characteristic information, storage objects with similar first characteristic information rankings can be stored in the same data block.
[0064] In some implementations, the setting storage area may also be divided into regions according to the following manner.
[0065] First, the similarity of the first feature information between every two storage objects among the plurality of storage objects stored in the set storage area is obtained.
[0066] The similarity of the first feature information between two storage objects may be determined based on the Euclidean distance between the feature vectors corresponding to the two first feature information, or may be calculated using other methods. The present disclosure does not limit the method for calculating the similarity.
[0067] Next, the first feature information of at least two storage objects whose similarity is higher than a set threshold is stored in the same storage block.
[0068] Among them, for storage objects stored in the same storage block, the similarity of the first feature information between every two storage objects may be higher than the set threshold, or the similarity of the first feature information between one storage object and at least one other storage object may be higher than the set threshold.
[0069] In the embodiment of the present disclosure, by performing area division according to the similarity of the first characteristic information between the storage objects, the storage objects with similar first characteristic information can be stored in the same data block.
[0070] Figure 2 A schematic diagram of a storage method of a storage device according to an embodiment of the present disclosure is shown schematically. Figure 2As shown, the first characteristic information of multiple storage objects and the storage data of each storage object are stored in the setting storage area 20 in the memory, and the first characteristic information of the storage object is associated with the storage information of the storage data of the object. Among them, the first characteristic information of storage object 1 is characteristic value 1, the storage data of storage object 1 is picture 1, and characteristic value 1 is associated with storage address 1 of picture 1; the first characteristic information of storage object 2 is characteristic value 2, the storage data of storage object 2 is picture 2a and picture 2b, and characteristic value 2 is associated with storage address 2 of picture 2a and picture 2b; the first characteristic information of storage object 3 is characteristic value 3, the storage data of storage object 3 is picture 3, and characteristic value 3 is associated with storage address 3 of picture 3. The setting storage area 20 is divided into multiple storage blocks, which can also be called characteristic value blocks, such as Figure 2 As shown, feature value 1 of storage object 1 is stored in feature value block A, and feature value 2 of storage object 2 and feature value 3 of storage object 3 are stored together in feature value block B.
[0071] In some embodiments, the first characteristic information of the storage object may be obtained by the following method.
[0072] First, a pre-trained first feature extraction network is used to perform feature extraction on one of the storage data corresponding to the storage object to obtain sub-feature information.
[0073] Taking the stored data as an image as an example, a convolutional neural network can be used to extract sub-feature information of the image.
[0074] Afterwards, first feature information of the storage object is obtained according to sub-feature information of at least one piece of storage data corresponding to the storage object.
[0075] For example, the first feature information of the storage object may be obtained by cascading the sub-feature information of each storage data; for another example, the first feature information of the storage object may be obtained by averaging or weighting the sub-feature information of each storage data.
[0076] In the case where the storage device is used to store AI data, the computing unit of the storage device is an AI computing unit with AI computing capability.
[0077] In the case where the storage device is a solid state disk (SSD), the AI computing unit may be arranged in the controller, such as Figure 3A As shown; it can also be set in the storage unit and connected to the controller, such as Figure 3B shown.
[0078] In the case where the storage device is a flash memory, the AI computing unit can be directly connected to the memory and the controller, such as Figure 4A As shown; it can also be configured to be connected to the memory through the controller, such as Figure 4B shown.
[0079] In the case where the memory is a double data rate (DDR) synchronous dynamic random access memory, the AI computing unit can be directly connected to the memory and the controller, such as Figure 5 shown.
[0080] In some implementations, when the set storage area of the memory is divided into a plurality of storage blocks according to the first characteristic information of the storage object, the calculation unit 110 may compare the second characteristic information with the first characteristic information in the following manner.
[0081] First, the second characteristic information is compared with the third characteristic information corresponding to each storage block in the set storage area.
[0082] The third characteristic information corresponding to the storage block is determined according to the first characteristic information stored in the storage block. For example, the third characteristic information can be obtained by averaging a plurality of first characteristic information stored in the storage block.
[0083] Next, at least one storage block corresponding to the third characteristic information having the highest similarity to the second characteristic information is determined as the target storage block, that is, the storage block in which the storage object stored is most similar to the search data is determined among the storage blocks.
[0084] Finally, the second feature information is compared with the first feature information in the target storage block.
[0085] By further comparing the second characteristic information in one or more storage blocks that are closest to the second characteristic information of the retrieved data, the scope of comparison can be narrowed, the amount of data to be processed can be reduced, and the retrieval speed can be improved.
[0086] The following uses the image search scenario as an example to illustrate the data retrieval method proposed in the embodiment of the present disclosure. The system architecture used by the method is as follows: Figure 6 As shown, the storage device includes an AI computing unit and a memory, wherein the data storage method in the memory can refer to Figure 2 The description is omitted here; the AI computing unit is connected to the CPU or AI chip outside the storage device, and can obtain data processed by the CPU or AI chip.
[0087] First, the CPU or AI chip is used to extract features of the search image to obtain feature data of a set size as the target feature value of the search image. For example, 1*512 feature data or 2*512 feature data can be obtained as the target feature value.
[0088] Next, the characteristic value is sent to the storage device, which may be a DDR, SSD, flash memory, etc., in which an AI computing unit is set.
[0089] After receiving the target feature value, the computing unit compares the target feature value with the multiple feature values stored in the set storage area one by one, determines the closest one or more feature values, and sends the storage data corresponding to these feature values to the CPU, AI chip, display device, etc. outside the storage device.
[0090] Alternatively, after receiving the target feature value, the AI computing unit compares the target feature value with each feature value block one by one, and after determining the closest feature value block, further compares the feature value blocks to determine the closest one or more feature values.
[0091] like Figure 6 As shown, when the AI computing unit determines that the feature value block closest to the target feature value is feature value block B, it is not necessary to search feature value block A, but to compare the target feature value with the feature values in feature value block B one by one to determine the closest one or more feature values. For example, when feature value 2 is the most received feature value, pictures 2a and 2b associated with feature value 2 are obtained, and pictures 2a and 2b are sent to the CPU, AI chip, display device, etc.
[0092] The CPU or AI chip can further compare the target retrieval data to determine the final target data. By only comparing the data determined by the storage device, the computing consumption of the CPU or AI chip is reduced; the display device can directly display the target retrieval data so that the user can determine the final target data by himself.
[0093] Figure 7 The flowchart of a data storage method according to an embodiment of the present disclosure is schematically shown. Figure 7 As shown, the method may include steps 701-704.
[0094] In step 701, first characteristic information of a storage object is obtained.
[0095] The first feature information is obtained by extracting features of at least one piece of storage data corresponding to the storage object.
[0096] In step 702, the first characteristic information of the storage object is stored in a set storage area of the memory.
[0097] In step 703, at least one storage data corresponding to the storage object is stored in the memory, and storage information of the at least one storage data is obtained.
[0098] In step 704, the first characteristic information of the storage object is associated with the storage information of the at least one storage data.
[0099] In the disclosed embodiment, the first characteristic information of the storage object is obtained, and the first characteristic information of the storage object is stored in a set storage area of the memory; at least one storage data corresponding to the storage object is stored in the memory, and the storage information of the at least one storage data is obtained; the first characteristic information of the storage object is associated with the storage information of the at least one storage data. Through the above storage method, it is possible to access the corresponding storage data using the first characteristic information as an index, avoiding the need to move all the storage data to the memory for comparison and processing, reducing data movement, and improving the speed of data retrieval.
[0100] Figure 8 A flowchart of a data retrieval method according to an embodiment of the present disclosure is schematically shown. The method is applied to Figure 1 The method may include steps 801-804.
[0101] In step 801, second characteristic information of the search data is obtained.
[0102] In this step, a CPU or AI processing chip outside the storage device can be used to extract features from the retrieved data. Similar to the storage data of the storage object, the retrieved data can include images, audio files, etc. For example, in the scenario of image search, a pre-trained second feature extraction network can be used to extract features from the retrieved image. The second feature extraction network can be the same network as the first feature extraction network, or it can be a different network.
[0103] In step 802, the second feature information is compared with the first feature information in the set storage area in the memory.
[0104] The first feature information is obtained by extracting features of at least one storage data corresponding to the storage object, and the memory also stores at least one storage data corresponding to the storage object. The first feature information is associated with storage information of the at least one storage data.
[0105] In step 803, at least one first feature information having the highest similarity to the second feature information is determined as target feature information, that is, one or more storage objects that are most similar to the search image are determined.
[0106] In step 804, the target retrieval data in the storage address indicated by the storage information is obtained according to the storage information associated with the target characteristic information.
[0107] In the disclosed embodiment, by comparing the second characteristic information of the retrieval data with the first characteristic information in the set storage area, the first characteristic information with the highest similarity is used as an index to obtain the target retrieval data in the associated storage address. Compared with directly comparing the data of the first retrieval object with the storage data of the first object one by one, a large-scale search is performed in the storage device, which reduces the amount of data to be processed and improves the retrieval speed. Moreover, by using an AI computing unit locally disposed in the storage device to perform comparison and obtain the target retrieval data, data handling can be reduced, further improving the retrieval speed.
[0108] In order to implement the data storage method of any embodiment of the present disclosure, the embodiment of the present disclosure also provides a data storage device.
[0109] Fig. 9 The structural diagram of a data storage device according to an embodiment of the present disclosure is schematically shown. For example, the device can be applied to an electronic device. In the following description, the functions of each module of the device will be briefly described, and its detailed processing can be combined with the description of the data storage method of any embodiment of the present disclosure.
[0110] like Fig. 9 As shown, the data storage device includes: a first acquisition unit 901, used to obtain first characteristic information of a storage object, wherein the first characteristic information is obtained by performing feature extraction on at least one storage data corresponding to the storage object; a storage unit 902, used to store the first characteristic information of the storage object in a set storage area of a memory; a second acquisition unit 903, used to store at least one storage data corresponding to the storage object in the memory, and obtain storage information of the at least one storage data; an association unit 904, used to associate the first characteristic information of the storage object with the storage information of the at least one storage data.
[0111] In some embodiments, the device further includes a partitioning unit for partitioning a set storage area of the memory into a plurality of storage blocks according to the first characteristic information of the storage object, wherein each of the storage blocks corresponds to at least one storage object.
[0112] In some embodiments, when the division unit is used to divide the set storage area of the memory into multiple storage blocks according to the first characteristic information of the storage object, it is specifically used to: sort the first characteristic information of multiple storage objects stored in the set storage area based on a preset rule; and divide the set storage of the memory into multiple storage blocks according to the sorting result.
[0113] In some embodiments, when the division unit is used to divide the set storage area of the memory into multiple storage blocks according to the first characteristic information of the storage object, it is specifically used to: obtain the similarity of the first characteristic information between each two storage objects among the multiple storage objects stored in the set storage area; store the first characteristic information of at least two storage objects whose similarity is higher than a set threshold in the same storage block.
[0114] In some embodiments, the device also includes a feature extraction unit, which is used to use a pre-trained first feature extraction network to extract features from one of the storage data corresponding to the storage object to obtain sub-feature information; and obtain the first feature information of the storage object based on the sub-feature information of at least one storage data corresponding to the storage object.
[0115] In some implementations, the storage information includes a starting address and a storage length, wherein the storage length is determined based on a size of at least one piece of storage data corresponding to the storage object.
[0116] In order to implement the retrieval method of any embodiment of the present disclosure, the embodiment of the present disclosure also provides a data retrieval device. Fig.10 The structure diagram of a data retrieval device according to an embodiment of the present disclosure is schematically shown. For example, the device can be applied to an electronic device. In the following description, the functions of each module of the device will be briefly described, and its detailed processing can be combined with the description of the data storage method of any embodiment of the present disclosure.
[0117] like Fig.10As shown, the data retrieval device includes: a third acquisition unit, used to acquire second feature information of the retrieved data; a comparison unit, used to compare the second feature information with the first feature information in the set storage area in the memory, wherein the first feature information is obtained by feature extraction of at least one storage data corresponding to the storage object, and the memory also stores at least one storage data corresponding to the storage object, and the first feature information is associated with the storage information of the at least one storage data; a determination unit, used to determine at least one first feature information with the highest similarity to the second feature information as the target feature information; and an acquisition unit, used to obtain the target retrieval data in the storage address indicated by the storage information based on the storage information associated with the target feature information.
[0118] In some embodiments, the apparatus further includes a first sending unit configured to enable the first processing device to perform feature extraction on the retrieval data using a pre-trained second feature extraction network to obtain the second feature information; and send the second feature information to the storage device.
[0119] In some embodiments, a set storage area of the memory is divided into a plurality of storage blocks according to the first characteristic information of the storage object, wherein each of the storage blocks corresponds to at least one storage object; the comparison unit is used to: compare the second characteristic information with the third characteristic information corresponding to each storage block in the set storage area, wherein the third characteristic information corresponding to the storage block is determined according to the first characteristic information stored in the storage block; determine the storage block corresponding to the third characteristic information having the highest similarity with the second characteristic information as the target storage block; and compare the second characteristic information with the first characteristic information in the target storage block.
[0120] In some implementations, the apparatus further includes a second sending unit, configured to cause the storage device to send the target retrieval data to a second processing device.
[0121] At least one embodiment of the present specification further provides an electronic device, comprising a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to execute the computer instructions to implement the data retrieval method described in any embodiment of the present specification.
[0122] At least one embodiment of the present specification further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the data retrieval method described in any embodiment of the present specification is implemented.
[0123] It should be noted that, although several units / modules or sub-units / modules of the data storage device and the data retrieval device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0124] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as methods, devices or computer program products. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the data information processing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0126] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0127] The embodiments of the subject matter and functional operations described in this specification may be implemented in the following: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules in computer program instructions encoded on a tangible non-temporary program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information and transmit it to a suitable receiver device for execution by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
[0128] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits), and the apparatus can also be implemented as special purpose logic circuits.
[0129] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to this large-capacity storage device to receive data from it or to transmit data to it, or both. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning device (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, just to name a few.
[0130] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0131] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0132] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring these operations to be performed in the particular order shown or to be performed sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various device modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and devices can usually be integrated together in a single software product, or packaged into multiple software products.
[0133] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0134] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A storage device, characterized in that: It includes a memory and a computing unit, wherein: The memory is used to store first feature information of at least one storage object, at least one storage data corresponding to each storage object, and storage information of the at least one storage data, wherein the first feature information is obtained by extracting common features of the at least one storage data corresponding to the storage object, the first feature information of the storage object is associated with the storage information of the at least one storage data, the first feature information of the storage object and the at least one storage data are stored in different areas of the memory, and the first feature information corresponding to different storage data of the same storage object is the same; The computing unit is used to obtain second characteristic information of the retrieval data, determine target characteristic information based on a comparison result between the second characteristic information and the first characteristic information in the memory, and obtain target retrieval data corresponding to the storage information based on the storage information associated with the target characteristic information, wherein the target retrieval data is used to be transferred to the memory so that a computing chip located outside the storage device can determine a retrieval result based on the target retrieval data.
2. The device according to claim 1, characterized in that When the calculation unit is used to determine the target characteristic information according to the comparison result between the second characteristic information and the first characteristic information in the memory, the calculation unit is specifically used to: The second feature information is compared with the first feature information in the memory, and at least one first feature information having the highest similarity to the second feature information is determined as the target feature information.
3. The device according to claim 1, characterized in that The memory is further used to store the first characteristic information in a set storage area, and the set storage area is divided into a plurality of storage blocks according to the first characteristic information of the storage object, wherein each of the storage blocks corresponds to at least one storage object.
4. The device according to claim 3, characterized in that The plurality of storage blocks are obtained by dividing the set storage area based on a target sorting result, wherein the target sorting result is obtained by sorting first feature information of a plurality of storage objects stored in the set storage area based on a preset rule.
5. The device according to claim 3, characterized in that The multiple storage blocks are obtained by obtaining the similarity of the first feature information between every two storage objects among the multiple storage objects stored in the set storage area, and storing the first feature information of at least two storage objects whose similarity is higher than a set threshold in the same storage block.
6. The device according to claim 5, characterized in that The computing unit is also used for: comparing the second characteristic information with third characteristic information corresponding to each storage block in the set storage area, wherein the third characteristic information corresponding to the storage block is determined according to the first characteristic information stored in the storage block; Determine a storage block corresponding to the third characteristic information having the highest similarity to the second characteristic information as a target storage block; The second feature information is compared with the first feature information in the target storage block, and at least one feature information having the highest similarity to the second feature is determined as target feature information.
7. The device according to any one of claims 1 to 6, characterized in that The storage information includes a starting address and a storage length, wherein the storage length is determined according to a size of at least one storage data corresponding to the storage object.
8. The device according to any one of claims 1 to 6, characterized in that The storage device is connected to the first processing device, and the first characteristic information is obtained in the following manner: The first processing device uses a pre-trained first feature extraction network to perform feature extraction on one of the stored data corresponding to the storage object to obtain sub-feature information, wherein the first feature extraction network is set in a storage device outside the storage device; Obtaining first characteristic information of the storage object according to sub-characteristic information of at least one piece of storage data corresponding to the storage object; The first feature information is sent to the storage device.
9. The device according to any one of claims 1 to 6, characterized in that The storage device is connected to the second processing device, and the second characteristic information is obtained in the following manner: The second processing device uses a pre-trained second feature extraction network to extract features from the search data to obtain the second feature information, wherein the second feature extraction network is set in a storage device outside the storage device; The second characteristic information is sent to the storage device.
10. The device according to any one of claims 1 to 6, characterized in that The storage device is connected to a third processing device, and the storage device is further configured to send the target retrieval data to the third processing device.
Citation Information
Patent Citations
Data storage method and device, computer equipment and readable storage medium
CN111224793A
Data storage method and data query method
CN111611418A