Cross-language request service response method and device, equipment, medium and product

By using trusted third-party decryption and protocol conversion, the problem of calling services in different programming languages ​​is solved, achieving secure and efficient data transmission and ensuring the security and reliability of data transmission.

CN120935263APending Publication Date: 2025-11-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511132091.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Application services from different banking institutions using different programming languages ​​cannot be directly called, and there are data transmission security issues, especially during service calls, which are susceptible to malicious tampering and data leakage.

Method used

By using a trusted third party to decrypt and convert the data, the plaintext data is obtained and then converted into a new format according to the communication protocol conversion model. Encrypted transmission is then employed to ensure flexible access and data security between services using different programming languages.

Benefits of technology

It enables flexible calls between services in different programming languages ​​and improves the security and reliability of data transmission, preventing data leakage and tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935263A_ABST
    Figure CN120935263A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-language request service response method and device, equipment, a medium and a product. The method can be applied to the field of financial science and technology and comprises the steps of obtaining first service encryption request data; the first service request data is generated by a source request service of the service request end based on a first communication protocol; the source request service is a request service obtained by programming in a first programming language; performing decryption processing on the first service encryption request data to obtain a first service request data plaintext, and performing data analysis on the first service request data plaintext to determine a target request service; if the target request service is a request service which is transmitted based on a second communication protocol and is programmed by adopting a second programming language, performing communication protocol conversion on the first service request data plaintext to obtain conversion service request data; and calling the target request service to execute conversion of the service request data to obtain request response data, and feeding back the request response data to the service request end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology, and in particular to a cross-language request service response method, apparatus, device, medium and product. Background Technology

[0002] In the fintech field, different banking institutions may use different programming languages ​​to generate corresponding application service components based on their own business needs. For example, they might use a domestically developed programming language to implement application services for functions such as balance inquiry and transfer record. However, during the processing of service requests in banking services, there may be requests to call downstream application services. These downstream application services may use different programming languages ​​and support different communication protocols than the upstream banking services, making direct calls between application services impossible.

[0003] Therefore, how to enable flexible invocation of application services between application services of different programming languages ​​that support different communication transmission protocols, and how to ensure the security of service call request and response transmission during the service call process to avoid data leakage caused by malicious acquisition and tampering, have become urgent problems to be solved. Summary of the Invention

[0004] This invention provides a cross-language request-service response method, apparatus, device, medium, and product to enable flexible invocation between application services of different programming languages ​​that support different communication transmission protocols, while taking into account the data transmission security during the service invocation request and response process.

[0005] According to one aspect of the present invention, a cross-language request-service response method is provided, applied to a trusted third party, the method comprising:

[0006] Obtain first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service programmed using the first programming language;

[0007] The encrypted service request data is decrypted to obtain the plaintext of the first service request data, and the plaintext of the first service request data is parsed to determine the target requested service.

[0008] If the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language, then the plaintext of the first service request data is converted by the communication protocol to obtain the converted service request data;

[0009] The target request service is invoked to execute the conversion service request data, obtain request response data, and then the request response data is fed back to the service request end.

[0010] According to another aspect of the present invention, a cross-language request service response apparatus is provided, configured in a trusted third party, the apparatus comprising:

[0011] The first request data acquisition module is used to acquire first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service programmed using the first programming language;

[0012] The first data parsing module is used to decrypt the first service encrypted request data to obtain the first service request data plaintext, and to parse the first service request data plaintext to determine the target request service.

[0013] The communication protocol conversion module is used to convert the plaintext of the first service request data to obtain converted service request data if the target request service is a request service transmitted based on a second communication protocol and programmed using a second programming language.

[0014] The response data generation module is used to call the target request service to execute the conversion service request data, obtain request response data, and feed the request response data back to the service request end.

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

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the cross-language request service response method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the cross-language request service response method according to any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the cross-language request service response method described in any embodiment of the present invention.

