A registration scheduling method for multi-device access and related products

By obtaining and analyzing the load information of the communication server, determining the server with the smallest load for device registration and cancellation, the problem of server crash during multi-device access is solved, and the system stability and efficiency improvement is achieved.

CN114697340BActive Publication Date: 2024-11-15SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011645305.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-11-15
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

When accessing multiple devices, the server is prone to crash due to excessive access pressure, resulting in the system being paralyzed and lacks effective disaster recovery methods to deal with the problem of large number of equipment registration.

Method used

By obtaining the device information of the target device and the pending communication server information in the communication server cluster, determine the communication server with the lowest load pressure and sending registration or cancellation instructions to ensure that free resources can be quickly found when a large number of devices are connected, and avoiding the need for free resources. The server crashed.

Benefits of technology

It effectively avoids the server crash due to excessive load, improves the efficiency of device registration and cancellation, and ensures the stable operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114697340B_ABST
    Figure CN114697340B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a registration scheduling method for multi-device access and related products thereof, which are applied to a registration server, and the method includes: obtaining device information of a target device; obtaining communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set; determining the target communication service information according to the first communication service information set; determining the target communication server corresponding to the target communication service information; and sending the device information of the target device to the proxy service module corresponding to the target communication server. The embodiment of the present application determines the target communication server according to the communication service information of the M communication servers to be processed, so that the proxy service module sends registration and deregistration instructions for the target device to the target communication service module, and facilitates the rapid finding of idle resources when a large number of devices are connected, thereby avoiding catastrophic crashes of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a registration scheduling method for multi-device access and related products thereof. Background Art

[0002] At present, in terms of device access, the method of requiring servers to register with devices is widely used. However, as the number of devices increases, the number of devices supported by a single server is also increasing, which brings huge access pressure to the server and is more likely to cause server crashes, thereby causing multiple devices or service systems to be paralyzed. Therefore, an effective disaster recovery method is urgently needed to deal with the problem of registering a large number of devices. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a registration scheduling method for multi-device access and related products thereof, which can effectively solve the problem that the server is prone to crash when multiple devices are registered.

[0004] In a first aspect, an embodiment of the present application provides a registration scheduling method for multi-device access, which is applied to a registration server, and the method includes:

[0005] Acquire device information of a target device, wherein the device information of the target device is used by an agent service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or deregister the target device;

[0006] Acquire communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer;

[0007] determining target communication service information according to the first communication service information set;

[0008] Determining a target communication server corresponding to the target communication service information;

[0009] The device information of the target device is sent to the proxy service module corresponding to the target communication server.

[0010] In a second aspect, an embodiment of the present application provides a registration scheduling device for multi-device access, the device comprising:

[0011] An acquisition unit, used for acquiring device information of a target device, wherein the device information of the target device is used by an agent service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or deregister the target device;

[0012] and for obtaining communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer;

[0013] a determining unit, configured to determine target communication service information according to the first communication service information set;

[0014] and for determining a target communication server corresponding to the target communication service information;

[0015] The sending unit is used to send the device information of the target device to the proxy service module corresponding to the target communication server.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0019] It can be seen that the embodiment of the present application obtains the device information of the target device; obtains the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set; determines the target communication service information according to the first communication service information set; determines the target communication server corresponding to the target communication service information; and sends the device information of the target device to the proxy service module corresponding to the target communication server. The embodiment of the present application determines the target communication server according to the communication service information of the M communication servers to be processed, so that the proxy service module sends the registration and deregistration instructions of the target device to the target communication service module, and facilitates the rapid finding of idle resources when a large number of devices are connected, thereby avoiding catastrophic crashes of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram of registration scheduling for multi-device access provided in an embodiment of the present application;

[0022] Figure 2A A flowchart of a registration scheduling method for multi-device access provided in an embodiment of the present application;

[0023] Figure 2B A schematic diagram of a registration scheduling process for multi-device access provided in an embodiment of the present application;

[0024] Figure 2C A schematic diagram of another registration scheduling process for multi-device access provided in an embodiment of the present application;

[0025] Figure 3 A flowchart of a registration scheduling method for multi-device access provided in an embodiment of the present application;

[0026] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0027] Figure 5 It is a block diagram of the functional units of a registration scheduling device for multi-device access provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] As the number of access control devices increases, the number of devices supported by a single server also increases, which brings huge access pressure to the server. Therefore, it is necessary to register the server with the access control device to create a registration scheduling center that can load, disaster recovery and monitor the equipment. However, the registration scheduling center itself also needs to support the CAP principle. Therefore, an embodiment of the present application proposes a registration scheduling method for multi-device access to solve the problem that processing a large number of device registrations can easily cause server paralysis.

