Service implementation method and device based on heterogeneous service framework, equipment and medium

By accessing probes on the application side and configuring the data plane addresses of heterogeneous service frameworks, code segments are dynamically scanned and injected, solving the problem of difficult integration and management of heterogeneous service frameworks in microservice architecture, achieving fully automated unified governance, and improving the reliability and integration of the system.

CN115904543BActive Publication Date: 2026-05-15JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-12-26
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In a microservice architecture, the integration of multiple heterogeneous service frameworks presents management difficulties, affects the efficiency of inter-system collaboration, and existing technical solutions increase the workload of operation and maintenance or introduce new fault nodes.

Method used

By integrating probes on the application side and configuring the data plane address of heterogeneous service frameworks in the startup script, the system dynamically scans and injects specified code segments to achieve unified governance of service registration, discovery, invocation, routing, and flow control, avoiding intrusion on application developers. It also inserts dynamic enhancement logic into the call chain for protocol and serialization conversion.

Benefits of technology

It enables automated and unified management of multiple service frameworks without changing the infrastructure and application code, improving the reliability and integration of heterogeneous service frameworks, and reducing the operational burden and potential failure risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115904543B_ABST
    Figure CN115904543B_ABST
Patent Text Reader

Abstract

The present disclosure provides a service implementation method and device based on a heterogeneous service framework, equipment and medium, wherein the application service implementation method based on the heterogeneous service framework comprises: accessing a probe on an application side, and adding a configuration file of the probe in a start script on the application side, the configuration file being pre-provided with an address of an application service of a data plane of the heterogeneous service framework, and the probe performing data interaction with the data plane based on the address of the application service. Through the embodiments of the present disclosure, the underlying code logic of the registration, discovery, calling, routing, flow control and the like of a plurality of service providers and consumers can be dynamically modified and reset to a unified implementation architecture, thereby achieving unified management of the heterogeneous service framework in a fully automated manner without invasion of the application development party, without introducing any new potential fault nodes, and improving the reliability and fusion of the heterogeneous service framework.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of application service technology, and more specifically, to a service implementation method, apparatus, device, and medium based on a heterogeneous service framework. Background Technology

[0002] Currently, software architecture patterns have evolved from monolithic architecture and SOA architecture to microservice architecture. With the continuous expansion of the mobile internet, the development of DevOps theories such as agile development and continuous delivery, and the maturity of container technology, microservice architecture has become the main direction for the modernization of future applications. Microservice architecture decomposes complex and bloated monolithic applications into fine-grained services. Each decomposed service is independently packaged and deployed, and developed and maintained by small teams, greatly improving the efficiency of application delivery and enabling more precise planning of system capacity, thus reducing overall costs. In microservices, each service is isolated; the failure of a single service will not cause the entire system to crash, thus greatly improving the reliability of the software system.

[0003] With the rise of microservice architecture, numerous excellent microservice frameworks have emerged in the market, such as Spring Boot, Spring Cloud, and Micronaut. Domestically, frameworks like Dubbo, Motan, SofaStack, and ServiceComb have also appeared, along with customized frameworks like Spring Cloud for Alibaba and Spring Cloud for Tencent. In a microservice architecture, network communication between services can utilize various protocols, such as Layer 4 TCP (Transmission Control Protocol) / UDP (User Datagram Protocol), or Layer 7 HTTP (Hypertext Transfer Protocol) / HTTPS (Hypertext Transfer Protocol Secure), or proprietary protocols based on either. To reduce the amount of data transmitted over the network, minimize bandwidth consumption, and shorten transmission time, data is compressed using various serialization methods during communication, such as common JSON serialization, Java object serialization, and Protobuf serialization.

[0004] However, the proliferation of microservice frameworks presents challenges for enterprises in technology selection and unified management, and also affects the efficiency of inter-system integration and collaboration.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this disclosure is to provide a service implementation method, apparatus, device, and medium based on a heterogeneous service framework, which can at least to some extent overcome the problem of poor microservice integration caused by the limitations and defects of related technologies.

[0007] According to a first aspect of the present disclosure, an application service implementation method based on a heterogeneous service framework is provided, comprising: accessing a probe on the application side, and adding a configuration file of the probe to the startup script on the application side, wherein the configuration file is preset with the address of the application service of the data plane of the heterogeneous service framework, and the probe interacting with the data plane based on the address of the application service.

[0008] In one exemplary embodiment of this disclosure, the method further includes: loading the probe in response to a startup command from the application side; triggering the probe to dynamically scan the implementation class of the application side; and embedding a specified code segment of the probe into the implementation class based on the result of the dynamic scan, wherein the specified code segment, when executed, can achieve at least one of obtaining the request address of the service of the registry center, sending a request, and parsing the response result.

