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

By selecting the server cluster with the lowest data saturation in the IoT platform to handle connection requests, the problem of unbalanced load on the IoT platform is solved, improving device access efficiency and reliability, and reducing resource consumption and access failure risk.

CN119094529BActive Publication Date: 2025-11-18CHINA MOBILE M2M +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Uneven load on IoT platforms leads to a decline in overall system performance and stability. Existing load balancing solutions increase resource consumption and the risk of access failure for IoT devices.

Method used

By responding to connection requests from IoT devices through message scheduling devices, the target cluster is determined among multiple server clusters associated with the IoT platform, which has the lowest data saturation. The target server in the target cluster is then selected to process the connection request, thus avoiding the pre-process of IoT devices obtaining access to the network.

Benefits of technology

It improves the efficiency and reliability of IoT devices accessing the IoT platform, reduces resource consumption and access failure risk, and achieves reliable load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094529B_ABST
    Figure CN119094529B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer, and particularly provides a message scheduling method, device, equipment, medium and program product. The message scheduling method comprises: in response to receiving a connection request sent by an Internet of Things device, determining, from among a plurality of server clusters associated with an Internet of Things platform, a server cluster with the smallest data volume saturation degree as a target server cluster, wherein the data volume saturation degree is used to represent the load size of the server cluster, and the data volume saturation degree is determined based on historical running state data of the server cluster; then, determining a target server in the target server cluster, and sending the connection request to the target server. The present disclosure can improve the efficiency and reliability of the Internet of Things device accessing the Internet of Things platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous development of IoT technology and the expansion of IoT business, a large number of IoT devices need to be connected to the IoT platform. At this time, the IoT platform may experience situations where some servers are overloaded while others are underloaded. This load imbalance of the IoT platform will affect the overall system performance and stability.

[0003] In related technologies, in order to solve the problem of unbalanced load on IoT platforms, before an IoT device connects to the IoT platform, it first sends a load query request to the IoT platform. The IoT platform will then return an accessible connection address that meets the connection conditions based on its own load, so that the IoT device can actually connect to the IoT platform through the accessible connection address.

[0004] However, the load balancing solutions provided in related technologies require IoT devices to obtain an accessible connection address before connecting to the IoT platform. This pre-process not only brings additional resource consumption to IoT devices, but may also cause more problems, thereby affecting the reliability of IoT devices connecting to the IoT platform. Summary of the Invention

[0005] This disclosure is made in view of the above-mentioned problems. This disclosure provides a message scheduling method, apparatus, device, medium, and program product that can improve the efficiency and reliability of IoT devices accessing IoT platforms.

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

[0007] In response to receiving a connection request from an IoT device, the server cluster with the lowest data saturation among multiple server clusters associated with the IoT platform is identified as the target server cluster. The data saturation is used to characterize the load size of the server cluster and is determined based on the historical operating status data of the server cluster.

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

[0009] According to another aspect of this 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 message scheduling method described above.

[0010] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the message scheduling method described above.

[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the message scheduling method described above.

[0012] As will be described in detail below, the message scheduling method, apparatus, device, medium, and program product according to embodiments of this disclosure can directly select the server in the server cluster with the least load to handle the connection request when an IoT device needs to access the server of an IoT service platform, based on the data saturation of the server cluster. This eliminates the need for the IoT device to undergo a pre-process to obtain an accessible connection, and the IoT device can quickly access the server on the IoT service side without additional resource consumption or the risk of failure to obtain an accessible connection. This improves 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, load balancing can be performed considering the actual operating conditions of each server cluster, improving the scheduling reliability of connection requests in multi-IoT device scenarios.

[0013] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0014] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0015] Figure 1 This is a schematic diagram illustrating an implementation scenario of a message scheduling scheme according to an embodiment of this disclosure.

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

[0017] Figure 3 This is a schematic diagram illustrating the acquisition of the number of abnormal requests in an embodiment of this disclosure.

[0018] Figure 4 This is a flowchart illustrating the update process of data saturation of a server cluster according to an embodiment of this disclosure.

