Method and device for calling application service

Through the proxy conversion device, the code diversity problem caused by different hospital deployment methods in the prior art is solved, and low-cost and efficient service calls are achieved.

CN118885237APending Publication Date: 2024-11-01BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411067443.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

When the existing technology joins the smart medical business in hospitals, different codes need to be developed according to different deployment methods, which leads to high development difficulty and high maintenance costs.

Method used

The proxy conversion device realizes the conversion of requests in different formats, and calls the services of the target service application in a unified manner, only one set of code is needed.

Benefits of technology

It reduces development costs, improves deployment efficiency, and can flexibly adjust the calling method to adapt to the configuration data situation of different hospitals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885237A_ABST
    Figure CN118885237A_ABST
Patent Text Reader

Abstract

The invention discloses an application service calling method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of determining a target service and a target format based on a received service request sent by an application, performing format conversion based on configuration information of the service request to obtain a request of the target format, and performing service calling based on the request of the target format. According to the implementation mode, conversion of the request format can be achieved through the proxy conversion device, it is avoided that different codes are developed for service calling requests of different applications, and rapid application of calling functions and rapid calling of application services can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart medical technology, and in particular to a method and device for calling an application service. Background Art

[0002] At present, with the popularization of online medical services, the business of health and smart medical services has also developed. In the process of realizing the business of health and smart medical services, a large number of hospitals need to join to improve the scope of medical services, and different hospitals have different ways of joining the medical services. Some hospitals need to deploy business applications in the hospital, while some hospitals only need to enter the business platform of health and smart medical services. Different services need to be provided to cope with these different ways of joining.

[0003] The existing deployment plan is to develop corresponding codes for different joining methods. Each set of codes provides application calling services to hospitals of each joining method. The development is difficult and the maintenance cost is high. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method and device for calling an application service, which can realize format conversion of different format requests of different applications through a proxy conversion device to realize service calling, and only needs to develop one set of code to achieve it, thereby reducing development costs.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for calling an application service is provided, comprising:

[0006] Receive a service request sent by an application, where the service request is used to call a service of a target service application;

[0007] Determine, based on the service request, a target service application and a target format corresponding to the request of the target service application;

[0008] In response to the configuration information of the service request, the service request is converted into a request in a target format by a pre-configured proxy conversion device, the pre-configured proxy conversion device being a collection data packet obtained by abstract processing of the application configuration data;

[0009] The service of the target service application is invoked based on the request in the target format.

[0010] Optionally, calling a service of a target service application based on a request in a target format includes:

[0011] In response to the target format being the first preset request format, a request in the target format is sent to the target service application to invoke a service of the target service application.

[0012] Optionally, the method further comprises:

[0013] In response to the target format being a second preset request format, converting the request in the target format into a target request by way of generalized calling;

[0014] The target service application is invoked based on the target request.

[0015] Optionally, before receiving the service request sent by the application, the method includes:

[0016] Perform abstract processing on each item of data in the application configuration data to obtain abstract data of each item of data;

[0017] The abstract data are combined to obtain a collection data packet.

[0018] Optionally, in response to the target format being a second preset request format, converting the request in the target format into a target request by way of generalized calling includes:

[0019] In response to the target format being a second preset request format, acquiring parameter information of a target service application;

[0020] Based on the parameter information, the request in the target format is converted into the target request through a generalized call.

[0021] According to another aspect of an embodiment of the present invention, a device for calling an application service is provided, comprising:

[0022] A receiving module, used to receive a service request sent by an application, where the service request is used to call a service of a target service application;

[0023] A determination module, configured to determine a target service application and a target format corresponding to the request of the target service application based on the service request;

[0024] A conversion module, for responding to the configuration information of the service request, converting the service request into a request in a target format through a pre-configured proxy conversion device, the pre-configured proxy conversion device being a collection data packet obtained by abstract processing of the application configuration data;

[0025] The calling module is used to call the service of the target service application based on the request in the target format.

[0026] Optionally, a calling module is used to call the service of the target service application based on a request in a target format, including: a calling module is used to send a request in a target format to the target service application in response to the target format being a first preset request format to call the service of the target service application.