[0009] In one exemplary embodiment of this disclosure, the method further includes: determining a framework and implementation method for identifying scanning classes that the probe can intercept; updating the configuration file in response to adding or deleting operations of the framework and / or the implementation method; and pulling the updated configuration file through the probe.

[0010] In one exemplary embodiment of this disclosure, the method further includes: intercepting registration information for an application service through the probe, the registration information including at least one of the application service name, service content information, address information, port information, timestamp, and registration center identifier; parsing the registration address to obtain the address of the application service; and registering the address of the application service to the control plane of the heterogeneous service framework.

[0011] In one exemplary embodiment of this disclosure, the method further includes: after the consumer of the application service accesses the probe, intercepting the method call sent by the consumer through the probe; inserting dynamically enhanced code logic at a first specified position in the original code of the method call, wherein the first specified position includes at least one of a method entry point, a method exit point, and an exception point; and feeding back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0012] In one exemplary embodiment of this disclosure, the method further includes: after the application service provider accesses the probe, intercepting method calls sent by the provider through the probe; inserting dynamically enhanced code logic at a second specified location in the original code of the method call, the second specified location including at least one of a method entry point, a method exit point, and an exception point; and feeding back configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0013] In one exemplary embodiment of this disclosure, the method further includes: after both the calling side and the server side of the heterogeneous service framework are connected to the probe, intercepting the protocol from the calling side to the server side through the probe; inserting dynamically enhanced code logic at a third specified position in the original code of the intercepted protocol, the third specified position including at least one of a method entry point, a method exit point, and an exception point; and feeding back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0014] In one exemplary embodiment of this disclosure, the method further includes: intercepting serialization methods on the call chain of the heterogeneous service framework using the probe, wherein the serialization methods on the call side of the heterogeneous service framework and the serialization methods on the server side of the heterogeneous service framework are reversible processes; inserting dynamically enhanced code logic at a fourth specified position of the original code that intercepts the serialization method, wherein the fourth specified position includes at least one of a method entry point, a method exit point, and an exception point; and feeding back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0015] According to a second aspect of the present disclosure, an application service implementation apparatus based on a heterogeneous service framework is provided, comprising: an access module configured to access a probe on the application side and add a configuration file of the probe to a startup script on the application side, wherein the configuration file presets the address of the application service of the data plane of the heterogeneous service framework, and the probe interacts with the data plane based on the address of the application service.

[0016] According to a third aspect of this disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to perform the method as described in any of the preceding methods based on instructions stored in the memory.

[0017] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a program stored thereon that, when executed by a processor, implements the application service implementation method based on a heterogeneous service framework as described in any of the preceding claims.

[0018] In this embodiment, by accessing a probe on the application side and adding a configuration file for the probe to the application's startup script, the configuration file pre-sets the address of the application service of the data plane of the heterogeneous service framework. The probe interacts with the data plane based on the address of the application service, which can dynamically modify the underlying code logic of multiple service providers and consumers' registration, discovery, invocation, routing, flow control, and other actions, resetting them to a unified implementation architecture. This achieves fully automated unified governance of the heterogeneous service framework without intruding on the application developer, and does not introduce any new potential fault nodes, thus improving the reliability and integration of the heterogeneous service framework.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0021] Figure 1 A schematic diagram of an exemplary system architecture for a development scheme that can apply business indicator data from embodiments of the present invention is shown.

[0022] Figure 2 This is a flowchart of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0023] Figure 3 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0024] Figure 4 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0025] Figure 5 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0026] Figure 6 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0027] Figure 7 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0028] Figure 8 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0029] Figure 9 This is a flowchart of another application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0030] Figure 10 This is a schematic diagram of the registration process of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0031] Figure 11 This is a schematic diagram related to the service consumer side of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0032] Figure 12 This is a schematic diagram related to the service provider of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0033] Figure 13 This is a schematic diagram of protocol processing in an application service implementation method based on a heterogeneous service framework according to an exemplary embodiment of this disclosure;

[0034] Figure 14 This is a schematic diagram of serialization processing of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0035] Figure 15 This is a schematic diagram of probe invocation in an application service implementation method based on a heterogeneous service framework according to an exemplary embodiment of this disclosure;

[0036] Figure 16 This is a schematic diagram of the architecture of an application service implementation scheme based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0037] Figure 17 This is a block diagram of an application service implementation device based on a heterogeneous service framework in an exemplary embodiment of this disclosure;

[0038] Figure 18 This is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0039] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0040] Furthermore, the accompanying drawings are merely illustrative of this disclosure, and the same reference numerals in the drawings denote the same or similar parts, thus repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0041] Figure 1 A schematic diagram of an exemplary system architecture for a development scheme that can apply business indicator data from embodiments of the present invention is shown.