[0019] Figure 5 This is a schematic diagram illustrating the interaction flow of the message scheduling method according to an embodiment of the present disclosure.

[0020] Figure 6 This is a schematic diagram illustrating the interaction flow of the message scheduling method according to an embodiment of the present disclosure.

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

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

[0023] Figure 9 This is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0025] In related technologies, in order to solve the problem of unbalanced load on IoT platforms, before IoT devices connect to the IoT platform, they first obtain the connection address of a server with a lower load from the IoT platform side, so that the IoT devices can actually connect to the IoT platform through this accessible connection address.

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

[0027] To address the aforementioned problems, embodiments of this disclosure provide a message scheduling scheme, such as... Figure 1 As shown, Figure 1 This illustration shows a schematic diagram of an implementation scenario for a message scheduling scheme provided by an exemplary embodiment of this disclosure. For example... Figure 1 As shown, the implementation scenario 100 includes an IoT device 101, a message scheduling device 102, and multiple servers 103. The IoT device 101 is a terminal device in the IoT business scenario, and the terminal device can be a smart home device, wearable device, in-vehicle device, or smart gateway device, etc. Figure 1The IoT device shown is an image acquisition device, server 103 is a server on the IoT service platform side, and message scheduling device 102 can be a computer or a server.

[0028] Communication links can be established between IoT device 101 and message scheduling device 102, and between message scheduling device 102 and server 103, to implement the message scheduling scheme provided in this embodiment.

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

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

[0031] Step S201: In response to receiving a connection request from an IoT device, the server cluster with the lowest data saturation among the multiple server clusters associated with the IoT platform is identified as the target server cluster.

[0032] Among them, data saturation is used to characterize the load size of the server cluster, and data saturation is determined based on the historical operating status data of the server cluster.

[0033] Step S202: Determine the target server in the target server cluster and send the connection request to the target server;

[0034] In summary, the message scheduling method provided in this disclosure can, in response to receiving a connection request from an IoT device, determine the server cluster with the lowest data saturation among multiple server clusters associated with the IoT platform as the target server cluster, identify the target server within the target server cluster, and send the connection request to the target server. When an IoT device needs to access a server on the IoT service platform, it can directly select a server in the server cluster with the lowest load to handle the connection request based on the data saturation of the server cluster. This eliminates the need for a pre-process for the IoT device to obtain an accessible connection, avoids additional resource consumption by the IoT device, and eliminates the risk of connection acquisition failure. This allows for rapid access to the IoT service-side server, improving the efficiency and reliability of IoT device access to the IoT platform. Furthermore, since the data saturation of the server cluster is determined based on the server cluster's operational status data, load balancing can be considered based on the actual operating conditions of each server cluster, improving the scheduling reliability of connection requests in multi-IoT device scenarios.

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

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

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

[0038] It should be noted that, in this embodiment of the disclosure, after the message scheduling device is running, the data saturation of each server cluster can be updated according to a preset period. The update period of the data saturation can be determined based on actual needs, and this embodiment of the disclosure does not limit it. For example, the data saturation of each server cluster can be updated once every preset time interval, such as 5 minutes or 3 minutes; or, the data saturation of each server cluster can be updated once after the connection volume of IoT devices increases or decreases by a preset number, such as 100 or 200 devices.

[0039] It should also be noted that when the message scheduling device updates the data saturation of the server cluster, it uses historical running status data, which may include historical running status data at multiple data update times. The multiple data update times may include the current data update time and at least one historical data update time before the current data update time. The number of at least one historical data update time can be determined based on actual needs. This disclosure does not limit this. For example, the number of at least one historical data update time may be 3 or 5 historical data update times.

[0040] The historical running status data at each data update time is the running status data between the current data update time and the previous data update time. The running status data may include running status data of at least one indicator dimension. The type of indicator dimension can be determined based on actual needs, and this disclosure embodiment does not limit it.

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

