Inter-service communication method and device, electronic equipment and storage medium

By receiving and processing business requests with runtime environment identification, data communication across programming languages and runtime environments is realized, solving the problem that traditional IPC technology cannot meet the coordinated work of different programming languages and runtime environments.

CN120448151APending Publication Date: 2025-08-08DINGDAO ZHILIAN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510317627.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Traditional IPC technology cannot meet the needs of collaborative work between different programming languages and different runtime environments.

Method used

By receiving the runtime environment identifier in the first service request, selecting the adapted data processing method, the first service data is processed, including decryption and format conversion, ensuring communication across the runtime environment.

Benefits of technology

It realizes seamless collaborative work between different programming languages and runtime environments, solving the cross-environment communication bottleneck of traditional IPC technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448151A_ABST
    Figure CN120448151A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an inter-service communication method and device, electronic equipment and a storage medium, relates to the field of computer communication, and can solve the problem that the traditional IPC technology cannot meet the cooperative work among different programming languages and different runtime environments. The method is applied to a second service, and comprises the following steps: receiving a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; based on a first service runtime environment identifier in the first service request, selecting a data processing mode matched with the first service runtime environment identifier; and processing the first business data based on the data processing mode. The present invention can be used for inter-service communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer communications, and in particular to a method, device, electronic equipment and storage medium for inter-service communication. Background Art

[0002] Currently, inter-process communication (IPC) technology is relatively mature for communication between processes or threads within the same runtime environment. However, communication between processes in different runtime environments (such as Java, Python, JavaScript, etc.) faces a major bottleneck.

[0003] For example, the Chromium project uses Mojom technology for inter-process communication. Mojom is an Interface Definition Language (IDL) that works with the Mojo IPC framework to enable efficient communication between different processes. Key features of Mojom technology include: structured asynchronous communication through interface definitions; inter-process communication within the same runtime environment; and support for flexible communication across multiple programming languages and runtime environments.

[0004] However, with the rapid evolution of operating systems, their complexity has also increased. Traditional IPC technology can no longer meet the requirements for collaboration between different programming languages and runtime environments. Therefore, how to support efficient communication between different programming languages and runtime environments is a pressing issue. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, device, electronic device and storage medium for inter-service communication, which can solve the problem that traditional IPC technology cannot meet the collaborative work problem between different programming languages and different runtime environments.

[0006] In a first aspect, an embodiment of the present invention provides a method for communication between services, which is applied to a second service, and the method includes: receiving a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; based on the first service runtime environment identifier in the first service request, selecting a data processing method that is compatible with the first service runtime environment identifier; and processing the first service data based on the data processing method.

[0007] In one embodiment, the first business data is encrypted business data; the first business runtime environment identifier is the programming language type of the first business; wherein, the data processing method adapted to the first business runtime environment identifier based on the first business runtime environment identifier in the first business request is selected, including: based on the programming language type of the first business, a decryption method adapted to the programming language type of the first business is selected; the processing of the first business data based on the data processing method includes: decrypting the first business data based on the decryption method adapted to the programming language type of the first business to obtain the decrypted first business data.

[0008] In one embodiment, after decrypting the first service data to obtain the decrypted first service data, the method further includes: The data format of the decrypted first service data is converted into the data format of the runtime environment where the second service is located.

[0009] In one embodiment, the first service request further includes an interface call attribute, wherein the interface call attribute includes interface call action information; after converting the data format of the decrypted first service data into the data format of the runtime environment where the second service is located, the method further includes: Execute a corresponding interface calling action on the decrypted first service data according to the interface calling action information.

[0010] In one embodiment, the receiving of the first business request sent by the first business includes: receiving the first business request sent by the first business through an embedded simulation proxy module; the selecting of a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier in the first business request includes: selecting a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier through an embedded dynamic adaptation layer; the converting of the data format of the decrypted first business data into the data format of the runtime environment where the second business is located includes: converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located through an embedded data conversion layer.

[0011] In a second aspect, an embodiment of the present invention provides a method for communication between services, including: receiving a first service request sent by a first service; the first service request carries a first service runtime environment identifier; based on the first service runtime environment identifier in the first service request, selecting a data processing method that is compatible with the first service runtime environment identifier; converting the data format of the first service data into the data format of the runtime environment where the second service is located; sending the first service data after data format conversion to the second service; wherein the second service and the first service are in different runtime environments.