[0027] Optionally, the device further includes: a conversion module for converting the request in the target format into a target request by generalized calling in response to the target format being a second preset request format; and a calling module for calling the target service application based on the target request.

[0028] Optionally, the device further includes: a processing module, used for performing abstract processing on each data item in the application configuration data to obtain abstract data of each data item; and a combining module, used for combining the abstract data to obtain a collection data packet.

[0029] Optionally, the conversion module is used to convert the request in the target format into the target request by generalized calling in response to the target format being the second preset request format, including:

[0030] an acquisition module, configured to acquire parameter information of a target service application in response to the target format being a second preset request format;

[0031] The conversion module is used to convert the request in the target format into the target request through a generalized call based on the parameter information.

[0032] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a method for calling an application service provided by an embodiment of the present invention.

[0033] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for calling the application service provided by the embodiment of the present invention is implemented.

[0034] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method for calling the application service provided by the embodiment of the present invention is implemented.

[0035] An embodiment of the above invention has the following advantages or beneficial effects: it can receive a service request sent by a target application, and in response to the configuration information of the request, convert the request into a request in a target format through a proxy conversion device, implement a service call based on the request in the target format, and use a unified proxy conversion device to implement format conversion for different requests, thereby ensuring unified call processing under different configuration data conditions in the hospital, avoiding the development of a set of corresponding codes for each configuration data, reducing development costs, and improving deployment efficiency. The configuration information can also be used to more flexibly adjust the calling method.

[0036] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0038] Figure 1 Shown is a design plan for hospital entry in the prior art;

[0039] Figure 2 The figure shows a design scheme of independent deployment within a hospital according to the prior art;

[0040] Figure 3 is a schematic diagram of the main steps of a method for calling an application service according to an embodiment of the present invention;

[0041] Figure 4 The figure shows an example of the application service calling process provided by the present invention;

[0042] Figure 5 is a schematic diagram of main modules of a device for invoking an application service according to an embodiment of the present invention;

[0043] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0044] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0046] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution disclosed in the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0047] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0048] like Figure 1 The figure shows the design scheme of hospital entry in the prior art. According to the type of service called, the intelligent medical single application directly relies on the dedicated first middleware, or directly relies on the third-party RPC service through a dedicated Remote Procedure Call (RPC) framework.

[0049] like Figure 2 The figure shows the design scheme of independent deployment in hospitals in the prior art. This deployment method is deployed within the hospital. Since there is no supporting environment, a general second middleware (open source middleware such as kafka and redis) needs to be used. When calling the service, if you need to call the internal service of smart medical care, you need to develop a set of Hypertext Transfer Protocol (HTTP) calling interfaces to forward the hospital request back to the internally deployed rpc intermediate conversion application through the front-end, and call the third-party application service through the conversion application. When other internal services need to request a single smart medical application, they also request the rpc intermediate conversion application, convert it into an http request, and then forward the request to the single smart medical application through the front-end in the hospital.

[0050] Figure 3 FIG. 1 is a schematic diagram of the main flow of the method for calling an application service according to an embodiment of the present invention. Figure 3 As shown, the following steps S301 to S304 are included.

[0051] Step S301: receiving a service request sent by an application, where the service request is used to call a service of a target service application.

[0052] When a single smart medical application, that is, an application deployed on the hospital side, needs to call a service, the service request sent by the application is received through the set up in-hospital front-end machine. Among them, the received service request corresponds to the hospital's service deployment method, that is, when the hospital's service deployment method is that the hospital is stationed on a third-party smart medical platform (hereinafter referred to as the hospital stationing method), the service request is a request for the stationing method; when the hospital's service deployment method is that the hospital's corresponding service application is deployed in the hospital (hereinafter referred to as the in-hospital deployment method), the service request is a service request for the in-hospital deployment method. Among them, the target application can be a client of an internal service developed by the hospital side installed by the user client, or a client of a third-party service provided by a third-party smart medical platform.

[0053] Step S302: determining a target service application and a target format corresponding to the request of the target service application based on the service request.