[0030] Figure 1 A schematic diagram of a registration scheduling for multiple device access provided in an embodiment of the present application. Figure 1 As shown, the communication server cluster 11 includes at least one communication server 110 , and each communication server 110 in the communication server cluster 11 includes an agent service module 101 and a communication service module 102 .

[0031] The proxy service module 101 can be used to monitor the communication server resource information in the communication service information of the communication server 110 where the proxy service module 101 is located, and report the communication server resource information to the registration scheduling service unit 131. The communication server resource information includes the IP address information, service port information, CPU information, IO information and memory information of the communication server 110; the proxy service module 101 can be used to monitor the health status of the communication server 110 where the proxy service module 101 is located, that is, the heartbeat status of the above-mentioned communication server 110, and report the heartbeat status of the above-mentioned communication server 110 to the registration scheduling service unit 131 in a timely manner; the proxy service module 101 can be used to monitor the heartbeat status, device information and device quantity of the currently connected device of the communication server 110 where the proxy service module 101 is located, and report the heartbeat status, device information and device quantity of the currently connected device to the registration scheduling service unit 131 in a timely manner, and notify the communication service module 102 corresponding to the proxy service module 101 to register or deregister the device, as well as configure device parameters and other notifications.

[0032] The registration scheduling service unit 131 involved in the embodiment of the present application includes the registration server involved in the embodiment of the present application. The communication protocol between the proxy service module 101 and the registration scheduling service unit is the Hyper Text Transfer Protocol (HTTP); the relevant reporting information and data request are sent to the available registration server of a registration scheduling service unit in the registration scheduling service unit cluster 13 through high-performance HTTP and reverse proxy web server (nginx) proxy server; the registration scheduling service unit and the business service module communication component are high-throughput distributed publish-subscribe message system (kafka) and remote dictionary service (Remote DictionaryServer, redis). The registration scheduling service unit caches the above-mentioned device information, communication service information or related data through the redis cluster, and can send device upper limit warning information to the terminal device.

[0033] The above-mentioned terminal devices may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, PDAs, laptops, video matrices, monitoring platforms, mobile Internet devices (MID, Mobile Internet Devices) or wearable devices, etc. The above are only examples and not exhaustive, including but not limited to the above-mentioned devices. Of course, the above-mentioned electronic devices can also be servers, for example, cloud servers.

[0034] The following is a detailed description of the embodiments of the present application.

[0035] In order to solve the problem that the server is prone to crash when multiple devices are registered, the present application provides a registration scheduling method for multiple device access, which is applied to the registration server, as follows: Figure 2A As shown, the method may include but is not limited to the following steps:

[0036] S201, the registration server obtains device information of the target device;

[0037] The device information of the target device is used by the proxy service module of the communication server in the communication server cluster to notify the communication service module of the communication server to register or deregister the target device.

[0038] The target device may be a door access device or other device that needs to be registered. This is only an example of the target device and does not impose too many restrictions. The number of target devices may be multiple, such as 10, 100, 1000, etc. This is only an example of the number of target devices and does not impose too many restrictions on the number of target devices.

[0039] The device information of the target device includes, but is not limited to: the number of the target device, the name of the target device, and may also include information of other devices.

[0040] In the specific implementation, the registration server obtains the device information of the target device, including: when the target device is in an unregistered state, the registration server obtains the target device registration instruction and the device information of the target device from the business server. The business server pushes the device information of the target device to the registration server through a high-throughput distributed publish-subscribe messaging system (kafka).

[0041] In a specific implementation, the registration server obtains device information of the target device, including: when the target device is in a registered state and the first communication server is offline, the registration server obtains device information of the target device connected to the first communication server to obtain a first device information set, wherein the target device is one device or multiple devices.

[0042] In a specific implementation, the registration server obtains the device information of the target device, including: when the target device is in a registered state and the first proxy service module is offline, the registration server determines whether the heartbeat of the device connected to the communication service module where the first proxy service module is located meets the first heartbeat condition, that is, whether the device connected to the communication service module corresponding to the first proxy service is online; if the heartbeat of the connected device does not meet the first heartbeat condition, the device information of the target device connected to the communication service module corresponding to the first proxy service is obtained to obtain a first device information set, wherein the target device is one or more devices in the first device set.

[0043] S202, the registration server obtains the communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer;

[0044] Among them, the communication service information involved in the embodiment of the present application includes: communication server resource information, data information connected to the current communication server, devices connected to the communication service module of the current communication server and the number of connected devices, and heartbeat data of the device connected to the current communication service module. The communication server resource information includes but is not limited to: the Internet Protocol (IP) address information of the communication server, service port information, the (Central Processing Unit, CPU) information of the communication server, memory occupancy information, and input and output port (Input / Output, IO) information. Among them, the communication server information corresponds to a communication service information.