[0012] In one embodiment, the first business request carries a first business runtime environment identifier and encrypted first business data; wherein, converting the data format of the first business data into the data format of the runtime environment where the second business is located includes: based on the first business runtime environment identifier in the first business request, selecting a decryption method that is compatible with the first business runtime environment identifier; based on the decryption method, decrypting the first business data to obtain decrypted first business data; and converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0013] In one embodiment, the data processing method that is compatible with the first business runtime environment identifier in the first business request is selected, including: sending the first business runtime environment identifier to a dynamic adaptation layer, and the dynamic adaptation layer selecting a data decryption method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier.

[0014] In one embodiment, converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located includes: sending the decrypted first business data to a data conversion layer, and the data conversion layer converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0015] In the third aspect, an embodiment of the present invention also provides an inter-service communication device, including: a receiving unit for receiving a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; an adaptation unit for selecting a data processing method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier in the first service request; and a conversion unit for processing the first service data based on the data processing method.

[0016] In one embodiment, the adaptation unit is specifically used to: based on the programming language type of the first business, select a decryption method that is compatible with the programming language type of the first business; the conversion unit is specifically used to: based on the decryption method that is compatible with the programming language type of the first business, decrypt the first business data to obtain decrypted first business data.

[0017] In one embodiment, the conversion unit is further specifically configured to convert the data format of the decrypted first service data into a data format of a runtime environment where the second service exists.

[0018] In one embodiment, the device further includes: an interface calling unit, configured to execute a corresponding interface calling action on the decrypted first service data according to the interface calling action information.

[0019] In one embodiment, the adaptation unit is further specifically used to: select, through an embedded dynamic adaptation layer, a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier; the conversion unit is further specifically used to: convert, through an embedded data conversion layer, the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0020] In one embodiment, the conversion unit is further used to: convert the data format of the first business data into the data format of the runtime environment where the second business is located; the device also includes: a sending unit, used to send the first business data after data format conversion to the second business; wherein, the second business and the first business are in different runtime environments.

[0021] In one embodiment, the adaptation unit is further specifically configured to send the first service runtime environment identifier to a dynamic adaptation layer, and the dynamic adaptation layer selects a data decryption method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier.

[0022] In one embodiment, the conversion unit is further specifically configured to send the decrypted first business data to a data conversion layer, and the data conversion layer converts the data format of the decrypted first business data into a data format of a runtime environment where the second business resides.

[0023] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store computer-readable instructions; the processor is used to read the computer-readable instructions and implement the communication method provided by any embodiment of the present invention.

[0024] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the communication method provided by any embodiment of the present invention.

[0025] The inter-service communication method, device, electronic device, and storage medium provided by the embodiments of the present invention are capable of receiving a first service request sent by a first service, and based on the first service runtime environment identifier in the first service request, selecting a data processing method that is compatible with the first service runtime environment identifier to process the first service data. In the case where the first service and the second service are in different runtime environments, the second service processes the first service data by selecting a data processing method that is compatible with the first service runtime environment identifier. In this way, by selecting a method that is compatible with the runtime environment identifier of the sending end to process the data, communication across runtime environments is achieved, which can solve the problem that traditional IPC technology cannot meet the collaborative work between different programming languages and different runtime environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 A flow chart of a method for inter-service communication provided by an embodiment of the present invention; Figure 2 A schematic diagram of sending information for a first service provided by an embodiment of the present invention; Figure 3 Another flow chart of the inter-service communication method provided by an embodiment of the present invention; Figure 4 A schematic structural diagram of an inter-service communication device provided by an embodiment of the present invention; Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0029] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0030] In a first aspect, an embodiment of the present invention provides an inter-service communication method that can solve the problem that traditional IPC technology cannot meet the collaborative work problem between different programming languages and different runtime environments.

[0031] like Figure 1 As shown, an embodiment of the present invention provides a method for communication between services, which is applied to a second service and includes: S11, receiving a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data.

[0032] In this step, the second business receives the first business request sent by the first business. The first business may refer to a functional module written in a certain programming language, such as Java. The second business may refer to a functional module written in a programming language different from the first business, such as Python. The second business needs to receive data sent by the first business, so the second business can adopt a server mode. Since the second business and the first business are in different runtime environments, different languages have different data formats and type systems, which makes cross-language communication more complicated. Specifically, the first business sends a business request to the second business, which includes the first business runtime environment identifier and the first business data. The data requested by the first business may be a folder object, a picture object, and so on. The embodiment of the present invention does not limit this.