[0021] The technical solution of this invention obtains encrypted first service request data, decrypts it to obtain plaintext first service request data, and parses the plaintext first service request data to determine the target request service. If the target request service is a request service transmitted based on a second communication protocol and programmed using a second programming language, the plaintext first service request data is converted to a communication protocol to obtain converted service request data. The target request service is then invoked to execute the converted service request data, obtaining request response data, which is then fed back to the service requesting end. This technical solution achieves flexible invocation between application services supporting different communication transmission protocols and different programming languages ​​by converting the target request service according to the protocol conversion condition during the service invocation process and invoking the service based on the converted request data. Furthermore, the use of encrypted data transmission during the request and response data transmission process improves the data transmission security during service invocation requests and responses.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of a cross-language request service response method provided according to Embodiment 1 of the present invention;

[0025] Figure 2 This is a flowchart of a cross-language request service response method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 This is a flowchart of a cross-language request service response method provided according to Embodiment 3 of the present invention;

[0027] Figure 4This is a schematic diagram of the structure of a cross-language request service response device according to Embodiment 4 of the present invention;

[0028] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the cross-language request service response method of this invention. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] Example 1

[0032] Figure 1 This is a flowchart of a cross-language request-service response method provided in Embodiment 1 of the present invention. This embodiment is applicable to cross-language service scheduling between application services in different programming languages ​​that support different communication transmission protocols. The method can be executed by a cross-language request-service response device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, this method can be applied to trusted third parties, specifically including:

[0033] S110. Obtain the first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service obtained by programming using the first programming language.

[0034] S120. Decrypt the encrypted request data of the first service to obtain the plaintext of the first service request data, and parse the plaintext of the first service request data to determine the target request service.

[0035] S130. If the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language, then the plaintext of the first service request data is converted using the communication protocol to obtain the converted service request data.

[0036] S140. Call the target request service to perform the transformation service request data, obtain the request response data, and feed the request response data back to the service request end.

[0037] In this context, the service requesting end is the requesting end, functional module, or component that has a service call requirement. For example, during the execution of banking business, when performing a transaction business query function, there may be a call to a downstream business function application service; in this case, the service requesting end is the transaction business query component. Correspondingly, the source request service is the application service that initiates the service call in the service requesting end. Continuing the example above, the source request service is the business query application service.

[0038] The first communication protocol is the data transmission communication protocol supported by the source request service, and the first communication protocol is Hypertext Transfer Protocol (HTTP). The source request service is an application service written in the first programming language. The first programming language can be a domestically produced programming language, and the application service written based on the first programming language can support service calls between the first communication protocols.

[0039] The first service request data can be a call request to a downstream application service, which can be generated by the source request service of the service requesting end. For example, when there is a business function query request to a downstream application service, the business function query request can be used as the first service request data.

[0040] The first service request data can be encrypted data obtained by encrypting the initial service request data on the requesting end. To ensure the security of the first service request data transmission, the plaintext request data can be encrypted on the requesting end to prevent malicious tampering during data transmission. The trusted third party can be an intermediary deployed in a trusted execution environment, used for protocol conversion and data transmission of the service request data. The trusted third party can consider the data processing and storage environment to be a trustworthy and secure environment.

[0041] For example, a negotiated key for encryption and decryption can be pre-stored on both the service requesting end and the trusted third party. The negotiated key is then used on the service requesting end to encrypt the first service request data, resulting in the first encrypted service request data.

[0042] A trusted third party obtains the first encrypted service request data sent by the service requesting client and decrypts it using a pre-negotiated key to obtain the plaintext first service request data. The plaintext first service request data is then parsed; specifically, the resource location, i.e., the target requested service, can be obtained by parsing the request header of the request message. The target requested service is the downstream application service that the source request service needs to invoke.

[0043] Determine whether the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language. If not, there is no need to perform communication protocol conversion, and the trusted third party can directly use the plaintext of the first service request data to call the target request service to obtain the request response data.

[0044] If the target request service is a request service transmitted using the second communication protocol and programmed using the second programming language, it indicates that the source request service cannot directly invoke the target request service. For example, a request service based on a domestically developed programming language cannot directly invoke a Remote Procedure Call (RPC) service in another programming language. Protocol conversion between the first and second communication protocols is required. The second communication protocol can be a Remote Procedure Call transport protocol, etc., and the first and second communication protocols are different. The second programming language can be a programming language other than the first programming language, and the first and second programming languages ​​are different.