[0042] The complexity of business data types can be obtained by parsing JSON-formatted connection requests, and the complexity of business data types can be represented by the number of keys in the obtained connection requests. The number of abnormal requests can be obtained by the message scheduling device querying the log information of the server cluster based on a preset time window, where the duration of the preset time window is the duration between two data update moments.

[0043] For example, suppose the information device updates the data saturation of the server cluster every 5 minutes, and needs to use historical operating status data from 3 historical data update times for the data saturation update, then as follows: Figure 3 As shown, Figure 3 A schematic diagram illustrating the acquisition of abnormal request counts according to an embodiment of this disclosure is shown. When updating the data saturation at the 20th minute, the message scheduling device acquires, based on a 5-minute time window, the abnormal request count for the 20th minute as 1, the abnormal request count for the 15th minute as 3, the abnormal request count for the 10th minute as 1, and the abnormal request count for the 5th minute as 5. Figure 3 In the middle, the square represents an abnormal request.

[0044] In one optional implementation, the message scheduling device can acquire historical operating status data and historical data saturation for each server cluster at multiple data update times during data update. Then, for each server cluster, based on the historical operating status data and historical data saturation at multiple data update times, it determines the updated data saturation. The data saturation of the server cluster can be updated based on the historical operating status data and historical data saturation to more accurately represent the load status of the server cluster.

[0045] In one alternative implementation, such as Figure 4 As shown, the process by which the message scheduling device determines the post-update data saturation of the server cluster based on historical operational status data and historical data saturation at multiple data update times may include:

[0046] Step S401: Normalize the historical data saturation and historical operating status data at each data update time to obtain the normalized historical data saturation and normalized historical operating status data at each data update time.

[0047] In this embodiment of the disclosure, the historical data saturation at the current data update time is the data saturation determined at the previous data update time, and the historical data saturation at the historical data update time is the data saturation determined at the previous historical data update time. The data saturation used at the first data update time can be an estimated value.

[0048] For example, suppose the information device updates the data saturation of the server cluster every 5 minutes, and needs to use historical operating status data at 3 historical data update times for the data saturation update. When updating the data saturation at the 25th minute, the historical data saturation at the 25th minute is the same as the data saturation determined when updating the data saturation at the 20th minute; the historical data saturation at the 20th minute is the same as the data saturation determined when updating the data saturation at the 15th minute; the historical data saturation at the 15th minute is the same as the data saturation determined when updating the data saturation at the 10th minute; and the historical data saturation at the 10th minute is the same as the data saturation determined when updating the data saturation at the 5th minute.

[0049] In one optional implementation, the message scheduling device normalizes the historical data saturation and historical operating status data at each data update time to obtain the normalized historical data saturation and normalized historical operating status data at each data update time. This process may include: determining the historical data saturation at each data update time, and the ratio of the sum of historical data saturation values ​​at multiple data update times to obtain the normalized historical data saturation at each data update time; simultaneously, determining the historical operating status data at each data update time, and the ratio of the sum of historical operating status data values ​​at multiple data update times to obtain the normalized historical operating status data at each data update time.

[0050] Step S402: Determine the difference between the normalized historical data saturation and the normalized historical running status data at each data update time to obtain multiple difference data.

[0051] Step S403: Based on the minimum difference data, the maximum difference data, the normalized historical running status data and the normalized historical data saturation at each data update time, determine the correlation coefficient between the running status data and the data saturation.

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

[0053]

[0054] In Formula 1, x1(k) represents the saturation of normalized historical data, x i (k) represents the normalized historical operating status data, and a represents the minimum difference among multiple difference data. b represents the largest difference among multiple difference data points. ρ represents the resolution coefficient, which satisfies 0 < ρ < 1. ρ can be determined based on actual needs, and this disclosure does not limit it.

[0055] Step S404: Based on the correlation coefficient and the target normalized historical running status data, determine the data saturation level of the server cluster after the update.

