CN114172946A - Request result sending method and device, electronic equipment and computer readable medium - Google Patents

Request result sending method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN114172946A
CN114172946A CN202111476401.0A CN202111476401A CN114172946A CN 114172946 A CN114172946 A CN 114172946A CN 202111476401 A CN202111476401 A CN 202111476401A CN 114172946 A CN114172946 A CN 114172946A
Authority
CN
China
Prior art keywords
target
request
service registry
client
target 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
CN202111476401.0A
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202111476401.0A priority Critical patent/CN114172946A/en
Publication of CN114172946A publication Critical patent/CN114172946A/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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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

Abstract

The embodiment of the disclosure discloses a request result sending method, a request result sending device, electronic equipment and a computer readable medium. One embodiment of the method comprises: determining whether a communication connection exists between the client and a target client in response to receiving a request sent by the target server, wherein the request is a request to be sent to the target client; in response to determining that no service registration center exists, sending a request to each service registration center in the service registration center cluster with the communication connection, excluding the first target service registration center, wherein each service registration center comprises: the second target service registration center is in communication connection with the target client; and responding to a request result sent by the second target service registration center, and sending the request result to the target server, wherein the request result is a result returned by the target client aiming at the request sent by the second target service registration center. The implementation method can quickly and efficiently send the request of the server to the target client.

Description

