Message scheduling method, device, equipment, medium and program product

When connecting to IoT devices, selecting the server with the smallest load according to the data saturation of the server cluster, solving the problem of load imbalance on the IoT platform, improving the device access efficiency and reliability, and optimizing load provisioning .

CN119094529AActive Publication Date: 2024-12-06CHINA MOBILE M2M +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411210152.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

The load imbalance of the IoT platform causes the server load to be too high or too low, affecting the system performance and stability. The existing technology needs to obtain the accessible connection address before the IoT device is connected, which increases the risk of device resource consumption and reliability.

Method used

The message scheduling device responds to the connection request of the IoT device, and determines the server cluster with the lowest data saturation in the server cluster associated with the IoT platform as the goal, and directly handles the connection request in the cluster to avoid the risk of additional resource consumption and connection failure .

Benefits of technology

It improves the efficiency and reliability of IoT devices to access the IoT platform, optimizes server load provisioning, and improves the reliability of connection request scheduling in multi-device scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094529A_ABST
    Figure CN119094529A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly provides a message scheduling method, device and equipment, a medium and a program product, and the message scheduling method comprises the steps: responding to a received connection request sent by Internet-of-Things equipment, and sending the connection request to a plurality of server clusters associated with an Internet-of-Things platform, the server cluster with the minimum data volume saturation is determined as a target server cluster, the data volume saturation is used for representing the load size of the server clusters, and the data volume saturation is determined based on historical operation state data of the server clusters; then, a target server is determined in the target server cluster, and the connection request is sent to the target server; according to the invention, the efficiency and reliability of accessing the Internet of Things equipment to the Internet of Things platform can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a message scheduling method, apparatus, device, medium and program product. Background Art

[0002] With the continuous development of IoT technology and the continuous expansion of the scale of IoT business, a large number of IoT devices need to be connected to the IoT platform. At this time, some servers of the IoT platform will have too high loads, while some servers will have too low loads. The load imbalance of the IoT platform will affect the performance and stability of the overall system.

[0003] In the related technology, in order to solve the problem of load imbalance in the IoT platform, before the IoT device is connected to the IoT platform, it will first send a load query request to the IoT platform. The IoT platform will return an accessible connection address that meets the connection conditions based on its own load situation, so that the IoT device can truly connect to the IoT platform through the accessible connection address.

[0004] However, the load balancing solution provided in the related technology requires the IoT device to obtain an accessible connection address before connecting to the IoT platform. This pre-process will not only bring additional resource consumption to the IoT device, but may also cause more problems, thereby affecting the reliability of the IoT device accessing the IoT platform. Summary of the invention

[0005] The present disclosure is proposed in view of the above problems. The present disclosure provides a message scheduling method, apparatus, device, medium and program product, which can improve the efficiency and reliability of IoT devices accessing an IoT platform.

[0006] According to one aspect of the present disclosure, a message scheduling method is provided, and the method is applied to a message scheduling device, comprising:

[0007] In response to receiving a connection request sent by an IoT device, determining a server cluster with the smallest data volume saturation among multiple server clusters associated with the IoT platform as a target server cluster, wherein the data volume saturation is used to characterize the load size of the server cluster, and the data volume saturation is determined based on historical operating status data of the server cluster;

[0008] A target server is determined in the target server cluster, and the connection request is sent to the target server.

[0009] According to another aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-mentioned message scheduling method.

[0010] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned message scheduling method is implemented.

[0011] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned message scheduling method is implemented.

[0012] As will be described in detail below, according to the message scheduling method, apparatus, equipment, medium and program product of the embodiments of the present disclosure, when an IoT device needs to access the server of the IoT service platform, the server in the server cluster with the smallest load can be directly selected according to the data saturation of the server cluster to process the connection request. There is no need for the IoT device to obtain a pre-process for an accessible connection, and the IoT device does not need to consume additional resources or bear the risk of failure in obtaining an accessible connection, and can quickly access the server on the IoT service side, thereby improving the efficiency and reliability of IoT devices accessing the IoT platform. At the same time, since the data saturation of the server cluster is determined based on the operating status data of the server cluster, the load can be allocated considering the actual operating conditions of each server cluster, thereby improving the scheduling reliability of connection requests in multi-IoT device scenarios.

[0013] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0015] Figure 1 It is a schematic diagram of an implementation scenario of a message scheduling solution according to an embodiment of the present disclosure.

[0016] Figure 2 It is a flowchart illustrating a message scheduling method according to an embodiment of the present disclosure.

[0017] Figure 3 It is a schematic diagram illustrating how to obtain the number of abnormal requests according to an embodiment of the present disclosure.

