Service calling method and related equipment
A technology of service invocation and request invocation, applied in electrical components, transmission systems, etc., can solve the problems of difficult to maintain service registry, difficult to meet the needs of system maintenance and operation, and difficult to ensure high availability of service registry in real time. , to achieve the effect of enhancing scene adaptability, less prone to failure, and reducing time consumption
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] figure 1 It is a flow chart of the service calling method provided by Embodiment 1 of the present invention. The service calling method is applied to a computer device, and is used for calling a target method of a target interface from a service provider through a service caller in a software system running on the computer device.
[0044] Usually, the application system under the microservice architecture needs to use a highly available registration center to realize the service resource call between various services, that is, the service provider needs to register the service in the registration center so that the service provided by the service provider Can be called by the service caller. The service caller performs service discovery through the registration center to obtain the service address of the service provider to be called.
[0045] Maintaining and running the registry requires additional storage and operational resource consumption. Calling microservices...
Embodiment 2
[0086] figure 2 It is a structural diagram of the service invocation device provided by Embodiment 2 of the present invention. The service calling device 20 is applied to computer equipment. The service calling means 20 is used for calling the target method of the target interface from the service provider through the service caller in the software system running on the computer equipment.
[0087] like figure 2 As shown, the service calling device 20 may include a request module 201 , a generation module 202 , a registration module 203 , a sending module 204 , and a return module 205 .
[0088] Usually, the application system under the microservice architecture needs to use a highly available registration center to realize the service resource call between various services, that is, the service provider needs to register the service in the registration center so that the service provided by the service provider Can be called by the service caller. The service caller per...
Embodiment 3
[0129] This embodiment provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned service calling method embodiments are implemented, for example figure 1 Steps 101-105 shown:
[0130] 101. Request to call the target method of the target interface;
[0131] 102. Generate a proxy class of the target interface, where the proxy class includes an entry address of a service provider, an interface name, a method name, a parameter type, and a parameter value;
[0132] 103. Register the proxy class with the spring container;
[0133] 104. Send an interface call request to the entry address according to the interface name, the method name, the parameter type, and the parameter value through the registered proxy class;
[0134] 105. Receive the call result returned by the service provider through the registered proxy class.
[0135] Altern...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com