Data retrieval method and device, electronic equipment, storage medium and product

By storing business data in a vector database and determining on-chain attribute information, it solves the problems of blockchain query complexity and data tampering, ensuring the authenticity and security of the data.

CN118760713APending Publication Date: 2024-10-11CHINA POST INFORMATION TECH (BEIJING CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410897275.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

When querying data on the blockchain, complex query capabilities are poor, and the business data obtained from the database may be tampered with, making it impossible to determine its authenticity.

Method used

By storing business data in the vector database, and when receiving a data retrieval request, the attribute information on the chain is determined, and the stored business data is sent to the business end to verify the correctness of the data.

Benefits of technology

Ensure that the business end can obtain the real business data corresponding to the data retrieval request, and use the high security on the blockchain to verify the authenticity of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760713A_ABST
    Figure CN118760713A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data retrieval method and device, electronic equipment, a storage medium and a product. The method comprises the following steps: on the basis of a received data retrieval request sent by a service end, querying stored service data which is stored in a vector database and corresponds to the data retrieval request; determining on-chain attribute information of on-chain business data corresponding to the data retrieval request; and sending the on-chain attribute information and the stored service data to a service end, so as to determine on-chain service data corresponding to the on-chain attribute information when a data inspection request corresponding to the on-chain attribute information sent by the service end is received, and feed back the on-chain service data to the service end. According to the technical scheme, it can be ensured that the service end can obtain the real service data corresponding to the data retrieval request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a data retrieval method, device, electronic device, storage medium and product. Background Art

[0002] Blockchain is a distributed storage system with a chain storage structure. When querying data on the blockchain, the complex query capability is poor.

[0003] In the prior art, it is usually necessary to store business data in a database outside the blockchain, and the business end queries the business data by accessing the database. However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: when obtaining business data from the database, the queried business data may be tampered with, resulting in the business end being unable to determine the authenticity of the obtained business data. Summary of the invention

[0004] The embodiments of the present invention provide a data retrieval method, device, electronic device, storage medium and product to achieve the purpose of ensuring that a business end can obtain authentic business data corresponding to a data retrieval request.

[0005] According to one aspect of the present invention, there is provided a data retrieval method, comprising:

[0006] Based on the received data retrieval request sent by the business terminal, query the stored business data corresponding to the data retrieval request stored in the vector database;

[0007] Determine on-chain attribute information of on-chain business data corresponding to the data retrieval request;

[0008] The on-chain attribute information and the deposited business data are sent to the business end, so that when a data verification request corresponding to the on-chain attribute information sent by the business end is received, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end.

[0009] According to another aspect of the present invention, there is provided a data retrieval device, the device comprising:

[0010] A request receiving module, configured to query the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request received from the business terminal;

[0011] An information determination module, used to determine the on-chain attribute information of the on-chain business data corresponding to the data retrieval request;

[0012] A data sending module is used to send the on-chain attribute information and the deposited business data to the business end, so as to determine the on-chain business data corresponding to the on-chain attribute information when receiving a data verification request corresponding to the on-chain attribute information sent by the business end, and feed back the on-chain business data to the business end.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data retrieval method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data retrieval method described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the data retrieval method according to any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention queries the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request received from the business end; determines the on-chain attribute information of the on-chain business data corresponding to the data retrieval request; since both the stored business data and the on-chain attribute information correspond to the data retrieval request, the stored business data corresponds to the on-chain attribute information, and the on-chain attribute information and the stored business data are sent to the business end, so that when a data verification request corresponding to the on-chain attribute information is received from the business end, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end. The technical solution of this embodiment sends the stored business data and the on-chain attribute information that have a corresponding relationship to the business end, so that the business end generates a data verification request based on the on-chain attribute information to verify the correctness of the stored business data, and sends the on-chain business data corresponding to the on-chain attribute information to the business end. Since the business data on the blockchain is highly secure, it is ensured that the business end can obtain the real business data corresponding to the data retrieval request.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a data retrieval method provided according to an embodiment of the present invention;

[0023] Figure 2 is a flow chart of another data retrieval method provided according to an embodiment of the present invention;

[0024] Figure 3 is a structural schematic diagram of a data retrieval device provided according to an embodiment of the present invention;

[0025] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the data retrieval method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0029] Figure 1 This is a flow chart of a data retrieval method provided according to an embodiment of the present invention. This embodiment is applicable to the case of retrieving business data, and the method can be executed by a data retrieval device, which can be implemented in the form of hardware and / or software.

