A dynamic balancing method and system for server load of self-service car washing machine

By dynamically adjusting the server load balancing strategy of the self-service car wash machine, identifying and splitting operation instructions, and combining weighted polling and heartbeat detection, the problem of server load imbalance is solved and the user experience and system stability are improved.

CN118400376BActive Publication Date: 2024-09-06GUANGDONG CHEHAIYANG ENVIRONMENTAL PROTECTION SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410836609.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-06
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

When faced with a large number of concurrent requests, the traditional self-service car wash server load balancing method leads to server load imbalance, resulting in response delays, slow processing and even service timeouts, affecting user experience.

Method used

Obtain the current and historical load information of the server cluster at intervals, use pre-trained prediction models for trend analysis, dynamically adjust the load balancing strategy, identify the type of operation instructions and split them into sub-instructions, and allocate processing tasks based on weighted polling and asynchronous communication mechanisms. , introducing heartbeat detection and failure recovery mechanisms.

Benefits of technology

It improves the rationality of load distribution of the self-service car wash machine server, reduces response delays and service timeouts, improves user experience, and ensures system stability and efficiency through dynamic adjustment and fault recovery mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400376B
    Figure CN118400376B
Patent Text Reader

Abstract

The present application relates to a method and system for dynamically balancing the load of a self-service car wash server, including the steps of: obtaining the load information of the self-service car wash server cluster at intervals and inputting it into a prediction model; dynamically adjusting the load balancing strategy; when receiving an operation instruction of a car wash terminal associated with a server whose load exceeds a first threshold, identifying its instruction type cluster; splitting the operation instruction into a number of operation sub-instructions, and sending the split operation sub-instructions to the corresponding server. The present application predicts the future load of the server cluster with a pre-trained prediction model, dynamically adjusts the load balancing strategy, and when receiving an operation instruction of a self-service car wash terminal associated with a server whose load exceeds a first threshold, splits it into a number of operation sub-instructions and sends them to the corresponding server for processing, which improves the rationality of the load distribution of the self-service car wash server, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of self-service car wash machines, and in particular to a method and system for dynamically balancing the server load of a self-service car wash machine. Background Art

[0002] At present, self-service car wash machines have been found in major gas stations, service areas, parking lots, towns, villages, communities and other places, which means that self-service car wash machines have been widely used in the domestic market.

[0003] In the operation of self-service car wash machines, as the demand for personalized configuration of car wash services increases, the server needs to adapt and manage the personalized options of different users. The diverse management tasks undoubtedly increase the workload of the server. Users can choose different car wash programs, detergent types, and additional services after the car wash according to their preferences. The changing personalized configuration and increasingly complex car wash operation instructions require a limited number of servers to process and reasonably distribute the processing requests of self-service car wash machines in real time to ensure that each car wash task can be executed smoothly.

[0004] However, traditional load balancing methods may simply select servers in order or randomly, which is inadequate when faced with a large number of concurrent requests. Especially during periods of concentrated user use, the peak of requests may cause some servers to receive too many requests, exceeding their processing capacity, while other servers are relatively idle. This unbalanced load distribution causes high-load servers to experience response delays, slow processing, and even service timeouts, leading to user login timeouts, slow responses, and other problems, seriously affecting user experience. Summary of the invention

[0005] In order to improve the rationality of self-service car wash server load distribution, reduce response delays, slow processing and even service timeouts caused by high server load, and improve user experience, the present application provides a dynamic balancing method and system for self-service car wash server load.

[0006] The above-mentioned invention objective of the present application is achieved through the following technical solutions:

[0007] A method for dynamically balancing the server load of a self-service car washing machine comprises the following steps:

[0008] Get the current load information and historical load information of the self-service car wash machine server cluster at intervals;

[0009] The current load information and historical load information obtained are input into the prediction model, and the prediction model outputs load prediction information after trend analysis;

[0010] Dynamically adjust the load balancing strategy based on load prediction information;

[0011] When receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold, identifying an instruction type cluster of the operation instruction, wherein the instruction type cluster includes a computing intensive type, an I / O intensive type, and a mixed type;

[0012] Based on the identified instruction type cluster and the preset instruction splitting strategy, split the operation instruction into a plurality of operation sub-instructions;

[0013] Based on the current load balancing strategy, the split operation sub-instructions are sent to the corresponding servers.

[0014] By adopting the above technical solution, the current load information is collected from the self-service car wash machine server cluster at intervals, and the historical load information is collected and stored at the same time, and the current load information and the historical load information are input into the pre-trained prediction model, so that the prediction model performs trend analysis and outputs load prediction information predicting the load situation in a future period of time, and the load balancing strategy of the server cluster is dynamically adjusted based on the load prediction information; when a car wash user operates any self-service car wash machine associated with a server whose load exceeds a first threshold to issue an operation instruction, the instruction type cluster of the operation instruction is identified, and based on a pre-set instruction splitting strategy, it is split into several operation sub-instructions and sent to the corresponding server for processing; the present application predicts the future load situation of the server cluster by using a pre-trained prediction model, and dynamically adjusts the load balancing strategy based on the prediction result. When a user washes a car, based on the current load balancing strategy, when an operation instruction is received from any self-service car wash machine associated with a server whose load situation exceeds a pre-set first threshold, the operation instruction is split into several operation sub-instructions and sent to the corresponding server for processing, which has the effect of improving the rationality of the load distribution of the self-service car wash machine server, thereby improving the user experience.

[0015] In a preferred example, the present application may be further configured as follows: the step of dynamically adjusting the load balancing strategy based on the load prediction information comprises the following steps:

[0016] Perform abnormal state feature analysis on the load forecast information, and if an abnormal state feature vector exists, identify server information associated with the abnormal state feature vector;

[0017] Based on the identified server information and its historical load information, the regularity characteristics of the abnormal state feature vector are analyzed;

[0018] Dynamically adjust the load balancing strategy based on the results of regular characteristic analysis.