[0056] In this embodiment of the disclosure, the target normalized historical running status data is the normalized historical running status data at the most recent data update time among multiple data update times. By determining the correlation between running status data and data volume saturation, the data volume saturation of the server cluster can be updated, improving the accuracy of the updated data volume saturation. Furthermore, by using the normalized historical running status data at the most recent data update time to determine the updated data volume saturation, the accuracy of the updated data volume saturation is further improved.

[0057] It should be noted that when the operational status data includes operational status data across multiple indicator dimensions, the message scheduling device can normalize the historical data saturation and historical operational status data at each data update moment to obtain the normalized historical data saturation and normalized historical operational status data at each data update moment. This process can be achieved based on the second formula, which is:

[0058]

[0059] In Formula 2, n represents the number of data update times, and x ij Z represents the historical data saturation or historical operating status data of the j-th data dimension at the i-th data update time, and Z represents the normalized historical data saturation and normalized historical operating status data.

[0060] In an optional implementation, when the operational status data includes operational status data across multiple indicator dimensions, the correlation coefficient includes the correlation coefficient between the operational status data and data saturation for each indicator dimension. The process by which the scheduling server determines the updated data saturation of the server cluster based on the correlation coefficient and target-normalized historical operational status data may include: determining the product of the correlation coefficient associated with each indicator dimension and the target-normalized historical operational status data to obtain a grayscale value for each indicator dimension; then, determining the updated data saturation of the server cluster based on the sum of the grayscale values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of multiple indicator dimensions. The grayscale value is used to characterize the degree of influence of the indicator dimensions on determining the data saturation. By using the correlation between the operational status data and data saturation of multiple indicator dimensions, the data saturation of the server cluster can be updated, further improving the accuracy of the updated data saturation.

[0061] The process by which the message scheduling device determines the data saturation level of the server cluster after an update, based on the grayscale values ​​of multiple indicator dimensions and the minimum grayscale value among these dimensions, can be implemented using a third formula:

[0062]

[0063] In Formula 3, G represents the grayscale sum of multiple indicator dimensions. min This represents the minimum grayscale value among multiple indicator dimensions.

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

[0065] For example, if multiple data update times include the current data update time and the three historical data update times preceding the current data update time, the historical operating status data and historical data saturation of the multiple data update times obtained by the message scheduling device can be shown in Table 1. Next, the historical data saturation and historical operating status data of each data update time are normalized to obtain the normalized historical data saturation and normalized historical operating status data of each data update time, as shown in Table 2. Further, the difference between the normalized historical data saturation and normalized historical operating status data of each data update time is determined to obtain multiple difference data, as shown in Table 3. Among them, the minimum difference data a = 0.01, the maximum difference data b = 1.13, and 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 saturation can be determined to be 0.906 based on the first formula.