[0018] Figure 4 Detailed description of the invention is a flowchart illustrating the update of the data volume saturation of the server cluster according to the embodiment of the present disclosure.

[0019] Figure 5 It is a schematic diagram of the interaction process of the message scheduling method of the embodiment of the present disclosure.

[0020] Figure 6 It is a schematic diagram of the interaction process of the message scheduling method of the embodiment of the present disclosure to further illustrate.

[0021] Figure 7 It is a schematic block diagram of functional modules of a message scheduling device according to an embodiment of the present disclosure.

[0022] Figure 8 is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure.

[0023] Fig. 9 is a hardware block diagram of an electronic device illustrating an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0025] In the related technology, in order to solve the problem of load imbalance in the IoT platform, before the IoT device is connected to the IoT platform, a connection address of a server with a smaller load will be obtained from the IoT platform side, so that the IoT device can truly connect to the IoT platform through this accessible connection address.

[0026] However, this pre-process not only consumes additional resources, but may also result in failure to obtain an accessible connection address, such as network failure or IoT device abnormality, resulting in failure to obtain an accessible connection address, thereby affecting the reliability of IoT devices accessing the IoT platform.

[0027] In order to solve the above problems, the present disclosure provides a message scheduling solution, such as Figure 1 As shown, Figure 1 FIG. 1 shows a schematic diagram of an implementation scenario of a message scheduling solution provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, the implementation scenario 100 includes an IoT device 101, a message scheduling device 102, and multiple servers 103, wherein the IoT device 101 is a terminal device in an IoT business scenario, and the terminal device can be a smart home, a wearable device, a vehicle-mounted device, or a smart gateway device, etc., wherein, Figure 1The Internet of Things device shown in the figure is an image acquisition device, the server 103 is a server on the Internet of Things service platform side, and the message scheduling device 102 can be a computer or a server.

[0028] Among them, a communication link can be established between the Internet of Things device 101 and the message scheduling device 102, and between the message scheduling device 102 and the server 103 to implement the message scheduling solution provided by the embodiment of the present disclosure.

[0029] It should be noted that in the embodiment of the present disclosure, the message scheduling device 102 can communicate with the Internet of Things device 101 and the server 103 through the Message Queuing Telemetry Transport (MQTT) technology; multiple servers 103 can be divided into multiple server clusters, which can be determined based on actual needs. The embodiment of the present disclosure does not limit this. For example, if 6 servers 103 are deployed on the Internet of Things service platform side, the 6 servers 103 can be divided into two server clusters, each of which includes 3 servers 103.

[0030] Figure 2 A flowchart of a message scheduling method of an exemplary embodiment of the present disclosure is shown. The method can be applied to a virtual model server, such as Figure 2 As shown, the method of the embodiment of the present disclosure may include:

[0031] Step S201, in response to receiving a connection request sent by an IoT device, determining a server cluster with the smallest data saturation among multiple server clusters associated with the IoT platform as a target server cluster;

[0032] The data volume saturation is used to characterize the load size of the server cluster, and the data volume saturation is determined based on the historical operation status data of the server cluster;

[0033] Step S202, determining a target server in the target server cluster, and sending a connection request to the target server;

[0034] In summary, the message scheduling method provided by the embodiment of the present disclosure can, in response to receiving a connection request sent by an IoT device, determine a server cluster with the smallest data saturation among multiple server clusters associated with the IoT platform as a target server cluster, determine a target server in the target server cluster, and send the connection request to the target server; when an IoT device needs to access a server of the IoT service platform, the server in the server cluster with the smallest load can be directly selected to process the connection request based on the data saturation of the server cluster, without the need for the IoT device to obtain a pre-process for an accessible connection, without the need for the IoT device to consume additional resources, and without bearing the risk of failure in obtaining an accessible connection, and can quickly access the server on the IoT service side, thereby improving the efficiency and reliability of the IoT device accessing the IoT platform; at the same time, since the data saturation of the server cluster is determined based on the operating status data of the server cluster, the load can be allocated considering the actual operating conditions of each server cluster, thereby improving the scheduling reliability of connection requests in a multi-IoT device scenario.

[0035] The following Figure 2 The specific implementation methods of each step in the embodiment shown are described in detail:

[0036] In step S201, in response to receiving a connection request sent by an IoT device, the message scheduling device may determine a server cluster with the smallest data saturation among multiple server clusters associated with the IoT platform as a target server cluster.

[0037] In the embodiment of the present disclosure, the data volume saturation is used to characterize the load size of the server cluster, and the data volume saturation is determined based on the historical operation status data of the server cluster.

