WO2020173334A1 - 数据存储方法及数据查询方法 - Google Patents

数据存储方法及数据查询方法 Download PDF

Info

Publication number
WO2020173334A1
WO2020173334A1 PCT/CN2020/075690 CN2020075690W WO2020173334A1 WO 2020173334 A1 WO2020173334 A1 WO 2020173334A1 CN 2020075690 W CN2020075690 W CN 2020075690W WO 2020173334 A1 WO2020173334 A1 WO 2020173334A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
feature vector
directory address
feature
query
Prior art date
Application number
PCT/CN2020/075690
Other languages
English (en)
French (fr)
Inventor
罗毅
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to EP20763507.9A priority Critical patent/EP3933615A4/en
Publication of WO2020173334A1 publication Critical patent/WO2020173334A1/zh
Priority to US17/410,899 priority patent/US20210382902A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/532Query formulation, e.g. graphical querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2237Vectors, bitmaps or matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Definitions

  • the present invention relates to the field of data processing technology, and in particular to a data storage method and a data query method. Background technique
  • vector storage and retrieval can be supported.
  • a user uses the database to query unstructured data, taking an image as an example, it needs to call a special service outside the database to convert the image into a vector, and then store the vector in the database.
  • the later query/retrieval the user Also search by vector.
  • the process is relatively complicated, and on the other hand, the user needs to be too demanding.
  • the user needs to convert the image into a vector, and the vector has no intuitive meaning for the user, which increases user costs.
  • the present invention provides a data storage method and a data query method to try to solve or at least alleviate at least one of the above problems.
  • a data storage method including the steps: judging whether the data to be stored belongs to a predetermined data type; if the data belongs to a predetermined data type, storing the data in a first storage area and obtaining the data The directory address of the data; extracting the feature vector of the data; and storing the feature vector of the data in association with the directory address in the second storage area.
  • the data storage method according to the present invention further includes the step: if the data to be stored does not belong to a predetermined data type after the judgment is determined, then the data is stored in the second storage area.
  • the step of extracting the feature vector of the data includes: inputting the directory address of the data into the feature extraction model to output the feature vector of the data.
  • the data storage method further includes the steps of: acquiring description information of the data and storing it in association with the directory address of the data, where the description information includes at least: a feature extraction model for extracting feature vectors and a calculation Feature similarity measurement method.
  • the step of extracting the feature vector of the data further includes: extracting the feature vector corresponding to the data based on the description information of the data and the directory address, more specifically, according to the description of the data Information, a feature extraction model used to extract feature vectors corresponding to the data is acquired; the directory address is input into the feature extraction model to output a feature vector corresponding to the data.
  • the predetermined data type includes one or more of the following data types: text, picture, XML, HTML, image, audio, and video.
  • a data storage device including: a judging unit, adapted to judge whether the data to be stored belongs to a predetermined data type; a first storage unit, adapted to, when the data belongs to a predetermined data type, Store the data and generate a directory address of the data; a feature extraction unit adapted to extract a feature vector of the data; and a second storage unit adapted to associate the feature vector of the stored data with the directory address.
  • the data storage device further includes: a metadata storage unit, adapted to obtain description information of the data when the data to be stored belongs to a predetermined data type, and store it in association with the directory address of the data.
  • a metadata storage unit adapted to obtain description information of the data when the data to be stored belongs to a predetermined data type, and store it in association with the directory address of the data.
  • a data query method including the steps of: generating at least one feature vector to be queried; determining at least one feature vector similar to the feature vector to be queried; acquiring at least one feature that is similar to the determined feature vector At least one directory address associated with the vector; and at least one piece of data pointed to by the acquired at least one directory address is determined as target data.
  • a data query method including the steps of: acquiring at least one feature vector to be queried; determining at least one feature vector similar to the feature vector to be queried; acquiring at least one feature that is similar to the determined feature vector At least one directory address associated with the vector; and at least one piece of data pointed to by the acquired at least one directory address is determined as target data.
  • a data query device including: a judging unit, adapted to determine whether the query information includes a predetermined data type; a feature calculation unit, adapted to generate at least one feature to be queried based on the query information
  • the vector is also suitable for determining at least one feature vector similar to the feature vector to be queried;
  • the query unit is adapted to obtain at least one directory address associated with the determined at least one feature vector from the second storage area; the second query unit is adapted to determine the location of the obtained at least one directory address from the first storage area At least one data pointed to is the target data.
  • a data management system including: the above-mentioned data storage device and the above-mentioned data query device.
  • a computing device including: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by at least one processor, and the program instructions include To execute the above-mentioned data storage method and data query method instructions.
  • a readable storage medium storing program instructions.
  • the program instructions When the program instructions are read and executed by a computing device, the computing device executes the data storage method and data query method described above. .
  • structured data and unstructured data are stored separately, for example, unstructured data is stored in a first storage area, and structured data is stored in a second storage area; and through a built-in feature extraction service To generate the feature vector of the unstructured data, and store it in the second storage area in association with the storage address of the unstructured data (that is, the directory address).
  • This can directly support the storage of various unstructured data.
  • this data storage method in addition to supporting structured data queries, it can also support semantic-based queries of various unstructured data.
  • users do not need to have a deep understanding of related deep learning algorithms and feature extraction models, which can effectively reduce users' understanding and use costs.
  • Fig. 1 shows a schematic diagram of the environment of a data management system 100 according to an embodiment of the present invention
  • FIG. 2 shows a schematic diagram of a data management system 100 according to an embodiment of the present invention
  • FIG. 3 shows a schematic diagram of a computing device 300 according to an embodiment of the present invention
  • FIG. 4 shows a flowchart of a data storage method 400 according to an embodiment of the present invention.
  • Fig. 5 shows a flowchart of a data query method 500 according to an embodiment of the present invention. detailed description
  • Fig. 1 shows a schematic diagram of an environment of a data management system 100 according to an embodiment of the present invention.
  • the data management system 100 and the client 200 are in communication connection.
  • the clients 200 have their own forms, including but not limited to mobile terminals, personal computers, Personal digital assistants, etc.
  • the present invention is not limited to the type of client 200, as long as the user can use the client 200 to send data storage requests and domain query data requests to the data management system 100, and receive the results returned by the system 100 and display them in the client 200. can.
  • the client 200 may be a computing device, and sends a data storage request to the system 100 through an application installed on the computing device, and stores structured data and/or unstructured data in a corresponding location in the system 100.
  • the system 100 can use the stored data to provide query/retrieval services for the client 200.
  • the client 200 may be a mobile terminal, which sends a data query request to the system 100 through an application installed on the mobile terminal, and displays the query result on the interface of the mobile terminal.
  • Fig. 2 shows a schematic diagram of a data management system 100 according to an embodiment of the present invention.
  • the data management system 100 includes a data storage device 110 and a data query device 120.
  • the data storage device 110 is mainly used to store data.
  • the stored data may be structured data, or may be text, image, XML, HTML, Image, audio, and video unstructured data.
  • the data is stored in a corresponding storage area according to the data type of the data to be stored.
  • the data to be stored belongs to unstructured data (for example, text, picture, XML, HTML, image, audio, video), the data is stored in the first storage area; if the data to be stored belongs to structured data Data, the data is stored in the second storage area. At the same time, extract the feature vector of the data stored in the first storage area, and store the feature vector in the second storage area in association with the directory address of the data (that is, the location of the data in the first storage area).
  • the data query device 120 is mainly used for users to query/retrieve data.
  • the user makes a query by inputting query information, and the query information may include multiple query conditions.
  • the query information entered by the user is obtained, and it is determined whether the query information contains a predetermined data type, and if the predetermined data type is included, the feature to be queried is generated according to the query information vector.
  • the query information input by the user may also include the feature vector to be queried.
  • the data query device 120 directly obtains the feature vector to be queried when judging that the query information contains a predetermined data type.
  • the data query device 120 may obtain the feature vector corresponding to the query information from the outside. The embodiment of the present invention does not make too many restrictions on this.
  • At least one feature vector is matched for the feature vector to be queried from the feature vectors stored in the second storage area, and the directory address associated with it is obtained, and then from the first storage area according to the address pointed to by the directory address Retrieving the relevant data is the query result.
  • Fig. 2 further shows a schematic diagram of a data storage device 110 and a data query device 120 according to an embodiment of the present invention.
  • the data storage device 110 includes: a judgment unit 111, a first storage unit 113, a feature extraction unit 115, a second storage unit 117, and a metadata storage unit 119.
  • the second storage unit 117 has the same structure as the traditional database, and is used to store structured data; and for unstructured data, it is stored in the first storage unit 113.
  • the feature extraction unit 115 is used to extract feature vectors of unstructured data as an abstraction of unstructured data for use in queries.
  • the judgment unit 111 first judges whether the data to be stored belongs to a predetermined data type.
  • the predetermined data type is an unstructured data type, including one or more of the following data types: text, picture, XML, HTML, image, audio, video, various reports, and so on.
  • the first storage unit 113 stores the data, and stores the data in the first storage unit 113.
  • As the directory address of the data it is stored. Is assumed to be stored in a picture data which was stored in the first storage unit 113 and generates a list address, for example, /home/ex/000001.jpg o
  • the feature extraction unit 115 based on the list address, extracted The feature vector of the data.
  • the second storage unit 117 then stores the feature vector of the data and the directory address in association with it.
  • at least one feature extraction model is pre-stored in the feature extraction unit 115.
  • the feature extraction unit 115 When extracting feature vectors, in one embodiment, the feature extraction unit 115 inputs the directory address of the data into the feature extraction model, and the output is the feature vector of the data; in another embodiment, the feature extraction unit 115 may also Input the data itself into the feature extraction model, and use the output feature vector as the feature vector of the data. It should be noted that the method of extracting feature vectors of data in the embodiment of the present invention Do not make too many restrictions. Those skilled in the art can select an appropriate feature extraction method according to actual application scenarios to implement the data storage solution according to the present invention. Since the feature vector of the data is generated by using the directory address of the data, the calculation amount during feature extraction can be effectively reduced. The following takes the directory address of the data into the feature extraction model to obtain the feature vector as an example for description.
  • the data to be stored carries related description information of the data in addition to the data itself.
  • the description information is, for example: a feature extraction model used to extract the feature vector of the data and a measurement method used to calculate the feature similarity of the data.
  • the feature extraction model can adopt various neural network models (such as CNN, Resnet, etc., but not limited to this), and the feature similarity measurement method can adopt Euclidean distance, Consine similarity, etc., and is not limited to this.
  • the metadata storage unit 119 obtains the description information of the data, and stores the description information of the data in association with the directory address.
  • the feature extraction unit 115 can extract the feature vector corresponding to the data based on the description information of the data and the directory address. Specifically, the feature vector of the data is extracted by calling the feature extraction model specified in the description information. Optionally, the feature extraction unit 115 extracts the corresponding embedding feature vector according to the feature extraction model specified in the description information of the data, as an abstraction of the data.
  • At least one feature extraction model is pre-stored in the feature extraction unit 115, in the embodiment according to the present invention, a process of pre-training and generating these feature extraction models is also included.
  • the following gives a process of training and generating a feature extraction model, but it is only an example, and the embodiment of the present invention is not limited to this.
  • a pre-trained feature extraction model constructs a pre-trained feature extraction model, and set the initial model parameters.
  • input training samples eg, collecting multiple images as training samples
  • the output of the feature extraction model satisfies a predetermined condition (it can be the loss value between the calculated model output and the target output.
  • a predetermined condition it can be the loss value between the calculated model output and the target output.
  • the loss value reaches a certain condition, confirm that the predetermined condition is satisfied; it can also be confirmed to meet the predetermined condition after iterative training for a certain number of times. Condition)
  • the feature extraction model generated at this time is used as the trained feature extraction model, and is stored in the feature extraction unit 115.
  • every time data is stored in the first storage unit 113, the feature extraction unit 115 synchronously extracts the feature vector of the data, and stores it in the second storage unit in association with the directory address. 117 in.
  • this method will increase the time for storing data each time.
  • the feature vector of the data is extracted in an asynchronous manner, that is, the data to be stored is first stored in the first storage unit 113, and the corresponding directory address is obtained, and then at a timing (assuming that During the free period of the day, such as 1:00-5:00 in the morning every day, it is not limited to this)
  • the feature extraction is performed on the newly stored data in the first storage unit 113, and the feature direction corresponding to each data is generated.
  • the feature vector is associated with the directory address and stored in the second storage unit 117.
  • the second storage unit 117 directly stores the data. In other words, if the data to be stored is structured data, it is directly stored in the second storage unit 117.
  • the data query device 120 includes: a judgment unit 121, a feature calculation unit 123, a first query unit 125, and a second query unit 127.
  • the determining unit 121 determines whether the query information contains a predetermined data type.
  • the query information may include at least one query condition.
  • the query information is: query an image that "the similarity to image A is greater than 0.8 and the evaluation of the image is "good skirt”", bei 1J, where Contains two query conditions, namely: the similarity to image A is greater than 0.8, and the evaluation of the image is "good skirt", and at the same time, it can be confirmed that the target data to be queried in the query information is an image and belongs to a predetermined data type.
  • the target data that meets the query conditions is queried from the aforementioned second storage unit 117 according to the traditional data query method; if After the judgment unit 121 determines that the query information contains a predetermined data type, the following process is executed to query the target data that meets the query condition.
  • the user can input multiple query conditions. These query conditions can be traditional queries based on structured data, or queries based on unstructured data. After the query conditions are judged, the method for data query is determined. For example, the user can upload an image, input a voice, and input a text on the application interface at the same time, in order to finally obtain the target data that meets each query condition.
  • the feature calculation unit 123 generates at least one feature vector to be queried based on the query information.
  • the first method is the same as the method for extracting feature vectors by the data storage device 110 described above.
  • each unstructured data contained in the query information is cached separately to obtain the corresponding directory address as the query to be queried.
  • respective feature vectors to be queried are generated.
  • the feature calculation unit 123 can also directly obtain at least one feature vector to be queried.
  • the query information contains the feature vector of the information to be queried.
  • the feature extraction model may be specified by the user when inputting the query information, or it may be pre-configured in the data query device 120 (for example, for image data, the CNN model is used; for text data Using the ResNet model, etc.), it is also possible to use the same fixed feature extraction model to generate all feature vectors to be queried.
  • the feature calculation unit 123 can call the relevant feature extraction model in the feature extraction unit 115 to perform the step of extracting feature vectors, which is not too limited in the embodiment of the present invention. For more information about the feature extraction model, please refer to the previous description.
  • the feature calculation unit 123 further respectively determines at least one feature vector similar to the feature vector to be queried. According to an embodiment, for each feature vector to be queried, the feature calculation unit 123 respectively determines from the second storage area at least one similar to the feature vector to be queried according to a specified measurement method for calculating feature similarity.
  • Feature vector In the embodiment of the present invention, the second storage area is the storage area corresponding to the second storage unit 117, in which the feature vector of the unstructured data and its directory address are associated and stored.
  • the metadata storage unit 119 stores the data directory address and description information in association, and the description information also specifies a measurement method for calculating feature similarity.
  • the feature calculation unit 123 can calculate the similarity between the feature vector to be queried and the feature vector of the data according to the feature similarity measurement method corresponding to each data stored in the second storage area, and determine At least one feature vector whose similarity satisfies the query condition.
  • the first query unit 125 respectively obtains at least one directory address associated with the determined at least one feature vector from the second storage area.
  • the first query unit 125 maintains communication with the second storage unit 117 to obtain the directory address associated with the feature vector from the second storage unit 117 for storing structured data.
  • the second query unit 127 determines from the first storage area at least one piece of data pointed to by the acquired at least one directory address as target data. According to the embodiment of the present invention, the second query unit 127 maintains communication with the first storage unit 113 to obtain corresponding data from the first storage unit 113 for storing unstructured data according to the directory address.
  • FIG. 2 is only exemplary. In practical applications, the judging unit 111 and the judging unit 121 can be set as the same unit to judge whether there is data of a predetermined data type in the received information. .
  • the feature extraction unit 115 and the feature calculation unit 123 may be set as the same unit, used to extract feature vectors of the data and calculate the similarity between the feature vectors.
  • the first query unit 125 can also be implemented as a second storage unit A module in 117.
  • the second query unit 127 may also be implemented as a module in the first storage unit 113 to obtain corresponding data from the second storage area and the first storage area respectively.
  • there may be fewer, additional or different components in the system 100 there may be fewer, additional or different components in the system 100.
  • the unstructured data is stored in the first storage area
  • the structured data is stored in the second storage area
  • the feature vector of the unstructured data is generated through the built-in feature extraction service. It is stored in the second storage area in association with the storage address of the unstructured data (that is, the directory address).
  • the data management system 100 can directly support the storage of various unstructured data.
  • the system 100 can not only support query of structured data, but also support query of various unstructured data based on semantics.
  • users do not need to have a deep understanding of related deep learning algorithms and feature extraction models, which can effectively reduce users' understanding and use costs.
  • the data management system 100 may be implemented by one or more computing devices 300 as described below.
  • the data management system 100 and its components such as the data storage device 110 and the data query device 120, can be implemented by the computing device 300 as described below.
  • Fig. 3 shows a schematic diagram of a computing device 300 according to an embodiment of the present invention.
  • the computing device 300 typically includes a system memory 306 and one or more processors 304.
  • the memory bus 308 may be used for communication between the processor 304 and the system memory 306.
  • the processor 304 may be any type of processing, including but not limited to: a microprocessor (MP), a microcontroller (
  • the processor 304 may include one or more levels of cache, such as the first level cache 310 and the second level cache 312, the processor core 314, and the registers 316.
  • the exemplary processor core 314 may include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof.
  • the exemplary memory controller 318 may be used with the processor 304, or in some implementations, the memory controller 318 may be an internal part of the processor 304.
  • the system memory 306 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof.
  • the system memory 306 may include an operating system 320, one or more applications 322, and program data 324.
  • the application 322 may be arranged to be executed by one or more processors 304 using program data 324 on an operating system.
  • the computing device 300 may also include various interface devices (for example, output device 342, peripheral interface 344 and communication device 346) to the basic configuration 302 via the bus/interface controller 330 communication interface bus 340.
  • the example output device 342 includes a graphics processing unit 348 and an audio processing unit 350. They can be configured to facilitate communication with various external devices such as displays or speakers via one or more A/V ports 352.
  • the example peripheral interface 344 may include a serial interface controller 354 and a parallel interface controller 356, which may be configured to facilitate communication via one or more I/O ports 358 and input devices such as keyboards, mice, pens, etc. , Voice input devices, touch input devices) or other peripherals (such as printers, scanners, etc.) to communicate.
  • the example communication device 346 may include a network controller 360, which may be arranged to facilitate communication with one or more other computing devices 362 via a network communication link via one or more communication ports 364.
  • the computing device 300 may also include a storage interface bus 334 and a storage device 332.
  • the storage device 332 may further include a removable memory 336 and a non-removable memory 338.
  • a network communication link may be an example of a communication medium.
  • the communication medium may generally be embodied as computer-readable instructions, data structures, and program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
  • a "modulated data signal" can be a signal, one or more of its data sets or its change can be done in a way of encoding information in the signal.
  • communication media may include wired media such as wired networks or dedicated line networks, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR), or other wireless media.
  • RF radio frequency
  • IR infrared
  • the term computer readable media used herein may include both storage media and communication media.
  • the computing device 300 may be implemented as a server, such as a file server, a database server, an application server, a WEB server, etc., or may be implemented as a personal computer including a desktop computer and a notebook computer configuration. Of course, the computing device 300 may also be implemented as a part of a small-sized portable (or mobile) electronic device.
  • the computing device 300 is configured to execute the data storage method 400 and the data query method 500 according to the present invention.
  • the application 322 of the computing device 300 contains multiple program instructions for executing the method 400 and the method 500 according to the present invention.
  • Fig. 4 shows a flowchart of a data storage method 400 according to an embodiment of the present invention.
  • the process of executing the method 400 by the data storage device 110 will be introduced in detail with reference to FIG. 2 and the related introduction of the data storage device 110 above.
  • step S410 it is determined whether the data to be stored belongs to For the predetermined data type.
  • unstructured data is data belonging to a predetermined data type
  • the predetermined data type may include, for example, one or more of the following data types: text, picture, XML, HTML, image, video, and video.
  • the data is stored in the second storage area (that is, the data stored in the second storage unit 117). Corresponding storage area).
  • the data is stored in the first storage area (ie, the storage area corresponding to the first storage unit 113), and the The storage location of the data serves as the directory address of the data.
  • step S440 the feature vector of the corresponding data is extracted.
  • the directory address of the data is input into the feature extraction model, and the output is the feature vector of the data.
  • the data itself can also be input to the feature extraction model to output the feature vector of the data.
  • the feature extraction model may be fixed by the system or specified by the user, which is not too limited in the embodiment of the present invention.
  • the feature extraction model is based on a convolutional neural network, such as CNN.
  • the metadata of the data that is, the description information of the data
  • the description information includes: a feature extraction model for extracting feature vectors.
  • the data storage device 110 may display the pre-stored feature extraction model to the user through a drop-down menu or the like, so that the user can select one of the feature extraction models as a model for the device 110 to extract the feature vector of the data.
  • the process of how to train and generate the pre-stored feature extraction model please refer to the relevant description of the device 110 above, which will not be repeated here.
  • step S440 based on the description information of the data and the directory address, the feature vector corresponding to the data is extracted. Further, first obtain the feature extraction model for extracting feature vectors corresponding to the data according to the description information of the data; then input the directory address of the data into the feature extraction model to output the feature vector corresponding to the data.
  • the description information of the data can also include: a measurement method used to calculate feature similarity, so that in the subsequent data query process, the feature vector of the data and the feature vector of the data to be queried can be calculated The similarity.
  • step S450 the feature vector of the data and the directory address are associated and stored in the second storage area (that is, the storage area corresponding to the second storage unit 117).
  • FIG. 5 shows a flowchart of a data query method 500 according to an embodiment of the present invention. The following will be combined with Figure 2 In addition to the related introduction of the data query device 120 above, the process of the data query device 120 executing the method 500 is introduced in detail.
  • the method 500 starts at step S510.
  • step S510 in response to the query information input by the user, it is determined whether the query information contains a predetermined data type.
  • the predetermined data types include data types of unstructured data, for example: text, picture, XML, HTML, image, audio, and video.
  • the query information contains at least one query condition. According to the query conditions, it can be determined whether the data to be queried is structured data or unstructured data, that is, whether the query information contains a predetermined data type.
  • the target data is obtained from the second storage area according to the traditional structured data query method.
  • step S530 At least one feature vector to be queried is generated.
  • the first method is the same as the method for extracting feature vectors in the method 400.
  • each unstructured data contained in the query information is cached separately to obtain the corresponding directory address (ie, storage address), As the directory address to be queried; then, based on these directory addresses to be queried, respective feature vectors to be queried are generated.
  • the second way is to directly input the unstructured data (such as images) contained in the query information into the feature extraction model, and output the corresponding feature vector to be queried.
  • the first method can maximize the consistency of the feature vector acquisition method, but it will increase the cache.
  • the second method can save the cache and improve the calculation efficiency.
  • those skilled in the art can select a suitable feature extraction method and feature extraction model in combination with actual scenes, which are not limited in the embodiment of the present invention.
  • the feature extraction model may be specified by the user when inputting the query information, or it may be pre-configured in the data query device 120 (for example, for image data, the CNN model is used; for text
  • the data of using the ResNet model is not limited to this), which can be consistent with the feature extraction model used when executing the method 400, and the same fixed feature extraction model can also be used to generate all feature vectors to be queried.
  • the feature extraction model please refer to the previous description.
  • the user when inputting query information, may also input the feature vector corresponding to the information to be queried together, or call an external feature extraction model to generate the feature vector to be queried corresponding to the query information. In this way, if it is confirmed after the judgment that the query information contains the predetermined data type, at least one to be queried is directly obtained Feature vector.
  • step S540 at least one feature vector similar to the feature vector to be queried is determined.
  • At least one feature vector similar to the feature vector to be queried is determined from the second storage area (that is, the storage area corresponding to the second storage unit 117).
  • the metadata storage unit 119 stores the directory address and description information of the data in association, and the description information also specifies a measurement method for calculating feature similarity. Therefore, in step S540, the similarity between the feature vector to be queried and the feature vector of the data can be calculated according to the feature similarity measurement method corresponding to each data stored in the second storage area, and determine At least one feature vector whose similarity satisfies the query condition.
  • step S550 at least one directory address associated with the determined at least one feature vector is obtained.
  • the feature vector of unstructured data and its directory address are associated and stored in the second storage area.
  • the directory address associated with the feature vector is further obtained from the second storage area.
  • step S560 at least one piece of data pointed to by the acquired at least one directory address is determined as the target data.
  • each directory address pointed to by each directory address can be determined from the first storage area.
  • Data as target data.
  • the various technologies described here can be implemented in combination with hardware or software, or a combination of them. Therefore, the method and device of the present invention, or some aspects or parts of the method and device of the present invention may be embedded in a tangible medium, such as a removable hard disk, U disk, floppy disk, CD-ROM, or any other machine-readable storage medium
  • program code that is, instructions
  • the machine becomes a device for practicing the present invention.
  • the computing device When the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and nonvolatile memory and/or storage elements), and at least one input device, And at least one output device.
  • the memory is configured to store program code; the processor is configured to execute the data storage method and/or data query method of the present invention according to instructions in the program code stored in the memory.
  • readable media include readable storage media and communication media.
  • the readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data.
  • the communication medium is generally such as Modulated data signals such as carrier waves or other transmission mechanisms embody computer readable instructions, data structures, program modules or other data, and include any information delivery media. Combinations of any of the above are also included in the scope of readable media.
  • the algorithms and displays are not inherently related to any particular computer, virtual system or other equipment.
  • Various general-purpose systems can also be used with the examples of the present invention. From the above description, the structure required to construct this type of system is obvious.
  • the present invention is not directed to any specific programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of a specific language is for disclosing the best embodiment of the present invention.
  • modules or units or components of the device in the example disclosed herein can be arranged in the device as described in this embodiment, or alternatively can be positioned differently from the device in this example In one or more devices.
  • the modules in the preceding examples can be combined into one module or can be divided into multiple sub-modules.
  • modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and/or processes or units are mutually exclusive, any combination can be used to compare all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method or methods disclosed in this manner or All the processes or units of the equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
  • a processor with the necessary instructions for implementing the method or method element forms a device for implementing the method or method element.
  • the elements of the device embodiment described herein are examples of the device: The device is used to implement the function performed by the element for the purpose of implementing the invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种数据存储方法和数据查询方法。其中,数据存储方法包括步骤:判断待存储的数据是否属于预定数据类型;若该数据属于预定数据类型,则将该数据存储至第一存储区域并获取该数据的目录地址;提取该数据的特征向量;以及将数据的特征向量与目录地址关联存储至第二存储区域。本发明还公开了相应的数据管理系统及计算设备。