[0054] Determine the target service application based on the received request, that is, determine whether the service method called by the service request is an internal service developed by the hospital or a third-party service provided by a third-party smart medical platform, as well as the request format required by the corresponding called service. Specifically, if the target service application request is a request in the rpc format, the target application is determined to be a hospital-based method, and the third-party service can be called directly; if the target service application request is a request in the http format, the target application is determined to be deployed within the hospital, and it needs to be called through an internal service.

[0055] Step S303, in response to the configuration information of the service request, the service request is converted into a request in a target format by a pre-configured proxy conversion device, where the pre-configured proxy conversion device is a collection data packet obtained by abstract processing of the application configuration data.

[0056] The received service request is introduced into a pre-configured proxy conversion device through a dynamic proxy method. The proxy conversion device converts the format of the received service request according to the configuration information in the service request, that is, the information of the hospital's deployment method. Specifically, if the configuration information is hospital entry, the received service request is converted into an RPC request; if the configuration information is in-hospital deployment, the received service request is converted into an HTTP request.

[0057] Optionally, the proxy conversion device can be controlled by a switch to determine whether to use the rpc call method of the rpc call framework dedicated to the third-party smart medical platform or the general http call method. Specifically, for example: the remote dictionary service (Remote Dictionary Server, redis) and the first middleware dedicated to the third-party smart medical platform are both middleware used for caching, but the usage methods are different. A cache middleware (cache middleware) can be defined to allow redis and the first middleware dedicated to the third-party smart medical platform to inherit the capabilities of the cache middleware. When using, the cache middleware is directly used. At the same time, the switch can be used to control whether the cache bottom layer uses redis or the first middleware dedicated to the third-party smart medical platform; the first middleware dedicated to the third-party smart medical platform and kafka are both middleware used for message transfer, but the usage methods are different. A new messageCenter message middleware can be defined to allow the first middleware dedicated to the third-party smart medical platform and kafka to inherit the capabilities of meesageCenter. When using, messageCenter is directly used. At the same time, the switch can be used to control whether the messageCenter bottom layer uses the dedicated first middleware or kafka.

[0058] Among them, the pre-configured proxy conversion device abstracts the data obtained by processing the application configuration data and gathers them into a data package (jar package). The application configuration data includes cache (redis, the first middleware dedicated to the third-party smart medical platform, etc.), message transfer (the first middleware dedicated to the third-party smart medical platform, kafka, etc.), external call (rpc call framework dedicated to the third-party smart medical platform, http, etc.) and other data.

[0059] Optionally, the application configuration data includes at least one of entry configuration data and internal deployment data.

[0060] Optionally, a dedicated rpc call framework interceptor and a dedicated rpc call framework generalized call are encapsulated in the proxy conversion device. When the hospital's service deployment method is to deploy the hospital's corresponding service application in-hospital and an internal service needs to be requested, the request is converted into an http request through the dedicated rpc call framework interceptor, and the in-hospital application is requested through the set front-end, and the application then maps the http request to the internal service through reflection.

[0061] Step S304: calling the service of the target service application based on the request in the target format.

[0062] The target service application is called based on the converted request in the target format. Specifically, when the converted request is an RPC request, the target service application is called; when the converted request is an HTTP request, the target service application is called through an internal service.

[0063] The calling method of the application service provided by the embodiment of the present invention can receive the service request sent by the target application, and in response to the configuration information of the request, convert the request into a request in the target format through a proxy conversion device, and implement the service call based on the request in the target format. A unified proxy conversion device can be used for different requests to implement format conversion, ensuring unified calling processing under different configuration data conditions in the hospital, avoiding the development of a set of corresponding codes for each configuration data, reducing development costs, and improving deployment efficiency. The calling method can also be adjusted more flexibly through the configuration information.

[0064] According to an embodiment of the present invention, calling a service of a target service application based on a request in a target format may specifically include: in response to the target format being a first preset request format, sending a request in a target format to the target service application to call the service of the target service application. When the target format is an rpc format, directly sending an rpc request to the target service application to call the service of the target service application, specifically mapping the request to the rpc service of the target service application by reflection.

[0065] According to one embodiment of the present invention, the method may further include: in response to the target format being a second preset request format, converting the request in the target format into a target request by means of a generalized call; and calling the target service application based on the target request. When the target format is an http format, it is necessary to implement the call of the target service application through an internal service. By means of a generalized call, converting the request in the target format into an internal dedicated rpc call framework request, i.e., a target request. The target service application is called through the target request. The generalized call is similar to the reflection method in java.