Request result sending method and device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a request result sending method, an apparatus, an electronic device, and a computer-readable medium.
Background
Currently, microservice-based applications tend to be distributed systems running on multiple machines. For the micro-service interaction process, the server sends a request to the client, and the method generally adopted is as follows: the server side directly sends the request to the client side.
However, when the request is sent to the client in the above manner, the following technical problems often exist:
the server side often has communication connection with a large number of clients, and when the server side sends requests to more clients simultaneously, the problem of request sending failure often exists. In addition, the request sending delay is large, and the request sending efficiency of the server is greatly influenced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a request result sending method, apparatus, electronic device and computer readable medium to solve the technical problems mentioned in the above background section.
In a first aspect, some embodiments of the present disclosure provide a request result sending method, including: responding to a received request sent by a target server, and determining whether a communication connection exists between the client and the target client, wherein the request is a request to be sent to the target client; in response to determining that the request does not exist, sending the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists, wherein each service registry comprises: a second target service registration center in communication connection with the target client; and sending the request result to the target server in response to receiving a request result sent by the second target service registry, wherein the request result is a result returned by the target client for the request sent by the second target service registry.
Optionally, the method further includes: and sending the request to the target client in response to determining that the request exists.
Optionally, the target client sets a limitation of one-way communication for the target server.
Optionally, each service registry in the service registry cluster is in communication connection with a predetermined number of clients.
Optionally, the target server sends a first target message indicating that the target server normally works to a first target service registration center at regular time.
Optionally, the target client sends a second target message indicating that the target client normally operates to a second target service registration center at regular time.
Optionally, the target client obtains the request through the following steps: determining whether a communication connection exists with the target client in response to receiving the request sent by the first target service registration center; and sending the request to the target client in response to determining that the request exists.
In a second aspect, some embodiments of the present disclosure provide a request result transmitting apparatus, including: the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is configured to respond to the received request sent by a target server and determine whether a communication connection exists with a target client, and the request is a request to be sent to the target client; a first sending unit, configured to send, in response to determining that the request does not exist, the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists, where each service registry includes: a second target service registration center in communication connection with the target client; and a second sending unit, configured to send, in response to receiving a request result sent by the second target service registry, the request result to the target server, where the request result is a result returned by the target client for the request sent by the second target service registry.
Optionally, the apparatus further comprises: and sending the request to the target client in response to determining that the request exists.
Optionally, the target client sets a limitation of one-way communication for the target server.
Optionally, each service registry in the service registry cluster is in communication connection with a predetermined number of clients.
Optionally, the target server sends a first target message indicating that the target server normally works to a first target service registration center at regular time.
Optionally, the target client sends a second target message indicating that the target client normally operates to a second target service registration center at regular time.
Optionally, the target client obtains the request through the following steps: determining whether a communication connection exists with the target client in response to receiving the request sent by the first target service registration center; and sending the request to the target client in response to determining that the request exists.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, where the program when executed by a processor implements a method as described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following beneficial effects: the request result sending method of some embodiments of the present disclosure can quickly and efficiently send the request of the server to the target client. Specifically, the reason why the server cannot efficiently and quickly send the request to the target client is that: the server side is often in communication connection with various clients in a massive level, and when more clients are in communication connection with the server side, communication faults are often caused due to excessive connection number. Thus, the communication between the server and the client is not efficient enough. Based on this, the request result sending method of some embodiments of the present disclosure may first determine whether there is a communication connection with the target client in response to receiving a request sent by the target server, where the request is a request to be sent to the target client. Here, by determining whether the first target service registry has a communication connection with the target client, it can be efficiently determined whether the request can be directly issued to the target client. Then, in response to determining that the request does not exist, sending the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists, wherein each service registry comprises: and the second target service registration center is in communication connection with the target client. Here, the request is sent to each service registry, so that the second target service registry can efficiently send the request to the target client. And finally, responding to the received request result sent by the second target service registration center, and efficiently sending the request result to the target service end. Wherein the request result is a result returned by the target client in response to the request sent by the second target service registry. Here, by setting the service registry cluster to complete the communication connection between the server and the target client, the occurrence of request sending failure can be greatly reduced. In addition to this, the side reduces the latency of the request transmission.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
1-2 are schematic diagrams of one application scenario of a request result transmission method according to some embodiments of the present disclosure;
fig. 3 is a flow diagram of some embodiments of a request result transmission method according to the present disclosure;
FIG. 4 is a flow diagram of further embodiments of a request result sending method according to the present disclosure;
FIG. 5 is a schematic block diagram of some embodiments of a request result sending apparatus according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1-2 are schematic diagrams of an application scenario of a request result sending method according to some embodiments of the present disclosure.
In the application scenarios of fig. 1 and 2, the first target service registry 101 may first determine whether a communication connection exists with the target client 107 in response to receiving the request 103 sent by the target server 102. The request 103 is a request to be sent to the target client 107. Then, in response to determining that there is no service registration center, the first target service registration center 101 sends the request 103 to a service registration center cluster in which a communication connection exists, except for each service registration center of the first target service registration center 101. Wherein each of the service registration centers includes: a second target service registry 105 communicatively coupled to the target client 107. In this application scenario, the service registry cluster may include: a first target service registry 101, a second service registry 104, a second target service registry 105, a second service registry 106. Each of the service registries includes: a second service registry 104, a second target service registry 105, a second service registry 106. Finally, in response to receiving the request result 108 sent by the second target service registry 105, the first target service registry 101 sends the request result 108 to the target service end 102. The request result 108 is a result returned by the target client 107 in response to the request 103 sent by the second target service registry 105.
The first target service registry 101 may be hardware or software. When the first target service registration center is hardware, it may be implemented as a distributed cluster formed by multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the first target service registry is embodied as software, it may be installed in the above-listed hardware devices. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
In addition, the first target service registry 101 may also be a micro-service component in a micro-service architecture.
It should be understood that the number of first target service registries in fig. 1 and 2 is merely illustrative. There may be any number of first target service registries, as desired for the implementation.
With continued reference to fig. 3, a flow 300 of some embodiments of a request result transmission method according to the present disclosure is shown. The method for sending the request result comprises the following steps:
step 301, in response to receiving a request sent by a target server, determining whether a communication connection exists with a target client, where the request is a request to be sent to the target client.
In some embodiments, in response to receiving a request sent by a target server, an executing entity (e.g., the first target service registry 101 shown in fig. 1) of the request result sending method may determine whether a communication connection exists with a target client, where the request is a request to be sent to the target client. The request may be a request for the target server to access the target client, or may be a request for the target server to instruct the target client to perform a relevant operation. For example, the request may be a request by the target server to instruct the target client to return the stored target data set.
As an example, the execution agent may receive the request sent by the target server through a long connection.
As yet another example, in response to receiving a request sent by a target server, the execution body may determine whether a communication connection exists with the target client through various communication connection detection manners.
Step 302, in response to determining that the request does not exist, sending the request to the service registry cluster in which the communication connection exists, wherein each service registry of the first target service registry is removed.
In some embodiments, in response to determining that the request does not exist, the executing entity may send the request to a service registry cluster in which the communication connection exists, excluding the respective service registries of the first target service registry. Wherein each of the service registration centers includes: and the second target service registration center is in communication connection with the target client. The number of service registries included in the service registry cluster may be preset.
It is emphasized that the communication connections between the various service registries in the service registry cluster may be pre-established. For example, the communication connection between the various service registries in the service registry cluster may be in the form of a long connection.
In addition, the target client may establish a communication connection with the second target service registry through a long connection.
Further, each service registry in the service registry cluster may implement, but is not limited to, the following functions: service discovery, service configuration, service health detection. Wherein the service discovery may include: service registration, service de-registration, service subscription and service de-subscription. The service configuration may include: and configuring subscription and configuring issuing. The service health detection may be detecting a health condition of the service provider.
Step 303, in response to receiving the request result sent by the second target service registration center, sending the request result to the target service end.
In some embodiments, in response to receiving a request result sent by the second target service registry, the execution principal may send the request result to the target service. Wherein the request result is a result returned by the target client in response to the request sent by the second target service registry. For example, the request may be the target data set or storage location information of the target data set, in response to a request for instructing the target client to send the target data set to the target server.
In some optional implementations of some embodiments, the target client sets a limitation of one-way communication for the target server. For example, the target client is a client provided with a firewall. Thus, the target server cannot efficiently send the request to the target client. The target client may send the request result to the target server.
The method and the device can effectively solve the problem that the server cannot effectively communicate with the target client due to the fact that the target client sets the limit of one-way communication.
In some optional implementations of some embodiments, each second service registry in the second service registry cluster is in communication connection with a predetermined number of clients.
Here, for each service registry in the cluster of service registries, the following determining steps are performed to determine a predetermined number of clients to which the service registry is connected:
first, a client set is obtained.
Secondly, determining the number of each client in the client set;
and thirdly, determining a preset number of clients connected with the service registration center according to the number of the clients and the number of the service registration centers in the service registration center cluster.
As an example, a predetermined number of clients connected to the service registry are determined, and the predetermined number of clients connected to the service registry are determined by using a consistent hash algorithm.
It should be noted that, the purpose of setting each second service registry in the second service registry cluster to perform communication connection with a predetermined number of clients is to: the number of the clients may be in a massive level, and the second service registry connected with the clients randomly may fail. Therefore, the number of the second service registration centers connected with the clients is balanced, and the communication efficiency between the server and the clients can be greatly improved.
In some optional implementation manners of some embodiments, the target server sends a first target message, which indicates that the target server is working normally, to a first target service registration center at regular time. The time interval for the target server to send the first target message may be preset. The first target message may be a message of a predetermined format.
In some optional implementations of some embodiments, the target client periodically sends a second target message indicating that the target client is working normally to a second target service registry. The time interval for the target client to send the second target message may be preset. The second targeted message may be a message of a predetermined format.
In some optional implementations of some embodiments, the target client obtains the request by:
in a first step, in response to receiving the request sent by the first target service registry, the second target service registry may determine whether a communication connection exists with the target client.
As an example, in response to receiving the request sent by the first target service registry, the second target service registry may determine whether a communication connection exists with the target client through various communication connection detection methods.
And secondly, responding to the determined existence, and sending the request to the target client by the second target service registration center.
As an example, in response to determining that there is a presence, the second target service registry sends the request to the target client over a long connection.
The above embodiments of the present disclosure have the following beneficial effects: the request result sending method of some embodiments of the present disclosure can quickly and efficiently send the request of the server to the target client. Specifically, the reason why the server cannot efficiently and quickly send the request to the target client is that: the server side is often in communication connection with various clients in a massive level, and when more clients are in communication connection with the server side, communication faults are often caused due to excessive connection number. Thus, the communication between the server and the client is not efficient enough. Based on this, the request result sending method of some embodiments of the present disclosure may first determine whether there is a communication connection with the target client in response to receiving a request sent by the target server, where the request is a request to be sent to the target client. Here, by determining whether the first target service registry has a communication connection with the target client, it can be efficiently determined whether the request can be directly issued to the target client. Then, in response to determining that the request does not exist, sending the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists, wherein each service registry comprises: and the second target service registration center is in communication connection with the target client. Here, the request is sent to each service registry, so that the second target service registry can efficiently send the request to the target client. And finally, responding to the received request result sent by the second target service registration center, and efficiently sending the request result to the target service end. Wherein the request result is a result returned by the target client in response to the request sent by the second target service registry. Here, by setting the service registry cluster to complete the communication connection between the server and the target client, the occurrence of request sending failure can be greatly reduced. In addition to this, the side reduces the latency of the request transmission.
With further reference to fig. 4, a flow 400 of further embodiments of a request result sending method according to the present disclosure is shown. The method for sending the request result comprises the following steps:
step 401, in response to receiving a request sent by a target server, determining whether a communication connection exists with the target client.
Step 402, in response to determining that the request does not exist, sending the request to a service registry cluster in which the communication connection exists, wherein each service registry of the first target service registry is removed.
Step 403, in response to receiving the request result sent by the second target service registration center, sending the request result to the target service end.
In some embodiments, the specific implementation of steps 401-403 and the technical effects thereof can refer to steps 301-303 in the embodiment corresponding to fig. 3, which are not described herein again.
Step 404, in response to determining that the request exists, sending the request to the target client.
In some embodiments, in response to determining the presence, the executing agent (e.g., the first target service registry 101 shown in fig. 1) may send the request to the target client.
As an example, in response to determining that there is, the execution principal may send the request to the target client over a long connection.
As can be seen from fig. 4, compared with the description of some embodiments corresponding to fig. 3, the flow 400 of the request result sending method in some embodiments corresponding to fig. 4 highlights the specific steps of sending the request to the target client by the first target service registry. Therefore, the solutions described in the embodiments can quickly and efficiently send the request of the server to the target client.
With further reference to fig. 5, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a request result sending apparatus, which correspond to those method embodiments illustrated in fig. 3, and which may be applied in various electronic devices in particular.
As shown in fig. 5, a request result transmitting apparatus 500 includes: a determination unit 501, a first transmission unit 502 and a second transmission unit 503. The determining unit 501 is configured to determine whether a communication connection exists with a target client in response to receiving a request sent by a target server, where the request is a request to be sent to the target client; a first sending unit 502, configured to send, in response to determining that there is no service registry, the request to each service registry excluding the first target service registry in the service registry cluster in which a communication connection exists, where each service registry includes: a second target service registration center in communication connection with the target client; a second sending unit 503, configured to send, in response to receiving a request result sent by the second target service registry, the request result to the target server, where the request result is a result returned by the target client for the request sent by the second target service registry.
In some optional implementations of some embodiments, the apparatus 500 further includes: a third transmitting unit (not shown). Wherein the third transmitting unit may be configured to: and sending the request to the target client in response to determining that the request exists.
In some optional implementations of some embodiments, the target client sets a limitation of one-way communication for the target server.
In some optional implementations of some embodiments, each service registry in the service registry cluster is in communication connection with a predetermined number of clients.
In some optional implementation manners of some embodiments, the target server sends a first target message, which indicates that the target server is working normally, to a first target service registration center at regular time.
In some optional implementations of some embodiments, the target client periodically sends a second target message indicating that the target client is working normally to a second target service registry.
In some optional implementations of some embodiments, the target client obtains the request by: determining whether a communication connection exists with the target client in response to receiving the request sent by the first target service registration center; and sending the request to the target client in response to determining that the request exists.
It will be understood that the elements described in the apparatus 500 correspond to various steps in the method described with reference to fig. 3. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and are not described herein again.
Referring now to fig. 6, shown is a schematic diagram of an electronic device 600 suitable for use in implementing some embodiments of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to a received request sent by a target server, and determining whether a communication connection exists between the client and the target client, wherein the request is a request to be sent to the target client; in response to determining that the request does not exist, sending the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists, wherein each service registry comprises: a second target service registration center in communication connection with the target client; and sending the request result to the target server in response to receiving a request result sent by the second target service registry, wherein the request result is a result returned by the target client for the request sent by the second target service registry.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor comprising: the device comprises a determining unit, a first sending unit and a second sending unit. The names of the units do not form a limitation on the units themselves in some cases, for example, the determining unit may also be described as "determining whether a communication connection exists with a target client in response to receiving a request sent by a target server, where the request is a unit of a request to be sent to the target client.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A request result sending method is applied to a first target service registration center in a service registration center cluster, and comprises the following steps:
determining whether a communication connection exists between the client and a target client in response to receiving a request sent by the target server, wherein the request is a request to be sent to the target client;
in response to determining that there is no service registry, sending the request to each service registry excluding the first target service registry in a cluster of service registries in which a communication connection exists, wherein each service registry comprises: the second target service registration center is in communication connection with the target client;
and responding to a request result sent by the second target service registration center, and sending the request result to the target server, wherein the request result is a result returned by the target client aiming at the request sent by the second target service registration center.
2. The method of claim 1, wherein the method further comprises:
in response to determining that there is, sending the request to the target client.
3. The method of claim 1, wherein the target client sets a limit for one-way communication for the target server.
4. The method of claim 1, wherein each service registry in the cluster of service registries has a communication connection with a predetermined number of clients.
5. The method of claim 1, wherein the target server periodically sends a first target message indicating that the target server is working normally to a first target service registry.
6. The method of claim 1, wherein the target client periodically sends a second target message to a second target service registry characterizing the target client's normal operation.
7. The method of claim 1, wherein the target client obtains the request by:
determining whether a communication connection exists with the target client in response to receiving the request sent by the first target service registry;
in response to determining that there is, sending the request to the target client.
8. A request result transmission apparatus comprising:
the device comprises a determining unit and a judging unit, wherein the determining unit is configured to respond to the receiving of a request sent by a target server and determine whether a communication connection exists with a target client, and the request is a request to be sent to the target client;
a first sending unit, configured to send the request to each service registry excluding the first target service registry in a service registry cluster in which a communication connection exists in response to determining that the request does not exist, wherein each service registry comprises: the second target service registration center is in communication connection with the target client;
a second sending unit, configured to send a request result sent by the second target service registry to the target server in response to receiving the request result, where the request result is a result returned by the target client for the request sent by the second target service registry.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-7.
CN202111476401.0A 2021-12-06 2021-12-06 Request result sending method and device, electronic equipment and computer readable medium Pending CN114172946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111476401.0A CN114172946A (en) 2021-12-06 2021-12-06 Request result sending method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111476401.0A CN114172946A (en) 2021-12-06 2021-12-06 Request result sending method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN114172946A true CN114172946A (en) 2022-03-11

