A method and system for microservice transparent calling

Through the encapsulation and transmissibility of the existing system, multiple microservice modules are split, which solves the access and substitution of existing business services in the process of microserviceization, and realizes gradual microservice conversion, reducing engineering difficulty and improving development efficiency.

CN114327928BActive Publication Date: 2025-08-22SI-TECH INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111387216.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2025-08-22
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

In the process of microservice evolution, there is a problem that existing business services that cannot be split at one time cannot be accessed through unified application names, and it cannot be gradually replaced by the subsequent microservice evolution of business.

Method used

By encapsulating the existing system, the encapsulated existing system is accessed through the transmissible method using the service combination microservices. The service name and inlet and exit parameters remain unchanged. The existing system splits out multiple microservice modules according to the caller's request and connects them to the business service orchestration module to provide services.

Benefits of technology

It has achieved step-by-step service splitting and integration in the process of microservices, solved the problem of gradual replacement of existing business services, reduced the difficulty of engineering and improved development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327928B_ABST
    Figure CN114327928B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for transparent calling of microservices, which belongs to the field of computer technology. The method of the present invention includes: encapsulating the stock system; after the business combination microservice accesses the service of the encapsulated stock system in a transparent manner, the service name and input and output parameters of the business combination microservice are connected through the caller; after the caller connects to the service name and input and output parameters of the business combination microservice, the stock system is split into multiple microservice modules according to the request business of the caller; the microservice module is called to serve the request business of the caller. The present invention solves the problem that the stock business services that cannot be split into services at one time during the microservice evolution process can be accessed through a unified application name, and solves the problem that the stock services can be gradually replaced in the subsequent business microservice evolution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly, to a method and system for microservice transparent calling. Background Art

[0002] With the widespread adoption of microservices architectures and the growth of development models based on cloud-native architectural approaches, loosely coupled, independently deployable smaller components or services are becoming a trend that can be leveraged by enterprise development frameworks and agile iteration. While the principles and methods for microservices decomposition are relatively clear, it's a gradual evolutionary process that must be considered based on various factors, including existing systems, business scope, and development cycles. Enterprises have defined the underlying encapsulation approach for their microservices architectures, requiring them to transform existing application architectures like HSF and ESB into a Spring Cloud-based microservices model. Summary of the Invention

[0003] The purpose of the present invention is to solve the problem that existing business services that cannot be split into services at one time during the microservice evolution process can be accessed through a unified application name, and to solve the problem that existing services can be gradually replaced in the subsequent business microservice evolution. A method for microservice transparent calling is proposed, including:

[0004] Encapsulate the stock system;

[0005] After the business composition microservice accesses the encapsulated stock system service in a transparent manner, the service name and input and output parameters of the business composition microservice are connected through the caller;

[0006] After the caller connects to the service name and input and output parameters of the business combination microservice, the stock system splits into multiple microservice modules according to the caller's request business;

[0007] The microservice module is called to serve the request business of the caller.

[0008] Optionally, the method further includes: docking the microservice module to a business service orchestration module, where the business service orchestration module is used to provide services to the caller.

[0009] Optionally, encapsulate the existing system, including:

[0010] Encapsulate the RemoteServiceConfig class of the existing system, and read and load the application and service name list in the remoteservice.properties configuration file into the memory of the existing system;

[0011] For the IFamilyRemoteServiceCoSvc interface of the existing system and

[0012] Encapsulate the FamilyRemoteServiceCoSvc implementation class;

[0013] Check the configuration information of the FamilyRemoteServiceCoSvc class of the existing system, verify the service validity and call the remote interface encapsulation action.

[0014] Optionally, the service name and input and output parameters are also used by the business composition microservice to transparently access the services of the encapsulated stock system.

[0015] Optionally, after the business composition microservice accesses the encapsulated stock system service in transparent mode, the service name and input and output parameters remain unchanged.

[0016] The present invention also proposes a system for microservice transparent calling, comprising:

[0017] Encapsulation unit, encapsulates the stock system;

[0018] The docking unit, after the business composition microservice accesses the service of the encapsulated stock system in a transparent transmission mode, docks the service name and input and output parameters of the business composition microservice through the caller;

[0019] A splitting unit, after the caller connects to the service name and input and output parameters of the business combination microservice, the existing system splits into multiple microservice modules according to the caller's request business;