[0042] like Figure 1 As shown, system architecture 100 may include one or more of terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0043] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, and servers. For example, server 105 could be a server cluster composed of multiple servers.

[0044] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Terminal devices 101, 102, and 103 can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers, etc.

[0045] In some embodiments, the method for developing business indicator data provided in this invention is generally executed by server 105, and correspondingly, the device for developing business indicator data is generally located in server 105 (or terminal devices 101, 102, 103). In other embodiments, some terminals may have functions similar to those of the server device to execute this method.

[0046] Among related technologies, various microservice frameworks have their own advantages and characteristics, but they must solve two fundamental problems:

[0047] 1. Service Registration and Discovery: Service providers need a way to allow service consumers to discover their services. This is typically achieved through a service registry. Service providers register their services with the registry, and service consumers query the registry to obtain the service address. In heterogeneous service framework scenarios, the registries of multiple heterogeneous frameworks need to synchronize data and convert formats to discover service provider lists from other frameworks.

[0048] 2. Service Communication and Flow Control: After a service consumer discovers a provider, it needs to initiate communication calls. In many cases, it is necessary to control the communication traffic, such as through rate limiting and circuit breaking. In heterogeneous service framework scenarios, service calls from different frameworks may fail to communicate due to differences in communication protocols and serialization methods. Therefore, some form of service conversion or translation is required.

[0049] Some of the technical approaches proposed to solve the integration of heterogeneous service frameworks have some drawbacks:

[0050] 1. Centralized service conversion via a unified gateway: Taking two service frameworks A and B as an example, framework A registers its services that need to be accessed by framework B to a third-party unified gateway. Framework B's microservices access the gateway, and service conversion between the two frameworks is implemented at the gateway. The unified gateway acts as a bridge between the two frameworks and can perform unified traffic control. However, this approach requires manually maintaining the mapping between all service providers and service consumers, increasing the workload of operation and maintenance, increasing the performance overhead for the caller, and the gateway becomes a new potential failure node in the entire system.

[0051] 2. Distributed service conversion achieved by intercepting messages through a service mesh (or proxy): Using two service frameworks A and B as an example, framework A has a service provider 'a', and framework B has a service consumer 'b'. When 'b' calls 'a', the message initiated by 'b' is intercepted by the service mesh (or proxy), converted into the format of framework A, and then 'b's proxy continues the call to 'a', thus enabling communication between the two. This method requires synchronizing the registry data of frameworks A and B, necessitating modifications to the registry centers of all service frameworks, and carries the risk of lower communication efficiency and increased latency due to message interception.

[0052] To address the aforementioned technical problems, this application proposes an application service implementation scheme based on a heterogeneous service framework. The exemplary implementation method of this disclosure will be described in detail below with reference to the accompanying drawings.

[0053] Figure 2 This is a flowchart of an application service implementation method based on a heterogeneous service framework in an exemplary embodiment of this disclosure.

[0054] refer to Figure 2 Application service implementation methods based on heterogeneous service frameworks may include:

[0055] Step S202: Access the probe on the application side and add the probe's configuration file to the application side's startup script. The configuration file is preset with the address of the application service of the data plane of the heterogeneous service framework. The probe interacts with the data plane based on the address of the application service.

[0056] In this embodiment, by accessing a probe on the application side and adding a configuration file for the probe to the application's startup script, the configuration file pre-sets the address of the application service of the data plane of the heterogeneous service framework. The probe interacts with the data plane based on the address of the application service, which can dynamically modify the underlying code logic of multiple service providers and consumers' registration, discovery, invocation, routing, flow control, and other actions, resetting them to a unified implementation architecture. This achieves fully automated unified governance of the heterogeneous service framework without intruding on the application developer, and does not introduce any new potential fault nodes, thus improving the reliability and integration of the heterogeneous service framework.

[0057] Specifically, this disclosure, based on bytecode enhancement technology, introduces a unified governance probe into the application process. The probe is loaded at process startup, dynamically modifying the underlying code logic of multiple service providers and consumers for registration, discovery, invocation, routing, and flow control, thus merging multiple service frameworks into a unified framework. Enterprises using multiple service frameworks can achieve seamless invocation between frameworks and unified flow control management, such as rate limiting, circuit breaking, and load balancing, without modifying infrastructure (e.g., registry centers, load balancers, circuit breakers) or application code.

[0058] The technical solution disclosed herein starts from the business application itself and implements code enhancement logic based on the unified governance probe of the host in the business process. It does not require the addition of an external proxy layer, and aggregates complex logic processing and configuration in the unified governance probe, reducing the overhead and maintenance burden of the proxy layer.

[0059] The following section details each step of the application service implementation method based on a heterogeneous service framework.

[0060] In one exemplary embodiment of this disclosure, such as Figure 3 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0061] Step S302: In response to the startup command from the application side, load the probe.