[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 saturation can be determined, resulting in Table 4. Finally, based on the data in Table 4, the third and fourth formulas are used to determine the updated data saturation of the server cluster.

[0068] It should be noted that, in the embodiments of this disclosure, when the running status data includes running status data of one indicator dimension, the process by which the message scheduling device determines the updated data saturation of the server cluster based on the correlation coefficient and the target normalized historical running status data may include: determining the updated data saturation of the server cluster by multiplying the correlation coefficient and the target normalized historical running status data.

[0069] In one optional implementation, the message scheduling device determines the updated data saturation of the server cluster based on historical operating status data and historical data saturation at multiple data update times. In this process, it can directly determine the difference between the historical data saturation and the historical operating status data at each data update time, obtain multiple difference data, and further determine the updated data saturation of the server cluster, which can improve the efficiency of determining the updated data saturation of the server cluster.

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

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

[0072] In one optional implementation, the connection request includes an identity identifier, which can be a distinguishing identifier such as the username or device name of the IoT device. The process by which the message scheduling device determines the target server in the target server cluster may include: determining the sum of the encoded values ​​corresponding to each character in the identity identifier, and determining the remainder of the ratio of the sum of the encoded values ​​to the number of servers in the target server cluster; further, servers in the target server cluster whose server identifiers match the remainder are determined as the target servers; wherein the encoded value of a character can be the ASCII value of the character. When an IoT device establishes a long-term connection with an IoT service platform, the identity identifier of the IoT device can be used to determine the server handling the connection request in the server cluster with the lowest data saturation, thereby improving the load balancing of servers within the server cluster and the flexibility of connection request scheduling, ensuring the service reliability of the IoT service platform.

[0073] For example, if the username is testuser, the message dispatching device can add up the ASCII values ​​of each character in testuser. For instance, the ASCII value of t is 116, the ASCII value of e is 101, the ASCII value of s is 115, the ASCII value of u is 117, and the ASCII value of r is 114. The sum of the encoded values ​​is 116+101+115+116+117+115+101+114=895.

[0074] Furthermore, if the target server cluster contains 3 servers, take the remainder of the sum of the encoded values ​​895 modulo the number of servers 3. The result is 1, so the target server is the server numbered 1 in the target server cluster.

[0075] In one optional implementation, the process by which the message scheduling device determines the target server within the target server cluster may include: determining the number of connected IoT devices on each server in the target server cluster, and identifying the server with the fewest connected IoT devices as the target server. This can be achieved when IoT devices have established long-term connections with the IoT service platform, by identifying the server with the lowest load in the server cluster as the target server, thereby improving load balancing among the servers within the server cluster.

[0076] It should be noted that in this embodiment, the message scheduling device is an intermediate device, which typically runs on a Linux system. The default connection limit in Linux is only 1024. That is, once the number of connections initiated by the message scheduling device reaches 1024, it will not be able to initiate any more connections. However, in the communication framework based on 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 system file parameters, so as to change the number of outgoing connections to a larger value. Therefore, based on this feature of the Linux system, the limitation on the number of outgoing connections initiated by the message scheduling device in the TCP protocol communication process can be overcome, thereby improving the network resource utilization of the message scheduling device.

[0077] In one optional implementation, the message scheduling device and the target server can be configured to be on the same network segment, meaning their Internet Protocol (IP) addresses are identical. The process of the message scheduling device sending a connection request to the target server can then include: modifying the destination Media Access Control (MAC) address in the connection request to the MAC address of the target server, while retaining the destination IP address and source IP address, resulting in an updated connection request; then, sending the updated connection request to the target server, where the destination IP address is the IP address of either the message scheduling device or the target server, and the source IP address is the IP address of the IoT device. The target server responds to the updated connection request by returning a connection request response to the IoT device. By configuring the message scheduling device and the target server on the same network segment, and having the message scheduling device forward the connection request to the target server, the network resource utilization of the message scheduling device is improved. Simultaneously, the target server can directly send the connection request response information to the IoT device, reducing the load on the message scheduling device and improving communication efficiency.

[0078] For example, such as Figure 5 As shown, Figure 5 This illustration shows an interactive flow diagram of a message scheduling method provided in an embodiment of the present disclosure, wherein the Internet of Things (IoT) device is a sensing device, including:

[0079] Step S501: The sensing device sends a connection request to the message scheduling device;

[0080] In the connection request, the target MAC address 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] In step S502, after determining the target server, the message scheduling device can 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 source IP address in the connection request to obtain the updated connection request.

[0082] In step S503, the message scheduling device can send the updated connection request to the target server;

[0083] 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] In step S504, the target server can generate a connection request response in response to the updated connection request;

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

[0086] 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 one optional implementation, multiple network interface cards (NICs) can be integrated into the message scheduling device. The process of the message scheduling device sending a connection request to the target server can include: determining the number of occupied IP addresses for each of the multiple NICs, and identifying the NIC with the fewest occupied IP addresses as the target NIC; then, modifying the destination MAC address in the connection request to the MAC address of the target server, 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 NIC, resulting in an updated connection request; further, sending the updated connection request to the target server, whereby the target server responds to the updated connection request by returning a connection request response to the message scheduling device, enabling the message scheduling device to send the connection request response to the IoT device. By utilizing multiple NICs integrated into the message scheduling device, the connection request can be forwarded to the target server using the NIC with the fewest initiating connections, overcoming the limitation on the number of outgoing connections of the message scheduling device and improving the network resource utilization of the message scheduling device.