[0066] According to the calling method of application service provided by the embodiment of the present invention, it is possible to convert the formats of service requests in different formats through a proxy conversion device, convert them into a target format that can perform service calls, and further use the request in the target format to directly call the target service application or call it through an internal service, thereby realizing unified calling of requests in different formats, realizing the application service calling process under different application deployment methods through a set of codes, and reducing development costs.

[0067] According to another embodiment of the present invention, before receiving the service request sent by the application, the method may further include: abstracting each data item in the application configuration data to obtain abstract data of each data item; combining the abstract data to obtain a collection data packet. The cache (specific implementation, for example, redis, the first middleware dedicated to the third-party smart medical platform), message transfer (specific implementation, for example, the first middleware dedicated to the third-party smart medical platform, kafka) and external calls (specific implementation, for example, the rpc call framework call dedicated to the third-party smart medical platform, http remote call) are abstracted to form a general cache factory, message transfer factory, external call dynamic proxy, and then the codes of various factories and dynamic proxies are combined to form a new data compression package, which is named as the proxy conversion device.

[0068] According to another embodiment of the present invention, when the hospital side needs to make a service call, it is directly implemented through the proxy conversion device. Its internal logic is a black box for the hospital. The hospital can adopt a corresponding method to perform code development operations according to the joining method. For example: when developing rpc calls, the previous dedicated rpc call framework configuration is still written, and the first middleware dedicated to the third-party smart medical platform, redis, etc. are still configured in the original way (hospital entry or in-hospital deployment). It is only necessary to mark this deployment as hospital entry or in-hospital deployment after the configuration is completed to indicate the subsequent operation of the proxy conversion device. When the target application on the hospital side needs to use the proxy conversion device, only the project object model (pom) file is required to implement it.

[0069] According to another embodiment of the present invention, in response to the target format being a second preset request format, the request in the target format is converted into a target request by means of a generalized call, including: in response to the target format being a second preset request format, obtaining parameter information of the target service application; based on the parameter information, converting the request in the target format into a target request by means of a generalized call. The class name, method name, formal parameter list, and parameter list of the third-party service to be called are obtained through an internal service, and the request in the target format is converted into an internal dedicated RPC call framework request, i.e., a target request, based on the obtained data by means of a generalized call.

[0070] According to an embodiment of the present invention, for the proxy conversion device, for high-level abstractions such as caching, message forwarding, and monitoring, when the target application needs to use them, it only needs to import the corresponding interface (java interface). When the springboot (an open source application framework) project is started, different implementations are started and injected into the application development framework spring container according to whether the project deployment method is hospital entry or in-hospital deployment. For example, if the hospital entry method is to use the first middleware dedicated to the third-party smart medical platform, the dedicated first middleware service reference is initialized and injected into the spring container when the project is started. If it is an independent deployment method in the hospital, redis is used, and the redis service reference is initialized and injected into the spring container. When the target application is in use, it does not care about the specific implementation method, that is, it does not care about the implementation logic inside the proxy conversion device, and can directly use the upper-level interface; the implementation method of this method is to implement multiple implementations of an interface and control the initialization of different implementations into the spring container under different environments.

[0071] According to one of the embodiments of the present invention, after the target application is deployed, there may be a scenario where a third-party application needs to call the target application. First, the internal service needs to reference the interface exposed by the target application and register it in the internal dedicated rpc call framework management; when the third-party application calls the target application of the dedicated rpc call framework, it actually calls the internal service. The internal service intercepts the dedicated rpc call framework request and transmits the class name, method name, parameter list, parameters and other information to the target application through a fixed http interface; after the target application side receives the http request, it calls the specific implementation of the target application service through reflection in the proxy conversion device and returns the result, and the request ends. Among them, the reflection call refers to the external request to a class name, method name, and method definition on its own service, which can be called through the reflection mechanism to the service provided by the object created by this class of its own service.