[0038] It should be noted that in the embodiments of the present disclosure, after the message scheduling device is running, the data saturation of each server cluster can be updated according to a preset period, wherein the update period of the data saturation can be determined based on actual needs, and the embodiments of the present disclosure are not limited to this. For example, the data saturation of each server cluster can be updated once at a preset time interval, for example, the preset time can be 5 minutes or 3 minutes, etc.; or, after the connection volume of the Internet of Things devices increases or decreases by a preset amount, the data saturation of each server cluster is updated once, for example, the preset amount can be 100 or 200 devices, etc.

[0039] It should also be noted that the message scheduling device uses historical operating status data when updating the data saturation of the server cluster, which may include historical operating status data at multiple data update moments. The multiple data update moments may include the current data update moment and at least one historical data update moment before the current data update moment. The number of at least one historical data update moment may be determined based on actual needs, and the embodiments of the present disclosure do not limit this. By way of example, the number of at least one historical data update moment may be 3 or 5 historical data update moments.

[0040] Among them, the historical operating status data at each data update moment is the operating status data between the current data update moment and the previous data update moment; the operating status data may include operating status data of at least one indicator dimension, and the type of indicator dimension may be determined based on actual needs, which is not limited in the embodiments of the present disclosure.

[0041] For example, at least one indicator dimension may include network traffic, central processing unit CPU utilization, memory utilization, hard disk utilization, business data type complexity and / or number of abnormal requests, etc., wherein, in the scenario where a long connection is established between the IoT device and the IoT service platform, the indicator dimension may also include the number of IoT device connections.

[0042] Among them, the complexity of the business data type can be obtained by parsing the connection request in json format, and the complexity of the business data type can be the number of keys in the connection request obtained by statistics; the number of abnormal requests can be obtained by the message scheduling device querying the log information of the server cluster based on the preset time window, wherein the duration of the preset time window is the duration between two data update times.

[0043] For example, assuming that the information device updates the data saturation of the server cluster every 5 minutes, and needs to use the historical operating status data of 3 historical data update moments to update the data saturation, then Figure 3 As shown, Figure 3 A schematic diagram of obtaining the number of abnormal requests in an embodiment of the present disclosure is shown. When the data volume saturation is updated at the 20th minute, the message scheduling device obtains the number of abnormal requests at the 20th minute as 1, the number of abnormal requests at the 15th minute as 3, the number of abnormal requests at the 10th minute as 1, and the number of abnormal requests at the 5th minute as 5 based on a 5-minute time window. Figure 3 In the figure, squares represent abnormal requests.

[0044] In an optional implementation, the message scheduling device can obtain the historical operation status data and historical data volume saturation of each server cluster at multiple data update times at the data update time; then, for each server cluster, based on the historical operation status data and historical data volume saturation at multiple data update times, determine the updated data volume saturation of the server cluster. The data volume saturation of the server cluster can be updated according to the historical operation status data and historical data volume saturation of the server cluster, so that the determined data volume saturation of the server cluster more accurately represents the load condition of the server cluster.

[0045] In an optional embodiment, if Figure 4 As shown, the process of determining the updated data volume saturation of the server cluster based on the historical operation status data and the historical data volume saturation at multiple data update moments by the message scheduling device may include:

[0046] Step S401 , normalizing the historical data volume saturation and historical operation status data at each data update moment, respectively, to obtain the normalized historical data volume saturation and normalized historical operation status data at each data update moment.

[0047] In the embodiment of the present disclosure, the historical data volume saturation at the current data update moment is the data volume saturation determined at the previous data update moment, and the historical data volume saturation at the historical data update moment is the data volume saturation determined at the previous historical data update moment before the historical data update moment, wherein the data volume saturation used at the first data update moment can be an estimated value.

[0048] For example, assuming that the information equipment updates the data saturation of the server cluster once every 5 minutes, and needs to use the historical operating status data of the three historical data update times to update the data saturation, when the data saturation is updated at the 25th minute, the historical data saturation at the 25th minute is the data saturation determined when the data saturation is updated at the 20th minute; the historical data saturation at the 20th minute is the data saturation determined when the data saturation is updated at the 15th minute; the historical data saturation at the 15th minute is the data saturation determined when the data saturation is updated at the 10th minute; the historical data saturation at the 10th minute is the data saturation determined when the data saturation is updated at the 5th minute.

[0049] In an optional implementation, the message scheduling device normalizes the historical data volume saturation and historical operating status data at each data update moment respectively. The process of obtaining the normalized historical data volume saturation and normalized historical operating status data at each data update moment may include: determining the historical data volume saturation at each data update moment, and the ratio of the historical data volume saturation and the value at multiple data update moments, to obtain the normalized historical data volume saturation at each data update moment; and at the same time, determining the historical operating status data at each data update moment, and the ratio of the historical operating status data and the value at multiple data update moments, to obtain the normalized historical operating status data at each data update moment.