[0088] For example, such as Figure 6 As shown, Figure 6 This illustration shows an interactive flow diagram of a message scheduling method provided in an embodiment of the present disclosure, wherein the Internet of Things (IoT) device is a sensing device, including:

[0089] Step S601: The sensing device sends a connection request to the message scheduling device;

[0090] In the connection request, the target MAC address 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] In step S602, after determining the target server, the message scheduling device can 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] In step S603, the message scheduling device can send the updated connection request to the target server;

[0093] 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 not associated with the target network card, and the destination address is the IP address of the message scheduling device.

[0094] In step S604, the target server can generate a connection request response in response to the updated connection request;

[0095] In step S605, the target server can send a connection request response to the message scheduling device.

[0096] 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] In step S606, the message scheduling device can send a connection request response to the IoT device.

[0098] 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 this disclosure provides a message scheduling apparatus, which may be a message scheduling device. Figure 7 A schematic block diagram of the functional modules of a message scheduling apparatus according to an exemplary embodiment of the present disclosure is shown. 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 the server cluster with the smallest data saturation among multiple server clusters associated with the IoT platform as the target server cluster, wherein the data saturation is used to characterize the load size of the server cluster, and the data saturation is determined based on the historical operating status data of the server cluster.

[0109] 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 update module 703, configured to:

[0111] At each data update moment, acquire the historical operating status data and historical data saturation of each server cluster at multiple data update moments;

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

[0113] Optionally, the update module 703 is configured as follows:

[0114] Normalize the historical data saturation and historical operating status data at each data update time to obtain the normalized historical data saturation and normalized historical operating status data at each data update time.

[0115] Determine the difference between the normalized historical data saturation and the normalized historical operating status data at each data update time to obtain multiple difference data.

[0116] Based on the minimum difference data, the maximum difference data among the multiple difference data, and the normalized historical running status data and normalized historical data saturation at each data update time, the correlation coefficient between the running status data and the data saturation is determined.

[0117] Based on the correlation coefficient and the target normalized historical operating status data, the data saturation of the server cluster after the update is determined. 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 operational status data includes operational status data across multiple indicator dimensions, and the correlation coefficient includes the correlation coefficient between the operational status data and data saturation for each indicator dimension.

[0119] The update module 703 is configured as follows:

[0120] The correlation coefficient associated with each indicator dimension is determined and multiplied by the target normalized historical operating status data to obtain the gray value of each indicator dimension, wherein the gray value is used to characterize the degree of influence of the indicator dimension on the saturation of the determined data volume;

[0121] The data saturation level of the server cluster after the update is determined based on the grayscale values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of the multiple indicator dimensions.

[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] The destination physical MAC address in the connection request is modified to the MAC address of the target server, while the destination IP address and source IP address in the connection request are retained to obtain an updated connection request. 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 IoT device.

[0124] The updated connection request is sent to the target server, wherein the target server responds to the updated connection request by returning a connection request response to the IoT device.

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

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

[0127] The destination MAC address in the connection request is modified to the MAC address of the target server, the destination IP address is modified to the IP address of the target server, and the source IP address in the connection request is modified 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 configured to respond to the updated connection request by returning a connection request response to the message scheduling device, so that the message scheduling device sends the connection request response to the IoT device.

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

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

[0131] Servers in the target server cluster whose server identifiers are the same as the remainder are identified as target servers.

[0132] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, causing the electronic device to perform a message scheduling method according to embodiments of this disclosure.

[0133] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a message scheduling method according to embodiments of this disclosure.

[0134] like Figure 8 As shown, an exemplary embodiment of this disclosure also provides a computer program product 800, including a computer program 801, wherein, when executed by a computer's processor, the computer program is used to cause the computer to perform a message scheduling method according to an embodiment of this disclosure.