[0062] Step S304: Trigger the probe to dynamically scan the implementation class on the application side.

[0063] Step S306: Based on the results of the dynamic scan, a specified code segment of the probe is implanted into the implementation class. When the specified code segment is executed, it can achieve at least one of obtaining the request address of the service of the registry center, sending a request, and parsing the response result.

[0064] In the above embodiments, such as Figure 10 As shown, application A1002 connects to the unified governance probe 1004. A startup configuration item for the probe is added to the application-side startup script. The probe runs within the application process and has the same lifecycle as the application process. The unified governance probe 1004 includes a registry center interceptor, dynamic registry center enhancements, and multiple registry center adapters, such as... Figure 10 The examples shown include Adapter A, Adapter B, ... Adapter N, but are not limited to these.

[0065] In addition, a unified governance data plane service address is added to the configuration file of the unified governance probe 1004. This is used for the probe to interact with the unified governance data plane of the unified governance backend system 1008. The unified governance control plane will send the corresponding policies to the unified governance data plane to periodically pull configuration items and report registration information. At the same time, it will dynamically obtain service call governance information and report logs to the message cluster for subsequent data processing.

[0066] When an application that accesses the unified governance probe starts its process, it will load the probe program first and dynamically scan the application's implementation classes. Here, "class" is a term in software engineering, referring to the collection of methods inside an application that carry out specific business logic implementations.

[0067] Furthermore, after the probe program runs, it scans the set of these methods and dynamically enhances the code of these original business methods based on the set and predefined judgment logic rules. It dynamically injects probe code fragments to change the execution logic of the original methods. The subsequent entire running logic is based on the added method body to execute additional runtime rules to achieve flexible control, including obtaining the real service request address of the registration center 1006 and sending requests, parsing response results, etc. According to the probe's predefined interception logic, it identifies the application's technical framework, key implementation classes and methods, intercepts the original methods and performs dynamic code enhancement, achieving the effect of changing the execution logic of the original code at runtime. This is also a key factor in enabling heterogeneous framework inter-call and unified governance.

[0068] In addition, the scope of frameworks and the list of methods that the probe can intercept can be maintained and updated in the unified governance data plane. All scanned classes and methods can be dynamically added and deleted. Updates are obtained by the probe periodically pulling the configuration. The scope of classes and methods to be scanned is configured in the background control plane to provide the matching basis for the probe at runtime.

[0069] In one exemplary embodiment of this disclosure, such as Figure 4 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0070] Step S402: Determine the framework and implementation method of the scan classes that the probe can intercept.

[0071] Step S404: In response to the addition or deletion operation of the framework and / or the implementation method, update the configuration file.

[0072] Step S406: Pull the updated configuration file through the probe.

[0073] In the above embodiments, based on the above embodiments, the probe and the application being governed run together and can dynamically pull configurations from the control plane at regular intervals. Therefore, after the attribute configuration is made on the control plane, the probe can obtain the latest configuration rules in a timely and dynamic manner, instead of obtaining a one-time configuration through static files, which improves the flexibility of controlling application services.

[0074] In one exemplary embodiment of this disclosure, such as Figure 5 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0075] Step S502: The probe intercepts registration information for the application service, which includes at least one of the following: application service name, service content information, address information, port information, timestamp, and registration center identifier.

[0076] Step S504: Parse the registration address to obtain the address of the application service.

[0077] Step S506: Register the address of the application service to the control plane of the heterogeneous service framework.

[0078] In the above embodiments, the unified governance probe, based on the heterogeneous service framework, does not require changes to the original application's registry center and service discovery code logic. The probe takes over the implementation of service registration and discovery capabilities. The unified governance backend system is responsible for maintaining the list of supported registry centers and type identification identifiers. The probe is responsible for the identification and code enhancement of the registry centers, integrating the interaction information of the registry centers into unified registration information and pushing it to the unified governance data plane. The unified registration information elements include, but are not limited to, application name, service information, address information, port information, timestamp, and registry center identifier.

[0079] In one exemplary embodiment of this disclosure, such as Figure 6 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0080] Step S602: After the consumer of the application service accesses the probe, the probe intercepts the method calls sent by the consumer.

[0081] Step S604: Insert dynamically enhanced code logic at a first specified location in the original code of the method call, wherein the first specified location includes at least one of a method entry point, a method exit point, and an exception point.

[0082] Step S606: The configuration 5 information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

[0083] In the above embodiments, Figure 10Based on the above, the Provider (i.e., the consumer of the application service, referred to as service consumer 1208) service-related processing is as follows: Figure 12 As shown, after the service consumer 1208 accesses the probe, it needs to construct a request for heterogeneous services and parse the service caller.