[0050] Step S402, determining the difference between the normalized historical data volume saturation and the normalized historical operating status data at each data update moment, and obtaining a plurality of difference data;

[0051] Step S403, based on the minimum difference data, the maximum difference data among the multiple difference data, and the normalized historical operation status data and the normalized historical data volume saturation at each data update moment, determine the correlation coefficient between the operation status data and the data volume saturation.

[0052] In an optional implementation, based on the minimum difference data, the maximum difference data among the multiple difference data, and the normalized historical operation status data and the normalized historical data volume saturation at each data update time, the process of determining the correlation coefficient between the operation status data and the data volume saturation can be implemented based on the first formula, where the first formula is:

[0053]

[0054] In Formula 1, x1(k) represents the saturation of normalized historical data volume, x i (k) represents the normalized historical operation status data, a represents the minimum difference data among multiple difference data, b represents the maximum difference data among multiple difference data, ρ represents a resolution coefficient, satisfying 0<ρ<1. ρ can be determined based on actual needs, and the embodiments of the present disclosure are not limited to this.

[0055] Step S404, determining the updated data volume saturation of the server cluster based on the correlation coefficient and the target normalized historical operating status data.

[0056] In the disclosed embodiment, the target normalized historical operation status data is the normalized historical operation status data at the most recent data update time among the normalized historical operation status data at multiple data update times. The data volume saturation of the server cluster can be updated by determining the correlation between the operation status data and the data volume saturation, thereby improving the accuracy of the updated data volume saturation. At the same time, the normalized historical operation status data at the most recent data update time is used to determine the updated data volume saturation, thereby further improving the accuracy of the updated data volume saturation.

[0057] It should be noted that, when the running status data includes running status data of multiple indicator dimensions, the message scheduling device normalizes the historical data volume saturation and the historical running status data at each data update time, respectively, and the process of obtaining the normalized historical data volume saturation and the normalized historical running status data at each data update time can be implemented based on the second formula, and the second formula is:

[0058]

[0059] In formula 2, n represents the number of multiple data update times, x ij represents the historical data volume saturation or historical operation status data of the jth data dimension at the i-th data update moment, and Z represents the normalized historical data volume saturation and the normalized historical operation status data.

[0060] In an optional implementation, when the running status data includes running status data of multiple indicator dimensions, the correlation coefficient includes the correlation coefficient of the running status data of each indicator dimension and the data volume saturation, wherein the process of the scheduling server determining the updated data volume saturation of the server cluster based on the correlation coefficient and the target normalized historical running status data may include: determining the product of the correlation coefficient associated with each indicator dimension and the target normalized historical running status data to obtain the gray value of each indicator dimension; then, based on the gray value and value of the multiple indicator dimensions, and the minimum gray value among the gray values ​​of the multiple indicator dimensions, determining the updated data volume saturation of the server cluster, wherein the gray value is used to characterize the degree of influence of the indicator dimension on the determination of the data volume saturation. The data volume saturation of the server cluster can be updated through the correlation between the running status data of multiple indicator dimensions and the data volume saturation, further improving the accuracy of the updated data volume saturation.

[0061] The process of determining the updated data volume saturation of the server cluster by the message scheduling device based on the grayscale sum values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of multiple indicator dimensions can be implemented based on the third formula, and the third formula is:

[0062]

[0063] In formula 3, G represents the grayscale and value of multiple indicator dimensions, G min Indicates the minimum grayscale value among the grayscale values ​​of multiple indicator dimensions.

[0064] in, N is the number of indicator dimensions, represents the correlation coefficient associated with the jth indicator dimension, x j Represents the target normalized historical operating status data associated with the j-th indicator dimension.

[0065] For example, if multiple data update moments include the current data update moment and the three historical data update moments before the current data update moment, the historical operating status data and the historical data volume saturation of the multiple data update moments obtained by the message scheduling device can be as shown in Table 1; then, the historical data volume saturation and the historical operating status data of each data update moment are normalized respectively, and the normalized historical data volume saturation and the normalized historical operating status data of each data update moment are obtained as shown in Table 2. Further, the difference between the normalized historical data volume saturation and the normalized historical operating status data of each data update moment is determined, and multiple difference data are obtained as shown in Table 3, wherein the minimum difference data a=0.01, the maximum difference data b=1.13, if the resolution coefficient is 0.5, then for the number of IoT device connections, the correlation coefficient between the number of IoT device connections and the data volume saturation can be determined based on the first formula to be 0.906.