Description

麵存储方法及数据查询方法
本申请要求 2019年 02月 25 日递交的申请号为 201910139006.X、 发明名称为“数 据存储方法及数据查询方法” 的中国专利申请的优先权, 其全部内容通过引用结合在本 申请中。 技术领域
本发明涉及数据处理技术领域, 尤其涉及数据存储方法和数据查询方法。 背景技术
传统的应用于数据库管理系统中的查询语言 (如, SQL) , 都是针对结构化数据, 以实现数据的存取、 查询、 更新和管理。 然而, 传统的语义检索方法, 一般都是基于数 据本身, 并不会去理解数据背后的含义。
随着人工智能领域的飞速发展, 音视频、 图像、 文本等非结构化数据得到越来越多 的应用。 对于这些非结构化数据, 其本身的语义要通过识别才能得知。 因此, 对于这类 数据的处理, 常需要得到其背后的含义。
在现有的一些数据库系统中, 可以支持向量的存储和检索。 这样, 在用户使用该数 据库查询非结构化数据时, 以图像为例, 需要在数据库外部, 调用专门的服务将图像转 换成向量, 然后再将向量存入数据库, 在后期查询 /检索时, 用户也通过向量来进行检索。 这种处理方式, 一方面过程比较繁杂, 另一方面对用户要求过高, 用户需要将图像转换 成向量, 并且向量对于用户来说, 没有直观的含义, 这就增加了用户成本。
鉴于此, 需要一种既能够支持结构化数据、 又能够支持非结构化数据的数据管理方 法, 来实现对数据的存储、 查询 /检索等。 发明内容
为此, 本发明提供了一种数据存储方法及数据查询方法, 以力图解决或至少缓解上 面存在的至少一个问题。
根据本发明的一个方面, 提供了一种数据存储方法, 包括步骤: 判断待存储的数据 是否属于预定数据类型; 若该数据属于预定数据类型, 则将该数据存储至第一存储区域 并获取该数据的目录地址; 提取该数据的特征向量; 以及将该数据的特征向量与目录地 址关联存储至第二存储区域。 可选地, 根据本发明的数据存储方法还包括步骤: 若经判断后确认待存储的数据不 属于预定数据类型, 则将该数据存储至第二存储区域。
可选地, 在根据本发明的数据存储方法中, 提取该数据的特征向量的步骤包括: 将 该数据的目录地址输入特征提取模型, 以输出该数据的特征向量。
可选地, 根据本发明的数据存储方法还包括步骤: 获取数据的描述信息, 并与该数 据的目录地址关联存储, 其中描述信息至少包括: 用于提取特征向量的特征提取模型和 用于计算特征相似度的度量方法。
可选地, 在根据本发明的数据存储方法中, 提取数据的特征向量的步骤还包括: 基 于数据的描述信息和目录地址, 提取出该数据对应的特征向量, 更具体地, 根据数据的 描述信息, 获取该数据对应的用于提取特征向量的特征提取模型; 将该目录地址输入该 特征提取模型, 以输出该数据对应的特征向量。
可选地, 在根据本发明的数据存储方法中, 预定数据类型包括以下数据类型中的一 种或多种: 文本、 图片、 XML、 HTML、 图像、 音频、 视频。
根据本发明的另一个方面, 提供了一种数据存储装置, 包括: 判断单元, 适于判断 待存储的数据是否属于预定数据类型; 第一存储单元, 适于在该数据属于预定数据类型 时, 存储该数据并生成该数据的目录地址; 特征提取单元, 适于提取该数据的特征向量; 以及第二存储单元, 适于关联存储数据的特征向量与目录地址。
可选地, 根据本发明的数据存储装置还包括: 元数据存储单元, 适于在待存储数据 属于预定数据类型时, 获取数据的描述信息, 并与该数据的目录地址关联存储。
根据本发明的再一个方面, 提供了一种数据查询方法, 包括步骤: 生成至少一个待 查询的特征向量; 确定与待查询的特征向量相似的至少一个特征向量; 获取与所确定的 至少一个特征向量相关联的至少一个目录地址; 以及确定所获取的至少一个目录地址所 指向的至少一个数据, 作为目标数据。
根据本发明的再一个方面, 提供了一种数据查询方法, 包括步骤: 获取至少一个待 查询的特征向量; 确定与待查询的特征向量相似的至少一个特征向量; 获取与所确定的 至少一个特征向量相关联的至少一个目录地址; 以及确定所获取的至少一个目录地址所 指向的至少一个数据, 作为目标数据。
根据本发明的又一个方面, 提供了一种数据查询装置, 包括: 判断单元, 适于判断 查询信息中是否包含预定数据类型; 特征计算单元, 适于基于查询信息, 生成至少一个 待查询的特征向量, 还适于确定与待查询的特征向量相似的至少一个特征向量; 第一查 询单元, 适于从第二存储区域中获取与所确定的至少一个特征向量相关联的至少一个目 录地址; 第二查询单元, 适于从第一存储区域中确定所获取的至少一个目录地址所指向 的至少一个数据, 作为目标数据。
根据本发明的又一个方面, 提供了一种数据管理系统, 包括: 如上所述的数据存储 装置和如上所述的数据查询装置。
根据本发明的又一个方面, 提供了一种计算设备, 包括: 至少一个处理器; 和存储 有程序指令的存储器, 其中, 程序指令被配置为适于由至少一个处理器执行, 程序指令 包括用于执行如上所述的数据存储方法和数据查询方法的指令。
根据本发明的又一个方面, 提供了一种存储有程序指令的可读存储介质, 当程序指 令被计算设备读取并执行时, 使得该计算设备执行如上所述的数据存储方法和数据查询 方法。
根据本发明的方案, 将结构化数据与非结构化数据分别存储, 如, 在第一存储区域 内存储非结构化数据, 在第二存储区域内存储结构化数据; 并通过内置的特征提取服务 来生成非结构化数据的特征向量, 将其与非结构化数据的存储地址 (即目录地址) 关联 存储至第二存储区域。 这样就可以直接支持各种非结构化数据的存储。 同时, 基于这种 数据存储方式, 除了能够支持结构化数据的查询外, 还可以支持对各种非结构化数据基 于语义的查询。 此外, 用户不需要深入了解相关的深度学习算法和特征提取模型, 能够 有效降低用户的理解和使用成本。
上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明的技术手段, 而 可依照说明书的内容予以实施, 并且为了让本发明的上述和其它目的、 特征和优点能够 更明显易懂, 以下特举本发明的具体实施方式。 附图说明
为了实现上述以及相关目的, 本文结合下面的描述和附图来描述某些说明性方面, 这些方面指示了可以实践本文所公开的原理的各种方式, 并且所有方面及其等效方面旨 在落入所要求保护的主题的范围内。 通过结合附图阅读下面的详细描述, 本公开的上述 以及其它目的、 特征和优势将变得更加明显。 遍及本公开, 相同的附图标记通常指代相 同的部件或元素。
图 1示出了根据本发明一个实施例的数据管理系统 100的环境示意图;
图 2示出了根据本发明一个实施例的数据管理系统 100的示意图; 图 3示出了根据本发明一个实施例的计算设备 300的示意图;
图 4示出了根据本发明一个实施例的数据存储方法 400的流程图; 以及
图 5示出了根据本发明一个实施例的数据查询方法 500的流程图。 具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中显示了本公开的 示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不应被这里阐述的实施例 所限制。 相反, 提供这些实施例是为了能够更透彻地理解本公开, 并且能够将本公开的 范围完整的传达给本领域的技术人员。
图 1示出了根据本发明一个实施例的数据管理系统 100的环境示意图。如图 1所示, 数据管理系统 100与客户端 200之间通信连接。虽然在图 1中仅仅示出了 3个客户端 200, 但是应当理解, 在实践中, 存在有相当大量的客户端 200, 这个客户端 200具有各自形 式, 包括但不限于移动终端、 个人计算机、 个人数字助理等。本发明不受限于客户端 200 的类型, 只要用户可以利用客户端 200向数据管理系统 100发出存储数据的请求和域查 询数据的请求, 并接收系统 100返回的结果在客户端 200中显示即可。
例如, 客户端 200可以是计算设备, 通过安装在计算设备上的应用向系统 100发出 存储数据的请求, 将结构化数据和 /或非结构化数据存入系统 100中对应的位置。 同时, 系统 100又可以利用这些已存储的数据为客户端 200提供查询 /检索服务。 又如, 客户端 200可以是移动终端, 通过安装在移动终端上的应用向系统 100发出查询数据的请求, 并且在移动终端的界面上显示查询结果。
图 2示出了根据本发明一个实施例的数据管理系统 100的示意图。 如图 2所示, 根 据本发明实施例的数据管理系统 100包括数据存储装置 110和数据查询装置 120。 根据 本发明的实施方式, 数据存储装置 110主要用于存储数据, 在根据本发明的实施例中, 所存储的数据既可以是结构化的数据, 也可以是诸如文本、 图片、 XML、 HTML、 图像、 音频、 视频类的非结构化数据。 当用户发起存储数据的操作请求时, 响应于用户存储数 据的操作, 根据待存储数据的数据类型将该数据存入相应的存储区域。根据一种实施例, 若待存储数据属于非结构化数据(例如文本、 图片、 XML、 HTML、图像、音频、视频), 则将该数据存入第一存储区域; 若待存储数据属于结构化数据, 则将该数据存入第二存 储区域。 同时, 提取第一存储区域内所存储数据的特征向量, 并将特征向量与该数据的 目录地址 (S卩, 该数据在第一存储区域的位置) 关联存储在第二存储区域内。 数据查询装置 120主要用来供用户查询 /检索数据。 在根据本发明的实施例中, 用户 通过输入查询信息来进行查询, 该查询信息中可以包括多个查询条件。 当用户发起查询 / 检索数据的请求时, 响应于用户操作, 获取用户输入的查询信息, 并判断该查询信息中 是否包含预定数据类型, 若包含预定数据类型, 则根据查询信息生成待查询的特征向量。 当然, 用户输入的查询信息中, 也可以包含待查询的特征向量。这样, 数据查询装置 120 在判断查询信息中包含预定数据类型时, 直接获取待查询的特征向量。 或者, 数据查询 装置 120可以从外部获取查询信息对应的特征向量。本发明的实施例对此不做过多限制。 而后, 从第二存储区域内所存储的特征向量中为待查询的特征向量匹配到至少一个特征 向量, 并获取与其相关联的目录地址, 进而根据目录地址所指向的地址从第一存储区域 中取出相关的数据, 即为查询结果。
图 2进一步示出了根据本发明一个实施例的数据存储装置 110和数据查询装置 120 的示意图。
如图 2, 数据存储装置 110包括: 判断单元 111、 第一存储单元 113、 特征提取单元 115、 第二存储单元 117和元数据存储单元 119。 其中, 第二存储单元 117同传统的数据 库结构相同, 用来存储结构化数据; 而对于非结构化数据, 将其存入第一存储单元 113。 特征提取单元 115用于提取非结构化数据的特征向量, 作为非结构化数据的抽象, 以供 查询时使用。
当用户输入待存储的数据时, 先由判断单元 111判断该待存储的数据是否属于预定 数据类型。 根据本发明的实施例, 预定数据类型是非结构化数据类型, 包括以下数据类 型中的一种或多种: 文本、 图片、 XML、 HTML、 图像、 音频、 视频、 各类报表等等。
根据本发明的一种实施方式, 在经判断单元 111判断后确认待存储的数据属于预定 数据类型时, 第一存储单元 113存储该数据, 并将该数据在第一存储单元 113中的存储 位置作为该数据的目录地址, 进行存储。 假设待存储的数据是一张图片, 将其存入第一 存储单元 113并生成一个目录地址, 例如是, /home/ex/000001.jpgo 而后, 特征提取单元 115基于该目录地址, 提取出该数据的特征向量。再交由第二存储单元 117, 由其关联存 储该数据的特征向量与目录地址。 在根据本发明的一种实施例中, 特征提取单元 115中 预先存储有至少一个特征提取模型。 在提取特征向量时, 在一种实施例中, 特征提取单 元 115将数据的目录地址输入特征提取模型, 输出的就是该数据的特征向量; 在又一种 实施例中, 特征提取单元 115也可以将数据本身输入到特征提取模型中, 并将输出的特 征向量作为该数据的特征向量。 应当指出, 本发明实施例对提取数据的特征向量的方式 不做过多限制。 本领域技术人员可以根据实际应用场景选择适当的特征提取方式, 来实 现根据本发明的数据存储方案。 由于利用数据的目录地址生成数据的特征向量, 能够有 效降低特征提取时的计算量, 以下以将数据的目录地址输入特征提取模型得到特征向量 为例, 进行说明。 在根据本发明的实施例中, 若待存储的数据属于预定数据类型, 那么 待存储的数据除了数据本身外, 还携带有该数据的相关描述信息。 描述信息例如是: 指 定用于提取该数据的特征向量的特征提取模型和用于计算该数据的特征相似度的度量方 法。 根据一种实施例, 特征提取模型可以采用各种神经网络模型 (如 CNN、 Resnet等, 不限于此) , 特征相似度度量方法可以采用欧式距离 (Euclidean distance) 、 Consine相 似度等, 不限于此。 当待存储数据属于预定数据类型时, 元数据存储单元 119会获取该 数据的描述信息, 并关联存储该数据的描述信息和目录地址。 这样, 特征提取单元 115 就可以基于数据的描述信息和目录地址, 提取出该数据对应的特征向量。 具体地, 通过 调用描述信息中指定的特征提取模型, 提取出该数据的特征向量。 可选地, 特征提取单 元 115根据数据的描述信息中所指定的特征提取模型, 提取出相应的 embedding的特征 向量, 作为对该数据的抽象。
此外, 由于特征提取单元 115中预存有至少一个特征提取模型, 故在根据本发明的 实施例中, 还包含了预先训练生成这些特征提取模型的过程。 以下给出一种训练生成特 征提取模型的过程, 但仅作为示例, 本发明的实施例不限于此。
首先,构造预训练的特征提取模型,并设置初始的模型参数。之后,将训练样本(如, 采集多个图像作为训练样本) 输入到预训练的特征提取模型中, 并根据输出的结果对模 型参数进行微调, 以生成新的特征提取模型, 重复上述步骤, 直到特征提取模型的输出 满足预定条件 (可以是计算模型输出与目标输出之间的损失值, 当损失值达到某个条件 时, 确认满足预定条件; 也可以是在迭代训练一定次数后, 确认满足预定条件) , 训练 结束。 此时生成的特征提取模型就作为训练好的特征提取模型, 并存储在特征提取单元 115中。
在根据本发明的一些实施例中, 在第一存储单元 113每次存入数据时, 特征提取单 元 115就同步地提取该数据的特征向量,并将其与目录地址关联存储至第二存储单元 117 中。 然而, 这种方式会增加每次存储数据的时间。 故在根据本发明的又一些实施例中, 采用异步的方式提取数据的特征向量, 即, 先将待存储的数据存储至第一存储单元 113 , 并获取对应的目录地址, 而后定时 (假设在每天的空闲时段, 如每天凌晨 1 :00-5 :00, 不 限于此) 对第一存储单元 113中新存入的数据进行特征提取, 生成各数据对应的特征向 量, 再将特征向量与目录地址关联存储到第二存储单元 117。
根据本发明的另一种实施方式, 在经判断单元 111判断后, 确认待存储的数据不属 于预定数据类型时, 第二存储单元 117直接存储该数据。 换句话说, 若待存储的数据是 结构化数据, 则直接将其存入第二存储单元 117中。
继续如图 2, 数据查询装置 120包括: 判断单元 121、 特征计算单元 123、 第一查询 单元 125和第二查询单元 127。
当用户输入查询信息来进行查询时, 判断单元 121判断该查询信息中是否包含预定 数据类型。 根据一种实施例, 查询信息中可以包含至少一个查询条件, 例如, 查询信息 是: 查询“与图像 A的相似度大于 0.8且关于图像的评价是 ‘裙子不错’ ”的图像, 贝 1J, 其中包含 2个查询条件, 分别是: 与图像 A的相似度大于 0.8、 关于图像的评价是 ‘裙 子不错’ , 同时还可以确认该查询信息中待查询的目标数据是图像, 属于预定数据类型。
根据本发明的实施方式, 若经判断单元 121判断后确认查询信息中不包含预定数据 类型, 则按照传统的数据查询方式从上述的第二存储单元 117中查询到满足查询条件的 目标数据; 若经判断单元 121判断后确认查询信息中包含预定数据类型, 则通过执行如 下过程来查询到满足查询条件的目标数据。
也就是说, 根据本发明的实施方式, 用户可以输入多个查询条件, 这些查询条件可 以是基于结构化数据的传统的查询,也可以是基于非结构化数据的查询,由判断单元 121 对各查询条件进行判断后确定采用何种方式进行数据查询。 例如, 用户可以在应用界面 上同时上传一张图像、 输入一段语音、 输入一段文字, 以期最终得到满足各查询条件的 目标数据。
特征计算单元 123基于查询信息, 生成至少一个待查询的特征向量。 根据本发明的 实施例, 可以采用两种方式来生成待查询的特征向量。 第一种方式, 与前文所述的数据 存储装置 110提取特征向量的方式相同, 响应于查询信息, 将查询信息中所包含的各非 结构化数据分别缓存, 得到对应的目录地址, 作为待查询的目录地址; 而后, 基于这些 待查询的目录地址, 分别生成各自的待查询的特征向量。 可选地, 将待查询的目录地址 输入特征提取模型, 输出其对应的待查询的特征向量。 以前文的查询信息的示例为例, 将图像 A和文字“裙子不错”分别进行缓存, 得到对应的待存储目录地址, 记作 URL1 和 URL2, 再将 URL1和 URL2分别输入到特征提取模型中, 得到各自对应的待查询的 特征向量。 第二种方式是, 直接将查询信息中包含的非结构化数据输入到特征提取模型 中, 输出对应的待查询的特征向量。 以前文的查询信息的示例为例, 将图像 A输入到特 征提取模型中, 输出其对应的待查询的特征向量; 将文字“裙子不错”输入特征提取模 型中, 输出其对应的待查询的特征向量。 当然, 如前文所述, 特征计算单元 123也可以 直接获取至少一个待查询的特征向量。例如, 查询信息中包含了待查询信息的特征向量。
应当指出, 特征提取模型可以是用户在输入查询信息时一并指定的, 也可以是在数 据查询装置 120中预先配置好的(例如, 对于图像类的数据, 采用 CNN模型; 对于文字 类的数据, 采用 ResNet模型, 等等) , 还可以采用同一个固定的特征提取模型来生成所 有待查询的特征向量。 此外, 特征计算单元 123可以调用特征提取单元 115中的相关特 征提取模型来执行提取特征向量的步骤, 本发明的实施例对此不作过多限制。 关于特征 提取模型的更多内容, 可参考前文相关描述。
特征计算单元 123进一步分别确定与待查询的特征向量相似的至少一个特征向量。 根据一种实施例, 针对每个待查询的特征向量, 特征计算单元 123根据指定的计算特征 相似度的度量方法, 从第二存储区域中分别确定出与该待查询的特征向量相似的至少一 个特征向量。 在本发明的实施例中, 第二存储区域即第二存储单元 117所对应的存储区 域, 其中关联存储了非结构化数据的特征向量及其目录地址。 如前文所述, 元数据存储 单元 119中关联存储了数据的目录地址和描述信息, 而描述信息中还指定了用于计算特 征相似度的度量方法。 因此, 特征计算单元 123可以依据第二存储区域中所存储的各数 据对应的计算特征相似度的度量方法, 来计算待查询的特征向量与该数据的特征向量之 间的相似度, 并确定出相似度满足查询条件的至少一个特征向量。
而后, 第一查询单元 125分别从第二存储区域中获取与所确定的至少一个特征向量 相关联的至少一个目录地址。 根据本发明的实施例, 第一查询单元 125与第二存储单元 117保持通信, 以从用于存储结构化数据的第二存储单元 117 中获取特征向量所关联的 目录地址。
接着, 第二查询单元 127从第一存储区域中确定出所获取的至少一个目录地址所指 向的至少一个数据, 作为目标数据。 根据本发明的实施例, 第二查询单元 127与第一存 储单元 113保持通信, 以根据目录地址从用于存储非结构化数据的第一存储单元 113中 获取对应的数据。
需要说明的是, 图 2仅是示例性的, 在实际应用中, 判断单元 111和判断单元 121 可以被设置成同一个单元,用来判断所接收到的信息中是否有属于预定数据类型的数据。 特征提取单元 115和特征计算单元 123可以被设置成同一个单元, 用来提取数据的特征 向量、 并计算特征向量之间的相似度。 第一查询单元 125也可以被实现为第二存储单元 117中的一个模块, 同样, 第二查询单元 127也可以被实现为第一存储单元 113中的一 个模块, 以分别从第二存储区域和第一存储区域中获取对应的数据。 同时, 在其它实施 例中, 在系统 100中可以存在更少、 附加或不同的组件。
根据本发明的数据管理系统 100, 在第一存储区域内存储非结构化数据, 在第二存 储区域内存储结构化数据,并通过内置的特征提取服务来生成非结构化数据的特征向量, 将其与非结构化数据的存储地址 (即目录地址) 关联存储至第二存储区域。 这样, 数据 管理系统 100可以直接支持各种非结构化数据的存储。 同时, 基于这种数据存储方式, 系统 100除了可以支持结构化数据的查询外, 还可以支持对各种非结构化数据基于语义 的查询。 此外, 用户不需要深入了解相关的深度学习算法和特征提取模型, 能够有效降 低用户的理解和使用成本。
根据本发明的实施方式, 数据管理系统 100可以通过如下所述的一个或多个计算设 备 300来实现。 在一些实施例中, 数据管理系统 100及其中各组成部分, 如数据存储装 置 110、 数据查询装置 120均可以通过如下所述的计算设备 300来实现。
图 3示出了根据本发明一个实施例的计算设备 300的示意图。
如图 3所示, 在基本的配置 302中, 计算设备 300典型地包括系统存储器 306和一 个或者多个处理器 304。 存储器总线 308可以用于在处理器 304和系统存储器 306之间 的通信。
取决于期望的配置, 处理器 304可以是任何类型的处理, 包括但不限于: 微处理器 (MP) 、 微控制器 (|aC) 、 数字信息处理器 (DSP) 或者它们的任何组合。 处理器 304 可以包括诸如一级高速缓存 310和二级高速缓存 312之类的一个或者多个级别的高速缓 存、处理器核心 314和寄存器 316。示例的处理器核心 314可以包括运算逻辑单元(ALU)、 浮点数单元 (FPU) 、 数字信号处理核心 (DSP 核心) 或者它们的任何组合。 示例的存 储器控制器 318可以与处理器 304—起使用, 或者在一些实现中, 存储器控制器 318可 以是处理器 304的一个内部部分。
取决于期望的配置, 系统存储器 306可以是任意类型的存储器, 包括但不限于: 易 失性存储器 (诸如 RAM) 、 非易失性存储器 (诸如 ROM、 闪存等) 或者它们的任何组 合。 系统存储器 306可以包括操作系统 320、 一个或者多个应用 322以及程序数据 324。 在一些实施方式中, 应用 322可以布置为在操作系统上由一个或多个处理器 304利用程 序数据 324执行指令。
计算设备 300还可以包括有助于从各种接口设备 (例如, 输出设备 342、 外设接口 344和通信设备 346) 到基本配置 302经由总线 /接口控制器 330的通信的接口总线 340。 示例的输出设备 342包括图形处理单元 348和音频处理单元 350。 它们可以被配置为有 助于经由一个或者多个 A/V端口 352与诸如显示器或者扬声器之类的各种外部设备进行 通信。 示例外设接口 344可以包括串行接口控制器 354和并行接口控制器 356, 它们可 以被配置为有助于经由一个或者多个 I/O端口 358和诸如输入设备 (例如, 键盘、 鼠标、 笔、 语音输入设备、 触摸输入设备) 或者其他外设 (例如打印机、 扫描仪等) 之类的外 部设备进行通信。 示例的通信设备 346可以包括网络控制器 360, 其可以被布置为便于 经由一个或者多个通信端口 364与一个或者多个其他计算设备 362通过网络通信链路的 通信。
计算设备 300还可以包括存储接口总线 334和存储设备 332。 所述存储设备 332可 以进一步包括可移除存储器 336和不可移除存储器 338。
网络通信链路可以是通信介质的一个示例。 通信介质通常可以体现为在诸如载波或 者其他传输机制之类的调制数据信号中的计算机可读指令、 数据结构、 程序模块, 并且 可以包括任何信息递送介质。 “调制数据信号”可以是这样的信号, 它的数据集中的一 个或者多个或者它的改变可以在信号中编码信息的方式进行。 作为非限制性的示例, 通 信介质可以包括诸如有线网络或者专线网络之类的有线介质,以及诸如声音、射频(RF)、 微波、 红外 (IR) 或者其它无线介质在内的各种无线介质。 这里使用的术语计算机可读 介质可以包括存储介质和通信介质二者。
计算设备 300可以实现为服务器, 例如文件服务器、 数据库服务器、 应用程序服务 器和 WEB服务器等, 也可以实现为包括桌面计算机和笔记本计算机配置的个人计算机。 当然, 计算设备 300也可以实现为小尺寸便携(或者移动) 电子设备的一部分。在根据 本发明的实施例中, 计算设备 300被配置为执行根据本发明的数据存储方法 400和数据 查询方法 500。 其中, 计算设备 300的应用 322中包含执行根据本发明的方法 400和方 法 500的多条程序指令。
在下文中将参考图 4和 5进一步详细描述通过数据管理系统 100管理数据存储和查 询的方法 400和 500。
图 4示出了根据本发明一个实施例的数据存储方法 400的流程图。 以下将结合图 2 及上文对数据存储装置 110的相关介绍, 详细介绍数据存储装置 110执行方法 400的过 程。
如图 4所示, 方法 400始于步骤 S410。 在步骤 S410中, 判断待存储的数据是否属 于预定数据类型。 如前文所述, 非结构化数据就是属于预定数据类型的数据, 预定数据 类型例如可以包括以下数据类型中的一种或多种: 文本、 图片、 XML、 HTML、 图像、 首频、 视频。
若经判断后确认该待存储的数据不属于预定数据类型,则确认该数据为结构化数据, 在随后的步骤 S420中, 将该数据存储至第二存储区域(即, 第二存储单元 117所对应的 存储区域) 。
若经判断后确认该待存储的数据属于预定数据类型, 则在随后的步骤 S430中, 将该 数据存储至第一存储区域 (即, 第一存储单元 113所对应的存储区域) , 并获取该数据 的存储位置作为该数据的目录地址。
随后在步骤 S440中, 提取对应数据的特征向量。
根据一种实施例, 将数据的目录地址输入特征提取模型, 输出的就是该数据的特征 向量。 根据又一种实施例, 也可以将数据本身输入到特征提取模型, 以输出该数据的特 征向量。 此外, 特征提取模型可以是系统固定的, 也可以是用户指定的, 本发明的实施 例对此不做过多限制。 一般地, 特征提取模型基于卷积神经网络, 如 CNN。
根据另一种实施例, 用户在输入待存储的数据时, 会一并定义该数据的元数据, 即 该数据的描述信息。 在根据本发明的实施例中, 描述信息包括: 用于提取特征向量的特 征提取模型。 数据存储装置 110可以通过下拉菜单等方式向用户展示预存的特征提取模 型, 以供用户选择其中的一个特征提取模型, 作为装置 110提取该数据的特征向量的模 型。 关于如何训练生成预存的特征提取模型的过程, 可参见前文对于装置 110的相关描 述, 此处不做赘述。
这样, 在步骤 S440中, 基于该数据的描述信息和目录地址, 提取出该数据对应的特 征向量。 进一步地, 先根据数据的描述信息, 获取该数据对应的用于提取特征向量的特 征提取模型; 再将该数据的目录地址输入该特征提取模型, 以输出该数据对应的特征向 量。
另外, 数据的描述信息除了特征提取模型外, 还可以包括: 用于计算特征相似度的 度量方法, 以便于在后续数据查询的过程中, 计算该数据的特征向量与要查询的数据的 特征向量的相似度。
随后在步骤 S450中, 将数据的特征向量与目录地址关联存储至第二存储区域 (即, 第二存储单元 117所对应的存储区域) 。
图 5示出了根据本发明一个实施例的数据查询方法 500的流程图。 以下将结合图 2 及上文对数据查询装置 120的相关介绍, 详细介绍数据查询装置 120执行方法 500的过 程。
如图 5所示, 方法 500始于步骤 S510。 在步骤 S510中, 响应于用户输入的查询信 息, 判断该查询信息中是否包含预定数据类型。 预定数据类型包含非结构化数据的数据 类型, 例如: 文本、 图片、 XML、 HTML、 图像、 音频、 视频。
如前文所述, 查询信息中包含了至少一个查询条件, 根据查询条件可以确定出要查 询的数据属于结构化数据还是非结构化数据, 即判断出查询信息中是否包含预定数据类 型。
若经判断后确认查询信息中包含了非预定数据类型, 则在随后的步骤 S520中, 按照 传统的结构化数据的查询方法从第二存储区域中获取目标数据。
若经判断后确认查询信息中包含了预定数据类型, 则在随后的步骤 S530中, 生成至 少一个待查询的特征向量。
如前文所述, 在根据本发明的实施方式中, 可以采用两种方式来生成待查询的特征 向量。 第一种方式, 与方法 400中所述的提取特征向量的方式相同, 响应于查询信息, 将查询信息中所包含的各个非结构化数据分别缓存,得到对应的目录地址(即存储地址), 作为待查询的目录地址; 而后, 基于这些待查询的目录地址, 分别生成各自的待查询的 特征向量。 可选地, 将待查询的目录地址输入特征提取模型, 输出其对应的待查询的特 征向量。 第二种方式是, 直接将查询信息中包含的非结构化数据 (如, 图像) 输入到特 征提取模型中, 输出对应的待查询的特征向量。 采用第一种方式能够最大限度地保证特 征向量的获取方式一致, 但是会增加缓存, 采用第二种方式能够节省缓存, 提高计算效 率。 在实际应用中, 本领域技术人员可结合实际场景选择合适的特征提取方式及特征提 取模型, 本发明的实施例对此不做限制。
需要说明的是, 特征提取模型可以是用户在输入查询信息时一并指定的, 也可以是 在数据查询装置 120中预先配置好的(例如, 对于图像类的数据, 采用 CNN模型; 对于 文字类的数据, 采用 ResNet模型, 不限于此) , 可以与执行方法 400时采用的特征提取 模型相一致, 还可以采用同一个固定的特征提取模型来生成所有待查询的特征向量。 关 于特征提取模型的更多内容, 可参考前文相关描述。
在又一些实施例中, 用户在输入查询信息时, 也可以一并输入待查询信息所对应的 特征向量, 或者, 调用外部的特征提取模型来生成查询信息对应的待查询的特征向量。 这样, 若经判断后确认查询信息中包含了预定数据类型, 则直接获取至少一个待查询的 特征向量。
随后在步骤 S540中, 确定与待查询的特征向量相似的至少一个特征向量。
具体地, 从第二存储区域 (即第二存储单元 117所对应的存储区域) 中确定与待查 询的特征向量相似的至少一个特征向量。
如前文所述, 元数据存储单元 119中关联存储了数据的目录地址和描述信息, 而描 述信息中还指定了用于计算特征相似度的度量方法。 因此, 在步骤 S540中, 可以依据第 二存储区域中所存储的各数据对应的计算特征相似度的度量方法, 来计算待查询的特征 向量与该数据的特征向量之间的相似度, 并确定出相似度满足查询条件的至少一个特征 向量。
随后在步骤 S550 中, 获取与所确定的至少一个特征向量相关联的至少一个目录地 址。
如前文所述, 第二存储区域中关联存储了非结构化数据的特征向量及其目录地址。 在经步骤 S540获取到特征向量后,进一步从第二存储区域中获取与该特征向量相关联的 目录地址。
随后在步骤 S560中, 确定所获取的至少一个目录地址所指向的至少一个数据,作为 目标数据。
如前文所述, 第一存储区域中关联存储了非结构化数据本身及其目录地址, 故根据 所获取的至少一个目录地址, 就可以从第一存储区域中确定出各目录地址所指向的各个 数据, 作为目标数据。
这里描述的各种技术可结合硬件或软件, 或者它们的组合一起实现。 从而, 本发明 的方法和设备, 或者本发明的方法和设备的某些方面或部分可采取嵌入有形媒介, 例如 可移动硬盘、 U盘、 软盘、 CD-ROM或者其它任意机器可读的存储介质中的程序代码(即 指令)的形式, 其中当程序被载入诸如计算机之类的机器, 并被所述机器执行时, 所述机 器变成实践本发明的设备。
在程序代码在可编程计算机上执行的情况下, 计算设备一般包括处理器、 处理器可 读的存储介质(包括易失性和非易失性存储器和 /或存储元件), 至少一个输入装置, 和至 少一个输出装置。 其中, 存储器被配置用于存储程序代码; 处理器被配置用于根据该存 储器中存储的所述程序代码中的指令, 执行本发明的数据存储方法和 /或数据查询方法。
以示例而非限制的方式, 可读介质包括可读存储介质和通信介质。 可读存储介质存 储诸如计算机可读指令、 数据结构、 程序模块或其它数据等信息。 通信介质一般以诸如 载波或其它传输机制等已调制数据信号来体现计算机可读指令、 数据结构、 程序模块或 其它数据, 并且包括任何信息传递介质。 以上的任一种的组合也包括在可读介质的范围 之内。
在此处所提供的说明书中, 算法和显示不与任何特定计算机、 虚拟系统或者其它设 备固有相关。 各种通用系统也可以与本发明的示例一起使用。 根据上面的描述, 构造这 类系统所要求的结构是显而易见的。 此外, 本发明也不针对任何特定编程语言。 应当明 白, 可以利用各种编程语言实现在此描述的本发明的内容, 并且上面对特定语言所做的 描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发明的实施 例可以在没有这些具体细节的情况下被实践。在一些实例中, 并未详细示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。
类似地, 应当理解, 为了精简本公开并帮助理解各个发明方面中的一个或多个, 在 上面对本发明的示例性实施例的描述中, 本发明的各个特征有时被一起分组到单个实施 例、 图、 或者对其的描述中。 然而, 并不应将该公开的方法解释成反映如下意图: 即所 要求保护的本发明要求比在每个权利要求中所明确记载的特征更多特征。 更确切地说, 如下面的权利要求书所反映的那样, 发明方面在于少于前面公开的单个实施例的所有特 征。 因此, 遵循具体实施方式的权利要求书由此明确地并入该具体实施方式, 其中每个 权利要求本身都作为本发明的单独实施例。
本领域那些技术人员应当理解在本文所公开的示例中的设备的模块或单元或组件可 以布置在如该实施例中所描述的设备中, 或者可替换地可以定位在与该示例中的设备不 同的一个或多个设备中。 前述示例中的模块可以组合为一个模块或者此外可以分成多个 子模块。
本领域那些技术人员可以理解, 可以对实施例中的设备中的模块进行自适应性地改 变并且把它们设置在与该实施例不同的一个或多个设备中。 可以把实施例中的模块或单 元或组件组合成一个模块或单元或组件, 以及此外可以把它们分成多个子模块或子单元 或子组件。 除了这样的特征和 /或过程或者单元中的至少一些是相互排斥之外, 可以采用 任何组合对本说明书 (包括伴随的权利要求、 摘要和附图) 中公开的所有特征以及如此 公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包 括伴随的权利要求、 摘要和附图) 中公开的每个特征可以由提供相同、 等同或相似目的 的替代特征来代替。 此外, 本领域的技术人员能够理解, 尽管在此所述的一些实施例包括其它实施例中 所包括的某些特征而不是其它特征, 但是不同实施例的特征的组合意味着处于本发明的 范围之内并且形成不同的实施例。 例如, 在下面的权利要求书中, 所要求保护的实施例 的任意之一都可以以任意的组合方式来使用。
此外, 所述实施例中的一些在此被描述成可以由计算机系统的处理器或者由执行所 述功能的其它装置实施的方法或方法元素的组合。 因此, 具有用于实施所述方法或方法 元素的必要指令的处理器形成用于实施该方法或方法元素的装置。 此外, 装置实施例的 在此所述的元素是如下装置的例子: 该装置用于实施由为了实施该发明的目的的元素所 执行的功能。
如在此所使用的那样, 除非另行规定, 使用序数词“第一”、 “第二”、 “第三”等等来 描述普通对象仅仅表示涉及类似对象的不同实例, 并且并不意图暗示这样被描述的对象 必须具有时间上、 空间上、 排序方面或者以任意其它方式的给定顺序。
尽管根据有限数量的实施例描述了本发明, 但是受益于上面的描述, 本技术领域内 的技术人员明白, 在由此描述的本发明的范围内, 可以设想其它实施例。 此外, 应当注 意, 本说明书中使用的语言主要是为了可读性和教导的目的而选择的, 而不是为了解释 或者限定本发明的主题而选择的。 因此, 在不偏离所附权利要求书的范围和精神的情况 下, 对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。 对于本发明 的范围, 对本发明所做的公开是说明性的而非限制性的, 本发明的范围由所附权利要求 书限定。