[0019] By adopting the above-mentioned technical scheme, the abnormal state characteristics of the load prediction information are analyzed to identify whether there is an abnormal state characteristic vector that is significantly different from the normal mode. If there is an abnormal state characteristic vector, its associated server information is identified, and the abnormal state characteristic vector is analyzed for regularity to analyze whether it has a certain occurrence pattern, and the load balancing strategy is dynamically adjusted based on the regularity analysis results. The present application improves the accuracy and rationality of the dynamic adjustment of the load balancing strategy by identifying the abnormal state characteristic vectors in the load prediction information and their occurrence patterns.

[0020] In a preferred example, the present application may be further configured as follows: the step of performing abnormal state feature analysis on the load prediction information, and if an abnormal state feature vector exists, identifying server information associated with the abnormal state feature vector, comprises the following steps:

[0021] When any parameter in the load prediction information exceeds its corresponding dynamic threshold, the parameter is marked as an abnormal state feature vector.

[0022] By adopting the above technical solution, the load prediction information is analyzed for abnormal state characteristics. When any parameter in the load prediction information exceeds the corresponding dynamic threshold, the parameter is marked as an abnormal state characteristic vector. The dynamic threshold is a threshold that changes in a specific time period and is preset based on various parameters and environmental influences. By setting the dynamic threshold, the accuracy of abnormal state characteristic vector identification is improved.

[0023] In a preferred example, the present application can be further configured as follows: the step of dynamically adjusting the load balancing strategy based on the regular characteristic analysis result includes the following steps:

[0024] Based on the identified server information and its historical load information, the occurrence time and frequency of the abnormal state feature vector are analyzed to determine its regular characteristics;

[0025] Based on the judgment result of the regular characteristics, the corresponding regular information is analyzed in combination with the operation instruction information;

[0026] Adjust the load balancing strategy based on the obtained regular information.

[0027] By adopting the above-mentioned technical scheme, based on the identified server information and the historical load information of the server, the occurrence time and frequency of the abnormal state feature vector are analyzed to determine its regular characteristics, and the corresponding regular information is analyzed based on the judgment result of the regular characteristics in combination with the operation instruction information, so as to adjust the load balancing strategy based on the regular information; the present application judges the regularity of the server abnormality, and analyzes the corresponding regular information based on the judgment result, and adjusts the load balancing strategy based on the obtained regular information to deal with regular abnormal load conditions.

[0028] In a preferred example, the present application may be further configured as follows: the step of splitting the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy comprises the steps of:

[0029] If the instruction type cluster of the operation instruction is computationally intensive, based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instruction is split into several independent operation sub-instructions;

[0030] If the instruction type cluster of the operation instruction is a mixed type, then the computation-intensive part and the I / O-intensive part thereof are identified;

[0031] Based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instructions are split into several independent operation sub-instructions;

[0032] Split some I / O-intensive operation instructions into several device interaction-related operation sub-instructions and several data transmission-related operation sub-instructions;

[0033] If the instruction type cluster of the operation instruction is I / O intensive, based on a preset splitting and merging strategy, the I / O intensive operation instruction is split into a number of independent operation sub-instructions.

[0034] By adopting the above technical solution, if the instruction type cluster of the operation instruction is computationally intensive, then based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instruction is split into several operation sub-instructions with appropriate scoring, that is, considering the current load situation of each server, after distributing several operation sub-instructions to each server, it will still not cause excessive burden on the load situation of each server. If the instruction type cluster of the operation instruction is mixed, then its computationally intensive part and I / O intensive part are identified, and the two parts are distinguished. Similarly, based on the current load balancing strategy and the preset scoring strategy, the computationally intensive part of the operation instruction is split into several independent operation sub-instructions. Sub-instructions, split some I / O intensive operation instructions into several operation sub-instructions related to device interaction and several operation sub-instructions related to data transmission, distinguish the instructions related to device interaction and the instructions related to data transmission and then split them, so that the two parts can be processed in parallel, thereby improving the overall processing speed. If the instruction type cluster of the operation instruction is I / O intensive, it will be split into several independent operation sub-instructions based on the preset splitting and merging strategy; different instructions are split based on different splitting methods to ease the load of the server during processing. At the same time, when parallel sub-instructions are distributed to different servers for processing, the processing speed can be improved.

[0035] In a preferred example, the present application may be further configured as follows: if the instruction type cluster of the operation instruction is I / O intensive, based on a preset splitting and merging strategy, the step of splitting the I / O intensive operation instruction into a plurality of independent operation sub-instructions comprises the steps of:

[0036] Split the I / O intensive operation instruction into several device interaction related operation sub-instructions and several data transmission related operation sub-instructions;

[0037] Based on the current load optimization strategy, the device interactively related operation sub-instructions are split or merged into several highly related operation sub-instructions.

[0038] By adopting the above technical solution, I / O-intensive operation instructions are split into several operation sub-instructions associated with device interaction and operation sub-instructions associated with data transmission, and the operation sub-instructions associated with device interaction are split into several independent operation sub-instructions. Then, based on the current load balancing strategy, the split operation sub-instructions of the same device or associated devices are merged into one or several operation sub-instructions, thereby effectively processing I / O-intensive operation instructions and improving the overall performance and stability of the system.

[0039] In a preferred example, the present application can be further configured as follows: the step of sending the split operation sub-instructions to the corresponding server based on the current load balancing strategy includes the following steps:

[0040] Determine a plurality of servers receiving a plurality of mutually independent computationally intensive operation sub-instructions based on a weighted round-robin strategy;

[0041] Determine, based on a preset priority rule, a server for a plurality of operation sub-instructions associated with the receiving device interaction and an operation sub-instruction associated with the data transmission;

[0042] The split operation sub-instructions are sent to the corresponding server through the asynchronous communication mechanism.