[0066]

[0067] Similarly, based on the first formula, the correlation coefficients between network traffic, CPU utilization, memory utilization, hard disk utilization, business data type complexity, and number of abnormal requests and data volume saturation can be determined respectively, and Table 4 is obtained. Finally, based on the data in Table 4, the third formula and the fourth formula, the updated data volume saturation of the server cluster is determined.

[0068] It should be noted that in the embodiments of the present disclosure, when the operating status data includes operating status data of an indicator dimension, the message scheduling device determines the updated data volume saturation of the server cluster based on the correlation coefficient and the target normalized historical operating status data. The process may include: determining the product of the correlation coefficient and the target normalized historical operating status data as the updated data volume saturation of the server cluster.

[0069] In an optional implementation, the message scheduling device can directly determine the difference between the historical data volume saturation and the historical operating status data at each data update moment in the process of determining the updated data volume saturation of the server cluster based on the historical operating status data and the historical data volume saturation at multiple data update moments, obtain multiple difference data, and further determine the updated data volume saturation of the server cluster, which can improve the efficiency of determining the updated data volume saturation of the server cluster.

[0070] In an optional implementation, after receiving the connection request sent by the IoT device, the message scheduling device may determine, in response to receiving the connection request sent by the IoT device, a server cluster with the smallest data saturation among multiple server clusters associated with the IoT platform as a target server cluster, wherein the data saturation is the data saturation obtained in the most recent update.

[0071] In step S202, the message scheduling device may determine a target server in the target server cluster and send a connection request to the target server.

[0072] In an optional implementation, the connection request includes an identity identifier, wherein the identity identifier may be an identifier used to distinguish the identity, such as a user name or device name of the IoT device, and the process of the message scheduling device determining the target server in the target server cluster may include: determining the sum of the code values ​​corresponding to each character contained in the identity identifier, and determining the remainder of the ratio of the sum of the code values ​​to the number of servers in the target server cluster; further, determining the server in the target server cluster with the same server identifier and remainder as the target server; wherein the code value of the character may be the ASCII value of the character. In the case of a long connection between the IoT device and the IoT service platform, the server that processes the connection request can be determined in the server cluster with the lowest data saturation through the identity identifier of the IoT device, so as to improve the load balancing degree of each server in the server cluster, as well as the scheduling flexibility of the connection request, thereby ensuring the service reliability on the IoT service platform side.

[0073] For example, if the user name is testuser, the message scheduling device can add the ASCII value of each character in testuser, such as the ASCII value corresponding to t is 116, the ASCII value corresponding to e is 101, the ASCII value corresponding to s is 115, the ASCII value corresponding to u is 117, and the ASCII value corresponding to r is 114. The sum of the obtained encoding values ​​is 116+101+115+116+117+115+101+114=895.

[0074] Furthermore, when the target server cluster includes three servers, the sum of the coded values ​​895 is modulo the number of servers 3, and the result is 1. Then the target server is the server numbered 1 in the target server cluster.

[0075] In an optional implementation, the process of determining the target server in the target server cluster by the message scheduling device may include: determining the number of connected IoT devices of each server in the target server cluster, and determining the server with the smallest number of connected IoT devices as the target server. When the IoT device establishes a long connection with the IoT service platform, the server with the smallest load in the server cluster with the smallest load may be determined as the target server to improve the load balancing of the servers in the server cluster.

[0076] It should be noted that in the embodiments of the present disclosure, the message scheduling device is an intermediate device. The message scheduling device usually runs based on the Linux system. The default number of connections in the Linux system is only 1024, that is, when the number of connections initiated by the message scheduling device reaches 1024, it will no longer be able to initiate connections. However, in the communication framework based on the MQTT technology, devices communicate with each other through the Transmission Control Protocol (TCP). At the same time, the Linux system allows the number of connections based on TCP protocol communication to be modified through the ulimit command or by changing the system file parameters to change the number of connections initiated externally to a larger value. Therefore, based on this feature of the Linux system, the limitation on the number of connections initiated externally by the message scheduling device during the TCP protocol communication process can be broken through to improve the network resource utilization of the message scheduling device.