Claims

权 利 要 求 书
1. 一种数据存储方法, 包括步骤:
判断待存储的数据是否属于预定数据类型;
若所述数据属于预定数据类型, 则将所述数据存储至第一存储区域并获取所述数据 的目录地址;
提取所述数据的特征向量; 以及
将所述数据的特征向量与目录地址关联存储至第二存储区域。
2. 如权利要求 1所述的方法, 还包括步骤:
若经判断后确认所述待存储的数据不属于预定数据类型, 则将所述数据存储至第二 存储区域。
3. 如权利要求 1或 2所述的方法,其中,所述提取所述数据的特征向量的步骤包括: 将所述数据的目录地址输入特征提取模型, 以输出该数据的特征向量。
4. 如权利要求 1或 2所述的方法,其中,在所述提取所述数据的特征向量的步骤之 前, 还包括步骤:
获取所述数据的描述信息, 并与该数据的目录地址关联存储。
5. 如权利要求 4所述的方法, 其中, 所述描述信息至少包括: 用于提取特征向量的 特征提取模型和用于计算特征相似度的度量方法。
6. 如权利要求 5所述的方法, 其中, 所述提取所述数据的特征向量的步骤还包括: 基于所述数据的描述信息和目录地址, 提取出所述数据对应的特征向量。
7. 如权利要求 6所述的方法, 其中, 所述基于数据的描述信息和目录地址, 提取出 数据对应的特征向量的步骤还包括:
根据所述数据的描述信息, 获取该数据对应的用于提取特征向量的特征提取模型; 将所述目录地址输入所述特征提取模型, 以输出该数据对应的特征向量。
8. 如权利要求 1-7中任一项所述的方法, 其中, 所述预定数据类型包括以下数据类 型中的一种或多种: 文本、 图片、 XML、 HTML、 图像、 音频、 视频。
9. 一种数据存储装置, 包括:
判断单元, 适于判断待存储的数据是否属于预定数据类型;
第一存储单元, 适于在所述数据属于预定数据类型时, 存储所述数据并生成所述数 据的目录地址;
特征提取单元, 适于提取所述数据的特征向量; 以及 第二存储单元, 适于关联存储所述数据的特征向量与目录地址。
10. 如权利要求 9所述的装置, 其中, 所述第二存储单元还适于在所述待存储的数 据不属于预定数据类型时, 存储该数据。
11. 如权利要求 9或 10所述的装置, 还包括:
元数据存储单元, 适于在待存储数据属于预定数据类型时, 获取所述数据的描述信 息, 并与该数据的目录地址关联存储。
12. 一种数据查询方法, 包括步骤:
生成至少一个待查询的特征向量;
确定与待查询的特征向量相似的至少一个特征向量;
获取与所确定的至少一个特征向量相关联的至少一个目录地址; 以及
确定所获取的至少一个目录地址所指向的至少一个数据, 作为目标数据。
13. 如权利要求 12所述的方法,其中,所述生成至少一个待查询的特征向量的步骤 之前还包括:
响应于用户的查询信息, 判断所述查询信息中是否包含预定数据类型;
若包含预定数据类型, 则生成至少一个待查询的特征向量。
14. 如权利要求 13所述的方法,其中,所述预定数据类型包括以下数据类型中的一 种或多种: 文本、 图片、 XML、 HTML、 图像、 音频、 视频。
15. 如权利要求 12- 14中任一项所述的方法, 其中, 所述确定与待查询的特征向量 相似的至少一个特征向量的步骤包括:
根据指定的计算特征相似度的度量方法, 从第二存储区域中分别确定出与待查询的 特征向量相似的至少一个特征向量。
16. 如权利要求 12- 15 中任一项所述的方法, 其中, 所述生成至少一个待查询的特 征向量的步骤还包括:
响应于查询信息, 获取至少一个待查询的目录地址;
基于至少一个待查询的目录地址, 生成至少一个待查询的特征向量。
17. 如权利要求 12- 16中任一项所述的方法, 其中, 所述获取与所确定的至少一个 特征向量相关联的至少一个目录地址的步骤包括:
从第二存储区域中分别获取与所确定的至少一个特征向量相关联的至少一个目录 地址。
18. 如权利要求 12- 17 中任一项所述的方法, 其中, 所述确定所获取的至少一个目 录地址所指向的至少一个数据, 作为目标数据的步骤:
从第一存储区域中确定所获取的至少一个目录地址所指向的至少一个数据, 作为目 标数据。
19. 一种数据查询方法, 包括步骤:
获取至少一个待查询的特征向量;
确定与待查询的特征向量相似的至少一个特征向量;
获取与所确定的至少一个特征向量相关联的至少一个目录地址; 以及
确定所获取的至少一个目录地址所指向的至少一个数据, 作为目标数据。
20. 一种数据查询装置, 包括:
判断单元, 适于判断查询信息中是否包含预定数据类型;
特征计算单元, 适于基于所述查询信息, 生成至少一个待查询的特征向量, 还适于 确定与待查询的特征向量相似的至少一个特征向量;
第一查询单元, 适于从第二存储区域中获取与所确定的至少一个特征向量相关联的 至少一个目录地址;
第二查询单元, 适于从第一存储区域中确定所获取的至少一个目录地址所指向的至 少一个数据, 作为目标数据。
21. 如权利要求 20所述的装置,其中,所述数据包括以下数据类型中的一种或多种: 文本、 图片、 XML、 HTML、 图像、 音频、 视频。
22. 一种数据管理系统, 包括:
如权利要求 9- 11中任一项所述的数据存储装置; 和
如权利要求 20或 21所述的数据查询装置。
23. 一种计算设备, 包括:
至少一个处理器; 和
存储有程序指令的存储器, 其中, 所述程序指令被配置为适于由所述至少一个处理 器执行, 所述程序指令包括用于执行如权利要求 1-8中任一项所述方法的指令, 以及用 于执行如权利要求 12- 19中任一项所述方法的指令。
24. 一种存储有程序指令的可读存储介质, 当所述程序指令被计算设备读取并执行 时, 使得所述计算设备执行如权利要求 1-8 中任一项所述的方法以及如权利要求 12- 19 中任一项所述的方法。
PCT/CN2020/075690 2019-02-25 2020-02-18 数据存储方法及数据查询方法 WO2020173334A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20763507.9A EP3933615A4 (en) 2019-02-25 2020-02-18 DATA STORAGE PROCEDURES AND DATA REQUEST PROCEDURES
US17/410,899 US20210382902A1 (en) 2019-02-25 2021-08-24 Data storage method and data query method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910139006.XA CN111611418A (zh) 2019-02-25 2019-02-25 数据存储方法及数据查询方法
CN201910139006.X 2019-02-25

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/410,899 Continuation US20210382902A1 (en) 2019-02-25 2021-08-24 Data storage method and data query method

