CN110933188A - Remote service calling method, system, server and storage medium - Google Patents

Remote service calling method, system, server and storage medium Download PDF

Info

Publication number
CN110933188A
CN110933188A CN201911410459.8A CN201911410459A CN110933188A CN 110933188 A CN110933188 A CN 110933188A CN 201911410459 A CN201911410459 A CN 201911410459A CN 110933188 A CN110933188 A CN 110933188A
Authority
CN
China
Prior art keywords
service
information
subscription
content information
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911410459.8A
Other languages
Chinese (zh)
Inventor
许锋刚
熊友军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN201911410459.8A priority Critical patent/CN110933188A/en
Publication of CN110933188A publication Critical patent/CN110933188A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a method, a system, a server and a storage medium for calling remote services, wherein the method comprises the following steps: acquiring service content information, service address information and first port information sent by a server; generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client; acquiring a subscription request sent by a client based on a first service list; confirming a subscription result of the subscription request according to the subscription request and the updated first service list; and responding to the service request based on the service content information sent by the client according to the subscription result. According to the invention, the service information of the server is firstly acquired by the calling center, and then the calling center calls the remote service with the client, so that the client and the server are independent from each other through distributed deployment and low in coupling, and the pressure of a single server is relieved in a cluster mode to ensure the technical effect of service stability.

Description