[0045] Taking Hypertext Transfer Protocol (HTTP) as the first communication protocol and Remote Procedure Call (RPC) as the second communication protocol as an example, on the service request side, the first service request data is encapsulated in the format of the first communication protocol. The encapsulated data includes a request line, a request header, and a request body. The request line includes information such as the request method, resource location, and protocol version. The request header includes the request address. The request body includes information such as data type, content format, response field length, and connection status. On the service request side, the encapsulated data is used as the first service request data, encrypted, and transmitted as a binary data stream.

[0046] In a trusted third party, the received encrypted data is decrypted to obtain the plaintext of the first service request data, which is then parsed as a binary stream. Specifically, the parsing method can be line-by-line splitting, using the delimiter "\r" to divide the byte stream into three parts: the request line, request header, and request body. It should be noted that due to differences in message code generation methods among different developers during the development phase, the content format and structure of the parsed request line, request header, and request body will also differ. Therefore, a unified structured data can be generated based on the information contained in the request line, request header, and request body. According to the protocol structure standard corresponding to the second communication protocol, the structured data corresponding to the first communication protocol is deserialized into structured data corresponding to the second communication protocol format. Based on the deserialized structured data corresponding to the second communication protocol, the converted service request data is generated.

[0047] A trusted third party can encrypt the conversion service request data to obtain encrypted conversion service request data. This encrypted request data is then sent to the service response end of the target request service. The service response end decrypts the received encrypted conversion service request data to obtain the plaintext conversion service request, generates request response data based on the plaintext, encrypts the request response data, and sends it back to the service request end for decryption before sending it back to the requesting service.

[0048] It should be noted that pre-negotiated encryption and decryption keys, which can be symmetric keys, are stored in the trusted third party, the service requesting end, and the service responding end, respectively. These keys are used for encryption and decryption during data transmission to ensure data transmission security.

[0049] The technical solution of this invention obtains encrypted first service request data, decrypts it to obtain plaintext first service request data, and parses the plaintext first service request data to determine the target request service. If the target request service is a request service transmitted based on a second communication protocol and programmed using a second programming language, the plaintext first service request data is converted to a communication protocol to obtain converted service request data. The target request service is then invoked to execute the converted service request data, obtaining request response data, which is then fed back to the service requesting end. This technical solution achieves flexible invocation between application services supporting different communication transmission protocols and different programming languages ​​by converting the target request service according to the protocol conversion condition during the service invocation process and invoking the service based on the converted request data. Furthermore, the use of encrypted data transmission during the request and response data transmission process improves the data transmission security during service invocation requests and responses.

[0050] Example 2

[0051] Figure 2 This is a flowchart of a cross-language request service response method provided in Embodiment 2 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.

[0052] Furthermore, the step "converting the plaintext of the first service request data to obtain the converted service request data" is refined to "selecting a target protocol conversion model from at least one candidate protocol conversion model based on the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service; obtaining the converted service request data based on the plaintext of the first service request data and the target protocol conversion model." This improves the protocol conversion method between service call requests with different communication transmission protocols.

[0053] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments. For example... Figure 2 As shown, the method includes the following specific steps:

[0054] S210. Obtain first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service obtained by programming using the first programming language.

[0055] S220. Decrypt the encrypted request data of the first service to obtain the plaintext of the first service request data, and parse the plaintext of the first service request data to determine the target request service.

[0056] S230. If the target request service is a request service obtained by transmitting based on the second communication protocol and programming with the second programming language, then select the target protocol conversion model from at least one candidate protocol conversion model according to the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service.

[0057] S240. Based on the plaintext of the first service request data and the target protocol conversion model, obtain the converted service request data.

[0058] S250. Call the target request service to perform the transformation service request data, obtain the request response data, and feed the request response data back to the service request end.