[0033] For example, a first service written in Python sends a request to a second service written in Node.js. The request includes the data to be sent and the name of the interface or function to be called. Figure 2 This example shows the data in the first business request sent for the first business. Parameter 1 is "message," with a value of "Hello from Python!"; parameter 2 is "value," with a value of 123; the pre-invoked interface type is 'interface-node', and the interface name is 'node-interface-a'.

[0034] In specific operations, the communication between the first service and the second service may involve a communication protocol. The first service request information sent by the first service may be in plain text or encrypted. The second service Node.js server receives the first service request information sent by the first service.

[0035] S12: Based on the first service runtime environment identifier in the first service request, select a data processing method that is compatible with the first service runtime environment identifier.

[0036] In this step, the second service selects a suitable data processing method based on the runtime environment identifier in the first service request. In different runtime environments, such as Java, Node.js, and Python, the environment characteristics are dynamically adapted to generate a data processing method adapted to the environment.

[0037] Specifically, when the second business receives the first business request information sent by the first business, it can determine the language used for programming through the first business runtime environment identifier carried in its business request information; it can also specify the programming language used by the first business based on the communication between programs. Since the runtime environments corresponding to specific programming languages are different, when the first business request of the first business is received, the characteristics of the programming language used by the first business can be used to process the business request. In this way, the request information of the first business can be converted into the request information of the second business runtime environment. That is to say, in this step, after receiving the request of the first business, the second business converts the first business request according to the runtime environment identifier in the first business request information to form a request suitable for the runtime environment of the second business itself.

[0038] For example, a second service receives a file from a first service using Java and needs to process the file. Upon receiving the service request from the first service, the second service can obtain the first service's runtime environment identifier from the service request. Based on the characteristics of the Java runtime environment, the second service can determine that the file uses the built-in Unicode encoding. This allows the second service to select a data processing method that is compatible with the Java runtime environment based on the first service's runtime environment identifier.

[0039] It should be noted that regarding the step of selecting a data processing method compatible with the first service runtime environment identifier in the first service request, in actual services, the first service runtime environment can have multiple runtime environments. Furthermore, the first service runtime environment can also be pre-defined. In this way, when a new first service request arrives, the second service can implement inter-service communication functions under different runtime environments based on the runtime environment, data, and related interfaces of the first service.

[0040] S13: Process the first business data based on the data processing method.

[0041] Specifically, the first business data is processed according to the data processing method adapted to different runtime environments, thereby achieving flexible cross-environment communication and ensuring seamless collaboration of multiple environments.

[0042] For example, the second service is a C language program that receives a file from the first service, which is Java. The second service needs to process the file. Based on the characteristics of the Java runtime environment, the second service uses built-in Unicode encoding for the file. In this way, when processing the file, the second service can use Unicode encoding to parse the file and convert it into the file encoding of the first service, such as ASCII code, for processing. If the processed result needs to be sent to the first service, the second service C language converts the file into Unicode encoding based on the runtime environment characteristics of the first service and sends it to the first service.

[0043] Another example is converting JSON format data from a Java environment to a format supported by a Python environment.

[0044] The inter-service communication method provided by an embodiment of the present invention can receive a first service request sent by a first service, and based on the first service runtime environment identifier in the first service request, select a data processing method that is compatible with the first service runtime environment identifier to process the first service data. In the case where the first service and the second service are in different runtime environments, the second service processes the first service data by selecting a data processing method that is compatible with the first service runtime environment identifier. In this way, by selecting a method that is compatible with the runtime environment identifier of the sending end to process the data, communication across runtime environments is achieved, which can solve the problem that traditional IPC technology cannot meet the collaborative work problems between different programming languages and different runtime environments.

[0045] In one embodiment of the present invention, the first business data is encrypted business data; the first business runtime environment identifier is the programming language type of the first business; and step S12 includes: based on the programming language type of the first business, selecting a decryption method that is compatible with the programming language type of the first business.

[0046] Correspondingly, the processing of the first business data based on the data processing method includes: decrypting the first business data based on a decryption method adapted to the programming language type of the first business to obtain the decrypted first business data.