[0043] By adopting the above technical scheme, based on the weighted polling strategy, multiple servers that receive operation sub-instructions split from the computing-intensive operation instructions are determined. The weighted polling strategy allows each server node to be assigned a weight. The weight is usually set according to factors such as the server's processing power, hardware configuration, and current load, so that the server processing performance can be fully utilized and resource utilization can be improved; at the same time, based on the preset priority rules, multiple servers that receive operation sub-instructions associated with device interactions and multiple servers that receive operation sub-instructions associated with data transmission are determined, and the operation sub-instructions associated with device interactions and the operation sub-instructions associated with data transmission are sent to different multiple servers for processing as much as possible. Since the two types of instructions are parallel, the processing efficiency can be improved; the split operation sub-instructions are sent to the corresponding servers through an asynchronous communication mechanism. The asynchronous communication mechanism allows the sender and the receiver to work in parallel, thereby improving the system's throughput and response speed, thereby improving the overall performance of the system.

[0044] In a preferred example, the present application can be further configured as follows:

[0045] The heartbeat detection mechanism is deployed on the data processing node, and the heartbeat signal responded by the data processing node is received at a preset frequency to monitor the health status of the data processing node;

[0046] If the data processing node responds abnormally, the fault detection mechanism and traffic redirection mechanism are triggered based on the type of abnormality;

[0047] Execute the corresponding fault recovery process based on the fault detection mechanism results.

[0048] By adopting the above technical solution, a heartbeat detection mechanism is deployed on the data processing node, so that heartbeat signals are received at a preset frequency, and the health status of the data processing node is monitored. When the response is abnormal, the fault detection mechanism and the traffic redirection mechanism are triggered based on the abnormality type. The fault detection mechanism is used to detect the cause of the abnormal response of the data processing node, that is, the server failure cause. The traffic redirection mechanism is used to transfer the data of the faulty node to the corresponding backup node, and execute the corresponding fault recovery process based on the result of the fault detection, so as to repair the node failure. The present application monitors the server data processing node by introducing a heartbeat detection mechanism, detects it, redirects traffic and repairs the fault when a fault occurs, so as to ensure business process and data integrity when a server data processing node fails.

[0049] In a preferred example, the present application can be further configured as follows:

[0050] When the load of any server exceeds the second threshold, the received operation instruction associated with the server is sent to the corresponding server based on the hash consistency algorithm.

[0051] By adopting the above technical solution, when the load of any server exceeds the preset second threshold, the overload handling mechanism is triggered, and based on the current load balancing strategy, the received operation instructions belonging to the instruction type cluster associated with the server are sent to other corresponding appropriate servers for processing, thereby preventing the server from being overloaded and affecting the user experience.

[0052] The second object of the invention is achieved by the following technical solutions:

[0053] A dynamic balancing system for the server load of a self-service car washing machine, comprising:

[0054] An information acquisition module is used to obtain the current load information and historical load information of the self-service car wash machine server cluster at intervals;

[0055] The load prediction module is used to output load prediction information after trend analysis of the input current load information and historical load information;

[0056] A load balancing adjustment module is used to dynamically adjust the load balancing strategy based on load prediction information;

[0057] An instruction type identification module, configured to identify an instruction type cluster of an operation instruction when receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold;

[0058] An instruction splitting module is used to split the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy;

[0059] The instruction sending module is used to send the split operation sub-instructions to the corresponding server based on the current load balancing strategy.

[0060] By adopting the above technical solution, the information acquisition module is used to obtain the current load information and historical load information of the self-service car wash server cluster at intervals; the load prediction module is used to output the load prediction information after trend analysis on the input current load information and historical load information; the balancing adjustment module is used to dynamically adjust the load balancing strategy based on the load prediction information; the instruction type identification module is used to identify the instruction type cluster of the operation instruction when receiving an operation instruction issued by a car wash terminal associated with a server whose load exceeds a first threshold; the instruction splitting module is used to split the operation instruction into several operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy; the instruction sending module is used to send the split operation sub-instructions to the corresponding server based on the current load balancing strategy.

[0061] In summary, the present application includes at least one of the following beneficial technical effects:

[0062] 1. This application predicts the future load of the server cluster by using a pre-trained prediction model, and dynamically adjusts the load balancing strategy based on the prediction results. When a user washes his car, based on the current load balancing strategy, when an operation instruction of a self-service car washing machine corresponding to a server with a load exceeding a preset first threshold is received, the operation instruction is split into several operation sub-instructions and sent to the corresponding server for processing, thereby improving the rationality of the load distribution of the self-service car washing machine server, thereby improving the user experience;

[0063] 2. This application improves the accuracy and rationality of dynamic adjustment of load balancing strategy by identifying abnormal state feature vectors and their occurrence rules in load forecast information;

[0064] 3. This application determines the regularity of server abnormalities, analyzes the corresponding regular information based on the determination results, and adjusts the load balancing strategy based on the obtained regular information to cope with the abnormal load conditions with regularity;

[0065] 4. Different instructions are split based on different splitting methods to ease the load of the server during processing. At the same time, when parallel sub-instructions are assigned to different servers for processing, the processing speed can be improved;

[0066] 5. By introducing a heartbeat detection mechanism, the server data processing nodes are monitored, and when a failure occurs, they are detected, traffic is redirected, and faults are repaired, thereby ensuring business process and data integrity when a server data processing node fails. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 This is a flow chart of an embodiment of a method for dynamically balancing the server load of a self-service car wash machine of the present application;

[0068] Figure 2 This is a flowchart for implementing step S30 in an embodiment of a method for dynamically balancing the server load of a self-service car wash machine of the present application;

[0069] Figure 3 This is a flowchart for implementing step S303 in an embodiment of a method for dynamically balancing the server load of a self-service car wash machine of the present application;

[0070] Figure 4 This is a flowchart for implementing step S50 in an embodiment of a method for dynamically balancing the server load of a self-service car wash machine of the present application;

[0071] Figure 5This is a flowchart of implementing step S60 in an embodiment of a method for dynamically balancing the server load of a self-service car wash machine of the present application;

