Data service authorization method and system based on hidden query and medium

Through obscure query technology and database proxy intercept query statements, the key pair is generated and encrypted, solving the problem of intellectual property leakage in traditional data service authentication methods, realizing the right verification and intellectual property protection of data services.

CN118981780APending Publication Date: 2024-11-19SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411008498.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

Traditional data service authentication methods are prone to leaking the algorithmic ideas of developers' programs, resulting in the loss of intellectual property rights and the plagiarism and forgery of programs.

Method used

Using the data service authorization method based on hidden queries, through database proxy technology and privacy computing technology, query statements are intercepted and parsed, key pairs are generated, and encrypted hidden queries are carried out to ensure that the data service provider cannot know the specific content of the query statement. Return the result based on the permission information.

Benefits of technology

On the premise of not leaking the developer's program algorithm, the right to effectively verify the data service, protects the developer's intellectual property rights, and ensures that data security is not leaked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981780A_ABST
    Figure CN118981780A_ABST
Patent Text Reader

Abstract

The invention relates to the field of information security, in particular to a data service authorization method and system based on hidden query and a medium. A trusted third-party database agent intercepts a developer query statement and authenticates the database query statement proposed by a developer with a data service provider by using a hidden query method; and finally, judging whether to return data or not according to an authentication result. According to the method, a hidden query technology is used when the database query statement is authenticated, so that authority verification can be performed on the used data on the premise of not leaking key contents of a developer program algorithm, and intellectual property of a developer is protected while data potentials are fully mined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security, and in particular to a data service authorization method, system and medium based on hidden query. Background Art

[0002] As a strategic and basic resource today, data is not only an important part of society, enterprises, and individuals, but also an important driving force for technological innovation, demand mining, and efficiency improvement in the digital economy. At present, there is a huge amount of data in the market, and most of the data holders are government agencies, Internet companies, or data information collection companies. Data holders have a large amount of data, but are limited by their own development capabilities or business scope, which leads to the inability to fully realize the potential of the data. At present, there are a large number of independent developers or startups who have unique ideas or businesses, but do not have enough data support, so data services came into being. As a data service provider, data holders provide data to the outside world for compensation, and developers empower their programs or services by purchasing data services. In this way, the potential of data is fully tapped, making the data market further prosperous, thereby promoting the development of the data economy.

[0003] Hidden query, also known as privacy information retrieval, is a solution for secure data circulation, in which the querying party can hide the keywords or customer ID information of the queried object, and the data service provider cannot know which specific query object it corresponds to when providing matching query results. This technology is based on cryptographic principles such as asymmetric encryption and inadvertent transmission, ensuring that data does not leave the house and can be calculated, thereby eliminating the possibility of data caching, data leakage, and data trafficking. The hidden query protocol greatly improves the security of the query by adding a random key to the plaintext hash, ensuring that only matching query results are obtained without leaving any query traces.

[0004] At present, the traditional data service authentication method is that the developer sends the query statement that needs to be authenticated to the unified authentication interface or platform of the data service provider, and the data service provider parses and extracts the query statement and authenticates the database table and field information involved one by one. However, this method is easy to leak the algorithm ideas of the program developed by the developer to the data service provider, resulting in the loss of intellectual property rights of the program developer and the plagiarism and forgery of the program or algorithm. In this case, how to design a two-way confidential data service authentication method so that the rights of the data service involved in the program can be verified without leaking the developer's program algorithm has become an urgent problem to be solved. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a data service authorization method, system and medium based on hidden query, which combines database proxy technology and privacy computing technology, utilizes the advantage that hidden query is unknown to both parties, and effectively solves the problem of algorithm intellectual property leakage caused by the need to send query statements to data providers for authentication.

[0006] In order to solve the technical problem, the technical solution adopted by the present invention is: 1. A data service authorization method based on hidden query, comprising the following steps:

[0007] S01) The data service provider stores the data in a trusted third-party database and publishes the data directory to the public; S02) The developer applies for the required database table and pays, and the data service provider records the authorization information;

[0008] S03), the developer program starts running, and queries the required data through query statements;

[0009] S04), the database proxy intercepts the query statement, and parses and extracts the query statement to obtain the queried table name and field name;

[0010] S05), the database agent generates a key pair and sends the public key to the data service provider;

[0011] S06), the database agent encrypts the authority query information;

[0012] S107), a hidden query process is performed between the database agent and the data service provider;

[0013] S108), the data service provider sends the ciphertext of the query result to the database agent, and the database agent decrypts the result;