[0030] like Figure 1 As shown, the method of this embodiment may specifically include:

[0031] S110 . Based on the received data retrieval request sent by the service end, query the stored service data corresponding to the data retrieval request stored in the vector database.

[0032] The stored business data is the business data corresponding to the data retrieval request stored in the vector database. For example, when the data retrieval request is "request to query the business data corresponding to the transaction with the transaction number 1234", all the data with the transaction number 1234 stored in the vector database is the stored business data.

[0033] In this embodiment, the data retrieval request includes characteristic information of the business data requested for query, and a characteristic vector corresponding to the business data requested for query can be generated based on the data retrieval request. Data matching is performed in a vector database based on the characteristic vector, and data matching the characteristic vector is stored as business data.

[0034] S120. Determine the on-chain attribute information of the on-chain business data corresponding to the data retrieval request.

[0035] Among them, the on-chain business data is the business data corresponding to the data retrieval request stored on the blockchain, and the on-chain attribute information is used to reflect the target storage information of the on-chain business data, wherein the target storage information may be the target block information of the target block storing the on-chain business data and the target transaction number.

[0036] In a specific implementation, when storing business data on the blockchain, the corresponding relationship between the description information and storage information of each business data stored on the blockchain can be recorded. When determining the on-chain attribute information, the target storage information corresponding to the on-chain business data requested by the data retrieval request can be used as the on-chain attribute information. Among them, the storage information can be the block information of the write block of the stored business data and the transaction number; the description information can be the identifier corresponding to the business data and the transaction type, etc.

[0037] S130, sending the on-chain attribute information and the stored business data to the business end, so that when receiving a data verification request corresponding to the on-chain attribute information sent by the business end, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end.

[0038] The data verification request is used to obtain the on-chain business data stored on the blockchain, so as to verify the obtained stored business data through the on-chain business data. The data retrieval method provided in this embodiment can be applied to a data retrieval system.

[0039] In a specific implementation, after receiving the on-chain attribute information and stored business data, if the business end needs to verify the authenticity of the stored business data, it can generate a data verification request based on the on-chain attribute information and send the data verification request to the data retrieval system provided in this embodiment.

[0040] It should be noted that through smart contract technology, artificial intelligence contracts are defined in the blockchain to perform functions such as block height calculation, providing transaction details and viewing block content. Each function corresponds to a uniform resource locator, a calling interface and a return format parameter to facilitate interaction with the data retrieval system through a hypertext transfer protocol (HTTP) request.

[0041] Exemplarily, when the data retrieval system needs to query the block height of a certain block, the calculation method of the block height can be obtained from the vector database or artificial intelligence contract. The data retrieval system constructs a block height determination request based on the calculation method, and obtains the block height information of the block to be queried from the blockchain through the uniform resource locator corresponding to the block height calculation function.

[0042] In a specific implementation, after receiving a data verification request, the on-chain attribute information of the on-chain business data to be verified in the data verification request can be obtained, and the business data corresponding to the on-chain attribute information is determined from the business data stored in the blockchain as the on-chain business data, and the on-chain business data is sent to the business end.

[0043] In this embodiment, the on-chain business data corresponding to the on-chain attribute information is determined, including: based on the data verification request, determining the call request parameters corresponding to the on-chain business data; constructing an on-chain data acquisition request based on the call request parameters, and sending the on-chain data acquisition request to the blockchain node, and receiving the on-chain business data corresponding to the on-chain data acquisition request fed back by the blockchain node.