[0059] Among them, candidate protocol conversion models are used to perform protocol conversion, and different candidate protocol conversion models convert different protocols. For example, candidate protocol conversion model A is used to convert the request message format of communication transmission protocol a to the request message format of communication transmission protocol b; candidate protocol conversion model B is used to convert the request message format of communication transmission protocol a to the request message format of communication transmission protocol c; candidate protocol conversion model C is used to convert the request message format of communication transmission protocol b to the request message format of communication transmission protocol c, and so on.

[0060] Based on the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service, a target protocol conversion model is selected from at least one candidate protocol conversion model. For example, if the first communication transmission protocol is protocol a and the second communication transmission protocol is protocol b, then the target protocol conversion model is used to convert the request message format of the first communication transmission protocol a into the request message format of the second communication transmission protocol b.

[0061] Based on the plaintext of the first service request data, and using the target protocol conversion model, the converted service request data is obtained. The plaintext of the first service request data is a request message generated based on the first communication transmission protocol, while the converted service request data is a request message converted to the format of the second communication transmission protocol.

[0062] In one optional embodiment, based on the plaintext of the first service request data and the target protocol conversion model, the converted service request data is obtained, including: parsing the plaintext of the first service request data to obtain request line information, request header information and request body information; generating structured request data based on the request line information, request header information and request body information; and inputting the structured request data into the target protocol conversion model to obtain the converted service request data output by the model.

[0063] The target protocol conversion model can be pre-trained by relevant technical personnel. This embodiment takes the training of the target protocol conversion model as an example to explain its training process in detail. The same applies to other candidate protocol conversion models, only the sample data used for model training is different and the training method is the same.

[0064] Taking the target protocol conversion model used to convert the request message format of communication transmission protocol a to the request message format of communication transmission protocol b as an example, the following steps are taken: Historical request messages of communication transmission protocol a are obtained over a historical time period, and the corresponding historical structured data is determined. The historical structured data is labeled to obtain its corresponding standard conversion request data. This standard conversion request data is the request data for converting historical request messages to the request message format of communication transmission protocol b. The historical structured data corresponding to the historical request messages and their corresponding standard conversion request data are input into a pre-built network model to obtain the predicted conversion request data output by the model. Based on the standard conversion request data and the predicted conversion request data of the historical request messages, the network model is trained to obtain the trained target protocol conversion model. The network model can be a convolutional neural network, etc.

[0065] The structured request data of the first service request plaintext data is input into the target protocol conversion model, which performs protocol conversion to obtain the converted service request data output by the model.

[0066] The above-described embodiment's technical solution parses the plaintext of the first service request data to obtain request line information, request header information, and request body information. Based on the request line information, request header information, and request body information, it generates structured request data. The structured request data is then input into the target protocol conversion model to obtain the converted service request data output by the model. This achieves accurate conversion of the communication transmission protocol of the service request data. By using the target protocol conversion model to predict the converted service request data, the protocol conversion efficiency is improved, thereby improving the request response efficiency of subsequent target request services.

[0067] This embodiment's technical solution selects a target protocol conversion model from at least one candidate protocol conversion model based on the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service. Based on the plaintext of the first service request data and the target protocol conversion model, the converted service request data is obtained. By using model prediction, the efficiency of generating the converted service request data is improved. Furthermore, the model conversion method during the conversion process improves the accuracy of the communication protocol request message conversion, thereby improving the accuracy of generating the converted service request and enabling accurate acquisition of response data from the target request service.

[0068] Example 3

[0069] Figure 3 This is a flowchart of a cross-language request service response method provided in Embodiment 3 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.

[0070] Furthermore, the step "decrypting the first service encrypted request data to obtain the first service request data plaintext, and parsing the first service request data plaintext to determine the target requested service" is refined to "decrypting the first service encrypted request data using the first session key to obtain the first service request data plaintext, the first authentication tag, and the first random number; performing tag verification on the first authentication tag to obtain the first tag verification result; and performing repeatability verification on the first random number to obtain the first random number verification result; if both the first tag verification result and the first random number verification result pass, then parsing the first service request data plaintext to determine the target requested service." This improves the encryption and decryption implementation of transmitted data.

