Industrial internet service method and system for cross-communication protocol safe calling
Through a unified standard data exchange format and an industrial Internet service bus, the interoperability problem between different communication protocols in the industrial Internet is solved, and the security of the service is guaranteed through the identity authentication mechanism, realizing safe calls and data protection across communication protocols. .
Patent Information
- Application Number
- CN202410556007.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-10-29
AI Technical Summary
In the Industrial Internet, the communication protocols used by various project teams are inconsistent, resulting in cumbersome cross-communication protocol calls and version conflicts. In addition, there is a lack of effective identity authentication mechanisms, making it difficult to ensure the security of Industrial Internet services.
Use a unified standard data exchange format for conversion and processing across communication protocols, realize interoperability between different communication protocols through the industrial Internet service bus, and add identity feature information to the service call request for encryption and signature to ensure that only legitimate identities Applications can call services.
It simplifies development and maintenance, avoids conflicts between communication protocols, ensures the security and data privacy of industrial Internet services, and achieves reliable interconnection between different communication protocols.
Smart Images

Figure CN118869836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Internet service architecture, and specifically, to an industrial Internet service method and system for securely calling across communication protocols. Background Art
[0002] In the industrial Internet of Baowu Group, the communication protocols used by various project teams are not consistent, including but not limited to HTTP / HTTPS communication protocol, ZeroC Ice communication protocol, BEA's transaction middleware product Tuxedo, Alibaba's open source high-performance and excellent service framework Dubbo, and Google's high-performance, general open source RPC framework gRPC. In the current industrial Internet practice, when an industrial Internet system needs to call the services of other industrial Internet systems, it is necessary to install the communication protocol client used by other industrial Internet systems to communicate. On the one hand, it is cumbersome to use and brings difficulties to the client version upgrade; on the other hand, due to the restrictions of network firewalls, the use of communication protocols of other industrial Internet systems may not be allowed; because the third-party development packages relied on by various communication protocols are not the same, it may also bring about the problem of third-party development package version conflicts.
[0003] Due to project requirements, the interactions between various Industrial Internet systems are becoming more frequent. In order to support the interconnection between Industrial Internet systems using different communication protocols, there is an urgent need to study an Industrial Internet service architecture that supports cross-communication protocol calls for the steel industry.
[0004] At the same time, industrial Internet services involve important sensitive and confidential data of enterprises, such as company financial information, and unauthorized service calls must be prevented. In order to ensure the overall security of the industrial Internet system, it is necessary to solve the mutual trust problem of each industrial Internet system. Only on the premise of mutual trust can industrial Internet services be called each other. For untrusted service calls, such as hacker intrusion, calls must be prohibited. Therefore, it is urgent to study a secure industrial Internet service architecture with caller identity authentication.
[0005] Patent document CN104506486B discloses a cross-platform, cross-language, high-security software service interface calling method and system, including service management, service publishing and service calling, which can ensure the security and reliability of information transmission in the following forms: the interface is implemented in the file transfer layer, one-way transmission, asynchronous response; two-way secondary encryption is used during file transmission to further ensure data security to avoid security vulnerabilities caused by the cracking of one party's key; the service scheduling center effectively isolates the links between each application and service, and all calls go through the service bus; the audit function ensures that there is a basis for traceability afterwards.
[0006] However, the patent document CN104506486B solves the problem of cross-platform and cross-language calls. The present invention needs to solve the problem of mutual calls between different communication protocols, and does not need to solve the problem of cross-language calls, because the development kits of each communication protocol themselves support cross-language calls better, and various mainstream development languages (such as Java, C / C++, Python and other development languages) basically have corresponding development kits. In addition, the patent document CN104506486B cannot solve the security problem of industrial Internet services for the identity authentication of callers.
[0007] Patent document CN110191052B discloses a cross-protocol network transmission method and system, including: a first transmission unit and a second transmission unit respectively sense the paths and protocols available for transmitting data packets; multiple paths for transmitting data packets of different protocols are established through negotiation between the first transmission unit and the second transmission unit; and data packets are transmitted between the first transmission unit and the second transmission unit using multiple paths for transmitting data packets of different protocols.
[0008] Although patent document CN110191052B also solves the problem of cross-communication protocols, the patent document focuses on solving the problem of data packet transmission and cannot be actually used in the industrial Internet service architecture. The present invention solves the mutual calling problem between industrial Internet services of various different communication protocols such as HTTP / HTTPS communication protocol, ZeroC Ice communication protocol, BEA's transaction middleware product Tuxedo, Alibaba's open source high-performance and excellent service framework Dubbo, and Google's high-performance, general open source RPC framework gRPC, and does not care about how the data packet is transmitted.
[0009] Patent document CN111258773B discloses a service call process information processing method, device and electronic device, including: creating a process instance according to a received creation request, the process instance including multiple nodes and at least one trigger event, the trigger event being used to trigger switching from one node to the next node; providing a configurable object for the process, the configurable object including the node and the trigger event, so as to configure tasks for the nodes and / or trigger events in the process instance; the configured task includes a service interface identifier to be called, and parameter information for locating the service implementation under the service interface.
[0010] However, patent document CN111258773B does not solve the problem of cross-communication protocols. Summary of the invention
[0011] In view of the defects in the prior art, the purpose of the present invention is to provide an industrial Internet service method and system for securely calling across communication protocols.
[0012] According to the present invention, an industrial Internet service method for securely calling across communication protocols includes:
[0013] Step S1: The industrial Internet service caller initiates a service call request and obtains the metadata of the service according to the service name;
[0014] Step S2: further processing is performed according to the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, step S3 is executed; if not, step S4 is executed;
[0015] Step S3: convert the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, send a service call request to the service provider, receive a service call response sent by the service provider, convert the service call response into the unified standard data exchange format, and return it to the service caller;
[0016] Step S4: Send a service call request to the Industrial Internet Service Bus in accordance with a unified standard data exchange format, receive a service call response sent by the Industrial Internet Service Bus, and return it to the service caller.
[0017] Preferably, it also includes:
[0018] Put characteristic information of the service caller's identity into the service call request;
[0019] The service call request data is packaged according to a unified standard data exchange format.
[0020] Preferably, the characteristic information of the service caller identity includes a unique identifier GUID of the application, a timestamp TimeStamp, and a timestamp Encoded TimeStamp encrypted with a private key of the application;
[0021] The unified standard data exchange format has nothing to do with the communication protocol. All communication protocols use the same unified standard data exchange format.
[0022] The unified standard data exchange format includes the following information: the calling domain, the name of the service to be called, and the identity information of the caller; the calling domain includes local domain calling and cross-domain calling. When the calling domain is a cross-domain calling, the unified standard data exchange format also includes the information of the destination domain;
[0023] If a signature is required, the unified standard data exchange format also includes the signature on the data.
[0024] Preferably, step S4 includes the industrial Internet service bus processing the service call request and forwarding the service call request to the industrial Internet service provider, and the specific steps include:
[0025] Step S4.1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service according to the service name;
[0026] Step S4.2: According to the communication protocol type in the obtained service metadata, the unified standard data exchange format is converted into a format corresponding to the communication protocol used by the service provider, and a service call request is sent to the industrial Internet service provider;
[0027] Step S4.3: Receive a service call response sent by the service provider;
[0028] Step S4.4: Convert the service call response into a unified standard data exchange format and return it to the service caller.
[0029] Preferably, in step S3 and step S4.2, after sending the service call request to the industrial Internet service provider, the industrial Internet service provider processes the service call request, and the processing steps include:
[0030] Step 1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service based on the service name;
[0031] Step 2: The industrial Internet service provider receives the service call request and retrieves the application identity information from the service call request;
[0032] Step 3: Identify the application identity according to the application identity information to confirm that the current call is a service call initiated by an application with a legal identity. If it is identified as an illegal identity, exit the system directly;
[0033] Step 4: Based on the application GUID in the identified legitimate application identity and the name of the service to be called, check from the permission table whether the caller has the permission to call the service. If yes, execute step 5; if not, exit the system directly;
[0034] Step 5: Determine whether the current service metadata is set to require compression, encryption, and signing. If so, decompress and decrypt the service call request and verify whether the signature is valid; if not, execute step 6;
[0035] Step 6: Execute business logic and generate service call response.
[0036] Preferably, identifying the application identity according to the application identity information includes:
[0037] Step 3.1: The Industrial Internet Service Registration Center, the Industrial Internet Service Caller, the Industrial Internet Service Bus, and the Industrial Internet Service Provider perform time synchronization to ensure the consistency of timestamps;
[0038] Step 3.2: The service caller obtains the local timestamp and encrypts the timestamp with its own private key;
[0039] Step 3.3: The service caller puts the characteristic information of the service caller's identity in the service call request, including the application's unique identifier GUID, timestamp TimeStamp, and timestamp EncodedTimeStamp encrypted with the application's private key;
[0040] Step 3.4: After receiving the service call request, the service provider obtains the local timestamp and compares the local timestamp with the timestamp in the service call request to determine whether the difference between the two exceeds the set error range. If so, an error message indicating that the application identity is illegal is directly returned; if not, step 3.5 is executed;
[0041] Step 3.5: The service provider decrypts the encrypted timestamp with the caller's public key and compares the decrypted timestamp with the timestamp in the service call request. If the two are consistent, the information that the application identity is legal is returned; if the two are inconsistent, the error message that the application identity is illegal is returned.
[0042] Preferably, the predetermined error range is set to plus or minus one minute.
[0043] An industrial Internet service system for securely calling cross-communication protocols provided by the present invention includes:
[0044] Module M1: The industrial Internet service caller initiates a service call request and obtains the service metadata based on the service name;
[0045] Module M2: further processing is performed according to the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, module M3 is triggered; if not, module M4 is triggered;
[0046] Module M3: converts the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, sends a service call request to the service provider, receives the service call response sent by the service provider, converts the service call response into the unified standard data exchange format, and returns it to the service caller;
[0047] Module M4: Sends a service call request to the Industrial Internet Service Bus in accordance with a unified standard data exchange format, receives a service call response sent by the Industrial Internet Service Bus, and returns it to the service caller.
[0048] Preferably, it also includes:
[0049] Put characteristic information of the service caller's identity into the service call request;
[0050] The service call request data is packaged according to a unified standard data exchange format.
[0051] Preferably, the characteristic information of the service caller identity includes a unique identifier GUID of the application, a timestamp TimeStamp, and a timestamp Encoded TimeStamp encrypted with a private key of the application;
[0052] The unified standard data exchange format has nothing to do with the communication protocol. All communication protocols use the same unified standard data exchange format.
[0053] The unified standard data exchange format includes the following information: the calling domain, the name of the service to be called, and the identity information of the caller; the calling domain includes local domain calling and cross-domain calling. When the calling domain is a cross-domain calling, the unified standard data exchange format also includes the information of the destination domain;
[0054] If a signature is required, the unified standard data exchange format also includes the signature on the data.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. The present invention adopts the technology of industrial Internet service bus to solve the conversion problem between heterogeneous communication protocols. The application only needs to use its own communication protocol for development, and there is no need to install the communication protocol development kit of the callee, which simplifies development and reduces subsequent maintenance costs such as upgrades. It also avoids the problem of conflicts between third-party development kits that different communication protocols rely on.
[0057] 2. The present invention adopts a unified application identity to ensure the security of industrial Internet service calls. Because of the unified application identity, all industrial Internet systems trust this unified application identity. Therefore, the application identity can not only be used to identify illegal application identities, but also can be used for permission control to ensure the security of the company's privacy data and / or confidential data. For example, for a service provider B, a service caller A can be allowed to call the product list service GetProductList, but is prohibited from calling the payment card service GetPaymentCard. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0059] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0060] Figure 2 A schematic diagram of a process of the service bus in the present invention processing a service call request and forwarding the service call request to a service provider;
[0061] Figure 3 A schematic diagram of the process of an industrial Internet service provider processing a service call request and returning a service call response in the present invention;
[0062] Figure 4 This is a schematic diagram of the process of industrial Internet application identity identification in the present invention. DETAILED DESCRIPTION
[0063] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0064] The industrial Internet service architecture Service Architecture of the present invention includes an industrial Internet service registration center Service Center, an industrial Internet service caller Service Consumer, an industrial Internet service bus Service Bus and an industrial Internet service provider Service Provider. The industrial Internet service registration center Service Center provides service registration Service Registration and service discovery Service Discovery functions. Service registration is to register the metadata of the service to the service registration center, and service discovery is to obtain the metadata of the service according to the service name. The industrial Internet service bus Service Bus is responsible for processing the conversion of communication protocols, responsible for converting the service call request Request from the communication protocol of the service caller to the communication protocol of the callee, and converting the service call response Response from the communication protocol of the callee to the communication protocol of the service caller. When the service caller and the callee use the same communication protocol, the service bus is not passed. The industrial Internet application App can either act as a service caller to call the services of other applications, or act as a service provider to provide services to other applications. When the industrial Internet application acts as a service caller, we call it the industrial Internet service caller Service Consumer, and when the industrial Internet application acts as a service provider, we call it the industrial Internet service provider Service Provider.
[0065] Embodiment 1
[0066] According to the present invention, a method for securely calling an industrial Internet service across communication protocols is provided, such as Figure 1 As shown, including:
[0067] Step S1: The industrial Internet service caller initiates a service call request and obtains the metadata of the service according to the service name. Specifically, the service discovery function of the industrial Internet service registration center is called to obtain the metadata of the service according to the service name. It should be noted that in actual implementation, in order to improve performance, the metadata of the service will be obtained from the cache. Among them, the metadata includes the communication protocol type of the service and the address of the server. If encryption, compression and signature are also present, the encryption algorithm, compression algorithm and signature algorithm are also included respectively. The communication protocol types include HTTP / HTTPS communication protocol, ZeroCIce communication protocol, BEA's transaction middleware product Tuxedo, Alibaba's open source high-performance excellent service framework Dubbo, and Google's high-performance and general open source RPC framework gRPC.
[0068] Step S2: further process the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, execute step S3; if not, execute step S4.
[0069] Step S3: Convert the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, send a service call request Request to the service provider, receive the service call response Response sent by the service provider, convert the service call response Response into the unified standard data exchange format, and return it to the service caller.
[0070] Step S4: Send a service call request Request to the Industrial Internet Service Bus in accordance with a unified standard data exchange format, receive a service call response Response sent by the Industrial Internet Service Bus, and return it to the service caller. Step S4 includes the Industrial Internet Service Bus processing the service call request and forwarding the service call request to the Industrial Internet Service Provider, such as Figure 2 As shown, the specific steps are as follows:
[0071] Step S4.1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service according to the service name. It should be noted that in actual implementation, in order to improve performance, the metadata of the service will be obtained from the cache.
[0072] Step S4.2: According to the communication protocol type in the obtained service metadata, the unified standard data exchange format is converted into the format corresponding to the communication protocol used by the service provider, and a service call request Request is sent to the Industrial Internet service provider.
[0073] Step S4.3: Receive the service call response Response sent by the service provider.
[0074] Step S4.4: Convert the response Response of the service call into a unified standard data exchange format and return it to the service caller.
[0075] Further, in step S3 and step S4.2, after sending the service call request Request to the industrial Internet service provider, the industrial Internet service provider processes the service call request, such as Figure 3 As shown, the processing steps include the following:
[0076] Step 1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the service metadata based on the service name. It should be noted that in actual implementation, in order to improve performance, the service metadata will be obtained from the cache.
[0077] Step 2: The Industrial Internet service provider receives the service call request and extracts the application identity information from the service call request. The Industrial Internet application identity App Identity is identified by a pair of public and private keys. The private key is kept by the application itself. The Industrial Internet service bus has the public keys of all applications connected to the bus, and the Industrial Internet service provider has the public keys of applications that are allowed to call services.
[0078] Step 3: Identify the application identity based on the application identity information to confirm that the current call is a service call initiated by an application with a legal identity. If it is identified as an illegal identity, exit the system directly and do not execute the following steps. The Identity Recognition step of the Industrial Internet application identity includes obtaining the unique identifier of the application from the service call request, obtaining the public key of the application based on the unique identifier of the application, decrypting the encrypted timestamp with the public key of the application, and comparing the decrypted result with the original timestamp. If the comparison results are consistent, the application identity is legal, otherwise, the application identity is illegal. Figure 4 As shown in the figure, industrial Internet application identity identification specifically includes the following steps:
[0079] Step 3.1: The Industrial Internet Service Registration Center, the Industrial Internet Service Caller, the Industrial Internet Service Bus, and the Industrial Internet Service Provider perform time synchronization to ensure the consistency of timestamps.
[0080] Step 3.2: The service caller obtains the local timestamp and encrypts the timestamp with its own private key.
[0081] Step 3.3: The service caller puts characteristic information of the service caller's identity in the service call request Request, including the application's unique identifier GUID, timestamp TimeStamp, and timestamp Encoded TimeStamp encrypted with the application's private key.
[0082] Step 3.4: After receiving the service call request, the service provider obtains the local timestamp and compares the local timestamp with the timestamp in the service call request to determine whether the difference between the two exceeds the set error range. If so, it directly returns an error message indicating that the application identity is illegal and does not execute subsequent steps; if not, it executes step 3.5. The predetermined error range is generally set to plus or minus one minute.
[0083] Step 3.5: The service provider decrypts the encrypted timestamp with the caller's public key and compares the decrypted timestamp with the timestamp in the service call request. If the two are consistent, the information that the application identity is legal is returned; if the two are inconsistent, the error message that the application identity is illegal is returned.
[0084] Step 4: Based on the application GUID in the application identity identified in step 3 and the name of the service to be called, check from the permission table whether the caller has the permission to call the service. If so, execute step 5; if not, exit the system directly without executing the following steps.
[0085] Step 5: Determine whether the current service metadata requires compression, encryption, and signing. If so, decompress, decrypt, and verify the validity of the service call request; if not, execute business logic and generate a service call response.
[0086] Step 6: Execute the business logic and generate a service call response. If compression is required in the service metadata, the service call response is compressed; if encryption is required in the service metadata, the service call response is encrypted; if a signature is required in the service metadata, the service call response is signed and the signature is attached to the service call response; and the encrypted, compressed and signed service call response is sent. Encryption, compression and signature are optional and non-mandatory options.
[0087] An industrial Internet service method for securely calling across communication protocols provided by the present invention also includes:
[0088] Step A: Put the characteristic information of the service caller's identity into the service call request Request. The characteristic information of the service caller's identity includes the application's unique identifier GUID, the timestamp TimeStamp, and the timestamp Encoded TimeStamp encrypted with the application's private key.
[0089] Step B: Pack the data of the service call request Request according to the unified standard data exchange format Data Interchange Format. The unified standard data exchange format is independent of the communication protocol, and all communication protocols use the same unified standard data exchange format. The unified standard data exchange format includes but is not limited to the following information: the calling domain, the name of the service to be called, and the identity information of the caller. The calling domain includes local domain calls and cross-domain calls. When the calling domain is a cross-domain call, the unified standard data exchange format also includes information on the destination domain. If a signature is required, the unified standard data exchange format also includes a signature for the data. Among them, by analogy with TCP / IP, the service call request (Request) is equivalent to the data to be sent, and packing the data is equivalent to packing the data to be sent into IP packets. IP packets have a standard data format. Similarly, the present invention packs the data and also has a standard data exchange format Data Interchange Format. IP packets can be sent via TCP or UDP. Similarly, the data packaged by the present invention can be sent via HTTP / HTTPS communication protocol, ZeroC Ice protocol, Tuxedo, Dubbo, Grpc and other protocols
[0090] The purpose of the present invention is, on the one hand, to solve the communication problems between heterogeneous communication protocols, including but not limited to HTTP / HTTPS communication protocol, ZeroC Ice communication protocol, BEA's transaction middleware product Tuxedo, Alibaba's open source high-performance excellent service framework Dubbo, and Google's high-performance, general open source RPC framework gRPC. On the other hand, it solves the security problem of identity authentication when industrial Internet services call each other, ensuring that only callers with legitimate identities can call industrial Internet services, and preventing illegal calls to industrial Internet services.
[0091] Embodiment 2
[0092] The present invention also provides an industrial Internet service system for secure cross-communication protocol calls. The industrial Internet service system for secure cross-communication protocol calls can be implemented by executing the process steps of the industrial Internet service method for secure cross-communication protocol calls. That is, technical personnel in this field can understand the industrial Internet service method for secure cross-communication protocol calls as a preferred implementation of the industrial Internet service system for secure cross-communication protocol calls.
[0093] An industrial Internet service system for securely calling cross-communication protocols provided by the present invention includes:
[0094] Module M1: The industrial Internet service caller initiates a service call request and obtains the metadata of the service based on the service name.
[0095] Module M2: further processing is performed according to the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, module M3 is triggered; if not, module M4 is triggered.
[0096] Module M3: Convert the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, send a service call request to the service provider, receive the service call response sent by the service provider, convert the service call response into a unified standard data exchange format, and return it to the service caller.
[0097] Module M4: In accordance with a unified standard data exchange format, send a service call request to the Industrial Internet Service Bus, receive a service call response sent by the Industrial Internet Service Bus, and return it to the service caller. The module M4 includes the Industrial Internet Service Bus processing the service call request and forwarding the service call request to the Industrial Internet service provider, specifically including: Module M4.1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service according to the service name. Module M4.2: According to the communication protocol type in the acquired service metadata, convert the unified standard data exchange format into the format corresponding to the communication protocol used by the service provider, and send a service call request to the Industrial Internet service provider. Module M4.3: Receive the service call response sent by the service provider. Module M4.4: Convert the service call response into a unified standard data exchange format and return it to the service caller.
[0098] The industrial Internet service system for secure cross-communication protocol calls provided by the present invention also includes: placing characteristic information of the service caller's identity in the service call request; and packaging the data of the service call request in a unified standard data exchange format. The characteristic information of the service caller's identity includes the application's unique identifier GUID, the timestamp TimeStamp, and the timestamp Encoded TimeStamp encrypted with the application's private key. The unified standard data exchange format is independent of the communication protocol, and all communication protocols use the same unified standard data exchange format; the unified standard data exchange format includes the following information: the calling domain, the name of the service to be called, and the identity information of the caller; the calling domain includes local domain calls and cross-domain calls. When the calling domain is a cross-domain call, the unified standard data exchange format also includes information on the destination domain; if a signature is required, the unified standard data exchange format also includes a signature for the data.
[0099] Specifically, in module M3 and module M4.2, after sending a service call request to the industrial Internet service provider, the industrial Internet service provider processes the service call request, and the processing modules include:
[0100] Module m1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service based on the service name.
[0101] Module m2: The industrial Internet service provider receives a service call request and retrieves the application identity information from the service call request.
[0102] Module m3: Identify the application identity according to the application identity information to confirm that the current call is a service call initiated by an application with a legal identity. If it is identified as an illegal identity, exit the system directly. Identify the application identity according to the application identity information, including: Module m3.1: The Industrial Internet Service Registration Center, the Industrial Internet Service Caller, the Industrial Internet Service Bus, and the Industrial Internet Service Provider synchronize their time to ensure the consistency of the timestamp; Module m3.2: The service caller obtains the local timestamp and encrypts the timestamp with its own private key; Module m3.3: The service caller puts the characteristic information of the service caller's identity in the service call request, including the application's unique identifier GUID, the timestamp TimeStamp, and the timestamp Encoded TimeStamp encrypted with the application's private key; Module m3.4: After receiving the service call request, the service provider obtains the local timestamp and compares the local timestamp with the timestamp in the service call request to determine whether the difference between the two exceeds the set error range. If so, directly return the error message of illegal application identity; if not, execute module m3.5. The predetermined error range is set to plus or minus one minute. Module m3.5: The service provider decrypts the encrypted timestamp with the caller's public key and compares the decrypted timestamp with the timestamp in the service call request. If the two are consistent, the information that the application identity is legal is returned; if the two are inconsistent, the error message that the application identity is illegal is returned.
[0103] Module m4: Based on the application GUID in the identified legitimate application identity and the name of the service to be called, check from the permission table whether the caller has the permission to call the service. If so, execute module m5; if not, exit the system directly.
[0104] Module m5: Determine whether the current service metadata is set to require compression, encryption, and signing. If so, decompress, decrypt, and verify whether the signature of the service call request is valid; if not, execute module m6.
[0105] Module m6: executes business logic and generates service call responses.
[0106] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0107] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. An industrial Internet service method for securely calling across communication protocols, characterized in that: include: Step S1: The industrial Internet service caller initiates a service call request and obtains the metadata of the service according to the service name; Step S2: further processing is performed according to the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, step S3 is executed; if not, step S4 is executed; Step S3: convert the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, send a service call request to the service provider, receive a service call response sent by the service provider, convert the service call response into the unified standard data exchange format, and return it to the service caller; Step S4: Send a service call request to the Industrial Internet Service Bus in accordance with a unified standard data exchange format, receive a service call response sent by the Industrial Internet Service Bus, and return it to the service caller.
2. The industrial Internet service method for securely calling cross-communication protocols according to claim 1 is characterized in that: Also includes: Put characteristic information of the service caller's identity into the service call request; The service call request data is packaged according to a unified standard data exchange format.
3. The industrial Internet service method for securely calling across communication protocols according to claim 2 is characterized in that: The characteristic information of the service caller identity includes the unique identifier GUID of the application, the timestamp TimeStamp and the timestamp Encoded TimeStamp encrypted with the private key of the application; The unified standard data exchange format has nothing to do with the communication protocol. All communication protocols use the same unified standard data exchange format. The unified standard data exchange format includes the following information: the calling domain, the name of the service to be called, and the identity information of the caller; the calling domain includes local domain calling and cross-domain calling. When the calling domain is a cross-domain calling, the unified standard data exchange format also includes the information of the destination domain; If a signature is required, the unified standard data exchange format also includes the signature on the data.
4. The industrial Internet service method for securely calling across communication protocols according to claim 1 is characterized in that: The step S4 includes the industrial Internet service bus processing the service call request and forwarding the service call request to the industrial Internet service provider. The specific steps include: Step S4.1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service according to the service name; Step S4.2: According to the communication protocol type in the obtained service metadata, the unified standard data exchange format is converted into a format corresponding to the communication protocol used by the service provider, and a service call request is sent to the industrial Internet service provider; Step S4.3: Receive a service call response sent by the service provider; Step S4.4: Convert the service call response into a unified standard data exchange format and return it to the service caller.
5. The industrial Internet service method for securely calling across communication protocols according to claim 4 is characterized in that: In step S3 and step S4.2, after sending the service call request to the industrial Internet service provider, the industrial Internet service provider processes the service call request, and the processing steps include: Step 1: Call the service discovery function of the Industrial Internet Service Registration Center to obtain the metadata of the service based on the service name; Step 2: The industrial Internet service provider receives the service call request and retrieves the application identity information from the service call request; Step 3: Identify the application identity according to the application identity information to confirm that the current call is a service call initiated by an application with a legal identity. If it is identified as an illegal identity, exit the system directly; Step 4: Based on the application GUID in the identified legitimate application identity and the name of the service to be called, check from the permission table whether the caller has the permission to call the service. If yes, execute step 5; if not, exit the system directly; Step 5: Determine whether the current service metadata is set to require compression, encryption, and signing. If so, decompress and decrypt the service call request and verify whether the signature is valid; if not, execute step 6; Step 6: Execute business logic and generate service call response.
6. The industrial Internet service method for securely calling across communication protocols according to claim 5 is characterized in that: The identifying the application identity according to the application identity information includes: Step 3.1: The Industrial Internet Service Registration Center, the Industrial Internet Service Caller, the Industrial Internet Service Bus, and the Industrial Internet Service Provider perform time synchronization to ensure the consistency of timestamps; Step 3.2: The service caller obtains the local timestamp and encrypts the timestamp with its own private key; Step 3.3: The service caller puts characteristic information of the service caller's identity in the service call request; Step 3.4: After receiving the service call request, the service provider obtains the local timestamp and compares the local timestamp with the timestamp in the service call request to determine whether the difference between the two exceeds the set error range. If so, an error message indicating that the application identity is illegal is directly returned; if not, step 3.5 is executed; Step 3.5: The service provider decrypts the encrypted timestamp with the caller's public key and compares the decrypted timestamp with the timestamp in the service call request. If the two are consistent, the information that the application identity is legal is returned; if the two are inconsistent, the error message that the application identity is illegal is returned.
7. The industrial Internet service method for securely calling across communication protocols according to claim 6 is characterized in that: The predetermined error range is set to plus or minus one minute.
8. An industrial Internet service system for secure cross-communication protocol invocation, characterized in that: include: Module M1: The industrial Internet service caller initiates a service call request and obtains the service metadata based on the service name; Module M2: further processing is performed according to the communication protocol type in the metadata of the service to determine whether the service caller and the called party use the same communication protocol. If so, module M3 is triggered; if not, module M4 is triggered; Module M3: converts the unified standard data exchange format into the format corresponding to the communication protocol used by the service caller, sends a service call request to the service provider, receives the service call response sent by the service provider, converts the service call response into the unified standard data exchange format, and returns it to the service caller; Module M4: Sends a service call request to the Industrial Internet Service Bus in accordance with a unified standard data exchange format, receives a service call response sent by the Industrial Internet Service Bus, and returns it to the service caller.
9. The industrial Internet service system for secure cross-communication protocol invocation according to claim 8, characterized in that: Also includes: Put characteristic information of the service caller's identity into the service call request; The service call request data is packaged according to a unified standard data exchange format.
10. The industrial Internet service system for secure cross-communication protocol invocation according to claim 9, characterized in that: The characteristic information of the service caller identity includes the unique identifier GUID of the application, the timestamp TimeStamp and the timestamp Encoded TimeStamp encrypted with the private key of the application; The unified standard data exchange format has nothing to do with the communication protocol. All communication protocols use the same unified standard data exchange format. The unified standard data exchange format includes the following information: the calling domain, the name of the service to be called, and the identity information of the caller; the calling domain includes local domain calling and cross-domain calling. When the calling domain is a cross-domain calling, the unified standard data exchange format also includes the information of the destination domain; If a signature is required, the unified standard data exchange format also includes the signature on the data.
Citation Information
Patent Citations
A cross-platform, cross-language high-security software service interface calling method and system
CN104506486B
A method and system for cross-protocol network transmission
CN110191052B
Service Invocation Process Information Processing Methods, Devices, and Electronic Equipment
CN111258773B