[0045] In a specific implementation, the registration server obtains the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set, including: the registration server obtains the communication service information corresponding to each communication server in the communication server cluster to obtain a second communication service information set; determines the communication service information of the M communication servers to be processed that meet the first filtering condition in the second communication service information set to obtain the first communication service information set.

[0046] In a specific implementation, a registration server obtains M communication service modules to be processed in a communication server cluster, determines the communication service information corresponding to each of the M communication service modules to be processed, and obtains a first communication service information set, including: the registration server obtains an online communication service module in the communication service module cluster to obtain a first communication service module set; determines the communication service module with the smallest load pressure in the first communication service module set as the communication service module to be processed, and obtains M communication service modules to be processed; determines the communication service information corresponding to each of the M communication service modules to be processed, and obtains a first communication service information set.

[0047] In a specific implementation, the method further includes: obtaining load rules configured for the M communication servers to be processed, wherein the load rules include the maximum number of devices that can be connected to the communication server.

[0048] S203, the registration server determines the target communication service information according to the first communication service information set;

[0049] In a specific implementation, the registration server determines the target communication service information based on the first communication service information set, including: the registration server determines the communication service information to be calculated in the first communication service information set according to a first sorting rule; based on the communication service information to be calculated, calculates the first load pressure of the first communication server corresponding to the communication service information to be calculated; if the first load pressure satisfies the first load condition, determines that the target communication server is the first communication server.

[0050] Further, the first sorting rule includes a polling sorting rule; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: the registration server determines the second communication server in the polling sorting table according to the polling sorting rule, and determines the second communication service information of the second communication server; determines whether the second communication service information exists in the first communication service information set; if so, determines that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0051] Further, the first sorting rule includes a random sorting rule; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: the registration server randomly determines the second communication service information in the first communication service information set according to the random sorting rule, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0052] Further, the first sorting rule includes polling sorting; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: the registration server determines the second communication service information in the first communication service information set according to the polling sorting, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0053] In a specific implementation, the registration server determines the target communication service module according to the first communication service information set, and further includes:

[0054] Step 1: The registration server determines the communication service information corresponding to the communication service module to be calculated in the first communication service information set according to the first sorting rule;

[0055] Step 2: The registration server calculates the load pressure of the communication service module to be calculated according to the communication service information corresponding to the communication service module to be calculated;

[0056] Step 3: If the load pressure of the communication service module to be calculated does not meet the first load condition, the registration server determines whether there is any communication service information whose load pressure has not been calculated in the first communication service information set;

[0057] Step 4: If the first communication service information set contains communication service information for which the load pressure is not calculated, the registration server executes step 1;

[0058] Step 5: If there is no communication service module whose load pressure is not calculated in the communication service modules corresponding to the communication service information in the first communication service information set, the registration server sends a warning message to the service server.

[0059] S204, the registration server determines the target communication server corresponding to the target communication service information;

[0060] S205: The registration server sends the device information of the target device to the proxy service module corresponding to the target communication service module.

[0061] In a specific implementation, after the registration server sends the device information of the target device to the proxy service module corresponding to the target communication service module, the registration server also sends instruction information for registering or deregistering the target device to the proxy service module corresponding to the target communication service module.

[0062] It should be further supplemented that after the proxy service module corresponding to the target communication service module receives the instruction information for registering or deregistering the target device, the proxy service module corresponding to the target communication service module sends the instruction information for registering or deregistering the target device and the device information of the target device to the target communication service module. The target communication service module registers or deregisters the target device according to the instruction information for registering or deregistering the target device and the device information of the target device.

[0063] It can be seen that the device information of the target device is obtained; the communication service information of the M communication servers to be processed in the communication server cluster is obtained to obtain a first communication service information set; the target communication service information is determined according to the first communication service information set; the target communication server corresponding to the target communication service information is determined; and the device information of the target device is sent to the proxy service module corresponding to the target communication server. The embodiment of the present application determines the target communication server according to the communication service information of the M communication servers to be processed, so that the proxy service module sends the registration and deregistration instructions of the target device to the target communication service module, and it is convenient to quickly find idle resources when a large number of devices are connected, so as to avoid catastrophic crash of the server.

[0064] In one possible example, a registration server obtains communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, including: the registration server obtains the communication service information corresponding to each communication server in the communication server cluster to obtain a second communication service information set; determines the communication service information of M communication servers to be processed that meet the first filtering condition in the second communication service information set to obtain the first communication service information set.

[0065] The communication service information includes: communication service module resource information, data information connected to the current communication service module, devices connected to the current communication service module and the number of connected devices, and heartbeat data of the current communication service module. The communication service module resource information includes but is not limited to: IP address information of the communication service module, service port information, CPU information of the communication service module, memory occupancy information, and IO information. One communication server corresponds to one communication service information.