[0072] Figure 6 This is another implementation flow chart of an embodiment of a method for dynamically balancing the server load of a self-service car wash machine in the present application. DETAILED DESCRIPTION

[0073] The following is combined with Figure 1-6 This application is described in further detail.

[0074] In one embodiment, if Figure 1 As shown, the present application discloses a method for dynamically balancing the server load of a self-service car wash machine, which specifically includes the following steps:

[0075] S10: obtaining the current load information and historical load information of the self-service car wash machine server cluster at intervals;

[0076] In this embodiment, the self-service car wash machine server cluster is a system in which several servers collaborate to provide services for self-service car wash machines. The current load information is the load data information of all servers in the self-service car wash machine server cluster at the current point in time, which is preset to include real-time CPU usage, memory usage, disk I / O and network traffic data, etc. The historical load information is the load data information of all servers in the self-service car wash machine server cluster within a historical preset time, which is preset to include historical CPU usage, memory usage, disk I / O and network traffic data, etc.

[0077] Specifically, at each preset interval time point, the load information of all servers in the self-service car wash server cluster at the current time point and the load information of all servers in the self-service car wash server cluster within the historical preset time are obtained to ensure that the collected data information can reflect the load status of all servers in the server cluster in different time periods.

[0078] S20: input the acquired current load information and historical load information into the prediction model, and the prediction model outputs load prediction information after performing trend analysis;

[0079] In this embodiment, the prediction model is a pre-trained analysis and calculation model for predicting the load information of the self-service car wash machine server cluster within a preset time in the future. The trend analysis is based on historical load information and current load information, using a machine learning algorithm to predict the load status of all servers in the server cluster within a certain time range in the future. The load prediction information is data information output after the prediction model performs trend analysis, including the load status of all servers in the server cluster within a certain time range in the future.

[0080] Specifically, the load information of all servers in the self-service car wash server cluster at the current time point and the load information of all servers in the self-service car wash server cluster within a historical preset time are input into the prediction model, so that the prediction model predicts the load status of all servers in the server cluster within a future preset time and outputs load prediction information including the predicted status.

[0081] S30: dynamically adjust the load balancing strategy based on the load prediction information;

[0082] In this embodiment, the load balancing strategy is a resource allocation strategy that enables the loads of all servers in the server cluster to be evenly distributed.

[0083] Specifically, based on the data results in the load prediction information, the load instructions required to be received by all servers in the self-service car wash machine server cluster are pre-allocated, so that the load conditions of all servers in the server cluster can be balanced and reasonably distributed;

[0084] Furthermore, when adjusting the load balancing strategy, in addition to the load prediction information, it is also based on the performance indicators of each server in the server cluster, including processor speed, memory capacity, network bandwidth, etc., to ensure that the load balancing strategy can allocate resources more reasonably;

[0085] Furthermore, when allocating resources based on the load balancing strategy, the physical distance between each server and the request source is determined by obtaining the geographic location information of each server in the server cluster. The request source is the self-service car wash machine that issues the operation instruction, and the results of the physical distance are analyzed. Servers that are closer to the request source and meet the load balancing strategy goals are preferentially selected for load adjustment.

[0086] S40: When receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold, identifying an instruction type cluster of the operation instruction, wherein the instruction type cluster includes a computing intensive type, an I / O intensive type, and a mixed type;

[0087] In this embodiment, the first threshold is a preset load condition value, which is specifically set based on the performance of the server cluster. The first threshold can be set so that when the load exceeds the first threshold, the performance of the server begins to decline. The car washing machine terminal is a self-service car washing machine operated by a user. The operation instruction is the operation instruction information issued by the self-service car washing machine in the car washing process. The instruction type cluster is a method of classifying or grouping instructions based on different characteristics or attributes of the instructions. Computational intensive, that is, CPU intensive, refers to instruction types that rely on the CPU for calculation. In the self-service car washing machine, it includes image processing, logical control of the car washing program, timing counting of the car washing program, and billing logic of the car washing fee. I / O intensive refers to instruction types that mainly involve input / output (I / O) during execution. In the self-service car washing machine, it includes opening and closing of equipment such as water guns, foam guns, and vacuum cleaners, sensor detection, and payment of car washing fees. Hybrid refers to instruction types that include both computational intensive and I / O intensive characteristics. In the self-service car washing machine, it includes execution of the car washing program, user interface interaction, sensor data processing, etc.

[0088] Specifically, when an operation instruction is received from a self-service car washing machine terminal associated with a server whose load exceeds a first threshold, the instruction type of the operation instruction is identified to facilitate subsequent splitting strategy selection.

[0089] S50: splitting the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and a preset instruction splitting strategy;

[0090] In this embodiment, the instruction splitting strategy is different splitting rules set for computationally intensive operation instructions, I / O intensive operation instructions and mixed operation instructions respectively, and the operation sub-instructions are sub-instructions obtained by splitting the operation instructions into single decomposable steps.

[0091] Specifically, based on a targeted preset instruction splitting strategy, the operation instruction is split into operation sub-instructions according to single divisible steps.

[0092] S60: Based on the current load balancing strategy, the split operation sub-instructions are sent to the corresponding servers.

[0093] In this embodiment, the corresponding server is the best processing server allocated based on the current load balancing strategy.

[0094] Specifically, based on the current load balancing strategy, the split operation sub-instructions are sent to the best processing server that is suitable for processing the sub-instructions.

[0095] In one embodiment, if Figure 2 As shown, step S30 includes the steps of:

[0096] S301: Analyze the abnormal state characteristics of the load prediction information, and if there is an abnormal state characteristic vector, identify the server information associated with the abnormal state characteristic vector;

[0097] S302: Based on the identified server information and its historical load information, perform regularity analysis on the abnormal state feature vector;

[0098] S303: Dynamically adjust the load balancing strategy based on the regular characteristic analysis results.