[0020] The service unit calls the microservice module to serve the request business of the caller.

[0021] Optionally, the service unit is further used to: connect the microservice module to the business service orchestration module, and the business service orchestration module is used to provide services to the caller.

[0022] Optionally, encapsulate the existing system, including:

[0023] Encapsulate the RemoteServiceConfig class of the existing system, and read and load the application and service name list in the configuration file remoteservice.properties into the memory of the existing system;

[0024] For the IFamilyRemoteServiceCoSvc interface of the existing system and

[0025] Encapsulate the FamilyRemoteServiceCoSvc implementation class;

[0026] Check the configuration information of the FamilyRemoteServiceCoSvc class of the existing system, verify the service validity and call the remote interface encapsulation action.

[0027] Optionally, the service name and input and output parameters are also used by the business composition microservice to transparently access the services of the encapsulated stock system.

[0028] Optionally, after the business composition microservice accesses the encapsulated stock system service in transparent mode, the service name and input and output parameters remain unchanged.

[0029] The present invention solves the problem that existing business services that cannot be split into services at one time during the microservice evolution process can be accessed through a unified application name, and solves the problem that existing services can be gradually replaced in the subsequent business microservice evolution. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flow chart of the method of the present invention;

[0031] Figure 2 Schematic diagram of the method of the present invention;

[0032] Figure 3 A diagram showing the decomposition of the inventory system in the method of the present invention;

[0033] Figure 4 It is a structural diagram of the system of the present invention. DETAILED DESCRIPTION

[0034] Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments shown in the accompanying drawings is not intended to limit the present invention. In the accompanying drawings, identical elements are denoted by the same reference numerals.

[0035] Unless otherwise specified, the terms used herein (including technical terms) have the meanings commonly understood by those skilled in the art. In addition, it is understood that terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.

[0036] The present invention proposes a method for transparent calling of microservices, such as Figure 1 Shown, including:

[0037] Encapsulate the stock system;

[0038] After the business composition microservice accesses the encapsulated stock system service in a transparent manner, the service name and input and output parameters of the business composition microservice are connected through the caller;

[0039] After the caller connects to the service name and input and output parameters of the business combination microservice, the stock system splits into multiple microservice modules according to the caller's request business;

[0040] The microservice module is called to serve the request business of the caller.

[0041] The microservice module is connected to the business service orchestration module, which is used to provide services to the caller.

[0042] The packaging of the existing system includes:

[0043] Encapsulate the RemoteServiceConfig class of the existing system, and read and load the application and service name list in the configuration file remoteservice.properties into the memory of the existing system;

[0044] For the IFamilyRemoteServiceCoSvc interface of the existing system and

[0045] Encapsulate the FamilyRemoteServiceCoSvc implementation class;

[0046] Check the configuration information of the FamilyRemoteServiceCoSvc class of the existing system, verify the service validity and call the remote interface encapsulation action.

[0047] Among them, the service name and input and output parameters are also used by the business combination microservice to access the services of the encapsulated stock system in a transparent manner.

[0048] Among them, after the business combination microservice accesses the encapsulated stock system service in a transparent manner, the service name and input and output parameters remain unchanged.

[0049] The principle of the present invention is as follows Figure 2 As shown, the business composition microservice is a collection of services provided to the caller, which can also be called the service orchestration layer. Here, the service provided by the existing system is regarded as a microservice. The business composition microservice accesses the existing system service through transparent transmission without changing its service name and input and output parameters. This ensures that the caller can connect to the application name and service name in the early stage of microservice construction. As microservice modules are continuously split from the existing system according to the business, the calling method is not perceived.

[0050] The existing system has been continuously evolved to split into more independently deployable microservice modules, and then these microservice modules are connected to the business service orchestration module, achieving the ultimate microservice process. Figure 3 shown.

[0051] The present invention also proposes a system 200 for microservice transparent calling, such as Figure 4 Shown, including:

[0052] The encapsulation unit 201 encapsulates the existing system;

[0053] The docking unit 202 connects the service name and input and output parameters of the business composition microservice through the caller after the business composition microservice accesses the encapsulated stock system service in a transparent transmission manner;