[0044] Specifically, based on the data verification request, it can be determined that the block content viewing function needs to be called, and the pre-set parameters corresponding to the block content viewing function can be used as the call request parameters. Among them, the call request parameters include the uniform resource locator of the on-chain business data, the call interface, and the return format parameters.

[0045] In order to correctly and effectively obtain the business data stored on the blockchain, when obtaining the on-chain business data, an on-chain data acquisition request can be constructed based on the call request parameters. The on-chain data acquisition request can reflect the characteristic information of the business data requested. By sending the on-chain data acquisition request to the blockchain node, the blockchain node can parse the on-chain data acquisition request, obtain the on-chain business data corresponding to the on-chain data acquisition request, and feed back the on-chain business data to the data retrieval system. The data retrieval system receives the on-chain business data fed back by the blockchain node and feeds back the on-chain business data to the business end.

[0046] In this embodiment, by calling the request parameters, a chain data acquisition request that meets the interaction format requirements is generated, so that the chain business data can be effectively and accurately acquired.

[0047] The technical solution of the embodiment of the present invention queries the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request received from the business end; determines the on-chain attribute information of the on-chain business data corresponding to the data retrieval request; since both the stored business data and the on-chain attribute information correspond to the data retrieval request, the stored business data corresponds to the on-chain attribute information, and the on-chain attribute information and the stored business data are sent to the business end, so that when a data verification request corresponding to the on-chain attribute information is received from the business end, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end. The technical solution of this embodiment sends the stored business data and the on-chain attribute information that have a corresponding relationship to the business end, so that the business end generates a data verification request based on the on-chain attribute information to verify the correctness of the stored business data, and sends the on-chain business data corresponding to the on-chain attribute information to the business end. Since the business data on the blockchain is highly secure, it is ensured that the business end can obtain the real business data corresponding to the data retrieval request.

[0048] Figure 2It is a flowchart of another data retrieval method provided according to an embodiment of the present invention. In this embodiment, the on-chain attribute information includes the target block information of the target block for storing on-chain business data on the blockchain; on the basis of the above embodiment, this embodiment also includes: before querying the stored business data corresponding to the data retrieval request stored in the vector database, the received business data to be written is written to the blockchain; in the case where the business data to be written is data to be parsed, the business data to be written is written to the vector database, and the correspondence between the description information of the business data to be written and the block information of the write block is recorded; the on-chain attribute information of the on-chain business data corresponding to the data retrieval request is determined, including: based on the data retrieval request, determining the target description information of the on-chain business data; based on the correspondence, determining the block information corresponding to the target description information as the target block information. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Such as Figure 2 As shown, the method includes:

[0049] S210. Write the received business data to be written into the blockchain; if the business data to be written is data to be parsed, write the business data to be written into the vector database, and record the correspondence between the description information of the business data to be written and the block information of the written block.

[0050] In a specific implementation, the business data generated by the business end can be uploaded to the blockchain. Specifically, the business data to be written sent by the business end can be received, and the received data to be written can be written to the blockchain.

[0051] In order to facilitate subsequent data retrieval queries, the business data to be written whose query probability meets the probability threshold requirement can be used as the data to be parsed that needs to be parsed, and the data to be parsed can be written into the vector database for storage. It should be noted that the business end can determine whether the query probability of the business data to be written meets the probability threshold requirement. If it does, the business data to be written is marked as data to be parsed. If not, the business data to be written is marked as non-data to be parsed. The marking method can be to set a parsing flag for the business data to be written, and mark whether the business data to be written is data to be parsed by the characters on the parsing flag.

[0052] In this embodiment, the character corresponding to the parsing flag in the business data to be written can be identified to determine whether the business data to be written is data to be parsed. If the business data to be written is data to be parsed, the data retrieval system stores the business data to be written into the vector database and records the corresponding relationship between the description information of the business data to be written and the block information of the write block. The description information may also include index information of the business data to be written in the vector database.