[0084] The returned result is that the unified governance probe 1204 identifies and intercepts the method calls issued by the service consumer 12080. The unified governance probe 1204 performs dynamic interception based on the original method of the service provider 1202, and inserts dynamically enhanced code logic at the key locations of the original code - the method entry point, the exit point and the exception point.

[0085] The final carrier of program execution is the method. A method consists of four parts: input parameters, output parameters, method body, and runtime exceptions. The method body, in execution order, can be further divided into entry point, execution body, exit point, and exception handling. While dynamically modifying and enhancing code, the unified governance probe 1204 needs to avoid interfering with the original method's internal execution logic as much as possible. Therefore, the optimal enhancement points are the method's entry and exit points, which are the best locations for interception. Simultaneously, the possibility of method errors should be considered.

[0086] Exceptions occur during runtime, so it is necessary to pay attention to method exceptions, intercept exception information, and ensure the robustness of the software system.

[0087] Specifically, the unified governance data plane of the unified governance backend system 1206 is responsible for managing the list of all supported frameworks and identification strategies, and feeding back the information to the probes through the configured interfaces. For service governance aspects, such as circuit breaking, degradation, and load balancing, framework interception provides enhanced adaptation.

[0088] Then decide whether to actually send it to service provider 1202. This corresponds to rule 5 of the code enhancement logic mentioned above; only the enhanced code can change the execution path of the original method.

[0089] Implement dynamic manipulation methods.

[0090] Furthermore, by embedding enhanced code snippets containing the ideal path for method execution, the rules governing what execution should be performed for different method types can be managed through a unified governance control plane.

[0091] In this controlled manner, the runtime logic of the method can be externally controlled. For example, there is 0 enhanced code logic at the method entry point. When the method runs, after sending a request to the backend control plane to obtain the execution rules suitable for this method, the entry enhanced method has the priority to execute and can determine the execution path of subsequent methods. At the same time, the entire call process also needs to be converted into a protocol that the caller can recognize through protocol processing, and serialization and deserialization conversion are performed to assemble it into a data format that the service provider 1202 can parse. Finally, it can reach the service consumer 1208 through the data transmission channel.

[0092] In one exemplary embodiment of this disclosure, such as Figure 7 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0093] Step S702: After the application service provider accesses the probe, the method call sent by the provider is intercepted through the probe.

[0094] Step S704: Insert dynamically enhanced code logic at a second specified location in the original code of the method call, wherein the second specified location includes at least one of the method entry point, method exit point, and exception point.

[0095] Step S706: The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

[0096] In the above embodiments, Figure 10 Based on the above, the relevant logical services of the application service provider (hereinafter referred to as service provider 1102) are as follows: Figure 11 As shown, after service provider 1102 connects to unified governance probe 1104, it needs to respond to requests from heterogeneous services. During this process, unified governance probe 1104 identifies and intercepts service method calls, dynamically intercepting them based on the original methods and inserting dynamically enhanced code logic at three key points in the original code: method entry, exit, and exception. Service provider 1102 can be implemented based on various frameworks. The unified governance data plane of unified governance backend system 1106 is responsible for managing the list of all supported frameworks and identification strategies, and feeding them back to unified governance probe 1104 through the configured interface. After framework interception and adaptation, the data needs to be converted into a protocol that the caller can recognize, undergoing serialization and deserialization, and assembled into a data format that the caller can parse. Finally, it reaches service caller 1108 through the communication data transmission channel.

[0097] In one exemplary embodiment of this disclosure, such as Figure 8 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0098] Step S802: After both the calling side and the server side of the heterogeneous service framework are connected to the probe, the protocol from the calling side to the server side is intercepted through the probe.

[0099] Step S804: Insert dynamically enhanced code logic at a third specified location in the original code of the intercepted protocol. The third specified location includes at least one of a method entry point, a method exit point, and an exception point.

[0100] Step S806: The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

[0101] In the above embodiments, such as Figure 13 As shown, the protocol-related processing 1302 after both the service consumer and the service provider have accessed the probe includes: the protocol conversion from the caller's request to the server is identified by the probe and the method call for protocol processing is intercepted; dynamic interception is performed on the basis of the original method, and dynamically enhanced code logic is inserted for key positions in the original code, such as the three key points of method entry, exit and exception; the unified governance data plane of the unified governance backend system 1304 is responsible for managing the list of all supported protocols and identification strategies, and feeding back to the probe through the configured interface.

[0102] Specifically, the probe identifies the heterogeneous protocols of application A and dynamically converts the identified heterogeneous protocols, i.e., protocol A to standard, protocol B to standard, ... protocol N to standard, etc. Furthermore, through sequence number and communication processing, the converted protocol continues to be dynamically converted in reverse, i.e. standard to protocol A, standard to protocol B, ... standard to protocol N, etc. Finally, it is sent to application B for post-processing.