[0066] In a specific implementation, the communication service information of M communication servers to be processed that meet the first screening condition in the second communication service information set is determined, including: the registration server obtains the communication service information corresponding to all communication service modules in the current communication server cluster to obtain a first communication service information set to be processed; and the communication service information to be processed that does not meet the first condition in the first communication service information set to be processed is determined to obtain M communication service information to be processed, that is, a communication service information set of online communication service modules is obtained.

[0067] Among them, the first condition can be: the heartbeat data of the device connected to the current communication service module in the communication service information does not meet the first heartbeat condition, and the CPU occupancy rate>=first value, and the IO occupancy rate>=second value, and the memory occupancy rate>=third value. The first heartbeat condition is that the number of heartbeats within a preset time reaches a first threshold. The first threshold can be a preset value, or a value determined based on the heartbeat data of the communication service module in a working state. There are no excessive restrictions on the first threshold here. The first value, the second value, and the third value are all positive numbers less than 1. The first value, the second value, and the third value can be the same value or different values.

[0068] For example, the first condition is that the heartbeat data of the device connected to the current communication service module in the communication service information does not meet the condition that the number of heartbeats in 10 seconds is greater than or equal to 3, and the CPU occupancy rate is greater than or equal to 90%, the IO occupancy rate is greater than or equal to 90%, and the memory occupancy rate is greater than or equal to 90%.

[0069] It can be seen that in this example, the registration server selects an online communication service module in the communication server cluster and determines a communication service information set of the online communication service module, so as to quickly find an idle target communication service module.

[0070] In one possible example, a registration server obtains communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, including: the registration server obtains communication service information of online communication servers in the communication service module cluster to obtain a third communication service information set; determines the communication service information of M communication servers to be processed with the smallest load pressure in the third communication service information set to obtain the first communication service information set.

[0071] The calculation formula of load pressure F is:

[0072]

[0073] In a specific implementation, a registration server obtains online communication service modules in a communication service module cluster to obtain a first communication service module set, including: the registration server obtains the communication service modules in the communication service module cluster whose heartbeat data meets a first heartbeat condition, and obtains a first communication service information set, i.e., obtains a set of online communication service modules.

[0074] It can be seen that in this example, in the target device, the communication service module with the smallest load pressure among the online communication service modules is determined, and the communication service information set of the communication service module with the smallest load pressure is further determined, thereby reducing the amount of calculation of the load pressure of the communication service module through the first communication service information set, which is conducive to quickly finding an idle target communication service module and improving the efficiency of registration or deregistration of the target device.

[0075] In a possible example, the registration server determines the target communication service information based on the first communication service information set, including: the registration server determines the communication service information to be calculated in the first communication service information set according to a first sorting rule; based on the communication service information to be calculated, calculates the first load pressure of the first communication server corresponding to the communication service information to be calculated; if the first load pressure satisfies the first load condition, determines that the target communication server is the first communication server.

[0076] The first sorting rule includes a polling rule and / or a random rule. The first load condition is: the load pressure is less than or equal to the first load threshold. The first load threshold can be a preset value, or a dynamically determined value. For example, the first load threshold can be 80, 90, 85, 70, 75, or other values. This is only an example of the first load threshold, and there is no excessive restriction on the first load threshold.

[0077] In a specific implementation, the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: when the first sorting rule is a polling sorting rule; the registration server determines the second communication server in the polling sorting table according to the polling sorting rule, and determines the second communication service information of the second communication server; determines whether the second communication service information exists in the first communication service information set; if so, determines that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0078] In a specific implementation, the registration server determines the communication service information to be calculated in the first communication service information set according to a first sorting rule, including: the first sorting rule includes a random sorting rule; the registration server randomly determines the second communication service information in the first communication service information set according to the random sorting rule, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0079] In a specific implementation, the registration server determines the communication service information to be calculated in the first communication service information set according to a first sorting rule, including: the first sorting rule includes polling sorting; the registration server determines the second communication service information in the first communication service information set according to the polling sorting, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0080] It can be seen that in this example, the registration server calculates the load pressure of the communication service module to be calculated, so as to quickly screen out the idle target communication service modules and improve the efficiency of registration or deregistration of the target device.

[0081] In a possible example, the first sorting rule includes a polling sorting rule; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: the registration server determines the second communication server in the polling sorting table according to the polling sorting rule, and determines the second communication service information of the second communication server; determines whether the second communication service information exists in the first communication service information set; if so, determines that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0082] The communication service modules in the polling sorting table are all the communication service modules in the communication server cluster.

[0083] In a specific implementation, when the target device is in an unregistered state, the specific steps of determining the communication service information corresponding to the communication service module to be calculated in the first communication service information set according to the first sorting rule may be:

[0084] Step 1: The registration server sequentially extracts the second communication service modules in the polling sorting table according to the polling sorting rule, and determines the second communication service information of the second communication service module;