[0099] In this embodiment, the abnormal state feature analysis is to analyze whether each server in the load prediction information will have an abnormal state and the abnormal state features of the servers in the abnormal state. The abnormal state feature vector is the abnormal data feature that deviates from the normal pattern. The regularity analysis is to analyze the occurrence time and number of occurrences of the abnormal state feature vector to identify whether it has regularity.

[0100] Specifically, analyze whether each server in the load prediction information will have an abnormal state, and analyze the abnormal state characteristics when the server is in an abnormal state, and obtain the server information associated with the abnormal state feature vector, and analyze the appearance time and number of appearances of the abnormal state feature vector based on the identified server information and the historical load information of the server to determine whether the identifier has a certain regularity, and dynamically adjust the load balancing strategy based on the analysis results of the regularity.

[0101] In one embodiment, step S301 includes the following steps:

[0102] S3011 When any parameter in the load prediction information exceeds its corresponding dynamic threshold, the parameter is marked as an abnormal state feature vector.

[0103] In this embodiment, the dynamic threshold is a preset parameter threshold that can be autonomously adjusted to another preset value based on time period, season, environmental parameters, etc.

[0104] Taking season as an example, historical load information is analyzed to analyze the usage of server load by each operation instruction in each season, and dynamic thresholds for different seasons are designed based on the analysis results.

[0105] Specifically, when any parameter in the load prediction information exceeds a current dynamic threshold corresponding to the parameter, the parameter is marked as an abnormal state feature vector.

[0106] In one embodiment, if Figure 3 As shown, step S303 includes the steps of:

[0107] S3031: Based on the identified server information and its historical load information, analyze the occurrence time and frequency of the abnormal state feature vector to determine its regular characteristics;

[0108] S3032: Analyze the corresponding regular information based on the judgment result of the regular characteristics and the operation instruction information;

[0109] S3033: Adjust the load balancing strategy based on the obtained regular information.

[0110] In this embodiment, the regular characteristics are the regular characteristics obtained by summarizing the occurrence time and number of abnormal state feature vectors; the operation instruction information is the record information including the duration, frequency and usage rate of each operation instruction; the regular information is the judgment result based on the regular characteristics, and combined with the operation instruction information, the data information related to the regular characteristics is obtained from the server information and the historical load information of the server.

[0111] Furthermore, the regular characteristics include sporadicity and periodicity. When the regular characteristic is sporadic, the corresponding regular information is abnormal report information, error log, etc., to determine whether it is caused by external factors or temporary failures, so as to adjust the load balancing strategy; when the regular characteristic is periodic, the regular information is system information, configuration information and abnormal time information, etc., to deeply analyze its regularity, so as to adjust the load balancing strategy based on the periodic law.

[0112] Furthermore, the regularity information is analyzed by combining the regularity characteristic results with the operation instruction information, specifically:

[0113] When the regularity characteristic is sporadic, the corresponding regularity information is the abnormality report information and the error log. The abnormality report information and the error log are analyzed in combination with the operation instruction information to determine the association between the abnormal error and the operation instruction.

[0114] When the regular characteristic is periodic, the regular information is system information, configuration information and abnormal time information. The abnormal time information is analyzed in combination with the operation instruction information to determine the association between the abnormal time regularity and the operation instruction.

[0115] Specifically, based on the identified server information and the historical load information of the server, the occurrence time and frequency of the abnormal state feature vector are analyzed to determine whether its regular characteristics are sporadic or periodic. Based on the judgment result and in combination with the duration, frequency and usage rate of the operation instructions, the corresponding regular information is analyzed to deeply analyze its regularity and adjust the load balancing strategy based on the regular information.

[0116] In one embodiment, if Figure 4As shown, step S50 includes the steps of:

[0117] S51: If the instruction type cluster of the operation instruction is computationally intensive, based on the current load balancing strategy and the preset scoring strategy, split the computationally intensive operation instruction into a plurality of independent operation sub-instructions;

[0118] S52: If the instruction type cluster of the operation instruction is a mixed type, identifying a computationally intensive part and an I / O intensive part thereof;

[0119] S53: splitting the computationally intensive operation instructions into a plurality of independent operation sub-instructions based on the current load balancing strategy and the preset scoring strategy;

[0120] S54: splitting the I / O intensive part of the operation instruction into a plurality of device interaction-related operation sub-instructions and a plurality of data transmission-related operation sub-instructions;

[0121] S55: If the instruction type cluster of the operation instruction is I / O intensive, based on a preset splitting and merging strategy, the I / O intensive operation instruction is split into a plurality of independent operation sub-instructions.

[0122] In this embodiment, the pre-set scoring strategy is a pre-set rule strategy for scoring the sub-instructions after the computationally intensive operation instructions of the self-service car wash terminal are split into steps. Specifically, the processing load required for each sub-instruction is associated with the score value, and the sub-instructions with high processing load are assigned low scores, and the sub-instructions with low processing load are assigned high scores; the operation sub-instructions associated with device interaction are instructions for direct interaction with external devices, such as starting a car wash machine, starting various components of a car wash machine, selecting a car wash mode, controlling a water spray system and a brush, controlling a drying system, etc. The operation sub-instructions associated with data transmission are instructions involving reading or writing actual data, such as receiving user payment information, confirming payment status, sending car wash status and data, receiving server instructions, updating software and configuration, etc.

[0123] Specifically, if the instruction type cluster of the operation instruction is computationally intensive, then based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instruction is split into several operation sub-instructions with appropriate scores, that is, considering the current load conditions of each server, after distributing several operation sub-instructions to each server, it will still not cause excessive burden on the load conditions of each server. If the instruction type cluster of the operation instruction is mixed, then its computationally intensive part and I / O intensive part are identified, and the two parts are distinguished. Similarly, based on the current load balancing strategy and the preset scoring strategy, the computationally intensive part of the operation instruction is split into several independent operation sub-instructions. Split some I / O intensive operation instructions into several operation sub-instructions related to device interaction and several operation sub-instructions related to data transmission. Distinguish the instructions related to device interaction from those related to data transmission before splitting them so that the two parts can be processed in parallel, thereby improving the overall processing speed. If the instruction type cluster of the operation instruction is I / O intensive, it will be split into several independent operation sub-instructions based on a preset splitting and merging strategy. Split different instructions based on different splitting methods to ease the load on the server during processing. At the same time, when parallel sub-instructions are assigned to different servers for processing, the processing speed can be improved.

