CN114866594B - Device connection management method, device, system, server and readable storage medium - Google Patents

Device connection management method, device, system, server and readable storage medium Download PDF

Info

Publication number
CN114866594B
CN114866594B CN202210449742.7A CN202210449742A CN114866594B CN 114866594 B CN114866594 B CN 114866594B CN 202210449742 A CN202210449742 A CN 202210449742A CN 114866594 B CN114866594 B CN 114866594B
Authority
CN
China
Prior art keywords
server
storage area
equipment
mapping relation
connection
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.)
Active
Application number
CN202210449742.7A
Other languages
Chinese (zh)
Other versions
CN114866594A (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202210449742.7A priority Critical patent/CN114866594B/en
Publication of CN114866594A publication Critical patent/CN114866594A/en
Application granted granted Critical
Publication of CN114866594B publication Critical patent/CN114866594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application is applicable to the technical field of the Internet of things, and provides a device connection management method, a device connection management device, a device connection management system, a server and a readable storage medium, wherein the device connection management method comprises the following steps: after establishing connection with equipment, inquiring a mapping relation corresponding to the equipment in a first storage area; if the query result is a null value, storing the mapping relation connected with the equipment in the first storage area; and if the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, deleting the mapping relation between the equipment and the second server in the first storage area by the second server, and writing the mapping relation connected with the equipment into the first storage area. According to the method and the device, the one-to-one correspondence connection between the equipment and the service node can be ensured, and the problem of waste of the service end and network resources caused when the task message is pushed can be improved based on the one-to-one correspondence connection.

Description

Device connection management method, device, system, server and readable storage medium
Technical Field
The application belongs to the technical field of the internet of things, and particularly relates to a device connection management method, a device connection management system, a server and a readable storage medium.
Background
Along with the development of the internet of things technology, the requirements of people on the communication quality of the internet of things are gradually improved. The client and the server establish a communication channel in a long connection mode, so that smoothness and stability of communication connection between the client and the server are kept.
At present, as the number of communication connections between a client and a server increases, the server adopts a distributed cluster mode to maintain the communication connection of all devices; in a traditional distributed cluster, when a message is pushed, the message needs to be broadcast to all hosts in the cluster, so that waste of a server side and network resources is caused.
Disclosure of Invention
The embodiment of the application provides a device connection management method, a device connection management system, a server and a readable storage medium, which can solve the problem of waste of a server and network resources caused when a task message is pushed.
In a first aspect, the present application provides a device connection management method, applied to a first server, where the method may include:
after establishing connection with equipment, inquiring a mapping relation corresponding to the equipment in a first storage area;
if the query result is a null value, storing the mapping relation connected with the equipment in the first storage area;
If the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, deleting the mapping relation between the equipment and the second server in the first storage area by the second server, and writing the mapping relation connected with the equipment into the first storage area;
and the disconnection is used for indicating the second server to disconnect the connection with the equipment, and deleting the mapping relation between the equipment and the second server in the first storage area when the second server determines that the mapping relation connected with the equipment meets the deletion condition after the connection is disconnected.
The first storage area may be, for example, a database of the server cluster stored in the form of key-value-pair-based. The second server is any one of the service nodes in the server cluster except the first server.
Illustratively, the deletion conditions include: and the mapping relation corresponding to the equipment in the first storage area acquired by the second server is matched with the connection information stored by the second server.
In a possible implementation manner of the first aspect, after the writing of the mapping relation connected to the device into the first storage area, the method further includes:
When the disconnection of the device is detected, acquiring a mapping relation corresponding to the device in the first storage area;
if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area, deleting the mapping relation of the first storage area; the connection information of the second storage area is cached information when the first server establishes connection with the equipment.
For example, the connection information of the second storage area may be connection context information cached in the first server.
In a possible implementation manner of the first aspect, after the writing of the mapping relation connected to the device into the first storage area, the method further includes:
receiving a disconnection request sent by a second server, wherein the disconnection request is generated when the second server establishes connection with the equipment and the mapping relation between the equipment and the first server is queried in the first storage area;
based on the disconnection request, disconnecting the connection with the equipment, and acquiring a mapping relation corresponding to the equipment in the first storage area after the connection is disconnected;
And deleting the mapping relation of the first storage area if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area.
Illustratively, the second server is any one of the service nodes in the server cluster other than the first server.
In a possible implementation manner of the first aspect, the mapping relation connected with the device includes a connection identifier;
and if the obtained mapping relationship of the first storage area is matched with the connection information of the second storage area, deleting the mapping relationship of the first storage area, including:
and deleting the mapping relation of the first storage area if the connection identifier of the mapping relation of the first storage area is matched with the connection identifier of the connection information of the second storage area.
The mapping relationship may be a corresponding relationship between the device information, the server node information, and the connection identifier, where the mapping relationship may be represented by a key value pair; the connection information may include a device identification and a connection identification; the connection identification may be a time stamp or a thread identifier at the time of establishing the connection; the matching of the mapping relation of the first storage area with the connection information of the second storage area further comprises: server node information and connection identifiers in the mapping relation are respectively matched with the server node information and the connection identifiers in the connection information, or the connection identifiers in the mapping relation are matched with the connection identifiers in the connection information; the connection identification matching comprises the following steps: the timestamp or thread identifier is the same.
In a possible implementation manner of the first aspect, after the obtaining a mapping relationship corresponding to the device in the first storage area, the method further includes:
if the connection identifier of the mapping relation of the first storage area is not matched with the connection identifier of the connection information of the second storage area, the mapping relation of the first storage area is not deleted;
the mapping relation of the first storage area and the connection information of the second storage area are respectively generated when the first server and the equipment are connected in different threads or time.
The connection identification may be, for example, a timestamp or a thread identifier at the time the connection was established; the unmatched mapping relation of the first storage area and the connection information of the second storage area further comprises: the server node information in the two mapping relations is the same and the connection identifiers are not matched; the connection identification mismatch includes a timestamp or thread identifier difference.
In a possible implementation manner of the first aspect, after the writing of the mapping relation connected to the device in the first storage area, the method further includes:
when a task message is acquired, the task message is sent to the connected equipment;
The task message is pushed to the first server by the server cluster based on a mapping relation corresponding to the device in the first storage area, the server cluster comprises the first server, the first storage area is a storage area corresponding to the server cluster, and the second storage area is a storage area of the first server.
In a second aspect, an embodiment of the present application provides a device connection management apparatus, which may include:
the query unit is used for querying the mapping relation corresponding to the equipment in the first storage area after establishing connection with the equipment;
the processing unit is used for storing the mapping relation connected with the equipment in the first storage area if the query result is a null value; if the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, deleting the mapping relation between the equipment and the second server in the first storage area by the second server, and writing the mapping relation connected with the equipment into the first storage area; the disconnection request is used for indicating the second server to disconnect from the equipment, and deleting the mapping relation between the equipment and the second server in the first storage area when the second server determines that the mapping relation connected with the equipment meets the deletion condition after the connection is disconnected.
In a third aspect, the present application provides a server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a device connection management system, including a server cluster, a first storage area, and a control service module; the server cluster comprises the servers of the third aspect; the first storage area is used for storing the mapping relation between the server and the equipment connection; and the control service module is used for reading the mapping relation corresponding to the equipment in the first storage area when pushing the task message, and pushing the task message to a server connected with the equipment in the server cluster according to the mapping relation.
In a fifth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, which when executed by a processor implements the method of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, which when run on a server, causes the server to perform the method of the first aspect described above.
It will be appreciated that the advantages of the second to sixth aspects may be found in the relevant description of the first aspect and are not described here.
Compared with the prior art, the beneficial effects that this application exists are: after the connection between the equipment and the server is established, whether the mapping relation corresponding to the equipment exists in the first storage area or not is checked, if not, the mapping relation of the connection between the server and the equipment is written into the first storage area, if so, the mapping relation of the connection between the equipment and other servers is deleted, then the mapping relation of the connection between the equipment and the other servers is written into the first storage area, only the unique corresponding connection relation of the equipment is ensured to be stored in the first storage area, and the mapping relation in the first storage area is ensured to be the one-to-one corresponding connection relation of the equipment and the service node, so that the mapping relation based on the first storage area can only be pushed to the servers connected with the equipment when the server cluster performs task message pushing, and broadcasting pushing to all servers in the server cluster is not needed; especially when the server cluster scale is large, the problem of server and network resource waste caused by task message pushing is solved, and the task message pushing efficiency is greatly improved; has stronger usability and practicability.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic architecture diagram of a connection management system according to an embodiment of the present application;
fig. 2 is a schematic implementation flow chart of a device connection management method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a complete interaction flow of a server write mapping relationship provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of an interaction flow for connecting and disconnecting a server and a device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an interaction flow of different threads of a server with device connection according to an embodiment of the present application;
fig. 6 is an interaction flow schematic diagram of a connection between a server and a device in succession according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a device connection management apparatus provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In the scene of establishing long connection between the Internet of things equipment and the server, when the number of the connections is small and the scale is small, the connection can be managed in a single-machine storage mode, and the connection is realized through a single host management device of a server; as the number of connections increases, the number of connections accommodated by a single host is limited, and a distributed server cluster is required to maintain all device connections. In the traditional distributed server cluster, when pushing the message, the message needs to be broadcast to all hosts in the server cluster, so that the problems of resource waste and cost increase are caused; and when the server cluster scale is expanded, the problem of resource waste is more serious.
Based on the above problems, the embodiments of the present application provide a device connection management method, by constructing a distributed connection management system, to ensure a unique correspondence between devices and service nodes connected in an entire cluster, and when performing message pushing, perform directional pushing based on the unique correspondence, without broadcasting to all hosts, so as to achieve resource saving and safely and efficiently process a request of message pushing.
Referring to fig. 1, fig. 1 is a schematic architecture diagram of a connection management system according to an embodiment of the present application. As shown in fig. 1, the distributed device connection management system may include a load balancing service module, a server cluster, a first storage area, and a control service module. The load balancing module is responsible for distributing the load of each server node in the server cluster, balancing and optimizing the use of server node resources and avoiding overload; the server cluster comprises a plurality of distributed server nodes; the first storage area is a storage area of a mapping relation between storage equipment and a server node in the equipment connection management system, for example, can be a cache area of a Redis database; after the unique corresponding connection is established between each server node and the equipment, when the first buffer area has no mapping relation corresponding to the equipment, the mapping relation of the connection can be written into the first storage area, and when the first buffer area comprises the mapping relation of the equipment connected with other servers, the mapping relation of the equipment connected with other servers in the first storage area is deleted, so that the unique corresponding connection relation of the equipment and the server node is ensured to be stored in the first buffer area.
For example, when the control service module needs to push the task message to the server node, the mapping relation corresponding to the device in the first storage area may be read first, and the task message is pushed to the server node connected to the device according to the server node information in the mapping relation, so that the task message is pushed only to the server node connected to the device, and is not required to be broadcasted to all the server nodes in the server cluster, so that server resources are saved, and data pushing efficiency is improved.
Illustratively, the key actually stored in the mapping relationship is a device identifier deviceId, the value is a map, and the connection identifier (e.g. timestamp, etc.) of the server node IP and the connection establishment is included. In the device connection management system, a plurality of hosts can be arranged in a server cluster, the connection condition of each server node is not required to be known, the mapping relation between a newly-built device identifier deviceId corresponding to the device connection and the server node IP is stored to Redis, the newly-written server node IP is used as a reference, if another server node IP is read before writing, a request is sent to inform the other server node to disconnect the connection, and then the mapping relation between the server node IP and the device connection is written to Redis. The control service module can determine whether effective connection exists by reading the server node IP in the cached mapping relation in the Redis, and directly send a transparent command to the server node corresponding to the IP address based on the IP address of the server node where the effective connection exists.
It should be noted that, the connection between the device and the server described in the present application may be a long connection established in the environment based on the internet of things.
Based on the architecture of the device connection management system, the embodiment of the application provides a device connection management method. The following describes a specific procedure implemented by the method through embodiments of the present application.
Referring to fig. 2, fig. 2 is a flow chart illustrating a device connection management method according to an embodiment of the present application. The execution subject of the method may be any one of the server nodes in the distributed server cluster in fig. 1; as shown in fig. 2, the method comprises the steps of:
s201, after the first server establishes connection with the equipment, the mapping relation corresponding to the equipment in the first storage area is queried.
In some embodiments, the first server is any one of the server nodes in the server cluster; the connection established with the device may be a long connection; the device can be a device supporting the transmission of the Internet of things, such as intelligent home equipment, and the like, and can be connected with a server in a long way in the using process of the device, so that the communication between the device and the server is smooth, and the timely transmission of the message is realized. The device may send a request to the first server to go online, the server verifies the validity of the device based on the request, and after the verification is passed, a connection is established with the device.
The first storage area is used for storing a mapping relation between the server and the device. The first storage area is a storage area (corresponding to the whole server cluster) of the device connection management system, and may be a storage system with a preset data structure set for any one server node in the server cluster, or an independent database in the device management system. For example, the storage area may be a remote dictionary service (Remote Dictionary Server, redis) database in the form of key-value based key-value pairs; when the data is high in concurrency or a large amount of data is read, redis is used as a cache, and the mapping relation of each device and the server which are connected in a unique corresponding mode is stored, so that the pressure of a database can be relieved, and the data writing and reading efficiency is improved.
After the connection between the first server and the device is established, the connection information corresponding to the connection may be cached, where the connection information may be a cached connection context, so that the connection information corresponding to the connection is recorded in a second storage area of the server, and the second storage area may be a local internal storage unit of the server. The connection information stored in the server can record a connection context corresponding to the connection, and the connection context can comprise a device identifier deviceId, a timestamp of connection establishment, a long connection communication interface socket and the like; the connection context stored in the server is used to indicate a one-to-one correspondence with the device connection.
In some embodiments, to ensure the uniqueness of the connection between the device and the server, after the first server establishes a connection with the device, it is required to first query whether a mapping relationship corresponding to the device exists in the first storage area. And the first server queries the mapping relation associated with the equipment in the first storage area according to the equipment identification.
For example, in order to ensure the uniqueness of the connection between the device and the server, the device carries a unique device identification ID when the device establishes a connection with the server; in the whole device connection management system, a device can be uniquely positioned by the device identification ID, so that the corresponding mapping relation is queried based on the device.
S202, if the query result is a null value, storing the mapping relation connected with the device in a first storage area.
In some embodiments, if there is no mapping relationship associated with the currently connected device in the first storage area, the query result is a null value; for example, if the response result obtained after the first server executes the query operation is "null", it indicates that there is no mapping relation corresponding to the device in the first storage area; no other servers in the server cluster are connected to the device than the first server. At this time, the mapping relationship corresponding to the connection between the first server and the device may be written into the first storage area. Therefore, only the mapping relation of the unique corresponding connection of the server and the equipment can be ensured to be stored in the first storage area.
The mapping relationship between the server and the device may be, for example, a mapping relationship between the device ID and an internet protocol (Internet Protocol, IP) address of the server; the first server generates the mapping relation and writes the mapping relation into a first storage area (Redis) in the form of key value pairs; when the device connection management system pushes the task message, the mapping relation in the first storage area can be read more safely and efficiently based on the device identification, so that the task message can be pushed to the target server according to the mapping relation, server resources are saved, and processing efficiency is improved.
And S203, if the query result is the mapping relation between the equipment and the second server, the first server sends a disconnection request to the second server, and writes the mapping relation connected with the equipment into the first storage area after deleting the mapping relation between the equipment and the second server in the first storage area by the second server.
In some embodiments, before the first server establishes a connection with the device, the device may also establish a connection with other servers in the server cluster, i.e. the mapping relationship of the connection of the device with other servers is stored in the first storage area. In order to ensure that only the mapping relation of the device and the only corresponding connection of the server is stored in the first storage area, the first server can send a disconnection request to other servers in a wired or wireless mode so as to inform the other servers of disconnecting the device; and after the other servers are disconnected with the equipment, judging whether the mapping relation acquired from the first storage area meets the deletion condition, and deleting the mapping relation connected with the equipment in the first storage area when the deletion condition is met. Therefore, after the first server writes the mapping relation connected with the equipment into the first storage area, only the mapping relation which is uniquely and correspondingly connected with the equipment and the server is stored in the first storage area.
For example, when a device is online to establish a connection with a server, the server generates a connection identifier corresponding to the connection established, and caches the connection identifier as connection information, e.g., a connection context, where the connection identifier may include a timestamp or a thread identifier.
The disconnection request is used for indicating that the second server is disconnected from the device, and deleting the mapping relationship between the device in the first storage area and the second server when the second server determines that the mapping relationship between the device and the connection of the device meets the deletion condition after the connection is disconnected. The deletion conditions include: and after the second server is disconnected, the mapping relation corresponding to the equipment, which is acquired from the first storage area, is matched with the connection information stored by the second server. After the second server receives the disconnection request sent by the first server, the second server disconnects the connection with the equipment, and acquires a mapping relation corresponding to the equipment in the first storage area after the disconnection, if the acquired mapping relation is matched with the connection information cached when the second server establishes connection with the equipment, and the deletion condition is met, the second server deletes the mapping relation of the equipment in the first storage unit and the connection of the second server.
In some embodiments, after the first server writes the mapping relationship with the device connection to the first storage area, the method further comprises:
receiving a disconnection request sent by a second server, wherein the disconnection request is generated when the second server establishes connection with equipment and a mapping relation between the equipment and the first server is queried in a first storage area; based on the disconnection request, disconnecting the connection with the equipment, and acquiring a mapping relation corresponding to the equipment in the first storage area after the connection is disconnected; and if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area, deleting the mapping relation of the first storage area.
The mapping relationship between the server and the device connection is a corresponding relationship between the server IP and the device identifier, and the mapping relationship further includes a connection identifier, where the connection identifier may be a timestamp or a thread identifier when the connection is established. When the server establishes connection with the equipment, connection information is also generated, and the connection information can comprise equipment identification and connection identification; the connection identification may include a timestamp or thread identifier at the time the connection was established.
Illustratively, when the first server establishes a connection with the device, connection information of the connection established at this time is locally generated and stored, and a mapping relationship of the connection with the device is written into the first storage area. The device establishes connection with other servers (for example, the second server), and the other servers acquire that the mapping relationship corresponding to the device in the first storage area is the mapping relationship between the first server and the device, so that the first server can also receive the disconnection request sent by the other servers. At this time, the first server disconnects the connection with the device based on the disconnection request, and obtains a mapping relationship corresponding to the device in the first storage area after the disconnection, where a connection identifier in the mapping relationship is the same as a connection identifier in the locally stored connection information, and then deletes the mapping relationship connected with the device in the first storage area.
Illustratively, the matching between the mapping relationship of the first storage area obtained by the first server and the connection information cached when the first server establishes a connection with the device includes: server node information and connection identifiers in the mapping relation are respectively matched with the server node information and the connection identifiers in the connection information, or the connection identifiers in the mapping relation are matched with the connection identifiers in the connection information; the connection identification matching comprises the following steps: the timestamp or thread identifier is the same.
In an application scenario, please refer to fig. 3, fig. 3 is a schematic diagram of a complete interaction flow of a server write mapping relationship provided in an embodiment of the present application; as shown in fig. 3, when different servers (e.g., the server 1 and the server 2) establish a connection with the device, a flowchart when the different servers perform writing or reading operations on the first storage area, respectively, may include the following steps:
1. the device sends an online request to the server 1.
2. The server 1 verifies the validity of the device and establishes a connection with the device after the verification is passed.
For example, when the server 1 establishes a connection with the device, the local second storage area records connection information of this time, where the connection information may include a server IP, a device identifier, and a connection identifier, and the connection identifier may include a timestamp or a thread identifier.
3. The method comprises the steps that a server 1 obtains a mapping relation corresponding to equipment in a first storage area; and if the return result is null, executing the next step.
4. The server 1 writes the mapping relation 1 of the equipment and the connection of the server 1 into a first storage area; and get a successful return.
5. The server 1 feeds back information of successful writing to the device.
6. The device sends an online request to the server 2.
7. The server 2 verifies the validity of the device and establishes a connection with the device after the verification is passed.
The server 2, upon establishing a connection with the device, records this connection information in a local second storage area, which may include a server IP, a device identification and a connection identification, which connection representation may include a timestamp or a thread identifier, for example.
8. The server 2 obtains the mapping relation corresponding to the device in the first storage area.
9. The server 2 obtains the mapping relation 1 of the device returned by the first storage area and the connection of the server 1.
10. The server 2 sends a disconnection request to the server 1.
11. The server 1 disconnects the connection with the device based on the disconnection request, and acquires the mapping relationship corresponding to the device in the first storage area after the disconnection.
12. The server 1 obtains the mapping relation 1 between the server 1 returned by the first storage area and the device connection.
13. Comparing the server IP and the time stamp in the mapping relation 1 with the server IP and the time stamp in the locally cached connection information by the server 1, and deleting the mapping relation 1 of the equipment in the first storage area and the connection of the server 1; and obtaining a message that the first storage area returns success; the server 1 returns a successful message to the server 2.
14. After receiving the successful message returned by the server 1, the server 2 writes the mapping relation 2 of the equipment and the server 2 into a first storage area; the server 2 obtains the successful message returned by the first storage area and normally processes the service information based on the mapping relation 2.
It should be noted that, the CPU or the GPU in the server may control the first storage area (Redis) of the device connection management system, and obtain the mapping relationship between the address written in the first storage area and the device connection of the server; when the stored mapping relation needs to be deleted, based on the identity of the equipment, determining the storage address of the mapping relation corresponding to the equipment, and deleting the data corresponding to the mapping relation.
By the mode, when the server establishes connection with the equipment, the server generates a mapping relation of the connection and writes the mapping relation into a first storage area of the equipment connection management system; based on the uniqueness of the device ID, a mapping relation of the device in the first storage area and the server which are in unique corresponding connection can be determined according to the located unique device, so that a target server in the mapping relation is determined, and task information and the like are directionally pushed to the target server; the waste of server resources is reduced, and the efficiency of message processing is improved.
In another application scenario, for an online-offline interaction flow of a device, after the first device writes the mapping relationship connected with the device into the first storage area, the method further includes:
when the first equipment detects that the connection with the equipment is disconnected, the mapping relation corresponding to the equipment in the first storage area is obtained; and if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area, deleting the mapping relation of the first storage area.
The connection information of the second storage area is cached information when the first server establishes connection with the equipment.
Referring to fig. 4, fig. 4 is a schematic diagram of an interaction flow for connecting and disconnecting a server and a device according to an embodiment of the present application; as shown in fig. 4, in a process of establishing connection and disconnection between the same device and a server, if no conflict exists between the device and the device (such as establishing connection between the same device and a plurality of servers), the overall interaction process of the device and the device may include the following steps:
1. the device sends an online request to the server.
2. The server verifies the validity of the device based on the online request by establishing a connection with the device.
3. The server obtains a mapping relation corresponding to the equipment in the first storage area; and obtaining a return result of the first storage area as a null value.
4. The server writes the mapping relation connected with the equipment into a first storage area; and obtaining a message that the first storage area returns success.
5. The server feeds back a successful message to the device. At this time, the server is normally connected with the device, and can normally process the service message.
6. The server detects a disconnection from the device.
For example, a long connection of a device to a server may be broken in a number of situations, such as: the device actively sends a FIN/RST message to the server to disconnect, or a load balancing module in connection transfer disconnects, or the server actively disconnects when judging that the message format error connection transmission fails, or the connection heartbeat timeout server judges that the connection fails and actively disconnects, and the like. When the connection is disconnected (disconnection caused by whatever reason), in order to write the mapping relation when other servers of the device are connected and ensure that the mapping relation uniquely corresponding to the device is stored in the Redis, the mapping relation cache needs to be deleted.
7. And the server acquires the mapping relation corresponding to the equipment in the first storage area.
8. And the server obtains the mapping relation returned by the first storage area and connected with the equipment.
9. The server compares the time stamp in the mapping relation with the time stamp in the locally cached connection information; the server deletes the mapping relation connected with the equipment; a first store is obtained to return a successful message.
By the method, in the process of once online and offline of the equipment, when the equipment is disconnected with the server, the mapping relation between the equipment and the server in the first storage area is deleted, so that the connection between the equipment online and the server in the server cluster is built again, the situation of conflict is avoided when the mapping relation is written in, the response efficiency of the first storage area when data is written in and read out is improved, and the resource utilization of the server cluster is saved.
In another scenario, after the first server obtains the mapping relationship corresponding to the device in the first storage area, the method further includes:
if the connection identifier of the mapping relation of the first storage area is not matched with the connection identifier of the connection information of the second storage area, the mapping relation of the first storage area is not deleted.
The mapping relation of the first storage area and the connection information of the second storage area are respectively generated when the first server and the equipment are connected in different threads or times.
For example, there are many concurrent situations in the first server, and the same flow may occur simultaneously between different threads of the same server or between different servers; in various situations, it is necessary to ensure that the mapping relationship between the device identifier deviceId read from the Redis and the server IP is valid (i.e. there is indeed a long connection of the device to the server IP).
Furthermore, in order to ensure that no false deletion occurs, the cached mapping relationship needs to carry a time stamp, a thread identifier or other connection identifiers which can be used for distinguishing the mapping relationship of equipment connection when the connection is established; meanwhile, the connection context cached in the server memory also needs to store a time stamp, a thread identifier or other connection identifiers corresponding to the mapping relationship when the connection is established. And the deleting operation is only executed when the connection identifier in the mapping relation is matched with the connection identifier of the connection context, so that the situation of false deletion is avoided.
Referring to fig. 5, fig. 5 is a schematic diagram of an interaction flow of connection between different threads and devices of a server according to an embodiment of the present application; as shown in fig. 5, when the same process occurs simultaneously on different threads of the same server, the interaction process may include the following steps:
Thread 1 for server:
1. after the equipment is on line, the server verifies the equipment, and the verification is passed, establishes a connection with the equipment and locally records a timestamp1 or a thread identifier 1 for establishing the connection.
2. The server obtains a mapping relation corresponding to the equipment in the first storage area; and obtaining a return result of the first storage area as a null value.
3. The server writes the mapping relation 1 between the thread 1 equipment and the server into a first storage area; and obtaining a message that the first storage area returns success.
Thread 2 for server:
4. after the equipment is on line, the server verifies the equipment, and the verification is passed, establishes a connection with the equipment and locally records a timestamp2 or a thread identifier 2 for establishing the connection.
5. The server obtains a mapping relation corresponding to the equipment in the first storage area; and obtaining a message that the first storage area returns a null value.
6. The server writes the mapping relation 2 between the thread 2 equipment and the server into a first storage area; obtaining a message that the first storage area returns success; and returns a successful message to the device based on the connection with the device.
It should be noted that, the thread 1 and the thread 2 may be processes executed concurrently, and when the mapping relationship corresponding to the device in the first storage area is obtained in the thread 2, the operation executed in the thread 1 is not written into the mapping relationship connected between the device and the server yet; therefore, different threads may obtain the condition that the returned result of the first storage area is a null value, and at this time, the mapping relation connected with the device can be written for different thread servers. However, when the server feeds back to the device that the write was successful in thread 1, the connection to the device may have been broken; at this point the server continues to perform the following steps at thread 1:
7. Obtaining a mapping relation corresponding to equipment in a first storage area; the first storage area is obtained and returned to the mapping relation 2 connected with the server at the thread 2 device.
8. The server compares the timestamp 2 in the mapping relation 2 with the timestamp1 of the connection established by the local record, or the thread identifier 2 in the mapping relation 2 is different from the thread identifier 1 of the connection established by the local record, and does not delete the mapping relation 2 of the first storage area. Therefore, the false deletion of the mapping relation of the first storage area is avoided, and the server can normally process service messages in the thread 2 based on the connection with the equipment.
For example, if the cached mapping relationship has no timestamp or thread identifier, only the server IP is compared with the device identifier, the result of the normal mapping relationship written by the thread 2 will be deleted by mistake, so that the correct mapping relationship cannot be found from redis; the time stamp or the thread identifier is added in the mapping relation, so that the written mapping relation can be ensured to be deleted only by the server; the method comprises the steps that a context established for each device connection in a server corresponds to the device connection one by one, when the server executes deletion, the server acquires a context of a corresponding device identifier deviceId from a local connection context collection set, verifies whether a timestamp or a thread identifier in the context is the same as that in a mapping relation, and does not delete if the timestamp or the thread identifier is different from the mapping relation; and the server performs the deletion operation of the mapping relationship only when the device connection is indeed disconnected. By the method, the unique correspondence of the device identifier deviceId-server IP-device connection cached in the Redis can be ensured.
Correspondingly, in another application scenario, the interaction flow of connecting the device with the server twice on line sequentially can comprise the following steps:
1. after the equipment is on line, the server verifies the equipment, and the connection is established with the equipment after the verification passes.
2. And the server acquires the mapping relation corresponding to the equipment in the first storage area, and obtains the return result of the first storage area as a null value.
3. And the server writes the mapping relation connected with the equipment into the first storage area to obtain a successful result returned by the first storage area. And the server returns a successful message to the equipment and normally processes the task information. When the server detects disconnection from the device, the server performs the following steps:
4. the server obtains the mapping relation corresponding to the equipment in the first storage area, and obtains the mapping relation between the equipment returned by the first storage area and the server connection.
5. Comparing the server IP and the timestamp in the obtained mapping relation with the server and the timestamp which establish connection with the local record, and deleting the mapping relation between the server and the equipment connection; and obtaining a message that the first storage area returns success.
6. After the equipment is online again, the server verifies the equipment, and the verification is carried out by establishing connection with the equipment; obtaining a mapping relation corresponding to the equipment in the first storage area; and obtaining a return result of the first storage area as a null value.
7. The server writes the mapping relation connected with the equipment into a first storage area; obtaining a successful return result of the first storage area; and returning a successful message to the device; task information is normally processed based on connection with the device.
In some embodiments, after writing the mapping relationship with the device connection in the first storage area, the method further comprises:
and when the task message is acquired, the task message is sent to the connected equipment.
The task message is pushed to a first server by a server cluster based on a mapping relation corresponding to equipment in a first storage area, the server cluster comprises the first server, the first storage area is a storage area corresponding to the server cluster, and the second storage area is a storage area of the first server.
The control service module in the device connection management system reads the mapping relation corresponding to the device in the first storage area before pushing the message, and pushes the message to the target server based on the mapping relation, so that the message does not need to be broadcast to all servers in the server cluster, other servers in the server cluster do not need to receive the message which does not need to be processed, the server and network resources are saved, and the response efficiency of the server is improved.
According to the embodiment of the application, as the cache of the mapping relation between the equipment ID and the server IP exists in the Redis, when a push task is executed, a push request can be sent to the server connected with the equipment only by reading the corresponding mapping relation, and broadcasting operation is not needed any more, so that the processing efficiency of the push request is greatly improved. Compared with a single-node server, the distributed server has more connection numbers and has the advantages of high availability and expansibility; comparing the multi-node servers which do not adopt the Redis cache mapping relation, if the multi-node servers do not ensure the connection uniqueness, the situation that the same equipment is simultaneously connected with a plurality of servers can exist, so that server resources are wasted; if the connection uniqueness is ensured, a large amount of network resources are required to be consumed for synchronizing the connection information of each server node, and each node also needs to consume server resources to store the connection information, so that the defects are more obvious when the cluster size is huge. Meanwhile, when the transparent transmission request is processed, in the traditional processing mode, the transparent transmission request sent to the equipment needs to be broadcasted to all server nodes in the server cluster, only the server node connected to the equipment normally processes the transparent transmission request, and other server nodes discard the corresponding request, so that a large amount of network resources are wasted. And when the same equipment is on line concurrently, the operation of deleting the mapping relation cache between different threads on the same server can be mutually influenced, so that business errors are caused, and the situation of false deletion can be avoided through the existence of the connection identifier (such as a time stamp and the like) in the mapping relation cache in the application. According to the embodiment of the application, the distributed long connection management system formed by the device connection management mode is adopted, when the device scale is increased, and under the condition of ensuring normal processing of the service, transverse capacity expansion can be conveniently carried out, and additional processing cost (such as overhead caused by the need of ensuring connection uniqueness to carry out synchronous information and broadcasting to all nodes and the like) cannot be caused by capacity expansion.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Fig. 7 shows a block diagram of a device connection management apparatus according to an embodiment of the present application, corresponding to the device connection management method described in the above embodiment, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
Referring to fig. 7, the apparatus includes:
a query unit 71, configured to query a mapping relationship corresponding to a device in a first storage area after a connection is established between the query unit and the device;
a processing unit 72, configured to store, if the query result is a null value, a mapping relationship connected to the device in the first storage area; if the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, deleting the mapping relation between the equipment and the second server in the first storage area by the second server, and writing the mapping relation connected with the equipment into the first storage area;
The disconnection request is used for indicating the second server to disconnect from the equipment, and deleting the mapping relation between the equipment and the second server in the first storage area when the second server determines that the mapping relation connected with the equipment meets the deletion condition after the connection is disconnected.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a device connection management system, which comprises a server cluster, a first storage area and a control service module; the server cluster comprises a plurality of servers; the first storage area is used for storing the mapping relation between the server and the equipment connection; and the control service module is used for reading the mapping relation corresponding to the equipment in the first storage area when pushing the task message, and pushing the task message to a server connected with the equipment in the server cluster according to the mapping relation.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
The present embodiments provide a computer program product which, when run on a server, causes the server to perform steps that enable the implementation of the method embodiments described above.
Fig. 8 is a schematic structural diagram of a server 8 according to an embodiment of the present application. As shown in fig. 8, the server 8 of this embodiment includes: at least one processor 80 (only one is shown in fig. 8), a memory 81 and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, the steps of the above embodiments being implemented when the processor 80 executes the computer program 82.
The server 8 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The server 8 may include, but is not limited to, a processor 80, a memory 81. It will be appreciated by those skilled in the art that fig. 8 is merely an example of server 8 and is not limiting of server 8, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 80 may be a central processing unit (Central Processing Unit, CPU), the processor 80 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may in some embodiments be an internal storage unit of the server 8, such as a hard disk or a memory of the server 8. The memory 81 may in other embodiments also be an external storage device of the server 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the server 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the server 8. The memory 81 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs etc., such as program codes of the computer program etc. The memory 81 may also be used to temporarily store data that has been output or is to be output.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium computer Memory, read-Only Memory (ROM), random access Memory (RAM Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A device connection management method, applied to a first server, the method comprising:
after establishing connection with equipment, inquiring a mapping relation corresponding to the equipment in a first storage area;
If the query result is a null value, storing the mapping relation connected with the equipment in the first storage area;
if the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, deleting the mapping relation between the equipment and the second server in the first storage area by the second server, and writing the mapping relation connected with the equipment into the first storage area;
the disconnection request is used for indicating the second server to disconnect from the equipment, and deleting the mapping relation between the equipment and the second server in the first storage area when the second server determines that the mapping relation connected with the equipment meets the deletion condition after the connection is disconnected.
2. The method of claim 1, wherein after the writing of the mapping relationship with the device connection to the first storage area, the method further comprises:
when the disconnection of the device is detected, acquiring a mapping relation corresponding to the device in the first storage area;
if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area, deleting the mapping relation of the first storage area;
The connection information of the second storage area is cached information when the first server establishes connection with the equipment.
3. The method of claim 1, wherein after the writing of the mapping relationship with the device connection to the first storage area, the method further comprises:
receiving a disconnection request sent by the second server, wherein the disconnection request is generated when the second server establishes connection with the equipment and the mapping relation between the equipment and the first server is queried in the first storage area;
based on the disconnection request, disconnecting the connection with the equipment, and acquiring a mapping relation corresponding to the equipment in the first storage area after the connection is disconnected;
and deleting the mapping relation of the first storage area if the acquired mapping relation of the first storage area is matched with the connection information of the second storage area.
4. A method according to claim 2 or 3, wherein the mapping relation with the device connection and the connection information of the second storage area respectively comprise connection identifications;
and if the obtained mapping relationship of the first storage area is matched with the connection information of the second storage area, deleting the mapping relationship of the first storage area, including:
And deleting the mapping relation of the first storage area if the connection identifier of the mapping relation of the first storage area is matched with the connection identifier of the connection information of the second storage area.
5. The method of claim 4, wherein after the obtaining the mapping relationship corresponding to the device in the first storage area, the method further comprises:
if the connection identifier of the mapping relation of the first storage area is not matched with the connection identifier of the connection information of the second storage area, the mapping relation of the first storage area is not deleted;
the mapping relation of the first storage area and the connection information of the second storage area are respectively generated when the first server and the equipment are connected in different threads or time.
6. A method as claimed in any one of claims 1 to 3, wherein after said writing of the mapping relation with the device connection to the first storage area, the method further comprises:
when a task message is acquired, the task message is sent to the connected equipment;
the task message is pushed to the first server by the server cluster based on a mapping relation corresponding to the device in the first storage area, the server cluster comprises the first server, the first storage area is a storage area corresponding to the server cluster, and the second storage area is a storage area of the first server.
7. A device connection management apparatus, comprising:
the query unit is used for querying the mapping relation corresponding to the equipment in the first storage area after establishing connection with the equipment;
the processing unit is used for storing the mapping relation connected with the equipment in the first storage area if the query result is a null value; if the query result is the mapping relation between the equipment and the second server, sending a disconnection request to the second server, and writing the mapping relation connected with the equipment into the first storage area after the second server deletes the mapping relation between the equipment and the second server in the first storage area based on the disconnection request;
the disconnection request is used for indicating the second server to disconnect from the equipment, and deleting the mapping relation between the equipment and the second server in the first storage area when the second server determines that the mapping relation connected with the equipment meets the deletion condition after the connection is disconnected.
8. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
9. The equipment connection management system is characterized by comprising a server cluster, a first storage area and a control service module;
the server cluster comprising the servers of claim 8;
the first storage area is used for storing the mapping relation between the server and the equipment connection;
and the control service module is used for reading the mapping relation corresponding to the equipment in the first storage area when pushing the task message, and pushing the task message to a server connected with the equipment in the server cluster according to the mapping relation.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor to implement the method of any one of claims 1 to 6.
CN202210449742.7A 2022-04-24 2022-04-24 Device connection management method, device, system, server and readable storage medium Active CN114866594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210449742.7A CN114866594B (en) 2022-04-24 2022-04-24 Device connection management method, device, system, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210449742.7A CN114866594B (en) 2022-04-24 2022-04-24 Device connection management method, device, system, server and readable storage medium

Publications (2)

Publication Number Publication Date
CN114866594A CN114866594A (en) 2022-08-05
CN114866594B true CN114866594B (en) 2023-08-08

Family

ID=82634098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210449742.7A Active CN114866594B (en) 2022-04-24 2022-04-24 Device connection management method, device, system, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN114866594B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351246A (en) * 2019-06-12 2019-10-18 深圳市奥克多普科技有限公司 Server cluster system Socket management method and device
CN112769919A (en) * 2020-12-30 2021-05-07 北京大米科技有限公司 Push flow task distribution method and device, storage medium and electronic equipment
CN113127199A (en) * 2021-04-22 2021-07-16 康键信息技术(深圳)有限公司 Load balancing configuration method, device, equipment and storage medium
CN113905005A (en) * 2021-09-30 2022-01-07 完美世界(北京)软件科技发展有限公司 Client state updating method and device for instant messaging
CN113923797A (en) * 2021-09-26 2022-01-11 深圳市广和通无线通信软件有限公司 Session establishing method, device, client device and computer storage medium
CN114024972A (en) * 2021-10-28 2022-02-08 平安科技(深圳)有限公司 Long connection communication method, system, device, equipment and storage medium
CN114201294A (en) * 2021-12-08 2022-03-18 北京百度网讯科技有限公司 Task processing method, device and system, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140113103A (en) * 2013-03-15 2014-09-24 삼성전자주식회사 Operating method for user system including host and memory system
US9538345B2 (en) * 2015-01-28 2017-01-03 Citrix Systems, Inc. Systems and methods for performing load balancing and message routing for short message peer to peer protocol

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351246A (en) * 2019-06-12 2019-10-18 深圳市奥克多普科技有限公司 Server cluster system Socket management method and device
CN112769919A (en) * 2020-12-30 2021-05-07 北京大米科技有限公司 Push flow task distribution method and device, storage medium and electronic equipment
CN113127199A (en) * 2021-04-22 2021-07-16 康键信息技术(深圳)有限公司 Load balancing configuration method, device, equipment and storage medium
CN113923797A (en) * 2021-09-26 2022-01-11 深圳市广和通无线通信软件有限公司 Session establishing method, device, client device and computer storage medium
CN113905005A (en) * 2021-09-30 2022-01-07 完美世界(北京)软件科技发展有限公司 Client state updating method and device for instant messaging
CN114024972A (en) * 2021-10-28 2022-02-08 平安科技(深圳)有限公司 Long connection communication method, system, device, equipment and storage medium
CN114201294A (en) * 2021-12-08 2022-03-18 北京百度网讯科技有限公司 Task processing method, device and system, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁戈."基于RDMA的分布式数据库内存存储系统".《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》.2020,全文. *

Also Published As

Publication number Publication date
CN114866594A (en) 2022-08-05

Similar Documents

Publication Publication Date Title
US10831612B2 (en) Primary node-standby node data transmission method, control node, and database system
CN112445626B (en) Data processing method and device based on message middleware
CN111049928A (en) Data synchronization method, system, electronic device and computer readable storage medium
CN111611249A (en) Data management method, device, equipment and storage medium
CN111651424B (en) Data processing method, device, data node and storage medium
CN112636987B (en) Cross-chain gateway determination method and system for block chain and terminal equipment
CN112039993B (en) Long connection address processing method and device
CN112148206A (en) Data reading and writing method and device, electronic equipment and medium
CN114866594B (en) Device connection management method, device, system, server and readable storage medium
CN112865927B (en) Message delivery verification method, device, computer equipment and storage medium
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN112035413A (en) Metadata information query method and device and storage medium
CN113448971A (en) Data updating method based on distributed system, computing node and storage medium
WO2022206170A1 (en) Data processing method, server and system
WO2023143061A1 (en) Data access method and data access system thereof
CN112764666B (en) Method, apparatus and computer program product for storage management
US11349924B1 (en) Mechanism for peer-to-peer communication between storage management systems
CN117492933B (en) Data exchange method, device, electronic equipment and storage medium
CN109376014B (en) Distributed lock manager implementation method and system
CN117082106B (en) Multi-level data networking method, system, device and equipment oriented to government cloud environment
CN116233230A (en) Information pushing method, device and system based on long connection channel
US10489340B2 (en) Distributed computing system and distributed processing method
CN115701600A (en) Database system, data synchronization method and related equipment
CN117724994A (en) Data operation method, server and CXL controller
CN117992257A (en) Parallel data acquisition and processing method for distributed database

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