CN110650202A - Communication interaction method and device and electronic equipment - Google Patents

Communication interaction method and device and electronic equipment Download PDF

Info

Publication number
CN110650202A
CN110650202A CN201910918277.5A CN201910918277A CN110650202A CN 110650202 A CN110650202 A CN 110650202A CN 201910918277 A CN201910918277 A CN 201910918277A CN 110650202 A CN110650202 A CN 110650202A
Authority
CN
China
Prior art keywords
message
identification information
equipment
proxy server
bidirectional communication
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.)
Granted
Application number
CN201910918277.5A
Other languages
Chinese (zh)
Other versions
CN110650202B (en
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201910918277.5A priority Critical patent/CN110650202B/en
Publication of CN110650202A publication Critical patent/CN110650202A/en
Priority to PCT/CN2020/094553 priority patent/WO2021057086A1/en
Application granted granted Critical
Publication of CN110650202B publication Critical patent/CN110650202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Network services
    • H04L67/56Provisioning of proxy 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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the specification provides a communication interaction method, a communication interaction device and electronic equipment. The method comprises the following steps: after receiving the message sent by the first device, the proxy server forwards the message to the second device according to identification information carried in the message and used for identifying the two-way communication relationship between the first device and the second device; the proxy server is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation.

Description

Communication interaction method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a communication interaction method and apparatus, and an electronic device.
Background
Under the circumstances that web application contents are increasingly rich and functions are more powerful in recent years, bidirectional communication between a web page side and a server side has become an increasingly popular technology. For example: there is an online chat demand in websites such as online games or e-commerce, and the lottery platform needs to actively show users or prizes winning in real time.
Socket Websocket connection is a solution for the above two-way communication requirement, but the general implementation manner in the industry at present is to implement the Websocket function inside the engineering code of the server, which not only couples with the engineering code strongly, but also cannot ensure the communication performance, and the later code maintenance is very difficult. Therefore, there is a need for a more reliable and easy to maintain solution for two-way communication.
Disclosure of Invention
Embodiments of the present specification provide a communication interaction method and apparatus, and an electronic device, which can decouple a third-party component for bidirectional communication, such as a Websocket, from a device for performing information interaction, such as a server, so as to improve a reuse rate of the component, and reduce complexity and maintenance cost of a server engineering code.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
in a first aspect, a communication interaction method is provided, including:
the method comprises the steps that a proxy server receives a message sent by first equipment, wherein the message carries identification information used for identifying a two-way communication relationship between the first equipment and second equipment;
the proxy server forwards the message to the second equipment according to the identification information;
the proxy server is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation.
In a second aspect, a communication interaction apparatus is provided, including:
the message receiving unit is used for receiving a message sent by first equipment, wherein the message carries identification information used for identifying the bidirectional communication relationship between the first equipment and second equipment;
the message forwarding unit is used for forwarding the message to the second equipment according to the identification information;
the communication interaction device is a message transfer end between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation.
In a third aspect, an electronic device is provided, including:
a processor; and
a memory arranged to store computer executable instructions that when executed use the processor to perform the following:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and is connected with the other device through remote invocation.
In a fourth aspect, a computer-readable medium is provided that stores one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and is connected with the other device through remote invocation.
As can be seen from the technical solutions provided by the embodiments of the present specification, in the embodiments of the present specification, for two devices, such as a first device and a second device, which perform communication interaction in a bidirectional communication manner, information exchanged between the two devices is forwarded through a third-party independent middleware, such as an agent server; the proxy server receives a message sent by the first device, determines the second device according to identification information carried in the message and used for identifying the two-way communication relationship between the first device and the second device, and forwards the message to the second device; the proxy server is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation, so that a component for bidirectional communication, such as Websocket, is decoupled from at least one device, such as the server, in a form of the proxy server.
In the embodiment of the description, the decoupled proxy server is used for forwarding the interaction information between the devices, so that the reuse rate of the bidirectional communication component can be improved, and the complexity and the maintenance cost of the engineering code at the device side can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic logic diagram of a communication interaction method in accordance with one embodiment of the present description.
FIG. 2 is a schematic flow chart diagram of a communication interaction method in accordance with one embodiment of the present description.
FIG. 3 is a schematic flow chart diagram of a communication interaction method according to another embodiment of the present description.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present specification.
FIG. 5 is a schematic diagram of a communication interaction apparatus, according to one embodiment of the present description;
fig. 6 is a schematic structural diagram of a communication interaction apparatus according to another embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 1 is a schematic logic diagram of a communication interaction method in accordance with one embodiment of the present description. In the logic diagram, websocket is taken as an exemplary description scheme of the bidirectional communication connection, and those skilled in the art can substitute the websocket for the bidirectional communication connection constructed by other communication protocols under the guidance of the logic of the method. As shown in fig. 1, the method logic involves a client 102, a websocket proxy service cluster 104 formed of at least one websocket proxy server, an application server 106 containing at least one traffic type, and a cache layer 108. The client 102 and the websocket proxy service cluster 104 are in bidirectional communication connection through the websocket, and the websocket proxy service cluster 104 and the application server 106 are in communication connection through a process call. As can be seen, the websocket proxy service cluster 104 can indirectly enable two-way communication between the client 102 and the application server 106 as middleware.
In a particular embodiment, the two-way communication between the client 102 and the application server 106 is as follows:
1. a connection is established.
The client 120 (which may include a web page, a mobile browser) establishes a Websocket connection with the Websocket proxy server. A Websocket connection is used to participate in performing the communication connection of the client 102 with the specified application server 106.
2. The room identification is stored.
In order to identify the bidirectional communication relationship between the client 102 and the application server 106, where a Websocket connection participates, the Websocket proxy server generates a room identifier for each established Websocket connection, and stores the room identifier in the cache layer 108 in fig. 1, where the cache layer 108 may specifically be a Redis cache server. The method is characterized in that the reference of the room can be derived from the definition and application of the Websocket to the room in the scene of realizing the multi-room chat room, the technology is continuously used in the scheme, and the room id is adopted to identify the Websocket connection of the individual service or the mass-sending service connected to the same server so as to indicate the service type of the server in which the Websocket connection participates.
When generating the room identification, the room identification may be created according to the service type of the application server 106 to which the client 102 is to be finally connected. For example, for a service type of single chat or single game, a unique room identifier may be created for Websocket connection used by each client participating in the service, so as to implement service isolation; for the service types of the group chat room or the multiplayer game, a common room identifier can be established for the Websocket connection used by the clients participating in the group chat room or the multiplayer game so as to realize group sending interaction for the corresponding clients, such as issuing game bulletins or notifications.
3. The room identification is returned.
The Websocket proxy server returns the stored room identifier to the client, where the room identifier can identify the service type of the application server 106 participating in message sending.
4. And sending the message.
After the client 102 acquires the room identifier corresponding to the Websocket connection, the client can send a message to the room at any time, so as to further send the message to the specific application server pointed by the room through the Websocket proxy server. For example, the room identification may be carried in a message sent to the Websocket proxy server. The Websocket agent server can determine the application server 106 to which the message is correspondingly sent according to the room identifier carried in the message.
5. The message is forwarded.
The Websocket proxy server determines the application server 106 to which the message is correspondingly sent according to the room identifier carried in the message sent by the client, and forwards the message.
6. And (5) service processing.
The application server 106 executes corresponding service processing according to the received message. In an actual application scenario, after the application server 106 performs the service processing, sometimes it is not necessary to feed back the processing result to the client 102, and sometimes it is necessary to feed back the processing result. Depending on the specific service content of the service treatment.
7. And sending the message.
The application server 106 may actively send a message to the client 102, or may send a message to respond based on a message request of the client 102. When a message needs to be sent to the client 102, the application server 106 may send a message carrying a room identifier (e.g., a room id) to the Websocket proxy server first, so as to forward the message through the Websocket proxy server.
8. The message is forwarded.
The Websocket agent server determines the client 102 to which the message is sent according to the room identifier carried in the message, and forwards the message.
It can be seen that, the processing logic of the embodiment shown in fig. 1 extracts the relevant codes of Websocket configuration and processing from the device (e.g., application server) into a middleware, i.e., Websocket proxy server. The middleware is used for bearing the problems of functions, performance and the like of the Websocket, and the application server only needs to make access to the Websocket proxy server, and does not need to introduce libraries or instances related to the Websocket at all. The application server side can be conveniently expanded by marking a link between one client side or a group of client sides and the application server side through the concept of the room identification, for example, game announcement information can map the whole online player into a room, a private mailbox can take a single player as a room, and the room can be flexibly customized by a business system. And in the aspect of performance, the server layer can be solved by horizontally expanding the websocket proxy server. And the storage layer is used for storing the room information by introducing a high-performance cache layer such as redis, so that the query performance and the insertion performance are very good.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
FIG. 2 is a schematic flow chart diagram of a communication interaction method in accordance with one embodiment of the present description. The method can be applied to the processing logic shown in fig. 1 and executed by the proxy server. The proxy server is a message transfer terminal between the first device and the second device involved in the method, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation. The method comprises the following specific steps:
s202, the proxy server receives a message sent by the first device, wherein the message carries identification information for identifying the bidirectional communication relationship between the first device and the second device.
The first device and the second device may be a client and a server that are currently in bidirectional communication connection, such as Websocket connection, for communication interaction. In the scheme, the first device and the second device are not directly connected with each other like a Websocket, but forward the messages to and from the two devices by using the proxy server as a middleware.
The proxy server integrates a common component extracted and generated by configuration and processing related codes for realizing bidirectional communication connection on one of the two devices, and can perform bidirectional communication connection with the other device based on the component. Meanwhile, the proxy server can still be connected with the device extracted with the bidirectional communication code through remote calling.
For example, the first device is a client and the second device is a server, or the second device is a client and the first device is a server. The components on the proxy server for the bi-directional communication connection may be abstracted from the server. When the proxy server receives the message sent by the first device, the target second device to which the message is forwarded can be determined through the identification information carried in the message and used for identifying the bidirectional communication relationship between the first device and the second device. The identification information may be assigned to the first device and the second device by the proxy server when the bidirectional communication relationship between the first device and the second device is initially established.
In another embodiment, as shown in fig. 3, the steps of establishing the bidirectional communication relationship between the client and the server are as follows:
s302, the proxy server receives a connection request which is sent by the client and establishes a two-way communication relationship with the server.
When a two-way communication relationship needs to be established between the client and the server, the client can actively send a handshake connection to the proxy server by sending an http request so as to request the establishment of the two-way communication relationship between the client and the server.
S304, the proxy server establishes the bidirectional communication connection between the client and the proxy server and generates the identification information corresponding to the connection.
After the proxy server establishes the bidirectional communication connection between the proxy server and the client, such as the Websocket connection, in order to identify the bidirectional communication relationship between the client and the server corresponding to the connection, corresponding identification information may be generated for the connection.
Specifically, the proxy server may generate identification information corresponding to the created bidirectional communication connection according to the service type of the server to which the connection is directed. For example, as shown in fig. 1, identification information for establishing a bidirectional communication relationship with an application server of a service type may be created for application servers of different service types, respectively, and the bidirectional communication connection established between the client and the proxy server may be marked with the identification information.
For example, the identification information may include: and establishing room identifications according to the service types of different servers.
S306, the proxy server side feeds the generated identification information back to the client side.
Specifically, the proxy server feeds back identification information generated for each bidirectional communication connection to the corresponding client, and the client can send a message to the proxy server based on the identification information. Meanwhile, the agent server can store the identification information and the information of the bidirectional communication connection pointed by the identification information, such as the information of the client and the server in the bidirectional communication relation corresponding to the connection, to a specified storage position so as to facilitate searching. In order to facilitate the horizontal expansion of the storage function, a Redis cache server can be used for storing the information.
And S204, the proxy server forwards the message to the second equipment according to the identification information.
And the proxy server determines the second equipment to which the information is sent according to the identification information carried in the message sent by the first equipment, and forwards the message.
For example, the proxy server may obtain the second device to which the identification information is directed from the aforementioned memory, and forward the message to the second device.
In the embodiment of the description, the decoupled proxy server is used for forwarding the interaction information between the devices, so that the reuse rate of the bidirectional communication component can be improved, and the complexity and the maintenance cost of the engineering code at the device side can be reduced.
It should be noted that the execution subjects of the steps of the methods provided in fig. 2 and 3 may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of step 202 and step 204 may be device 1; for another example, the execution subject of step 202 may be device 1, and the execution subject of step 204 may be device 2; and so on.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The communication interaction method according to the embodiment of the present specification is described in detail above with reference to fig. 1 to 3. An electronic device according to an embodiment of the present specification will be described in detail below with reference to fig. 4. Referring to fig. 4, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the communication interaction device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and connected with the other device through remote invocation.
The method performed by the communication interaction apparatus as disclosed in the embodiment of fig. 2 in this specification can be applied to a processor, or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also execute the method in fig. 3 and implement the functions of the communication interaction apparatus in the embodiment shown in fig. 3, which are not described herein again in this specification.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Embodiments of the present specification also propose a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiments shown in fig. 2 and 3, and in particular to perform the following:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and connected with the other device through remote invocation.
Fig. 5 is a schematic structural diagram of a communication interaction device according to an embodiment of the present specification. Referring to fig. 5, in a software implementation, the communication interaction apparatus 500 may include:
a message receiving unit 501, configured to receive a message sent by a first device, where the message carries identification information used for identifying a bidirectional communication relationship between the first device and a second device;
a message forwarding unit 502, which forwards the message to the second device according to the identification information;
the communication interaction device is a message transfer end between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote calling.
According to the communication interaction device in the embodiment of the present specification, information exchanged between two devices, such as a first device and a second device, performing communication interaction in a bidirectional communication manner is forwarded; determining second equipment by receiving a message sent by first equipment according to identification information carried in the message and used for identifying the two-way communication relationship between the first equipment and the second equipment, and forwarding the message to the second equipment; the communication interaction device is a message transfer end between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote calling, so that a component for bidirectional communication, such as Websocket, is decoupled from at least one device, such as a server, in a proxy service form.
In the embodiment of the description, the communication interaction device serves as a decoupled proxy service to forward the interaction information between the devices, so that the reuse rate of the bidirectional communication component can be improved, and the complexity and the maintenance cost of the engineering code on the device side can be reduced.
Optionally, as an embodiment, the first device is a client and the second device is a server, or the second device is a client and the first device is a server.
Optionally, as shown in fig. 6, as an embodiment, the communication interaction apparatus 500 may further include:
a request receiving unit 601, configured to receive a connection request sent by a client and establishing a bidirectional communication relationship with a server;
a connection creating unit 602, which creates a bidirectional communication connection between the client and the proxy server, and generates identification information corresponding to the connection;
the information feedback unit 603 feeds back the generated identification information to the client.
Optionally, as one embodiment, the bidirectional communication includes Websocket communication.
Optionally, as an embodiment, the connection creating unit 602 creates identification information corresponding to the created bidirectional communication connection according to a service type of a server to which the connection is directed.
Optionally, as an embodiment, the identification information includes: and establishing room identifications according to the service types of different servers.
Optionally, as shown in fig. 6, as an embodiment, the communication interaction apparatus 500 may further include:
an information storage unit 604 that stores identification information and information of bidirectional communication connection to which it points to a specified storage location;
the message forwarding unit 502 obtains the second device to which the identification information is directed from the memory, and forwards the message to the second device. The communication interaction device 500 may also execute the method in the embodiments shown in fig. 2 and fig. 3, and implement the functions of the information sharing device in the embodiments shown in fig. 2 and fig. 3, which are not described herein again in this specification.
Optionally, as an embodiment, the message receiving unit 501 receives a message fed back by the second device, where the message carries identification information for identifying a bidirectional communication relationship between the first device and the second device; the message forwarding unit 502 forwards the message fed back by the second device to the first device according to the identification information. In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

Claims (11)

1. A communication interaction method, comprising:
the method comprises the steps that a proxy server receives a message sent by first equipment, wherein the message carries identification information used for identifying a two-way communication relationship between the first equipment and second equipment;
the proxy server forwards the message to the second equipment according to the identification information;
the proxy server is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation.
2. The method of claim 1, wherein the first device is a client and the second device is a server, or the second device is a client and the first device is a server.
3. The method of claim 2, wherein the method further comprises:
the proxy server receives a connection request which is sent by the client and establishes a two-way communication relationship with the server;
the proxy server side establishes a bidirectional communication connection between the client side and the proxy server side and generates identification information corresponding to the connection;
and the proxy server side feeds the generated identification information back to the client side.
4. The method of claim 3, wherein the two-way communication comprises a socket Websocket communication.
5. The method of claim 3, wherein the generating, by the proxy server, the identification information corresponding to the connection comprises:
and the proxy server generates the identification information corresponding to the connection according to the service type of the server to which the established bidirectional communication connection points.
6. The method of claim 5, wherein the identification information comprises: and establishing room identifications according to the service types of different servers.
7. The method of claim 5, wherein after the proxy server generates the identification information corresponding to the connection, the method further comprises:
the proxy server stores the identification information and the information of the bidirectional communication connection pointed by the identification information to a specified storage position;
the step that the proxy server forwards the message to the second device according to the identification information comprises the following steps:
and the proxy server acquires the second equipment pointed by the identification information from the specified storage position and forwards the message to the second equipment.
8. The method of claim 1, wherein after the proxy server forwards the message to the second device according to the identification information, the method further comprises:
the proxy server receives a message fed back by the second device, wherein the message carries identification information for identifying the bidirectional communication relationship between the first device and the second device;
and the proxy server forwards the message fed back by the second equipment to the first equipment according to the identification information.
9. A communication interaction apparatus, comprising:
the message receiving unit is used for receiving a message sent by first equipment, wherein the message carries identification information used for identifying the bidirectional communication relationship between the first equipment and second equipment;
the message forwarding unit is used for forwarding the message to the second equipment according to the identification information;
the communication interaction device is a message transfer end between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication and connected with the other device through remote invocation.
10. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that when executed use the processor to perform the following:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and is connected with the other device through remote invocation.
11. A computer readable medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
receiving a message sent by first equipment, wherein the message carries identification information for identifying a two-way communication relationship between the first equipment and second equipment;
forwarding the message to the second device according to the identification information;
the electronic device is a message transfer terminal between the first device and the second device, and is connected with one of the first device and the second device through bidirectional communication, and is connected with the other device through remote invocation.
CN201910918277.5A 2019-09-26 2019-09-26 Communication interaction method and device and electronic equipment Active CN110650202B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910918277.5A CN110650202B (en) 2019-09-26 2019-09-26 Communication interaction method and device and electronic equipment
PCT/CN2020/094553 WO2021057086A1 (en) 2019-09-26 2020-06-05 Communication interaction method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910918277.5A CN110650202B (en) 2019-09-26 2019-09-26 Communication interaction method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110650202A true CN110650202A (en) 2020-01-03
CN110650202B CN110650202B (en) 2021-02-19

Family

ID=68992750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910918277.5A Active CN110650202B (en) 2019-09-26 2019-09-26 Communication interaction method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN110650202B (en)
WO (1) WO2021057086A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405028A (en) * 2020-03-12 2020-07-10 中国建设银行股份有限公司 Information processing method, information processing apparatus, server, electronic device, and medium
CN111541730A (en) * 2020-02-25 2020-08-14 中联重科股份有限公司 Mixer truck system, pumping system, remote server and execution method thereof
CN112187869A (en) * 2020-09-03 2021-01-05 京东数字科技控股股份有限公司 Remote debugging system and method of IOT device, electronic device and storage medium
CN112202904A (en) * 2020-09-30 2021-01-08 深圳壹账通智能科技有限公司 Information interaction method, device and medium
WO2021057086A1 (en) * 2019-09-26 2021-04-01 支付宝(杭州)信息技术有限公司 Communication interaction method and apparatus, and electronic device
CN112637324A (en) * 2020-12-18 2021-04-09 北京浪潮数据技术有限公司 Communication method, device, equipment and medium for ambari server and agent

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979262B (en) * 2022-04-25 2024-04-19 阿里云计算有限公司 Access method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546800A (en) * 2012-01-06 2012-07-04 华为技术有限公司 Handshake and communication methods for gateway, gateway and Web communication system
CN103458034A (en) * 2013-09-04 2013-12-18 国云科技股份有限公司 Method for having access to SPICE protocol remote desktop through WEB page
CN104580097A (en) * 2013-10-22 2015-04-29 腾讯科技(深圳)有限公司 Data processing method, device and system
CN104580531A (en) * 2015-02-05 2015-04-29 湖南合天智汇信息技术有限公司 Web remote desktop access control method based on WebSocket agency
CN106161130A (en) * 2015-04-14 2016-11-23 阿里巴巴集团控股有限公司 The performance monitoring device of sing on web Socket agreement, system and method
CN106330955A (en) * 2016-09-23 2017-01-11 奕甲智能技术(上海)有限公司 Instant messaging extension method and system
US20170222984A1 (en) * 2009-06-22 2017-08-03 Citrix Systems, Inc. Systems and methods for encoding the core identifier in the session identifier
US20170272499A1 (en) * 2016-03-17 2017-09-21 Delta Electronics (Shanghai) Co., Ltd Method and device for loading webpage
CN108282396A (en) * 2018-02-13 2018-07-13 湖南快乐阳光互动娱乐传媒有限公司 Multi-level message broadcasting method and system in IM (instant Messaging) cluster
US20180234506A1 (en) * 2017-02-14 2018-08-16 Gu Zhang System and methods for establishing virtual connections between applications in different ip networks
CN110213155A (en) * 2019-05-06 2019-09-06 腾讯科技(深圳)有限公司 Communication processing method, device and relevant device, storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4162347B2 (en) * 2000-01-31 2008-10-08 富士通株式会社 Network system
CN103023940A (en) * 2011-09-27 2013-04-03 腾讯科技(深圳)有限公司 Method and device for transmitting data between PC (Personal Computer) and mobile terminal
CN107733890B (en) * 2017-10-17 2020-12-29 广州亦云信息技术股份有限公司 Cross-network communication method based on web protocol, electronic equipment, storage medium and system
CN109547567B (en) * 2018-12-25 2021-10-22 北京市天元网络技术股份有限公司 Proxy connection method and device
CN110650202B (en) * 2019-09-26 2021-02-19 支付宝(杭州)信息技术有限公司 Communication interaction method and device and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170222984A1 (en) * 2009-06-22 2017-08-03 Citrix Systems, Inc. Systems and methods for encoding the core identifier in the session identifier
CN102546800A (en) * 2012-01-06 2012-07-04 华为技术有限公司 Handshake and communication methods for gateway, gateway and Web communication system
CN103458034A (en) * 2013-09-04 2013-12-18 国云科技股份有限公司 Method for having access to SPICE protocol remote desktop through WEB page
CN104580097A (en) * 2013-10-22 2015-04-29 腾讯科技(深圳)有限公司 Data processing method, device and system
CN104580531A (en) * 2015-02-05 2015-04-29 湖南合天智汇信息技术有限公司 Web remote desktop access control method based on WebSocket agency
CN106161130A (en) * 2015-04-14 2016-11-23 阿里巴巴集团控股有限公司 The performance monitoring device of sing on web Socket agreement, system and method
US20170272499A1 (en) * 2016-03-17 2017-09-21 Delta Electronics (Shanghai) Co., Ltd Method and device for loading webpage
CN106330955A (en) * 2016-09-23 2017-01-11 奕甲智能技术(上海)有限公司 Instant messaging extension method and system
US20180234506A1 (en) * 2017-02-14 2018-08-16 Gu Zhang System and methods for establishing virtual connections between applications in different ip networks
CN108282396A (en) * 2018-02-13 2018-07-13 湖南快乐阳光互动娱乐传媒有限公司 Multi-level message broadcasting method and system in IM (instant Messaging) cluster
CN110213155A (en) * 2019-05-06 2019-09-06 腾讯科技(深圳)有限公司 Communication processing method, device and relevant device, storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057086A1 (en) * 2019-09-26 2021-04-01 支付宝(杭州)信息技术有限公司 Communication interaction method and apparatus, and electronic device
CN111541730A (en) * 2020-02-25 2020-08-14 中联重科股份有限公司 Mixer truck system, pumping system, remote server and execution method thereof
CN111405028A (en) * 2020-03-12 2020-07-10 中国建设银行股份有限公司 Information processing method, information processing apparatus, server, electronic device, and medium
CN111405028B (en) * 2020-03-12 2022-05-27 中国建设银行股份有限公司 Information processing method, device, server, electronic device and medium
CN112187869A (en) * 2020-09-03 2021-01-05 京东数字科技控股股份有限公司 Remote debugging system and method of IOT device, electronic device and storage medium
CN112202904A (en) * 2020-09-30 2021-01-08 深圳壹账通智能科技有限公司 Information interaction method, device and medium
CN112637324A (en) * 2020-12-18 2021-04-09 北京浪潮数据技术有限公司 Communication method, device, equipment and medium for ambari server and agent

Also Published As

Publication number Publication date
CN110650202B (en) 2021-02-19
WO2021057086A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
CN110650202B (en) Communication interaction method and device and electronic equipment
JP7422834B2 (en) Servers, programs and information processing methods
CN112350924B (en) Communication method, communication device, communication terminal and storage medium
CN109639636B (en) Service data forwarding method, service data processing method, service data forwarding device, service data processing device and electronic equipment
CN111031058A (en) Websocket-based distributed server cluster interaction method and device
CN109660594B (en) Directional pushing method, display method, device and equipment for business processing result
US20140325601A1 (en) Managing private information in instant messaging
US11019008B2 (en) Method, public account server, and mobile terminal for sending and generating cards
CN107948048B (en) Method and device for forwarding chat information and electronic equipment
US11758087B2 (en) Multimedia conference data processing method and apparatus, and electronic device
CN112312222A (en) Video sending method and device and electronic equipment
CN110971984B (en) Wheat connecting method, device, system, equipment and storage medium
CN113489636A (en) Location-based access control for human dialog entities
CN105553831A (en) Message delivery method and system
CN110781373A (en) List updating method and device, readable medium and electronic equipment
EP2974159B1 (en) Method, device and system for voice communication
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
CN108965359B (en) Communication method, communication device, readable medium, and electronic apparatus
CN112291216B (en) Communication method and device and electronic equipment
CN112947880A (en) Screen projection method and device and electronic equipment
CN111367689A (en) Interactive prompt information sending method and device of online document and electronic equipment
CN105429981A (en) Game voice transmission method, terminal, voice service module and game system
CN113888170A (en) Address tracing method, device and equipment
CN112291573B (en) Live stream pushing method and device, electronic equipment and computer readable medium
CN113890772A (en) Information processing method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant