A device server adaptive expansion method and system, a terminal device and a medium
By acquiring data on the number of registered devices and server usage, capacity data is determined and expansion strategies are implemented, thus resolving the system performance instability caused by changes in the number of devices and achieving adaptive expansion and stable control of device servers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳开鸿数字产业发展有限公司
- Filing Date
- 2024-12-06
- Publication Date
- 2026-07-24
AI Technical Summary
Existing methods for controlling the number of registered devices cannot flexibly cope with changes in the number of devices, resulting in unstable system performance and insufficiently intelligent control rules that cannot be adjusted in a timely manner.
By obtaining data on the number of registered devices and server usage, capacity data is determined, and based on this, an expansion strategy is determined and expansion operations are performed to adapt to changes in the number of devices.
It enables adaptive expansion of the device server, improves the system's adaptability and performance, and maintains stable control over the number of registered devices.
Smart Images

Figure CN119743385B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of capacity expansion technology, and in particular to a method, system, terminal device, and medium for adaptive capacity expansion of a device server. Background Technology
[0002] In modern IoT and smart device applications, controlling the number of registered devices is a critical issue. Traditional methods for controlling the number of registered devices are typically based on fixed rules or strategies, which cannot automatically adapt to changes in the number of devices, leading to system instability when the number of devices fluctuates significantly.
[0003] Traditional methods of controlling the number of registrations may lead to the following problems:
[0004] 1. Too many or too few devices will affect the system's operating efficiency and stability, and will make it unable to flexibly cope with changes in the number of devices;
[0005] 2. The control rules for the number of registered devices are not intelligent or flexible enough, and cannot be adjusted in a timely manner according to the actual situation;
[0006] 3. When the system capacity is insufficient or there are too many device connection requests, it may lead to a decrease in system performance or service interruption.
[0007] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a method, system, terminal device and medium for adaptive expansion of a device server, which addresses the above-mentioned defects of the prior art and aims to solve the problem that the system capacity cannot automatically adapt to changes in the number of devices in the prior art.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0010] In a first aspect, the present invention provides a method for adaptive expansion of a device server, wherein the method includes:
[0011] Obtain the current number of registered devices and the usage data of the device server; based on the current number of registered devices and the usage data of the device server, determine the capacity data of the device server.
[0012] Based on the capacity data, a capacity expansion strategy is determined;
[0013] Based on the expansion strategy, the device server is expanded, and the number of currently registered devices in the device server is updated after the expansion operation is completed.
[0014] In one implementation, determining the capacity data of the device server based on the current number of registered devices and the usage data of the device server includes:
[0015] Based on the current number of registered devices, determine the number of devices registered per unit time.
[0016] Based on the usage data of the device server, determine the CPU utilization rate of the device server per unit time.
[0017] The capacity data of the device server is determined based on the number of device registrations per unit time and the CPU utilization rate of the device server per unit time.
[0018] In one implementation, determining the capacity data of the device server based on the number of device registrations per unit time and the CPU utilization rate of the device server per unit time includes:
[0019] The capacity data of the device server is obtained by dividing the CPU utilization of the device server per unit time by the number of devices registered per unit time.
[0020] In one implementation, determining the expansion strategy based on the capacity data includes:
[0021] Obtain the preset trigger threshold;
[0022] If the capacity data is greater than the trigger threshold, the expansion strategy is determined based on the current number of registered devices.
[0023] In one implementation, the trigger threshold is set in the following ways:
[0024] Obtain historical data from the device server, wherein the historical data includes device registration history data and historical usage data of the device server;
[0025] The trigger threshold is set based on the correspondence between the device registration history data and the device server's historical usage data.
[0026] In one implementation, the method further includes:
[0027] When the capacity data exceeds the trigger threshold, an early warning mechanism is triggered, and an emergency response plan is determined based on the early warning mechanism.
[0028] In one implementation, the method further includes:
[0029] Obtain the updated number of registered devices, and adjust the trigger threshold and the expansion strategy based on the updated number of registered devices.
[0030] Secondly, embodiments of the present invention also provide a device server adaptive expansion system, wherein the system includes:
[0031] The capacity data analysis module is used to obtain the current number of registered devices and the usage data of the device server, and to determine the capacity data of the device server based on the current number of registered devices and the usage data of the device server.
[0032] The capacity expansion strategy determination module is used to determine the capacity expansion strategy based on the capacity data.
[0033] The expansion operation execution module is used to perform an expansion operation on the device server based on the expansion strategy, and update the current number of registered devices in the device server after the expansion operation is completed.
[0034] Thirdly, embodiments of the present invention also provide a terminal device, wherein the terminal device includes a memory, a processor, and a device server adaptive expansion program stored in the memory and executable on the processor. When the processor executes the device server adaptive expansion program, it implements the steps of the device server adaptive expansion method of any of the above solutions.
[0035] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a device server adaptive expansion program, and when the device server adaptive expansion program is executed by a processor, it implements the steps of the device server adaptive expansion method described in any of the above schemes.
[0036] Beneficial Effects: This invention provides an adaptive capacity expansion method for device servers. Compared with existing technologies, this method first obtains the current number of registered devices and the usage data of the device server. Based on the current number of registered devices and the usage data of the device server, it determines the capacity data of the device server. Then, based on the capacity data, it determines an expansion strategy. Finally, it performs an expansion operation on the device server based on the expansion strategy, and updates the current number of registered devices in the device server after the expansion operation is completed. This invention can realize capacity analysis and automatic capacity expansion of device servers, which is beneficial to improving the adaptability and performance of the system and maintaining stable control of the number of registered devices. Attached Figure Description
[0037] Figure 1 A flowchart illustrating a specific implementation of the device server adaptive expansion method provided in this embodiment of the invention.
[0038] Figure 2This is a schematic diagram of the application scenario architecture of the device server adaptive expansion method provided in the embodiments of the present invention.
[0039] Figure 3 This is a schematic diagram illustrating an application scenario of the adaptive expansion device for the device server provided in an embodiment of the present invention.
[0040] Figure 4 This is a schematic diagram of the adaptive expansion device for the device server provided in this embodiment of the invention.
[0041] Figure 5 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0043] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content, operations, or steps, nor does it require execution in the described order. For example, some operations or steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0044] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0045] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. For example, the first control information and the second control information are only used to distinguish different control information and do not limit their order.
[0046] Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or the order of execution, and that the words "first" and "second" do not necessarily imply that they are different.
[0047] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0048] In existing technologies, methods for controlling the number of registered devices are typically based on fixed rules or strategies. Too many or too few devices can negatively impact system efficiency and stability, failing to flexibly adapt to changes in device numbers. Furthermore, the rules for controlling the number of registered devices are not intelligent or flexible enough to make timely adjustments based on actual conditions. When system capacity is insufficient or there are too many device connection requests, it may lead to system performance degradation or service interruptions.
[0049] To address the problems of existing technologies, this invention provides an adaptive expansion method for device servers, which can perform capacity analysis and automatic expansion of device servers, thereby improving system adaptability and performance and maintaining stable control over the number of registered devices.
[0050] For example, such as Figure 2 As shown, this paper describes an application scenario for the adaptive scaling method of the device server. This scenario includes smart devices, a device server, a monitoring server, and a scaling server. Specifically, smart devices connect to the device server through registration. The monitoring server monitors data such as the number of smart devices connected to the device server and the usage data of the device server. Based on an initial threshold set by the operations and maintenance personnel, it judges the current usage capacity of the device server. If the threshold is reached, a message is sent to the scaling server, which then performs the corresponding scaling operation on the device server. In this way, by setting up a monitoring server to monitor the device server and a scaling server to scale it, automatic scaling of the device server is achieved, solving the performance instability problem caused by large fluctuations in the number of devices.
[0051] Exemplary methods
[0052] This embodiment provides a device server adaptive expansion method, such as... Figure 1 As shown, the specific steps include the following:
[0053] Step S100: Obtain the current number of registered devices and the usage data of the device server. Based on the current number of registered devices and the usage data of the device server, determine the capacity data of the device server.
[0054] In this embodiment, the number of registered devices specifically refers to the number of IoT smart devices that connect to the device server for the first time and register. That is, device registration refers to the initial connection of a device to the device server and the registration of related information. Obtaining the current number of registered devices is specifically achieved by a monitoring system that tracks the current number of registered devices in real time and records it in the device server. The monitoring system can be a device management system that monitors currently connected smart devices and newly registered smart devices through relevant interfaces of the device server. Alternatively, the monitoring system can be a physical monitoring system including sensors, specifically using sensors such as video signals, infrared signals, and temperature signals to actually monitor smart devices within a defined area. The monitoring system can also be a separate monitoring server used to monitor relevant data from the device server. Furthermore, a device information table is set up in the database of the device server to store relevant information of registered devices, such as the device's unique identifier, registration time, and connection status. By querying and statistically analyzing this table, the number of currently connected devices can be obtained.
[0055] The usage data of the device server includes, but is not limited to, the device server's CPU utilization, memory utilization, network bandwidth utilization, number of network connections, storage hardware capacity utilization, and storage hardware input / output rate. Specifically, the above-mentioned device server usage data is obtained through the device server's own monitoring software or external auxiliary monitoring hardware. Similarly, the device server's usage data is also stored in the device server for subsequent expansion logic judgment.
[0056] In one implementation, determining the capacity data of the device server based on the current number of registered devices and the usage data of the device server specifically includes the following steps:
[0057] Step S110: Based on the current number of registered devices, determine the number of devices registered per unit time.
[0058] Step S120: Based on the usage data of the device server, determine the CPU utilization rate of the device server per unit time.
[0059] Step S130: Determine the capacity data of the device server based on the number of device registrations per unit time and the CPU utilization rate of the device server per unit time.
[0060] In this embodiment, the unit time, based on the actual processing capacity of the device server, can be categorized into milliseconds, seconds, minutes, hours, days, etc. Preferably, based on the frequency of device registration and connection in the application scenario, the unit time can be set to minutes, specifically 1 minute. Setting the unit time to minutes is commonly used in server resource monitoring and is well-suited for monitoring the CPU utilization and memory usage of the device server in this technical solution. Minute-level monitoring data collection can reflect the general trend of resource usage without causing excessive data redundancy and storage pressure due to overly frequent collection.
[0061] The capacity data is used to determine whether the device server still has the capacity to support the continued registration of devices. The capacity data can be a hardware or software indicator. Specifically, the capacity data can be the maximum number of network interface connections the device server can accommodate. For example, if a device server supports a maximum of 10 network interface connections, then when the device server has already connected 10 IoT smart devices, new devices will no longer be able to connect to the device server through registration. The capacity data can also be the maximum number of registered devices that the device server's CPU performance can handle. When the number of registered devices on the device server exceeds this value, the CPU performance has reached a bottleneck and cannot handle the data exchange requests from connected devices. In this case, even if the device server can continue to register devices, the device server's performance will experience a precipitous drop, and connected devices may even become unresponsive, leading to disconnection. Similarly, the capacity data can also be the maximum number of registered devices affected by other performance indicators mentioned above.
[0062] In one implementation, determining the capacity data of the device server based on the number of device registrations per unit time and the CPU utilization rate of the device server per unit time includes the following steps:
[0063] Step S131: Divide the CPU utilization rate of the device server per unit time by the number of devices registered per unit time to obtain the capacity data of the device server.
[0064] In this embodiment, the capacity data of the device server differs from the definition above. It refers to the stress level of the device server during new device registration, reflecting whether the capacity of the devices registered and connected to the device server has reached saturation. Specifically, within a unit of time, such as the minute-level unit time set above (i.e., one minute), the average CPU utilization is divided by the number of newly registered devices within that minute to obtain a percentage value. This percentage value represents the stress level of the device server, i.e., the current server stress state. For example, if the device server registers 8 devices within a specified minute, and the average CPU utilization is 80%, the device server stress level is 10%. This means that registering 8 devices only results in 80% CPU utilization, a low stress level, indicating that the device server's CPU is not yet saturated and its performance still has significant redundancy. Continuing to register more devices will not significantly impact the device server's performance. In another scenario, if the device server registers 2 devices within a specified minute, and the average CPU utilization is 70%, the device server stress level is 35%, a moderate stress level, indicating that the device server's CPU performance is also not saturated. There is still a possibility that within a specified minute, the device server registers only one new device, and the average CPU utilization is 90%. This indicates that the device server is under 90% stress. In other words, the registration of a single new device causes the CPU utilization of the device server to reach 90%, indicating a high level of stress. The CPU performance is about to reach its bottleneck, and the capacity of the devices registered and connected to the device server is likely already saturated.
[0065] Step S200: Determine the capacity expansion strategy based on the capacity data.
[0066] After obtaining one type of capacity data, it is necessary to determine the corresponding expansion strategy for that type of capacity data.
[0067] In one implementation, determining the expansion strategy based on the capacity data includes the following steps:
[0068] Step S210: Obtain the preset trigger threshold;
[0069] Step S220: If the capacity data is greater than the trigger threshold, then the expansion strategy is determined based on the current number of registered devices.
[0070] In this embodiment, the trigger threshold needs to be specifically set based on the specific definition of the capacity data. If the capacity data is defined as the maximum number of network interface connections that the device server can accommodate, then the threshold can be set as the maximum number of network interface connections after reserving spare network connection ports. If the capacity data is defined as the maximum number of registered devices that the device server's CPU performance can handle, then the threshold can be set as the maximum number of registered devices after reserving server performance redundancy. If the capacity data is defined as the server's stress level, then the threshold can be set as the server's tolerable stress level after reserving performance redundancy. By monitoring the device server, it is determined whether the capacity data has reached the trigger threshold. If the trigger threshold has been reached, then an expansion strategy needs to be determined based on the current number of registered devices on the device server and the device server's usage data. Specifically, the expansion strategy can be to add new device server network interfaces, increase CPU computing power, increase memory, etc., or it can be to add new device servers to form a group with the existing device servers, or to add new device servers and add them to the existing device server group.
[0071] In one implementation, the method for setting the trigger threshold includes the following steps:
[0072] Step S211: Obtain the historical data of the device server, wherein the historical data includes device registration history data and the historical usage data of the device server;
[0073] Step S212: Based on the correspondence between the device registration history data and the device server's historical usage data, set the trigger threshold.
[0074] In this embodiment, the device registration history data specifically refers to the registration data of all devices stored in the device information table of the device server, and the historical usage data of the device server specifically refers to the historical records of the device server's performance index information stored on the server. Based on the above correspondence, maintenance personnel can manually set the trigger threshold for capacity data according to practical experience.
[0075] Furthermore, based on the hardware foundation of the device server, it is known that, under normal circumstances, the number of registered devices is positively correlated with the CPU utilization rate of the device server. Here, the number of registered devices refers to historical data, i.e., the total number of registered devices. Therefore, a correlation model can be used to express the relationship between the number of registered devices and the CPU utilization rate of the device server. Preferably, mathematical models such as linear regression and multinomial regression can be used to fit the relationship between the number of registered devices and the CPU utilization rate. By substituting the aforementioned device information table and historical data of the device server's CPU utilization rate into the correlation model, the specific values of the model's parameters are calculated, resulting in the fitted correlation model. Based on this correlation model, we can obtain the other simulated indicator data by substituting either the number of registered devices or the device server's CPU utilization rate into the correlation model, which can then be used to obtain the device server's capacity data. Therefore, based on this model, a corresponding capacity data trigger threshold can be set for subsequent server expansion.
[0076] Furthermore, the positive correlation between the number of registered devices and the CPU utilization of the device server can be replaced by the correlation between the number of registered devices and other specific usage data of the device server, such as memory utilization, remaining memory space, and network bandwidth utilization. If usage data such as remaining memory space is used, then the number of registered devices and the remaining memory space will have a negative correlation.
[0077] In one implementation, the method further includes triggering an early warning mechanism when the capacity data exceeds the trigger threshold, and determining an emergency response plan based on the early warning mechanism.
[0078] In this embodiment, when the capacity data exceeds the trigger threshold, not only is it necessary to trigger the aforementioned expansion strategy to expand the device server, but also to set up an early warning mechanism. This early warning mechanism also needs to determine a corresponding emergency response plan. Specifically, the emergency response plan needs to handle situations that may arise during device server expansion. For example, compatibility issues may occur when adding new CPUs, memory, or other hardware devices. Even with the elastic mechanism of cloud services, problems such as uneven resource allocation and scheduling delays may occur during the elastic process. Therefore, in this embodiment, an early warning mechanism is set up. This early warning mechanism can be to immediately send an alarm to relevant personnel after reaching a set threshold. Alternatively, the early warning mechanism can be used to warn about the correctness of device expansion. Specifically, the device server and all registered devices before and after expansion are compared to determine whether the device server is operating normally and whether the registered devices are still connected and transmitting data correctly. If an anomaly is found, such as a registered device that was disconnected after expansion, the emergency response plan needs to be executed. This emergency response plan can be a manual solution, where maintenance personnel manually troubleshoot and repair the problem. Alternatively, an automatic processing solution can be adopted, which involves canceling the current expansion, restoring the hardware environment and software version before the expansion, and then performing the expansion and comparison again.
[0079] Step S300: Perform a capacity expansion operation on the device server based on the expansion strategy, and update the current number of registered devices in the device server after the expansion operation is completed.
[0080] In this embodiment, the expansion strategy includes, but is not limited to, adding new device server network interfaces, increasing CPU computing power, and increasing memory. It can also involve adding new device servers to form a group with existing device servers, or adding new device servers and adding them to an existing device server group. Based on the expansion strategy, an expansion operation is performed on the device servers. Specifically, the server expansion operation can be implemented by setting up automated tools or scripts. After the expansion operation, the device server has the hardware capability to continue registering new devices. At this time, the device information table of the device server needs to be updated. Specifically, because the expansion strategy may also include expanding the device server group and rebalancing for load balancing, after rebalancing, the IoT smart devices connected to each device server in the device server group can change. Therefore, the device information table in the device server needs to be updated according to the rebalanced connection information. Similarly, the number of registered devices corresponding to each device server also needs to be updated.
[0081] In one implementation, the method further includes obtaining the updated number of registered devices and adjusting the trigger threshold and the expansion strategy based on the updated number of registered devices.
[0082] In this embodiment, after the device server is expanded, the number of registered devices changes, and the usage data of the device server, such as CPU utilization, also changes. The device server capacity data decreases, and the trigger threshold and expansion strategy need to be adaptively adjusted according to the changed capacity data. Specifically, regarding the expansion strategy, if there was a single device server before expansion, and the expansion strategy was to set up a device server group or cluster, then the subsequent expansion strategy becomes adding servers to the device server group. If the original expansion strategy was to add CPU cores, but the number of CPU cores on a single device server after expansion has reached the hardware limit, then the subsequent expansion strategy becomes adding new device servers.
[0083] Regarding the trigger threshold, if the capacity data is defined as the maximum number of network interface connections the device server can accommodate or the maximum number of registered devices the device server's CPU can handle, then the maximum number of network interface connections it can accommodate or the maximum number of registered devices the CPU can handle needs to be recalculated based on the expanded device server hardware. If the capacity data is defined as the device server's stress level, then the absolute value of the threshold does not need to be adjusted. Because the device server's stress level threshold is a percentage, it can be set to a fixed percentage value. Preferably, this percentage value is 50%. Before and after the expansion, the calculation method for the device server's stress level value remains unchanged, and the threshold method also remains unchanged. Therefore, the device server's stress level value is the preferred method for determining the capacity data. In this method, the threshold trigger condition is equivalent to adaptively responding to the expansion operation.
[0084] When this technical solution is implemented, such as Figure 3 As shown, the application scenario of this method includes devices such as device servers, IoT smart devices, detection servers, and expansion servers. The specific process includes: maintenance personnel setting relevant thresholds for device registration on the monitoring server; the monitoring server monitoring device registration on the device server in real time and determining whether the thresholds have been reached; at this time, a large number of IoT smart devices simultaneously request registration on the device server; the device server registers these devices and synchronizes the relevant registration data to the monitoring server; the monitoring server calculates the relevant thresholds, determines and triggers the threshold, and then synchronizes the trigger expansion message to the expansion server; the expansion server expands the hardware or software resources required by the device server and updates the relevant device information table and records on the device server after expansion.
[0085] In summary, the technical solution of the above embodiments realizes an adaptive device registration quantity control method, which can dynamically adjust the registration strategy according to the actual changes in the number of devices, improve the adaptability and performance of the system, and maintain stable control of the number of registered devices.
[0086] Exemplary device
[0087] like Figure 4 As shown in the figure, an embodiment of the present invention provides a device server adaptive expansion system, which includes: a capacity data analysis module 10, an expansion strategy determination module 20, and an expansion operation execution module 30.
[0088] Specifically, the capacity data analysis module 10 is used to obtain the current number of registered devices and the usage data of the device server, and determine the capacity data of the device server based on the current number of registered devices and the usage data of the device server; the expansion strategy determination module 20 is used to determine the expansion strategy based on the capacity data; the expansion operation execution module 30 is used to perform an expansion operation on the device server based on the expansion strategy, and update the current number of registered devices in the device server after the expansion operation is completed.
[0089] In one implementation, the capacity data analysis module 10 includes:
[0090] The device registration quantity determination unit is used to determine the number of devices registered per unit time based on the current number of devices registered.
[0091] The CPU utilization determination unit is used to determine the CPU utilization of the device server per unit time based on the usage data of the device server.
[0092] A capacity data determination unit is used to determine the capacity data of the device server based on the number of devices registered per unit time and the CPU utilization rate of the device server per unit time.
[0093] The capacity data determination unit includes:
[0094] The capacity data determination subunit is used to divide the CPU utilization of the device server per unit time by the number of devices registered per unit time to obtain the capacity data of the device server.
[0095] In one implementation, the expansion strategy determination module 20 includes:
[0096] The threshold acquisition unit is used to acquire the preset trigger threshold.
[0097] The capacity expansion strategy determination unit is used to determine the capacity expansion strategy based on the current number of registered devices if the capacity data is greater than the trigger threshold.
[0098] A historical data acquisition unit is used to acquire historical data of the device server, wherein the historical data includes device registration history data and historical usage data of the device server;
[0099] A threshold setting unit is used to set the trigger threshold based on the correspondence between the device registration history data and the device server's historical usage data;
[0100] An early warning mechanism unit is used to trigger an early warning mechanism when the capacity data exceeds the trigger threshold, and to determine an emergency response plan based on the early warning mechanism.
[0101] The threshold and expansion strategy update unit is used to obtain the updated number of registered devices and adjust the trigger threshold and the expansion strategy based on the updated number of registered devices.
[0102] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 5 As shown, the smart terminal includes a processor, memory, network interface, display screen, and temperature sensor connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a display quality optimization method. The display screen can be an LCD screen or an e-ink screen. The temperature sensor is pre-installed inside the smart terminal to detect the operating temperature of internal devices.
[0103] Those skilled in the art will understand that Figure 5 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0104] In one embodiment, a smart terminal is provided, including a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0105] Obtain the current number of registered devices and the usage data of the device server; based on the current number of registered devices and the usage data of the device server, determine the capacity data of the device server.
[0106] Based on the capacity data, a capacity expansion strategy is determined;
[0107] Based on the expansion strategy, the device server is expanded, and the number of currently registered devices in the device server is updated after the expansion operation is completed.
[0108] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAM bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0109] In summary, this invention discloses a method, system, terminal device, and medium for adaptive expansion of a device server. The method includes: acquiring the current number of registered devices and usage data of the device server; determining the capacity data of the device server based on the current number of registered devices and the usage data of the device server; determining an expansion strategy based on the capacity data; performing an expansion operation on the device server based on the expansion strategy; and updating the current number of registered devices in the device server after the expansion operation is completed. This invention can realize capacity analysis and automatic expansion of the device server, which is beneficial to improving the adaptability and performance of the system and maintaining stable control of the number of registered devices.
[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0111] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for adaptive expansion of a device server, characterized in that, The method includes: Obtain the current number of registered devices and the usage data of the device server; based on the current number of registered devices and the usage data of the device server, determine the capacity data of the device server. Based on the capacity data, a capacity expansion strategy is determined; Based on the expansion strategy, an expansion operation is performed on the device server, and the current number of registered devices in the device server is updated after the expansion operation is completed; The process of determining the capacity data of the device server based on the current number of registered devices and the usage data of the device server includes: Based on the current number of registered devices, determine the number of devices registered per unit time. Based on the usage data of the device server, determine the CPU utilization rate of the device server per unit time. Based on the number of devices registered per unit time and the CPU utilization rate of the device server per unit time, the capacity data of the device server is determined. The process of determining the expansion strategy based on the capacity data includes: Obtain the preset trigger threshold; If the capacity data is greater than the trigger threshold, then the expansion strategy is determined based on the current number of registered devices; The expansion strategy can be to add new device server network interfaces, increase CPU computing power, increase memory, or add new device servers to form a group with the existing device servers, or add new device servers and add them to the existing device server group.
2. The adaptive expansion method for device servers according to claim 1, characterized in that, The process of determining the capacity data of the device server based on the number of device registrations per unit time and the CPU utilization rate of the device server per unit time includes: The capacity data of the device server is obtained by dividing the CPU utilization of the device server per unit time by the number of devices registered per unit time.
3. The adaptive expansion method for device servers according to claim 1, characterized in that, The trigger threshold can be set in the following ways: Obtain historical data from the device server, wherein the historical data includes device registration history data and historical usage data of the device server; The trigger threshold is set based on the correspondence between the device registration history data and the device server's historical usage data.
4. The adaptive expansion method for device servers according to claim 1, characterized in that, The method further includes: When the capacity data exceeds the trigger threshold, an early warning mechanism is triggered, and an emergency response plan is determined based on the early warning mechanism.
5. The adaptive expansion method for a device server according to claim 3, characterized in that, The method further includes: Obtain the updated number of registered devices, and adjust the trigger threshold and the expansion strategy based on the updated number of registered devices.
6. A device server adaptive expansion system, characterized in that, The system is used to implement the steps of the device server adaptive expansion method according to any one of claims 1-5, and the system includes: The capacity data analysis module is used to obtain the current number of registered devices and the usage data of the device server, and to determine the capacity data of the device server based on the current number of registered devices and the usage data of the device server. The capacity expansion strategy determination module is used to determine the capacity expansion strategy based on the capacity data. The expansion operation execution module is used to perform an expansion operation on the device server based on the expansion strategy, and update the current number of registered devices in the device server after the expansion operation is completed.
7. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a device server adaptive expansion program stored in the memory and executable on the processor. When the processor executes the device server adaptive expansion program, it implements the steps of the device server adaptive expansion method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a device server adaptive expansion program, which, when executed by a processor, implements the steps of the device server adaptive expansion method as described in any one of claims 1-5.