[0053] In this embodiment, after the received business data to be written is written into the blockchain, it also includes: based on the smart contract technology, the characters of the parsing flag of the business data to be written are identified, and when the characters of the parsing flag are preset characters, the business data to be written is determined as the data to be parsed.

[0054] In a specific implementation, the parsing flag of the business data to be written can be identified based on the smart contract technology. Exemplarily, the character corresponding to the parsing flag includes a preset character, which is used to reflect that the business data to be written needs to be parsed and stored in the vector database; for example, the preset character can be "true".

[0055] When determining whether the business data to be written is data to be parsed, the character corresponding to the parsing flag can be obtained, and it can be determined whether the character is a preset character. If so, the business data to be written is determined to be data to be parsed. If not, the business data to be written can be determined as non-data to be parsed. Exemplarily, when it is determined that the character of the parsing flag is "false" and the preset character is "true", indicating that the two are inconsistent, the business data to be written can be determined as non-parsed data.

[0056] This embodiment can quickly and accurately determine whether the business data to be written is the data to be parsed by determining whether the character corresponding to the parsing flag is consistent with the preset character.

[0057] Optionally, writing the business data to be written into the vector database includes: identifying characters of the compactness flag of the business data to be written based on smart contract technology, and determining a writing method of the business data to be written based on a first recognition result; and writing the business data to be written into the vector database according to the writing method.

[0058] In a specific implementation, a compactness flag is set for the business data to be written, and the character corresponding to the compactness flag is used to describe the writing method of the business data to be written when it is written into the vector database. Among them, the writing method includes split writing and complete writing. Specifically, the characters corresponding to the compactness flag can be identified by smart contract technology to obtain a first recognition result. If the first recognition result indicates that the character corresponding to the compactness flag is a preset split character, the writing method can be determined as a split writing method, and the business data to be written is written into the vector database after data splitting. If the first recognition result indicates that the character corresponding to the compactness flag is a preset complete character, the writing method can be determined as a complete writing method, and the business data to be written can be written as a whole into the vector database.

[0059] Exemplarily, the split character may be "low", which is used to indicate that the closeness between the business data to be written is low and can be split and written; the complete character may be "high", which is used to indicate that the closeness between the business data to be written is high, and the original meaning of the business data to be written will be lost after splitting, and it needs to be written in full. For example, the content corresponding to the business data to be written is "The colors of cats are black and white, and the breeds of cats are folded ears and big orange". The first half of this sentence describes the color of the cat, and the second half describes the breed of the cat. The two are unrelated, so the character corresponding to the closeness flag of the business data to be written can be pre-set to "low".

[0060] This embodiment determines the writing mode of the service data to be written by the character of the compactness flag, thereby improving the flexibility of the writing process of the service data to be written.

[0061] In this embodiment, the business data to be written is written into the vector database, including: based on the smart contract technology, the characters of the encryption flag of the business data to be written are identified, and based on the second identification result, whether the business data to be written is encrypted data; when the business data to be written is encrypted data, the secret key of the business data to be written is determined; based on the secret key, the business data to be written is decrypted, and the decrypted data obtained after decryption is written into the vector database.

[0062] It should be noted that in order to improve the security of business data, the business data to be written is usually encrypted. In order to facilitate subsequent query operations on the business data, the business data to be written can be decrypted when writing it to the vector database.

[0063] Specifically, characters can be set in advance for the encryption flag of the business data to be written. Exemplarily, if the business data to be written is encrypted data, the character corresponding to the encryption flag can be set to "1"; if the business data to be written is non-encrypted data, the character corresponding to the encryption flag can be set to "0". When writing the business data to be written into the vector database, the characters of the encryption flag of the business data to be written can be identified by smart contract technology to obtain a second identification result. If the second identification result is that the character of the encryption flag is "1", it means that the business data to be written is encrypted data, and the secret key of the business data to be written can be obtained from the blockchain. After decrypting the business data to be written based on the secret key, the decrypted data is written into the vector database. If the second identification result is that the character of the encryption flag is "0", it means that the business data to be written is non-encrypted data, and the business data to be written can be directly written into the vector database.