[0014] S109), the database agent determines whether the query statement is authorized according to the authority information query result, and if it is authorized, it proceeds to step S110), if it is not authorized, it proceeds to step S111);

[0015] S110), the database agent sends the query statement to the database server for query and returns the result, and then goes to step S112);

[0016] S111), the database agent returns an unauthorized error result to the developer, and goes to step S112);

[0017] S112), end the query.

[0018] Furthermore, the hidden query process is implemented using homomorphic encryption.

[0019] Furthermore, the authorization information includes developer information, database table information, and field information.

[0020] Furthermore, the query statement is a database query statement that complies with the SQL protocol.

[0021] Furthermore, the database proxy is provided by a trusted third party.

[0022] Furthermore, a trusted third-party database is provided for multi-party trust prevention.

[0023] The present invention also discloses a data service authorization system based on hidden query, comprising:

[0024] Data service providers are institutions or organizations that own data and provide data services;

[0025] Developers, who are data users, use the data services provided by data image providers to develop programs or algorithms; trusted third parties, who are provided by multi-trust organizations, are used to provide database proxies that perform hidden queries on query statements, and the trusted third parties provide trusted third-party databases to store data provided by data service providers;

[0026] When authorizing data services, the data service provider stores the data in a trusted third-party database and publishes the data directory to the outside world. The developer then applies for the required database table and pays. The data service provider records the authorization information. The developer's program starts running and queries the data required by the algorithm through query statements. The database proxy then intercepts the query statements and parses and extracts them to obtain the queried table name and field name. The database proxy generates a key pair and sends the public key to the data service provider, while encrypting the permission query information. A hidden query process is performed between the database proxy and the data service provider. The data service provider sends the query result ciphertext to the database proxy, which decrypts the result. Finally, the query statement is determined to be authorized based on the permission information query result. If authorized, it is sent to the database server for query and the result is returned. If not, an unauthorized error result is directly returned.

[0027] Furthermore, Mysql is used as a trusted third-party database server.

[0028] Furthermore, Mysql-Proxy is used as a database proxy.

[0029] The present invention also discloses a storage medium storing program instructions, which, when running, execute the data service authorization method based on concealed query as described above.

[0030] Beneficial effects of the invention: The invention discloses a data service authorization method, system and medium based on hidden query. A trusted third-party database agent intercepts the developer's query statement, and uses the hidden query method with the data service provider to authenticate the database query statement proposed by the developer, and finally determines whether to return data based on the authentication result. The invention uses hidden query technology when authenticating the database query statement, so that the data used by the developer can be authenticated without revealing the key content of the developer's program algorithm, and the developer's intellectual property rights are protected while fully tapping the data potential. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a functional block diagram of the system described in Example 1;

[0032] Figure 2 This is a flow chart of the method described in Example 2. DETAILED DESCRIPTION

[0033] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0034] Example 1

[0035] This embodiment discloses a data service authorization system based on hidden query, such as Figure 1 As shown, including:

[0036] Data service providers are institutions or organizations that own data and provide data services;

[0037] Developers, for data users, develop programs or algorithms using the data services provided by data providers;

[0038] A trusted third party is provided by a multi-party trust organization to provide a database proxy that performs hidden queries on query statements. The trusted third party also provides a trusted third-party database to store data provided by the data service provider.

[0039] When authorizing data services, the data service provider stores the data in a trusted third-party database and publishes the data directory to the outside world. The developer then applies for the required database table and pays. The data service provider records the authorization information. The developer's program starts running and queries the data required by the algorithm through query statements. The database proxy then intercepts the query statements and parses and extracts them to obtain the queried table name and field name. The database proxy generates a key pair and sends the public key to the data service provider, while encrypting the permission query information. A hidden query process is performed between the database proxy and the data service provider. The data service provider sends the query result ciphertext to the database proxy, which decrypts the result. Finally, the query statement is determined to be authorized based on the permission information query result. If authorized, it is sent to the database server for query and the result is returned. If not, an unauthorized error result is directly returned.

[0040] In this embodiment, Mysql is used as the database server and Mysql-Proxy is used as the database proxy.

[0041] Example 2

[0042] This embodiment discloses a data service authorization method based on hidden query, such as Figure 2 As shown, the following steps are included:

[0043] Step 101: The data service provider stores the data in a trusted third-party database and publishes the data directory externally;

[0044] Step 102: The developer applies for the required database table and pays, and the data service provider records the authorization information;

[0045] Step 103: The developer program starts running and queries the data required by the algorithm through query statements;

