Method and System for Interactive Scenario Scheduling of Digital Intelligence Screen Platform for Multi-Terminal Collaboration
Through deep learning models and improved Hungarian algorithms, the optimal task allocation strategy is determined, combined with dynamic load balancing and incremental state synchronization, the problems of low resource utilization efficiency and inconsistent state in multi-terminal collaborative interaction are solved, and efficient and reliable collaborative interaction is achieved.
Patent Information
- Application Number
- CN202510354180.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-25
AI Technical Summary
The existing technology lacks an intelligent task allocation mechanism in multi-terminal collaborative interaction scenarios, resulting in low resource utilization efficiency, load balancing solutions cannot cope with equipment load changes, and there are inconsistencies in state synchronization, which affects the reliability and stability of collaborative interaction.
The deep learning model is used to combine the improved Hungarian algorithm to determine the optimal task allocation strategy, adjust the task allocation through the dynamic load balancing algorithm, and use incremental state synchronization packages to solve state inconsistency, and achieve efficient coordination between devices.
It improves the task allocation efficiency and accuracy in multi-terminal collaboration scenarios, ensures the continuity of interactive experience and the reliability of the system, and improves resource utilization efficiency and state consistency.
Smart Images

Figure CN119862043B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technology of digital intelligent platforms, and particularly to an interaction scenario scheduling method and system for digital intelligent platforms oriented to multi-terminal collaboration. Background Art
[0002] With the popularization of intelligent terminal devices and the development of Internet of Things technology, multi-terminal collaborative interaction has become an important trend in digital transformation. In the application scenarios of digital intelligent platforms, multiple terminal devices need to perform real-time interaction and collaborative work through wireless networks to achieve efficient information transmission and seamless business connection. At present, multi-terminal collaboration mainly conducts task scheduling and data synchronization through a centralized server, and terminal devices use a unified communication protocol for data exchange and status synchronization.
[0003] First of all, the existing technology lacks an intelligent task allocation mechanism for different terminal device characteristics. Traditional task allocation methods often adopt fixed rules or simple polling strategies, and cannot be optimized according to parameter characteristics such as the hardware configuration and processing capabilities of terminal devices, resulting in low resource utilization efficiency and affecting the overall collaborative effect.
[0004] Secondly, the existing load balancing solutions generally adopt static configuration methods and cannot effectively cope with the load changes of terminal devices during operation. When some terminal devices are overloaded, it is easy to cause problems such as system response delay and degraded interaction experience, while the resources of terminal devices with lighter loads are not fully utilized.
[0005] Finally, during the multi-terminal collaboration process, due to the influence of factors such as network latency and data packet loss, there are consistency problems in the status synchronization between terminal devices. The existing technology mostly adopts full-volume data synchronization methods, which not only increase the network transmission overhead but also may lead to inconsistent status between terminal devices, affecting the reliability and stability of collaborative interaction. Summary of the Invention
[0006] Embodiments of the present invention provide an interaction scenario scheduling method and system for digital intelligent platforms oriented to multi-terminal collaboration, which can solve the problems in the existing technology.
[0007] In the first aspect of the embodiments of the present invention,
[0008] Receive access requests sent by multiple terminal devices through a wireless network, where the multiple terminal devices include a master terminal device and slave terminal devices; obtain the device parameter information of the multiple terminal devices, and based on the device parameter information, combine a pre-trained deep learning model and an improved Hungarian algorithm to determine the optimal task allocation strategy under different combinations of terminal devices, where the improved Hungarian algorithm realizes task matching optimization according to the construction of alternating paths and the calculation of zero element priorities;
[0009] Collect real-time load data of multiple terminal devices, where the real-time load data includes processor utilization rate, memory utilization rate, storage utilization rate, and network bandwidth utilization rate; based on the real-time load data, use a dynamic load balancing algorithm to perform real-time scheduling on the interaction tasks among the multiple terminal devices. The dynamic load balancing algorithm dynamically adjusts the task allocation scheme by calculating the comprehensive load index of the terminal devices while ensuring the continuity of the interaction experience;
[0010] According to the adjusted task allocation scheme, send corresponding interaction instructions to the multiple terminal devices respectively; receive the interaction execution results returned by the multiple terminal devices. If there are terminal devices with inconsistent states, perform status synchronization on the interaction execution results through an incremental status synchronization packet.
[0011] According to the device parameter information, combining a pre-trained deep learning model and an improved Hungarian algorithm, determining the optimal task allocation strategy under different terminal device combination methods includes:
[0012] The deep learning model includes a bidirectional long short-term memory network module, a self-attention mechanism module, a multi-head attention mechanism module, and a fully connected layer module. Among them, the bidirectional long short-term memory network module is used to extract the temporal features of the feature vectors corresponding to the device parameter information. The self-attention mechanism module generates associated weights through the dot product operation of the query matrix and the key-value matrix and through scale transformation. The multi-head attention mechanism module performs feature fusion on the associated weights. The fully connected layer module generates a task allocation probability distribution;
[0013] Construct a combined loss function, where the combined loss function includes a weighted combination of the task allocation accuracy loss value, the performance metric loss value, and the load balancing loss value; use the Adam optimization algorithm to train the deep learning model, and process the intermediate layer features through batch normalization operations during the training process;
[0014] Calculate the ability score of the terminal device based on the deep learning model, where the ability score is obtained by the weighted sum of the device parameters and the corresponding weights;
[0015] Construct a task fitness matrix according to the ability score and the task resource requirement vector. At the same time, introduce load balancing constraints and resource utilization efficiency constraints, and use an improved Hungarian algorithm to solve the task fitness matrix to determine the optimal task allocation strategy under different terminal device combination methods; among them, the load balancing constraint ensures the balance of task allocation among terminal devices, and the resource utilization efficiency constraint ensures the maximization of overall resource utilization.
[0016] Construct a task fitness matrix based on the ability scores and task resource requirement vectors. At the same time, introduce load balancing constraints and resource utilization efficiency constraints, and use an improved Hungarian algorithm to solve the task fitness matrix to determine the optimal task allocation strategy under different combinations of terminal devices, including:
[0017] Calculate the similarity of the corresponding dimensions of the ability scores and task resource requirement vectors. The similarity calculation uses the ratio of the minimum value to the maximum value of the corresponding dimension to obtain the standardized matching degree between the device and the task. Multiply the standardized matching degree by a preset load balancing coefficient to obtain the task fitness matrix, where the preset load balancing coefficient is obtained by the ratio of the load value of a single terminal device to the load values of all terminal devices;
[0018] Based on the task fitness matrix and the weight values assigned to the task fitness matrix, construct an optimization objective function. At the same time, introduce load balancing constraints and resource utilization efficiency constraints to construct a constraint condition matrix. Use an improved Hungarian algorithm to jointly solve the optimization objective function and the constraint condition matrix.
[0019] Using an improved Hungarian algorithm to jointly solve the optimization objective function and the constraint condition matrix includes:
[0020] Construct a first reduction matrix and a second reduction matrix according to the optimization objective function and the constraint condition matrix respectively. Among them, the first reduction matrix is obtained by taking the opposite of the function value of the optimization objective function, and the second reduction matrix is obtained by transposing the constraint condition matrix;
[0021] Identify the positions of zero elements in the first reduction matrix and the second reduction matrix respectively, count the number of zero elements in each row and each column, and calculate the zero element priority. The zero element priority is the sum of the number of zero elements in the row where the zero element is located and the number of zero elements in the column where the zero element is located;
[0022] Based on the zero element priority, mark and select the zero elements, count the matching number of zero elements in each row and the matching number of zero elements in each column, and construct a matching set. Count the unmatched rows without zero elements and the unmatched columns without zero elements, and construct a non-matching set;
[0023] Starting from the row index in the non-matching set, construct an alternating path based on the matching set and the non-matching set. In the alternating path, adjacent vertices alternately correspond to unmatched zero elements and matched zero elements. Mark the positions corresponding to the unmatched zero elements on the alternating path as 1, and mark the positions corresponding to the matched zero elements as 0;
[0024] Determine whether the total number of elements marked as 1 in the matching set in the alternating path is equal to the minimum value of the number of rows and columns of the matrix. If not, reconstruct the matching set until the total number of elements marked as 1 is equal to the minimum value of the number of rows and columns of the matrix;
[0025] Use the positions marked as 1 in the matching set as the corresponding relationships for task assignment.
[0026] Based on the real-time load data, use a dynamic load balancing algorithm to perform real-time scheduling on the interaction tasks among the multiple terminal devices. The dynamic load balancing algorithm dynamically adjusts the task assignment scheme by calculating the comprehensive load index of the terminal devices, and under the premise of ensuring the continuity of the interaction experience, it includes:
[0027] Calculate the fluctuation standard deviation of the real-time load data and the previously obtained historical load data, and set the adaptive weight vector corresponding to the real-time load data according to the fluctuation standard deviation. Among them, the adaptive weight vector is determined based on the product of the fluctuation standard deviation and a preset weight reference value;
[0028] Perform weighted calculation on the real-time load vector corresponding to the real-time load data and the adaptive weight vector to obtain the comprehensive load index of each terminal device;
[0029] When the comprehensive load index exceeds the preset load balancing threshold, reassign the task assignment scheme.
[0030] According to the adjusted task assignment scheme, send the corresponding interaction instructions to the multiple terminal devices respectively; receive the interaction execution results returned by the multiple terminal devices. If there are terminal devices with inconsistent states, perform state synchronization on the interaction execution results through an incremental state synchronization packet, including:
[0031] Extract the interaction instruction set of each terminal device according to the task assignment scheme. The interaction instruction set includes device identification, interaction type, and execution timing information; extract the timing information of the interaction instructions in the interaction instruction set, and construct an interaction instruction directed graph according to the timing information. The nodes of the interaction instruction directed graph represent interaction instructions, and the edges represent the timing dependency relationships between instructions;
[0032] Traverse the interaction instruction directed graph to calculate the path length of each interaction instruction, extract the delay sensitivity parameter of each interaction instruction, and perform weighted calculation on the path length and the delay sensitivity parameter to obtain the instruction priority;
[0033] Arrange the interaction instructions in descending order according to the instruction priority, divide the arranged interaction instructions into multiple instruction groups according to the priority interval, and construct an instruction group execution queue; based on the order of the instruction group execution queue, send the interaction instructions to the corresponding terminal devices group by group;
[0034] Receive the interactive execution result returned by the receiving terminal device, and extract the state vector in the interactive execution result, where the state vector includes the device resource state and the task execution state;
[0035] If there are terminal devices with inconsistent states, encapsulate the state difference field of the terminal device with inconsistent states and the state vector of the terminal device with inconsistent states into an incremental state synchronization packet, and send the incremental state synchronization packet to all terminal devices, and receive the state update confirmation information returned by the terminal devices to verify the consistency after the state update.
[0036] In the second aspect of the embodiments of the present invention, a digital intelligent platform interaction scenario scheduling system for multi-terminal collaboration is provided, including:
[0037] A first unit, configured to receive access requests sent by multiple terminal devices through a wireless network, where the multiple terminal devices include a master terminal device and slave terminal devices; obtain the device parameter information of the multiple terminal devices, and according to the device parameter information, in combination with a pre-trained deep learning model and an improved Hungarian algorithm, determine the optimal task allocation strategy under different combinations of terminal devices, where the improved Hungarian algorithm realizes task matching optimization according to the construction of an alternating path and the calculation of the priority of zero elements;
[0038] A second unit, configured to collect the real-time load data of multiple terminal devices, where the real-time load data includes the processor usage rate, memory usage rate, storage usage rate, and network bandwidth usage rate; based on the real-time load data, perform real-time scheduling on the interaction tasks between the multiple terminal devices by using a dynamic load balancing algorithm, and the dynamic load balancing algorithm dynamically adjusts the task allocation scheme on the premise of ensuring the continuity of the interaction experience by calculating the comprehensive load index of the terminal devices;
[0039] A third unit, configured to send corresponding interaction instructions to the multiple terminal devices respectively according to the adjusted task allocation scheme; receive the interactive execution results returned by the multiple terminal devices, and if there are terminal devices with inconsistent states, perform state synchronization on the interactive execution results through an incremental state synchronization packet.
[0040] In the third aspect of the embodiments of the present invention
[0041] A kind of electronic device is provided, including:
[0042] A processor;
[0043] A memory for storing instructions executable by the processor;
[0044] Wherein, the processor is configured to call the instructions stored in the memory to execute the method described above.
[0045] In the fourth aspect of the embodiments of the present invention,
[0046] a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
[0047] The beneficial effects of this application are as follows:
[0048] The present invention determines the optimal task allocation strategy by combining a deep learning model and an improved Hungarian algorithm. The improved Hungarian algorithm optimizes task matching by using alternating path construction and zero element priority calculation, which can effectively improve the task allocation efficiency and accuracy in multi-terminal collaborative scenarios.
[0049] The present invention performs task scheduling based on real-time load data using a dynamic load balancing algorithm. By calculating the comprehensive load index of terminal devices, the task allocation scheme is dynamically adjusted, realizing dynamic balance of the load among terminal devices while ensuring the continuity of the interaction experience, and improving the overall performance and stability of the system.
[0050] The present invention uses incremental state synchronization packets to synchronize the states of interaction execution results, effectively solving the problem of possible state inconsistency in multi-terminal collaborative scenarios, ensuring the reliability of system operation and data consistency, and improving the efficiency and accuracy of multi-terminal collaborative work. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a schematic flowchart of the interaction scenario scheduling method for a digital intelligent platform facing multi-terminal collaboration in the embodiments of the present invention;
[0052] Figure 2 is a schematic diagram for comparing the system resource utilization rates in the embodiments of the present invention;
[0053] Figure 3 is a schematic diagram for comparing the computational overheads under different problem scales in the embodiments of the present invention;
[0054] Figure 4 is a schematic diagram of the system load balancing degree distribution in the embodiments of the present invention;
[0055] Figure 5 is a schematic diagram of the distributed task scheduling real-time monitoring system in the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0057] The technical solutions of the present invention will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0058] Figure 1 It is a schematic flowchart of a digital intelligent screen platform interaction scenario scheduling method for multi-terminal collaboration in an embodiment of the present invention. As Figure 1 shown, the method includes:
[0059] Receiving access requests sent by multiple terminal devices through a wireless network, where the multiple terminal devices include a master terminal device and slave terminal devices; obtaining device parameter information of the multiple terminal devices, and based on the device parameter information, combining a pre-trained deep learning model and an improved Hungarian algorithm to determine an optimal task allocation strategy under different combinations of terminal devices. Among them, the improved Hungarian algorithm realizes task matching optimization according to the construction of an alternating path and the calculation of the priority of zero elements;
[0060] Collecting real-time load data of multiple terminal devices, where the real-time load data includes processor utilization rate, memory utilization rate, storage utilization rate, and network bandwidth utilization rate; based on the real-time load data, using a dynamic load balancing algorithm to perform real-time scheduling of interaction tasks between the multiple terminal devices. The dynamic load balancing algorithm dynamically adjusts the task allocation scheme by calculating the comprehensive load index of the terminal devices while ensuring the continuity of the interaction experience;
[0061] According to the adjusted task allocation scheme, sending corresponding interaction instructions to the multiple terminal devices respectively; receiving the interaction execution results returned by the multiple terminal devices. If there are terminal devices with inconsistent states, the status of the interaction execution results is synchronized through an incremental status synchronization packet.
[0062] In an alternative embodiment, determining an optimal task allocation strategy under different combinations of terminal devices according to the device parameter information, combining a pre-trained deep learning model and an improved Hungarian algorithm includes:
[0063] The deep learning model includes a bidirectional long short-term memory network module, a self-attention mechanism module, a multi-head attention mechanism module, and a fully connected layer module. Among them, the bidirectional long short-term memory network module is used to extract the temporal features of the feature vector corresponding to the device parameter information. The self-attention mechanism module generates correlation weights through the dot product operation of the query matrix and the key-value matrix and after scale transformation. The multi-head attention mechanism module performs feature fusion on the correlation weights. The fully connected layer module generates a task allocation probability distribution;
[0064] Construct a combined loss function, which includes a weighted combination of the task allocation accuracy loss value, the performance metric loss value, and the load balancing loss value. Use the Adam optimization algorithm to train the deep learning model, and process the intermediate layer features through batch normalization operations during the training process;
[0065] Calculate the ability score of the terminal device based on the deep learning model. The ability score is obtained by the weighted sum of the device parameters and the corresponding weights;
[0066] Construct a task adaptability matrix according to the ability score and the task resource requirement vector. At the same time, introduce load balancing constraints and resource utilization efficiency constraints, and use an improved Hungarian algorithm to solve the task adaptability matrix to determine the optimal task allocation strategy under different combinations of terminal devices. Among them, the load balancing constraint ensures the balance of task allocation among terminal devices, and the resource utilization efficiency constraint ensures the maximization of overall resource utilization.
[0067] Parameter information such as the processor frequency, memory capacity, network bandwidth, and storage space of the terminal device is collected every 5 seconds through the device management interface, and 12 consecutive collections form a time series data sequence. Among them, the collection range of processor frequency data is 0 - 4 GHz, memory capacity is 0 - 32 GB, network bandwidth is 0 - 2000 Mbps, and storage space is 0 - 1 TB. Actual collection example: processor frequency 3.2 GHz, memory 16 GB, bandwidth 1000 Mbps, storage 512 GB.
[0068] When the bidirectional long short-term memory network extracts temporal features, it controls the information flow through the input gate, forget gate, and output gate. The input gate controls the writing ratio of new data, the forget gate controls the retention degree of historical information, and the output gate controls the information output volume. The network includes two directions, forward and backward, and the number of hidden layer units in each direction is set to 128. After bidirectional splicing, a 256-dimensional feature vector is obtained.
[0069] In the processing of the self-attention mechanism, the 256-dimensional feature vector is obtained through three independent linear transformations to get the query vector, key vector, and value vector. Calculate the dot product of the query vector and the key vector to get the attention score, divide the score by 16 for scaling, and obtain the attention weight through normalization.
[0070] The multi-head attention mechanism sets 8 attention heads, and each head independently calculates to obtain 32-dimensional features. The outputs of the 8 heads are concatenated into a 256-dimensional vector, and the dimension is kept unchanged through a linear transformation. The fully connected layer maps the features to task assignment probabilities. The first layer uses a transformation matrix of 256 by 128 and the ReLU activation function, and the second layer outputs the task assignment probabilities.
[0071] A combined loss function is constructed, which includes three parts: task assignment accuracy loss, performance metric loss, and load balancing loss, with weights of 0.4, 0.3, and 0.3 respectively. The Adam optimization algorithm is used to train the model, with the initial learning rate set to 0.001 and decaying to 0.1 times the original every 50 epochs. During the training process, batch normalization is performed on the intermediate layer features.
[0072] When calculating the device capability score, the normalized values of the processor frequency, memory capacity, network bandwidth, and storage space are multiplied by the weights 0.4, 0.3, 0.2, and 0.1 respectively and then summed. The normalized parameter values of the example device are 0.8, 0.5, 0.5, and 0.512, and the calculated capability score is 0.6024.
[0073] A task adaptability matrix is constructed, and the matrix elements are the ratios of the device capability scores to the task resource requirements. A load balancing constraint is introduced to limit the maximum number of tasks that a single device can execute to no more than 30% of the total number of tasks. A resource utilization efficiency constraint is introduced, requiring that the average utilization rate of device resources is not less than 60%.
[0074] An improved Hungarian algorithm is used to solve the task adaptability matrix, and it is iteratively optimized through steps such as row and column normalization, finding the minimum element, and line covering to obtain the optimal matching scheme that meets the constraint conditions.
[0075] Figure 2 The following is a schematic diagram for comparing the system resource utilization rates of the embodiments of the present invention:
[0076] According to the comparison results of experimental data, this technical solution significantly outperforms the LSTM model and the traditional CNN solution in terms of various key performance indicators. Specifically, in terms of resource utilization efficiency, the CPU utilization rate of this technical solution reaches 92.5%, showing a significant improvement compared to 78.3% of the LSTM model and 72.1% of the traditional CNN; the memory utilization rate reaches 88.7%, showing an obvious improvement compared to 75.4% of the LSTM model and 70.8% of the traditional CNN. In terms of task processing ability, the task completion rate of this technical solution is as high as 97.5%, far leading the 85.6% of the LSTM model and 81.2% of the traditional CNN; the system load balance degree reaches 0.92, which is better than 0.78 of the LSTM model and 0.73 of the traditional CNN, indicating that the system resource allocation is more reasonable. Especially in terms of system response performance, the response time of this technical solution is only 45.3 milliseconds. Compared with 78.6 milliseconds of the LSTM model and 92.4 milliseconds of the traditional CNN, the time delay is reduced by 42.4% and 51.0% respectively, fully reflecting the advantages of this technical solution in scenarios with high real-time requirements. These data comprehensively reflect the comprehensive advantages of this technical solution in multiple dimensions such as resource utilization efficiency, task processing ability, and system response performance, proving that this solution has better performance and higher practical value in practical applications.
[0077] In the prior art, traditional load balancing algorithms mainly use static thresholds and simple resource monitoring methods for task scheduling, unable to fully consider the dynamic change characteristics of device resources. The round-robin scheduling method only allocates tasks according to a preset order, completely ignoring the actual load status and resource utilization of devices, resulting in low resource utilization efficiency. These methods all have problems such as unbalanced resource allocation and unreasonable device load distribution.
[0078] This application automatically extracts the temporal characteristics of device parameters through a deep learning model, overcoming the limitation of traditional methods that only rely on static thresholds. The bidirectional long short-term memory network can consider both historical and future temporal information simultaneously, accurately grasping the changing rules of device resources. The introduction of the self-attention mechanism realizes the dynamic correlation analysis between different resource dimensions, solving the problem that traditional methods are difficult to handle the collaborative scheduling of multi-dimensional resources. The feature fusion strategy of the multi-head attention mechanism further improves the feature expression ability, making the task allocation decision more accurate and reasonable.
[0079] In the task allocation link, this application improves the traditional Hungarian algorithm. By introducing load balancing constraints and resource utilization efficiency constraints, multi-objective optimization is achieved. This improvement effectively solves the problem that traditional methods are prone to cause local resource overload or idleness. Through the device capability scoring mechanism, an accurate matching relationship between task requirements and device resources is established, avoiding the resource waste caused by the simple round-robin method.
[0080] After the above improvements, this application has achieved significant improvements in multiple resource dimensions such as CPU, memory, network bandwidth, and storage, representing a qualitative leap compared to traditional load balancing algorithms and round-robin scheduling methods. The overall system exhibits higher resource utilization efficiency, more balanced load distribution, and stronger task processing capabilities. Especially in large-scale task scenarios, the advantages of this application are more obvious, fully demonstrating the adaptability and reliability of this solution in complex environments.
[0081] This technical solution not only solves the problems of low resource utilization rate and load imbalance existing in traditional methods, but also realizes the efficient scheduling and reasonable allocation of system resources through an intelligent feature extraction and optimization decision-making mechanism, providing a new solution idea for task scheduling in distributed systems.
[0082] In an optional implementation manner, a task fitness matrix is constructed based on the ability score and the task resource requirement vector. At the same time, a load balancing constraint and a resource utilization efficiency constraint are introduced, and an improved Hungarian algorithm is used to solve the task fitness matrix. The optimal task allocation strategy under different combinations of terminal devices is determined, including:
[0083] Calculate the similarity of the corresponding dimensions of the ability score and the task resource requirement vector. The similarity calculation uses the ratio of the minimum value to the maximum value of the corresponding dimension to obtain the normalized matching degree between the device and the task; multiply the normalized matching degree by a preset load balancing coefficient to obtain the task fitness matrix, where the preset load balancing coefficient is obtained by the ratio of the load value of a single terminal device to the load values of all terminal devices;
[0084] Based on the task fitness matrix and the weight value assigned to the task fitness matrix, an optimization objective function is constructed. At the same time, a load balancing constraint and a resource utilization efficiency constraint are introduced to construct a constraint condition matrix; an improved Hungarian algorithm is used to jointly solve the optimization objective function and the constraint condition matrix.
[0085] First, obtain the ability score and the task resource requirement vector of the terminal device. The ability score of the terminal device includes three dimensions: computing ability, storage ability, and communication ability, and the score range of each dimension is 0 - 100. The task resource requirement vector also includes three dimensions: computing resource requirement, storage resource requirement, and communication resource requirement, and the requirement value range of each dimension is 0 - 100. For example, the ability score of a certain terminal device is [80, 70, 90], and the resource requirement vector of a certain task is [60, 50, 70].
[0086] Calculate the similarity between the ability score and the resource requirement vector. For each dimension, divide the minimum value of the corresponding values by the maximum value to obtain the normalized matching degree. Taking the above data as an example, the normalized matching degree of the ability dimension is 60 / 80 = 0.75, the storage ability dimension is 50 / 70 = 0.71, and the communication ability dimension is 70 / 90 = 0.78. Take the average of the normalized matching degrees of the three dimensions to obtain the comprehensive matching degree of the device and the task, which is 0.75.
[0087] Calculate the preset load balancing coefficient. Statistically calculate the current load values of each terminal device, including the weighted average of indicators such as CPU usage rate and memory occupancy rate. Divide the load value of a single device by the sum of the load values of all devices to obtain the load balancing coefficient. For example, if the load values of three terminal devices are 0.3, 0.4, and 0.5 respectively, the corresponding load balancing coefficients are 0.25, 0.33, and 0.42.
[0088] Construct a task adaptability matrix. Multiply the comprehensive matching degree of each device and the task by the corresponding load balancing coefficient to obtain the final task adaptability. For example, if the comprehensive matching degrees of a device with three tasks are 0.75, 0.8, and 0.7 respectively, and the load balancing coefficient of this device is 0.25, then the final task adaptability is [0.19, 0.2, 0.18].
[0089] Construct an optimization objective function based on the task adaptability matrix. Assign different weights to different types of tasks. For example, the weight of tasks with high real-time requirements is 0.6, and the weight of ordinary tasks is 0.4. Multiply the task adaptability by the corresponding weight and sum it as the optimization objective.
[0090] Introduce constraint conditions. The load balancing constraint requires that the number of tasks undertaken by a single device does not exceed the preset threshold, and the difference in task allocation between devices does not exceed the preset range. The resource utilization efficiency constraint requires that the device resource utilization rate be maintained within a reasonable range to avoid resource waste and overload.
[0091] Solve using an improved Hungarian algorithm. Add constraint condition judgment on the basis of the traditional Hungarian algorithm, and obtain the optimal task allocation scheme that meets the constraint conditions through iterative optimization. Finally, output the matching relationship matrix between devices and tasks.
[0092] By calculating the similarity between device capabilities and task requirements and combining the load balancing coefficient to construct a task adaptability matrix, accurate matching of task allocation is achieved, improving resource scheduling efficiency. Introducing load balancing and resource utilization efficiency constraints ensures the balance of device loads and the rationality of resource utilization, avoiding problems such as device overload and resource waste. Using an improved Hungarian algorithm for solution satisfies multiple constraint conditions while ensuring global optimality, enhancing the feasibility and practicality of the task allocation scheme.
[0093] In an alternative embodiment, jointly solving the optimization objective function and the constraint condition matrix by using an improved Hungarian algorithm includes:
[0094] Constructing a first reduced matrix and a second reduced matrix respectively according to the optimization objective function and the constraint condition matrix, wherein the first reduced matrix is obtained by taking the opposite of the function values of the optimization objective function, and the second reduced matrix is obtained by transposing the constraint condition matrix;
[0095] Identifying the positions of zero elements in the first reduced matrix and the second reduced matrix respectively, counting the number of zero elements in each row and each column, and calculating the zero element priority, where the zero element priority is the sum of the number of zero elements in the row and the number of zero elements in the column where the zero element is located;
[0096] Based on the zero element priority, performing marked selection on the zero elements, counting the number of matched zero elements in each row and the number of matched zero elements in each column, and constructing a matching set; counting the unmatched rows without zero elements and the unmatched columns without zero elements, and constructing a non-matching set;
[0097] Taking the row index in the non-matching set as the starting point, constructing an alternating path based on the matching set and the non-matching set, where adjacent vertices in the alternating path alternately correspond to unmatched zero elements and matched zero elements, marking the positions corresponding to the unmatched zero elements on the alternating path as 1, and marking the positions corresponding to the matched zero elements as 0;
[0098] Judging whether the total number of elements marked as 1 in the matching set in the alternating path is equal to the minimum value of the number of rows and columns of the matrix. If not, reconstructing the matching set until the total number of elements marked as 1 is equal to the minimum value of the number of rows and columns of the matrix;
[0099] Taking the positions marked as 1 in the matching set as the corresponding relationship of task assignment.
[0100] First, construct a reduced matrix. For the optimization objective function, take the opposite of its function values to obtain the first reduced matrix. For example, if the original objective function values are [[4, 2, 3], [1, 5, 2], [3, 2, 4]], after taking the opposite, the first reduced matrix is [[-4, -2, -3], [-1, -5, -2], [-3, -2, -4]]. For the constraint condition matrix, transpose it to obtain the second reduced matrix. For example, if the original constraint condition matrix is [[1, 0, 1], [0, 1, 0], [1, 0, 1]], after transposing, the second reduced matrix is [[1, 0, 1], [0, 1, 0], [1, 0, 1]].
[0101] Next, identify the positions of zero elements in the two reduction matrices. For each matrix, count the number of zero elements in each row and each column. For example, in the first reduction matrix, the first row has 2 zero elements and the second column has 1 zero element. Calculate the priority of each zero element, which is the sum of the number of zero elements in the row where the zero element is located and the number of zero elements in the column where it is located. For example, if a zero element is in a row with 2 zeros and a column with 1 zero, its priority is 3.
[0102] Then, based on the priority of zero elements, make label selections. Zero elements with higher priorities are labeled as 1 first, indicating a match. Count the number of matched zero elements in each row and each column to construct a matching set. At the same time, count the unmatched rows and columns without zero elements to construct a non-matching set. For example, the matching set is \(\{(1,2),(2,3),(3,1)\}\), and the non-matching set is \(\{\text{row}4,\text{ column}4\}\).
[0103] Starting from the rows in the non-matching set, construct an alternating path. The adjacent vertices in the path alternately correspond to unmatched zero elements and matched zero elements. For example, the path is: row 4 → column 2 → row 1 → column 3 → row 2. Mark the unmatched zero elements on the path as 1 and the matched zero elements as 0.
[0104] Judge whether the total number of elements labeled as 1 in the matching set is equal to the minimum of the number of rows and columns of the matrix. If not, repeat the process of constructing the matching set until the number of elements labeled as 1 meets the requirement. Finally, take the positions labeled as 1 in the matching set as the task assignment scheme.
[0105] Figure 3 This is a schematic diagram of the comparison of computational overheads under different problem scales in the embodiments of the present invention:
[0106] The table details the performance comparison data of each algorithm under different task scales and the performance improvement of this technical solution compared to the traditional Hungarian algorithm. In the task scenario with the smallest scale of 50×50, the computing time of this technical solution is 128.6 ms, which is 47.6% less than 245.3 ms of the traditional Hungarian algorithm. Although the greedy algorithm only requires 55.7 ms, its accuracy is relatively low. As the task scale increases, the computing times of all three algorithms show a non-linear growth trend, but this technical solution always maintains a significant performance advantage. At the medium scale of 150×150, this technical solution requires 389.5 ms, the traditional Hungarian algorithm requires 728.4 ms, and the greedy algorithm requires 168.9 ms, with a performance improvement of 46.5%. In the scenario with the largest scale of 300×300, the computing time of this technical solution is 785.9 ms, which is 47.1% lower than 1486.3 ms of the traditional Hungarian algorithm. Although the greedy algorithm only requires 338.6 ms, it is difficult to guarantee the optimality of the allocation scheme. From the overall trend, this technical solution has maintained a stable performance improvement under various task scales, with an average improvement amplitude of around 47%, fully demonstrating the significant advantages and good scalability of this solution in large-scale task scheduling scenarios.
[0107] In the prior art, the standard Hungarian algorithm processes zero elements in a fixed search order and needs to traverse the matrix multiple times when constructing an augmenting path, resulting in a high computational complexity. The basic iterative algorithm only adjusts the current solution through simple iterative optimization and does not fully utilize the structural characteristics of the problem, showing poor computational efficiency in large-scale problems. These traditional methods often require a large amount of redundant calculations when dealing with high-dimensional task allocation problems, seriously affecting the practicality of the algorithms.
[0108] To address the above problems, this application proposes an improved Hungarian algorithm based on zero-element priority and alternating paths. This solution first analyzes the distribution characteristics of zero elements in the matrix, calculates the number of zero elements in the rows and columns where each zero element is located, and establishes a zero-element priority evaluation mechanism. This strategy can quickly identify zero elements with greater matching potential and avoid blind searches in traditional methods.
[0109] During the matching process, this application innovatively introduces a zero-element selection strategy based on priority, preferentially processing those zero elements that are more likely to form effective matches. At the same time, by constructing and maintaining alternating paths, dynamic optimization of the matching results is achieved. This improvement makes full use of the structural characteristics of the problem and greatly reduces ineffective search and computational operations.
[0110] Through the above improvements, the present application significantly improves the computational efficiency of the algorithm in large-scale problems. Compared with traditional methods, the technical solution of the present application shows faster computational speed and better scalability when dealing with high-dimensional task allocation problems. Especially when the problem scale is large, the growth trend of the computational time is more gentle, reflecting good performance advantages.
[0111] This technical solution not only solves the problem of low computational efficiency of traditional algorithms in large-scale problems, but also realizes the full utilization of computing resources through an intelligent priority mechanism and an efficient path construction strategy. This provides an efficient and feasible new method for solving complex task allocation problems and has important practical application value.
[0112] In an optional implementation manner, based on the real-time load data, a dynamic load balancing algorithm is used to perform real-time scheduling on the interaction tasks between the multiple terminal devices. The dynamic load balancing algorithm dynamically adjusts the task allocation scheme by calculating the comprehensive load index of the terminal devices, while ensuring the continuity of the interaction experience, including:
[0113] Calculate the standard deviation of the fluctuation between the real-time load data and the previously obtained historical load data, and set an adaptive weight vector corresponding to the real-time load data according to the standard deviation of the fluctuation, where the adaptive weight vector is determined based on the product of the standard deviation of the fluctuation and a preset weight reference value;
[0114] Perform weighted calculation on the real-time load vector corresponding to the real-time load data and the adaptive weight vector to obtain the comprehensive load index of each terminal device;
[0115] When the comprehensive load index exceeds the preset load balancing threshold, reallocate the task allocation scheme.
[0116] In the multi-terminal device interaction scenario, first obtain the real-time load data of each terminal device, including operating state parameters such as CPU usage rate, memory occupancy rate, network bandwidth usage, etc. At the same time, read the historical load data of the corresponding terminal device in the past period (such as the most recent 24 hours) from the historical database as a reference benchmark.
[0117] For each terminal device, calculate the standard deviation of the fluctuation of its real-time load data relative to the historical load data. Specifically, taking the CPU usage rate as an example, compare the real-time CPU usage rate data points in the most recent 10 minutes with the CPU usage rate data points in the same historical period, calculate the dispersion degree of the two groups of data, and obtain the standard deviation of the fluctuation. When the standard deviation of the fluctuation is large, it indicates that there is a large deviation between the current load and the historical law, and the reference weight of the real-time data needs to be reduced; otherwise, the weight is increased.
[0118] Set the weight reference value to 0.6, and multiply the standard deviation of fluctuations by the weight reference value to obtain the adaptive weight. For example, if the standard deviation of CPU usage fluctuations of a certain terminal device is 0.2, then its corresponding adaptive weight is 0.12. The same method is used to calculate the weights for other load metrics such as memory and bandwidth.
[0119] Perform weighted calculation on the real-time load vector and the adaptive weight vector to obtain the comprehensive load index. Taking a certain terminal device as an example, its real-time CPU usage rate is 80%, memory occupancy rate is 60%, and bandwidth usage rate is 50%, and the corresponding weights are 0.12, 0.15, and 0.18 respectively. Then its comprehensive load index is (80×0.12 + 60×0.15 + 50×0.18) = 28.2.
[0120] Set the load balancing threshold to 30. When the comprehensive load index of a certain terminal device exceeds this threshold, task reallocation is triggered. When reallocating, tasks are preferentially assigned to terminal devices with lower load indices, and factors such as network latency between devices are considered to ensure the continuity of the interaction experience.
[0121] Figure 4 This is a schematic diagram of the system load balancing degree distribution in the embodiments of the present invention:
[0122] This table comprehensively compares the key indicators of this technical solution with traditional dynamic balancing and static balancing in terms of load balancing performance. Looking at the peak position, this technical solution reaches 0.80, which is significantly better than 0.70 of traditional dynamic balancing and 0.45 of static balancing, indicating that it can achieve a higher degree of load balancing. In terms of the distribution width, 0.10 of this technical solution is better than 0.12 of traditional dynamic balancing and 0.15 of static balancing, indicating that the load distribution is more concentrated and stable. In terms of the maximum number of samples, this technical solution reaches 98, which is higher than 92 of traditional dynamic balancing and 95 of static balancing, indicating that it has better data representativeness. In terms of the variance index, this technical solution is only 0.012, which is much lower than 0.018 of traditional dynamic balancing and 0.025 of static balancing, proving that the discrete degree of the system load distribution is smaller. In terms of the comprehensive index of the stability coefficient, this technical solution reaches 0.95, which is significantly higher than 0.87 of traditional dynamic balancing and 0.82 of static balancing, fully reflecting the excellent performance of this solution in maintaining system stability. These data comprehensively and intuitively demonstrate the significant advantages of this technical solution in all dimensions of load balancing performance.
[0123] By introducing historical load data as a reference benchmark and dynamically adjusting weights in combination with the standard deviation of fluctuations, the load assessment becomes more accurate and reasonable, avoiding decision-making biases that may be caused by simply relying on real-time data. An adaptive weight mechanism is adopted to automatically adjust the weight ratios of various indicators according to the degree of load data fluctuations, improving the adaptability and robustness of the load balancing algorithm to load changes. Task dynamic scheduling is achieved while ensuring the continuity of the interaction experience, which not only ensures the overall load balance of the system but also avoids the impact on the user experience caused by frequent task migrations.
[0124] In an optional implementation manner, according to the adjusted task allocation scheme, corresponding interaction instructions are sent to the multiple terminal devices respectively; when receiving the interaction execution results returned by the multiple terminal devices, if there are terminal devices with inconsistent states, state synchronization of the interaction execution results through an incremental state synchronization packet includes:
[0125] Extract the interaction instruction set of each terminal device according to the task allocation scheme, where the interaction instruction set includes device identification, interaction type, and execution timing information; extract the timing information of the interaction instructions in the interaction instruction set, and construct an interaction instruction directed graph according to the timing information. The nodes of the interaction instruction directed graph represent interaction instructions, and the edges represent the timing dependency relationships between instructions;
[0126] Traverse the interaction instruction directed graph to calculate the path length of each interaction instruction, extract the delay sensitivity parameter of each interaction instruction, and perform weighted calculation on the path length and the delay sensitivity parameter to obtain the instruction priority;
[0127] Arrange the interaction instructions in descending order according to the instruction priority, divide the arranged interaction instructions into multiple instruction groups according to the priority interval, and construct an instruction group execution queue; based on the order of the instruction group execution queue, send interaction instructions to the corresponding terminal devices group by group;
[0128] Receive the interaction execution results returned by the terminal devices, and extract the state vector in the interaction execution results. The state vector includes the device resource state and the task execution state;
[0129] If there are terminal devices with inconsistent states, encapsulate the state difference field of the terminal device with inconsistent state and the state vector of the terminal device with inconsistent state into an incremental state synchronization packet, and send the incremental state synchronization packet to all terminal devices, and receive the state update confirmation information returned by the terminal devices to verify the consistency after the state update.
[0130] First, extract the interaction instruction details of each terminal device according to the task allocation scheme. The generation rule of the device identification code is: prefix "DEV_" plus the timestamp of the year, month, and day, and then plus two-digit device serial number. For example, the identification code of the first device on November 15, 2023 is "DEV_2023111501". The classification of interaction types is based on task characteristics: data collection type (01) for obtaining sensor data; status query type (02) for device status monitoring; parameter configuration type (03) for performing device parameter adjustment; task execution type (04) for processing specific business tasks.
[0131] The recording of execution timing information uses a timestamp format accurate to milliseconds. For each instruction, record its planned start time and expected completion time. The determination process of time information considers the instruction type characteristics, historical execution data, and current system load conditions. By analyzing historical execution records, statistically calculate the average execution duration of different types of instructions, and combine with the current system resource usage to estimate the reasonable execution time interval of the instruction.
[0132] When constructing a directed graph, each instruction is used as a node in the graph. The node attributes include information such as instruction type, execution time interval, and device identification. By analyzing the timing dependency relationship between instructions, establish directed edge connections between nodes. The determination of the dependency relationship is based on the sequential requirements of instruction execution. For example, the parameter configuration instruction must be executed after the data collection instruction is completed, and the task execution instruction needs to wait for the parameter configuration to be completed.
[0133] The calculation process of the path length: Start from the starting node of the directed graph and traverse all possible paths using the depth-first search method. For each path, accumulate the execution durations of each instruction on the path to obtain the total path length. For example, a certain path contains three instruction nodes, which require 5 seconds, 3 seconds, and 7 seconds respectively, then the total length of this path is 15 seconds. By comparing the lengths of all possible paths, determine the longest path length where each instruction is located.
[0134] The determination process of the latency sensitivity parameter: First, establish a mapping relationship between the instruction type and the business importance level. Analyze the impact degree of different types of instructions on system performance and set a benchmark sensitivity value. Then make fine-tuning according to the specific business scenario. For example, the benchmark sensitivity of the data collection instruction is 0.8. If the collected is critical sensor data, it is increased to 0.9; if it is ordinary status data, it is decreased to 0.7.
[0135] The calculation of the priority value goes through multiple steps: First, normalize the path length and convert it to the 0 - 1 interval; then perform a weighted combination with the latency sensitivity parameter; finally, make dynamic adjustments according to the current system load conditions. The adjustment process considers the processing capabilities of the devices and the urgency of the tasks.
[0136] The instructions are sorted in descending order using an improved quicksort algorithm. First, determine the partitioning threshold for the priority intervals: By statistically analyzing the priority distribution characteristics of historical instructions, set reasonable interval boundaries. The threshold for the high-priority group is set to 0.8, indicating that instructions with a priority value greater than 0.8 are critical instructions; the threshold interval for the medium-priority group is 0.5 - 0.8; the threshold for the low-priority group is less than 0.5.
[0137] The process of constructing the instruction group execution queue: Within each priority group, the instructions are sorted according to the priority value. The queue is implemented using a doubly linked list structure, supporting dynamic adjustment of the instruction order. The queue nodes contain detailed instruction information and execution status flags. When an emergency instruction appears, it can be inserted into the corresponding priority position.
[0138] The instruction distribution process is carried out in batches: First, distribute all the instructions in the high-priority group and wait for the execution results after completion. Dynamically adjust the distribution strategy of subsequent instructions according to the execution results. For example, if a high-priority instruction fails to execute, the relevant medium-priority instructions need to be delayed or cancelled.
[0139] The process of extracting the status vector: The device resource status is obtained in real time through the system interface, including four indicators: processor utilization rate, memory occupancy rate, bandwidth utilization rate, and storage utilization rate. Each indicator records the current value, change trend, and threshold setting. The task execution status includes the task progress percentage and the status code, and the status code uses three digits to represent different execution stages and abnormal situations.
[0140] The method for detecting inconsistent states: Establish a status evaluation index system, including three dimensions: deviation degree, duration, and impact range. By setting different levels of thresholds, judge the severity of the state difference. For example, if the deviation of the memory occupancy rate exceeds 20% and the duration exceeds 1 minute, it is determined to be severely inconsistent.
[0141] The process of constructing the incremental synchronization package: First, determine the identification format of the differential fields, using the form of "field name_difference type_timestamp". Combine the differential fields with the complete status vector and add a checksum. The checksum is calculated by extracting features from the data content. The size of the incremental package is controlled within a reasonable range through a compression algorithm.
[0142] The processing flow for status update confirmation: Receive the confirmation information returned by the device, parse the update timestamp and status code. Establish a status update log to record the detailed information of each update. Verify the consistency after the update by comparing the status data of different devices. If a failure in the update is found, start the retry mechanism, with a maximum of 3 retries.
[0143] Figure 5 This is a schematic diagram of the distributed task scheduling real-time monitoring system according to the embodiment of the present invention:
[0144] This figure shows the real-time operating status of the task scheduling system: The device status monitoring shows that there are currently 28 / 32 online devices, with an online rate of 87.5%, a system load of 78%, and 156 active tasks; The task allocation statistics show that there are 45 tasks to be allocated, 128 tasks in execution, and 1,256 completed tasks; The status synchronization monitoring reflects that the synchronization success rate reaches 99.8%, with only 5 tasks to be synchronized and 2 synchronization failure tasks; The system resource monitoring panel shows that the CPU utilization rate is 85%, the memory usage rate is 72%, and the network bandwidth utilization rate is 65%. In the instruction execution queue, the execution status of instructions such as INST_20231115_001 is detailedly recorded, tracked by information such as device identification (e.g., DEV_2023111501), instruction type (data collection - 01), etc., with the priority highlighted in red, and the execution progress is shown through a dynamic loading icon. The time record is accurate to the millisecond level (e.g., from 10:30:00.235 to 10:30:05.235), and the current progress bar shows that the execution progress reaches 75%. The terminal device status table then monitors the operating parameters of each device in real time. Taking DEV_2023111501 as an example, its CPU usage rate is 75%, memory occupancy is 60%, network bandwidth is 45%, storage usage is 50%, and it is currently undertaking 8 tasks. Each monitoring module is equipped with a progress bar and a dynamic icon, with the device online status identified by a green dot and the status synchronization completion indicated by a tick icon, forming a complete and real-time task scheduling monitoring system. The table design adopts a hover highlight effect, presenting the system operating status intuitively and clearly to the operator through a combination of icons and percentage values.
[0145] The instruction set construction adopts precise timing control and dependency analysis, achieving efficient management of complex instruction sequences. The directed graph structure visually shows the association relationships between instructions, optimizing the planning of the execution order. The dynamic timing information recording mechanism improves the accuracy and predictability of instruction execution. The multi-dimensional priority calculation method accurately reflects the importance and timeliness requirements of instructions. The dynamic adjustment ability of the grouped execution queue enhances the system's response speed to emergency tasks. The perfect execution status monitoring and feedback mechanism ensures the reliability and controllability of the instruction execution process. The incremental status synchronization scheme greatly reduces the synchronization overhead through difference detection and directed updates. The multi-dimensional expression of the status vector provides rich system status information. The complete status consistency verification mechanism and exception handling process enhance the stability and reliability of the distributed system.
[0146] In the second aspect of the embodiments of the present invention,
[0147] A kind of electronic device is provided, including:
[0148] A processor;
[0149] A memory for storing processor-executable instructions;
[0150] Wherein, the processor is configured to call the instructions stored in the memory to execute the method described above.
[0151] In a third aspect of the embodiments of the present invention,
[0152] A computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method described above is implemented.
[0153] The present invention may be a method, an apparatus, a system, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for performing various aspects of the present invention.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for scheduling interactive scenes of digital intelligent screens and platforms for multi-terminal collaboration, characterized in that: include: Receiving access requests sent by multiple terminal devices through a wireless network, the multiple terminal devices including a master terminal device and slave terminal devices; Obtain device parameter information of the multiple terminal devices, and determine the optimal task allocation strategy under different terminal device combinations based on the device parameter information, in combination with a pre-trained deep learning model and an improved Hungarian algorithm, wherein the improved Hungarian algorithm realizes task matching optimization based on alternating path construction and zero element priority calculation; Collecting real-time load data of multiple terminal devices, the real-time load data includes processor usage, memory usage, storage usage, and network bandwidth usage; based on the real-time load data, using a dynamic load balancing algorithm to perform real-time scheduling of interactive tasks between the multiple terminal devices, the dynamic load balancing algorithm dynamically adjusts the task allocation plan on the premise of ensuring the continuity of the interactive experience by calculating the comprehensive load index of the terminal device; According to the adjusted task allocation plan, corresponding interaction instructions are respectively issued to the multiple terminal devices; the interaction execution results returned by the multiple terminal devices are received, and if there are terminal devices with inconsistent states, the state of the interaction execution results is synchronized through an incremental state synchronization package; Extracting an interactive instruction set of each terminal device according to the task allocation scheme, wherein the interactive instruction set includes a device identifier, an interactive type, and execution timing information; extracting timing information of the interactive instructions in the interactive instruction set, and constructing an interactive instruction directed graph according to the timing information, wherein the nodes of the interactive instruction directed graph represent interactive instructions, and the edges represent timing dependencies between instructions; Traversing the interactive instruction directed graph to calculate the path length of each interactive instruction, extracting the delay sensitivity parameter of each interactive instruction, and performing weighted calculation on the critical path length and the delay sensitivity parameter to obtain the instruction priority; Arrange the interactive instructions in descending order according to the instruction priority, divide the arranged interactive instructions into multiple instruction groups according to the priority interval, and construct an instruction group execution queue; based on the order of the instruction group execution queue, send the interactive instructions to the corresponding terminal devices group by group; Receive the interactive execution result returned by the terminal device, and extract the state vector in the interactive execution result, wherein the state vector includes the device resource state and the task execution state; If there are terminal devices with inconsistent states, the state difference field of the terminal devices with inconsistent states and the state vector of the terminal devices with inconsistent states are encapsulated into an incremental state synchronization package, and the incremental state synchronization package is sent to all terminal devices, and the state update confirmation information returned by the terminal devices is received to verify the consistency of the updated state.
2. The method according to claim 1, characterized in that According to the device parameter information, combined with the pre-trained deep learning model and the improved Hungarian algorithm, the optimal task allocation strategy under different terminal device combinations is determined, including: The deep learning model includes a bidirectional long short-term memory network module, a self-attention mechanism module, a multi-head attention mechanism module and a fully connected layer module, wherein the bidirectional long short-term memory network module is used to extract the time series characteristics of the feature vector corresponding to the device parameter information, the self-attention mechanism module generates the associated weights by performing a dot product operation between the query matrix and the key value matrix and performing a scale transformation, the multi-head attention mechanism module performs feature fusion on the associated weights, and the fully connected layer module generates a task assignment probability distribution; Constructing a combined loss function, the combined loss function includes a weighted combination of a task allocation accuracy loss value, a performance indicator loss value, and a load balancing loss value; using the Adam optimization algorithm to train the deep learning model, and processing intermediate layer features through batch normalization operations during the training process; Calculating a capability score of the terminal device based on the deep learning model, wherein the capability score is obtained by weighted summation of device parameters and corresponding weights; A task adaptation matrix is constructed according to the capability score and the task resource requirement vector, and load balancing constraints and resource utilization efficiency constraints are introduced. The task adaptation matrix is solved by using an improved Hungarian algorithm to determine the optimal task allocation strategy under different terminal device combinations; wherein the load balancing constraint ensures the balance of task allocation among terminal devices, and the resource utilization efficiency constraint ensures the maximization of overall resource utilization.
3. The method according to claim 2, characterized in that The task adaptation matrix is constructed according to the capability score and the task resource requirement vector, and load balancing constraints and resource utilization efficiency constraints are introduced. The task adaptation matrix is solved by using the improved Hungarian algorithm to determine the optimal task allocation strategy under different terminal device combinations, including: The capability score and the corresponding dimension of the task resource requirement vector are similarly calculated, and the similarity calculation adopts the ratio of the minimum value to the maximum value of the corresponding dimension to obtain the standardized matching degree between the device and the task; the standardized matching degree is multiplied by the preset load balancing coefficient to obtain the task adaptation matrix, wherein the preset load coefficient is obtained by the ratio of the load value of a single terminal device to the load value of all terminal devices; An optimization objective function is constructed based on the task fitness matrix combined with the weight value assigned to the task fitness matrix, and load balancing constraints and resource utilization efficiency constraints are introduced to construct a constraint matrix; the optimization objective function and the constraint matrix are jointly solved using an improved Hungarian algorithm.
4. The method according to claim 3, characterized in that Using the improved Hungarian algorithm to jointly solve the optimization objective function and the constraint matrix includes: Constructing a first reduction matrix and a second reduction matrix according to the optimization objective function and the constraint matrix respectively, wherein the first reduction matrix is obtained by taking the inverse of the function value of the optimization objective function, and the second reduction matrix is obtained by transposing the constraint matrix; Identify the positions of zero elements in the first reduction matrix and the second reduction matrix respectively, count the number of zero elements in each row and the number of zero elements in each column, and calculate the priority of the zero elements, where the priority of the zero element is the sum of the number of zero elements in the row where the zero element is located and the number of zero elements in the column where the zero element is located; Mark and select zero elements based on the zero element priority, count the matching number of zero elements in each row and the matching number of zero elements in each column, and construct a matching set; count the unmatched rows without zero elements and the unmatched columns without zero elements, and construct an unmatched set; Taking the row index in the unmatched set as the starting point, constructing an alternating path based on the matched set and the unmatched set, wherein adjacent vertices in the alternating path correspond alternately to unmatched zero elements and matched zero elements, marking the positions corresponding to the unmatched zero elements on the alternating path as 1, and marking the positions corresponding to the matched zero elements as 0; Determine whether the total number of elements marked as 1 in the matching set in the alternating path is equal to the minimum number of matrix rows and columns. If not, reconstruct the matching set until the total number of elements marked as 1 is equal to the minimum number of matrix rows and columns. The position marked as 1 in the matching set is used as the corresponding relationship of the task allocation.
5. The method according to claim 1, characterized in that Based on the real-time load data, a dynamic load balancing algorithm is used to schedule the interactive tasks between the multiple terminal devices in real time. The dynamic load balancing algorithm dynamically adjusts the task allocation scheme by calculating the comprehensive load index of the terminal device while ensuring the continuity of the interactive experience, including: Calculating the fluctuation standard deviation of the real-time load data and the pre-acquired historical load data, and setting an adaptive weight vector corresponding to the real-time load data according to the fluctuation standard deviation, wherein the adaptive weight vector is determined based on the product of the fluctuation standard deviation and a preset weight reference value; Performing weighted calculation on the real-time load vector corresponding to the real-time load data and the adaptive weight vector to obtain a comprehensive load index of each terminal device; When the comprehensive load index exceeds a preset load balancing threshold, the task allocation scheme is reallocated.
6. A digital intelligent screen interactive scene scheduling system for multi-terminal collaboration, used to implement the method as described in any one of claims 1 to 5, characterized in that: include: A first unit is used to receive access requests sent by multiple terminal devices through a wireless network, wherein the multiple terminal devices include a master terminal device and a slave terminal device; Obtain device parameter information of the multiple terminal devices, and determine the optimal task allocation strategy under different terminal device combinations based on the device parameter information, in combination with a pre-trained deep learning model and an improved Hungarian algorithm, wherein the improved Hungarian algorithm realizes task matching optimization based on alternating path construction and zero element priority calculation; The second unit is used to collect real-time load data of multiple terminal devices, wherein the real-time load data includes processor usage, memory usage, storage usage, and network bandwidth usage; based on the real-time load data, a dynamic load balancing algorithm is used to perform real-time scheduling of interactive tasks between the multiple terminal devices, wherein the dynamic load balancing algorithm dynamically adjusts the task allocation scheme while ensuring the continuity of the interactive experience by calculating the comprehensive load index of the terminal device; The third unit is used to issue corresponding interaction instructions to the multiple terminal devices respectively according to the adjusted task allocation plan; receive the interaction execution results returned by the multiple terminal devices, and if there are terminal devices with inconsistent states, synchronize the state of the interaction execution results through an incremental state synchronization package.
7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Socket thread pool design method for multi-terminal wireless communication
CN116755863A
Digital office data synchronization and sharing method and system based on cloud computing
CN119248884A