[0071] Furthermore, the step "calling the target request service to execute the conversion service request data and obtain request response data" is refined to "encrypting the conversion service request data to obtain encrypted conversion service request data, sending the encrypted conversion service request data to the service response end of the target request service, so that the service response end can generate and feed back the encrypted service request response result based on the encrypted conversion service request data; generating request response data based on the encrypted service request response result, and feeding back the request response data to the service request end." This improves the method for generating request response data.

[0072] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments. For example... Figure 3 As shown, the method includes the following specific steps:

[0073] S310. Obtain the first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service obtained by programming using the first programming language.

[0074] S320. Use the first session key to decrypt the first service encrypted request data to obtain the first service request data plaintext, the first authentication tag, and the first random number.

[0075] S330. Perform label verification on the first authentication label to obtain the first label verification result; and perform repeatability verification on the first random number to obtain the first random number verification result.

[0076] S340. If both the first tag verification result and the first random number verification result pass, then the plaintext of the first service request data is parsed to determine the target request service.

[0077] S350. If the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language, then the plaintext of the first service request data is converted using the communication protocol to obtain the converted service request data.

[0078] S360. Encrypt the conversion service request data to obtain the conversion service encrypted request data, and send the conversion service encrypted request data to the service response end of the target request service so that the service response end can generate and feed back the service encrypted request response result based on the conversion service encrypted request data.

[0079] S370. Based on the service encryption request response result, generate request response data and send the request response data back to the service requesting end.

[0080] The first session key is obtained in advance through negotiation between the requesting server and a trusted third party, and is used for data encryption and decryption.

[0081] To further enhance data transmission security, in one optional embodiment, the first session key is generated and stored as follows:

[0082] Step a: Obtain the identity certificate, initial random number, timestamp parameters, and service requester signature sent by the service requester; the service requester signature is obtained by the service requester signing the initial random number and timestamp parameters based on its own private key; the service requester's identity certificate is generated by a trusted third party after verifying the service requester's identity information and the verification is successful.

[0083] The identity verification certificate of the service requesting client is generated by a trusted third party after verifying the client's identity information. Specifically, the service requesting client submits identity verification information, such as a device identifier, to the trusted third party. The trusted third party verifies the client's identity verification information and generates an identity verification certificate upon successful verification. This identity verification certificate may include a signature of the service requesting client's identity verification information by the trusted third party based on its own private key.

[0084] The initial random number is used to prevent replay, the timestamp parameter is used for timeliness control, and the server request signature is the result of the server request signing the initial random number and timestamp parameter based on its own private key.

[0085] Step b: Verify the identity certificate to obtain the first verification result from the service requester.

[0086] A trusted third party verifies the identity verification certificate using its own public key and obtains the first verification result.

[0087] Step c: If the first verification result is successful, the signature of the service requester is verified using the pre-stored public key of the service requester, the initial random number, and the timestamp parameters to obtain the second verification result of the service requester.

[0088] A trusted third party uses the public key, initial random number, and timestamp parameters of the service requester to verify the signature of the service requester, thus obtaining a second verification result of the service requester.

[0089] Step d: If the second verification result is successful, generate and store the first session key, and encrypt the first session key using the public key of the service requester to obtain the first encrypted session key.

[0090] Step e: Send the first encrypted session key to the service requester so that the service requester can decrypt the first encrypted session key based on its own private key to obtain the first session key and store the first session key.

[0091] The service requesting end decrypts the first encrypted session key based on its own private key to obtain the first session key, and uses the first session key to encrypt the first service request data to obtain the first encrypted service request data.

[0092] The above technical solution verifies the identity certificate by obtaining the identity certificate sent by the service requester, the initial random number, the timestamp parameter, and the signature of the service requester, thus obtaining the first verification result of the service requester. If the first verification result is successful, the signature of the service requester is verified using the pre-stored public key of the service requester, the initial random number, and the timestamp parameter, thus obtaining the second verification result of the service requester. If the second verification result is successful, a first session key is generated and stored, and the first session key is encrypted using the public key of the service requester to obtain the first encrypted session key. This improves the security and reliability of the generation of the first session key, further enhancing the security and reliability of subsequent encrypted data transmission and avoiding the possibility of data being maliciously tampered with.