[0046] Step 104: The database proxy intercepts the query statement, and parses and extracts the query statement to obtain the queried table name and field name;

[0047] Step 105: The database agent generates a key pair and sends the public key to the data service provider;

[0048] Step 106: The database agent encrypts the authority query information;

[0049] Step 107: A hidden query process is performed between the database agent and the data service provider;

[0050] Step 108: The data service provider sends the encrypted query result to the database agent, and the database agent decrypts the result;

[0051] Step 109, the database agent determines whether the query statement is authorized according to the authority information query result, if it is authorized, step 110, if not, step 111;

[0052] Step 110: The database agent sends the query statement to the database server for query and returns the result, and then goes to step 112;

[0053] Step 111, the database agent returns an unauthorized error result to the developer, and then goes to step 112;

[0054] Step 112: End the query.

[0055] In this embodiment, the data service provider is an institution or assembly that owns the data; the trusted third-party database is provided by a multi-party trust organization and is endorsed by a recognized reputable unit; the developer is a data user who uses the data to develop programs or algorithms; the payment includes currency or other value exchanges; the authorization information includes developer information, database table information, and field information, etc.; the query statement is a database query statement that complies with the SQL protocol; the database agent is provided by a trusted third party and is used to intercept and authenticate the query statement; the hidden query process is implemented using a homomorphic encryption scheme.

[0056] Example 3

[0057] This embodiment discloses a storage medium storing program instructions, which, when executed, execute the data service authorization method based on hidden query as described in Embodiment 2. The storage medium may be a transient memory or a solid-state memory.

[0058] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A data service authorization method based on hidden query, Features: The following steps are involved: S01) The data service provider stores the data in a trusted third-party database and publishes the data directory to the public; S02) The developer applies for the required database table and pays, and the data service provider records the authorization information; S03), the developer program starts running, and queries the required data through query statements; S04), the database proxy intercepts the query statement, and parses and extracts the query statement to obtain the queried table name and field name; S05), the database agent generates a key pair and sends the public key to the data service provider; S06), the database agent encrypts the authority query information; S107), a hidden query process is performed between the database agent and the data service provider; S108), the data service provider sends the ciphertext of the query result to the database agent, and the database agent decrypts the result; S109), the database agent determines whether the query statement is authorized according to the authority information query result, and if it is authorized, it proceeds to step S110), if it is not authorized, it proceeds to step S111); S110), the database agent sends the query statement to the database server for query and returns the result, and then goes to step S112); S111), the database agent returns an unauthorized error result to the developer, and goes to step S112); S112), end the query.

2. According to the data service authorization method based on hidden query in claim 1, Features: The hidden query process is implemented using homomorphic encryption.

3. The data service authorization method based on hidden query according to claim 1, Features: Authorization information includes developer information, database table information, and field information.

4. The data service authorization method based on hidden query according to claim 1, Features: The query statement is a database query statement that complies with the SQL protocol.

5. The data service authorization method based on hidden query according to claim 1, Features: The database proxy is provided by a trusted third party.

6. The data service authorization method based on hidden query according to claim 1, Features: The trusted third-party database is provided for multi-party trust prevention.

7. A data service authorization system based on hidden query, Features: include: Data service providers are institutions or organizations that own data and provide data services; Developers, for data users, develop programs or algorithms using the data services provided by data providers; A trusted third party is provided by a multi-party trust organization to provide a database proxy that performs hidden queries on query statements. The trusted third party also provides a trusted third-party database to store data provided by the data service provider. When authorizing data services, the data service provider stores the data in a trusted third-party database and publishes the data directory to the outside world. The developer then applies for the required database table and pays. The data service provider records the authorization information. The developer's program starts running and queries the data required by the algorithm through query statements. The database proxy then intercepts the query statements and parses and extracts them to obtain the queried table name and field name. The database proxy generates a key pair and sends the public key to the data service provider, while encrypting the permission query information. A hidden query process is performed between the database proxy and the data service provider. The data service provider sends the query result ciphertext to the database proxy, which decrypts the result. Finally, the query statement is determined to be authorized based on the permission information query result. If authorized, it is sent to the database server for query and the result is returned. If not, an unauthorized error result is directly returned.

8. The data service authorization system based on hidden query according to claim 7, Features: Mysql is used as a trusted third-party database server.

9. The data service authorization system based on hidden query according to claim 7, Features: Use Mysql-Proxy as the database proxy.

10. A storage medium storing program instructions, It is characterized in that When the program instructions are executed, the data service authorization method based on hidden query as described in any one of claims 1 to 6 is executed.