Remote service calling method, system, server and storage medium
Technical Field
The embodiment of the invention relates to a service calling technology, in particular to a method, a system, a server and a storage medium for calling remote services.
Background
With the increasing complexity of financial services and the increasing content of related services, many companies or e-commerce need to call third-party services to complete their own services, and the current commonly-used call service strategies include random call, polling call, and the like.
However, the current remote service invocation requires that the same user at the client sends a service request to the same server every time, which is convenient for the service provider to perform internal resource calculation, semantic analysis cache and the like. Therefore, when the service calling amount is large, the server of a single server side is difficult to bear huge access amount, so that the server is unstable, the service cannot be normally and effectively called, the current remote service calling cannot provide a customizable service calling mode for the client side, and the flexibility is low.
Disclosure of Invention
The invention provides a method, a system, a server and a storage medium for calling remote services, which are used for realizing mutual independence and low coupling of a client and a server through distributed deployment and relieving the pressure of a single server in a cluster mode so as to ensure the stability of the service.
In a first aspect, an embodiment of the present invention provides a method for invoking a remote service, including:
acquiring service content information, service address information and first port information sent by a server;
generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client;
acquiring a subscription request sent by a client based on a first service list;
confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and responding to the service request based on the service content information sent by the client according to the subscription result.
Optionally, the determining, according to the subscription request and the updated first service list, a subscription result of the subscription request includes:
judging whether the service content information, the service address information and the first port information are received for the first time;
if the first time receiving the service content information, the service address information and the first port information, confirming a subscription result of the subscription request according to the subscription request and the first service list;
if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
if the service content information, the service address information and the first port information do not match with the preset service content information, the preset service address information and the preset first port information in the preset repository, updating the preset repository according to the service content information, the service address information and the first port information to generate an updated first service list, and confirming a subscription result of the subscription request according to the subscription request and the updated first service list.
Optionally, after confirming the subscription result of the subscription request according to the subscription request and the updated first service list, the method includes:
sending a subscription result to the client;
and if the subscription result is that the subscription fails, sending the updated first service list to the client and reacquiring the subscription request sent by the client based on the updated first service list.
Optionally, responding to the service request based on the service content information sent by the client according to the subscription result includes:
and if the subscription result is that the subscription is successful, responding to a service request instruction based on the service content information sent by the client according to the service content information, the service address information and the first port information.
Optionally, if the subscription result is that the subscription is successful, responding to the service request instruction based on the service content information sent by the client according to the service content information, the service address information, and the first port information includes:
if the subscription result is that the subscription is successful, acquiring service content information, service address information and first port information according to the service request;
acquiring a service feedback result of the service content information according to the service content information, the service address information and the first port information;
and acquiring second port information of the client, and sending a service feedback result to the client according to the second port information.
Optionally, responding to the service request based on the service content information sent by the client according to the subscription result includes:
and confirming the reference times of the service content information according to the service feedback result.
In a second aspect, an embodiment of the present invention further provides a system for invoking a remote service, including:
the first acquisition module is used for acquiring service content information, service address information and first port information sent by a server;
the generating module is used for generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client;
the second acquisition module is used for acquiring a subscription request sent by the client based on the first service list;
the subscription module is used for confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and the response module is used for responding to the service request based on the service content information sent by the client according to the subscription result.
Optionally, the subscription module includes:
the judging unit is used for judging whether the service content information, the service address information and the first port information are received for the first time;
the first execution unit is used for confirming a subscription result of the subscription request according to the subscription request and the first service list if the first execution unit receives the service content information, the service address information and the first port information for the first time; if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
the second execution unit is configured to, if the service content information, the service address information, and the first port information do not match preset service content information, preset service address information, and preset first port information in a preset repository, update the preset repository according to the service content information, the service address information, and the first port information to generate an updated first service list, and confirm a subscription result of the subscription request according to the subscription request and the updated first service list.
In a third aspect, an embodiment of the present invention further provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a method for invoking a remote service in any one of the foregoing embodiments when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for invoking a remote service in any one of the above embodiments.
According to the invention, the service information of the server is firstly acquired by the calling center and then the calling center calls the remote service with the client, so that the technical problems that the coupling between the client and the service list is too high and the pressure of a single server is too high when the service is frequently called, so that the service is unstable in the prior art are solved, the client and the server are independent from each other through distributed deployment and low in coupling, and the pressure of the single server is relieved in a cluster mode to ensure the technical effect of service stability.
Drawings
Fig. 1 is a flowchart of a method for invoking a remote service according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for invoking a remote service according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a remote service invoking system according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first acquisition module may be referred to as a second acquisition module, and similarly, a second acquisition module may be referred to as a first acquisition module, without departing from the scope of the present application. The first acquisition module and the second acquisition module are both acquisition modules, but they are not the same acquisition module. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
The ZooKeeper is an open-source distributed application program coordination service, is an open-source realization service of Chubby under Google, and is one of important components of Hadoop and Hbase. It is a software that provides a consistent service for distributed applications, and the functions provided include: configuration maintenance, domain name service, distributed synchronization, group service, etc. The ZooKeeper development target is to package complex and error-prone services and provide a simple and easy-to-use interface and a system with high performance and stable functions for users.
The service provider registers the service to the corresponding node by obtaining the registration address of the ZooKeeper, and sets some important parameters such as connection timeout time, thread number, service exposure port, load balancing strategy and the like. The service caller also called as a consumer also performs service subscription operation through the registration address provided by the ZooKeeper, and when the consumer calls the service, the ZooKeeper initiates an internal proxy service according to the configuration of the service end, and further finds out the service reference call of the service provider to obtain a remote data result.
Example one
Fig. 1 is a flowchart of a method for calling a remote service according to an embodiment of the present invention, where the method is applicable to a case where a call is made to a remote service based on a zookeeper open source framework, and the method may be executed by a processor. As shown in fig. 1, a method for calling a remote service specifically includes the following steps:
step S110, acquiring service content information, service address information and first port information sent by a server;
specifically, in this embodiment, the call service adopted by the call center may be based on a zookeeper open source service framework. The service end may be a source end of a service in this embodiment, the service content information may include a service name, a service type, and a service summary, the service address information refers to link information (for example, address information conforming to Http, Dubbo, and WebService communication protocols) for referring to the service, such as web page address information of a certain web page or database address information of certain software, and the first port information may refer to a data port used by the service end for data transmission. In this embodiment, before the remote service is called, the call center needs to obtain the service content information, the service address information, and the first port information sent by the service end. The client can adopt the link information following different communication protocols according to the self requirement, so that the remote service calling has higher flexibility.
Step S120, generating a first service list according to the service content information, the service address information and the first port information, and sending the first service list to the client;
specifically, the call center may associate the service content information, the service address information, and the first port information, and then generate the service list according to a predetermined rule. If the call center needs to generate a service for inquiring the order, the call center firstly acquires the service content information, the service address information and the first port information of the order inquiry service, then associates the service content information, the service address information and the first port information of the order inquiry service, and then generates a service list of the order inquiry service. In this embodiment, the service list may be a key or a page with a link generated on a web page by the call center, and the client may perform the call of the remote service by calling the terminal by clicking the key or the page with the link.
Step S130, a subscription request sent by the client based on the first service list is obtained;
specifically, in this embodiment, the client refers to one end of the call service, and after receiving the first service list sent by the call center, the client may subscribe to the service in the first service list according to its own service requirement, that is, send a subscription request to the call center.
Step S140, confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
specifically, after the service end sends updated service address information and/or first port information corresponding to the same service content information, the call center may update the first service list according to the received new service address information and/or first port information, so as to obtain an updated first service list. In this embodiment, after acquiring the subscription request sent by the client, the call center may query the first service list or the updated first service list according to the subscription request, and generate a corresponding subscription result.
And S150, responding to the service request based on the service content information sent by the client according to the subscription result.
Specifically, when the subscription result is that the subscription is successful, that is, the client successfully subscribes to the service in the first service list or the updated first service list, the call center may perform service query through the service address information and the first port information when the client sends a service request of the subscribed service, so as to obtain a service feedback result, that is, a query result.
The first embodiment of the invention has the advantages that the service information of the server is firstly acquired by the calling center and then the calling center calls the remote service with the client, so that the technical problems that the coupling between the client and the service list is too high and the service is unstable due to too high pressure of a single server when the service is frequently called in the prior art are solved, the client and the server are mutually independent through distributed deployment and low in coupling, and the pressure of the single server is relieved in a cluster mode to ensure the service stability are realized.
Example two
The second embodiment of the invention is further optimized on the basis of the first embodiment. Fig. 2 is a flowchart of a method for invoking a remote service according to a second embodiment of the present invention, and as shown in fig. 2, the method for invoking a remote service according to the present embodiment includes:
step S210, acquiring service content information, service address information and first port information sent by a server;
specifically, the service end may be a source end of a service in this embodiment, the service content information may include a service name, a service type, and a service summary, the service address information refers to link information (such as Http, Dubbo, and WebService) for referring to the service, such as web page address information of a certain web page or database address information of a certain software, and the first port information may refer to a data port used by the service end for data transmission. In this embodiment, before the remote service is called, the call center needs to obtain the service content information, the service address information, and the first port information sent by the service end.
Step S220, generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client;
specifically, the call center may associate the service content information, the service address information, and the first port information, and then generate the service list according to a predetermined rule. If the call center needs to generate a service for inquiring the order, the call center firstly acquires the service content information, the service address information and the first port information of the order inquiry service, then associates the service content information, the service address information and the first port information of the order inquiry service, and then generates a service list of the order inquiry service. In this embodiment, the service list may be a key or a page with a link generated on a web page by the call center, and the client may perform the call of the remote service by calling the terminal by clicking the key or the page with the link.
Step S230, obtaining a subscription request sent by the client based on the first service list;
specifically, in this embodiment, the client refers to one end of the call service, and after receiving the first service list sent by the call center, the client may subscribe to the service in the first service list according to its own service requirement, that is, send a subscription request to the call center.
Step S240, judging whether the service content information, the service address information and the first port information are received for the first time;
step S251, if the service content information, the service address information and the first port information are received for the first time, confirming a subscription result of the subscription request according to the subscription request and the first service list;
step S252, if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
step S253, if the service content information, the service address information and the first port information do not match the preset service content information, the preset service address information and the preset first port information in the preset repository, updating the preset repository according to the service content information, the service address information and the first port information to generate an updated first service list, and confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
specifically, after receiving the subscription request sent by the client, the call center may first determine whether the service content information, the service address information, and the first port information corresponding to the subscription request sent by the server are received for the first time. For example, when the client wants to subscribe to the order information service (i.e., the service of querying the order), the client sends a subscription request of the order query service, and after receiving the subscription request of the client, the call center may first determine whether the preset database of the call center has the service content information, the service address information, and the first port information of the order query service. If the preset database does not contain the service content information, the service address information and the first port information of the order query service, the information can be directly stored, and a first service list can be generated according to the information; if the service content information, the service address information and the first port information of the order query service exist in the preset database, and the service side does not send the update information of the order query service, namely the service content information, the service address information and the first port information can be matched with the preset service content information, the preset service address information and the preset first port information in the preset repository, a first service list can be directly generated according to the preset information in the preset repository; when the preset service content information, the preset service address information and the preset first port information of the order query service exist in the preset database and the service content information, the service address information and the first port information cannot be matched with the preset service content information, the preset service address information and the preset first port information in the preset repository, that is, the service end updates the service content information, the service address information or the first port information of the order query service, the call center can generate an updated first service list according to the received updated service content information, the received service address information and the received first port information sent by the service end.
Step S260, sending a subscription result to the client;
step S271, if the subscription result is that the subscription fails, sending the updated first service list to the client and re-acquiring the subscription request sent by the client based on the updated first service list;
step S272, if the subscription result is successful, acquiring service content information, service address information and first port information according to the service request;
specifically, in this embodiment, after the call center receives the subscription request sent by the client and generates the subscription result, the call center may also send the subscription result to the client to notify the client of the specific subscription result. If the subscription result is successful, the client can send the service request to the call center with ease, and after the call center receives the service request sent by the client, the corresponding service content information, the service address information and the first port information can be inquired according to the service request, so that a service feedback result of the service request is obtained. If the subscription result is that the subscription fails (the reason for the failure may be that the client has not received the updated first service list sent by the call center, the subscription request is sent, and the call center uses the updated first service list at this time), the call center may send the updated first service list to the client, and the client sends the subscription request to the call center according to the updated first service list, thereby completing the subscription of the service.
Step S280, acquiring a service feedback result of the service content information according to the service content information, the service address information and the first port information;
specifically, after the client completes service subscription (i.e., subscription is successful), the call center can access the link address of the service at the service end by querying the service content information, the service address information and the first port information corresponding to the service, so as to obtain a query result of the service, i.e., a service feedback result. For example, when the client needs to query the name of the client corresponding to the order, after the client sends the service request for querying the name of the order client to the call center, the call center queries corresponding service content information, service address information, and first port information in the first service list or the updated first service list according to the service request for querying the name of the order client, and then accesses the service end according to the information, thereby obtaining a query result corresponding to the service content information (for example, a box of red cattle, a corresponding client is a young steel, a plush toy, a corresponding client is a small red, 1000 pieces of intelligent equipment, a corresponding client is a company a, and the like), that is, a service feedback result.
Step S291, acquiring second port information of the client, and sending a service feedback result to the client according to the second port information;
and step S292, confirming the reference times of the service content information according to the service feedback result.
Specifically, after the call center obtains the service feedback result, it needs to first obtain the data transmission port of the client, that is, the second port information, and then send the service feedback result to the client according to the second port information. In this embodiment, the invocation center may further set the number of times of invocation at the invocation node corresponding to the service content information, that is, the invocation center adds one to the number of times of invocation of the service content information as long as it feeds back a service feedback result corresponding to the service content information to the client once, so that the invocation center can conveniently check the invocation condition of each service.
The second embodiment of the invention has the advantages that the service information of the server is firstly acquired by the calling center and then the calling center calls the remote service with the client, so that the technical problems that the coupling between the client and the service list is too high and the service is unstable due to too high pressure of a single server when the service is frequently called in the prior art are solved, the client and the server are mutually independent and have low coupling through distributed deployment, the service requirement of the client is met through a self-defined service calling mode, and the pressure of the single server is relieved through a clustering mode to ensure the technical effect of service stability.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a remote service invocation system according to a third embodiment of the present invention. As shown in fig. 3, the remote service invoking system 300 of the present embodiment includes:
a first obtaining module 310, configured to obtain service content information, service address information, and first port information sent by a server;
the generating module 320 is configured to generate a first service list according to the service content information, the service address information, and the first port information, and send the first service list to the client;
a second obtaining module 330, configured to obtain a subscription request sent by the client based on the first service list;
a subscription module 340, configured to confirm a subscription result of the subscription request according to the subscription request and the updated first service list;
and a response module 350, configured to respond to the service request based on the service content information sent by the client according to the subscription result.
In this embodiment, the subscription module 340 includes:
the judging unit is used for judging whether the service content information, the service address information and the first port information are received for the first time;
the first execution unit is used for confirming a subscription result of the subscription request according to the subscription request and the first service list if the first execution unit receives the service content information, the service address information and the first port information for the first time; if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
a second execution unit, configured to, if the service content information, the service address information, and the first port information do not match preset service content information, preset service address information, and preset first port information in a preset repository, update the preset repository according to the service content information, the service address information, and the first port information to generate an updated first service list, and confirm a subscription result of the subscription request according to the subscription request and the updated first service list
In this embodiment, the system 300 for invoking a remote service further includes:
a sending module 360, configured to send the subscription result to the client; and if the subscription result is that the subscription fails, sending the updated first service list to the client and reacquiring the subscription request sent by the client based on the updated first service list.
In this embodiment, the response module 350 includes:
and the response unit is used for responding a service request instruction based on the service content information sent by the client according to the service content information, the service address information and the first port information if the subscription result is that the subscription is successful.
In this embodiment, the response unit includes:
the request unit is used for acquiring service content information, service address information and first port information according to the service request if the subscription result is that the subscription is successful;
the feedback unit is used for acquiring a service feedback result of the service content information according to the service content information, the service address information and the first port information;
and the port acquisition unit is used for acquiring second port information of the client and sending a service feedback result to the client according to the second port information.
In this embodiment, the system 300 for invoking a remote service further includes:
and a counting module 370, configured to confirm the number of times of reference of the service content information according to the service feedback result.
The remote service calling system provided by the embodiment of the invention can execute the remote service calling method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, as shown in fig. 4, the server includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the server may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the memory 420, the input device 430 and the output device 440 in the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 4.
The memory 410, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the calling system of the remote service in the embodiments of the present invention (e.g., a first obtaining module, a generating module, a second obtaining module, a subscribing module, a responding module, a sending module, and a counting module in the calling system of the remote service). The processor 410 executes various functional applications of the server and data processing, i.e., implements the above-described calling method of the remote service, by executing software programs, instructions, and modules stored in the memory 420.
Acquiring service content information, service address information and first port information sent by a server;
generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client;
acquiring a subscription request sent by a client based on a first service list;
confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and responding to the service request based on the service content information sent by the client according to the subscription result.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the server. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for invoking a remote service, where the method includes:
acquiring service content information, service address information and first port information sent by a server;
generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to the client;
acquiring a subscription request sent by a client based on a first service list;
confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and responding to the service request based on the service content information sent by the client according to the subscription result.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the method for invoking the remote service provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the remote service invoking system, each included unit and module are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for invoking a remote service, comprising:
acquiring service content information, service address information and first port information sent by a server;
generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to a client;
acquiring a subscription request sent by the client based on the first service list;
confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and responding to the service request based on the service content information sent by the client according to the subscription result.
2. The method according to claim 1, wherein the confirming the subscription result of the subscription request according to the subscription request and the updated first service list comprises:
judging whether the service content information, the service address information and the first port information are received for the first time;
if the service content information, the service address information and the first port information are received for the first time, confirming a subscription result of the subscription request according to the subscription request and the first service list;
if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
if the service content information, the service address information and the first port information do not match preset service content information, preset service address information and preset first port information in the preset repository, updating the preset repository according to the service content information, the service address information and the first port information to generate an updated first service list, and confirming a subscription result of the subscription request according to the subscription request and the updated first service list.
3. The method according to claim 1, wherein the step of confirming the subscription result of the subscription request according to the subscription request and the updated first service list comprises:
sending the subscription result to the client;
and if the subscription result is that the subscription fails, sending the updated first service list to the client and re-acquiring a subscription request sent by the client based on the updated first service list.
4. The method of claim 1, wherein the responding to the service request based on the service content information sent by the client according to the subscription result comprises:
and if the subscription result is that the subscription is successful, responding to a service request instruction based on the service content information, which is sent by the client, according to the service content information, the service address information and the first port information.
5. The method according to claim 1, wherein if the subscription result is that the subscription is successful, responding to the service request command based on the service content information sent by the client according to the service content information, the service address information, and the first port information comprises:
if the subscription result is that the subscription is successful, acquiring the service content information, the service address information and the first port information according to the service request;
acquiring a service feedback result of the service content information according to the service content information, the service address information and the first port information;
and acquiring second port information of the client, and sending the service feedback result to the client according to the second port information.
6. The method according to claim 1, wherein the responding to the service request based on the service content information sent by the client according to the subscription result comprises:
and confirming the reference times of the service content information according to the service feedback result.
7. A system for invoking a remote service, comprising:
the first acquisition module is used for acquiring service content information, service address information and first port information sent by a server;
the generating module is used for generating a first service list according to the service content information, the service address information and the first port information and sending the first service list to a client;
a second obtaining module, configured to obtain a subscription request sent by the client based on the first service list;
the subscription module is used for confirming a subscription result of the subscription request according to the subscription request and the updated first service list;
and the response module is used for responding to the service request based on the service content information sent by the client according to the subscription result.
8. The system for invoking a remote service according to claim 7, wherein said subscription module comprises:
the judging unit is used for judging whether the service content information, the service address information and the first port information are received for the first time;
a first execution unit, configured to, if the service content information, the service address information, and the first port information are received for the first time, determine a subscription result of the subscription request according to the subscription request and the first service list; if the service content information, the service address information and the first port information are not received for the first time, judging whether the service content information, the service address information and the first port information are matched with preset service content information, preset service address information and preset first port information in a preset storage library;
and the second execution unit is configured to, if the service content information, the service address information, and the first port information do not match preset service content information, preset service address information, and preset first port information in the preset repository, update the preset repository according to the service content information, the service address information, and the first port information to generate an updated first service list, and confirm a subscription result of the subscription request according to the subscription request and the updated first service list.
9. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for invoking a remote service according to any one of claims 1-6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for invoking a remote service according to any one of claims 1-6.
CN201911410459.8A 2019-12-31 2019-12-31 Remote service calling method, system, server and storage medium Pending CN110933188A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911410459.8A CN110933188A (en) 2019-12-31 2019-12-31 Remote service calling method, system, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911410459.8A CN110933188A (en) 2019-12-31 2019-12-31 Remote service calling method, system, server and storage medium