[0124] In one embodiment, step S55 comprises the steps of:

[0125] S551: splitting the I / O intensive operation instruction into a plurality of device interaction-related operation sub-instructions and a plurality of data transmission-related operation sub-instructions;

[0126] S552: Based on the current load optimization strategy, the operation sub-instructions that are interactively associated with the devices are split or merged into several operation sub-instructions with high correlation.

[0127] In this embodiment, highly correlated operation sub-instructions are sub-instructions that are closely related in terms of execution order, data dependency or function, specifically interactive operation sub-instructions based on the same terminal or device or interactive operation sub-instructions of terminals or devices with strong correlation.

[0128] Furthermore, the operation sub-instructions associated with data transmission can be split into data preparation, data transmission, data processing, data verification and storage sub-instructions, and the corresponding processing servers and processing order can be determined by parallel processing and priority sorting.

[0129] Specifically, I / O-intensive operation instructions are split into several operation sub-instructions associated with device interaction and operation sub-instructions associated with data transmission, and the operation sub-instructions associated with device interaction are split into several independent operation sub-instructions. Then, based on the current load balancing strategy, the split operation sub-instructions of the same device or associated devices are merged into one or several operation sub-instructions, thereby effectively processing I / O-intensive operation instructions and improving the overall performance and stability of the system.

[0130] In one embodiment, if Figure 5 As shown, step S60 includes the steps of:

[0131] S61: determining, based on a weighted polling strategy, a number of servers that receive a number of mutually independent computationally intensive operation sub-instructions;

[0132] S62: Determine, based on a preset priority rule, a plurality of servers that receive operation sub-instructions associated with device interaction and operation sub-instructions associated with data transmission;

[0133] S63: Send the split operation sub-instructions to the corresponding server through the asynchronous communication mechanism.

[0134] In this embodiment, the weighted polling strategy is a strategy that combines a polling algorithm with a weight allocation strategy, specifically, a weight value is assigned to each server, and the weight value determines the frequency at which the server processes requests. By assigning different weights to each server, requests are allocated according to the processing capabilities of the server, thereby achieving more efficient load balancing; the preset priority rule is a pre-set rule strategy for matching the priority of operation sub-instructions associated with device interaction and operation sub-instructions associated with data transmission, which is specifically preset to match according to the order of execution of the operation sub-instructions and the real-time requirements. According to the real-time requirements, it is specifically preset that the priority of operation sub-instructions associated with device interaction is higher than that of operation sub-instructions associated with data transmission, and the priority of operation sub-instructions related to payment information among the operation sub-instructions associated with data transmission is the highest; the asynchronous communication mechanism is a data transmission method that allows the server to request multiple resources at the same time and realizes parallel processing loading.

[0135] Specifically, based on a weighted polling strategy, multiple servers are determined to receive operation sub-instructions that are split from a computationally intensive operation instruction. The weighted polling strategy assigns a weight to each server node. The weight is usually set based on factors such as the server's processing power, hardware configuration, and current load, so that the server's processing performance can be fully utilized and resource utilization can be improved. At the same time, based on a preset priority rule, multiple servers are determined to receive operation sub-instructions associated with device interactions and multiple servers are determined to receive operation sub-instructions associated with data transmission. Operation sub-instructions associated with device interactions and operation sub-instructions associated with data transmission are sent to different multiple servers for processing as much as possible. Since the two types of instructions are parallel, processing efficiency can be improved. The split operation sub-instructions are sent to the corresponding servers through an asynchronous communication mechanism. The asynchronous communication mechanism allows the sender and receiver to work in parallel, thereby improving the system's throughput and response speed, thereby improving the system's overall performance.

[0136] In one embodiment, if Figure 6 As shown, the steps include:

[0137] S70: deploying a heartbeat detection mechanism on a data processing node, receiving a heartbeat signal responded by the data processing node at a preset frequency, so as to monitor the health status of the data processing node;

[0138] S80: If the data processing node responds abnormally, triggering a fault detection mechanism and a traffic redirection mechanism based on the abnormality type;

[0139] S90: Execute a corresponding fault recovery process based on the fault detection mechanism result.

[0140] In this embodiment, the heartbeat detection mechanism is a mechanism for ensuring normal communication and healthy operation status between nodes in a distributed system. The basic idea is to periodically send a special data packet (usually called a "heartbeat packet" or "heartbeat signal") to notify the other party that it is still online and the connection is active. The data processing node is a node that processes data information. The heartbeat signal is a special data packet sent in the heartbeat detection mechanism. The exception type is a classification result of the cause of the abnormal response of the data processing node. The fault detection mechanism is a preset inspection mechanism for fault detection and troubleshooting of the server cluster and each data processing node. The traffic redirection mechanism is a mechanism that transfers the traffic originally flowing to the faulty node to a pre-configured backup node by modifying the routing configuration, adjusting the load balancing strategy, etc. The fault recovery process is a self-check recovery process set for each fault form in the corresponding fault detection mechanism, wherein the fault recovery process includes repairing the faulty node, restarting the faulty node, replacing the faulty node and waiting for maintenance personnel to perform repairs, etc.

[0141] Specifically, a heartbeat detection mechanism is deployed on the data processing node to receive heartbeat signals at a preset frequency and monitor the health status of the data processing node. When the response is abnormal, the fault detection mechanism and the traffic redirection mechanism are triggered based on the type of abnormality. The fault detection mechanism is used to detect the cause of the abnormal response of the data processing node, that is, the server failure cause. The traffic redirection mechanism is used to transmit the data of the faulty node to the corresponding backup node, and the corresponding fault recovery process is executed based on the result of the fault detection to repair the node failure.