[0047] Specifically, in this embodiment, the first service data may be encrypted service data, and the first service runtime environment identifier is the programming language type of the first service.

[0048] At this time, in step S12, based on the first business runtime environment identifier in the first business request, a data processing method that is compatible with the first business runtime environment identifier is selected, including: based on the programming language type of the first business, a decryption method that is compatible with the programming language type of the first business is selected.

[0049] In step S13, the first business data is processed based on the data processing method, including: decrypting the first business data based on a decryption method adapted to the programming language type of the first business to obtain decrypted first business data.

[0050] For example, to protect data from tampering or theft, the first service encrypts all data transmitted between runtime environments using encryption algorithms such as symmetric encryption (AES), asymmetric encryption (RSA), and message authentication code (HMAC) to ensure data security. After receiving the first service request from the first service, the second service decrypts the first service data based on the programming language type and corresponding decryption method of the first service to obtain the decrypted first service data.

[0051] In another embodiment, after decrypting the first business data to obtain the decrypted first business data, the method further includes: converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0052] In one embodiment, the first business request also includes an interface call attribute, and the interface call attribute includes interface call action information; after converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located, the method also includes: executing a corresponding interface call action on the decrypted first business data according to the interface call action information.

[0053] In this embodiment, the first service request includes not only data but also the interface attributes of the second service to be called. In a specific implementation, after decrypting the data format of the first service data and performing other data processing, the second service also calls the local interface, uses the converted data as interface parameters, and executes the corresponding interface call action.

[0054] In one embodiment, the receiving of the first business request sent by the first business includes: receiving the first business request sent by the first business through an embedded simulation proxy module; selecting a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier in the first business request includes: selecting a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier through an embedded dynamic adaptation layer; converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located includes: converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located through an embedded data conversion layer.

[0055] In this embodiment, the second service is provided with a simulation proxy module responsible for receiving the first service request sent by the first service. In step S12, the embedded dynamic adaptation layer selects a data processing method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier. In step S13, the embedded data conversion layer converts the decrypted first service data into the data format of the runtime environment of the second service.

[0056] The inter-service communication method provided by an embodiment of the present invention can receive a first service request sent by a first service, and based on the first service runtime environment identifier in the first service request, select a data processing method that is compatible with the first service runtime environment identifier to process the first service data. In the case where the first service and the second service are in different runtime environments, the second service processes the first service data by selecting a data processing method that is compatible with the first service runtime environment identifier. In this way, by selecting a method that is compatible with the runtime environment identifier of the sending end to process the data, communication across runtime environments is achieved, which can solve the problem that traditional IPC technology cannot meet the collaborative work problems between different programming languages and different runtime environments.

[0057] In a second aspect, an embodiment of the present invention provides an inter-service communication method that can solve the problem that traditional IPC technology cannot meet the collaborative work problem between different programming languages and different runtime environments.

[0058] like Figure 3 As shown, an embodiment of the present invention provides a method for inter-service communication, including: S21, receiving a first service request sent by a first service; the first service request carries a first service runtime environment identifier; S22: Based on the first service runtime environment identifier in the first service request, select a data processing method that is compatible with the first service runtime environment identifier; S23, converting the data format of the first service data into the data format of the runtime environment where the second service is located; S24, sending the first service data after data format conversion to the second service; wherein the second service and the first service are in different runtime environments.

[0059] In step S22, a data processing method that is compatible with the first business runtime environment identifier is selected, which also includes: dynamically generating a communication protocol according to the characteristics of the runtime environment to ensure smooth communication between different environments.

[0060] In this embodiment, the same procedures as in the previous embodiment are not repeated. The method provided in this embodiment acts as a third party, independent of the subject of the second service. In an embodiment related to this method, a first service request sent by a first service is received, and the converted first service data is sent to the second service.

[0061] In one embodiment, the first business request carries a first business runtime environment identifier and encrypted first business data; wherein, converting the data format of the first business data into the data format of the runtime environment where the second business is located includes: based on the first business runtime environment identifier in the first business request, selecting a decryption method that is compatible with the first business runtime environment identifier; based on the decryption method, decrypting the first business data to obtain decrypted first business data; and converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0062] In one embodiment, the data processing method that is compatible with the first business runtime environment identifier in the first business request is selected, including: sending the first business runtime environment identifier to a dynamic adaptation layer, and the dynamic adaptation layer selecting a data decryption method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier.

