Cloud terminal synchronous control method, device and equipment and storage medium
By introducing a group control server into the cloud terminal synchronization control system and centralized forwarding using the public-intranet architecture, the problems of network delay and jitter in the cloud terminal synchronization control are solved, and efficient synchronous control is achieved.
Patent Information
- Application Number
- CN202411873369.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-14
AI Technical Summary
When synchronous operation between multiple cloud terminals, network latency and jitter problems are often encountered, which affects the user experience and leads to data inconsistency and operational lag.
By setting a group control server as the intermediate layer between the operating terminal and the cloud terminal, centralized forwarding of operation instructions is achieved using the public-intranet network architecture. Specific steps include: establishing a communication connection, performing network latency testing, parsing latency data to obtain latency prediction values, clustering analysis and time series decomposition to optimize timestamp coding and distributed scheduling.
It reduces the direct communication overhead between the operating terminal and the cloud terminal, ensures that multiple cloud terminals can receive operation instructions simultaneously and accurately, thereby achieving efficient synchronous control of the cloud terminal, and solving the problems of complex network connections and inefficient instruction forwarding in traditional methods.
Smart Images

Figure CN119629192A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of synchronous control technology, and in particular to a cloud terminal synchronous control method, device, equipment and storage medium. Background Art
[0002] At present, with the popularity of smart phones and the increasing demand for multi-device collaboration, cloud terminal synchronous control methods have been widely used in many fields. Multi-device real-time synchronization technology has become the key to achieving seamless cross-device operation. However, when synchronously controlling between multiple cloud terminals, potential network delays and jitter problems are often encountered. These problems not only affect the user experience, but may also lead to data inconsistency and operation lags. Therefore, how to effectively deal with network delays and jitter problems and ensure real-time synchronization and stable control between multiple devices has become a core problem that needs to be solved in the current technical field. Summary of the invention
[0003] The present application provides a cloud terminal synchronous control method, device, equipment and storage medium, which are used to reduce network delay and improve communication stability when performing cloud terminal synchronous control.
[0004] In a first aspect, an embodiment of the present application provides a cloud terminal synchronous control method, which is applied to an operating terminal, and the method includes: Establishing communication connections with multiple group control servers through a public network, wherein the group control servers respectively establish communication connections with multiple cloud terminals through an intranet; Sending a synchronization operation instruction to the group control server so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
[0005] In some embodiments, before sending the synchronization operation instruction to the group control server, the method further includes: Performing a network delay test on each of the cloud terminals to obtain a network test data packet; The network test data packet is parsed to obtain a delay prediction value of each of the cloud terminals.
[0006] In some embodiments, parsing the network test data packet to obtain a delay prediction value for each of the cloud terminals includes: Performing timestamp marking on the network test data packets to obtain a sending time sequence and a receiving time sequence; Calculating the communication time difference according to the sending time sequence and the receiving time sequence to obtain an original delay sequence; Performing sliding window segmentation processing on the original delay sequence to obtain multiple subsequences, wherein each of the subsequences includes multiple sampling points; Outliers are removed for each of the subsequences, and the cleaned delayed data set is obtained by calculating the interquartile range (IQR) and setting the threshold to 1.5×IQR; According to the cleaned data set, an exponentially weighted moving average algorithm is used for smoothing to obtain a smoothed delay sequence. The specific formula of the exponentially weighted moving average algorithm is: S[i]=α×D'[i]+(1-α)×S[i-1], where S[i] is the smoothed delay sequence, α is the smoothing factor, and D'[i] is the delay data set; Performing linear regression analysis on the smoothed delay sequence, obtaining a delay trend equation L(t)=kt+b, where k is the delay change rate and b is the basic delay value; According to the delay trend equation and the real-time network status, the network delay at the future moment is predicted to obtain the predicted delay value.
[0007] In some embodiments, predicting the network delay at a future time according to the delay trend equation and the real-time network status to obtain the predicted delay value includes: Performing multi-dimensional feature collection processing on the real-time network state to obtain a state feature matrix including network bandwidth, packet loss rate and network jitter, and performing normalization processing on the state feature matrix to obtain a normalized feature vector; According to the delay trend equation and the normalized eigenvector, the preset historical data sequence is subjected to eigendecomposition processing to obtain a eigenweight matrix, wherein the singular value decomposition formula used for the eigendecomposition processing is: W(t)=U∑VT, W(t) is the eigenweight matrix, U and V are left and right singular matrices respectively, and ∑ is the singular value diagonal matrix of the eigenweight matrix; Performing tensor operations on the feature weight matrix and the state feature matrix to obtain a basic prediction sequence, and applying a Kalman filter to the basic prediction sequence to perform state estimation to obtain a filtered prediction sequence; Determine the historical prediction error according to the filtered prediction sequence and the preset actual measurement sequence, perform double exponential smoothing operation on the historical prediction error, and obtain an error compensation vector, wherein the calculation formula of double exponential smoothing is: S1(t)=βe(t)+(1-β)S1(t-1), S2(t)=βS1(t)+(1-β)S2(t-1), E(t)=2S1(t)-S2(t); S1(t) is the first exponential smoothing value, S2(t) is the second exponential smoothing value, β is the smoothing coefficient, e(t) is the prediction error of the historical prediction error at time t, and E(t) is the error compensation vector; Performing a weighted fusion operation on the filtered prediction sequence and the error compensation vector to obtain a modified prediction sequence, wherein the weighted fusion operation is solved by the least square method, and the specific formula is: P2(t)=λ1P1(t)+λ2E(t), λ1+λ2=1, P2(t) is the modified prediction sequence, and P1(t) is the filtered prediction sequence; The confidence interval is calculated according to the modified prediction sequence to obtain the final prediction value and the corresponding confidence interval [P(t)-δ, P(t)+δ], where the δ value is calculated by the quantile of the Student-t distribution. The specific formula is: , s is the sample standard deviation, and n is the sample size.
[0008] In some embodiments, the sending of the synchronization operation instruction to the group control server so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established includes: Performing cluster analysis on the delay prediction values to obtain a cloud terminal group with similar network delay characteristics; Performing time series decomposition processing on the delay prediction value of each of the cloud terminal groups to obtain a trend item, a period item, and a random item; Performing time compensation calculation on the cloud terminal group according to the trend item, the period item and the random item; Optimizing and solving the compensation time matrix to obtain an optimal execution time sequence; Performing time stamp encoding processing on the original operation instructions according to the optimal execution time sequence to obtain an instruction sequence with execution time marks; Distributed scheduling is performed on the instruction sequence with execution time stamps to obtain synchronization operation instructions for different cloud terminal groups.
[0009] In some embodiments, the number of group control servers ranges from 2 to 5.
[0010] In some embodiments, both the public network and the intranet use the websocket protocol.
[0011] In a second aspect, an embodiment of the present application provides a cloud terminal synchronization control system, which is applied to an operating terminal, and the system includes: A communication connection module, used to establish a communication connection with a plurality of group control servers through a public network, wherein the group control servers respectively establish a communication connection with a plurality of cloud terminals through an intranet; The instruction issuing module is used to send a synchronization operation instruction to the group control server, so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
[0012] In a third aspect, an embodiment of the present application provides a terminal device, wherein the terminal device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the cloud terminal synchronous control method as described in any one of the embodiments of the present application when executing the computer program.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor enables the processor to implement a cloud terminal synchronization control method as described in any one of the embodiments of the present application.
[0014] The embodiment of the present application provides a cloud terminal synchronous control method, which is applied to an operating terminal, and the method includes: establishing a communication connection with multiple group control servers through a public network, wherein the group control servers respectively establish communication connections with multiple cloud terminals through an intranet; sending a synchronous operation instruction to the group control server, so that the group control server forwards the synchronous operation instruction to the cloud terminal with the established communication connection. Through the above method, a group control server is set as an intermediate layer between the operating terminal and the cloud terminal, and the centralized forwarding of operation instructions is realized by using the network architecture of the public network-intranet, which solves the technical problems such as complex network connection and low instruction forwarding efficiency existing in the traditional cloud terminal synchronous control, and not only reduces the direct communication overhead between the operating terminal and the cloud terminal, but also the group control server can uniformly process and forward the received synchronous operation instructions, ensuring that multiple cloud terminals can simultaneously and accurately receive the operation instructions, thereby realizing efficient synchronous control of the cloud terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0016] Figure 1 A schematic block diagram of a cloud terminal synchronization control system provided in an embodiment of the present application; Figure 2 A schematic flow chart of a cloud terminal synchronization control method provided in an embodiment of the present application; Figure 3 A schematic block diagram of a cloud terminal synchronization control system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0019] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0020] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0021] See also Figure 1 , Figure 1 The embodiment of the present application also provides a schematic block diagram of a cloud terminal synchronization control system. Figure 1 As shown, the cloud terminal synchronous control system 100 includes: a control terminal 11, a group control server 12 and a cloud terminal 13. The control terminal 11 is connected to multiple group control servers 12 through a public network, and the group control server 12 is connected to multiple cloud terminals 13 through an intranet. One cloud terminal 13 corresponds to only one group control server 12. Both the public network and the intranet use the websocket protocol.
[0022] In order to obtain a better synchronous control experience from the control terminal to the cloud terminal, the group control servers corresponding to the cloud terminal are generally allocated nearby and concentrated in several edge computer rooms. The communication pressure between the client and the cloud terminal is dispersed in multiple edge computer rooms, which disperses the pressure and improves stability.
[0023] See also Figure 2 , Figure 2 The embodiment of the present application also provides a schematic flow chart of a cloud terminal synchronization control method. Figure 2 The cloud terminal synchronous control method shown is applied to an operating terminal, and the specific steps include: S101-S102.
[0024] S101. Establishing communication connections with multiple group control servers through a public network, wherein the group control servers respectively establish communication connections with multiple cloud terminals through an intranet.
[0025] Exemplarily, the operation terminal establishes a persistent two-way communication connection with the group control server in a public network environment through the WebSocket protocol. During the connection establishment process, the operation terminal first sends a connection request data packet containing a terminal identifier, authentication information, and connection parameters to the group control server. After receiving the connection request, the group control server parses and verifies the request data packet, returns the connection confirmation information after the verification, and assigns a unique session identifier to the operation terminal. The group control server establishes a TCP long connection with multiple cloud terminals through the intranet environment, uses a heartbeat mechanism to maintain the connection status, and regularly detects the validity of the connection. The group control server maintains a connection pool to record the information of all cloud terminals that have established connections, including terminal ID, IP address, connection status, etc. When a connection abnormality is detected, the group control server will automatically start the reconnection mechanism to ensure the reliability of the communication link. The entire connection establishment process uses TLS encrypted transmission to ensure the security of data transmission.
[0026] S102: Send a synchronization operation instruction to the group control server, so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
[0027] Exemplarily, the operation terminal encapsulates the synchronous operation instructions into a unified instruction data packet format, including fields such as instruction type, instruction parameters, timestamp and serial number. After receiving the instruction data packet, the group control server first parses the instruction and verifies its validity, and then queries the connection pool to obtain a list of all currently online cloud terminals. The group control server adopts a multi-threaded parallel processing mechanism to create an independent forwarding thread for each cloud terminal to ensure that the instructions can be quickly and synchronously forwarded to all cloud terminals. During the forwarding process, the group control server will perform necessary format conversion and protocol adaptation on the instructions to adapt to the interface requirements of different cloud terminals. At the same time, the group control server will record the instruction forwarding log, including forwarding time, target terminal, forwarding status and other information, for subsequent status tracking and fault analysis. If a cloud terminal fails to receive the instruction, the group control server will start the retry mechanism to ensure the reliable delivery of the instruction.
[0028] The embodiment of the present application provides a cloud terminal synchronous control method, which is applied to an operating terminal, and the method includes: establishing a communication connection with multiple group control servers through a public network, wherein the group control servers respectively establish communication connections with multiple cloud terminals through an intranet; sending a synchronous operation instruction to the group control server, so that the group control server forwards the synchronous operation instruction to the cloud terminal with the established communication connection. Through the above method, a group control server is set as an intermediate layer between the operating terminal and the cloud terminal, and the centralized forwarding of operation instructions is realized by using the network architecture of the public network-intranet, which solves the technical problems such as complex network connection and low instruction forwarding efficiency existing in the traditional cloud terminal synchronous control, and not only reduces the direct communication overhead between the operating terminal and the cloud terminal, but also the group control server can uniformly process and forward the received synchronous operation instructions, ensuring that multiple cloud terminals can simultaneously and accurately receive the operation instructions, thereby realizing efficient synchronous control of the cloud terminal.
[0029] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.
[0030] In some embodiments, before sending the synchronization operation instruction to the group control server, the method further includes: Perform a network delay test on each cloud terminal to obtain a network test data packet. Specifically, the operating terminal first constructs a standard network test data packet, which contains a 64-bit timestamp, a 32-bit sequence number, and a 32-bit checksum field. For each cloud terminal, multiple groups of test data packets are continuously sent through the group control server at fixed time intervals (such as 100ms). During the transmission process, the test data packet records three key time points: the sending time, the arrival time at the group control server, and the arrival time at the cloud terminal. At the same time, the packet sending frequency is dynamically adjusted during the test process. When network congestion is detected, the packet sending frequency is reduced, and when the network is idle, the packet sending frequency is increased. In addition, the test data packet also contains multi-dimensional network status information such as network bandwidth, packet loss rate, and network jitter, which is used for subsequent delay prediction analysis.
[0031] Through accurate timestamp recording and multi-dimensional network status collection, complete network performance indicator data is obtained, providing a reliable data basis for subsequent delay prediction. The dynamically adjusted packet sending strategy not only ensures the adequacy of test data, but also avoids additional burden on the network.
[0032] The network test data packets are parsed to obtain the delay prediction value of each cloud terminal. Specifically, the integrity of the received test data packets is checked and damaged data packets are removed. The timestamp information in the data packets is extracted to calculate the end-to-end transmission delay. For multiple sets of test data, statistical methods are used for preliminary analysis, including calculating the average delay, standard deviation, and delay distribution characteristics. Combined with the network status information recorded in the data packet, a correlation model between network delay and various network indicators is established. Through mathematical statistics and machine learning methods, the network delay of each cloud terminal is modeled and predicted.
[0033] Through multi-dimensional data analysis and modeling, the network delay characteristics of each cloud terminal are accurately grasped, providing a time benchmark for the subsequent issuance of synchronization operation instructions. The prediction model takes into account the dynamic changes of network status and improves the accuracy and reliability of delay prediction.
[0034] In some embodiments, parsing the network test data packet to obtain the delay prediction value of each cloud terminal includes: The network test data packet is timestamped to obtain a sending time sequence and a receiving time sequence. Specifically, the control terminal adds a sending timestamp T1 when sending a network test data packet, and the cloud terminal adds a receiving timestamp T2 when receiving a network test data packet. The control terminal parses the network test data packet to obtain two time sequences {T1[1], T1[2]...T1[n]} and {T2[1], T2[2]...T2[n]}.
[0035] According to the sending time series and the receiving time series, the communication time difference is calculated to obtain the original delay series. Specifically, the difference is calculated for each pair of timestamps: D[i]=T2[i]-T1[i], and the original delay series {D[1], D[2]...D[n]} is obtained. This series contains all the original delay data.
[0036] The original delay sequence is segmented by a sliding window to obtain multiple subsequences, wherein each subsequence contains multiple sampling points. Specifically, the window size W (such as 100 sampling points) is set, and the window moves by a step size S (such as 10 points) each time, and the original delay sequence is divided into multiple overlapping subsequences, each subsequence contains W continuous sampling points.
[0037] Outliers are removed for each subsequence, and the cleaned delayed data set is obtained by calculating the interquartile range IQR and setting the threshold to 1.5×IQR. Specifically, the quartiles Q1 (25%) and Q3 (75%) of each subsequence are calculated, the interquartile range IQR=Q3-Q1 is calculated, and the upper and lower limits are set: Upper=Q3+1.5×IQR, Lower=Q1-1.5×IQR, and outliers beyond the range are removed.
[0038] According to the cleaned data set, an exponentially weighted moving average algorithm is used for smoothing to obtain a smoothed delay sequence. The specific formula of the exponentially weighted moving average algorithm is: S[i]=α×D'[i]+(1-α)×S[i-1], where S[i] is a smoothed delay sequence, α is a smoothing factor, and D'[i] is a delay data set. Specifically, the smoothing factor α is set (usually between 0.1-0.3), and the cleaned data is calculated point by point: S[i]=α×D'[i]+(1-α)×S[i-1], and the smoothed delay sequence {S[1], S[2]...S[n]} is obtained.
[0039] Linear regression analysis is performed on the smoothed delay series to obtain the delay trend equation L(t)=kt+b, where k is the delay change rate and b is the basic delay value. Specifically, with time as the independent variable and delay as the dependent variable, the least squares method is used to fit the straight line L(t)=kt+b, where k reflects the delay change trend and b represents the basic delay level.
[0040] According to the delay trend equation and the real-time network status, the network delay at the future moment is predicted to obtain the predicted delay value. Specifically, the target time t is substituted into the trend equation, and the current network status is combined to make corrections to obtain the predicted delay value P(t).
[0041] In some embodiments, the network delay at a future time is predicted according to the delay trend equation and the real-time network status to obtain a predicted delay value, including: The real-time network status is processed through multi-dimensional feature collection through the network status monitoring module to obtain a state feature matrix including network bandwidth, packet loss rate and network jitter, and the state feature matrix is standardized to obtain a normalized feature vector. Specifically, the real-time network status indicators that need to be collected include: network bandwidth B(t), packet loss rate L(t) and network jitter J(t), and the state feature matrix M(t) is constructed: M(t)=[B(t), L(t), J(t)]. The state feature matrix is standardized to obtain a normalized feature vector M'(t).
[0042] According to the delayed trend equation and the normalized eigenvector, the preset historical data sequence is subjected to eigendecomposition processing to obtain a eigenweight matrix, wherein the singular value decomposition formula used for the eigendecomposition processing is: , W(t) is the feature weight matrix, U and V are the left and right singular matrices respectively, VT is the transposed matrix of V, and ∑ is the singular value diagonal matrix of the feature weight matrix. The preset historical data sequence is: based on the historical network status data continuously collected by the network status monitoring module, a historical data sequence containing the past N time points is constructed.
[0043] Tensor operations are performed on the feature weight matrix and the state feature matrix to obtain a basic prediction sequence, and a Kalman filter is applied to the basic prediction sequence for state estimation to obtain a filtered prediction sequence. Specifically, tensor operations include tensor inner product operations and tensor convolution operations. The specific formula for tensor inner product operations is: P0'(t)=W(t)⊗V(t), where P0'(t) is the inner product prediction sequence, and ⊗ represents the tensor inner product operator. The specific formula for tensor convolution operations is: P0(t)=P0'(t)*h(t), where P0(t) is the basic prediction sequence, h(t) is the convolution kernel function, and * represents the convolution operator. The convolution kernel function h(t) uses a Gaussian kernel function: , σ is a smoothing parameter. After applying the Kalman filter to the basic prediction sequence P0(t) for state estimation, the filtered prediction sequence P1(t) is obtained.
[0044] The historical prediction error is determined according to the filtered prediction sequence and the preset actual measurement sequence, and the historical prediction error is double exponential smoothing operation is performed to obtain the error compensation vector, wherein the calculation formula of double exponential smoothing is: S1(t)=βe(t)+(1-β)S1(t-1), S2(t)=βS1(t)+(1-β)S2(t-1), E(t)=2S1(t)-S2(t); S1(t) is the first exponential smoothing value, S2(t) is the second exponential smoothing value, β is the smoothing coefficient, e(t) is the prediction error of the historical prediction error at time t, and E(t) is the error compensation vector. Specifically, the historical prediction error e(t) is determined according to the filtered prediction sequence P1(t) and the preset actual measurement sequence L(t), and the specific calculation formula is: e(t)=L(t)-P1(t).
[0045] A weighted fusion operation is performed on the filtered prediction sequence and the error compensation vector to obtain a corrected prediction sequence, where the weighted fusion operation is solved by the least squares method. The specific formula is: P2(t)=λ1P1(t)+λ2E(t), λ1+λ2=1, P2(t) is the corrected prediction sequence, and P1(t) is the filtered prediction sequence.
[0046] The confidence interval is calculated based on the modified prediction sequence to obtain the final prediction value and the corresponding confidence interval [P(t)-δ, P(t)+δ], where the δ value is calculated by the quantile of the Student-t distribution. The specific formula is: , s is the sample standard deviation, and n is the sample size.
[0047] Through the above method, the network state features are collected and standardized, the feature weights are extracted using singular value decomposition, the state is estimated by combining Kalman filtering, and the error compensation is calculated by double exponential smoothing. Finally, weighted fusion is performed and the confidence interval is calculated to form a complete prediction link. This multi-level prediction method not only takes into account the dynamic change characteristics of the network state, but also integrates the historical error compensation mechanism. It can better solve the uncertainty problem in network delay prediction, improve the accuracy and reliability of the prediction, and provide important technical support for the synchronous control of cloud terminals.
[0048] In some embodiments, sending a synchronization operation instruction to a group control server so that the group control server forwards the synchronization operation instruction to a cloud terminal that establishes a communication connection includes: The delay prediction values are clustered and analyzed to obtain cloud terminal groups with similar network delay characteristics. Specifically, the K-means clustering process is optimized, and the improved K-means++ algorithm is used to select the initial cluster center. The shortest distance from each sample point to the selected cluster center is calculated, and the square of the distance is used as the probability distribution for sampling. In the iterative process, an adaptive learning rate is introduced. (t is the number of iterations) to update the location of the cluster center. At the same time, a dynamic cluster number K value determination mechanism is set up to evaluate the clustering effect of different K values by calculating the silhouette coefficient, and the K value with the largest silhouette coefficient is selected as the final cluster number. The density weight factor ρ(i) is also introduced in the clustering process to balance the density differences of samples in different regions.
[0049] The delay prediction value of each cloud terminal group is decomposed into time series to obtain trend terms, periodic terms and random terms. Specifically, in the wavelet transform decomposition process, multi-scale discrete wavelet transform (DWT) is used, and db4 wavelet basis function is selected for multi-layer decomposition. The number of decomposition layers is set to L = log2(N)-1 (N is the sequence length), and the approximate coefficient a is obtained after each layer of decomposition. j and detail factor d j The wavelet coefficients are denoised by the soft threshold method. , where σ j is the standard deviation of the noise in the jth layer. The coefficients after denoising are reconstructed to obtain more accurate decomposition results of trend terms, periodic terms and random terms. Wavelet energy feature analysis is introduced to calculate the energy distribution characteristics at each scale to evaluate the decomposition effect.
[0050] The time compensation calculation is performed on the cloud terminal group according to the trend item, the cycle item and the random item. Specifically, during the compensation time calculation process, the trend compensation amount T t (i) Obtained through polynomial fitting, the polynomial coefficients are determined using the least squares method. Period compensation Tp (i) Fourier series expansion is used to calculate the main frequency components through fast Fourier transform (FFT). The adaptive weight coefficient w(t) is introduced to dynamically adjust the weight of each compensation item according to the historical compensation effect. The random compensation amount ε(i) is predicted by the ARIMA model, and the model order is automatically selected by the AIC criterion. At the same time, a compensation error feedback mechanism is established to correct the historical compensation error through the exponential smoothing method.
[0051] The compensation time matrix is optimized and solved to obtain the optimal execution time sequence. Specifically, in the genetic algorithm optimization process, real number coding is used, and the population size is set to 4N (N is the number of cloud terminals). The selection operator adopts the tournament selection method, and the best individual is selected from k individuals each time. The crossover operator uses arithmetic crossover with a crossover probability of pc=0.8. The mutation operator uses non-uniform mutation, and the mutation probability pm is dynamically adjusted with the evolutionary generation. An elite retention strategy is introduced to retain the best 10% individuals in each generation. An adaptive penalty function is designed to handle time constraints to ensure that the optimal solution meets the synchronization requirements.
[0052] The original operation instructions are timestamped according to the optimal execution time sequence to obtain an instruction sequence with execution time marks. Specifically, the timestamp encoding adopts a hierarchical design, which includes two levels: global timestamp and local timestamp. The global timestamp uses a 64-bit integer with microsecond accuracy. The instruction parameters are encoded with variable length and encapsulated in the TLV (Type-Length-Value) format. A checksum mechanism is introduced, and the CRC32 algorithm is used to calculate the checksum. The instruction dependency description field is designed, and the execution dependency between instructions is represented by a directed acyclic graph. A priority field is added to handle instruction conflicts.
[0053] Distributed scheduling is performed on instruction sequences with execution time stamps to obtain synchronous operation instructions for different cloud terminal groups. Specifically, in the implementation of the token bucket algorithm, the token bucket capacity B=2×N (N is the maximum number of burst requests) is set. A dynamic token generation rate adaptive mechanism is introduced to adjust the generation rate in real time according to network conditions. A hierarchical token bucket structure is designed, including a global token bucket and a group-level token bucket. A token borrowing mechanism is implemented in the group-level token bucket to allow token scheduling between different groups. A token reservation strategy is added to reserve a certain proportion of tokens for high-priority instructions. A token usage efficiency monitoring mechanism is designed to optimize the token allocation strategy through statistical analysis.
[0054] It should be noted that, in the above method, the part of generating synchronous operation instructions can be implemented by the control terminal with the help of a group control server, or through other servers, so as to alleviate the operating pressure of the control terminal.
[0055] In some embodiments, the number of group control servers ranges from 2 to 5.
[0056] By setting up a minimum of two group control servers, fault tolerance and load balancing are ensured, while limiting the number to a maximum of five to avoid resource waste. This not only ensures high availability and stability of the system, but also optimizes deployment costs and maintenance difficulties, keeping the server group size within a reasonable and efficient range.
[0057] The technical solution of this application is to deploy a group control server in each computer room, and the client can realize the group control synchronization operation of cloud phones in different computer rooms when establishing 2-5 public network long connections. It solves the pain points of cloud phone freeze and client crash during client group control synchronization operation, and realizes the group control synchronization operation of more than 1000 cloud phones without freeze, with good user experience, and perfectly meets business needs.
[0058] In some embodiments, both the public network and the intranet use the websocket protocol.
[0059] The group control server is deployed in the edge computer room and communicates with the cloud terminal through the intranet websocket. The stability and timeliness are much improved compared to the public network. It can meet the timeliness requirements of group control synchronization operations and provide a good user operation experience.
[0060] By uniformly adopting the WebSocket protocol to establish persistent connections, frequent connection establishment and disconnection are avoided, communication delays and bandwidth consumption are significantly reduced. At the same time, it supports the server to actively push data. In addition, the unified communication solution for the internal and external networks simplifies the system architecture, improves development efficiency and maintainability, and is particularly suitable for application scenarios such as cloud terminals that require real-time synchronous control.
[0061] See also Figure 3 , Figure 3 The embodiment of the present application further provides a schematic block diagram of a cloud terminal synchronous control system, wherein the cloud terminal synchronous control system 200 is used to execute the aforementioned cloud terminal synchronous control method. The cloud terminal synchronous control system 200 can be configured in a server.
[0062] Among them, the server can be an independent server or a server cluster, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms.
[0063] like Figure 3 As shown, the cloud terminal synchronous control system 300 includes: a communication connection module 301 and an instruction issuing module 302 .
[0064] The communication connection module 301 is used to establish a communication connection with multiple group control servers through a public network, wherein the group control servers respectively establish a communication connection with multiple cloud terminals through an intranet; Before being used to implement sending synchronization operation instructions to the group control server, the communication connection module 301 is also specifically used to implement: performing a network delay test on each cloud terminal to obtain a network test data packet; parsing the network test data packet to obtain a delay prediction value for each cloud terminal.
[0065] When the communication connection module 301 is used to parse the network test data packet and obtain the delay prediction value of each cloud terminal, it is specifically used to implement: timestamp the network test data packet to obtain the sending time series and the receiving time series; calculate the communication time difference according to the sending time series and the receiving time series to obtain the original delay series; perform sliding window segmentation processing on the original delay series to obtain multiple subsequences, wherein each subsequence contains multiple sampling points; remove outliers from each subsequence, calculate the interquartile range IQR and set the threshold to 1.5×IQR, and obtain the cleaned delay data set; according to the cleaned data set, the exponentially weighted moving average algorithm is used for smoothing to obtain a smoothed delay sequence. The specific formula of the exponentially weighted moving average algorithm is: S[i]=α×D'[i]+(1-α)×S[i-1], where S[i] is the smoothed delay sequence, α is the smoothing factor, and D'[i] is the delay data set; a linear regression analysis is performed on the smoothed delay sequence to obtain the delay trend equation L(t)=kt+b, where k is the delay change rate and b is the basic delay value; based on the delay trend equation and the real-time network status, the network delay at the future moment is predicted to obtain the predicted delay value.
[0066] When the communication connection module 301 is used to predict the network delay at a future moment according to the delay trend equation and the real-time network state and obtain the predicted delay value, it is specifically used to achieve: multi-dimensional feature acquisition processing of the real-time network state to obtain a state feature matrix including network bandwidth, packet loss rate and network jitter, and normalization processing of the state feature matrix to obtain a normalized feature vector; according to the delay trend equation and the normalized feature vector, feature decomposition processing is performed on the historical data sequence to obtain a feature weight matrix, wherein the singular value decomposition formula used for the feature decomposition processing is: W(t)=U∑VT, W(t) is the feature weight matrix, U and V are the left and right singular matrices respectively, and ∑ is the singular value diagonal matrix of the feature weight matrix; tensor operation is performed on the feature weight matrix and the state feature matrix to obtain a basic prediction sequence, and a Kalman filter is applied to the basic prediction sequence for state estimation to obtain a filtered prediction sequence; the historical prediction error is determined according to the filtered prediction sequence and the preset actual measurement sequence, and a double exponential smoothing operation is performed on the historical prediction error , the error compensation vector is obtained, where the calculation formula of double exponential smoothing is: S1(t)=βe(t)+(1-β)S1(t-1), S2(t)=βS1(t)+(1-β)S2(t-1), E(t)=2S1(t)-S2(t); S1(t) is the first exponential smoothing value, S2(t) is the second exponential smoothing value, β is the smoothing coefficient, e(t) is the prediction error of the historical prediction error at time t, and E(t) is the error compensation vector; for the filtered prediction sequence and the error compensation vector A weighted fusion operation is performed to obtain a modified prediction sequence, where the weighted fusion operation is solved by the least squares method. The specific formula is: P2(t)=λ1P1(t)+λ2E(t), λ1+λ2=1, P2(t) is the modified prediction sequence, and P1(t) is the filtered prediction sequence; the confidence interval is calculated based on the modified prediction sequence to obtain the final prediction value and the corresponding confidence interval [P(t)-δ, P(t)+δ], where the δ value is calculated by the quantile of the Student-t distribution. The specific formula is: , s is the sample standard deviation, and n is the sample size.
[0067] The instruction issuing module 302 is used to send a synchronization operation instruction to the group control server, so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
[0068] In some embodiments, when the instruction issuing module 302 is used to implement sending synchronous operation instructions to the group control server so that the group control server forwards the synchronous operation instructions to the cloud terminal that has established a communication connection, it is specifically used to implement: clustering analysis processing on the delay prediction values to obtain cloud terminal groups with similar network delay characteristics; time series decomposition processing on the delay prediction values of each cloud terminal group to obtain trend items, periodic items and random items; time compensation calculation for the cloud terminal group based on the trend items, periodic items and random items; optimization and solution processing on the compensation time matrix to obtain the optimal execution time sequence; timestamp encoding processing on the original operation instructions according to the optimal execution time sequence to obtain an instruction sequence with an execution time mark; distributed scheduling processing on the instruction sequence with an execution time mark to obtain synchronous operation instructions for different cloud terminal groups.
[0069] An embodiment of the present application provides a terminal device, which includes a memory and a processor; the memory is used to store computer programs; the processor is used to execute the computer programs and implement any cloud terminal synchronization control method as described in the embodiments of the present application when executing the computer programs.
[0070] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements a cloud terminal synchronization control method as described in any one of the embodiments of the present application.
[0071] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A cloud terminal synchronous control method, characterized in that: Applied to an operating terminal, the method comprises: Establishing communication connections with multiple group control servers through a public network, wherein the group control servers respectively establish communication connections with multiple cloud terminals through an intranet; Sending a synchronization operation instruction to the group control server so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
2. The cloud terminal synchronous control method according to claim 1, characterized in that: Before sending the synchronization operation instruction to the group control server, the method further includes: Performing a network delay test on each of the cloud terminals to obtain a network test data packet; The network test data packet is parsed to obtain a delay prediction value of each of the cloud terminals.
3. The cloud terminal synchronous control method according to claim 2, characterized in that: The parsing of the network test data packet to obtain a delay prediction value of each of the cloud terminals includes: Performing timestamp marking on the network test data packets to obtain a sending time sequence and a receiving time sequence; Calculating the communication time difference according to the sending time sequence and the receiving time sequence to obtain an original delay sequence; Performing sliding window segmentation processing on the original delay sequence to obtain multiple subsequences, wherein each of the subsequences includes multiple sampling points; Outliers are removed for each of the subsequences, and the cleaned delayed data set is obtained by calculating the interquartile range (IQR) and setting the threshold to 1.5×IQR; According to the cleaned data set, an exponentially weighted moving average algorithm is used for smoothing to obtain a smoothed delay sequence. The specific formula of the exponentially weighted moving average algorithm is: S[i]=α×D'[i]+(1-α)×S[i-1], where S[i] is the smoothed delay sequence, α is the smoothing factor, and D'[i] is the delay data set; Performing linear regression analysis on the smoothed delay sequence, obtaining a delay trend equation L(t)=kt+b, where k is the delay change rate and b is the basic delay value; According to the delay trend equation and the real-time network status, the network delay at the future moment is predicted to obtain the predicted delay value.
4. The cloud terminal synchronous control method according to claim 3, characterized in that: The method predicts the network delay at a future time according to the delay trend equation and the real-time network status to obtain a predicted delay value, including: Performing multi-dimensional feature collection processing on the real-time network state to obtain a state feature matrix including network bandwidth, packet loss rate and network jitter, and performing normalization processing on the state feature matrix to obtain a normalized feature vector; According to the delay trend equation and the normalized eigenvector, a characteristic decomposition process is performed on the preset historical data sequence to obtain a characteristic weight matrix, wherein the singular value decomposition formula used for the characteristic decomposition process is: W(t)=U∑VT, W(t) is the characteristic weight matrix, U and V are left and right singular matrices respectively, and ∑ is the singular value diagonal matrix of the characteristic weight matrix; Performing tensor operations on the feature weight matrix and the state feature matrix to obtain a basic prediction sequence, and applying a Kalman filter to the basic prediction sequence to perform state estimation to obtain a filtered prediction sequence; Determine the historical prediction error according to the filtered prediction sequence and the preset actual measurement sequence, perform double exponential smoothing operation on the historical prediction error, and obtain an error compensation vector, wherein the calculation formula of double exponential smoothing is: S1(t)=βe(t)+(1-β)S1(t-1), S2(t)=βS1(t)+(1-β)S2(t-1), E(t)=2S1(t)-S2(t); S1(t) is the first exponential smoothing value, S2(t) is the second exponential smoothing value, β is the smoothing coefficient, e(t) is the prediction error of the historical prediction error at time t, and E(t) is the error compensation vector; Performing a weighted fusion operation on the filtered prediction sequence and the error compensation vector to obtain a modified prediction sequence, wherein the weighted fusion operation is solved by the least square method, and the specific formula is: P2(t)=λ1P1(t)+λ2E(t), λ1+λ2=1, P2(t) is the modified prediction sequence, and P1(t) is the filtered prediction sequence; The confidence interval is calculated according to the modified prediction sequence to obtain the final prediction value and the corresponding confidence interval [P(t)-δ, P(t)+δ], where the δ value is calculated by the quantile of the Student-t distribution. The specific formula is: , s is the sample standard deviation, and n is the sample size.
5. The cloud terminal synchronous control method according to claim 2, characterized in that: The sending of the synchronization operation instruction to the group control server so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established includes: Performing cluster analysis on the delay prediction values to obtain a cloud terminal group with similar network delay characteristics; Performing time series decomposition processing on the delay prediction value of each of the cloud terminal groups to obtain trend items, period items, and random items; Performing time compensation calculation on the cloud terminal group according to the trend item, the period item and the random item; Optimizing and solving the compensation time matrix to obtain an optimal execution time sequence; Performing time stamp encoding processing on the original operation instructions according to the optimal execution time sequence to obtain an instruction sequence with execution time marks; Distributed scheduling is performed on the instruction sequence with execution time stamps to obtain synchronization operation instructions for different cloud terminal groups.
6. The cloud terminal synchronous control method according to claim 1, characterized in that: The number of group control servers ranges from 2 to 5.
7. The cloud terminal synchronous control method according to claim 1, characterized in that: The public network and the intranet both use the websocket protocol.
8. A cloud terminal synchronous control system, characterized in that: Applied to the operating terminal, the cloud terminal synchronous control system includes: A communication connection module, used to establish a communication connection with a plurality of group control servers through a public network, wherein the group control servers respectively establish a communication connection with a plurality of cloud terminals through an intranet; The instruction issuing module is used to send a synchronization operation instruction to the group control server, so that the group control server forwards the synchronization operation instruction to the cloud terminal with which the communication connection is established.
9. A terminal device, characterized in that: The terminal device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the cloud terminal synchronous control method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the cloud terminal synchronous control method according to any one of claims 1 to 7.