[0103] In one exemplary embodiment of this disclosure, such as Figure 9 As shown, the application service implementation method based on the heterogeneous service framework also includes:

[0104] Step S902: On the call chain of the heterogeneous service framework, the serialization method is intercepted by the probe. The serialization method on the call side of the heterogeneous service framework and the serialization method on the server side of the heterogeneous service framework are reversible processes.

[0105] Step S904: Insert dynamically enhanced code logic at a fourth specified position of the original code of the intercepted serialization method. The fourth specified position includes at least one of a method entry point, a method exit point, and an exception point.

[0106] Step S906: The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

[0107] In the above embodiments, such as Figure 14 As shown, the serialization-related processing 1402 includes the following steps: In the call chain between the heterogeneous service provider and the heterogeneous service consumer, the serialization methods used by both parties differ due to the selected technology framework. For example, the calling end uses MsgPack serialization, while the server uses Hessian serialization. This process needs to be taken over by probe-enhanced code and dynamically converted and adapted. For each serialization method and the key location of the scanned original code (which can be selected as the method entry, exit, and exception three key points), it can be obtained from the unified governance data plane of the unified governance backend system 1404 and inserted into the specified location according to the probe's predetermined dynamic code logic.

[0108] Specifically, the serialization type of the caller is identified and converted, i.e., serialization A is converted to the target, serialization B to the target, and so on, until serialization N is converted to the target. Then, deserialization is performed through communication processing, i.e., deserialization A is converted to the target, deserialization B to the target, and so on, until deserialization N is converted to the target. Finally, the data is handed over to the provider for post-processing. Serialization and deserialization are inverse processes with similar execution logic, ultimately assembling the data into a format understandable to the other party and handing it over to the data transmission channel to complete data exchange.

[0109] Based on the above embodiments, such as Figure 15 As shown, application A1502, which is a heterogeneous service, acts as the service consumer, and application B1504 acts as the service provider. The two parties can call each other and perform unified governance through the enhanced code logic of the unified governance probe. This enables the generation of service lists, addressing and routing, health checks, protocol conversion, serialization, encoding, decoding, deserialization, and TCP communication, but is not limited to these functions.

[0110] In embodiments of this disclosure, such as Figure 16 As shown, the unified governance probe access application implements unified governance 1600 for heterogeneous frameworks. Starting from the business application itself, it implements code enhancement logic based on the unified governance probe hosted in the business process. This eliminates the need for an external proxy layer, aggregating complex logic processing and configuration within the unified governance probe, reducing the overhead and operational burden of the proxy layer. The specific implementation method is as follows:

[0111] 1. Both application process A and application process B are connected to the unified governance probe. The probe's startup configuration item is added to the application-side startup script. The probe runs in the application process and has the same lifecycle as the application process.

[0112] 2. Add a unified governance data plane service address to the unified governance probe configuration file. This allows the probe to interact with the unified governance data plane. By calling interception and configuration retrieval, it can periodically retrieve configuration items and report registration information. Specifically, it intercepts the registration service to obtain the registration information of the original registration center of application A and the original registration center of application B. At the same time, it dynamically obtains service call governance information and reports the logs to the message cluster for subsequent data processing. The message cluster subscribes to the data distribution system and computing components to realize the writing of intermediate data.

[0113] 3. When an application connected to the unified governance probe starts, the probe program is loaded first and dynamically scans the application's implementation classes. An implementation class, a term in software engineering, refers to the collection of methods within an application that implement specific business logic. After the probe program runs, it scans this collection of methods and dynamically enhances the code of these original business methods based on the collection and predefined judgment logic rules. It dynamically injects probe code fragments to change the execution logic of the original methods. The subsequent runtime logic is based on the added method body to execute additional runtime rules to achieve flexible control, including obtaining the request address of the real service in the registry center, sending requests, and parsing response results. By identifying the application's technical framework, key implementation classes, and methods according to the probe's predefined interception logic, intercepting the original methods, and dynamically enhancing the code, the runtime execution logic of the original code is changed. This is a key factor enabling this invention to achieve inter-framework calls and unified governance.

[0114] 4. The scope of the framework and the list of methods that the probe can intercept can be maintained and updated on the unified governance data plane. The unified governance data plane sends JOBs (tasks) to the scheduled batch processing program, sends metadata information to the database, receives SC (SC commands are powerful DOS commands in XP systems that can communicate with the "service controller" and installed devices) calls from the data distribution system, and sends HTTP calls from the computing component. The data distribution system sends link data to NoSQL, and the computing component sends indicator data to the time-series database. Since all scan classes and methods can be dynamically added and deleted, updates can be obtained by the probe periodically pulling configurations. The scope of classes and methods to be scanned is configured in the unified governance control plane in the background, which provides the matching basis for the probe at runtime. The probe runs together with the application being governed and can dynamically pull configurations from the control plane periodically. Therefore, after the attributes are configured on the control plane, the probe can obtain the latest configuration rules dynamically and in a timely manner, rather than obtaining a one-time configuration through static files, which mainly reflects the purpose of flexible control.