Publications (1)

Publication Number Publication Date
WO2020173334A1 true WO2020173334A1 (zh) 2020-09-03

Family

ID=72195801

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075690 WO2020173334A1 (zh) 2019-02-25 2020-02-18 数据存储方法及数据查询方法

Country Status (5)

Country Link
US (1) US20210382902A1 (zh)
EP (1) EP3933615A4 (zh)
CN (1) CN111611418A (zh)
TW (1) TW202032385A (zh)
WO (1) WO2020173334A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835908A (zh) * 2021-02-22 2021-05-25 广东数程科技有限公司 一种时序数据存储方法、系统、存储设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395292B (zh) * 2020-11-25 2024-03-29 电信科学技术第十研究所有限公司 一种数据特征提取、匹配方法及装置
TWI770732B (zh) * 2020-12-22 2022-07-11 威聯通科技股份有限公司 儲存管理系統及其搜尋排序方法
CN113836332A (zh) * 2021-09-08 2021-12-24 北京灵汐科技有限公司 存储设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407445A (zh) * 2016-09-29 2017-02-15 重庆邮电大学 一种基于url的非结构化数据资源标识和定位方法
CN107636639A (zh) * 2015-09-24 2018-01-26 谷歌有限责任公司 快速的正交投影
CN108268600A (zh) * 2017-12-20 2018-07-10 北京邮电大学 基于ai的非结构化数据管理方法及装置
CN109189842A (zh) * 2018-08-02 2019-01-11 莆田学院 大数据分析方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527436B2 (en) * 2010-08-30 2013-09-03 Stratify, Inc. Automated parsing of e-mail messages
CN102314480B (zh) * 2011-07-05 2013-04-10 万达信息股份有限公司 一种针对海量数据的分布式数据存储方法
US9646262B2 (en) * 2013-06-17 2017-05-09 Purepredictive, Inc. Data intelligence using machine learning
CN104169914A (zh) * 2013-12-11 2014-11-26 华为技术有限公司 数据存储方法、数据处理方法、装置及移动终端
CN109074363A (zh) * 2016-05-09 2018-12-21 华为技术有限公司 数据查询方法、数据查询系统确定方法和装置
CN106649890B (zh) * 2017-02-07 2020-07-14 税云网络科技服务有限公司 数据存储方法和装置
CN108304882B (zh) * 2018-02-07 2022-03-04 腾讯科技(深圳)有限公司 一种图像分类方法、装置及服务器、用户终端、存储介质
CN108846015A (zh) * 2018-05-04 2018-11-20 平安科技(深圳)有限公司 不动产信息查询方法、装置、计算机设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107636639A (zh) * 2015-09-24 2018-01-26 谷歌有限责任公司 快速的正交投影
CN106407445A (zh) * 2016-09-29 2017-02-15 重庆邮电大学 一种基于url的非结构化数据资源标识和定位方法
CN108268600A (zh) * 2017-12-20 2018-07-10 北京邮电大学 基于ai的非结构化数据管理方法及装置
CN109189842A (zh) * 2018-08-02 2019-01-11 莆田学院 大数据分析方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835908A (zh) * 2021-02-22 2021-05-25 广东数程科技有限公司 一种时序数据存储方法、系统、存储设备和存储介质
CN112835908B (zh) * 2021-02-22 2023-01-10 广东数程科技有限公司 一种时序数据存储方法、系统、存储设备和存储介质