[0072] According to the calling method of the application service provided by the embodiment of the present invention, it is possible to respond to the configuration information of the request of the target application, convert the request into a request in the target format through the proxy conversion device, and implement the calling of the service based on the request in the target format. It is possible to use a unified proxy conversion device to implement the format conversion for different requests, and ensure the unified calling processing under different configuration data corresponding to different joining modes of the hospital (for example, hospital entry and in-hospital deployment), that is, to use the same set of codes to call the service for hospitals with different joining modes, avoid developing a set of corresponding codes for each configuration data, reduce the development cost, and accelerate the deployment process of the medical service application. At the same time, the calling method can also be adjusted more flexibly through the configuration information.

[0073] like Figure 4 The figure shows an example of the application service call process provided by the present invention. In the actual process, the smart medical monomer application deployed on the hospital side relies on the pom file to realize the conversion of the request method of the rpc call framework dedicated to the third-party smart medical platform into the corresponding rpc request or http request according to whether the configuration is the in-hospital deployment mode or the hospital settlement mode. If the request is an http request, internal service is performed; if the request is an rpc request, it means that it is a hospital settlement mode, and the third-party rpc service is directly requested. For internal services, the http request is converted into a dedicated rpc call framework request for internal services through the generalized call method of the rpc call framework dedicated to the third-party smart medical platform to realize the call of the third-party service. When a third party needs to call the smart medical monomer application, the call request is converted into an http request and called through the underlying real network. The upper-layer call is unaware of the smart medical single application, that is, the upper layer is unaware of the in-hospital deployment or hospital entry, and the code development is uniformly carried out according to the hospital entry method. After the deployment is completed, it needs to be configured as the hospital entry method or the in-hospital deployment method. Furthermore, the original dedicated rpc call framework client and server need to be configured as the new proxy conversion device configuration.

[0074] Figure 5 is a schematic diagram of a device 500 for calling an application service provided by an embodiment of the present invention, such as Figure 5 As shown, the application service calling device 500 of the embodiment of the present invention mainly includes: a receiving module 501, a determining module 502, a converting module 503 and a calling module 504.

[0075] The receiving module 501 is used to receive a service request sent by an application, where the service request is used to call a service of a target service application;

[0076] A determination module 502, configured to determine a target service application and a target format corresponding to the request of the target service application based on the service request;

[0077] The conversion module 503 is used to respond to the configuration information of the service request and convert the service request into a request in a target format through a pre-configured proxy conversion device, where the pre-configured proxy conversion device is a collection data packet obtained by abstract processing of the application configuration data;

[0078] The calling module 504 is used to call the service of the target service application based on the request in the target format.

[0079] The application service calling device provided in the embodiment of the present invention can convert the format of service requests in different formats through a proxy conversion device, convert it into a target format that can perform service calls, and further use the target format request to directly call the target service application or call it through an internal service, thereby realizing unified calling of requests in different formats, realizing the application service calling process under different application deployment methods through a set of codes, and reducing development costs.

[0080] According to one embodiment of the present invention, a calling module 504 is used to call the service of a target service application based on a request in a target format, including: a calling module 504 is used to send a request in a target format to a target service application in response to the target format being a first preset request format, so as to call the service of the target service application.

[0081] According to another embodiment of the present invention, the device also includes: a conversion module 505, which is used to convert the request in the target format into a target request by a generalized call in response to the target format being a second preset request format; and a calling module 504, which is used to call the target service application based on the target request.

[0082] According to another embodiment of the present invention, the device further includes: a processing module 506 for performing abstract processing on each data item in the application configuration data to obtain abstract data of each data item; and a combining module 507 for combining the abstract data to obtain a collection data packet.

[0083] According to another embodiment of the present invention, the conversion module 506 is used to convert the request in the target format into the target request by generalized calling in response to the target format being the second preset request format, including:

[0084] An acquisition module 508, configured to acquire parameter information of a target service application in response to the target format being a second preset request format;

[0085] The conversion module 506 is used to convert the request in the target format into a target request by generalized calling based on the parameter information.