[0064] In this embodiment, the characters corresponding to the encryption flag are used to determine whether the business data to be written is encrypted data, so that the encrypted data is decrypted and then written into the vector database, so as to provide effective business data during subsequent data retrieval and facilitate viewing by the business end.

[0065] Furthermore, in order to facilitate the supervision of business data in the vector database by the regulatory side, a regulatory flag is set in advance for the business data to be written. According to the character corresponding to the regulatory flag, it is determined whether the business data to be written is business data that needs to be supervised. This facilitates the regulatory side to determine the business data to be supervised that needs to be supervised in the vector database, and compare the business data to be supervised with the relevant business data stored on the blockchain to determine the authenticity of the business data to be supervised.

[0066] Specifically, when the regulatory side supervises the business data to be regulated stored in the vector database, the secret key and certificate for parsing the business data stored in the blockchain are determined through a pre-set permission management contract. Based on the obtained secret key and certificate, the block data stored in the blockchain and the block header information, transaction list, log and other information corresponding to the block data are obtained. By comparing the business data to be regulated with the corresponding block data, it is determined that there is missing business data to be repaired in the business data to be regulated or inconsistent with the block data, and the business data to be repaired is repaired, and the repaired business data to be repaired is stored in the vector database to replace the business data to be regulated corresponding to the business data to be repaired, thereby ensuring the consistency between the business data stored in the vector database and the business data on the blockchain, and ensuring the integrity of the business data in the vector database.

[0067] S220. Based on the received data retrieval request sent by the business terminal, query the stored business data corresponding to the data retrieval request stored in the vector database.

[0068] S230. Based on the data retrieval request, determine the target description information of the on-chain business data; based on the corresponding relationship, determine the block information corresponding to the target description information as the target block information.

[0069] Among them, the target description information can be the identifier corresponding to the on-chain business data, the transaction type, and the index information stored in the vector database.

[0070] In a specific implementation, block information corresponding to the target description information may be determined as the target block information based on the correspondence between the description information of the business data to be written recorded in the vector database and the block information of the write block.

[0071] S240, sending the target block information and the stored business data to the business end, so that when receiving a data verification request corresponding to the target block information sent by the business end, the on-chain business data corresponding to the target block information is determined, and the on-chain business data is fed back to the business end.

[0072] In this embodiment, when performing a system data query on the blockchain, since the target description information obtained is structured information, it is not intuitive for users without a technical background and they cannot accurately understand the target description information.

[0073] In order to improve the query convenience, a more intuitive and easy-to-use query interface can be provided by combining retrieval augmented generation (RAG) and natural language generation (NLP) technology. Exemplarily, the question input by the user can be obtained through the business end, and the stored business data matching the question can be determined through the vector database, and the target description information can be determined. For example, the target description information includes target block information, transaction hash value and chain time. The target description information is polished through the RAG model to obtain the answer corresponding to the target description information, and the answer is sent to the business end, so that the user can understand the target description information intuitively and clearly, so as to obtain the on-chain business data based on the target description information.

[0074] The entire process of this embodiment supports NLP natural language interaction, which greatly reduces the technical threshold for users to interact with blockchain data, allowing non-professional users to easily query and manage data. At the same time, it automatically parses the target description information and sends a data acquisition request on the chain, which improves the efficiency of data acquisition, reduces user waiting time, and avoids data acquisition errors caused by manual input.

[0075] Figure 3 1 is a schematic diagram of the structure of a data retrieval device provided according to an embodiment of the present invention, and the device is used to execute the data retrieval method provided by any of the above embodiments. The device and the data retrieval method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the data retrieval device can refer to the embodiment of the above data retrieval method. Figure 3 As shown, the device comprises:

[0076] The request receiving module 10 is used to query the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request sent by the received business terminal;

[0077] An information determination module 11 is used to determine the on-chain attribute information of the on-chain business data corresponding to the data retrieval request;