[0063] In one embodiment, converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located includes: sending the decrypted first business data to a data conversion layer, and the data conversion layer converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0064] The inter-service communication method provided by an embodiment of the present invention can receive a first service request sent by a first service, and based on the first service runtime environment identifier in the first service request, select a data processing method that is compatible with the first service runtime environment identifier to process the first service data. In the case where the first service and the second service are in different runtime environments, the second service processes the first service data by selecting a data processing method that is compatible with the first service runtime environment identifier. In this way, by selecting a method that is compatible with the runtime environment identifier of the sending end to process the data, communication across runtime environments is achieved, which can solve the problem that traditional IPC technology cannot meet the collaborative work problems between different programming languages and different runtime environments.

[0065] In a third aspect, an embodiment of the present invention provides an inter-service communication device that can solve the problem that traditional IPC technology cannot meet the collaborative work problem between different programming languages and different runtime environments.

[0066] like Figure 4 As shown, the inter-service communication device according to an embodiment of the present invention includes: A receiving unit 51 is configured to receive a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; An adaptation unit 52, configured to select, based on the first service runtime environment identifier in the first service request, a data processing mode adapted to the first service runtime environment identifier; The conversion unit 53 is configured to process the first service data based on the data processing method.

[0067] In one embodiment, the adaptation unit 52 is specifically used to: based on the programming language type of the first business, select a decryption method that is compatible with the programming language type of the first business; the conversion unit 53 is specifically used to: based on the decryption method that is compatible with the programming language type of the first business, decrypt the first business data to obtain decrypted first business data.

[0068] In one embodiment, the conversion unit 53 is further specifically configured to convert the data format of the decrypted first service data into the data format of the runtime environment where the second service exists.

[0069] In one embodiment, the device further includes: an interface calling unit, configured to execute a corresponding interface calling action on the decrypted first service data according to the interface calling action information.

[0070] In one embodiment, the adaptation unit 52 is further specifically used to: select, through an embedded dynamic adaptation layer, a data processing method that is compatible with the first business runtime environment identifier based on the first business runtime environment identifier; the conversion unit 53 is further specifically used to: convert, through an embedded data conversion layer, the data format of the decrypted first business data into the data format of the runtime environment where the second business is located.

[0071] In one embodiment, the conversion unit 53 is also used to: convert the data format of the first business data into the data format of the runtime environment where the second business is located; the device also includes: a sending unit, used to send the first business data after data format conversion to the second business; wherein, the second business and the first business are in different runtime environments.

[0072] In one embodiment, the adaptation unit 52 is further specifically configured to send the first service runtime environment identifier to a dynamic adaptation layer, and the dynamic adaptation layer selects a data decryption method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier.

[0073] In one embodiment, the conversion unit 53 is further specifically configured to send the decrypted first business data to a data conversion layer, and the data conversion layer converts the data format of the decrypted first business data into a data format of a runtime environment where the second business resides.

[0074] The inter-service communication device provided by an embodiment of the present invention is capable of receiving a first service request sent by a first service, and based on the first service runtime environment identifier in the first service request, selecting a data processing method that is compatible with the first service runtime environment identifier to process the first service data. In the case where the first service and the second service are in different runtime environments, the second service processes the first service data by selecting a data processing method that is compatible with the first service runtime environment identifier. In this way, by selecting a method that is compatible with the runtime environment identifier of the sending end to process the data, communication across runtime environments is achieved, which can solve the problem that traditional IPC technology cannot meet the collaborative work between different programming languages and different runtime environments.

[0075] In a fourth aspect, an embodiment of the present invention provides an electronic device that can solve the problem that traditional IPC technology cannot meet the collaborative work problem between different programming languages and different runtime environments.

[0076] like Figure 5 As shown, the electronic device provided by an embodiment of the present invention may include: a shell 61, a processor 62, a memory 63, a circuit board 64 and a power supply circuit 65, wherein the circuit board 64 is placed inside the space enclosed by the shell 61, and the processor 62 and the memory 63 are set on the circuit board 64; the power supply circuit 65 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 63 is used to store executable program code; the processor 62 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 63, so as to execute the inter-service communication method provided by any of the aforementioned embodiments.