[0115] The purpose of intercepting the registration service is to obtain the address information of the original service registration, which is only stored in the original service's registry center. After the registration service is intercepted, the address of the original service is parsed and registered with the control plane of this invention for unified governance of heterogeneous services, enabling heterogeneous services to obtain each other's addresses, which is the foundation for heterogeneous service communication. Call interception refers to changing the execution rules of the original calling method. The unified governance probe enhances the bytecode by injecting new code snippets into the original calling method, changing the original method execution logic and routing the original call to the backend real service specified by the probe.

[0116] Corresponding to the above method embodiments, this disclosure also provides an application service implementation apparatus based on a heterogeneous service framework, which can be used to execute the above method embodiments.

[0117] Figure 17 This is a block diagram of an application service implementation device based on a heterogeneous service framework in an exemplary embodiment of this disclosure.

[0118] refer to Figure 17 The application service implementation device 1700 based on the heterogeneous service framework may include:

[0119] Access module 1702 is configured to access probes on the application side and add configuration files for the probes to the startup script on the application side. The configuration files contain the addresses of the application services of the data plane of the heterogeneous service framework. The probes interact with the data plane based on the addresses of the application services.

[0120] In an exemplary embodiment of this disclosure, the access module 1702 is further configured to: load the probe in response to the startup command of the application side; trigger the probe to dynamically scan the implementation class of the application side; and implant a specified code segment of the probe into the implementation class based on the result of the dynamic scan, wherein when the specified code segment is executed, it can achieve at least one of obtaining the request address of the service of the registration center, sending a request, and parsing the response result.

[0121] In one exemplary embodiment of this disclosure, the access module 1702 is further configured to: determine the framework and implementation method of the scanning class that the probe can intercept; update the configuration file in response to the addition or deletion operation of the framework and / or the implementation method; and pull the updated configuration file through the probe.

[0122] In one exemplary embodiment of this disclosure, the access module 1702 is further configured to: intercept registration information for the application service through the probe, the registration information including at least one of the application service name, service content information, address information, port information, timestamp, and registration center identifier; parse the registration address to obtain the address of the application service; and register the address of the application service to the control plane of the heterogeneous service framework.

[0123] In an exemplary embodiment of this disclosure, the access module 1702 is further configured to: after the consumer of the application service accesses the probe, intercept the method call sent by the consumer through the probe; insert dynamically enhanced code logic at a first specified position in the original code of the method call, wherein the first specified position includes at least one of a method entry point, a method exit point, and an exception point; and feed back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0124] In an exemplary embodiment of this disclosure, the access module 1702 is further configured to: after the application service provider accesses the probe, intercept method calls sent by the provider through the probe; insert dynamically enhanced code logic at a second specified position in the original code of the method call, the second specified position including at least one of a method entry point, a method exit point, and an exception point; and feed back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0125] In an exemplary embodiment of this disclosure, the access module 1702 is further configured to: after both the caller side and the server side of the heterogeneous service framework access the probe, intercept the protocol from the caller side to the server side through the probe; insert dynamically enhanced code logic at a third specified position in the original code of the intercepted protocol, the third specified position including at least one of method entry, method exit and exception point; and feed back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0126] In an exemplary embodiment of this disclosure, the access module 1702 is further configured to: intercept serialization methods on the call chain of the heterogeneous service framework through the probe, wherein the serialization method on the call side of the heterogeneous service framework and the serialization method on the server side of the heterogeneous service framework are reversible processes; insert dynamically enhanced code logic at a fourth specified position of the original code that intercepts the serialization method, wherein the fourth specified position includes at least one of a method entry point, a method exit point, and an exception point; and feed back the configuration information corresponding to the dynamically enhanced code logic to the probe through the data plane.

[0127] Since the functions of the device 1700 have been described in detail in their respective method embodiments, they will not be repeated here.

[0128] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0129] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0130] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”

[0131] The following reference Figure 18 To describe an electronic device 1800 according to this embodiment of the present invention. Figure 18 The electronic device 1800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0132] like Figure 18 As shown, the electronic device 1800 is manifested in the form of a general-purpose computing device. The components of the electronic device 1800 may include, but are not limited to: at least one processing unit 1810, at least one storage unit 1820, and a bus 1830 connecting different system components (including storage unit 1820 and processing unit 1810).

[0133] The storage unit stores program code that can be executed by the processing unit 1810, causing the processing unit 1810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 1810 can perform the method shown in the embodiments of this disclosure.