Family

ID=80483325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111476401.0A Pending CN114172946A (en) 2021-12-06 2021-12-06 Request result sending method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN114172946A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006481A1 (en) * 2013-07-01 2015-01-01 International Business Machines Corporation Reliable Asynchronous Processing of a Synchronous Request
CN108418799A (en) * 2018-02-01 2018-08-17 北京云知声信息技术有限公司 Long establishment of connection method and system
WO2019228515A1 (en) * 2018-05-31 2019-12-05 华为技术有限公司 Remote procedure call protocol self-adaptation method, related device, and server
CN110753089A (en) * 2019-09-19 2020-02-04 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for managing client
US20200106840A1 (en) * 2017-06-02 2020-04-02 Huawei Technologies Co., Ltd. Service Discovery Method, Registration Center, and Device
CN111490890A (en) * 2019-01-28 2020-08-04 珠海格力电器股份有限公司 Hierarchical registration method, device, storage medium and equipment based on micro-service architecture
CN111866144A (en) * 2020-07-22 2020-10-30 苏州浪潮智能科技有限公司 Service request response method and device, FPGA (field programmable Gate array) equipment and storage medium
CN112114979A (en) * 2020-08-31 2020-12-22 厦门安胜网络科技有限公司 Remote procedure call method and device
CN112153155A (en) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 Service request method, device, computer equipment and medium in server cluster
CN112187958A (en) * 2020-11-11 2021-01-05 北京金和网络股份有限公司 Method and device for registering, discovering and forwarding microservice
CN113312154A (en) * 2021-06-30 2021-08-27 北京微纳星空科技有限公司 Method, system, equipment and storage medium for scheduling satellite service resources
CN113377465A (en) * 2021-06-07 2021-09-10 上海商汤智能科技有限公司 Service-based SDK calling method and device, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006481A1 (en) * 2013-07-01 2015-01-01 International Business Machines Corporation Reliable Asynchronous Processing of a Synchronous Request
US20200106840A1 (en) * 2017-06-02 2020-04-02 Huawei Technologies Co., Ltd. Service Discovery Method, Registration Center, and Device
CN108418799A (en) * 2018-02-01 2018-08-17 北京云知声信息技术有限公司 Long establishment of connection method and system
WO2019228515A1 (en) * 2018-05-31 2019-12-05 华为技术有限公司 Remote procedure call protocol self-adaptation method, related device, and server
CN111490890A (en) * 2019-01-28 2020-08-04 珠海格力电器股份有限公司 Hierarchical registration method, device, storage medium and equipment based on micro-service architecture
CN110753089A (en) * 2019-09-19 2020-02-04 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for managing client
CN111866144A (en) * 2020-07-22 2020-10-30 苏州浪潮智能科技有限公司 Service request response method and device, FPGA (field programmable Gate array) equipment and storage medium
CN112114979A (en) * 2020-08-31 2020-12-22 厦门安胜网络科技有限公司 Remote procedure call method and device
CN112153155A (en) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 Service request method, device, computer equipment and medium in server cluster
CN112187958A (en) * 2020-11-11 2021-01-05 北京金和网络股份有限公司 Method and device for registering, discovering and forwarding microservice
CN113377465A (en) * 2021-06-07 2021-09-10 上海商汤智能科技有限公司 Service-based SDK calling method and device, electronic equipment and storage medium
CN113312154A (en) * 2021-06-30 2021-08-27 北京微纳星空科技有限公司 Method, system, equipment and storage medium for scheduling satellite service resources