[0077] The specific execution process of the above steps by the processor 62 and the steps further executed by the processor 62 by running the executable program code can be found in the description of the above embodiment and will not be repeated here.

[0078] In the fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement any one of the inter-service communication methods provided in the aforementioned embodiments, thereby also achieving the corresponding technical effects. This has been described in detail above and will not be repeated here.

[0079] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0080] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0081] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0082] For the convenience of description, the above device is described as being divided into various units / modules based on their functions. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or more than two software and / or hardware.

[0083] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0084] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

[0085] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for inter-service communication, characterized in that: The method is applied to the second service, and the method includes: Receive a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; Selecting, based on the first service runtime environment identifier in the first service request, a data processing method that is compatible with the first service runtime environment identifier; The first business data is processed based on the data processing method.

2. The communication method according to claim 1, wherein: The first business data is encrypted business data; the first business runtime environment identifier is a programming language type of the first business; The selecting, based on the first service runtime environment identifier in the first service request, a data processing method that is compatible with the first service runtime environment identifier, includes: selecting, based on the programming language type of the first service, a decryption method that is compatible with the programming language type of the first service; The processing of the first business data based on the data processing method includes: decrypting the first business data based on a decryption method adapted to a programming language type of the first business to obtain decrypted first business data.

3. The communication method according to claim 2, wherein: After decrypting the first service data to obtain the decrypted first service data, the method further includes: The data format of the decrypted first service data is converted into the data format of the runtime environment where the second service is located.

4. The communication method according to claim 3, wherein: The first service request further includes an interface call attribute, and the interface call attribute includes interface call action information; After converting the data format of the decrypted first service data into the data format of the runtime environment where the second service is located, the method further includes: Execute a corresponding interface calling action on the decrypted first service data according to the interface calling action information.

5. The communication method according to claim 3, wherein: The receiving the first service request sent by the first service includes: receiving the first service request sent by the first service through the embedded simulation proxy module; The selecting, based on the first service runtime environment identifier in the first service request, a data processing method that is compatible with the first service runtime environment identifier, includes: selecting, through an embedded dynamic adaptation layer, a data processing method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier; The converting of the data format of the decrypted first business data into the data format of the runtime environment where the second business is located includes: converting the data format of the decrypted first business data into the data format of the runtime environment where the second business is located through an embedded data conversion layer.

6. A method for communication between services, characterized in that: include: receiving a first service request sent by a first service; The first service request carries a first service runtime environment identifier; Selecting, based on the first service runtime environment identifier in the first service request, a data processing method that is compatible with the first service runtime environment identifier; Converting the data format of the first service data into the data format of the runtime environment where the second service is located; The first service data after data format conversion is sent to the second service; wherein the second service and the first service are in different runtime environments.

7. The method according to claim 6, characterized in that The first service request carries a first service runtime environment identifier and encrypted first service data; The step of converting the data format of the first service data into the data format of the runtime environment where the second service is located includes: Selecting, based on the first service runtime environment identifier in the first service request, a decryption method that is compatible with the first service runtime environment identifier; Decrypting the first service data based on the decryption method to obtain decrypted first service data; The data format of the decrypted first service data is converted into the data format of the runtime environment where the second service is located.

8. The communication method according to claim 7, wherein: The selecting, based on the first service runtime environment identifier in the first service request, a data processing method that is compatible with the first service runtime environment identifier includes: The first service runtime environment identifier is sent to the dynamic adaptation layer, and the dynamic adaptation layer selects a data decryption method that is compatible with the first service runtime environment identifier based on the first service runtime environment identifier.

9. The communication method according to claim 7, wherein: The converting the data format of the decrypted first service data into the data format of the runtime environment where the second service is located includes: The decrypted first service data is sent to the data conversion layer, and the data conversion layer converts the data format of the decrypted first service data into the data format of the runtime environment where the second service is located.

10. An inter-service communication device, characterized in that: include: A receiving unit, configured to receive a first service request sent by a first service; wherein the first service and the second service are in different runtime environments, and the first service request carries a first service runtime environment identifier and first service data; an adaptation unit, configured to select, based on the first service runtime environment identifier in the first service request, a data processing mode adapted to the first service runtime environment identifier; A conversion unit is used to process the first business data based on the data processing method.