[0135] refer to Figure 9 The present invention describes a structural block diagram of an electronic device 900 that can serve as a message dispatching device, 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, workstations, 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 processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0136] like Figure 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 into a random access memory (RAM) 903 from a storage unit 908. The RAM 903 may also store various programs and data required for the operation of the electronic device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

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

[0138] The computing unit 901 can be a variety of general-purpose and / or special-purpose 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. In some embodiments, the computing unit 901 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).

[0139] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0140] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, 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, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. 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 for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0144] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0145] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0146] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.

Claims

1. A message scheduling method, characterized in that, The method is applied to a message scheduling device, including: In response to receiving a connection request from an IoT device, the server cluster with the lowest data saturation among multiple server clusters associated with the IoT platform is identified as the target server cluster. The data saturation is used to characterize the load size of the server cluster and is determined based on the historical operating status data of the server cluster. The target server is identified in the target server cluster, and the connection request is sent to the target server. At each data update moment, acquire the historical operating status data and historical data saturation of each server cluster at multiple data update moments; For each of the server clusters, the updated data saturation of the server cluster is determined based on historical running status data and historical data saturation at multiple data update times. The step of determining the updated data saturation of the server cluster based on historical operating status data and historical data saturation at multiple data update times includes: Normalize the historical data saturation and historical operating status data at each data update time to obtain the normalized historical data saturation and normalized historical operating status data at each data update time. Determine the difference between the normalized historical data saturation and the normalized historical operating status data at each data update time to obtain multiple difference data. Based on the minimum difference data, the maximum difference data among the multiple difference data, and the normalized historical running status data and normalized historical data saturation at each data update time, the correlation coefficient between the running status data and the data saturation is determined. Based on the correlation coefficient and the target normalized historical operating status data, the data saturation of the server cluster after the update is determined. 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.

2. The message scheduling method as described in claim 1, characterized in that, The operational status data includes operational status data across multiple indicator dimensions, and the correlation coefficient includes the correlation coefficient between the operational status data and data saturation for each indicator dimension. The step of determining the updated data saturation of the server cluster based on the correlation coefficient and the target normalized historical operating status data includes: The correlation coefficient associated with each indicator dimension is determined and multiplied by the target normalized historical operating status data to obtain the gray value of each indicator dimension, wherein the gray value is used to characterize the degree of influence of the indicator dimension on the saturation of the determined data volume; The data saturation level of the server cluster after the update is determined based on the grayscale values ​​of multiple indicator dimensions and the minimum grayscale value among the grayscale values ​​of the multiple indicator dimensions.

3. The message scheduling method as described in claim 1, characterized in that, The message scheduling device and the target server have the same Internet Protocol (IP) address. Sending the connection request to the target server includes: The destination physical MAC address in the connection request is modified to the MAC address of the target server, while the destination IP address and source IP address in the connection request are retained to obtain an updated connection request. 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 IoT device. The updated connection request is sent to the target server, wherein the target server responds to the updated connection request by returning a connection request response to the IoT device.

4. The message scheduling method as described in claim 1, characterized in that, Sending the connection request to the target server includes: Determine the number of IP addresses already occupied by each of the multiple network cards, and identify the network card with the smallest number of occupied IP addresses as the target network card; The destination MAC address in the connection request is modified to the MAC address of the target server, the destination IP address is modified to the IP address of the target server, and the source IP address in the connection request is modified 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 configured to respond to the updated connection request by returning a connection request response to the message scheduling device, so that the message scheduling device sends the connection request response to the IoT device.

5. The message scheduling method as described in claim 1, characterized in that, The connection request includes an identity identifier, and the step of determining the target server in the target server cluster includes: Determine the sum of the encoded values ​​corresponding to each character contained in the identity identifier, and determine the remainder of the ratio of the sum of the encoded values ​​to the number of servers in the target server cluster; Servers in the target server cluster whose server identifiers are the same as the remainder are identified as target servers.

6. 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 5.

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

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the message scheduling method according to any one of claims 1 to 5.

Citation Information

Patent Citations

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

    CN115297139A

  • Application cluster scheduling method, storage medium and electronic equipment

    CN118484302A