Publications (1)

Publication Number Publication Date
CN110933188A true CN110933188A (en) 2020-03-27

Family

ID=69854505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911410459.8A Pending CN110933188A (en) 2019-12-31 2019-12-31 Remote service calling method, system, server and storage medium

Country Status (1)

Country Link
CN (1) CN110933188A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984309A (en) * 2020-08-31 2020-11-24 北京达佳互联信息技术有限公司 Service calling method, device, server and storage medium
CN112367383A (en) * 2020-10-30 2021-02-12 深圳云之家网络有限公司 Service calling method and related equipment
CN114900383A (en) * 2022-03-28 2022-08-12 青岛海尔科技有限公司 Interface processing method and device, electronic equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459908A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Service subscribing method, system, server
CN105005500A (en) * 2015-05-29 2015-10-28 青岛海尔智能家电科技有限公司 Remote procedure calling method, server side and client
CN105450757A (en) * 2015-12-02 2016-03-30 联动优势电子商务有限公司 Service management method and system
CN105721473A (en) * 2016-02-24 2016-06-29 锐达互动科技股份有限公司 WEB side remote invoking optimizing method and system
CN109451035A (en) * 2018-12-04 2019-03-08 宁波耘瑞智能科技有限公司 A kind of method, apparatus and system of separate type collection group agent and service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459908A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Service subscribing method, system, server
CN105005500A (en) * 2015-05-29 2015-10-28 青岛海尔智能家电科技有限公司 Remote procedure calling method, server side and client
CN105450757A (en) * 2015-12-02 2016-03-30 联动优势电子商务有限公司 Service management method and system
CN105721473A (en) * 2016-02-24 2016-06-29 锐达互动科技股份有限公司 WEB side remote invoking optimizing method and system
CN109451035A (en) * 2018-12-04 2019-03-08 宁波耘瑞智能科技有限公司 A kind of method, apparatus and system of separate type collection group agent and service

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984309A (en) * 2020-08-31 2020-11-24 北京达佳互联信息技术有限公司 Service calling method, device, server and storage medium
CN112367383A (en) * 2020-10-30 2021-02-12 深圳云之家网络有限公司 Service calling method and related equipment
CN114900383A (en) * 2022-03-28 2022-08-12 青岛海尔科技有限公司 Interface processing method and device, electronic equipment and computer readable storage medium
CN114900383B (en) * 2022-03-28 2024-04-19 青岛海尔科技有限公司 Interface processing method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
WO2020147466A1 (en) Method for invoking server and proxy server
CN111258627B (en) Interface document generation method and device
US11432137B2 (en) Service notification method for mobile edge host and apparatus
CN110933188A (en) Remote service calling method, system, server and storage medium
US11237888B2 (en) Message processing method and system, storage medium and electronic device
CN110278256B (en) Block link point access uplink method, related equipment and system
CN111258723B (en) Transaction processing method, device, system, medium and equipment of distributed system
CN108512903B (en) Abnormal information processing method and device, storage medium and API gateway
CN111064626B (en) Configuration updating method, device, server and readable storage medium
JP2019525604A (en) Network function NF management method and NF management apparatus
CN113645304A (en) Data service processing method and related equipment
CN114090388A (en) Information acquisition method, server cluster, server and equipment
WO2024002299A1 (en) Application management method, application subscription method, and related device
CN114189525A (en) Service request method and device and electronic equipment
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN113315689B (en) Information processing method, system, electronic device and readable storage medium
CN116881040A (en) Service operation processing method and device, electronic device and storage medium
US11792095B1 (en) Computer network architecture mapping using metadata
CN112181681A (en) Remote calling method and device, computer equipment and storage medium
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
CN111752728B (en) Message transmission method and device
US7912922B2 (en) Globally unique instance identification
CN114003384A (en) Task management method, device and equipment
CN112559472A (en) File transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327