[0085] Step 2: The registration server determines whether the second communication service information exists in the first communication service information set;

[0086] Step 3: If yes, the registration server determines that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0087] It can be seen that in this example, the registration server extracts the second communication service module in the polling sorting table according to the polling sorting rule, and determines the second communication service information of the second communication service module, so that the registration server can calculate the load pressure of the communication service module to be calculated, and quickly screen out idle target communication service modules, so as to improve the efficiency of registration or deregistration of the target device.

[0088] In a possible example, the first sorting rule includes a random sorting rule; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: the registration server randomly determines the second communication service information in the first communication service information set according to the random sorting rule, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0089] In a specific implementation, when the target device is in an unregistered state, the registration server determines the communication service information corresponding to the communication service module to be calculated in the first communication service information set according to the first sorting rule, including: the registration server randomly extracts the second communication service information in the first communication service information set according to the random sorting rule; and determines that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0090] It can be seen that in this example, the registration server randomly extracts the second communication service information from the first communication service information set according to the random sorting rule, so that the registration server can calculate the load pressure of the communication service module corresponding to the second communication service information, and quickly screen out idle target communication service modules, thereby improving the efficiency of registration or deregistration of the target device.

[0091] In a possible example, the first sorting rule includes polling sorting; the registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule, including: determining the second communication service information in the first communication service information set according to the polling sorting, the second communication service information being the communication service information to be calculated in the first communication service information set.

[0092] In a specific implementation, when the target device is in a registered state, the registration server determines the communication service information corresponding to the communication service module to be calculated in the first communication service information set according to the first sorting rule, including: the registration server determines the second communication service information in the first communication service information set in sequence according to the polling sorting, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0093] It can be seen that in this example, the registration server extracts the second communication service information from the first communication service information set in sequence according to the polling sort, so that the registration server can calculate the load pressure of the communication service module to be calculated corresponding to the second communication service information, and quickly screen out idle target communication service modules, thereby improving the efficiency of registration or deregistration of the target device.

[0094] In one possible example, Figure 2B A schematic diagram of a registration scheduling for multi-device access provided in an embodiment of the present application is shown in FIG. Figure 2B As shown in the figure, when the target device is not registered, the specific steps to add the device are as follows:

[0095] Step A1: Acquire communication service information of all communication servers in the communication server cluster to obtain a first communication service information set A;

[0096] Step A2: Filter out the communication service information in the first communication service information set A, in which the heartbeat status of the communication server is unhealthy and the CPU occupancy rate, IO occupancy rate, and memory occupancy rate of the communication server are all greater than 90%, to obtain the second communication service information set B;

[0097] Step A3: filtering the second communication service information set B in the first communication service information set A to obtain a target communication service information set C;

[0098] Step A4: Determine whether the current first rule is polling;

[0099] Step A5: if the current first rule is a polling rule, then the communication service information to be processed polled in the first communication service information set A is retrieved; if the current first rule is not a polling rule, then the communication service information to be processed is randomly retrieved from the target communication service information set C, and the load pressure F of the communication server corresponding to the communication service information to be processed is calculated, and the next step is to jump to step A8 and execute the actions in step A8;

[0100] Step A6: Determine whether the communication service information to be processed exists in the target communication service information set C;

[0101] Step A7: If the communication service information to be processed exists in the target communication service information set C, then the load pressure F of the communication server corresponding to the communication service information to be processed is calculated;

[0102] Step A8: Determine whether the load pressure is greater than or equal to 80;

[0103] Step A9: If the load pressure is greater than or equal to 80, determine whether there are any unprocessed communication servers in the target communication service information set C; if the load pressure is less than 80, notify the proxy service module of the communication server corresponding to the communication service information to be processed of the device information of the target device and notify the proxy service module of the registration instruction for the target device;

[0104] Step A10: If there is no unprocessed communication server in the target communication service information set C, a warning message is notified to the business service module; if there is still an unprocessed communication server in the target communication service information set C, jump back to step A4 and execute the action in step A4.

[0105] It can be seen that in this example, the registration server selects the second communication service information set that is online and has low memory, CPU, and IO resource usage, selects the target communication service information in the second communication service information set by polling or random, calculates the load pressure of the communication server corresponding to the target communication service information, and quickly selects the idle target communication servers through the load pressure, so as to improve the efficiency of registration of the target device.

[0106] In one possible example, Figure 2C As shown, Figure 2C A registration scheduling diagram for multiple device access provided in an embodiment of the present application. When the target device has been registered and the communication server is offline, the specific steps for re-adding the device are as follows:

[0107] Step B1: If the communication server X is offline, then the target device connected to the communication server X is obtained to obtain a target device set W;

[0108] Step B2: if the proxy service module Y of the communication server X is offline, determine whether the heartbeat of the device connected to the communication server X is online, if so, send a warning message to the terminal device, if not, obtain the target device connected to the communication server X, and obtain the target device set W;

