Anonymous query method, device, equipment and medium for enterprise information
Through the hash processing and public key encryption and decryption mechanism between the enterprise information query end and the platform, the problems of low computing and network efficiency in anonymous query are solved, and efficient enterprise information query is achieved.
Patent Information
- Application Number
- CN202310854365.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-07-12
AI Technical Summary
The computational efficiency and network transmission efficiency of existing anonymous query technologies are low, resulting in excessive consumption of computing resources and bandwidth.
By generating the hash processing result of enterprise query information, encrypting the enterprise random index information with the public key, and combining it with the private key decryption of the enterprise information query platform, anonymous query of enterprise information can be achieved.
The computing efficiency and network transmission efficiency in the anonymous query process are improved, and invalid encryption and decryption calculations and network transmission are reduced.
Smart Images

Figure CN116881516B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information query technology, and in particular to a method, device, electronic device and computer-readable medium for anonymous query of enterprise information. Background Art
[0002] In enterprise information query scenarios, the querying party may need to obtain the query information while not wanting the queried party to know the content of their query. Therefore, the query content of the querying party needs to be protected. Private Information Retrieval (PIR) is a privacy protection technology applied in this scenario. It can protect the query information of the querying party from being known by the queried party, thereby ensuring the privacy and security of the querying party's data.
[0003] During a stealth query, the client uses encrypted keywords to query the server's database and obtain the query results. The client decrypts the query results to obtain the plaintext results, completing the query. However, this query process suffers from excessive computing power and bandwidth consumption, resulting in low computing efficiency and low network transmission efficiency.
[0004] It can be seen that how to effectively improve the computing efficiency and network transmission efficiency in the anonymous query process has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The purpose of this application is to propose a method, device, electronic device and computer-readable medium for anonymous query of enterprise information, which are used to solve the technical problem existing in the prior art of how to effectively improve the computing efficiency and network transmission efficiency during the anonymous query process.
[0006] According to the first aspect of the embodiment of the present application, a method for anonymous query of enterprise information is provided, the method comprising: generating a hash processing result of the input enterprise query information, and sending an enterprise information query request carrying the hash processing result to an enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; generating enterprise random index information according to the enterprise information index, and encrypting the generated key using the public key to obtain the encryption result of the key; sending the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; using the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0007] According to the second aspect of the embodiment of the present application, a method for anonymous query of enterprise information is provided, the method comprising: receiving an enterprise information query request carrying a hash processing result of the enterprise query information sent by an enterprise information query end, and returning the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index to the enterprise information query end, so that the enterprise information query end generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain the encryption result of the key; receiving the enterprise random index information and the encryption result sent by the enterprise information query end, and using the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and then using the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information; returning the ciphertext information of the enterprise information indicated by the enterprise random index information to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0008] According to the third aspect of the embodiment of the present application, a device for anonymous query of enterprise information is provided, the device comprising: a first sending module, for generating a hash processing result of the input enterprise query information, and sending an enterprise information query request carrying the hash processing result to an enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; an encryption module, for generating enterprise random index information according to the enterprise information index, and using the public key to encrypt the generated key to obtain the encryption result of the key; a second sending module, for sending the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; a decryption module, for using the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0009] According to a fourth aspect of an embodiment of the present application, a device for anonymous query of enterprise information is provided, the device comprising: a first processing module for receiving an enterprise information query request carrying a hash processing result of the enterprise query information sent by an enterprise information query terminal, and returning to the enterprise information query terminal the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index, so that the enterprise information query terminal generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain an encryption result of the key; a second processing module for receiving the enterprise random index information and the encryption result sent by the enterprise information query terminal, and using the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and then using the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information; a third processing module for returning ciphertext information of the enterprise information indicated by the enterprise random index information to the enterprise information query terminal, so that the enterprise information query terminal uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0010] According to the fifth aspect of the embodiments of the present application, an electronic device is provided, comprising: one or more processors; a computer-readable medium configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the anonymous query method for enterprise information as described in the first aspect or the second aspect of the embodiments of the present application.
[0011] According to the sixth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the anonymous query method for enterprise information as described in the first aspect or the second aspect of the embodiments of the present application is implemented.
[0012] In the anonymous query method for enterprise information provided in this embodiment, an enterprise information query terminal generates a hash result of the input enterprise query information and sends an enterprise information query request carrying the hash result to an enterprise information query platform. The enterprise information query platform returns the enterprise information index matched by the hash result and the public key of the enterprise information indicated by the enterprise information index. The enterprise information query terminal generates enterprise random index information based on the enterprise information index and encrypts the generated key using the public key to obtain an encrypted result of the key. The enterprise information query terminal sends the enterprise random index information and the encrypted result to the enterprise information query platform. The enterprise information query platform parses the encrypted result using the private key of the enterprise information indicated by the enterprise random index information and decrypts the enterprise information indicated by the enterprise random index information using the decrypted result of the parsed key. The platform then returns ciphertext information of the enterprise information indicated by the enterprise random index information. The enterprise information query terminal uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information requested by the enterprise query. Compared with other existing methods, incorporating the generated enterprise random index information effectively improves not only the computational efficiency of the anonymous query process but also the network transmission efficiency during the anonymous query process. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Hereinafter, some specific embodiments of the present application will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the drawings:
[0014] Figure 1 This is a flowchart of the steps of the anonymous query method for enterprise information provided in the first embodiment;
[0015] Figure 2 This is a flowchart of the steps of the anonymous query method for enterprise information provided in the second embodiment;
[0016] Figure 3 This is a schematic diagram of the structure of the anonymous query device for enterprise information provided in the third embodiment;
[0017] Figure 4 A schematic diagram of the structure of the anonymous query device for enterprise information provided in the fourth embodiment;
[0018] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the fifth embodiment;
[0019] Figure 6 This is the hardware structure of the electronic device provided in this sixth embodiment. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0021] Reference Figure 1 , shows a flowchart of the steps of the anonymous query method for enterprise information provided in the first embodiment of the present invention.
[0022] This embodiment describes the anonymous query method for enterprise information provided by the present invention from the perspective of the enterprise information query terminal. Specifically, the anonymous query method for enterprise information provided by this embodiment includes the following steps:
[0023] In step S101, a hash processing result of the input enterprise query information is generated, and an enterprise information query request carrying the hash processing result is sent to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index.
[0024] In this embodiment, the enterprise query information may be an enterprise credit code. The enterprise information index may be understood as information for indicating enterprise information. It is understood that the above description is merely exemplary and this embodiment does not impose any limitation thereto.
[0025] In a specific example, when generating a hash result for input enterprise query information, the MD5 message digest algorithm is used to hash the enterprise query information to obtain a hash result for the enterprise query information. The principle of the MD5 algorithm can be briefly described as follows: the MD5 code processes the input information in 512-bit groups, and each group is further divided into 16 32-bit subgroups. After a series of processing, the algorithm output consists of four 32-bit groups. These four 32-bit groups are concatenated to generate a 128-bit hash value. It should be understood that the above description is merely exemplary and is not intended to be limiting in this embodiment.
[0026] In step S102, enterprise random index information is generated according to the enterprise information index, and the generated key is encrypted using the public key to obtain an encryption result of the key.
[0027] In this embodiment, the enterprise random index information may be a random list of enterprise indexes. When generating the enterprise random index information based on the enterprise information index, the enterprise random index list is generated based on the enterprise information index and a preset maximum enterprise information index. The preset maximum enterprise information index may be set by those skilled in the art based on actual needs and is not limited in this embodiment.
[0028] In step S103, the enterprise random index information and the encryption result are sent to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information.
[0029] In this embodiment, the private key is paired with the public key, so the encryption result can be parsed using the private key. When the decryption result of the parsed key is used to encrypt the enterprise information indicated by the enterprise random index information, the decryption result of the parsed key is used to symmetrically encrypt the enterprise information indicated by the enterprise random index information, and then the ciphertext information of the enterprise information indicated by the enterprise random index information is returned. It should be understood that the above description is merely exemplary and is not limited in this embodiment.
[0030] In step S104, the key is used to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0031] In this embodiment, when using the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information, the key is used to symmetrically decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information requested by the enterprise query information. It should be understood that the above description is merely exemplary and is not intended to limit this embodiment in any way.
[0032] In a specific example, suppose there are 10,000 pieces of enterprise information, with fields including data identifier, enterprise credit code, enterprise address, and legal representative. Company B wants to query the information for the enterprise with enterprise credit code abc. The specific anonymous query process is as follows: The enterprise information holder enters the database link, table header, and meaning into the enterprise information query platform, and specifies the data identifier column and alignment column. Assume the alignment column is the enterprise credit code. The enterprise information query platform generates a correspondence between the data identifier and index, generates a corresponding public-private key pair for these 10,000 pieces of data, and hashes the enterprise credit code column to prevent information leakage. Company B searches for the information (abc) on the enterprise information query platform. The platform hashes the hash to obtain hash1, which matches the index k corresponding to this hash. In other words, Company B wants to query the kth piece of enterprise information. The enterprise information query platform generates a random index vector containing k, vector = [k1, ....k, .....kn]. Company B randomly generates a symmetric encryption key key, encrypts this key using the public key p corresponding to the k-th piece of enterprise information, obtains R, and sends the encrypted result R and the random vector vector to the enterprise information query platform. The enterprise information query platform uses the private keys of the n enterprise information corresponding to the random index vector vector to try to parse R in turn, obtaining n decryption results, namely key1, key2...keyn. The enterprise information query platform obtains the n enterprise information through the random index vector vector, and uses (key1, key2...keyn) for symmetric encryption (such as the AES algorithm) in turn to generate a ciphertext message (m1, m2...mn). The enterprise information query end uses the key in step 5 to symmetric decrypt the k-th ciphertext mk in the message (m1, m2,..., mk,..., mn), and obtains the k-th original plaintext message mk to be retrieved. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.
[0033] In summary, the industry's current problem of poor support for batch queries can be effectively addressed. The system only needs to record the indexes of the data that the user is interested in. Secondly, by controlling the size of the random vector (vector), scalable control of the anonymity exposure rate can be achieved. That is, the vector only contains the indexes that need to be queried, and the maximum exposure rate is 1. When the size is consistent with the amount of data, the exposure rate is 0. Thirdly, by controlling the size of the random vector (vector), the system's redundant consumption can be controlled. When the vector size is equal to half of the dataset, 50% of ineffective encryption and decryption calculations and network transmissions will be reduced. It will be understood that the above description is merely exemplary and this embodiment does not impose any limitations on this.
[0034] In the anonymous enterprise information query method provided in this embodiment, the enterprise information query terminal generates a hash result of the input enterprise query information and sends an enterprise information query request carrying the hash result to the enterprise information query platform. The enterprise information query platform returns the enterprise information index matched by the hash result and the public key of the enterprise information indicated by the enterprise information index. The enterprise information query terminal generates enterprise random index information based on the enterprise information index and encrypts the generated key using the public key to obtain the key encryption result. The enterprise information query terminal sends the enterprise random index information and the encryption result to the enterprise information query platform. The enterprise information query platform parses the encryption result using the private key of the enterprise information indicated by the enterprise random index information and uses the decryption result of the parsed key to encrypt the enterprise information indicated by the enterprise random index information. The platform then returns the ciphertext information of the enterprise information indicated by the enterprise random index information. The enterprise information query terminal uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query. Compared with other existing methods, the inclusion of the generated enterprise random index information can effectively improve not only the computational efficiency of the anonymous query process but also the network transmission efficiency during the anonymous query process.
[0035] The anonymous query method for enterprise information provided in this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted devices, entertainment devices, advertising devices, personal digital assistants (PDAs), tablet computers, laptop computers, handheld game consoles, smart glasses, smart watches, wearable devices, virtual display devices or display enhancement devices, etc.
[0036] Reference Figure 2 , shows a flowchart of the steps of the anonymous query method for enterprise information provided in the second embodiment.
[0037] This embodiment describes the anonymous query method for enterprise information provided by the present invention from the perspective of an enterprise information query platform. Specifically, the anonymous query method for enterprise information provided by this embodiment includes the following steps:
[0038] In step S201, an enterprise information query request carrying a hash processing result of the enterprise query information is received from the enterprise information query end, and the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index are returned to the enterprise information query end, so that the enterprise information query end generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain the encryption result of the key.
[0039] In this embodiment, the enterprise information query terminal can be understood as a client for querying enterprise information. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.
[0040] In some optional embodiments, before receiving the enterprise information query request sent by the enterprise information query end and carrying the hash processing result of the enterprise query information, the method further includes: receiving the enterprise information table and the field columns in the enterprise information table published by the enterprise information holding end; generating a new enterprise information table with a hash search column, an index column, a data identification column, and a public and private key column based on the enterprise information table and the field columns in the enterprise information table. In this way, a database for enterprise information query can be generated based on the generated new enterprise information table. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.
[0041] In step S202, the enterprise random index information and the encryption result sent by the enterprise information query terminal are received, and the encryption result is parsed using the private key of the enterprise information indicated by the enterprise random index information, and then the decryption result of the key obtained by parsing is used to encrypt the enterprise information indicated by the enterprise random index information.
[0042] In some optional embodiments, when the private key of the enterprise information indicated by the enterprise random index information is used to parse the encryption result, and then the decryption result of the key obtained by parsing is used to encrypt the enterprise information indicated by the enterprise random index information, the relevant enterprise information is obtained according to the index in the enterprise random index list, and the private key of the obtained relevant enterprise information is used to parse the encryption result in sequence to obtain a mapping dictionary between the index in the enterprise random index list and the decryption result of the key obtained by parsing; the field column in the enterprise random index list is queried, and the mapping dictionary is used to symmetrically encrypt the enterprise information indicated by the enterprise random index information in sequence to obtain the ciphertext information of the enterprise information indicated by the enterprise random index list. In this way, the efficiency of symmetrical encryption of the enterprise information indicated by the enterprise random index information can be effectively improved by mapping the index in the enterprise random index list and the decryption result of the key obtained by parsing. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.
[0043] In step S203, the encrypted information of the enterprise information indicated by the enterprise random index information is returned to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the encrypted information indicated by the enterprise information index in the encrypted information to obtain the enterprise information queried by the enterprise query information.
[0044] In a specific example, suppose there are 10,000 pieces of enterprise information, with fields including data identifier, enterprise credit code, enterprise address, and legal representative. Company B wants to query the information for the enterprise with enterprise credit code abc. The specific anonymous query process is as follows: The enterprise information holder enters the database link, table header, and meaning into the enterprise information query platform, and specifies the data identifier column and alignment column. Assume the alignment column is the enterprise credit code. The enterprise information query platform generates a mapping between the data identifier and index, generates a one-to-one public-private key pair for each of the 10,000 pieces of data, and hashes the enterprise credit code column to prevent information leakage. Company B searches for the information (abc) on the enterprise information query platform. The platform hashes the hash to obtain hash1, which matches the index k corresponding to this hash. In other words, Company B wants to query the kth piece of enterprise information. The enterprise information query platform generates a random index vector containing k, vector = [k1, ....k, .....kn]. Company B randomly generates a symmetric encryption key key, encrypts this key using the public key p corresponding to the k-th piece of enterprise information, obtains R, and sends the encrypted result R and the random vector vector to the enterprise information query platform. The enterprise information query platform uses the private keys of the n enterprise information corresponding to the random index vector vector to try to parse R in turn, obtaining n decryption results, namely key1, key2...keyn. The enterprise information query platform obtains the n enterprise information through the random index vector vector, and uses (key1, key2...keyn) for symmetric encryption (such as the AES algorithm) in turn to generate a ciphertext message (m1, m2...mn). The enterprise information query end uses the key in step 5 to symmetric decrypt the k-th ciphertext mk in the message (m1, m2,..., mk,..., mn), and obtains the k-th original plaintext message mk to be retrieved. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.
[0045] In summary, the industry's current problem of poor support for batch queries can be effectively addressed. The system only needs to record the indexes of the data that the user is interested in. Secondly, by controlling the size of the random vector (vector), scalable control of the anonymity exposure rate can be achieved. That is, the vector only contains the indexes that need to be queried, and the maximum exposure rate is 1. When the size is consistent with the amount of data, the exposure rate is 0. Thirdly, by controlling the size of the random vector (vector), the system's redundant consumption can be controlled. When the vector size is equal to half of the dataset, 50% of ineffective encryption and decryption calculations and network transmissions will be reduced. It will be understood that the above description is merely exemplary and this embodiment does not impose any limitations on this.
[0046] In the anonymous enterprise information query method provided in this embodiment, the enterprise information query terminal generates a hash result of the input enterprise query information and sends an enterprise information query request carrying the hash result to the enterprise information query platform. The enterprise information query platform returns the enterprise information index matched by the hash result and the public key of the enterprise information indicated by the enterprise information index. The enterprise information query terminal generates enterprise random index information based on the enterprise information index and encrypts the generated key using the public key to obtain the key encryption result. The enterprise information query terminal sends the enterprise random index information and the encryption result to the enterprise information query platform. The enterprise information query platform parses the encryption result using the private key of the enterprise information indicated by the enterprise random index information and uses the decryption result of the parsed key to encrypt the enterprise information indicated by the enterprise random index information. The platform then returns the ciphertext information of the enterprise information indicated by the enterprise random index information. The enterprise information query terminal uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query. Compared with other existing methods, the inclusion of the generated enterprise random index information can effectively improve not only the computational efficiency of the anonymous query process but also the network transmission efficiency during the anonymous query process.
[0047] The anonymous query method for enterprise information provided in this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted devices, entertainment devices, advertising devices, personal digital assistants (PDAs), tablet computers, laptop computers, handheld game consoles, smart glasses, smart watches, wearable devices, virtual display devices or display enhancement devices, etc.
[0048] Reference Figure 3 , which shows a schematic diagram of the structure of the anonymous query device for enterprise information provided in the third embodiment.
[0049] The anonymous query device for enterprise information provided in this embodiment includes: a first sending module 301, which is used to generate a hash processing result of the input enterprise query information, and send an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; an encryption module 302, which is used to generate enterprise random index information based on the enterprise information index, and use the public key to encrypt the generated key to obtain an encryption result of the key; a second sending module 303, which is used to send the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; a decryption module 304, which is used to use the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0050] Optionally, the first sending module 301 is specifically configured to: use an MD5 information digest algorithm to perform hash processing on the enterprise query information to obtain a hash processing result of the enterprise query information.
[0051] Optionally, the encryption module 302 is specifically configured to generate an enterprise random index list according to the enterprise information index and a preset maximum enterprise information index.
[0052] The anonymous query device for enterprise information provided in this embodiment is used to implement the corresponding anonymous query methods for enterprise information in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0053] Reference Figure 4 , which shows a schematic diagram of the structure of the anonymous query device for enterprise information provided in the fourth embodiment.
[0054] The anonymous query device for enterprise information provided in this embodiment includes: a first processing module 401, configured to receive an enterprise information query request sent by an enterprise information query terminal and carrying a hash processing result of the enterprise query information, and return to the enterprise information query terminal the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index, so that the enterprise information query terminal generates enterprise random index information based on the enterprise information index and encrypts the generated key using the public key to obtain an encryption result of the key; a second processing module 402, configured to receive the enterprise random index information and the encryption result sent by the enterprise information query terminal, parse the encryption result using the private key of the enterprise information indicated by the enterprise random index information, and then encrypt the enterprise information indicated by the enterprise random index information using the decryption result of the key obtained by parsing; and a third processing module 403, configured to return ciphertext information of the enterprise information indicated by the enterprise random index information to the enterprise information query terminal, so that the enterprise information query terminal uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0055] Optionally, before the first processing module 401, the device also includes: a receiving module for receiving the enterprise information table published by the enterprise information holding end and the field columns in the enterprise information table; a generating module for generating a new enterprise information table with a hash search column, an index column, a data identification column and a public and private key column based on the enterprise information table and the field columns in the enterprise information table.
[0056] Optionally, the second processing module 402 is specifically used to: obtain relevant enterprise information according to the index in the enterprise random index list, and use the private key of the obtained relevant enterprise information to parse the encryption results in sequence to obtain a mapping dictionary of the index in the enterprise random index list and the decryption result of the key obtained by parsing; query the field column in the enterprise random index list, and use the mapping dictionary to symmetrically encrypt the enterprise information indicated by the enterprise random index information in sequence to obtain the ciphertext information of the enterprise information indicated by the enterprise random index list.
[0057] The anonymous query device for enterprise information provided in this embodiment is used to implement the corresponding anonymous query methods for enterprise information in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0058] Figure 5 This is a schematic diagram of the structure of an electronic device in the fifth embodiment; the electronic device may include:
[0059] One or more processors 501;
[0060] The computer readable medium 502 may be configured to store one or more programs,
[0061] When the one or more programs are executed by the one or more processors, the one or more processors implement the anonymous query method for enterprise information as described in the above-mentioned embodiment 1 or embodiment 2.
[0062] Figure 6 The hardware structure of the electronic device in the sixth embodiment is shown in FIG. Figure 6 As shown, the hardware structure of the electronic device may include: a processor 601, a communication interface 602, a computer-readable medium 603 and a communication bus 604;
[0063] The processor 601, the communication interface 602, and the computer-readable medium 603 communicate with each other via a communication bus 604;
[0064] Optionally, the communication interface 602 may be an interface of a communication module, such as an interface of a GSM module;
[0065] Among them, the processor 601 can be specifically configured to: generate a hash processing result of the input enterprise query information, and send an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; generate enterprise random index information according to the enterprise information index, and use the public key to encrypt the generated key to obtain the encryption result of the key; send the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and use the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then return the ciphertext information of the enterprise information indicated by the enterprise random index information; use the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0066] In which, the processor 601 can also be configured to: receive an enterprise information query request sent by the enterprise information query end and carrying the hash processing result of the enterprise query information, and return the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index to the enterprise information query end, so that the enterprise information query end generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain the encryption result of the key; receive the enterprise random index information and the encryption result sent by the enterprise information query end, and use the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and then use the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information; return the ciphertext information of the enterprise information indicated by the enterprise random index information to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0067] The processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor.
[0068] The computer-readable medium 603 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0069] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium can be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, 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 medium, a magnetic storage medium, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program configured for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0070] Computer program code configured to perform the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0071] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions configured to implement the specified logical functions. There are specific sequential relationships in the above-mentioned specific embodiments, but these sequential relationships are only exemplary. When implementing the specific embodiments, these steps may be fewer, more, or the execution order may be adjusted. That is, in some alternative implementations, the functions marked in the boxes may also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0072] The modules involved in the embodiments of the present application may be implemented in software or in hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor comprising a first sending module, an encryption module, a second sending module, and a decryption module. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the first sending module may also be described as a module that "generates a hash processing result of the input enterprise query information, and sends an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index."
[0073] As another aspect, the present application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the anonymous query method for enterprise information as described in the above-mentioned embodiment 1 or embodiment 2.
[0074] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the device, the device: generates a hash processing result of the input enterprise query information, and sends an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain the encryption result of the key; sends the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0075] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the device, the device: receives an enterprise information query request sent by the enterprise information query end and carries the hash processing result of the enterprise query information, and returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index to the enterprise information query end, so that the enterprise information query end generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated key to obtain the encryption result of the key; receives the enterprise random index information and the encryption result sent by the enterprise information query end, and uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and then uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information; returns the ciphertext information of the enterprise information indicated by the enterprise random index information to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
[0076] The terms "first," "second," "the first," or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these terms do not limit the corresponding components. The above terms are configured solely for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, even though both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.
[0077] When one element (for example, a first element) is referred to as being “(operably or communicably) coupled” or “(operably or communicably) coupled to” or “connected to” another element (for example, a second element), it should be understood that the one element is directly connected to the other element or that the one element is indirectly connected to the other element via yet another element (for example, a third element). Conversely, it should be understood that when an element (for example, a first element) is referred to as being “directly connected” or “directly coupled” to another element (the second element), there is no element (for example, a third element) interposed therebetween.
[0078] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for anonymous query of enterprise information, characterized in that: The method comprises: Generate a hash processing result of the input enterprise query information, and send an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; Generating enterprise random index information according to the enterprise information index, and encrypting the generated key using the public key to obtain an encryption result of the key; Sending the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; The key is used to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
2. The anonymous query method for enterprise information according to claim 1, characterized in that: The generating of the hash processing result of the input enterprise query information includes: The enterprise query information is hashed using the MD5 information digest algorithm to obtain a hash result of the enterprise query information.
3. The anonymous query method for enterprise information according to claim 1, characterized in that: Generating enterprise random index information according to the enterprise information index includes: Generate an enterprise random index list according to the enterprise information index and the preset enterprise information maximum index.
4. A method for anonymous query of enterprise information, characterized in that: The method comprises: Receiving an enterprise information query request sent by an enterprise information query terminal and carrying a hash processing result of enterprise query information, and returning to the enterprise information query terminal an enterprise information index matched by the hash processing result and a public key of the enterprise information indicated by the enterprise information index, so that the enterprise information query terminal generates enterprise random index information according to the enterprise information index, and uses the public key to encrypt the generated secret key to obtain an encryption result of the secret key; Receiving the enterprise random index information and the encryption result sent by the enterprise information query terminal, parsing the encryption result using the private key of the enterprise information indicated by the enterprise random index information, and then using the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information; The ciphertext information of the enterprise information indicated by the enterprise random index information is returned to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
5. The anonymous query method for enterprise information according to claim 4, characterized in that: Before receiving the enterprise information query request sent by the enterprise information query terminal and carrying the hash processing result of the enterprise query information, the method further includes: Receiving the enterprise information table and the field columns in the enterprise information table published by the enterprise information holder; A new enterprise information table having a hash search column, an index column, a data identification column, and public and private key columns is generated according to the enterprise information table and the field columns in the enterprise information table.
6. The anonymous query method for enterprise information according to claim 4, characterized in that: The step of parsing the encryption result using the private key of the enterprise information indicated by the enterprise random index information, and then using the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information includes: Obtain relevant enterprise information according to the index in the enterprise random index list, and use the private key of the obtained relevant enterprise information to parse the encryption results in sequence to obtain a mapping dictionary between the index in the enterprise random index list and the decryption result of the key obtained by parsing; The field columns in the enterprise random index list are queried, and the enterprise information indicated by the enterprise random index information is symmetrically encrypted in sequence using the mapping dictionary to obtain the ciphertext information of the enterprise information indicated by the enterprise random index list.
7. An anonymous query device for enterprise information, characterized in that: The device comprises: A first sending module is configured to generate a hash processing result of the input enterprise query information, and send an enterprise information query request carrying the hash processing result to the enterprise information query platform, so that the enterprise information query platform returns the enterprise information index matched by the hash processing result and the public key of the enterprise information indicated by the enterprise information index; An encryption module, configured to generate enterprise random index information according to the enterprise information index, and encrypt the generated key using the public key to obtain an encryption result of the key; A second sending module is configured to send the enterprise random index information and the encryption result to the enterprise information query platform, so that the enterprise information query platform uses the private key of the enterprise information indicated by the enterprise random index information to parse the encryption result, and uses the decryption result of the key obtained by parsing to encrypt the enterprise information indicated by the enterprise random index information, and then returns the ciphertext information of the enterprise information indicated by the enterprise random index information; The decryption module is used to use the key to decrypt the ciphertext information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
8. An anonymous query device for enterprise information, characterized in that: The device comprises: A first processing module is configured to receive an enterprise information query request sent by an enterprise information query terminal and carrying a hash processing result of enterprise query information, and return to the enterprise information query terminal an enterprise information index matched by the hash processing result and a public key of the enterprise information indicated by the enterprise information index, so that the enterprise information query terminal generates enterprise random index information according to the enterprise information index, and encrypts the generated secret key using the public key to obtain an encryption result of the secret key; a second processing module, configured to receive the enterprise random index information and the encryption result sent by the enterprise information query terminal, parse the encryption result using the private key of the enterprise information indicated by the enterprise random index information, and then encrypt the enterprise information indicated by the enterprise random index information using the decryption result of the key obtained by parsing; The third processing module is used to return the encrypted information of the enterprise information indicated by the enterprise random index information to the enterprise information query end, so that the enterprise information query end uses the key to decrypt the encrypted information indicated by the enterprise information index in the ciphertext information to obtain the enterprise information queried by the enterprise query information.
9. An electronic device, characterized in that: The device comprises: one or more processors; A computer readable medium configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the anonymous query method for enterprise information as described in any one of claims 1 to 6.
10. A computer-readable medium, characterized in that A computer program is stored thereon, which, when executed by a processor, implements the anonymous query method for enterprise information as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Hidden trace query method based on casual transmission protocol
CN113190584A
Method and apparatus for communication efficient private information retrieval and oblivious transfer
US20090190752A1