Also Published As

Publication number Publication date
CN111611418A (zh) 2020-09-01
EP3933615A1 (en) 2022-01-05
TW202032385A (zh) 2020-09-01
US20210382902A1 (en) 2021-12-09
EP3933615A4 (en) 2022-12-14

Similar Documents

Publication Publication Date Title
WO2020173334A1 (zh) 数据存储方法及数据查询方法
US9894460B1 (en) Routing queries based on carrier phrase registration
TWI729472B (zh) 特徵詞的確定方法、裝置和伺服器
US20230409349A1 (en) Systems and methods for proactively providing recommendations to a user of a computing device
US8990182B2 (en) Methods and apparatus for searching the Internet
JP6321153B2 (ja) モバイルビデオ検索
JP2019212290A (ja) ビデオを処理する方法及び装置
KR101777392B1 (ko) 중앙 서버 및 이에 의한 사용자 음성 처리 방법
WO2019219083A1 (zh) 视频检索方法及视频检索映射关系生成方法、装置
WO2019149026A1 (zh) 应用页面的链接生成方法、装置、存储介质及电子设备
WO2017206661A1 (zh) 语音识别的方法及系统
WO2020119569A1 (zh) 一种语音交互方法、装置及系统
US11527235B2 (en) Text independent speaker recognition
TW202025138A (zh) 語音互動方法、裝置及系統
US20230268073A1 (en) Inquiry information processing method and apparatus, and medium
TW202022849A (zh) 語音資料的識別方法、裝置及系統
WO2019139782A1 (en) Adding descriptive metadata to application programming interfaces for consumption by an intelligent agent
WO2020052370A1 (zh) 自助服务的使用方法及装置和电子设备
JP2009539190A (ja) コンテンツ・アイテムをアノテーションするための装置及び方法
WO2015128707A1 (en) Method and system for searching images
US11468058B1 (en) Schema aggregating and querying system
CN112242140A (zh) 智能设备控制方法、装置、电子设备及存储介质
CN114756901B (zh) 操作性风险监控方法及装置
WO2014000285A1 (zh) 一种应用搜索方法以及设备
CN111209506B (zh) 一种数据分析系统和方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20763507

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020763507

Country of ref document: EP

Effective date: 20210927