Data gateway reinforcement method and system based on distributed key
By adopting a distributed key-based data gateway reinforcement method in the data service sharing and exchange scenario, the problems of difficult integration of traditional data gateways, performance bottlenecks, security risks and insufficient scalability are solved, and the service requester and provider are realized Trusted data transmission between them improves the security and efficiency of data transmission.
Patent Information
- Application Number
- CN202410978635.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In the data service sharing and exchange scenario, traditional data gateways have problems such as difficulty in integration, performance bottlenecks, security risks and insufficient scalability, resulting in insecure and inefficient data transmission.
采用基于分布式密钥的数据网关加固方法,通过服务请求方和服务提供方基于身份信息生成私钥和公钥,分布式服务总线进行加密传输和权限验证,确保数据传输的安全性和可信 sex.
It realizes trusted data transmission between service requesters and service providers, improves the security and efficiency of data transmission, simplifies the integration process, and improves the scalability of data gateways.
Smart Images

Figure CN118523959B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data sharing, and in particular to a data gateway reinforcement method and system based on distributed keys. Background Art
[0002] In traditional data service sharing and exchange scenarios, data requests and calls are mostly made in the form of restful APIs. In the process of service requests and result returns, key information such as request parameters and return results may be leaked and tampered with, especially when a dedicated API key is obtained and the simulated request service is deployed on the same server, resulting in risks such as insecure service calls and data leakage.
[0003] In the actual production environment, there are many problems in the process of building a data service sharing and exchange system:
[0004] 1. The integration of data service gateways is difficult: Due to the diversity and complexity of data sources, data service gateways need to support a variety of different data formats, protocols, and interfaces, which leads to increased integration complexity and workload. When facing different data sources, enterprises need to spend a lot of time and energy on configuration and debugging to ensure the normal operation of data transmission and applications;
[0005] 2. The performance bottleneck of the data service gateway is obvious: When processing large amounts of data, the data service gateway may encounter performance bottlenecks, resulting in slower data transmission speeds or increased latency, which will not only affect user experience but may also have a negative impact on the company's business. Therefore, companies need to pay attention to the performance of the data service gateway and take effective optimization measures to improve data processing capabilities;
[0006] 3. The security risks of data service gateways cannot be ignored: Since data service gateways connect data sources and applications, they need to process a large amount of sensitive data. If there are security vulnerabilities or improper configuration of data service gateways, data may be leaked, tampered or attacked. Therefore, enterprises need to strengthen the security management of data service gateways and take effective security measures to protect the integrity and confidentiality of data.
[0007] 4. The scalability of the data service gateway is also an important issue: With the development of business and the continuous updating of technology, the company's demand for data services is also changing. If the data service gateway is not scalable, then when facing new data sources and applications, the company may need to redesign and deploy the entire system, which will undoubtedly increase costs and workload. Therefore, it is crucial to choose a scalable data service gateway.
[0008] In the scenario of data service sharing and exchange, how to achieve trusted transmission of data between the requester and the provider is a technical problem that needs to be solved. Summary of the invention
[0009] The technical task of the present invention is to address the above shortcomings and provide a data gateway reinforcement method and system based on distributed keys to solve the technical problem of how to achieve trusted transmission of data between the requester and the provider in a data service sharing and exchange scenario.
[0010] In a first aspect, the present invention provides a data gateway reinforcement method based on distributed keys, which is applied between a service requester, a service provider, a distributed service bus, and a distributed key system. The method comprises the following steps:
[0011] The service requester and the service provider submit identity registration applications to the distributed service bus based on their identity information. Based on the identity information of the service requester and the service provider, the distributed service bus calls the distributed key system to generate a private key, where the identity information includes the address and user name;
[0012] The service provider submits a data service registration application to the distributed service bus based on its service information. The distributed service bus calls the distributed key system to generate a public key based on the service provider's service information and sends the public key to the service requester and the service provider. The service information includes the service identifier, service content, service attributes and service scope. The service scope is used to limit the service requester who can use the data service.
[0013] The service requester requests a private key from the distributed service bus, encrypts its service request message based on the public key and the private key, and then sends the encrypted service request message to the distributed service bus. The distributed service bus decrypts the encrypted service request message based on the public key and the private key, and performs authority verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has the authority to use the data service, the distributed service bus sends the service request message to the service provider.
[0014] The service provider requests a private key from the distributed service bus, encrypts the service provision message related to the service request message based on the public key and the private key, and returns the encrypted service provision message to the service requester through the distributed service bus;
[0015] The service requester requests a private key from the distributed service bus, decrypts the encrypted service provision message based on the public key and the private key, and obtains the service provision message.
[0016] Preferably, for the service requester and the service provider, the identity information also includes a mobile phone number and an organization code, and the address includes an IP address and a MAC address.
[0017] Preferably, when the distributed service bus performs permission verification on the decrypted service request message, it parses the service identifier of the data service specified in the service request message, searches for the address of the corresponding service provider based on the service identifier, and determines whether the service requester has the right to use the data service specified in the service request message according to the service requester's permission level and service usage scope. If the service requester has the right to use the data service, the distributed service bus encapsulates the service request message into a bus message and sends the bus message to the service provider. If the service requester does not have the right to use the data service, the distributed service bus returns an error status to the service requester.
[0018] Preferably, when returning the encrypted service provision message to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus encapsulates the service provision message as a bus message and returns it to the service requester; if the service request submitted by the data requester is an asynchronous request, the distributed service bus encapsulates the service provision message as a bus message and saves the bus message in the asynchronous request cache table; when the service requester obtains the asynchronous request return result, the distributed service bus obtains the bus message from the asynchronous request cache table and returns it to the service requester.
[0019] In a second aspect, the present invention provides a data gateway reinforcement system based on distributed keys, including a service requester, a service provider, a distributed service bus, and a distributed key system, for implementing feasible data transmission between a service requester and a service provider through a data gateway reinforcement method based on distributed keys as described in any one of the first aspects;
[0020] The service requester and the service provider are used to submit identity registration applications to the distributed service bus based on their identity information. Correspondingly, based on the identity information of the service requester and the service provider, the distributed service bus is used to call a distributed key system to generate a private key, wherein the identity information includes an address and a user name;
[0021] The service provider is used to submit a data service registration application to the distributed service bus based on its service information. Correspondingly, based on the service information of the service provider, the distributed service bus is used to call a distributed key system to generate a public key, and send the public key to the service requester and the service provider, wherein the service information includes a service identifier, service content, service attributes and service scope, and the service scope is used to limit the service requester that has the right to use the data service;
[0022] The service requester is used to request a private key from the distributed service bus, encrypt its service request message based on the public key and the private key, and then send the encrypted service request message to the distributed service bus. Correspondingly, the distributed service bus is used to decrypt the encrypted service request message based on the public key and the private key, and perform authority verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has the authority to use the data service, the distributed service bus is used to send the service request message to the service provider;
[0023] The service provider is used to request a private key from the distributed service bus, encrypt the service provision message related to the service request message based on the public key and the private key, and return the encrypted service provision message to the service requester through the distributed service bus;
[0024] The service requester is used to request a private key from the distributed service bus, and decrypt the encrypted service provision message based on the public key and the private key to obtain the service provision message.
[0025] Preferably, for the service requester and the service provider, the identity information also includes a mobile phone number and an organization code, and the address includes an IP address and a MAC address.
[0026] Preferably, when the distributed service bus performs permission verification on the decrypted service request message, it is used to perform the following: parse the service identifier of the data service specified in the service request message, search for the address of the corresponding service provider based on the service identifier, and determine whether the service requester has the right to use the data service specified in the service request message according to the service requester's permission level and service usage scope. If the service requester has the right to use it, the service request message is encapsulated as a bus message and the bus message is sent to the service provider. If the service requester does not have the right to use it, an error status is returned to the service requester.
[0027] Preferably, when returning the encrypted service provision message to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus encapsulates the service provision message as a bus message and returns it to the service requester; if the service request submitted by the data requester is an asynchronous request, the distributed service bus encapsulates the service provision message as a bus message and saves the bus message in the asynchronous request cache table; when the service requester obtains the asynchronous request return result, the distributed service bus obtains the bus message from the asynchronous request cache table and returns it to the service requester.
[0028] The distributed key-based data gateway reinforcement method and system of the present invention have the following advantages:
[0029] 1. Generate a private key based on the identity information of the service provider and the service requester, generate a public key based on the service information of the service provider, and encrypt the data transmission between the service requester and the service provider based on the public key and private key, thus realizing the trusted data transmission between the service requester and the service provider;
[0030] 2. For the service request submitted by the service requester, the distributed service bus searches for the matching service provider address and determines whether the service requester has the authority to use the service. If so, the distributed service bus sends the service request to the corresponding service provider, and the service provider returns the service provision message to the distributed service bus, which then returns the service provision message to the service requester through the distributed service bus, thereby realizing service authority management. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0032] The present invention is further described below in conjunction with the accompanying drawings.
[0033] Figure 1 This is a flowchart of a data gateway reinforcement method based on distributed keys in Example 1. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0035] The embodiments of the present invention provide a data gateway reinforcement method and system based on distributed keys, which are used to solve the technical problem of how to achieve trusted transmission of data between a requester and a provider in a data service sharing and exchange scenario.
[0036] Embodiment 1: A data gateway reinforcement method based on distributed keys of the present invention is applied between a service requester, a service provider, a distributed service bus and a distributed key system. The method comprises the following steps:
[0037] S100, the service requester and the service provider submit an identity registration application to the distributed service bus based on their identity information, and the distributed service bus calls the distributed key system to generate a private key based on the identity information of the service requester and the service provider, wherein the identity information includes the address and user name;
[0038] S200, the service provider submits a data service registration application to the distributed service bus based on its service information, and based on the service information of the service provider, the distributed service bus calls a distributed key system to generate a public key, and sends the public key to the service requester and the service provider, wherein the service information includes a service identifier, service content, service attributes, and service scope, and the service scope is used to limit the service requester that can use the data service;
[0039] S300, the service requester requests a private key from the distributed service bus, encrypts its service request message based on the public key and the private key, and sends the encrypted service request message to the distributed service bus, which decrypts the encrypted service request message based on the public key and the private key, and performs authority verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has the authority to use the data service, the distributed service bus sends the service request message to the service provider;
[0040] S400, the service provider requests a private key from the distributed service bus, encrypts a service provision message related to the service request message based on the public key and the private key, and returns the encrypted service provision message to the service requester through the distributed service bus;
[0041] S500: The service requester requests a private key from the distributed service bus, and decrypts the encrypted service provision message based on the public key and the private key to obtain the service provision message.
[0042] In step S100 of this embodiment, for the service requester and the service provider, the identity information also includes a mobile phone number and an organization code, and the address includes an IP address and a MAC address.
[0043] In step S300 of this embodiment, when the distributed service bus performs permission verification on the decrypted service request message, it parses the service identifier of the data service specified in the service request message, searches for the address of the corresponding service provider based on the service identifier, and determines whether the service requester has the right to use the data service specified in the service request message according to the permission level of the service requester and the service usage scope. If the service requester has the right to use the data service, the distributed service bus encapsulates the service request message into a bus message and sends the bus message to the service provider. If the service requester does not have the right to use the data service, the distributed service bus returns an error status to the service requester.
[0044] In step S400, when the encrypted service provision message is returned to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus encapsulates the service provision message into a bus message and returns it to the service requester; if the service request submitted by the data requester is an asynchronous request, the distributed service bus encapsulates the service provision message into a bus message and saves the bus message in the asynchronous request cache table; when the service requester obtains the asynchronous request return result, the distributed service bus obtains the bus message from the asynchronous request cache table and returns it to the service requester.
[0045] Embodiment 2: The present invention provides a data gateway reinforcement system based on distributed keys, including a service requester, a service provider, a distributed service bus and a distributed key system. The system implements feasible data transmission between the service requester and the service provider through the method disclosed in Embodiment 1.
[0046] The service requester and the service provider are used to submit identity registration applications to the distributed service bus based on their identity information. Correspondingly, based on the identity information of the service requester and the service provider, the distributed service bus is used to call a distributed key system to generate a private key, wherein the identity information includes an address and a user name.
[0047] The service provider is used to submit a data service registration application to the distributed service bus based on its service information. Correspondingly, based on the service information of the service provider, the distributed service bus is used to call a distributed key system to generate a public key, and send the public key to the service requester and the service provider, wherein the service information includes a service identifier, service content, service attributes and service scope, and the service scope is used to limit the service requester who has the right to use the data service.
[0048] The service requester is used to request a private key from the distributed service bus, encrypt its service request message based on the public key and the private key, and then send the encrypted service request message to the distributed service bus. Correspondingly, the distributed service bus is used to decrypt the encrypted service request message based on the public key and the private key, and perform authority verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has the authority to use the data service, the distributed service bus is used to send the service request message to the service provider.
[0049] The service provider is used to request a private key from the distributed service bus, encrypt the service provision message related to the service request message based on the public key and the private key, and return the encrypted service provision message to the service requester through the distributed service bus.
[0050] The service requester is used to request a private key from the distributed service bus, and decrypt the encrypted service provision message based on the public key and the private key to obtain the service provision message.
[0051] In this embodiment, for the service requester and the service provider, the identity information also includes a mobile phone number and an organization code, and the address includes an IP address and a MAC address.
[0052] When the distributed service bus performs permission verification on the decrypted service request message, the distributed service bus is used to perform the following operations: parse the service identifier of the data service specified in the service request message, find the address of the corresponding service provider based on the service identifier, and determine whether the service requester has the right to use the data service specified in the service request message according to the service requester's permission level and service usage scope. If the service requester has the right to use it, the service request message is encapsulated into a bus message and the bus message is sent to the service provider. If the service requester does not have the right to use it, an error status is returned to the service requester.
[0053] In this embodiment, when the encrypted service provision message is returned to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus is used to perform the following: encapsulate the service provision message into a bus message and return it to the service requester; if the service request submitted by the data requester is an asynchronous request, encapsulate the service provision message into a bus message and save the bus message in the asynchronous request cache table; when the service requester obtains the asynchronous request return result, the bus message is obtained from the asynchronous request cache table and returned to the service requester.
[0054] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A data gateway reinforcement method based on distributed keys, characterized in that: Applied between a service requester, a service provider, a distributed service bus, and a distributed key system, the method comprises the following steps: The service requester and service provider submit identity registration applications to the distributed service bus based on their identity information. Based on the identity information of the service requester and service provider, the distributed service bus calls the distributed key system to generate a private key, where the identity information includes the address and user name. The service provider submits a data service registration application to the distributed service bus based on its service information. The distributed service bus calls the distributed key system based on the service provider's service information to generate a public key, and then sends the public key to the service requester and the service provider. The service information includes the service identifier, service content, service attributes, and service scope. The service scope is used to limit the service requesters who can use the data service. The service requester requests a private key from the distributed service bus, encrypts its service request message based on the public and private keys, and sends the encrypted service request message to the distributed service bus. The distributed service bus decrypts the encrypted service request message based on the public and private keys, and performs permission verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has permission to use the data service, the distributed service bus sends the service request message to the service provider. The service provider requests a private key from the distributed service bus, encrypts the service provision message related to the service request message based on the public key and the private key, and returns the encrypted service provision message to the service requester through the distributed service bus; The service requester requests a private key from the distributed service bus, decrypts the encrypted service provision message based on the public key and the private key, and obtains the service provision message.
2. The data gateway reinforcement method based on distributed keys according to claim 1 is characterized in that: For service requesters and service providers, identity information also includes mobile phone numbers and organization codes, and addresses include IP addresses and MAC addresses.
3. The data gateway reinforcement method based on distributed keys according to claim 1 is characterized in that: When the distributed service bus performs permission verification on the decrypted service request message, it parses the service identifier of the data service specified in the service request message, searches for the address of the corresponding service provider based on the service identifier, and determines whether the service requester has the right to use the data service specified in the service request message according to the service requester's permission level and service usage scope. If the service requester has the right to use it, the distributed service bus encapsulates the service request message into a bus message and sends the bus message to the service provider. If the service requester does not have the right to use it, the distributed service bus returns an error status to the service requester.
4. The data gateway reinforcement method based on distributed keys according to claim 1 is characterized in that: When the encrypted service provision message is returned to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus will encapsulate the service provision message as a bus message and return it to the service requester. If the service request submitted by the data requester is an asynchronous request, the distributed service bus will encapsulate the service provision message as a bus message and save the bus message in the asynchronous request cache table. When the service requester obtains the asynchronous request return result, the distributed service bus obtains the bus message from the asynchronous request cache table and returns it to the service requester.
5. A data gateway reinforcement system based on distributed keys, characterized in that: It includes a service requester, a service provider, a distributed service bus, and a distributed key system, and is used to realize feasible data transmission between the service requester and the service provider through a data gateway reinforcement method based on distributed keys as described in any one of claims 1 to 4; The service requester and the service provider are used to submit identity registration applications to the distributed service bus based on their identity information. Correspondingly, based on the identity information of the service requester and the service provider, the distributed service bus is used to call a distributed key system to generate a private key, wherein the identity information includes an address and a user name; The service provider is used to submit a data service registration application to the distributed service bus based on its service information. Correspondingly, based on the service provider's service information, the distributed service bus is used to call a distributed key system to generate a public key and send the public key to the service requester and the service provider, wherein the service information includes a service identifier, service content, service attributes, and service scope. The service scope is used to limit the service requesters who can use the data service; The service requester is used to request a private key from the distributed service bus, encrypt its service request message based on the public key and the private key, and send the encrypted service request message to the distributed service bus. Correspondingly, the distributed service bus is used to decrypt the encrypted service request message based on the public key and the private key, and perform permission verification on the decrypted service request message. For the data service specified in the service request message, if the service requester has the permission to use the data service, the distributed service bus is used to send the service request message to the service provider; The service provider requests a private key from the distributed service bus, encrypts the service provision message related to the service request message based on the public and private keys, and returns the encrypted service provision message to the service requester via the distributed service bus. The service requester is used to request a private key from the distributed service bus, decrypt the encrypted service provision message based on the public key and the private key, and obtain the service provision message.
6. The data gateway reinforcement system based on distributed keys according to claim 5 is characterized in that: For service requesters and service providers, identity information also includes mobile phone numbers and organization codes, and addresses include IP addresses and MAC addresses.
7. The data gateway reinforcement system based on distributed keys according to claim 5 is characterized in that: When the distributed service bus performs permission verification on the decrypted service request message, it is used to perform the following: parse the service identifier of the data service specified in the service request message, find the address of the corresponding service provider based on the service identifier, and determine whether the service requester has the right to use the data service specified in the service request message according to the service requester's permission level and service usage scope. If the service requester has the right to use it, the service request message is encapsulated as a bus message and the bus message is sent to the service provider. If the service requester does not have the right to use it, an error status is returned to the service requester.
8. The data gateway reinforcement system based on distributed keys according to claim 5 is characterized in that: When the encrypted service provision message is returned to the service requester through the distributed service bus, if the service request submitted by the data requester is a synchronous request, the distributed service bus will encapsulate the service provision message as a bus message and return it to the service requester. If the service request submitted by the data requester is an asynchronous request, the distributed service bus will encapsulate the service provision message as a bus message and save the bus message in the asynchronous request cache table. When the service requester obtains the asynchronous request return result, the distributed service bus obtains the bus message from the asynchronous request cache table and returns it to the service requester.
Citation Information
Patent Citations
Method for downloading digital certificate and cryptographic key
CN101305542A
Data transmission method, device, system and equipment
CN114024710A
IDaaS system for access control based on mutual verification mechanism
CN114928469A
Service bus asynchronous processing system and method based on distributed cache technology
CN117609290A
Cryptographic communication method and apparatus of decentralized-id-based service
WO2024090628A1