[0109] Step B3: Acquire the communication service information of the online communication servers in the communication server cluster to obtain a first communication service information set Q;

[0110] Step B4: looping through the set Q to obtain the communication service information of the communication server corresponding to the minimum load pressure F, and obtaining the target communication service information set E;

[0111] Step B5: Determine whether the current first rule is polling;

[0112] Step B6: if the current first rule is a polling rule, then taking out the communication service information to be processed polled in the target communication service information set E;

[0113] Step B7: if the current first rule is not a polling rule, that is, a random rule, then randomly taking out the communication service information to be processed from the target communication service information set E;

[0114] Step B8: Calculate the load pressure F of the communication server corresponding to the communication service information to be processed;

[0115] Step B9: Determine whether the load pressure is greater than or equal to 80;

[0116] Step B10: If the load pressure is greater than or equal to 80, determine whether there are any unprocessed communication servers in the target communication service information set C; if the load pressure is less than 80, notify the proxy service module of the communication server corresponding to the communication service information to be processed of the device information of the target device and notify the proxy service module of the registration or deregistration instruction for the target device;

[0117] Step B11: If there is no unprocessed communication server in the target communication service information set C, a warning message is notified to the business service module; if there is still an unprocessed communication server in the target communication service information set C, jump back to step B5 and execute the action in step B5.

[0118] It can be seen that in this example, the registration server selects the second communication service information set that is online and has low memory, CPU, and IO resource usage, selects the target communication service information in the second communication service information set by polling or random, calculates the load pressure of the communication server corresponding to the target communication service information, and quickly selects the idle target communication servers through the load pressure, so as to improve the efficiency of registration of the target device.

[0119] The following is a detailed description of the embodiments of the present application through a specific example.

[0120] With the above Figure 2A The embodiment shown is consistent with that shown in FIG. Figure 3 , Figure 3 1 is a flow chart of a registration scheduling method for multi-device access provided by an embodiment of the present application, the method comprising:

[0121] S301, the registration server obtains device information of the target device;

[0122] The device information of the target device is used by the proxy service module in the communication server cluster to notify the communication service module corresponding to the proxy service module to register or deregister the target device.

[0123] S302, the registration server obtains M communication service modules to be processed in the communication server cluster that meet the first screening condition;

[0124] S303, the registration server determines the communication service information corresponding to each communication service module in the M communication service modules to be processed, and obtains a first communication service information set;

[0125] S304. The registration server determines the communication service information to be calculated in the first communication service information set according to the first sorting rule;

[0126] S305, the registration server calculates the load pressure of the communication service module to be calculated according to the communication service information to be calculated;

[0127] S306: If the load pressure of the communication service module to be calculated satisfies the first load condition, the registration server determines that the target communication service information is the communication service information to be calculated;

[0128] S307, the registration server determines the target communication server corresponding to the target communication service information;

[0129] S308: The registration server sends the device information of the target device to the proxy service module corresponding to the target communication service module.

[0130] It can be seen that in the embodiment of the present application, the registration server obtains M communication service modules to be processed that meet the first screening condition in the communication server cluster; determines the communication service information corresponding to the communication service module to be calculated in the first communication service information set according to the first sorting rule; if the load pressure of the communication service module to be calculated meets the first load condition, determines the target communication service information as the communication service information to be calculated; and sends the device information of the target device to the proxy service module corresponding to the target communication service module. It is convenient for the proxy service module to send the registration and deregistration instructions and the device information of the target device to the target communication service module, and it is convenient to quickly find idle resources when a large number of devices are connected, and reasonably use resources to avoid catastrophic crashes of the server.

[0131] See also Figure 4 , Figure 4 4 is a structural diagram of an electronic device 400 provided in an embodiment of the present application. As shown in the figure, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, wherein the one or more programs 421 are stored in the above-mentioned memory 420 and are configured to be executed by the above-mentioned application processor 410, and the one or more programs 421 include for performing the following steps:

[0132] Acquire device information of a target device, wherein the device information of the target device is used by an agent service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or deregister the target device;

[0133] Acquire communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer;

[0134] determining target communication service information according to the first communication service information set;

[0135] Determining a target communication server corresponding to the target communication service information;

[0136] The device information of the target device is sent to the proxy service module corresponding to the target communication server.

[0137] It can be seen that the embodiment of the present application obtains the device information of the target device; obtains the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set; determines the target communication service information according to the first communication service information set; determines the target communication server corresponding to the target communication service information; and sends the device information of the target device to the proxy service module corresponding to the target communication server. The embodiment of the present application determines the target communication server according to the communication service information of the M communication servers to be processed, so that the proxy service module sends the registration and deregistration instructions of the target device to the target communication service module, and facilitates the rapid finding of idle resources when a large number of devices are connected, thereby avoiding catastrophic crashes of the server.