[0142] Furthermore, the fault detection mechanism includes failure to receive a heartbeat signal in response to the data processing node for a preset number of consecutive times, failure of the data processing node to respond to the heartbeat signal at a preset response frequency, etc.

[0143] In one embodiment, the steps are further included:

[0144] When the load of any server exceeds the second threshold, the received operation instruction associated with the server is sent to the corresponding server based on the hash consistency algorithm.

[0145] In this embodiment, the load exceeding the second threshold value means that the load condition of the server exceeds the preset maximum load condition. The hash consistency algorithm is a special hash algorithm. When the system needs to determine the server to process a service request, the hash algorithm is used to perform a hash calculation on the service request to obtain a hash value. The hash value is then searched clockwise on the hash ring. The first server encountered is the corresponding server that processes the request.

[0146] Specifically, when the load of any server in the server cluster exceeds a preset second threshold, based on the hash consistency algorithm, the subsequently received operation instructions associated with the server are sent to the corresponding server obtained by the consistent hash calculation result for processing.

[0147] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0148] In one embodiment, a dynamic balancing system for the server load of a self-service car wash machine is provided, and the dynamic balancing system for the server load of a self-service car wash machine corresponds one-to-one to a dynamic balancing method for the server load of a self-service car wash machine in the above embodiment.

[0149] The dynamic balancing system for the server load of a self-service car washing machine includes:

[0150] An information acquisition module is used to obtain the current load information and historical load information of the self-service car wash machine server cluster at intervals;

[0151] The load prediction module is used to output load prediction information after trend analysis of the input current load information and historical load information;

[0152] A load balancing adjustment module is used to dynamically adjust the load balancing strategy based on load prediction information;

[0153] An instruction type identification module, configured to identify an instruction type cluster of an operation instruction when receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold;

[0154] An instruction splitting module is used to split the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy;

[0155] The instruction sending module is used to send the split operation sub-instructions to the corresponding server based on the current load balancing strategy.

[0156] Optionally, also include:

[0157] The abnormal state analysis module is used to perform abnormal state feature analysis on the load prediction information, and if an abnormal state feature vector exists, identify the server information associated with the abnormal state feature vector;

[0158] A regularity analysis module, used to analyze the regularity characteristics of the abnormal state feature vector based on the identified server information and its historical load information;

[0159] The load balancing adjustment module is specifically used to dynamically adjust the load balancing strategy based on the regularity characteristic analysis results;

[0160] Optionally, also include:

[0161] A marking module, used for marking any parameter in the load forecast information as an abnormal state feature vector when the parameter exceeds its corresponding dynamic threshold;

[0162] Optionally, the balance adjustment module includes:

[0163] A regularity characteristic judgment submodule is used to analyze the occurrence time and frequency of the abnormal state feature vector based on the identified server information and its historical load information to judge its regularity characteristics;

[0164] The regularity information acquisition submodule is used to analyze the corresponding regularity information based on the judgment result of regularity characteristics and the operation instruction information;

[0165] A load balancing adjustment submodule is used to adjust the load balancing strategy based on the obtained regular information;

[0166] Optionally, also include:

[0167] A first splitting submodule is used for splitting the computationally intensive operation instruction into a plurality of independent operation sub-instructions based on the current load balancing strategy and a preset scoring strategy if the instruction type cluster of the operation instruction is computationally intensive;

[0168] A hybrid identification module, for identifying a computationally intensive part and an I / O intensive part of an operation instruction if the instruction type cluster of the operation instruction is a hybrid type;

[0169] The second splitting sub-module is used to split the computationally intensive part of the operation instruction into a plurality of independent operation sub-instructions based on the current load balancing strategy and the preset scoring strategy;

[0170] A third splitting submodule is used to split the I / O intensive part of the operation instruction into a plurality of device interaction related operation sub-instructions and a plurality of data transmission related operation sub-instructions;

[0171] A fourth splitting submodule is used for splitting the I / O intensive operation instruction into a plurality of independent operation sub-instructions based on a preset splitting and merging strategy if the instruction type cluster of the operation instruction is I / O intensive;

[0172] Optionally, also include:

[0173] A splitting and merging module is used to split an I / O intensive operation instruction into several device-interactive operation sub-instructions and several data transmission-related operation sub-instructions, and based on the current load optimization strategy, split or merge the device-interactive operation sub-instructions into several highly correlated operation sub-instructions;

[0174] Optionally, also include:

[0175] A weighted polling module, used for determining a number of servers receiving a number of independent computationally intensive operation sub-instructions based on a weighted polling strategy;

[0176] A priority setting module, used to determine a number of operation sub-instructions associated with interactive reception devices and servers of operation sub-instructions associated with data transmission based on a preset priority rule;

[0177] The distribution and sending module is used to send the split operation sub-instructions to the corresponding server through an asynchronous communication mechanism;

[0178] Optionally, also include:

[0179] A heartbeat detection module is used to deploy a heartbeat detection mechanism on a data processing node, and receive a heartbeat signal responded by the data processing node at a preset frequency to monitor the health status of the data processing node;

[0180] A response exception processing module is used to trigger a fault detection mechanism and a traffic redirection mechanism based on the type of exception if the data processing node responds abnormally;

[0181] The execution module is used to execute the corresponding fault recovery process based on the fault detection mechanism result.

[0182] Optionally, also include:

[0183] The computing module is used to send the received operation instructions associated with any server to the corresponding server based on the hash consistency algorithm when the load of any server exceeds the second threshold.