[0093] A trusted third party uses the first session key to decrypt the first service request data (encrypted), obtaining the plaintext of the first service request data, the first authentication tag, and the first random number. The first random number is different from the initial random number. The trusted third party verifies whether the first random number is different from the initial random number to implement data replay protection verification. The first authentication tag is verified to confirm whether the plaintext of the first service request data has been tampered with.

[0094] If both the verification result of the first tag for the first authentication tag and the verification result of the first random number for the repeatability verification of the first random number pass, then the plaintext of the first service request data is parsed to determine the target requested service.

[0095] The above technical solution uses a first session key to decrypt the first service request data to obtain the plaintext of the first service request data, a first authentication tag, and a first random number. The first authentication tag is then verified to obtain a first tag verification result. The first random number is also verified for repeatability to obtain a first random number verification result. If both the first tag verification result and the first random number verification result pass, the plaintext of the first service request data is parsed to determine the target requested service. By using a first session key with a higher security factor for data encryption, the possibility of encrypted data being cracked is reduced, improving the security and reliability of data transmission and preventing the possibility of data leakage or malicious tampering.

[0096] The trusted third party uses a second session key to encrypt the conversion service request data, resulting in encrypted conversion service request data. The generation method of the second session key is the same as that of the first session key. Specifically, the trusted third party verifies the identity verification information of the service response client and issues an identity certificate. The second session key is then generated based on the identity certificate, random number, and timestamp sent by the service response client. This implementation will not elaborate on this further. The second session key is pre-stored in both the trusted third party and the service response client.

[0097] The service response end uses the second session key to decrypt the encrypted conversion service request data, obtaining the plaintext conversion service request data. The service response end then invokes the target request service to execute the plaintext conversion service request data, obtaining the service request response result. The service response end uses the second session key to encrypt the service request response result, obtaining the encrypted service request response result. The service response end then sends the encrypted service request response result to a trusted third party.

[0098] A trusted third party uses a second session key to decrypt the encrypted service request response, obtaining the plaintext service request response. Then, it uses the first session key to encrypt the plaintext service request response, obtaining the ciphertext service request response. The ciphertext service request response is sent to the requesting client, which uses the first session key to decrypt it, obtaining the final service request response.

[0099] The above technical solution encrypts the conversion service request data to obtain encrypted conversion service request data, and sends the encrypted conversion service request data to the service response end of the target request service. The service response end generates and feeds back the encrypted service request response result based on the encrypted conversion service request data, generates request response data based on the encrypted service request response result, and feeds back the request response data to the service request end. This achieves secure transmission of request response data to the service response end, improves data transmission reliability, avoids data leakage and malicious tampering during data transmission, and enhances the security of the service call request interaction process.

[0100] Example 4

[0101] Figure 4 This is a schematic diagram of a cross-language request service response device provided in Embodiment 4 of the present invention. The cross-language request service response device provided in this embodiment of the present invention is applicable to cross-language service scheduling between application services in different programming languages ​​supporting different communication transmission protocols. This cross-language request service response device can be implemented in hardware and / or software, such as... Figure 4 As shown, the device includes: a first request data acquisition module 401, a first data parsing module 402, a communication protocol conversion module 403, and a response data generation module 404.

[0102] in,

[0103] The first request data acquisition module 401 is used to acquire first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service programmed using the first programming language;

[0104] The first data parsing module 402 is used to decrypt the first service encrypted request data to obtain the first service request data plaintext, and to parse the first service request data plaintext to determine the target request service.

[0105] The communication protocol conversion module 403 is used to convert the plaintext of the first service request data to obtain converted service request data if the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language.

[0106] The response data generation module 404 is used to call the target request service to execute the conversion service request data, obtain request response data, and feed the request response data back to the service request end.

[0107] The technical solution of this invention obtains encrypted first service request data, decrypts it to obtain plaintext first service request data, and parses the plaintext first service request data to determine the target request service. If the target request service is a request service transmitted based on a second communication protocol and programmed using a second programming language, the plaintext first service request data is converted to a communication protocol to obtain converted service request data. The target request service is then invoked to execute the converted service request data, obtaining request response data, which is then fed back to the service requesting end. This technical solution achieves flexible invocation between application services supporting different communication transmission protocols and different programming languages ​​by converting the target request service according to the protocol conversion condition during the service invocation process and invoking the service based on the converted request data. Furthermore, the use of encrypted data transmission during the request and response data transmission process improves the data transmission security during service invocation requests and responses.