[0077] In an optional implementation, the message scheduling device and the target server can be configured to be in the same network segment, that is, the Internet Protocol Address (IP) address of the message scheduling device and the target server is the same, then the process of the message scheduling device sending the connection request to the target server can include: modifying the destination physical (Media Access Control Address, MAC) address in the connection request to the MAC address of the target server, and retaining the destination IP address and source IP address in the connection request to obtain an updated connection request; then, sending the updated connection request to the target server, wherein the destination IP address is the IP address of the message scheduling device or the target server, and the source IP address is the IP address of the Internet of Things device, and the target server is used to respond to the updated connection request and return a connection request response to the Internet of Things device. By configuring the message scheduling device and the target server in the same network segment, the connection request can be forwarded to the target server by the message scheduling device, thereby improving the network resource utilization of the message scheduling device. At the same time, the target server can directly send the response information of the connection request to the Internet of Things device, which can not only reduce the load of the message scheduling device, but also improve communication efficiency.

[0078] For example, Figure 5 As shown, Figure 5 A schematic diagram of an interaction process of a message scheduling method provided by an embodiment of the present disclosure is shown, wherein the IoT device is a sensor device, including:

[0079] Step S501, the sensor device sends a connection request to the message scheduling device;

[0080] The target MAC address in the connection request is the MAC address of the message scheduling device, the source IP address is the IP address of the sensor device, and the destination address is the IP address of the message scheduling device.

[0081] Step S502: After determining the target server, the message scheduling device may modify the destination physical MAC address in the connection request to the MAC address of the target server, and retain the destination IP address and the source IP address in the connection request to obtain an updated connection request;

[0082] Step S503, the message scheduling device may send the updated connection request to the target server;

[0083] Among them, in the updated connection request, the target MAC address is the MAC address of the target server, the source IP address is the IP address of the sensor device, and the destination address is the IP address of the message scheduling device.

[0084] Step S504, the target server may generate a connection request response in response to the updated connection request;

[0085] In step S505 , the target server may send a connection request response to the sensor device.

[0086] Among them, in the connection request response, the target MAC address is the MAC address of the sensor device, the source IP address is the IP address of the message scheduling device, and the destination address is the IP address of the sensor device.

[0087] In an optional implementation, multiple network cards can be installed in the message scheduling device, and the process of the message scheduling device sending the connection request to the target server can include: determining the number of occupied IP addresses of each of the multiple network cards, and determining the network card with the smallest number of occupied IP addresses as the target network card; then, modifying the destination MAC address in the connection request to the MAC address of the target server, and modifying the destination IP address to the IP address of the target server, and modifying the source IP address in the connection request to any unoccupied IP address associated with the target network card, to obtain an updated connection request; further, sending the updated connection request to the target server, wherein the target server is used to respond to the updated connection request and return a link request response to the message scheduling device, so that the message scheduling device sends the connection request response to the Internet of Things device. Through the multiple network cards installed in the message scheduling device, the connection request can be forwarded to the target server using the network card with the smallest number of connections initiated, breaking through the limit on the number of connections initiated by the message scheduling device, and improving the network resource utilization of the message scheduling device.

[0088] For example, Figure 6 As shown, Figure 6 A schematic diagram of an interaction process of a message scheduling method provided by an embodiment of the present disclosure is shown, wherein the IoT device is a sensor device, including:

[0089] Step S601, the sensor device sends a connection request to the message scheduling device;

[0090] The target MAC address in the connection request is the MAC address of the message scheduling device, the source IP address is the IP address of the sensor device, and the destination address is the IP address of the message scheduling device.

[0091] Step S602, after determining the target server, the message scheduling device may modify the destination MAC address in the connection request to the MAC address of the target server, modify the destination IP address to the IP address of the target server, and modify the source IP address in the connection request to any unoccupied IP address associated with the target network card, thereby obtaining an updated connection request;

[0092] Step S603, the message scheduling device may send the updated connection request to the target server;

[0093] Among them, in the updated connection request, the target MAC address is the MAC address of the target server, the source IP address is an occupied IP address that is not associated with the target network card, and the destination address is the IP address of the message scheduling device.

[0094] Step S604, the target server may generate a connection request response in response to the updated connection request;

[0095] Step S605: The target server may send a connection request response to the message scheduling device.

[0096] Among them, in the connection request response sent by the target server, the target MAC address is the MAC address of the message scheduling device, the source IP address is the IP address of the target server, and the destination address is the IP address of the message scheduling device.

[0097] Step S606: The message scheduling device may send a connection request response to the IoT device.

[0098] Among them, in the connection request response sent by the message scheduling device, the target MAC address is the MAC address of the sensor device, the source IP address is the IP address of the message scheduling device, and the destination address is the IP address of the sensor device.

[0099] Table 1

[0100]

[0101] Table 2

[0102]

[0103] Table 3

[0104]

[0105] Table 4

[0106]