[0134] Storage unit 1820 may include readable media in the form of volatile storage units, such as random access memory (RAM) 18201 and / or cache memory 18202, and may further include read-only memory (ROM) 18203.

[0135] Storage unit 1820 may also include a program / utility 18204 having a set (at least one) of program modules 18205, such program modules 18205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0136] Bus 1830 can represent one or more of several types of bus structures, including memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processing unit, or local bus using any of the various bus structures.

[0137] Electronic device 1800 can also communicate with one or more external devices 1840 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1800, and / or any device that enables electronic device 1800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1850. Furthermore, electronic device 1800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1860. As shown, network adapter 1860 communicates with other modules of electronic device 1800 via bus 1830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0139] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.

[0140] The program product for implementing the above-described method according to embodiments of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0141] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0142] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0143] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0144] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0145] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0146] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and concept of this disclosure are indicated by the claims.

Claims

1. A method for implementing application services based on a heterogeneous service framework, characterized in that, include: Access the probe on the application side, and add the probe's configuration file to the application side's startup script, including: In response to the application-side startup command, the probe is loaded; The probe is triggered to dynamically scan the implementation class on the application side; Based on the results of the dynamic scan, a specified code segment of the probe is implanted into the implementation class. When the specified code segment is executed, it can achieve at least one of obtaining the request address of the service in the registry center, sending a request, and parsing the response result. Determine the framework and implementation method for the scan classes that the probe can intercept; In response to the addition or deletion operations of the framework and / or the implementation method, the configuration file is updated; The updated configuration file is retrieved using the probe. The configuration file contains the addresses of the application services of the data plane of the heterogeneous service framework, and the probe interacts with the data plane based on the addresses of the application services.

2. The application service implementation method based on a heterogeneous service framework as described in claim 1, characterized in that, Also includes: The probe intercepts registration information for application services, including at least one of the following: application service name, service content information, address information, port information, timestamp, and registration center identifier. Parse the registration address to obtain the address of the application service; Register the address of the application service to the control plane of the heterogeneous service framework.

3. The application service implementation method based on a heterogeneous service framework as described in claim 1, characterized in that, Also includes: After the consumer of the application service accesses the probe, the probe intercepts the method calls sent by the consumer. Dynamically enhanced code logic is inserted at a first specified location in the original code of the method call, where the first specified location includes at least one of the method entry point, method exit point, and exception point. The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

4. The application service implementation method based on a heterogeneous service framework as described in claim 1, characterized in that, Also includes: After the application service provider accesses the probe, the probe intercepts method calls sent by the provider. Dynamically enhanced code logic is inserted at a second specified location in the original code of the method call, where the second specified location includes at least one of the method entry point, method exit point, and exception point. The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

5. The application service implementation method based on a heterogeneous service framework as described in claim 1, characterized in that, Also includes: After both the calling side and the server side of the heterogeneous service framework are connected to the probe, the protocol from the calling side to the server is intercepted through the probe; Dynamically enhanced code logic is inserted at a third specified location in the original code that intercepts the protocol. The third specified location includes at least one of a method entry point, a method exit point, and an exception point. The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

6. The application service implementation method based on a heterogeneous service framework as described in claim 1, characterized in that, Also includes: On the call chain of the heterogeneous service framework, the serialization method of the caller side of the heterogeneous service framework and the serialization method of the server side of the heterogeneous service framework are reversible processes by the probe interception of the serialization method. Dynamically enhanced code logic is inserted at a fourth specified position in the original code of the intercepted serialization method. The fourth specified position includes at least one of the method entry point, method exit point, and exception point. The configuration information corresponding to the dynamically enhanced code logic is fed back to the probe through the data plane.

7. An application service implementation device based on a heterogeneous service framework, characterized in that, include: The access module is configured to access the probe on the application side and add the probe's configuration file to the application-side startup script, including: In response to the application-side startup command, the probe is loaded; The probe is triggered to dynamically scan the implementation class on the application side; Based on the results of the dynamic scan, a specified code segment of the probe is implanted into the implementation class. When the specified code segment is executed, it can achieve at least one of obtaining the request address of the service in the registry center, sending a request, and parsing the response result. Determine the framework and implementation method for the scan classes that the probe can intercept; In response to the addition or deletion operations of the framework and / or the implementation method, the configuration file is updated; The updated configuration file is retrieved using the probe. The configuration file contains the addresses of the application services of the data plane of the heterogeneous service framework, and the probe interacts with the data plane based on the addresses of the application services.

8. An electronic device, characterized in that, include: Memory; as well as A processor coupled to the memory, the processor being configured to execute the application service implementation method based on any one of claims 1-6, according to instructions stored in the memory.

9. A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the application service implementation method based on a heterogeneous service framework as described in any one of claims 1-6.