[0108] Optionally, the communication protocol conversion module 403 includes:

[0109] The target model selection unit is used to select a target protocol conversion model from at least one candidate protocol conversion model based on the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service.

[0110] The communication protocol conversion unit is used to obtain converted service request data based on the target protocol conversion model according to the plaintext of the first service request data.

[0111] Optional, a communication protocol conversion unit, specifically used for:

[0112] The plaintext of the first service request data is parsed to obtain request line information, request header information, and request body information;

[0113] Based on the request line information, the request header information, and the request body information, structured request data is generated;

[0114] The structured request data is input into the target protocol conversion model to obtain the conversion service request data output by the model.

[0115] Optionally, the first data parsing module 402 is specifically used for:

[0116] The first service request data is decrypted using the first session key to obtain the plaintext of the first service request data, the first authentication tag, and the first random number;

[0117] Perform tag verification on the first authentication tag to obtain a first tag verification result; and perform repeatability verification on the first random number to obtain a first random number verification result.

[0118] If both the first tag verification result and the first random number verification result pass, then the plaintext of the first service request data is parsed to determine the target requested service.

[0119] Optionally, the first session key is generated and stored in the following manner:

[0120] The system obtains the identity certificate, initial random number, timestamp parameter, and service requester signature sent by the service requester; the service requester signature is obtained by the service requester signing the initial random number and timestamp parameter based on its own private key; the service requester's identity certificate is generated by the trusted third party after verifying the service requester's identity information and passing the verification.

[0121] The identity verification certificate is verified to obtain the first verification result from the service requester;

[0122] If the first verification result passes, the service requester's signature is verified using the pre-stored service requester's public key, the initial random number, and the timestamp parameter to obtain the service requester's second verification result.

[0123] If the second verification result passes, a first session key is generated and stored, and the first session key is encrypted using the public key of the service requesting end to obtain a first encrypted session key;

[0124] The first encrypted session key is sent to the service requesting end, so that the service requesting end can decrypt the first encrypted session key based on its own requesting end private key to obtain the first session key and store the first session key.

[0125] Optionally, the response data generation module 404 is specifically used for:

[0126] The conversion service request data is encrypted to obtain encrypted conversion service request data. The encrypted conversion service request data is then sent to the service response end of the target request service, so that the service response end can generate and return the encrypted service request response result based on the encrypted conversion service request data.

[0127] Based on the service encryption request response result, request response data is generated and fed back to the service requesting end.

[0128] The cross-language request service response apparatus provided in this embodiment of the invention can execute the cross-language request service response method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0129] Example 5

[0130] Figure 5 A schematic diagram of an electronic device 50 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0131] like Figure 5 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52 and a random access memory (RAM) 53, communicatively connected to the at least one processor 51. The memory stores computer programs executable by the at least one processor. The processor 51 can perform various appropriate actions and processes based on the computer program stored in the ROM 52 or loaded into the RAM 53 from storage unit 58. The RAM 53 can also store various programs and data required for the operation of the electronic device 50. The processor 51, ROM 52, and RAM 53 are interconnected via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0132] Multiple components in electronic device 50 are connected to I / O interface 55, including: input unit 56, such as keyboard, mouse, etc.; output unit 57, such as various types of monitors, speakers, etc.; storage unit 58, such as disk, optical disk, etc.; and communication unit 59, such as network card, modem, wireless transceiver, etc. Communication unit 59 allows electronic device 50 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0133] Processor 51 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 51 performs the various methods and processes described above, such as cross-language request service response methods.

[0134] In some embodiments, the cross-language request-service-response method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the cross-language request-service-response method described above may be performed. Alternatively, in other embodiments, processor 51 may be configured to perform the cross-language request-service-response method by any other suitable means (e.g., by means of firmware).

[0135] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0136] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0137] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

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