[0107] An exemplary embodiment of the present disclosure provides a message scheduling apparatus, which may be a message scheduling device. Figure 7 FIG. 2 shows a schematic block diagram of functional modules of a message scheduling device according to an exemplary embodiment of the present disclosure. Figure 7 As shown, the message scheduling device 700 includes:

[0108] The determination module 701 is configured to, in response to receiving a connection request sent by an IoT device, determine a server cluster with the smallest data volume saturation among multiple server clusters associated with the IoT platform as a target server cluster, wherein the data volume saturation is used to characterize the load size of the server cluster, and the data volume saturation is determined based on historical operation status data of the server cluster;

[0109] The processing module 702 is configured to determine a target server in the target server cluster and send the connection request to the target server.

[0110] Optionally, the device further includes an updating module 703 configured to:

[0111] At the data update time, obtaining the historical operation status data and the historical data volume saturation of each of the server clusters at multiple data update times;

[0112] For each of the server clusters, based on historical operating status data and historical data volume saturation at multiple data update moments, the updated data volume saturation of the server cluster is determined.

[0113] Optionally, the updating module 703 is configured to:

[0114] Normalizing the historical data volume saturation and historical operation status data at each data update moment to obtain the normalized historical data volume saturation and normalized historical operation status data at each data update moment;

[0115] Determine the difference between the normalized historical data volume saturation and the normalized historical operating status data at each data update moment to obtain a plurality of difference data;

[0116] Determine the correlation coefficient between the operation status data and the data volume saturation based on the minimum difference data and the maximum difference data among the plurality of difference data, and the normalized historical operation status data and the normalized historical data volume saturation at each data update moment;

[0117] Based on the correlation coefficient and the target normalized historical operating status data, the updated data volume saturation of the server cluster is determined, wherein the target normalized historical operating status data is the normalized historical operating status data at the most recent data update time among the normalized historical operating status data at multiple data update times.

[0118] Optionally, the running status data includes running status data of multiple indicator dimensions, and the correlation coefficient includes a correlation coefficient between the running status data of each indicator dimension and the data volume saturation.

[0119] The updating module 703 is configured to:

[0120] Determine the product of the correlation coefficient associated with each indicator dimension and the target normalized historical operating status data to obtain a grayscale value for each indicator dimension, wherein the grayscale value is used to characterize the degree of influence of the indicator dimension on determining the saturation of the data volume;

[0121] Based on the grayscale sum values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of the multiple indicator dimensions, the updated data volume saturation of the server cluster is determined.

[0122] Optionally, the message scheduling device and the target server have the same Internet Protocol IP address, and the processing module 702 is configured to:

[0123] Modify the destination physical MAC address in the connection request to the MAC address of the target server, and retain the destination IP address and the source IP address in the connection request to obtain an updated connection request, wherein the destination IP address is the IP address of the message scheduling device or the target server, and the source IP address is the IP address of the Internet of Things device;

[0124] The updated connection request is sent to the target server, wherein the target server is used to return a connection request response to the Internet of Things device in response to the updated connection request.

[0125] Optionally, the processing module 702 is configured to:

[0126] Determine the number of occupied IP addresses of each of the multiple network cards, and determine the network card with the smallest number of occupied IP addresses as the target network card;

[0127] Modify the destination MAC address in the connection request to the MAC address of the target server, and modify the destination IP address to the IP address of the target server, and modify the source IP address in the connection request to any unoccupied IP address associated with the target network card, to obtain an updated connection request;

[0128] The updated connection request is sent to the target server, wherein the target server is used to return a link request response to the message scheduling device in response to the updated connection request, so that the message scheduling device sends the connection request response to the Internet of Things device.

[0129] Optionally, the processing module 702 is configured to:

[0130] Determine a sum of the code values ​​corresponding to each character included in the identity identifier, and determine a remainder of a ratio of the sum of the code values ​​to the number of servers in the target server cluster;

[0131] The server in the target server cluster whose server identifier is the same as the remainder is determined as the target server.

[0132] The exemplary embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the electronic device executes the message scheduling method according to the embodiment of the present disclosure.

[0133] The exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the message scheduling method according to the embodiments of the present disclosure.

[0134] like Figure 8 As shown, the exemplary embodiment of the present disclosure further provides a computer program product 800, including a computer program 801, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to execute the message scheduling method according to the embodiment of the present disclosure.

[0135] refer to Fig. 9 , a structural block diagram of an electronic device 900 that can be used as a message scheduling device of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0136] like Fig. 9As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0137] A plurality of components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the electronic device 900, and the input unit 906 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 907 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 908 may include, but is not limited to, a disk, an optical disk. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0138] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above. For example, in some embodiments, the method of the exemplary embodiment of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via the ROM 902 and / or the communication unit 909. In some embodiments, the computing unit 901 may be configured to perform the method of the exemplary embodiment of the present disclosure by any other appropriate means (e.g., by means of firmware).