[0138] In one possible example, in terms of obtaining the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set, the one or more programs 421 include specific steps for performing the following steps: obtaining the communication service information corresponding to each communication server in the communication server cluster to obtain a second communication service information set; determining the communication service information of the M communication servers to be processed that meet the first filtering condition in the second communication service information set to obtain the first communication service information set.

[0139] In one possible example, in terms of obtaining the communication service information of the M communication servers to be processed in the communication server cluster to obtain the first communication service information set, the one or more programs 421 include specific steps for performing the following steps: obtaining the communication service information of the online communication servers in the communication service module cluster to obtain a third communication service information set; determining the communication service information of the M communication servers to be processed with the smallest load pressure in the third communication service information set to obtain the first communication service information set.

[0140] In one possible example, in terms of determining the target communication service information based on the first communication service information set, the one or more programs 421 include specifically for performing the following steps: determining the communication service information to be calculated in the first communication service information set according to a first sorting rule; calculating the first load pressure of the first communication server corresponding to the communication service information to be calculated based on the communication service information to be calculated; if the first load pressure satisfies the first load condition, determining that the target communication server is the first communication server.

[0141] In one possible example, the first sorting rule includes a polling sorting rule; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the one or more programs 421 include specifically performing the following steps: determining the second communication server in the polling sorting table according to the polling sorting rule, and determining the second communication service information of the second communication server; determining whether the second communication service information exists in the first communication service information set; and if so, determining that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0142] In one possible example, the first sorting rule includes a random sorting rule; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the one or more programs 421 include specifically for performing the following steps: randomly determining the second communication service information in the first communication service information set according to the random sorting rule, the second communication service information being the communication service information to be calculated in the first communication service information set.

[0143] In one possible example, the first sorting rule includes polling sorting; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the one or more programs 421 include specifically performing the following steps: determining the second communication service information in the first communication service information set according to the polling sorting, the second communication service information being the communication service information to be calculated in the first communication service information set.

[0144] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0145] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0146] Figure 5 1 is a functional unit composition block diagram of a registration scheduling apparatus 500 for multi-device access involved in an embodiment of the present application. The registration scheduling apparatus 500 for multi-device access includes:

[0147] An acquisition unit 501 is used to acquire device information of a target device, wherein the device information of the target device is used by an agent service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or deregister the target device;

[0148] and for obtaining communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer;

[0149] A determining unit 502, configured to determine target communication service information according to the first communication service information set;

[0150] and for determining a target communication server corresponding to the target communication service information;

[0151] The sending unit 503 is used to send the device information of the target device to the proxy service module corresponding to the target communication server.

[0152] The registration scheduling apparatus 500 for multiple device access may further include a storage unit 504 for storing program codes and data of electronic devices. The storage unit 504 may be a memory.

[0153] The registration scheduling device for multi-device access in the embodiment of the present application can be used to obtain the device information of the target device; obtain the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set; determine the target communication service information according to the first communication service information set; determine the target communication server corresponding to the target communication service information; and send the device information of the target device to the proxy service module corresponding to the target communication server. The embodiment of the present application determines the target communication server according to the communication service information of the M communication servers to be processed, so that the proxy service module can send registration and deregistration instructions for the target device to the target communication service module, and can quickly find idle resources when a large number of devices are connected, thereby avoiding catastrophic crashes of the server.

[0154] In one possible example, in terms of obtaining the communication service information of the M communication servers to be processed in the communication server cluster to obtain the first communication service information set, the acquisition unit 501 is specifically used to: obtain the communication service information corresponding to each communication server in the communication server cluster to obtain the second communication service information set; determine the communication service information of the M communication servers to be processed that meet the first filtering condition in the second communication service information set to obtain the first communication service information set.

[0155] In one possible example, in terms of obtaining the communication service information of the M communication servers to be processed in the communication server cluster to obtain the first communication service information set, the acquisition unit 501 is specifically used to: obtain the communication service information of the online communication servers in the communication service module cluster to obtain a third communication service information set; determine the communication service information of the M communication servers to be processed with the smallest load pressure in the third communication service information set to obtain the first communication service information set.

[0156] In one possible example, in terms of determining the target communication service information based on the first communication service information set, the determination unit 502 is specifically used to: determine the communication service information to be calculated in the first communication service information set according to a first sorting rule; calculate the first load pressure of the first communication server corresponding to the communication service information to be calculated based on the communication service information to be calculated; if the first load pressure satisfies the first load condition, determine that the target communication server is the first communication server.

[0157] In one possible example, the first sorting rule includes a polling sorting rule; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the determination unit 502 is specifically used to: determine the second communication server in the polling sorting table according to the polling sorting rule, and determine the second communication service information of the second communication server; determine whether the second communication service information exists in the first communication service information set; if so, determine that the second communication service information is the communication service information to be calculated in the first communication service information set.