[0184] For the specific definition of a dynamic balancing system for the server load of a self-service car wash machine, please refer to the definition of a dynamic balancing method for the server load of a self-service car wash machine mentioned above, which will not be repeated here. Each module in the above-mentioned dynamic balancing system for the server load of a self-service car wash machine can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0185] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for dynamically balancing the server load of a self-service car wash machine, characterized in that: Includes steps: Get the current load information and historical load information of the self-service car wash machine server cluster at intervals; The current load information and historical load information obtained are input into the prediction model, and the prediction model outputs load prediction information after trend analysis; Dynamically adjust the load balancing strategy based on load prediction information; When receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold, identifying an instruction type cluster of the operation instruction, wherein the instruction type cluster includes a computing intensive type, an I / O intensive type, and a mixed type; Based on the identified instruction type cluster and the preset instruction splitting strategy, split the operation instruction into a plurality of operation sub-instructions; Based on the current load balancing strategy, the split operation sub-instructions are sent to the corresponding servers; The step of dynamically adjusting the load balancing strategy based on the load prediction information comprises the following steps: Perform abnormal state feature analysis on the load forecast information, and if an abnormal state feature vector exists, identify server information associated with the abnormal state feature vector; Based on the identified server information and its historical load information, the regularity characteristics of the abnormal state feature vector are analyzed; Dynamically adjust the load balancing strategy based on the results of regularity and characteristics analysis; The step of dynamically adjusting the load balancing strategy based on the regular characteristic analysis results includes the following steps: Based on the identified server information and its historical load information, the occurrence time and frequency of the abnormal state feature vector are analyzed to determine its regular characteristics; Based on the judgment result of the regular characteristics, the corresponding regular information is analyzed in combination with the operation instruction information; Adjust the load balancing strategy based on the obtained regular information.

2. A method for dynamically balancing the server load of a self-service car washing machine according to claim 1, characterized in that: The step of performing abnormal state feature analysis on the load prediction information and identifying server information associated with the abnormal state feature vector if there is an abnormal state feature vector comprises the following steps: When any parameter in the load prediction information exceeds its corresponding dynamic threshold, the parameter is marked as an abnormal state feature vector.

3. A method for dynamically balancing the server load of a self-service car washing machine according to claim 1, characterized in that: The step of splitting the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy comprises the steps of: If the instruction type cluster of the operation instruction is computationally intensive, based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instruction is split into several independent operation sub-instructions; If the instruction type cluster of the operation instruction is a mixed type, then the computation-intensive part and the I / O-intensive part thereof are identified; Based on the current load balancing strategy and the preset scoring strategy, the computationally intensive operation instructions are split into several independent operation sub-instructions; Split some I / O-intensive operation instructions into several device interaction-related operation sub-instructions and several data transmission-related operation sub-instructions; If the instruction type cluster of the operation instruction is I / O intensive, based on a preset splitting and merging strategy, the I / O intensive operation instruction is split into a number of independent operation sub-instructions.

4. A method for dynamically balancing the server load of a self-service car washing machine according to claim 3, characterized in that: If the instruction type cluster of the operation instruction is I / O intensive, the step of splitting the I / O intensive operation instruction into a plurality of independent operation sub-instructions based on a preset splitting and merging strategy comprises the steps of: Split the I / O intensive operation instruction into several device interaction related operation sub-instructions and several data transmission related operation sub-instructions; Based on the current load optimization strategy, the device interactively related operation sub-instructions are split or merged into several highly related operation sub-instructions.

5. A method for dynamically balancing the server load of a self-service car washing machine according to claim 1, characterized in that: The step of sending the split operation sub-instructions to the corresponding server based on the current load balancing strategy includes the following steps: Determine a plurality of servers receiving a plurality of mutually independent computationally intensive operation sub-instructions based on a weighted round-robin strategy; Determine, based on a preset priority rule, a server for a plurality of operation sub-instructions associated with the receiving device interaction and an operation sub-instruction associated with the data transmission; The split operation sub-instructions are sent to the corresponding server through the asynchronous communication mechanism.

6. A method for dynamically balancing the server load of a self-service car washing machine according to claim 1, characterized in that: Also includes the steps: The heartbeat detection mechanism is deployed on the data processing node, and the heartbeat signal responded by the data processing node is received at a preset frequency to monitor the health status of the data processing node; If the data processing node responds abnormally, the fault detection mechanism and traffic redirection mechanism are triggered based on the type of abnormality; Execute the corresponding fault recovery process based on the fault detection mechanism results.

7. A method for dynamically balancing the server load of a self-service car washing machine according to claim 1, characterized in that: Also includes the steps: When the load of any server exceeds the second threshold, the received operation instruction associated with the server is sent to the corresponding server based on the hash consistency algorithm.

8. A dynamic balancing system for the server load of a self-service car wash machine, characterized in that: include: An information acquisition module is used to obtain the current load information and historical load information of the self-service car wash machine server cluster at intervals; The load prediction module is used to output load prediction information after trend analysis of the input current load information and historical load information; A load balancing adjustment module is used to dynamically adjust the load balancing strategy based on load prediction information; An instruction type identification module, configured to identify an instruction type cluster of an operation instruction when receiving an operation instruction sent by a car washing machine terminal associated with a server whose load exceeds a first threshold; An instruction splitting module is used to split the operation instruction into a plurality of operation sub-instructions based on the identified instruction type cluster and the preset instruction splitting strategy; The instruction sending module is used to send the split operation sub-instructions to the corresponding services based on the current load balancing strategy; The abnormal state analysis module is used to perform abnormal state feature analysis on the load prediction information, and if an abnormal state feature vector exists, identify the server information associated with the abnormal state feature vector; A regularity analysis module, used to analyze the regularity characteristics of the abnormal state feature vector based on the identified server information and its historical load information; The load balancing adjustment module is specifically used to dynamically adjust the load balancing strategy based on the regularity characteristic analysis results; Among them, the balance adjustment module includes: A regularity characteristic judgment submodule is used to analyze the occurrence time and frequency of the abnormal state feature vector based on the identified server information and its historical load information to judge its regularity characteristics; The regularity information acquisition submodule is used to analyze the corresponding regularity information based on the judgment result of regularity characteristics and the operation instruction information; The load balancing adjustment submodule is used to adjust the load balancing strategy based on the obtained regular information.