[0086] The application service calling device provided in accordance with the embodiment of the present invention can respond to the configuration information of the request of the target application, convert the request into a request in the target format through the proxy conversion device, and implement the service calling based on the request in the target format. It can use a unified proxy conversion device to implement the format conversion for different requests, and ensure the unified calling processing under different configuration data corresponding to different hospital joining methods (for example, hospital entry and in-hospital deployment), that is, use the same set of codes to call the service for hospitals with different joining methods, avoid developing a set of corresponding codes for each configuration data, reduce development costs, and speed up the hospital deployment process. At the same time, the calling method can also be adjusted more flexibly through the configuration information.

[0087] Figure 6 An exemplary system architecture 600 is shown to which the method for invoking an application service or the device for invoking an application service according to an embodiment of the present invention can be applied.

[0088] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0089] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0090] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0091] The server 605 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and process the received call request and other data, and feed back the processing results (such as the target service - only an example) to the terminal device.

[0092] It should be noted that the method for calling the application service provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for calling the application service is generally set in the server 605 .

[0093] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0094] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0095] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0096] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0097] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0098] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be set in a processor. For example, they may be described as: a processor includes a receiving module, a determining module, a conversion module, and a calling module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves. For example, the receiving module may also be described as a "module for receiving a service request sent by a target application."

[0101] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0102] Receive service requests sent by the target application;

[0103] determining a target service application and a target format of the target service application request based on the service request;

[0104] In response to the configuration information of the service request, the service request is converted into a request in a target format by a pre-configured proxy conversion device, the pre-configured proxy conversion device being a collection data packet obtained by abstract processing of the application configuration data;

[0105] The service of the target service application is invoked based on the request in the target format.

[0106] According to the technical solution of the embodiment of the present invention, it is possible to receive a service request sent by a target application, and in response to the configuration information of the request, convert the request into a request in a target format through a proxy conversion device, and implement a service call based on the request in the target format. A unified proxy conversion device can be used for different requests to implement format conversion, thereby ensuring unified call processing under different configuration data conditions in the hospital, avoiding the development of a set of corresponding codes for each configuration data, reducing development costs, and improving deployment efficiency. The configuration information can also be used to more flexibly adjust the calling method.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for calling an application service, characterized in that: include: Receive a service request sent by an application, where the service request is used to call a service of a target service application; Determining the target service application and a target format corresponding to the request of the target service application based on the service request; In response to the configuration information of the service request, converting the service request into a request in the target format by a pre-configured proxy conversion device, wherein the pre-configured proxy conversion device is a collection data packet obtained by abstract processing of application configuration data; The service of the target service application is called based on the request in the target format.

2. The method according to claim 1, characterized in that The request based on the target format calls the service of the target service application, comprising: In response to the target format being a first preset request format, sending a request in the target format to the target service application to invoke a service of the target service application.

3. The method according to claim 2, characterized in that The method further comprises: In response to the target format being a second preset request format, converting the request in the target format into a target request by means of a generalized call; The target service application is called based on the target request.

4. The method according to claim 3, characterized in that In response to the target format being a second preset request format, converting the request in the target format into a target request by generalized calling, includes: In response to the target format being a second preset request format, acquiring parameter information of the target service application; Based on the parameter information, the request in the target format is converted into a target request by means of a generalized call.

5. The method according to claim 1, characterized in that Before receiving the service request sent by the application, the method includes: Performing abstract processing on each item of data in the application configuration data to obtain abstract data of each item of data; The abstract data are combined to obtain a collection data packet.

6. A device for calling an application service, characterized in that: include: A receiving module, used to receive a service request sent by an application, wherein the service request is used to call a service of a target service application; a determination module, configured to determine the target service application and a target format of the target service application request based on the service request; a conversion module, configured to respond to the configuration information of the service request and convert the service request into a request in the target format through a pre-configured proxy conversion device, wherein the pre-configured proxy conversion device is a collection data packet obtained by abstract processing of the application configuration data; A calling module is used to call the service of the target service application based on the request in the target format.

7. The device according to claim 6, characterized in that The device also includes: A processing module, used for performing abstract processing on each item of data in the application configuration data to obtain abstract data of each item of data; The combining module is used to combine the abstract data to obtain a collection data packet.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Service calling method, system and equipment based on Java reflection and dynamic proxy

    CN119629223A

  • Service calling method, system and device based on Java reflection and dynamic proxy

    CN119629223B