[0078] The data sending module 12 is used to send the on-chain attribute information and the stored business data to the business end, so as to determine the on-chain business data corresponding to the on-chain attribute information when receiving the data verification request corresponding to the on-chain attribute information sent by the business end, and feed back the on-chain business data to the business end.

[0079] Based on any optional technical solution in the embodiments of the present invention, optionally, the on-chain attribute information includes target block information of a target block for storing on-chain business data on the blockchain; the device further includes:

[0080] A data writing module, used for writing the received business data to be written into the blockchain before storing the business data corresponding to the data retrieval request stored in the query vector database;

[0081] A corresponding relationship recording module, used for writing the business data to be written into the vector database when the business data to be written is the data to be parsed, and recording the corresponding relationship between the description information of the business data to be written and the block information of the written block;

[0082] The information determination module 11 includes:

[0083] A first information determination unit, configured to determine target description information of on-chain business data based on a data retrieval request;

[0084] The second information determining unit is used to determine, based on the corresponding relationship, the block information corresponding to the target description information as the target block information.

[0085] Based on any optional technical solution in the embodiments of the present invention, optionally, the following further includes:

[0086] The module for determining data to be parsed is used to identify the characters of the parsing flag of the business data to be written based on the smart contract technology after writing the received business data to be written into the blockchain. When the characters of the parsing flag are preset characters, the business data to be written is determined as the data to be parsed.

[0087] Based on any optional technical solution in the embodiments of the present invention, optionally, the corresponding relationship recording module includes:

[0088] A writing mode determining unit, used to identify the characters of the compactness flag of the business data to be written based on the smart contract technology, and determine the writing mode of the business data to be written based on the first recognition result;

[0089] The data writing unit is used to write the business data to be written into the vector database according to the writing mode; wherein the writing mode includes split writing and complete writing.

[0090] Based on any optional technical solution in the embodiments of the present invention, optionally, the corresponding relationship recording module includes:

[0091] A character recognition unit, used to recognize characters of an encryption flag of the business data to be written based on the smart contract technology, and determine whether the business data to be written is encrypted data based on a second recognition result;

[0092] A key determination unit, used to determine the key of the business data to be written when the business data to be written is encrypted data;

[0093] The decryption unit is used to decrypt the business data to be written based on the secret key, and write the decrypted data obtained after decryption into the vector database.

[0094] Based on any optional technical solution in the embodiment of the present invention, optionally, the data sending module 12 includes:

[0095] A call request parameter determination unit, used to determine the call request parameters corresponding to the on-chain business data based on the data verification request; wherein the call request parameters include the uniform resource locator of the on-chain business data, the call interface, and the return format parameter;

[0096] The request sending unit is used to construct an on-chain data acquisition request based on the call request parameters, and send the on-chain data acquisition request to the blockchain node, and receive the on-chain business data corresponding to the on-chain data acquisition request fed back by the blockchain node.

[0097] The technical solution of the embodiment of the present invention queries the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request received from the business end; determines the on-chain attribute information of the on-chain business data corresponding to the data retrieval request; since both the stored business data and the on-chain attribute information correspond to the data retrieval request, the stored business data corresponds to the on-chain attribute information, and the on-chain attribute information and the stored business data are sent to the business end, so that when a data verification request corresponding to the on-chain attribute information is received from the business end, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end. The technical solution of this embodiment sends the stored business data and the on-chain attribute information that have a corresponding relationship to the business end, so that the business end generates a data verification request based on the on-chain attribute information to verify the correctness of the stored business data, and sends the on-chain business data corresponding to the on-chain attribute information to the business end. Since the business data on the blockchain is highly secure, it is ensured that the business end can obtain the real business data corresponding to the data retrieval request.

[0098] It is worth noting that in the embodiment of the above-mentioned data retrieval device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0099] Figure 4 Schematic diagram of the structure of an electronic device that implements the data retrieval method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0100] like Figure 4 As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.

[0101] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 performs the various methods and processes described above, such as a data retrieval method.

