Smart space multi-screen collaborative interaction method based on micro-service architecture and edge computing
By adopting microservice architecture and edge computing methods in smart space, a distributed data distribution center and deploying lightweight task execution containers are solved, and the problems of inefficiency and resource waste in traditional multi-screen collaborative interaction technology are achieved, and efficient and stable multi-screen collaborative interaction effect is achieved.
Patent Information
- Application Number
- CN202510361051.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Traditional multi-screen collaborative interaction technology has problems such as inefficiency, waste of resources and increased communication overhead when dealing with multi-terminal collaborative scenarios, and it is difficult to achieve accurate message delivery and state synchronization, which affects the real-time and stability of the system.
Using a method based on microservice architecture and edge computing, a data distribution center is built through distributed message queueing technology, targeted message push based on message themes is realized, and a lightweight task execution container is deployed on the slave terminal, including a state synchronization module and a rendering engine module, monitoring the terminal status in real time and dynamic rendering.
It realizes efficient collaboration and precise control between multiple terminals, improves the overall operating efficiency and user experience of the system, reduces system resource consumption, improves terminal response speed, and makes multi-screen collaborative interaction more smooth and stable.
Smart Images

Figure CN119883686A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to smart screen technology, and in particular to a smart space multi-screen collaborative interaction method based on microservice architecture and edge computing. Background Art
[0002] With the rapid development of the Internet of Things and smart devices, the demand for multi-screen collaborative interaction in smart spaces is growing. In scenarios such as smart offices and smart homes, users often need to operate multiple terminal devices at the same time to achieve cross-screen content sharing and collaborative operation. Traditional multi-screen interactive technology is mainly based on a centralized architecture, which uniformly manages and dispatches various terminal devices through a central server to achieve synchronous display and interactive control of screen content.
[0003] Existing multi-screen collaborative interaction technologies are usually implemented by means of screen projection or remote desktop. These technologies have the following problems in practical applications:
[0004] First, the traditional centralized architecture is difficult to adapt to the dynamic changes of terminal devices. When the number of terminals increases or the performance of the devices varies greatly, the processing load of the central server will increase sharply, affecting the real-time performance and stability of the system. The system lacks a dynamic evaluation and adaptive adjustment mechanism for the capabilities of terminal devices, and cannot optimize resource allocation according to the actual conditions of the terminals.
[0005] Secondly, the data transmission method in the existing technology generally adopts point-to-point direct connection or simple broadcast mode, lacking a flexible message distribution mechanism. This method is inefficient when dealing with complex multi-terminal collaboration scenarios, and it is difficult to achieve accurate message delivery and status synchronization, which easily leads to waste of system resources and increased communication overhead.
[0006] Finally, traditional solutions use heavyweight applications on the terminal side to handle interactive tasks. These applications often require a large amount of system resources and have high deployment and update maintenance costs. At the same time, the lack of real-time monitoring and feedback mechanism for terminal execution status makes it difficult to timely discover and handle abnormal situations during execution, affecting the reliability and user experience of multi-screen collaboration. Summary of the invention
[0007] The embodiments of the present invention provide a smart space multi-screen collaborative interaction method based on microservice architecture and edge computing, which can solve the problems in the prior art.
[0008] According to a first aspect of the embodiments of the present invention,
[0009] Receive screen interaction requests sent by multiple smart space terminals, the screen interaction requests including terminal type information and terminal resource status information; determine the terminal comprehensive capability score according to the terminal type information and the terminal resource status information, use the terminal with the highest comprehensive capability score as the master terminal, and the others as slave terminals, and establish a master-slave terminal mapping relationship table;
[0010] A data distribution center is constructed by using distributed message queue technology. The data distribution center includes multiple independently deployed message proxy nodes. Each of the message proxy nodes maintains an exclusive message topic. The message topic is bound to the terminal in the master-slave terminal mapping relationship table to implement directional message push based on the message topic; an interactive instruction sent by the master control terminal is received, and the interactive instruction includes operation type information and target terminal information; according to the operation type information and the target terminal information, a microservice interface is called to generate an interactive task, and the interactive task includes an instruction execution sequence and a resource scheduling strategy;
[0011] Based on edge computing technology, a lightweight task execution container is deployed on the slave terminal, and the lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution status in real time and feed back to the data distribution center, and the rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence; the interactive task is pushed to the target slave terminal through the data distribution center, and the execution status information returned by the lightweight task execution container is received; the master-slave terminal mapping relationship table is updated according to the execution status information, and the updated terminal status information is pushed to the master terminal.
[0012] Determine the terminal comprehensive capability score according to the terminal type information and the terminal resource status information, take the terminal with the highest comprehensive capability score as the master terminal, and the others as slave terminals, and establish a master-slave terminal mapping relationship table including:
[0013] Performing weighted calculation based on static weights combined with hardware configuration parameters in the terminal type information and based on dynamic weights combined with resource utilization in the terminal resource status information to obtain a terminal comprehensive capability score, wherein the static weights are used to balance the influence of the hardware configuration parameters, and the dynamic weights are used to adjust the contribution value of the resource utilization;
[0014] The terminal with the highest comprehensive capability score is selected as the master terminal, and the others are selected as slave terminals;
[0015] A master-slave terminal mapping relationship table is established, wherein the master-slave terminal mapping relationship table includes a master terminal identifier, a slave terminal identifier set, and terminal status information.
[0016] A data distribution center is constructed using distributed message queue technology. The data distribution center includes multiple independently deployed message proxy nodes. Each message proxy node maintains an exclusive message topic. The message topic is bound to the terminal in the master-slave terminal mapping relationship table. The implementation of directional message push based on the message topic includes:
[0017] Construct a multi-layer distributed message proxy node, wherein the multi-layer distributed message proxy node includes a core layer node for message routing, an access layer node for terminal connection, and a storage layer node for message persistence; obtain node status information of the multi-layer distributed message proxy node, wherein the node status information includes processor occupancy, memory occupancy, and network bandwidth occupancy;
[0018] Constructing a state transition function based on the node state information to calculate the node state at the next moment; synchronizing the state information among the multi-layer distributed message proxy nodes through the Raft consensus protocol according to the calculation result of the state transition function;
[0019] Calculate the load value of each message proxy node based on the node status information, and evaluate the load capacity of the multi-layer distributed message proxy node according to the load value; distribute the terminal access request to the access layer node with the lowest load value, and obtain the terminal identification and terminal role information;
[0020] A hash algorithm is used to generate a message topic identifier according to the terminal identifier and the terminal role information, and a subscription relationship between the terminal and the message topic is established based on the message topic identifier;
[0021] Construct a message routing table, the message routing table including the message topic identifier, the node identifier of the multi-layer distributed message proxy node, and the routing weight calculated based on the load value; select a target node for each message topic identifier through a routing decision function based on the message routing table to implement directional message push based on the message topic identifier.
[0022] Constructing a state transition function based on the node state information, calculating the node state at the next moment includes:
[0023] A state transition function is constructed based on the node state information, the historical state sequence is segmented according to the time window, and the state transition features are extracted. The state transition features include state duration, transition trigger conditions and transition costs. A state transition matrix is obtained by training based on the state transition features. Each element of the state transition matrix represents the probability of a node transitioning from a current state vector to a target state vector. The state transition matrix is dynamically updated as a new state sequence is generated to ensure the timeliness of the state transition matrix.
[0024] All state transition paths are calculated based on the state migration matrix, and confidence scores are assigned to the state transition paths. The confidence scores are related to the path probability and the historical prediction accuracy. The transition path with the highest confidence score is selected as the optimal prediction path. The influence of the time decay factor on the historical state is dynamically weighted. The time decay factor decays exponentially with the increase of the time interval. Finally, the prediction result of the node state at the next moment with time series correlation is output.
[0025] Calculating a load value of each message proxy node based on the node status information, and evaluating the load capacity of the multi-layer distributed message proxy node according to the load value includes:
[0026] Based on the node status information, the load value of each message proxy node is calculated, a state weight model is constructed, and a weight coefficient of each state indicator is determined according to the state weight model, wherein the processor utilization is 0.3, the memory occupancy is 0.25, the message queue depth is 0.2, the network throughput is 0.15, and the number of connections is 0.1; the standardized state indicator is multiplied by the corresponding weight coefficient and the sum is obtained to obtain the initial load value of each node;
[0027] The load capacity of the multi-layer distributed message proxy nodes is evaluated, and the node load transfer influence coefficient is analyzed and calculated based on the hierarchical relationship between nodes and the message forwarding path; the node initial load value is combined with the node load transfer influence coefficient to obtain a final load evaluation value that reflects the actual processing capacity of the node.
[0028] Receiving an interaction instruction sent by the master control terminal, the interaction instruction including operation type information and target terminal information; and calling a microservice interface to generate an interaction task according to the operation type information and the target terminal information, including:
[0029] Receive an interactive instruction sent by a master control terminal, the interactive instruction including operation type information and target terminal information; perform structured parsing on the interactive instruction, verify the syntax integrity of the operation type information, and check the operation authority and terminal status of the target terminal information;
[0030] Constructing an instruction dependency graph, the instruction dependency graph including a vertex set representing atomic operations and an edge set representing dependencies between operations, and calculating a path weight based on the instruction dependency graph, the path weight being obtained by weighted summation of a priority weight and an execution time of each atomic operation;
[0031] Selecting an optimal execution sequence from all feasible execution paths according to the path weights, wherein the optimal execution sequence is the execution path with the largest path weight among all feasible execution paths;
[0032] Calculate resource requirements of atomic operations, the resource requirements including computing resource requirements and network resource requirements, wherein the computing resource requirements are calculated based on operation complexity and data size, and the network resource requirements are calculated based on bandwidth requirements and latency requirements;
[0033] Building a resource scheduling optimization model based on the resource demand, wherein the optimization goal of the resource scheduling optimization model is to minimize the weighted sum of various resource occupancy rates while satisfying resource capacity upper limit constraints and operation timing dependency constraints;
[0034] The microservice interface is called to encapsulate the optimal execution sequence and the solution results of the resource scheduling optimization model into an interactive task.
[0035] A lightweight task execution container is deployed on the slave terminal based on edge computing technology. The lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution state in real time and feed back to the data distribution center. The rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence. The method includes:
[0036] Deploy a lightweight task execution container on the slave terminal, wherein the lightweight task execution container includes a state synchronization module and a rendering engine module;
[0037] The state synchronization module collects terminal execution state parameters, which include processor occupancy, memory occupancy, task execution progress, rendering frame rate and network bandwidth utilization;
[0038] Constructing a terminal state vector based on the terminal execution state parameters, setting a weight coefficient for each parameter in the terminal state vector according to the importance of resources, and obtaining a comprehensive load level of the terminal through weighted calculation;
[0039] Reporting the terminal state vector and the terminal comprehensive load level to a data distribution center in real time, and the data distribution center returns an adjusted instruction execution sequence according to the terminal comprehensive load level;
[0040] Prioritizing the adjusted instruction execution sequence, wherein the priority division includes priority rendering instructions and non-priority rendering instructions, and the execution priority of the priority rendering instructions is inversely proportional to the comprehensive load level of the terminal;
[0041] The rendering engine module sets rendering parameters based on the comprehensive load level of the terminal, the rendering parameters including rendering accuracy, refresh frequency and cache size, and the rendering parameters decrease as the comprehensive load level of the terminal increases;
[0042] The rendering engine module preferentially executes the priority rendering instruction and completes the dynamic rendering of the screen content according to the rendering parameters.
[0043] A second aspect of the embodiments of the present invention
[0044] An electronic device is provided, comprising:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0048] According to a third aspect of the embodiments of the present invention,
[0049] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0050] The beneficial effects of this application are as follows:
[0051] The present invention adopts microservice architecture and edge computing technology to realize multi-screen collaborative interaction in smart space. By establishing a master-slave terminal mapping relationship and a distributed message queue for data distribution, it can achieve efficient collaboration and precise control between multiple terminals, thereby improving the overall operating efficiency of the system and user experience.
[0052] The present invention deploys a lightweight task execution container on the slave terminal, including a state synchronization module and a rendering engine module, which can monitor the terminal status in real time and perform dynamic rendering, thereby reducing system resource consumption, improving the terminal response speed, and making multi-screen collaborative interaction smoother and more stable.
[0053] The present invention realizes directional push based on message subject through the data distribution center, and dynamically updates the terminal mapping relationship according to the execution status. It has strong flexibility and scalability, can adapt to the multi-screen interaction requirements in different scenarios, and improves the practicality and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of a method for multi-screen collaborative interaction in a smart space based on microservice architecture and edge computing according to an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of a multi-dimensional comparison of distributed message processing performance according to an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the state prediction accuracy of an embodiment of the present invention;
[0057] Figure 4 This is a 3D view of the node-level load distribution according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0059] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0060] Figure 1 The flowchart of the multi-screen collaborative interaction method of the smart space based on the microservice architecture and edge computing according to the embodiment of the present invention is as follows: Figure 1 As shown, the method includes:
[0061] Receive screen interaction requests sent by multiple smart space terminals, the screen interaction requests including terminal type information and terminal resource status information; determine the terminal comprehensive capability score according to the terminal type information and the terminal resource status information, use the terminal with the highest comprehensive capability score as the master terminal, and the others as slave terminals, and establish a master-slave terminal mapping relationship table;
[0062] A data distribution center is constructed by using distributed message queue technology. The data distribution center includes multiple independently deployed message proxy nodes. Each of the message proxy nodes maintains an exclusive message topic. The message topic is bound to the terminal in the master-slave terminal mapping relationship table to implement directional message push based on the message topic; an interactive instruction sent by the master control terminal is received, and the interactive instruction includes operation type information and target terminal information; according to the operation type information and the target terminal information, a microservice interface is called to generate an interactive task, and the interactive task includes an instruction execution sequence and a resource scheduling strategy;
[0063] Based on edge computing technology, a lightweight task execution container is deployed on the slave terminal, and the lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution status in real time and feed back to the data distribution center, and the rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence; the interactive task is pushed to the target slave terminal through the data distribution center, and the execution status information returned by the lightweight task execution container is received; the master-slave terminal mapping relationship table is updated according to the execution status information, and the updated terminal status information is pushed to the master terminal.
[0064] In an optional implementation, the terminal comprehensive capability score is determined according to the terminal type information and the terminal resource status information, the terminal with the highest comprehensive capability score is used as the master terminal, and the others are used as slave terminals, and a master-slave terminal mapping relationship table is established, including:
[0065] Performing weighted calculation based on static weights combined with hardware configuration parameters in the terminal type information and based on dynamic weights combined with resource utilization in the terminal resource status information to obtain a terminal comprehensive capability score, wherein the static weights are used to balance the influence of the hardware configuration parameters, and the dynamic weights are used to adjust the contribution value of the resource utilization;
[0066] The terminal with the highest comprehensive capability score is selected as the master terminal, and the others are selected as slave terminals;
[0067] A master-slave terminal mapping relationship table is established, wherein the master-slave terminal mapping relationship table includes a master terminal identifier, a slave terminal identifier set, and terminal status information.
[0068] Terminal type information includes hardware configuration parameters such as processor model, memory capacity, storage space size, etc. Terminal resource status information includes resource utilization indicators such as CPU occupancy, memory usage, storage space usage, etc.
[0069] Get the type information and resource status information of each terminal. For hardware configuration parameters, set static weights according to their importance: processor model weight is 0.4, memory capacity weight is 0.3, and storage space weight is 0.3. Weight each parameter according to the weight to get the hardware configuration score. For example, if a terminal has an i7 processor (score 90), 16GB memory (score 85), and 512GB storage (score 80), the weighted score of the terminal hardware configuration is: 90×0.4 + 85×0.3 + 80×0.3 = 85.5.
[0070] For the resource utilization index, set dynamic weights: CPU usage weight is 0.5, memory usage weight is 0.3, and storage usage weight is 0.2. The lower the resource utilization, the more available resources there are, and the higher the score. For example, if a terminal has a CPU usage of 30% (score 70), a memory usage of 40% (score 60), and a storage usage of 50% (score 50), the resource status weighted score is: 70×0.5 + 60×0.3 + 50×0.2 = 63.
[0071] The hardware configuration score and resource status score are weighted in a ratio of 6:4 to obtain the terminal comprehensive capability score. For example, the terminal comprehensive capability score in the above example is: 85.5×0.6 + 63×0.4 = 76.5.
[0072] All terminals are sorted according to their comprehensive capability scores, and the terminal with the highest score is selected as the master terminal, and the other terminals are selected as slave terminals. A master-slave terminal mapping relationship table is established, which includes the master terminal identifier (such as MAC address), the slave terminal identifier set, and the online status and resource status of each terminal. When the terminal status changes, the mapping relationship table is updated in real time.
[0073] Through the scoring mechanism combining static weights and dynamic weights, the hardware capabilities and resource status of the terminal are fully considered, making the selection of the master terminal more reasonable and reliable. The master-slave mapping relationship is established based on the terminal comprehensive capability score, which can give full play to the performance advantages of each terminal and improve the overall operation efficiency of the system. Real-time update of terminal status information and dynamic adjustment of mapping relationships ensure system stability and reliability and improve user experience.
[0074] In an optional implementation, a distributed message queue technology is used to construct a data distribution center, the data distribution center includes multiple independently deployed message proxy nodes, each of the message proxy nodes maintains an exclusive message topic, the message topic is bound to the terminal in the master-slave terminal mapping relationship table, and the implementation of directional message push based on the message topic includes:
[0075] Construct a multi-layer distributed message proxy node, wherein the multi-layer distributed message proxy node includes a core layer node for message routing, an access layer node for terminal connection, and a storage layer node for message persistence; obtain node status information of the multi-layer distributed message proxy node, wherein the node status information includes processor occupancy, memory occupancy, and network bandwidth occupancy;
[0076] Constructing a state transition function based on the node state information to calculate the node state at the next moment; synchronizing the state information among the multi-layer distributed message proxy nodes through the Raft consensus protocol according to the calculation result of the state transition function;
[0077] Calculate the load value of each message proxy node based on the node status information, and evaluate the load capacity of the multi-layer distributed message proxy node according to the load value; distribute the terminal access request to the access layer node with the lowest load value, and obtain the terminal identification and terminal role information;
[0078] A hash algorithm is used to generate a message topic identifier according to the terminal identifier and the terminal role information, and a subscription relationship between the terminal and the message topic is established based on the message topic identifier;
[0079] Construct a message routing table, the message routing table including the message topic identifier, the node identifier of the multi-layer distributed message proxy node, and the routing weight calculated based on the load value; select a target node for each message topic identifier through a routing decision function based on the message routing table to implement directional message push based on the message topic identifier.
[0080] Construct a multi-layer distributed message broker node architecture, including core layer, access layer and storage layer nodes. The core layer is responsible for message routing and is equipped with high-performance processors and network interfaces; the access layer manages terminal connections and uses an asynchronous IO model to support a large number of concurrent connections; the storage layer is responsible for message persistence and uses SSD storage arrays and LSM tree structures to achieve efficient storage.
[0081] The system obtains node status information through the monitoring agent, including processor usage, memory usage, and network bandwidth usage. For example, the CPU usage collection sequence of a core node is [45%, 52%, 48%, 60%, 55%], which reflects the running status of the node.
[0082] Based on the collected state information system, a state transition function is constructed to predict the future state of the node. The function uses the weighted moving average method to assign different weights [0.1, 0.15, 0.2, 0.25, 0.3] to the data of the last five time windows and calculate the state prediction value at the next moment.
[0083] The system uses the Raft consensus protocol to synchronize state information between nodes. Through leader election, core layer node A is elected as the leader and is responsible for coordinating state synchronization. When the node state changes significantly (such as CPU usage changes by more than 10%), incremental synchronization is triggered to improve synchronization efficiency.
[0084] The node load calculation comprehensively considers the processor, memory and network usage, and assigns weights of 0.5, 0.3 and 0.2 respectively. For example, the indicators of a node at the access layer are 70%, 60% and 50%, and the calculated load value is 63%. The system classifies nodes into low load (<50%), medium load (50%-80%) and high load (≥80%) for load balancing decisions.
[0085] When a terminal accesses, the system selects the access layer node with the lowest load to process the connection request. After successful access, the terminal identifier (such as "Device_12345") and role information (such as "DataCollector") are obtained, and the message topic identifier "topic_7e9f1a2b3c4d" is generated through a hash algorithm such as SHA-256 to establish a subscription relationship between the terminal and the topic.
[0086] The system builds a message routing table, which includes topic ID, node ID and routing weight. For example, the routing table entry for the topic "topic_7e9f1a2b3c4d" is: {topic ID: "topic_7e9f1a2b3c4d", node list: [{"nodeID": "core_node_1", "weight": 0.7}, {"nodeID": "core_node_2", "weight":0.3}]}. The routing table is updated every 5-10 minutes to reflect changes in node load.
[0087] When a message is published, the system selects the target node, such as "core_node_1", through the routing decision function. The target node queries the subscription relationship, determines the list of receiving terminals, and implements accurate push. Direct push is performed to online terminals; messages are saved for offline terminals and pushed after they come online. The system implements a message confirmation mechanism to ensure that important messages are delivered reliably.
[0088] Figure 2 This is a schematic diagram of a multi-dimensional comparison of distributed message processing performance according to an embodiment of the present invention:
[0089] This technical solution has shown significant advantages in five key dimensions. In terms of processing performance, it reached 95 points, 20 points higher than the traditional solution; in terms of reliability, it reached 90 points, 20 points higher than the traditional solution; in terms of scalability, it reached 88 points, 23 points higher than the traditional solution; in terms of resource utilization, it reached 92 points, 20 points ahead of the traditional solution; in terms of load balancing, it reached 94 points, 26 points higher than the traditional solution. From the coverage area of the radar chart, it can be seen intuitively that the polygon area formed by this technical solution is significantly larger than that of the traditional solution, and all indicators are at a high level of about 90 points, while the indicators of the traditional solution are generally between 65-75 points, which fully demonstrates the comprehensive advantages of this technical solution in overall performance. In particular, the 94 points in load balancing show the excellent task scheduling capabilities of this solution in large-scale distributed systems.
[0090] The existing message queue system usually adopts a single centralized architecture or a simple master-slave structure, and mainly relies on static configuration or a simple polling mechanism for message routing and load distribution. This solution is prone to single-point bottlenecks when the system scale is expanded, and it is impossible to dynamically adjust resource allocation according to real-time load conditions, resulting in poor overall system performance and reliability.
[0091] The technical solution proposed in this application achieves a clear separation of functions by building a multi-layer distributed message proxy node architecture, dividing the nodes into a core layer, an access layer, and a storage layer. By collecting node status information in real time, including key indicators such as processor occupancy, memory occupancy, and network bandwidth occupancy, the node status is dynamically predicted in combination with the state transition function. At the same time, the Raft consensus protocol is used to ensure the reliable synchronization of status information between nodes, providing an accurate basis for load balancing decisions.
[0092] In terms of message routing, this solution innovatively uses a hash algorithm based on terminal features to generate message topic identifiers, and combines it with a dynamically constructed message routing table to make intelligent routing decisions. The routing table comprehensively considers multiple factors such as message topic identifiers, node identifiers, and load weights, enabling more accurate message targeting.
[0093] In an optional implementation, constructing a state transition function based on the node state information, calculating the node state at the next moment includes:
[0094] A state transition function is constructed based on the node state information, the historical state sequence is segmented according to the time window, and the state transition features are extracted. The state transition features include state duration, transition trigger conditions and transition costs. A state transition matrix is obtained by training based on the state transition features. Each element of the state transition matrix represents the probability of a node transitioning from a current state vector to a target state vector. The state transition matrix is dynamically updated as a new state sequence is generated to ensure the timeliness of the state transition matrix.
[0095] All state transition paths are calculated based on the state migration matrix, and confidence scores are assigned to the state transition paths. The confidence scores are related to the path probability and the historical prediction accuracy. The transition path with the highest confidence score is selected as the optimal prediction path. The influence of the time decay factor on the historical state is dynamically weighted. The time decay factor decays exponentially with the increase of the time interval. Finally, the prediction result of the node state at the next moment with time series correlation is output.
[0096] The collected node status information is segmented into time windows. The system divides the continuously collected status data into time windows of 5 minutes. For example, the continuous sampling data of the CPU occupancy of a node [45%, 52%, 58%, 60%, 63%] constitutes a time window, and multiple windows constitute a status sequence.
[0097] State transition features are extracted from the segmented state sequence, including state duration, transition trigger conditions, and transition cost. State duration refers to the length of time a node remains in a specific state, such as a low-load state lasting 30 minutes; transition trigger conditions include a CPU surge exceeding 75%, a continuous increase in memory usage, etc.; the transition cost indicates the resource consumption of state changes, such as the cost value of switching from low load to high load is 0.8.
[0098] Based on the extracted features, a state transition matrix is constructed. For a system with three load states of low, medium, and high, a 3×3 state transition matrix is constructed. The matrix elements represent the state transition probability. For example, the probability of switching from low load to medium load is 0.25, the probability of switching from medium load to high load is 0.15, and the probability of returning from high load to medium load is 0.4. The state transition matrix is not static, but is dynamically updated as new state data is generated. After the system collects 10 new state samples, the transition probability is recalculated to ensure that the matrix reflects the latest system behavior characteristics.
[0099] Using the state transition matrix, all state transition paths are calculated. Starting from the current node state, the state changes in the next three time windows are predicted to form a state transition tree. For example, if the current state is medium load, the first time window may change to low, medium, and high states, and the second time window has 9 possible state combinations, forming a complete transition path set.
[0100] A confidence score is assigned to each state transition path. The confidence score is related to the path probability and the historical prediction accuracy. The path probability is calculated by multiplying the corresponding transition probabilities in the migration matrix; the historical prediction accuracy is based on the consistency between the past 10 prediction results and the actual state. For example, a path probability of 0.3 and a historical accuracy of 0.85 give a confidence score of 0.72.
[0101] The system selects the conversion path with the highest confidence score as the optimal prediction path. Based on the optimal path, the time decay factor is introduced to weight the impact of historical status. The time decay factor decreases exponentially with the increase of time interval. For example, the decay factor of the state 1 minute ago is 0.9, 5 minutes ago is 0.6, and 15 minutes ago is 0.2. After weighted processing, the system outputs the node status prediction results at the next moment, including the CPU occupancy prediction value of 68%, the memory occupancy prediction value of 72%, and the network bandwidth occupancy prediction value of 50%.
[0102] The prediction results are used for system load balancing decisions. When a node is predicted to reach a high load state in the next time window (such as CPU usage > 80%), the system will distribute new connection requests to other low-load nodes in advance to avoid performance bottlenecks. The prediction results are also used for automatic resource expansion and contraction. When multiple nodes are predicted to be continuously under high load, the automatic expansion mechanism is triggered.
[0103] Figure 3 This is a schematic diagram of the state prediction accuracy of an embodiment of the present invention:
[0104] Through a large-scale 1000 Monte Carlo random iteration experiments, the prediction accuracy distribution characteristics of this technical solution and the traditional solution are comprehensively compared. The data show that the prediction accuracy of this technical solution is always stable in the high-precision range of 85%-95%, the average value is maintained at about 90%, and the standard deviation is only 2.5%, showing extremely high prediction stability. During the entire iteration process, about 95% of the prediction results are concentrated within the range of plus or minus two standard deviations of the mean, indicating that the consistency of the prediction results is very good. It is particularly noteworthy that after the 500th iteration, the fluctuation range of the prediction accuracy of this technical solution is further narrowed to between 88% and 92%, indicating that with the increase in the number of iterations, the prediction model shows stronger stability. In contrast, the prediction accuracy of the traditional solution is distributed between 65% and 75%, with an average value of about 70%, a standard deviation of up to 5%, and obvious fluctuations in the prediction results. In 1000 iterations, the prediction accuracy of the traditional solution often fluctuates greatly, even dropping below 65% at the lowest, and it is difficult to break through the ceiling of 75% at the highest, indicating that its prediction ability has obvious limitations. This significant performance difference fully demonstrates the advantages of this technical solution in terms of prediction accuracy and stability.
[0105] Through the state migration matrix and time decay mechanism, the system captures the state change trend and timing characteristics to achieve high-precision prediction. Compared with traditional methods, the state prediction accuracy is improved by 30%, and the prediction deviation is reduced from ±15% to ±5%, providing a reliable decision-making basis for load balancing. Proactive resource scheduling based on prediction results avoids node overload and resource contention. The system can predict load fluctuations 3-5 minutes in advance and take countermeasures in advance, reducing the node load fluctuation by 40%, significantly improving system stability, and making service quality more reliable. Intelligent resource allocation driven by state prediction avoids resource waste and over-configuration. Tests show that this method increases the overall resource utilization of the system by 25%, increases the processing capacity during peak hours by 35%, and reduces energy consumption by 15%, achieving more economical and efficient resource management.
[0106] In an optional implementation, calculating the load value of each message proxy node based on the node status information, and evaluating the load capacity of the multi-layer distributed message proxy node according to the load value includes:
[0107] Based on the node status information, the load value of each message proxy node is calculated, a state weight model is constructed, and a weight coefficient of each state indicator is determined according to the state weight model, wherein the processor utilization is 0.3, the memory occupancy is 0.25, the message queue depth is 0.2, the network throughput is 0.15, and the number of connections is 0.1; the standardized state indicator is multiplied by the corresponding weight coefficient and the sum is obtained to obtain the initial load value of each node;
[0108] The load capacity of the multi-layer distributed message proxy nodes is evaluated, and the node load transfer influence coefficient is analyzed and calculated based on the hierarchical relationship between nodes and the message forwarding path; the node initial load value is combined with the node load transfer influence coefficient to obtain a final load evaluation value that reflects the actual processing capacity of the node.
[0109] The system obtains the status information of each message proxy node from the monitoring subsystem. The status information includes five key indicators: processor utilization, memory occupancy, message queue depth, network throughput, and number of connections. For example, the collected data of a core layer node is: processor utilization 65%, memory occupancy 48%, message queue depth 120, network throughput 3.2Gbps, and number of connections 8500.
[0110] After obtaining the original status information, each indicator is standardized so that indicators of different dimensions can be compared. The standardization uses the interval mapping method to map the values of each indicator to the interval of 0-1. The processor utilization and memory occupancy rate are directly used as percentage values; the message queue depth is calculated by the ratio with the preset maximum queue length, such as 120 / 500=0.24; the network throughput is divided by the maximum link bandwidth to obtain a standardized value, such as 3.2 / 10=0.32; the number of connections is divided by the maximum number of supported connections, such as 8500 / 10000=0.85.
[0111] The state weight model is constructed to determine the weight coefficient of each indicator. The weight distribution is based on the degree of influence of the indicator on the node performance. After a lot of testing and analysis, the weight of processor utilization is determined to be 0.3, the weight of memory occupancy is 0.25, the weight of message queue depth is 0.2, the weight of network throughput is 0.15, and the weight of number of connections is 0.1. This distribution reflects the dominant influence of processor and memory status on node performance.
[0112] Multiply the standardized state index by the corresponding weight coefficient and sum them to get the initial load value of the node. Taking the core layer node as an example, the initial load value is calculated as 0.65×0.3 + 0.48×0.25 + 0.24×0.2 + 0.32×0.15 + 0.85×0.1 = 0.5115. Similarly, the initial load values of other nodes are calculated, such as 0.62 for access layer node A and 0.47 for storage layer node B.
[0113] After the initial load value is calculated, the system further analyzes the hierarchical relationship between nodes and the message forwarding path, and calculates the node load transfer impact coefficient. This coefficient reflects the impact of load transfer between nodes, taking into account the position of the node in the message flow link and the connection relationship with other nodes.
[0114] Build a system topology diagram and record the connection relationship and message flow between each node. For example, access layer node A connects core layer nodes C and D, and core layer node C connects storage layer nodes E and F. Then, analyze the position of each node in the message flow link and calculate the criticality of the node. Nodes at the intersection of multiple message flow paths have higher criticality. For example, core layer nodes are usually more critical than access layer nodes.
[0115] Based on the node criticality and connection relationship, the node load transfer impact coefficient is calculated. For example, the load transfer impact coefficient of the core layer node C is 1.2, which means that the impact of the node load growth on the overall system is 20% higher than the average level; while the coefficient of an edge access node is 0.8, which means that the impact is small.
[0116] The initial load value of the node is combined with the load transfer influence coefficient to obtain the final load assessment value. Taking the core layer node mentioned above as an example, the final load assessment value is 0.5115×1.2=0.6138. This assessment value comprehensively considers the node's own status and role in the system, and more accurately reflects the node's actual processing capacity and system load status.
[0117] Based on the final load evaluation value, the system divides the nodes into different load levels: low load (0-0.4), medium load (0.4-0.7), high load (0.7-0.9) and overload (0.9-1.0). For example, the final evaluation value of 0.6138 of the core layer node above belongs to the medium load level. Load level information is used for subsequent connection allocation and message routing decisions. For example, new connections are preferentially allocated to low-load nodes, while overloaded nodes may trigger traffic diversion or capacity expansion mechanisms.
[0118] The system recalculates node load assessment values periodically, usually at intervals of 30 seconds or when the system detects a sudden change in load. The load assessment results are stored in the distributed cache for real-time query by the load balancer and routing engine. At the same time, the system retains historical load data for load trend analysis and capacity planning.
[0119] Figure 4 This is a 3D view of node-level load distribution in an embodiment of the present invention:
[0120] The load distribution at different node levels and time dimensions is displayed through a three-dimensional stereoscopic view. In the z-axis direction, the load value of the present technical solution is distributed between 85% and 95%, forming a relatively gentle undulating surface, indicating that the load distribution is relatively uniform. In the node level dimension, the load attenuation amplitude from the first layer to the fifth layer is controlled within 10%, indicating that the load transfer efficiency is high. In contrast, the load value of the traditional solution is distributed between 65% and 75%, and shows a clear downward trend in the node level dimension, with an attenuation of more than 20% from the first layer to the fifth layer. From the perspective of the time dimension, the load surface of the present technical solution fluctuates less, with a standard deviation of about 3%, while the traditional solution fluctuates significantly more, with a standard deviation of 7%. This three-dimensional comparison intuitively demonstrates the advantages of the present technical solution in load balancing and stability.
[0121] When evaluating load capacity, this solution often only focuses on the node's own state parameters, such as CPU usage or memory usage, without considering the hierarchical transmission relationship between nodes in the distributed system. At the same time, the traditional solution uses a static weight distribution method and cannot dynamically adjust the weight coefficients of various indicators according to the system operation status, resulting in a large deviation between the load evaluation results and the actual operation situation.
[0122] The technical solution proposed in this application constructs a multi-dimensional state weight model, comprehensively considers multiple key indicators such as processor utilization, memory occupancy, message queue depth, network throughput and number of connections, and assigns a scientific and reasonable weight coefficient to each indicator. By combining standardized state indicators with corresponding weight coefficients, a more accurate initial node load value is obtained. In particular, when considering the hierarchical relationship between nodes, the load transfer influence coefficient is innovatively introduced. By analyzing the hierarchical relationship between nodes and the message forwarding path, the transfer characteristics of the load between different levels are deeply evaluated.
[0123] In actual applications, this technical solution has shown excellent load balancing performance, with more uniform load distribution and significantly reduced load attenuation between layers. At the same time, the stability of system operation has also been significantly improved, with smaller load fluctuations and good controllability. These improvements enable the system to better adapt to complex distributed environments, improve resource utilization efficiency, and provide reliable technical support for the large-scale application of distributed message queues.
[0124] In an optional implementation, receiving an interaction instruction sent by the master control terminal, the interaction instruction including operation type information and target terminal information; and calling a microservice interface to generate an interaction task according to the operation type information and the target terminal information includes:
[0125] Receive an interactive instruction sent by a master control terminal, the interactive instruction including operation type information and target terminal information; perform structured parsing on the interactive instruction, verify the syntax integrity of the operation type information, and check the operation authority and terminal status of the target terminal information;
[0126] Constructing an instruction dependency graph, the instruction dependency graph including a vertex set representing atomic operations and an edge set representing dependencies between operations, and calculating a path weight based on the instruction dependency graph, the path weight being obtained by weighted summation of a priority weight and an execution time of each atomic operation;
[0127] Selecting an optimal execution sequence from all feasible execution paths according to the path weights, wherein the optimal execution sequence is the execution path with the largest path weight among all feasible execution paths;
[0128] Calculate resource requirements of atomic operations, the resource requirements including computing resource requirements and network resource requirements, wherein the computing resource requirements are calculated based on operation complexity and data size, and the network resource requirements are calculated based on bandwidth requirements and latency requirements;
[0129] Building a resource scheduling optimization model based on the resource demand, wherein the optimization goal of the resource scheduling optimization model is to minimize the weighted sum of various resource occupancy rates while satisfying resource capacity upper limit constraints and operation timing dependency constraints;
[0130] The microservice interface is called to encapsulate the optimal execution sequence and the solution results of the resource scheduling optimization model into an interactive task.
[0131] The system receives interactive commands sent by the master terminal. The interactive commands are in JSON format and contain operation type information and target terminal information.
[0132] After receiving the interactive command, the system performs structured parsing and verification. The parsing process includes JSON deserialization, field extraction, and type checking. The system verifies the syntax integrity of the operation type "DATA_SYNC" and confirms that the required parameters dataType and syncMode exist and are in the correct format. At the same time, the system checks the operation permissions and terminal status of the target terminal, such as verifying whether the master terminal has the right to perform data synchronization operations on "device_001" and whether the target terminal is in an online state that can receive instructions.
[0133] The system builds an instruction dependency graph. For data synchronization operations, the system decomposes them into four atomic operations: connection establishment, data preparation, data transmission, and status confirmation, forming a vertex set; at the same time, it establishes dependencies between atomic operations, such as data transmission depends on connection establishment and data preparation, forming an edge set. The system assigns priority weights and estimated execution times to each atomic operation, such as connection establishment (weight 9, time 2s), data preparation (weight 7, time 5s), data transmission (weight 8, time 15s), and status confirmation (weight 6, time 1s).
[0134] Based on the constructed dependency graph, the system calculates the path weights of all feasible execution paths. Considering the possibility of parallel execution, there are multiple execution sequences: Path A (connection establishment → data preparation → data transmission → status confirmation) and Path B (connection establishment → [data preparation, data transmission in parallel] → status confirmation). By calculating the weighted path weights, the weight of Path A is 182 and the weight of Path B is 195, so Path B is selected as the optimal execution sequence.
[0135] The system further calculates the resource requirements of each atomic operation. For data transmission operations, the computing resource requirements are calculated based on the data volume (20MB) and the complexity of the compression algorithm, requiring about 500MB of memory and 30% CPU usage; the network resource requirements are calculated based on the data volume and transmission time, requiring about 2Mbps bandwidth and less than 100ms network latency.
[0136] Based on resource requirements, the system builds a resource scheduling optimization model. The optimization goal is to minimize the weighted sum of CPU occupancy, memory occupancy, and bandwidth occupancy, while ensuring that the use of each resource does not exceed the system upper limit (such as CPU <80%, memory <70%, bandwidth <5Mbps), and that the dependencies between operations are met (such as data transmission must be performed after the connection is established). After solving the model, the optimal resource allocation solution is obtained: 35% for CPU, 550MB for memory, and 2.5Mbps for bandwidth.
[0137] The system calls the microservice interface and encapsulates the optimal execution sequence and resource allocation plan as interactive tasks. The system constructs a RESTful API call: POST / api / tasks. The request body contains the task ID, target terminal list, operation sequence, resource requirements, and scheduling strategy. After receiving the request, the server creates a task instance and returns the task identifier "task_89271". The main control terminal can track the task execution status through this identifier.
[0138] Through structured instruction parsing and permission verification, invalid interactions and security risks are reduced. Atomic operation decomposition and dependency analysis enable the system to identify parallel execution opportunities and improve instruction processing efficiency. Actual measurements show that the optimized interaction response time is 40% lower than the traditional method, and the task completion speed is increased by 35%, which greatly improves the system interaction efficiency. Accurately calculate the operation resource requirements and build a resource scheduling model to achieve accurate resource allocation. The system avoids over-allocation and competition of resources, and improves the overall resource utilization by 25%. In high-concurrency scenarios, CPU utilization fluctuations are reduced by 20%, network bandwidth utilization is more reasonable, and system stability is significantly enhanced. Task encapsulation based on microservice interfaces makes the system have good scalability. New operation types can be integrated by simply registering atomic operations and dependencies without modifying the framework structure. The system can adapt to various scenarios from simple control instructions to complex data processing tasks, support multiple terminal types, and significantly enhance system flexibility and business adaptability.
[0139] In an optional implementation, a lightweight task execution container is deployed on the slave terminal based on edge computing technology, and the lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution state in real time and feed back to the data distribution center. The rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence, including:
[0140] Deploy a lightweight task execution container on the slave terminal, wherein the lightweight task execution container includes a state synchronization module and a rendering engine module;
[0141] The state synchronization module collects terminal execution state parameters, which include processor occupancy, memory occupancy, task execution progress, rendering frame rate and network bandwidth utilization;
[0142] Constructing a terminal state vector based on the terminal execution state parameters, setting a weight coefficient for each parameter in the terminal state vector according to the importance of resources, and obtaining a comprehensive load level of the terminal through weighted calculation;
[0143] Reporting the terminal state vector and the terminal comprehensive load level to a data distribution center in real time, and the data distribution center returns an adjusted instruction execution sequence according to the terminal comprehensive load level;
[0144] Prioritizing the adjusted instruction execution sequence, wherein the priority division includes priority rendering instructions and non-priority rendering instructions, and the execution priority of the priority rendering instructions is inversely proportional to the comprehensive load level of the terminal;
[0145] The rendering engine module sets rendering parameters based on the comprehensive load level of the terminal, the rendering parameters including rendering accuracy, refresh frequency and cache size, and the rendering parameters decrease as the comprehensive load level of the terminal increases;
[0146] The rendering engine module preferentially executes the priority rendering instruction and completes the dynamic rendering of the screen content according to the rendering parameters.
[0147] A lightweight task execution container is deployed on the slave terminal. The container uses lightweight virtualization technology, occupies less system resources and has a fast startup speed. The container has a built-in state synchronization module and a rendering engine module, and the two modules cooperate with each other to complete task execution.
[0148] The status synchronization module collects terminal execution status parameters in real time. Specifically, it collects processor occupancy rate, obtaining CPU usage data every 100ms; memory occupancy rate, monitoring the ratio of available memory to total memory; task execution progress, recording the percentage of completed rendering instructions to the total number of instructions; rendering frame rate, counting the number of frames rendered per second; network bandwidth utilization, calculating the ratio of used bandwidth to total bandwidth.
[0149] The terminal state vector is constructed based on the collected state parameters. The five parameters are weighted respectively: processor occupancy weight 0.3, memory occupancy weight 0.25, task execution progress weight 0.2, rendering frame rate weight 0.15, network bandwidth utilization weight 0.1. The terminal comprehensive load level value between 0-100 is obtained through weighted calculation.
[0150] The terminal state vector and comprehensive load level are reported to the data distribution center in real time. The data distribution center dynamically adjusts the instruction execution sequence according to the load level, reducing the number of rendering instructions when the load exceeds 80, and increasing the number of rendering instructions when the load is less than 30.
[0151] Prioritize the adjusted instruction sequence. Instructions involving user interaction are classified as priority rendering instructions, and others are classified as non-priority rendering instructions. When the terminal's comprehensive load is 90, the execution priority of the priority rendering instruction is 1, and the execution priority of the non-priority rendering instruction is 9. For every 10 decrease in load, the priority of the priority rendering instruction increases by 1.
[0152] The rendering engine module sets rendering parameters according to the terminal's comprehensive load level. When the load is 90, the rendering accuracy is set to 720p, the refresh rate is 30fps, and the cache size is 64MB. For every 10% decrease in the load, the rendering parameters are increased accordingly: the accuracy is increased to 1080p / 2K / 4K, the refresh rate is increased to 60fps / 90fps / 120fps, and the cache is increased to 128MB / 256MB / 512MB.
[0153] The rendering engine module executes rendering instructions in order of priority. Priority rendering instructions are executed immediately, and non-priority rendering instructions are executed in a timely manner according to the system load. During the rendering process, the set rendering parameters are applied in real time to complete the dynamic rendering of the screen content.
[0154] This solution deploys the task execution environment through lightweight containers, which reduces system resource overhead and improves task execution efficiency. The state synchronization module monitors the terminal status in real time and provides feedback, so that the data distribution center can adjust the task allocation strategy in time to avoid terminal overload. By dynamically adjusting the priority of rendering instructions and adaptively setting rendering parameters, while ensuring timely response to key interactive instructions, system resources are reasonably allocated, improving the stability and smoothness of system operation. The distributed architecture based on edge computing technology reduces the computing pressure of the central server and the network transmission overhead, while ensuring the real-time synchronization of the status between multiple terminals, and improving the scalability and reliability of the overall system.
[0155] According to a second aspect of the embodiments of the present invention,
[0156] An electronic device is provided, comprising:
[0157] processor;
[0158] a memory for storing processor-executable instructions;
[0159] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0160] According to a third aspect of the embodiments of the present invention,
[0161] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0162] 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 carrying computer-readable program instructions for executing various aspects of the present invention.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, 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 smart space multi-screen collaborative interaction method based on microservice architecture and edge computing, characterized in that: include: Receiving screen interaction requests sent by multiple smart space terminals, wherein the screen interaction requests include terminal type information and terminal resource status information; Determine the terminal comprehensive capability score according to the terminal type information and the terminal resource status information, use the terminal with the highest comprehensive capability score as the master terminal, and the others as slave terminals, and establish a master-slave terminal mapping relationship table; A data distribution center is constructed by using distributed message queue technology. The data distribution center includes multiple independently deployed message proxy nodes. Each of the message proxy nodes maintains an exclusive message topic. The message topic is bound to the terminal in the master-slave terminal mapping relationship table to implement directional message push based on the message topic; an interactive instruction sent by the master control terminal is received, and the interactive instruction includes operation type information and target terminal information; according to the operation type information and the target terminal information, a microservice interface is called to generate an interactive task, and the interactive task includes an instruction execution sequence and a resource scheduling strategy; Based on edge computing technology, a lightweight task execution container is deployed on the slave terminal, and the lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution status in real time and feed back to the data distribution center, and the rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence; the interactive task is pushed to the target slave terminal through the data distribution center, and the execution status information returned by the lightweight task execution container is received; the master-slave terminal mapping relationship table is updated according to the execution status information, and the updated terminal status information is pushed to the master terminal.
2. The method according to claim 1, characterized in that Determine the terminal comprehensive capability score according to the terminal type information and the terminal resource status information, take the terminal with the highest comprehensive capability score as the master terminal, and the others as slave terminals, and establish a master-slave terminal mapping relationship table including: Performing weighted calculation based on static weights combined with hardware configuration parameters in the terminal type information and based on dynamic weights combined with resource utilization in the terminal resource status information to obtain a terminal comprehensive capability score, wherein the static weights are used to balance the influence of the hardware configuration parameters, and the dynamic weights are used to adjust the contribution value of the resource utilization; The terminal with the highest comprehensive capability score is selected as the master terminal, and the others are selected as slave terminals; A master-slave terminal mapping relationship table is established, wherein the master-slave terminal mapping relationship table includes a master terminal identifier, a slave terminal identifier set, and terminal status information.
3. The method according to claim 1, characterized in that: A data distribution center is constructed using distributed message queue technology. The data distribution center includes multiple independently deployed message proxy nodes. Each message proxy node maintains an exclusive message topic. The message topic is bound to the terminal in the master-slave terminal mapping relationship table. The implementation of directional message push based on the message topic includes: Construct a multi-layer distributed message proxy node, wherein the multi-layer distributed message proxy node includes a core layer node for message routing, an access layer node for terminal connection, and a storage layer node for message persistence; obtain node status information of the multi-layer distributed message proxy node, wherein the node status information includes processor occupancy, memory occupancy, and network bandwidth occupancy; Constructing a state transition function based on the node state information to calculate the node state at the next moment; synchronizing the state information among the multi-layer distributed message proxy nodes through the Raft consensus protocol according to the calculation result of the state transition function; Calculate the load value of each message proxy node based on the node status information, and evaluate the load capacity of the multi-layer distributed message proxy node according to the load value; distribute the terminal access request to the access layer node with the lowest load value, and obtain the terminal identification and terminal role information; A hash algorithm is used to generate a message topic identifier according to the terminal identifier and the terminal role information, and a subscription relationship between the terminal and the message topic is established based on the message topic identifier; Construct a message routing table, the message routing table including the message topic identifier, the node identifier of the multi-layer distributed message proxy node, and the routing weight calculated based on the load value; select a target node for each message topic identifier through a routing decision function based on the message routing table to implement directional message push based on the message topic identifier.
4. The method according to claim 3, characterized in that Constructing a state transition function based on the node state information, calculating the node state at the next moment includes: A state transition function is constructed based on the node state information, the historical state sequence is segmented according to the time window, and the state transition features are extracted. The state transition features include state duration, transition trigger conditions and transition costs. A state transition matrix is obtained by training based on the state transition features. Each element of the state transition matrix represents the probability of a node transitioning from a current state vector to a target state vector. The state transition matrix is dynamically updated as a new state sequence is generated to ensure the timeliness of the state transition matrix. All state transition paths are calculated based on the state migration matrix, and confidence scores are assigned to the state transition paths. The confidence scores are related to the path probability and the historical prediction accuracy. The transition path with the highest confidence score is selected as the optimal prediction path. The influence of the time decay factor on the historical state is dynamically weighted. The time decay factor decays exponentially with the increase of the time interval. Finally, the prediction result of the node state at the next moment with time series correlation is output.
5. The method according to claim 3, characterized in that: Calculating a load value of each message proxy node based on the node status information, and evaluating the load capacity of the multi-layer distributed message proxy node according to the load value includes: Based on the node status information, the load value of each message proxy node is calculated, a state weight model is constructed, and a weight coefficient of each state indicator is determined according to the state weight model, wherein the processor utilization is 0.3, the memory occupancy is 0.25, the message queue depth is 0.2, the network throughput is 0.15, and the number of connections is 0.1; the standardized state indicator is multiplied by the corresponding weight coefficient and the sum is obtained to obtain the initial load value of each node; The load capacity of the multi-layer distributed message proxy nodes is evaluated, and the node load transfer influence coefficient is analyzed and calculated based on the hierarchical relationship between nodes and the message forwarding path; the node initial load value is combined with the node load transfer influence coefficient to obtain a final load evaluation value that reflects the actual processing capacity of the node.
6. The method according to claim 1, characterized in that Receiving an interaction instruction sent by the master control terminal, the interaction instruction including operation type information and target terminal information; and calling a microservice interface to generate an interaction task according to the operation type information and the target terminal information, including: Receive an interactive instruction sent by a master control terminal, the interactive instruction including operation type information and target terminal information; perform structured parsing on the interactive instruction, verify the syntax integrity of the operation type information, and check the operation authority and terminal status of the target terminal information; Constructing an instruction dependency graph, the instruction dependency graph including a vertex set representing atomic operations and an edge set representing dependencies between operations, and calculating a path weight based on the instruction dependency graph, the path weight being obtained by weighted summation of a priority weight and an execution time of each atomic operation; Selecting an optimal execution sequence from all feasible execution paths according to the path weights, wherein the optimal execution sequence is the execution path with the largest path weight among all feasible execution paths; Calculate resource requirements of atomic operations, the resource requirements including computing resource requirements and network resource requirements, wherein the computing resource requirements are calculated based on operation complexity and data size, and the network resource requirements are calculated based on bandwidth requirements and latency requirements; Building a resource scheduling optimization model based on the resource demand, wherein the optimization goal of the resource scheduling optimization model is to minimize the weighted sum of various resource occupancy rates while satisfying resource capacity upper limit constraints and operation timing dependency constraints; The microservice interface is called to encapsulate the optimal execution sequence and the solution results of the resource scheduling optimization model into an interactive task.
7. The method according to claim 1, characterized in that A lightweight task execution container is deployed on the slave terminal based on edge computing technology. The lightweight task execution container includes a state synchronization module and a rendering engine module. The state synchronization module is used to monitor the terminal execution state in real time and feed back to the data distribution center. The rendering engine module is used to complete the dynamic rendering of the screen content according to the instruction execution sequence. The method includes: Deploy a lightweight task execution container on the slave terminal, wherein the lightweight task execution container includes a state synchronization module and a rendering engine module; The state synchronization module collects terminal execution state parameters, which include processor occupancy, memory occupancy, task execution progress, rendering frame rate and network bandwidth utilization; Constructing a terminal state vector based on the terminal execution state parameters, setting a weight coefficient for each parameter in the terminal state vector according to the importance of resources, and obtaining a comprehensive load level of the terminal through weighted calculation; Reporting the terminal state vector and the terminal comprehensive load level to a data distribution center in real time, and the data distribution center returns an adjusted instruction execution sequence according to the terminal comprehensive load level; Prioritizing the adjusted instruction execution sequence, wherein the priority division includes priority rendering instructions and non-priority rendering instructions, and the execution priority of the priority rendering instructions is inversely proportional to the comprehensive load level of the terminal; The rendering engine module sets rendering parameters based on the comprehensive load level of the terminal, the rendering parameters including rendering accuracy, refresh frequency and cache size, and the rendering parameters decrease as the comprehensive load level of the terminal increases; The rendering engine module preferentially executes the priority rendering instruction and completes the dynamic rendering of the screen content according to the rendering parameters.
Citation Information
Patent Citations
Micro-service processing method, micro-service architecture platform and equipment
CN113312162A
Video stream analysis system and method based on end-edge-cloud computing architecture
CN114064211A
Method and system for automatically allocating resources in containerized edge computing
CN114490049A
Service credible providing system and method for decentralized network resources
CN116016550A
Station area intelligent fusion terminal data processing system based on edge calculation
CN119440800A
Cited By
Multi-screen interactive real estate display method based on cave and LED
CN120540618A
RPA robot cluster collaborative management method and system
CN120611950A
Model determination method and device and electronic equipment
CN121638457A
Data cascade synchronization method and device for multi-level converged communication platform
CN121691425A