Similar Documents

Publication Publication Date Title
CN110311983B (en) Service request processing method, device and system, electronic equipment and storage medium
CN111694674B (en) Message distribution processing method, device, equipment and storage medium
CN108833251B (en) Method and apparatus for controlling network interconnection
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN112363879A (en) Cache server performance test method, device, equipment and medium
CN113760536A (en) Data caching method and device, electronic equipment and computer readable medium
CN114938395A (en) Service response method, device, equipment and storage medium
CN112748962A (en) Application loading method and device, electronic equipment and computer readable medium
CN111416851A (en) Method for session synchronization among multiple load balancers and load balancer
CN114257632B (en) Method and device for reconnecting broken wire, electronic equipment and readable storage medium
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN114172946A (en) Request result sending method and device, electronic equipment and computer readable medium
CN110278133B (en) Checking method, device, computing equipment and medium executed by server
CN114115941A (en) Resource sending method, page rendering method, device, electronic equipment and medium
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN113765972A (en) Data request response method, device, system, server and storage medium
CN111416852A (en) Method for session synchronization among multiple load balancers and load balancer
CN114745276B (en) Switch bandwidth adjusting method and device, electronic equipment and computer readable medium
CN113094002B (en) Message processing method, device, electronic equipment and computer medium
CN113535428B (en) Method, device, equipment and medium for processing request message and response message
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN115118727B (en) Data transmission method, device, equipment and storage medium of distributed computing architecture
CN112162868B (en) Data communication method, device and storage medium applied to cluster processing
CN115297046B (en) Gateway information sending method, device, electronic equipment, medium and product
CN117149870A (en) Data importing method, device, electronic equipment and computer readable 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