[0139] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0140] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0144] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0145] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).

[0146] Although the present disclosure has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, this specification and the drawings are merely exemplary illustrations of the present disclosure as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present disclosure. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A message scheduling method, characterized in that: The method is applied to a message scheduling device, comprising: In response to receiving a connection request sent by an IoT device, determining a server cluster with the smallest data volume saturation among multiple server clusters associated with the IoT platform as a target server cluster, wherein the data volume saturation is used to characterize the load size of the server cluster, and the data volume saturation is determined based on historical operating status data of the server cluster; A target server is determined in the target server cluster, and the connection request is sent to the target server.

2. The message scheduling method according to claim 1, characterized in that: The method further comprises: At the data update time, obtaining the historical operation status data and the historical data volume saturation of each of the server clusters at multiple data update times; For each of the server clusters, based on historical operating status data and historical data volume saturation at multiple data update moments, the updated data volume saturation of the server cluster is determined.

3. The message scheduling method according to claim 2, characterized in that: The determining the updated data volume saturation of the server cluster based on the historical operation status data and the historical data volume saturation at multiple data update moments includes: Normalizing the historical data volume saturation and historical operation status data at each data update moment to obtain the normalized historical data volume saturation and normalized historical operation status data at each data update moment; Determine the difference between the normalized historical data volume saturation and the normalized historical operating status data at each data update moment to obtain a plurality of difference data; Determine the correlation coefficient between the operation status data and the data volume saturation based on the minimum difference data and the maximum difference data among the plurality of difference data, and the normalized historical operation status data and the normalized historical data volume saturation at each data update moment; Based on the correlation coefficient and the target normalized historical operating status data, the updated data volume saturation of the server cluster is determined, wherein the target normalized historical operating status data is the normalized historical operating status data at the most recent data update time among the normalized historical operating status data at multiple data update times.

4. The message scheduling method according to claim 3, characterized in that: The running status data includes running status data of multiple indicator dimensions, and the correlation coefficient includes the correlation coefficient between the running status data of each indicator dimension and the data volume saturation. The step of determining the updated data volume saturation of the server cluster based on the correlation coefficient and the target normalized historical operating status data includes: Determine the product of the correlation coefficient associated with each indicator dimension and the target normalized historical operating status data to obtain a grayscale value for each indicator dimension, wherein the grayscale value is used to characterize the degree of influence of the indicator dimension on determining the saturation of the data volume; Based on the grayscale sum values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of the multiple indicator dimensions, the updated data volume saturation of the server cluster is determined.

5. The message scheduling method according to claim 1, characterized in that: The message scheduling device and the target server have the same Internet Protocol IP address, and sending the connection request to the target server includes: Modify the destination physical MAC address in the connection request to the MAC address of the target server, and retain the destination IP address and the source IP address in the connection request to obtain an updated connection request, wherein the destination IP address is the IP address of the message scheduling device or the target server, and the source IP address is the IP address of the Internet of Things device; The updated connection request is sent to the target server, wherein the target server is used to return a connection request response to the Internet of Things device in response to the updated connection request.

6. The message scheduling method according to claim 1, characterized in that: The sending the connection request to the target server comprises: Determine the number of occupied IP addresses of each of the multiple network cards, and determine the network card with the smallest number of occupied IP addresses as the target network card; Modify the destination MAC address in the connection request to the MAC address of the target server, and modify the destination IP address to the IP address of the target server, and modify the source IP address in the connection request to any unoccupied IP address associated with the target network card, to obtain an updated connection request; The updated connection request is sent to the target server, wherein the target server is used to return a link request response to the message scheduling device in response to the updated connection request, so that the message scheduling device sends the connection request response to the Internet of Things device.

7. The message scheduling method according to claim 1, characterized in that: The connection request includes an identity identifier, and determining the target server in the target server cluster includes: Determine a sum of the code values ​​corresponding to each character included in the identity identifier, and determine a remainder of a ratio of the sum of the code values ​​to the number of servers in the target server cluster; The server in the target server cluster whose server identifier is the same as the remainder is determined as the target server.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the message scheduling method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the message scheduling method described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the message scheduling method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, device and system for controlling load balance

    CN106550003A

  • Traffic scheduling method, system and device

    CN111787060A

  • Method, device and system for communication of Internet of Things equipment, Internet of Things equipment and storage medium

    CN115297139A

  • Gray release method

    CN117692327A

  • Data source calling load balancing method and device, electronic equipment and medium

    CN118012608A