[0139] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0140] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) in terms of management difficulty and weak business scalability.

[0141] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0142] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A cross-language request-service response method, characterized in that, Applied to trusted third parties, including: Obtain first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service programmed using the first programming language; The encrypted service request data is decrypted to obtain the plaintext of the first service request data, and the plaintext of the first service request data is parsed to determine the target requested service. If the target request service is a request service transmitted based on the second communication protocol and programmed using the second programming language, then the plaintext of the first service request data is converted by the communication protocol to obtain the converted service request data; The target request service is invoked to execute the conversion service request data, obtain request response data, and then the request response data is fed back to the service request end.

2. The method according to claim 1, characterized in that, The step of performing communication protocol conversion on the plaintext of the first service request data to obtain converted service request data includes: Based on the first communication protocol corresponding to the source request service and the second communication protocol corresponding to the target request service, a target protocol conversion model is selected from at least one candidate protocol conversion model; Based on the plaintext of the first service request data, and using the target protocol conversion model, the conversion service request data is obtained.

3. The method according to claim 2, characterized in that, The step of obtaining the converted service request data based on the first service request data plaintext and the target protocol conversion model includes: The plaintext of the first service request data is parsed to obtain request line information, request header information, and request body information; Based on the request line information, the request header information, and the request body information, structured request data is generated; The structured request data is input into the target protocol conversion model to obtain the conversion service request data output by the model.

4. The method according to claim 1, characterized in that, The process of decrypting the encrypted service request data to obtain the plaintext service request data, and then parsing the plaintext service request data to determine the target service request, includes: The first service request data is decrypted using the first session key to obtain the plaintext of the first service request data, the first authentication tag, and the first random number; Perform tag verification on the first authentication tag to obtain a first tag verification result; and perform repeatability verification on the first random number to obtain a first random number verification result. If both the first tag verification result and the first random number verification result pass, then the plaintext of the first service request data is parsed to determine the target requested service.

5. The method according to claim 4, characterized in that, The first session key is generated and stored in the following way: Obtain the identity certificate, initial random number, timestamp parameter, and service requester signature sent by the service requester; the service requester signature is obtained by the service requester signing the initial random number and timestamp parameter based on its own private key. The identity verification certificate of the service requester is generated by the trusted third party after verifying the identity verification information of the service requester and passing the verification. The identity verification certificate is verified to obtain the first verification result from the service requester; If the first verification result passes, the service requester's signature is verified using the pre-stored service requester's public key, the initial random number, and the timestamp parameter to obtain the service requester's second verification result. If the second verification result passes, a first session key is generated and stored, and the first session key is encrypted using the public key of the service requesting end to obtain a first encrypted session key; The first encrypted session key is sent to the service requesting end, so that the service requesting end can decrypt the first encrypted session key based on its own requesting end private key to obtain the first session key and store the first session key.

6. The method according to claim 1, characterized in that, The step of invoking the target request service to execute the transformation service request data and obtaining request response data includes: The conversion service request data is encrypted to obtain encrypted conversion service request data. The encrypted conversion service request data is then sent to the service response end of the target request service, so that the service response end can generate and return the encrypted service request response result based on the encrypted conversion service request data. Based on the service encryption request response result, request response data is generated and fed back to the service requesting end.

7. A cross-language request service response device, characterized in that, Configured on a trusted third party, including: The first request data acquisition module is used to acquire first service encrypted request data; the first service encrypted request data is obtained by encrypting the first service request data by the service requesting end; the first service request data is generated by the source request service of the service requesting end based on the first communication protocol; the source request service is a request service programmed using the first programming language; The first data parsing module is used to decrypt the first service encrypted request data to obtain the first service request data plaintext, and to parse the first service request data plaintext to determine the target request service. The communication protocol conversion module is used to convert the plaintext of the first service request data to obtain converted service request data if the target request service is a request service transmitted based on a second communication protocol and programmed using a second programming language. The response data generation module is used to call the target request service to execute the conversion service request data, obtain request response data, and feed the request response data back to the service request end.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the cross-language request service response method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the cross-language request-service response method of any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the cross-language request-service-response method according to any one of claims 1-6.