[0158] In one possible example, the first sorting rule includes a random sorting rule; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the determination unit 502 is specifically used to: randomly determine the second communication service information in the first communication service information set according to the random sorting rule, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0159] In one possible example, the first sorting rule includes polling sorting; in terms of determining the communication service information to be calculated in the first communication service information set according to the first sorting rule, the determination unit 502 is specifically used to: determine the second communication service information in the first communication service information set according to the polling sorting, and the second communication service information is the communication service information to be calculated in the first communication service information set.

[0160] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0161] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0162] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0164] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0165] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.

[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0167] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0168] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0169] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A registration scheduling method for multi-device access, characterized in that: Applied to a registration server, the method comprises: Obtaining device information of a target device, including: when the target device is in an unregistered state, obtaining a target device registration instruction and device information of the target device from a service server, the device information of the target device being used by a proxy service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or unregister the target device, the proxy service module being used to monitor the heartbeat status, device information, and device quantity of a currently connected device of the communication server where the proxy service module is located; Acquire communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer, wherein the communication service information includes communication server resource information, data information connected to the current communication server, devices connected to the communication service module of the current communication server and the number of connected devices, and heartbeat data of devices connected to the current communication service module; Determining target communication service information according to the first communication service information set includes: determining the communication service information to be calculated in the first communication service information set according to a first sorting rule; calculating a first load pressure of a first communication server corresponding to the communication service information to be calculated according to the communication service information to be calculated; if the first load pressure satisfies a first load condition, determining that the target communication service information is the communication service information to be calculated, and determining that the target communication server corresponding to the target communication service information is the first communication server; The device information of the target device is sent to the proxy service module corresponding to the target communication server.

2. The method according to claim 1, characterized in that The acquiring of the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set includes: Acquire communication service information corresponding to each communication server in the communication server cluster to obtain a second communication service information set; Determine the communication service information of M communication servers to be processed that meet the first screening condition in the second communication service information set to obtain the first communication service information set.

3. The method according to claim 1, characterized in that: The acquiring of the communication service information of the M communication servers to be processed in the communication server cluster to obtain a first communication service information set includes: Acquire communication service information of online communication servers in the communication service module cluster to obtain a third communication service information set; The communication service information of the M communication servers to be processed with the smallest load pressure in the third communication service information set is determined to obtain the first communication service information set.

4. The method according to claim 1, characterized in that: The first sorting rule includes a round-robin sorting rule; The determining, according to the first sorting rule, the communication service information to be calculated in the first communication service information set includes: Determine a second communication server in the polling sorting table according to the polling sorting rule, and determine second communication service information of the second communication server; Determining whether the second communication service information exists in the first communication service information set; If so, it is determined that the second communication service information is the communication service information to be calculated in the first communication service information set.

5. The method according to claim 1, characterized in that The first sorting rule includes a random sorting rule; The determining, according to the first sorting rule, the communication service information to be calculated in the first communication service information set includes: According to the random sorting rule, the second communication service information in the first communication service information set is randomly determined, and the second communication service information is the communication service information to be calculated in the first communication service information set.

6. The method according to claim 1, characterized in that The first sorting rule includes round-robin sorting; The determining, according to the first sorting rule, the communication service information to be calculated in the first communication service information set includes: The second communication service information in the first communication service information set is determined according to the polling order, where the second communication service information is the communication service information to be calculated in the first communication service information set.

7. A registration scheduling device for multi-device access, characterized in that: The device comprises: an acquisition unit, used to acquire device information of a target device, including: when the target device is in an unregistered state, acquiring a target device registration instruction and device information of the target device from a service server, the device information of the target device being used by an agent service module of a communication server in a communication server cluster to notify a communication service module of the communication server to register or deregister the target device, the agent service module being used to monitor the heartbeat state, device information and device quantity of a currently connected device of the communication server where the agent service module is located; and for obtaining communication service information of M communication servers to be processed in the communication server cluster to obtain a first communication service information set, where M is a positive integer, wherein the communication service information includes communication server resource information, data information connected to the current communication server, devices connected to the communication service module of the current communication server and the number of connected devices, and heartbeat data of devices connected to the current communication service module; A determination unit, configured to determine target communication service information according to the first communication service information set, comprising: determining the communication service information to be calculated in the first communication service information set according to a first sorting rule; calculating a first load pressure of a first communication server corresponding to the communication service information to be calculated according to the communication service information to be calculated; determining that the target communication service information is the communication service information to be calculated if the first load pressure satisfies a first load condition, and determining that the target communication server corresponding to the target communication service information is the first communication server; The sending unit is used to send the device information of the target device to the proxy service module corresponding to the target communication server.

8. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: It stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 6.