[0054] The splitting unit 203 splits the existing system into multiple microservice modules according to the request business of the caller after the caller connects to the service name and input and output parameters of the business combination microservice;

[0055] The service unit 204 calls the microservice module to serve the request business of the caller.

[0056] The service unit 204 is further used to connect the microservice module to the business service orchestration module, which is used to provide services to the caller.

[0057] The packaging of the existing system includes:

[0058] Encapsulate the RemoteServiceConfig class of the existing system, and read and load the application and service name list in the configuration file remoteservice.properties into the memory of the existing system;

[0059] For the IFamilyRemoteServiceCoSvc interface of the existing system and

[0060] Encapsulate the FamilyRemoteServiceCoSvc implementation class;

[0061] Check the configuration information of the FamilyRemoteServiceCoSvc class of the existing system, verify the service validity and call the remote interface encapsulation action.

[0062] Among them, the service name and input and output parameters are also used by the business combination microservice to access the services of the encapsulated stock system in a transparent manner.

[0063] Among them, after the business combination microservice accesses the encapsulated stock system service in a transparent manner, the service name and input and output parameters remain unchanged.

[0064] The present invention solves the problem that existing business services that cannot be split into services at one time during the microservice evolution process can be accessed through a unified application name, and solves the problem that existing services can be gradually replaced in the subsequent business microservice evolution.

[0065] The present invention adopts the method of transparently transmitting service input and output parameters through configuration management. In the context where the heavy existing system cannot be reconstructed into a microservice system in one go, the services can be split and integrated step by step to achieve the final microservice, solving the engineering difficulty and design and development execution efficiency brought about by the one-time reconstruction of the business system.

[0066] It will be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention may be implemented in various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0067] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0068] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0070] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0071] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for transparently calling a microservice, the method comprising: Encapsulate the existing system; specifically, encapsulate the RemoteServiceConfig class of the existing system, and read and load the application and service name list in the remoteservice.properties configuration file into the memory of the existing system; encapsulate the IFamilyRemoteServiceCoSvc interface and FamilyRemoteServiceCoSvc implementation class of the existing system; and verify the configuration information, service validity, and remote interface encapsulation actions of the FamilyRemoteServiceCoSvc class of the existing system. After the business composition microservice accesses the services of the encapsulated stock system in a transparent transmission mode, the service name and input and output parameters of the business composition microservice are connected to the caller; wherein the service name and input and output parameters are also used by the business composition microservice to access the services of the encapsulated stock system in a transparent transmission mode; After the caller connects to the service name and input and output parameters of the business combination microservice, the stock system splits into multiple microservice modules according to the caller's request business; The microservice module is called to serve the requested business of the caller; wherein, after the business combination microservice accesses the service of the encapsulated stock system in a transparent manner, the service name and input and output parameters are not changed.

2. The method according to claim 1, further comprising: The microservice module is connected to the business service orchestration module, which is used to provide services to the caller.

3. A system for transparently calling microservices, comprising: The encapsulation unit encapsulates the existing system, specifically including: encapsulating the RemoteServiceConfig class of the existing system, reading and loading the application and service name list in the configuration file remoteservice.properties into the memory of the existing system; encapsulating the IFamilyRemoteServiceCoSvc interface and FamilyRemoteServiceCoSvc implementation class of the existing system; and verifying the configuration information, verifying the service validity, and calling the remote interface encapsulation action of the FamilyRemoteServiceCoSvc class of the existing system. The docking unit, after the business composition microservice accesses the service of the encapsulated stock system in a transparent transmission manner, docks the service name and input and output parameters of the business composition microservice through the caller; wherein the service name and input and output parameters are also used by the business composition microservice to access the service of the encapsulated stock system in a transparent transmission manner; A splitting unit, after the caller connects to the service name and input and output parameters of the business combination microservice, the existing system splits into multiple microservice modules according to the caller's request business; The service unit calls the microservice module to serve the requested business of the caller; wherein, after the business combination microservice accesses the service of the encapsulated stock system in a transparent manner, the service name and input and output parameters are not changed.

4. The system according to claim 3, wherein the service unit is further used to: connect the microservice module to the business service orchestration module, and the business service orchestration module is used to provide services to the caller.

Citation Information

Patent Citations

  • Property service management system, deployment method and device, equipment and storage medium

    CN113419732A