[0103] In some embodiments, the data retrieval method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the data retrieval method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to perform the data retrieval method in any other appropriate manner (e.g., by means of firmware).

[0104] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0106] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0107] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0108] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0109] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0110] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements the data retrieval method provided in any embodiment of the present application.

[0111] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data retrieval method, characterized in that: include: Based on the received data retrieval request sent by the business terminal, query the stored business data corresponding to the data retrieval request stored in the vector database; Determine on-chain attribute information of on-chain business data corresponding to the data retrieval request; The on-chain attribute information and the deposited business data are sent to the business end, so that when a data verification request corresponding to the on-chain attribute information sent by the business end is received, the on-chain business data corresponding to the on-chain attribute information is determined, and the on-chain business data is fed back to the business end.

2. The method according to claim 1, characterized in that The on-chain attribute information includes target block information of a target block on the blockchain for storing the on-chain business data; Before storing the service data corresponding to the data retrieval request in the query vector database, the method further includes: Write the received business data to be written into the blockchain; In the case where the business data to be written is data to be parsed, writing the business data to be written into the vector database, and recording the corresponding relationship between the description information of the business data to be written and the block information of the write block; The determining of on-chain attribute information of the on-chain business data corresponding to the data retrieval request includes: Determine target description information of the on-chain business data based on the data retrieval request; Based on the corresponding relationship, block information corresponding to the target description information is determined as the target block information.

3. The method according to claim 2, characterized in that After writing the received business data to be written into the blockchain, the method further includes: Based on the smart contract technology, the characters of the parsing flag of the business data to be written are identified. When the characters of the parsing flag are preset characters, the business data to be written is determined as the data to be parsed.

4. The method according to claim 2, characterized in that: The step of writing the to-be-written business data into the vector database includes: Recognize the characters of the compactness flag of the business data to be written based on the smart contract technology, and determine the writing method of the business data to be written based on the first recognition result; The business data to be written is written into the vector database according to the writing method; wherein the writing method includes split writing and complete writing.

5. The method according to claim 2, characterized in that: The step of writing the to-be-written business data into the vector database includes: Recognize the characters of the encryption flag of the business data to be written based on the smart contract technology, and determine whether the business data to be written is encrypted data based on the second recognition result; In a case where the business data to be written is the encrypted data, determining a secret key for the business data to be written; The business data to be written is decrypted based on the secret key, and the decrypted data obtained after decryption is written into the vector database.

6. The method according to claim 1, characterized in that The determining of the on-chain business data corresponding to the on-chain attribute information includes: Based on the data verification request, determining the call request parameters corresponding to the on-chain business data; wherein the call request parameters include the uniform resource locator, the call interface and the return format parameters of the on-chain business data; An on-chain data acquisition request is constructed based on the call request parameters, and the on-chain data acquisition request is sent to the blockchain node, and the on-chain business data corresponding to the on-chain data acquisition request fed back by the blockchain node is received.

7. A data retrieval device, characterized in that: include: A request receiving module, configured to query the stored business data corresponding to the data retrieval request stored in the vector database based on the data retrieval request received from the business terminal; An information determination module, used to determine the on-chain attribute information of the on-chain business data corresponding to the data retrieval request; A data sending module is used to send the on-chain attribute information and the deposited business data to the business end, so as to determine the on-chain business data corresponding to the on-chain attribute information when receiving a data verification request corresponding to the on-chain attribute information sent by the business end, and feed back the on-chain business data to the business end.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the data retrieval method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data retrieval method according to any one of claims 1 to 6 when executed.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data retrieval method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A block chain inquiry method and a device

    CN109213797A

  • Museum business data storage and query method and system based on blockchain

    CN113392144A

  • Method and device for maintaining block chain data, electronic equipment and storage medium

    CN115129785A

  • Block chain data storage query method based on improved cuckoo filter

    CN116737787A

  • Trusted manufacturing multi-mode block data conversion and uplink method

    CN117556472A