Multi-domain control rapid switching method and device based on novel industrial operating system
Through the latency measurement and target node selection mechanism of the new industrial operating system, combined with the elastic microkernel and Kubernetes management, seamless switching of control functions of devices when moving across regions is achieved, solving the problem of devices being unable to quickly switch to the target area in existing technologies, and improving the certainty and speed of control.
Patent Information
- Application Number
- CN202410301187.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-09-16
AI Technical Summary
The existing cloud, edge, and end integrated software cannot enable devices to quickly switch to the target area and perform deterministic control after leaving the current control area. The edge node management method is static management, and the data is stored in the central cloud, which cannot achieve seamless switching across regions.
Through the new industrial operating system, the latency between the device and the control node is periodically measured, and the target node whose latency meets the constraints is selected to achieve seamless switching of device control functions across nodes and regions. The elastic microkernel is used to dynamically allocate resources, combined with Kubernetes to manage the life cycle and scheduling of control functions.
It achieves seamless switching of control functions when the device moves across regions, improves the certainty and speed of control, and ensures reliable connection and control of the device in the new area.
Smart Images

Figure CN120658745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer software technology, and in particular to a multi-domain control fast switching method and device based on a new industrial operating system. Background Art
[0002] The cloud, edge, and end integrated software currently available on the market mainly manages edge nodes through the central cloud, distributes related device control applications, and controls and manages edge devices through edge nodes. The edge nodes manage devices statically, and their related data are all stored in the central cloud. It is impossible to achieve the goal of quickly switching to the target area and performing deterministic control when an end device leaves the current control area. Summary of the Invention
[0003] In view of this, an embodiment of the present application provides a multi-domain control fast switching method and device based on a new industrial operating system. The method is used to switch the control nodes of multi-region cloud devices. When the device deviates from the acceptable deterministic control range, that is, when the delay between the device and its control node is greater than or equal to the difference between the device's delay constraint and the set value, the control function of the device is quickly switched to the new control node, thereby realizing seamless switching of the control function of the device across nodes and regions in the cloud environment.
[0004] In the first aspect, an embodiment of the present application provides a multi-domain control fast switching method based on a new industrial operating system, which is used to switch the control nodes of devices on a multi-region cloud. The new industrial operating system is used to manage each node of the multi-region cloud. The method includes: the current control node periodically measures its first control delay with the device; when the first control delay is greater than or equal to the difference between the delay constraint of the device and a first set value, selects a target node from other control nodes of the cloud, and makes each target node measure the second control delay of the device; selects a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, and the current control node switches the control function of the device to the target node, wherein the second set value is greater than or equal to the first set value.
[0005] From the above, the source control node perceives the first control delay with the edge device, determines the deterministic control access leaving the source control node, and selects the final switching target of the switching function of the final edge device according to the second control delay of the target node, thereby realizing seamless switching of the control function of the device in the cloud environment across nodes and regions.
[0006] In a possible implementation of the first aspect, the cloud includes sub-clouds in several regions, and the current control node selects a target node from other control nodes in the cloud, specifically including: when there are other control nodes in the sub-cloud where the current control node is located, the current control node first selects the other control node as the target node; when the second control delay of any other control node in the sub-cloud where the current control node is located is not less than the difference between the delay constraint and the second set value, the central management node of the sub-cloud where the current control node is located selects a node in a sub-cloud in an adjacent region as the target node.
[0007] From the above, by first selecting the target node in the sub-cloud where the source control node is located, unnecessary measurements of physical nodes in sub-clouds in other areas can be reduced. At the same time, when the target node exists in the sub-cloud, the control function of the edge device can be quickly switched.
[0008] In a possible implementation of the first aspect, after the current control node switches the control function of the device to the target node, it also includes: when the target node has the control function of the device, measuring its third control delay for the device through the control function; when the difference in the third control delay is less than the difference between the delay constraint and the third set value, the target node becomes the control node of the device and notifies the original control node to release the control function; otherwise, the target node deletes the control function for the device.
[0009] From the above, during the control function switching process, the third control delay is measured through the final target node to confirm that deterministic control can be achieved after this switching.
[0010] In a possible implementation of the first aspect, selecting a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value specifically includes: when the second control delay of multiple target nodes is less than the difference between the delay constraint and the second set value, selecting the target node with the smallest second control delay as the node to be switched.
[0011] From the above, the final target node selection based on the shortest delay improves the certainty of edge device control after switching.
[0012] In a possible implementation of the first aspect, the current control node switching the control function of the device to the target node specifically includes: the current control node synchronizing configuration data of the control function with the target node and handing over the control function to the target node. The configuration data includes control state data of the device and configuration data of a task corresponding to the control function.
[0013] From the above, by switching the target and source control nodes to synchronize data, hot switching of control functions is achieved, thereby improving the certainty of control.
[0014] In a possible implementation of the first aspect, after selecting a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, before the current control node switches the control function of the device to the target node, it also includes: applying to the target node to switch the control function of the device; after the target node accepts the switch, the current control node switches the control function of the device to the target node.
[0015] From the above, the decision of whether to accept the switch is made by the selected target node, so that the selected target node has sufficient computing power to support the control function of the edge device.
[0016] In a possible implementation of the first aspect, each relevant node measures the latency to the device, specifically including: each relevant node sends a latency measurement command to the device and receives a corresponding measurement report from the device; and each target node obtains the latency of the relevant node to the device based on the measurement report.
[0017] From the above, the edge device measures the delay based on the node's measurement command and reports it to the node that sends the command, realizing a two-way test of the delay between the node and the edge from inventing the measurement command to receiving the measurement command, and from sending the test report to receiving the measurement report, thereby improving the accuracy of the test.
[0018] In a possible implementation of the first aspect, the control function is scheduled to a running capsule with matching capabilities on a target node ultimately used for switching, wherein the elastic microkernel of the target node ultimately used for switching dynamically allocates resources for the control function, and the running capsule includes one of the following scenarios: a thread, a process, a container, and a virtual machine.
[0019] As described above, by scheduling the tasks corresponding to the control functions of edge devices into running capsules with matching capabilities and dynamically allocating hardware resources to the tasks corresponding to the control functions through the elastic microkernel, the control functions can run deterministically.
[0020] In a possible implementation of the first aspect, the method further includes: the running capsule of each control node is located in an adaptive partition of the control node, and each adaptive partition is configured with a budgeted CPU running time; when the elastic microkernel of each control node allocates hardware resources to the running capsule on the control node, the method is specifically used to schedule the budgeted CPU running time of each adaptive partition for the tasks in the running capsule of the adaptive partition, wherein when the CPU running time actually used by any adaptive partition is lower than its budgeted CPU running time, the remaining CPU running time of the adaptive partition is allocated to the highest-priority task in the highest-priority adaptive partition among other adaptive partitions.
[0021] As described above, the remaining CPU runtime of one adaptive partition is allocated to the highest-priority task in the highest-priority adaptive partition among other adaptive partitions, improving the time determinism of high-priority tasks. For example, the control node assigns the highest priority to the edge device control task in the running capsule and the adaptive partition where the running capsule resides to improve the burstability of edge device control and switching.
[0022] In a possible implementation of the first aspect, it also includes: encapsulating the control function and its required resources in a mirrored manner to schedule and manage the lifecycle of the control function through Kubernetes, wherein when the control function is deployed, its operating scenario is restored, and its operating scenario can be one of the following: thread, process, container, virtual machine.
[0023] As mentioned above, the control functions of edge devices and their required resources are encapsulated as images to fully utilize the container management capabilities of Kubernetes for scheduling and lifecycle management of control functions.
[0024] In the second aspect, an embodiment of the present application provides a multi-domain control fast switching device based on a new industrial operating system, which is used to switch the control nodes of devices on a multi-region cloud. The new industrial operating system is used to manage each node of the multi-region cloud. The device includes: a periodic measurement module, which is used by the current control node to periodically measure the first control delay between it and the device; a measurement trigger module, which is used when the first control delay is greater than or equal to the difference between the delay constraint of the device and the first set value, the current control node selects a target node from other control nodes of the cloud, and enables each target node to measure the second switching control delay of the device; a switching trigger module, which is used to select a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, and the current control node switches the control function of the device to the target node, wherein the second set value is greater than or equal to the first set value.
[0025] From the above, the source control node perceives the first control delay with the edge device, determines the deterministic control access leaving the source control node, and selects the final switching target of the switching function of the edge device according to the second control delay of the target node, thereby realizing seamless switching of the control function of the device in the cloud environment across nodes and regions.
[0026] In a possible implementation of the second aspect, the cloud includes sub-clouds in several regions, and the current control node selects a target node from other control nodes in the cloud. The measurement trigger module includes a first trigger module and a second trigger module. The first trigger module is used to, when other control nodes exist in the sub-cloud where the current control node is located, cause the current control node to first select the other control node as the target node; and the second trigger module is used to, when the second control delay of any other control node in the sub-cloud where the current control node is located is not less than the difference between the delay constraint and the second set value, cause the central management node of the sub-cloud where the current control node is located to select a node in a sub-cloud in an adjacent region as the target node.
[0027] From the above, by first selecting the target node in the sub-cloud where the source control node is located, unnecessary measurements of physical nodes in sub-clouds in other areas can be reduced. At the same time, when the target node exists in the sub-cloud, the control function of the edge device can be quickly switched.
[0028] In a possible implementation of the second aspect, the switching confirmation module is configured to, after the current control node switches the control function of the device to the target node, measure, when the target node has the control function of the device, a third control delay of the target node over the device through the control function; when the difference in the third control delay is less than the difference between the delay constraint and the third set value, the target node becomes the control node of the device and notifies the original control node to release the control function; otherwise, the target node deletes the control function over the device.
[0029] From the above, during the control function switching process, the third control delay is measured through the final target node to confirm that deterministic control can be achieved after this switching.
[0030] In a possible implementation of the second aspect, when the second control delays of multiple target nodes are less than the difference between the delay constraint and the second set value, the target node with the smallest second control delay is selected as the node to be switched.
[0031] From the above, the final target node selection based on the shortest delay improves the certainty of edge device control after switching.
[0032] In one possible implementation of the second aspect, the handover triggering module is specifically configured to cause the current control node to synchronize configuration data of the control function with the target node and transfer the control function to the target node. The configuration data includes control state data of the device and configuration data of a task corresponding to the control function.
[0033] From the above, by switching the target and source control nodes to synchronize data, hot switching of control functions is achieved, thereby improving the certainty of control.
[0034] In a possible implementation of the second aspect, the switching response module is used to select a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, and before the current control node switches the control function of the device to the target node, the target node receives the application to switch the control function of the device and decides whether to accept the switch based on its own resources, and sends an acceptance response to the current control node after deciding to accept.
[0035] From the above, the decision of whether to accept the switch is made by the selected target node, so that the selected target node has sufficient computing power to support the control function of the edge device.
[0036] In a possible implementation of the second aspect, each relevant node measures the delay to the device, each relevant node sends a delay measurement command to the device, and receives a corresponding measurement report from the device; each target node obtains the delay of the relevant node to the device based on the measurement report.
[0037] From the above, the edge device measures the delay based on the node's measurement command and reports it to the node that sends the command, realizing a two-way test of the delay between the node and the edge from inventing the measurement command to receiving the measurement command, and from sending the test report to receiving the measurement report, thereby improving the accuracy of the test.
[0038] In a possible implementation of the second aspect, the control function is scheduled to a running capsule with matching capabilities on a target node ultimately used for switching, wherein the elastic microkernel of the target node ultimately used for switching dynamically allocates resources for the control function, and the running capsule includes one of the following scenarios: thread, process, container, virtual machine.
[0039] As described above, by scheduling the tasks corresponding to the control functions of edge devices into running capsules with matching capabilities and dynamically allocating hardware resources to the tasks corresponding to the control functions through the elastic microkernel, the control functions can run deterministically.
[0040] In a possible implementation of the second aspect, it also includes: encapsulating the control function and its required resources in a mirrored manner to schedule and manage the lifecycle of the control function through Kubernetes, wherein when the control function is deployed, its operating scenario is restored, and its operating scenario can be one of the following: thread, process, container, virtual machine.
[0041] As mentioned above, the control functions of edge devices and their required resources are encapsulated as images to fully utilize the container management capabilities of Kubernetes for scheduling and lifecycle management of control functions.
[0042] In a third aspect, an embodiment of the present application provides a computing device, including:
[0043] bus;
[0044] a communication interface connected to the bus;
[0045] at least one processor connected to the bus; and
[0046] At least one memory is connected to the bus and stores program instructions, and when the program instructions are executed by the at least one processor, the at least one processor executes any implementation method of the first aspect of the present application.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, causes the computer to execute any of the implementations described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a schematic diagram of the structure of a new industrial operating system for this application;
[0049] Figure 2 This is a flowchart of a first embodiment of a multi-domain control fast switching method based on a novel industrial operating system of the present application;
[0050] Figure 3 This is a schematic diagram of the switching process of device control within the RC in Example 2 of a multi-domain control fast switching method based on a new industrial operating system of this application;
[0051] Figure 4 This is a schematic diagram of the switching process of device control across RCs in Embodiment 2 of a multi-domain control fast switching method based on a novel industrial operating system of this application;
[0052] Figure 5A This is a structural diagram of a first embodiment of a multi-domain control fast switching device based on a novel industrial operating system of the present application;
[0053] Figure 5B This is a structural diagram of a second embodiment of a multi-domain control fast switching device based on a novel industrial operating system of the present application;
[0054] Figure 6 This is a flow chart of an embodiment of a method for scheduling CPU runtime of a control node in multi-domain control fast switching based on a novel industrial operating system of the present application;
[0055] Figure 7 A schematic diagram of the structure of a computing device according to various embodiments of the present application. DETAILED DESCRIPTION
[0056] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0057] In the following description, the terms "first\second\third, etc." or module A, module B, module C, etc. are only used to distinguish similar objects, or to distinguish different embodiments, and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0058] In the following description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0060] An embodiment of the present application provides a multi-domain control fast switching method and device based on a new industrial operating system. The method is used to switch the control nodes of devices on a multi-region cloud. The new industrial operating system is used to manage each node of the multi-region cloud. The method includes: the current control node periodically measures its first control delay with the device; when the first control delay is greater than or equal to the difference between the delay constraint of the device and a first set value, selects a target node from other control nodes of the cloud, and causes each target node to measure a second control delay for the device; when a target node is selected from the target nodes whose second control delay is less than the difference between the delay constraint and a second set value, the current control node switches the control function of the device to the target node.
[0061] The technical solution of the embodiment of the present application is used in a cloud environment. When a device deviates from an acceptable deterministic control range, that is, when the delay between the device and its control node is greater than or equal to the difference between the device's delay constraint and the set value, the control function of the device is quickly switched to a new control node, thereby realizing seamless switching of the control function of the device across nodes and regions in the cloud environment.
[0062] The following describes various embodiments of the present application in conjunction with the accompanying drawings. First, the scenarios in which the embodiments of the present application are used are described.
[0063] The various embodiments of the present application are used in multi-region industrial cloud scenarios. The industrial cloud includes several regional sub-clouds (also called edge clouds), each of which includes several physical nodes. The devices connected to the cloud environment are edge devices, which include actuators and sensors and are controlled by the physical nodes of the sub-clouds in the corresponding regions. These physical nodes are control nodes, and the application tasks running in the control nodes control the edge devices. Some mobile edge devices are connected to the cloud environment through wireless and deterministic connections. The various embodiments of the present application are used to achieve seamless switching of these mobile edge devices across regions.
[0064] The industrial cloud of this application is managed by a new industrial operating system. Figure 1 Introducing a new industrial operating system. Figure 1 The structure of a novel industrial operating system of the present application is shown, which includes, from bottom to top: a base layer, a platform layer, and a service layer. The embodiments of the present application mainly operate on the platform layer.
[0065] The base layer is deployed on each physical node in the industrial cloud and includes the node's elastic microkernel and several runtime capsules. The elastic microkernel allocates hardware resources to the runtime capsules. One possible implementation of the base layer is in the new Rust language, leveraging its features to provide memory safety. The system utilizes a standardized functional component design approach, enabling modular assembly. This allows for flexible, on-demand integration of advanced features to support virtualization and provide enhanced security isolation.
[0066] Among them, the elastic microkernel includes componentized hardware resources, which are used to allocate componentized hardware resources to each running capsule. The elastic microkernel manages the hardware resources of the physical node in a componentized manner, and each componentized hardware resource is a standardized resource component. The elastic microkernel elastically loads and / or deletes each resource component according to demand to achieve elastic management of the hardware resources on the physical node. The resources include the CPU core on the chip, the motherboard and / or chip memory, the physical node peripherals, etc. The elastic microkernel is a super-elastic microkernel that can randomly and quickly combine the size of chip resources according to demand. The elastic microkernel is also used to statically and / or dynamically allocate componentized hardware resources to the running capsules on the physical node, realizing elastic allocation of resource components.
[0067] Among them, the running capsule supports one of the following scenarios: thread, process, real-time container, non-real-time container, real-time virtual machine, non-real-time virtual machine. The running capsule includes the corresponding running environment for running tasks in the service components of the new industrial operating system.
[0068] For example, Figure 1Two partitioned virtual machines and one non-partitioned container are shown in the figure. The real-time running environment of one partitioned virtual machine supports real-time application tasks, the high-security running environment of one partitioned virtual machine supports high-security application tasks, and the non-real-time running environment in the non-partitioned container supports the application tasks of the non-real-time container.
[0069] Run capsules can also be divided into real-time run capsules and non-real-time run capsules, which are used to run real-time tasks and non-real-time tasks respectively. Real-time run capsules are time-critical run capsules.
[0070] The platform layer is used to schedule running capsules with matching capabilities on several physical nodes for each task in the service component of the new industrial operating system from the industrial cloud, so that at least the predicted delay of the service component obtained based on the computational delay of the scheduled running capsules and the transmission delay between the scheduled physical nodes meets the deterministic constraints of the service component.
[0071] In a possible implementation of the platform layer, the platform layer includes an orchestrator, a scheduler, and middleware.
[0072] Among them, the coordinator is deployed on the physical node used for management of the industrial cloud in each region, and is used to schedule several physical nodes from the industrial cloud for each task in the service component of the new industrial operating system.
[0073] The orchestrator is deployed regionally, on physical nodes managed within the central and / or edge clouds of each region's industrial cloud. It schedules multiple physical nodes from the industrial cloud for tasks within the new industrial operating system's service components. The orchestrator operates in a hierarchical manner, providing cross-system and cross-regional device coordination and centralized control, real-time monitoring, and remote collaboration.
[0074] For example, the industrial cloud includes a sub-cloud in region A and a sub-cloud in region B, and each sub-cloud includes a central cloud and an edge cloud. A coordinator is deployed on the management node of the central cloud of the sub-cloud in region A and the sub-cloud in region B respectively. When the running capsules of the physical nodes in the sub-cloud in region A and the sub-cloud in region B can satisfy the sub-tasks in the scheduled service components, the collaborative scheduling of these coordinators is based on load balancing to schedule several physical nodes from a regional sub-cloud for each task in the service component; when the sub-task in the scheduled service component is used to control an industrial actuator or sensor in an edge cloud in a region, a physical node is scheduled from the edge cloud in the region based on the shortest predicted delay. The scheduling method distinguishing these two scenarios realizes the cross-regional cloud-edge collaborative scheduling.
[0075] The collaborator uses standardization and consistency protocols to ensure data consistency at all ends of the collaborative session, and to achieve consistency in on-site perception and control across systems and devices. For example, in the field of industrial control, including component manufacturing robot control, assembly robot control, and transportation robot control, the standardization and consistency protocols of the collaborator can be used to achieve collaborative control among various robots in the industrial control field. The standardization and consistency protocols of the collaborator can be converted to standards through the middleware at the platform layer, or a converted driver can be generated and sent to the running capsule where the corresponding task is located for standard conversion. The collaborator also uses security and privacy protection mechanisms applied in the collaborative process to ensure the security and confidentiality of data.
[0076] The scheduler is deployed on the physical node used for management in the edge cloud of each region. The scheduler uses an end-to-end task delay analysis algorithm to calculate the worst-case delay constraints of tasks in a multi-level dynamic scheduling framework. It uses real-time scheduling analysis technology for multi-core systems to establish a time-predictable basic structure model of multi-core processors and perform scheduling analysis based on it, thereby fully utilizing the powerful parallel computing capabilities provided by multi-core processors.
[0077] The scheduler schedules running capsules that match the capacity of each task in each service component from the physical nodes scheduled by the orchestrator, and predicts the predicted delay of running the service component based on the computational delay of the scheduled running capsules and the transmission delay between the scheduled physical nodes. The predicted delay at least meets the deterministic constraints of the scheduled service component.
[0078] For example, the scheduler schedules three serial tasks A1, B1, and C1 of a service component to run capsules A2, B2, and C2, respectively. The physical nodes where run capsules A2, B2, and C2 reside are connected via a TSN network. Based on the computing power of run capsules A2, B2, and C2, the scheduler uses a preset model to predict the completion times t1, t2, and t3, respectively. It also predicts the transmission delay p1 from run capsule A2 to run capsule B2, and the transmission delay p2 from run capsule B2 to run capsule C2. The estimated delay for completing the service component is (t1+t2+t3+p1+p2). If this estimated delay is less than the deterministic constraint of the service component, the service component can complete the deterministic computation.
[0079] The scheduler also ensures that the running capsules scheduled by the scheduler for each service component meet the security constraints of the service component, thereby making the new industrial operating system a secure system. The scheduler also ensures that the running capsules scheduled by the scheduler for each service component meet the trust constraints of the service component, thereby making the new industrial operating system a trustworthy system.
[0080] When the scheduler cannot schedule a running capsule that meets the requirements of the task in the service component from the existing running capsules on each physical node, the scheduler is also used to schedule a physical node to dynamically create a running capsule that meets the requirements; the scheduler also schedules a running capsule with the closest capability to a physical node, and then notifies the elastic microkernel of the physical node to dynamically increase hardware resources for the running capsule, so that it becomes a running capsule that meets the requirements of the task in the scheduled service component.
[0081] Middleware manages communication between physical nodes, stores data, and supports artificial intelligence engines. These middleware runs on runtime capsules on physical nodes dedicated to their specific functions and can be scheduled statically or dynamically. Together with the runtime capsules dispatched by the scheduler, the middleware helps the service components of the new industrial operating system complete their functions.
[0082] Through the collaborative session of consistency protocols and mechanisms provided by the orchestrator, the scheduling of running capsules for deterministic computing provided by the scheduler, the TSN network communication capabilities provided by the deterministic communication middleware, and the containerized abstract lifecycle management of the manager, cross-system and cross-device cloud-edge collaboration and rapid switching are achieved at the platform layer, thereby realizing deterministic control. The above-mentioned deterministic control is combined with the deterministic communication middleware and / or pan-industrial communication middleware to quickly sense the network access of industrial control terminals, realizing cross-regional collaboration and rapid switching of industrial control. For example, when a drone connected to the TSN network via wireless network moves from one industrial control area to another, the deterministic communication middleware quickly senses the drone's access to the network in the new area, and through the orchestrator and scheduler, schedules the physical node on the edge cloud of the new area and the running capsule on the physical node for the drone. The control task for deterministic control of the drone runs on the running capsule. The orchestrator enables the control task to conduct a control session based on a protocol consistent with the entire network. The control task then controls the drone through the TSN network, realizing rapid switching of the drone during cross-regional movement.
[0083] The platform layer provides distributed collaboration and deterministic control capabilities based on a distributed coordination framework and deterministic scheduling. This includes: elastic resource allocation and scheduling based on the base layer, distributed deterministic communication capabilities, and standardized consistency protocols and mechanisms. This addresses issues such as real-time determinism and data consistency in distributed control and computing. Furthermore, the platform layer provides security and privacy protection mechanisms that are applied to the collaboration process to ensure data security and confidentiality. Finally, protocol definition and standardization are key to ensuring collaboration and control across different layers. Through unified protocol specifications, seamless integration and communication between different devices, edge platforms, and cloud platforms can be achieved.
[0084] The platform layer also provides ubiquitous industrial connectivity, addressing interoperability issues across diverse industrial devices, and software-defined control, addressing the need for flexible, on-demand deployment of control systems. The platform layer also rapidly detects when industrial control terminals connect to the network. Combining platform-layer collaborative control with deterministic scheduling and communication, it enables rapid switching of device control across regions.
[0085] The service layer includes the Industrial Application Cloud Development Kit, deployed on physical nodes within the Industrial Cloud with an integrated development environment. This kit is used to develop service components that form various service suites. The Industrial Application Cloud Development Kit decomposes each service suite into several service components. Each service component is open to users and broken down into tasks that can be subscribed to. Service component tasks are typically dispatched by the platform layer to runtime capsules for execution.
[0086] The service layer also deploys industrial control suites and industrial simulation cloud platforms. The industrial control suites include time-critical industrial control components. The tasks of the industrial control components are scheduled by the platform layer to real-time running capsules (such as partition-based real-time containers or real-time virtual machines). The service layer is also used to start related service components in the industrial control suite to control and access industrial actuators or sensors connected to the edge cloud in the industrial cloud through the platform layer and the base layer to complete industrial control.
[0087] The following combination Figure 2 The present application introduces a first embodiment of a multi-domain control fast switching method based on a novel industrial operating system.
[0088] Figure 2 The flowchart of the first embodiment of a multi-domain control fast switching method based on a novel industrial operating system of the present application is shown, which includes steps S210 to S230.
[0089] This embodiment is introduced by taking a cloud environment wirelessly connecting an edge device as an example. For ease of description, the edge device is referred to as device A, and its current control node is referred to as a source control node.
[0090] S210: The source control node periodically measures a first control delay between itself and device A.
[0091] To achieve deterministic control of device A, a reliable connection must exist between device A and the source control node, ensuring that the latency meets deterministic requirements. The first control latency reflects the connection status between device A and the source control node. This first control latency is periodically measured to accurately and in real time determine the connection status between device A and the source control node.
[0092] Among them, the control delay between the source control node and device A is measured at the base layer of the new industrial operating system and is periodically perceived by the deterministic communication middleware at the platform layer of the new industrial operating system.
[0093] In some embodiments, device A is connected to the cloud environment via a deterministic network, and its control node performs deterministic control over device A via the deterministic network. The deterministic network includes a TSN network.
[0094] In some embodiments, the control function of device A is scheduled in a running capsule with matching capabilities on a source control node, wherein the elastic microkernel of the source control node dynamically allocates hardware resources for the tasks corresponding to the control function of device A, and the running capsule includes one of the following scenarios: thread, process, container, virtual machine. When each node in the cloud environment is managed by Kubernetes, the control function of device A and its required resources are encapsulated as a mirror, and the control function of device A is scheduled in a running capsule with matching capabilities on the source control node through Kubernetes. When the control function is deployed on the source control node, its running scenario is restored from the container mode. As described above, by scheduling the control function of the edge device to a running capsule with matching capabilities and dynamically allocating hardware resources to the tasks in the running capsule through the elastic microkernel, the control function can be run deterministically.
[0095] In some embodiments, the management tasks corresponding to the source control node at the platform layer of the novel industrial operating system also perform lifecycle management of the application tasks of the control function of device A on the source control node. Each node in the cloud environment is managed through Kubernetes, and device A's application is encapsulated as a container and deployed on its control node. When the cloud environment includes several sub-clouds in different regions, the nodes of each sub-cloud are managed through kubeEdge, thereby leveraging the management capabilities of Kubernetes. Thus, the control functions of edge devices and their required resources are encapsulated as images, fully leveraging Kubernetes' container management capabilities for scheduling and lifecycle management of control functions.
[0096] In some embodiments, the source control node measures a first control delay for device A, specifically including: the source control node sends a delay measurement command to device A and receives a corresponding measurement report from device A; and the source control node obtains the first control delay between itself and device A based on the measurement report. The measurement report includes not only the transmission delay but also the interface processing delay between device A and the source control node. To facilitate accurate measurement of the first control delay, the delay is typically obtained based on multiple measurement reports, and the two-way delays from sending the measurement command to receiving the measurement command and from sending the measurement report to receiving the measurement report are also calculated.
[0097] In some embodiments, the process of the source control node periodically measuring the first control delay between it and device A is run on the running capsule of the source control node that runs the deterministic communication task, and sends the first control delay to the middleware for deterministic communication at the platform layer of the new industrial operating system.
[0098] S220: When the first control delay of the source control node on device A is greater than or equal to the delay constraint of device A minus the first set value, select a target node from other control nodes in the cloud and enable each target node to measure the second control delay for device A.
[0099] Among them, when the first control delay is greater than or equal to the difference between the delay constraint of device A and the first set value, the connection between device A and the source control node will not meet the delay constraint requirements. It can be considered that the device in the cloud environment has deviated from the acceptable deterministic control range. At this time, the target node must be triggered in time to measure its connection status with device A.
[0100] Each target node is a potential handover target and can sense the presence of device A. The second control delay of each target node indicates its connection status with device A and is used to select the final handover target. Each target node can sense the presence of device A.
[0101] When the cloud includes several sub-clouds in different regions, the target node may be another control node in the sub-cloud where the source control node is located, or a control node in a sub-cloud in an adjacent region.
[0102] The platform layer of the novel industrial operating system selects a target node from the cloud when the first control delay of the corresponding task on the source control node is greater than or equal to the delay constraint of device A minus a first set value. In some examples, the orchestrator of the platform layer of the novel industrial operating system selects the target node from the cloud.
[0103] In some embodiments, when a cloud includes sub-clouds in several regions, a source control node selects a target node from other control nodes in its sub-cloud. Specifically, the following steps are performed: when other control nodes exist in the sub-cloud where the source control node is located, the source control node first selects a target node from the other control nodes in its sub-cloud; when the second control delay of any target node in the sub-cloud where the source control node is located is not less than the delay constraint of device A minus a second set value, the central management node of the sub-cloud where the source control node is located selects a node in a sub-cloud in an adjacent region as the target node, where the second set value is greater than the first set value. Thus, by first selecting a target node in its sub-cloud, the source control node reduces unnecessary measurements of nodes in sub-clouds in other regions.
[0104] In some embodiments, the target node measures the second control delay with respect to device A, specifically including: the target node sends a delay measurement command to device A and receives a corresponding measurement report from device A; the target node obtains the second control delay between itself and device A based on the measurement report. The measurement report includes not only the transmission delay but also the interface processing delay between device A and each target node. To facilitate accurate measurement of the second control delay, it is typically obtained based on multiple measurement reports, and the two-way delays from sending the measurement command to receiving the measurement command and from sending the measurement report to receiving the measurement report are also calculated.
[0105] In some of these scenarios, when the source control node controls device A, it always maintains a wireless connection with the wireless point corresponding to the source control node in the industrial cloud during the movement of device A. At this time, a target node measures the second control delay of device A by sending the identification code of the wireless point corresponding to the target node in the industrial cloud to the source control node (such as the SSID of WIFI). The source control node allows device A to connect to the wireless access point corresponding to the identification code, and connects to the wireless access point to measure the second control delay with the target node. If device A has two wireless network cards, one maintains a wireless connection with the wireless point corresponding to the source control node in the industrial cloud, and the other is used to measure the second control delay. If device A has only one wireless network card, after measuring the second control delay of the target node to it, it should return to the wireless point corresponding to the source control node in the industrial cloud.
[0106] In some scenarios, as device A moves, it automatically selects the wireless access point with the best signal in the industrial cloud based on wireless technology (such as 5G automatic switching based on signal quality, or Wi-Fi switching based on the best signal for the same SSID). At this point, a target node measures the second control delay for device A, allowing device A to measure directly through the path to the wireless access point with the best signal, without having to send the target node's identification code for the wireless access point in the industrial cloud. In this case, the second control delay includes the delay between device A and the wireless access point with the best signal and the delay between the target node and the wireless access point with the best signal. The first control delay includes the delay between device A and the wireless access point with the best signal and the delay between the source control node and the wireless access point with the best signal. It's important to emphasize that each control node in the industrial cloud has a wireless access point with the shortest transmission delay. When device A leaves the wireless access point with the shortest transmission delay to the source control node, its first control delay with the source control node increases. When device A connects to the wireless access point with the shortest transmission delay to a target node, its second control delay with the target node decreases. This solution is generally used on device A with only one network card, and its latency measurement time is shorter.
[0107] In some embodiments, the process of the target node measuring the second control delay of device A is run on the running capsule of the target control node that runs the deterministic communication task, and sends the second control delay to the middleware for deterministic communication at the platform layer of the new industrial operating system.
[0108] S230: Select a target node from the target nodes whose second control delay is less than the difference between the delay constraint of device A and the second set value, and the source control node switches the control function of device A to the target node.
[0109] Among them, when the second control delay of the target node is less than the difference between the delay constraint of device A and the second set value, the connection between the target node and device A is a reliable connection, supports deterministic control of device A, and can be a switching target.
[0110] When the target node is a node in a sub-cloud of an adjacent region, seamless switching of the control function of device A across regions is achieved.
[0111] In order to avoid ping-pong switching, the second set value is greater than the first set value, that is, the delay requirement for the target node and device A is higher.
[0112] Among them, when the second control delay of the corresponding task on the source control node at a target node is less than the difference between the delay constraint of device A and the second set value, the platform layer of the new industrial operating system initiates the switching of the control function of device A to the target node, and the scheduler of the platform layer of the new industrial operating system schedules the corresponding running capsule at the target control node to realize the task corresponding to the control function.
[0113] In some embodiments, when the second control delay of multiple target nodes is less than the delay constraint of device A minus the second set value, the source control node selects the target node with the smallest second control delay as the node to be switched to achieve a more reliable connection.
[0114] In some embodiments, the source control node switches the control function of device A to the target node, specifically including: the source control node synchronizes the configuration data of the control function to the target node, the configuration data including the control status data of device A and the configuration data of the task corresponding to the control function. The control function is then transferred to the target node. As described above, hot switching is achieved by hot synchronization of control data. When each node in the cloud environment is managed by Kubernetes, the control function of device A and its required resources are encapsulated in a mirrored manner, and the control function of device A is scheduled to a running capsule with matching capabilities on the target node through Kubernetes. When the control function is deployed on the target node, its running scenario is restored from the container mode.
[0115] In some embodiments, when the second control delay of a target node is less than the delay constraint of device A minus the second set value, before the source control node switches the control function of the device to the target node, the process further includes: the source control node requests the target node to switch the control function of device A; after the target node accepts the switch, the control node switches the control function of device A to the target node. As described above, the target node can determine whether to accept the switch based on its own load status, thereby ensuring deterministic control of device A after the switch.
[0116] In some embodiments, after the source control node switches the control function of device A to the target node, the process further includes: when the target node has the control function of device A, measuring the third control delay of the control node for device A using the control function; when the difference in the third control delay is less than the difference between the delay constraint of device A and the third set value, the target node becomes the new control node for the device and notifies the source control node to release the control function for device A; otherwise, the target node deletes the control function for device A, and the third set value is equal to the second set value. Thus, by measuring the third control delay, it is determined that the target node maintains a reliable connection with device A and can be used as the final switching target.
[0117] In some embodiments, the target node measures the third control delay for device A, specifically including: the target node sending a delay measurement command to device A and receiving a corresponding measurement report from device A; and the target node obtaining the third control delay between itself and device A based on the measurement report. The measurement report includes not only the transmission delay but also the interface processing delay between device A and the selected target node. To facilitate accurate measurement of the third control delay, it is typically obtained based on multiple measurement reports, and the two-way delays from sending the measurement command to receiving the measurement command and from sending the measurement report to receiving the measurement report are also calculated.
[0118] In some embodiments, the process of the final target node measuring the third control delay of device A is run on the running capsule of the final target control node that runs the deterministic communication task, and sends the third control delay to the middleware for deterministic communication at the platform layer of the new industrial operating system.
[0119] In some embodiments, the control function of the device is scheduled to a running capsule with matching capabilities on the target node ultimately used for switching, wherein the elastic microkernel of the target node ultimately used for switching dynamically allocates resources for the control function, and the running capsule includes one of the following scenarios: thread, process, container, virtual machine.
[0120] In some embodiments, the system further includes: the execution capsule of each control node is located in the adaptive partition of the control node, and each adaptive partition is configured with a budgeted CPU execution time; when the elastic microkernel of each control node allocates hardware resources to the execution capsule on the control node, the system is specifically configured to schedule the budgeted CPU execution time of each adaptive partition for the tasks in the execution capsule of the adaptive partition, wherein when the CPU execution time actually used by any adaptive partition is lower than its budgeted CPU execution time, the remaining CPU execution time of the adaptive partition is allocated to the highest priority task in the highest priority adaptive partition among the other adaptive partitions. For the specific principles of this embodiment, please refer to an embodiment of CPU execution time scheduling of control nodes in multi-domain control fast switching based on a new industrial operating system. In some embodiments, the management tasks corresponding to the platform layer of the new industrial operating system for the final target node also perform lifecycle management on the application tasks of the control function of device A on the final target node. Each node in the cloud environment is managed through Kubernetes, and the application tasks and resource requirements of the control function of device A are encapsulated as container images, deployed in the final target node, and lifecycle management is performed through Kubernetes. When the cloud environment includes sub-clouds in several regions, the nodes of each sub-cloud are managed through kubeEdge, thereby leveraging the management capabilities of Kubernetes. Thus, the control functions of edge devices and their required resources are encapsulated as container images to fully utilize the container management capabilities of Kubernetes for scheduling and lifecycle management of control functions.
[0121] In summary, embodiment 1 of a multi-domain control fast switching method based on a new industrial operating system is used in a cloud environment. When a device deviates from an acceptable deterministic control range, the control function of the device is quickly switched to the new control node by selecting a target node whose latency meets the deterministic requirements as a new control node, thereby achieving seamless switching of the control function of the device across nodes and regions in the cloud environment.
[0122] The following combination Figure 3 and Figure 4 A second embodiment of a multi-domain control fast switching method based on a new industrial operating system is introduced.
[0123] A second embodiment of a multi-domain control fast switching method based on a new industrial operating system is a more specific implementation of the first embodiment of the multi-domain control fast switching method based on a new industrial operating system, and has all the advantages thereof.
[0124] A second embodiment of a multi-domain control fast switching method based on a new industrial operating system implements regional central cloud node and task management through Kubernetes, regional edge node management and regional embedded device management through kubeEdge, and interaction between regional central cloud and edge nodes through interaction between Kubernetes and kubeEdge, thereby realizing the management of edge nodes by central management nodes and the control and management of edge devices by edge nodes.
[0125] In order to achieve cross-regional rapid switching management of edge devices, a second embodiment of a multi-domain control rapid switching method based on a new industrial operating system defines the following method function units.
[0126] Define a single regional sub-cloud center management node as RC (regional center). RC has the platform layer collaboration, scheduling, and task lifecycle management functions of the new industrial operating system, which run on the corresponding running capsule on the RC.
[0127] The control node that manages devices in the regional sub-cloud is defined as CN (Control Node). CN has the platform layer collaboration, scheduling, task lifecycle management, deterministic communication middleware, edge device control and other functions of the new industrial operating system, and runs on the corresponding running capsule on the RC.
[0128] Define the edge devices managed within the regional sub-cloud as RDs (Removable Devices).
[0129] Define the edge device application as CA (Control APP), and encapsulate the application and its resource requirements in a mirrored manner.
[0130] In the following example, region 1 is used. Its central management node is RC1, the source RC, and its edge device is RD1. Its current control node is RC1-CN1, and RD1 is managed by CA1 of RC1-CN1. The subcloud where RC1 resides has several adjacent subclouds, whose central management nodes are RCn and the nodes that control RD1 are CNn.
[0131] Figure 3 The switching process of the device control in the RC in the second embodiment of the multi-domain control fast switching method based on the new industrial operating system is shown, which includes steps S301 to S319,
[0132] S301: Send a first control delay test command, that is, CN1 measures and determines the first control delay of RD1.
[0133] S302: Send a first control delay measurement report, that is, RD1 completes the first control delay test and sends a corresponding measurement report.
[0134] S303: Switching decision and scanning CN, including: when the first control delay is close to the minimum requirement met by the control, that is, greater than or equal to the difference between the delay constraint of RD1 and the first set value, RC1-CN1 performs node scanning within RC1. If there are other control nodes RC1-CNx, execute step S304.
[0135] S304: requesting a delay test, ie notifying RC1-CNx through the RC1 central network to determine the second control delay of CNx on RD1.
[0136] S305: Send a second control delay test command, that is, RC1-CNx measures and determines the second control delay of RD1.
[0137] S306: Send a second control delay measurement report, that is, RD1 completes the second control delay test and sends a corresponding measurement report.
[0138] S307: Reporting the delay result, that is, RC1-CNx reports the measurement result of the second control delay to RC1-CN1.
[0139] S308: Send a switching request. That is, if the second control delay of RC1-CNx is less than the delay constraint of device A minus the second set value, RC1-CN1 sends a switching request to RC1-CNx; if the second control delay of each RC1-CNx does not meet the requirements, the information that the control delay requirement is not met is returned.
[0140] S309: accepting the request, that is, when the resources of RC1-CNx meet the requirements, RC1-CNx accepts the switching request of RC1-CN1, otherwise, the request is not accepted.
[0141] S310: Handover request response, that is, when the resources of RC1-CNx meet the requirements, RC1-CNx sends a handover request response to RC1-CN1.
[0142] S311: Send CA data, that is, RC1-CN1 sends synchronized CA data to RC1-CNx.
[0143] S312: Store CA data, that is, RC1-CNx stores the received CA data.
[0144] S313: Return the storage result, that is, RC1-CNx sends the CA data storage result to RC1-CN1.
[0145] S314: Transferring the CA application, that is, RC1-CN1 transfers the CA application to RC1-CNx, so that RC1-CNx has the control function of RD1.
[0146] S315: Start the CA application, that is, RC1-CN1 starts the control function of RD1.
[0147] S316: cyclically testing the third control delay, that is, RC1-CNx-CA1 measures and determines the third control delay of RD1.
[0148] S317: prompting that the requirement is met, that is, RC1-CNx sends a third control delay to RC1-CN1-CA1 to indicate that the requirement is met, prompting RC1-CN1 to release CA resources.
[0149] S318: Take over RD, that is, when the third control delay of RC1-CNx-CA1 on RD1 is less than the delay constraint of device A minus the third set value, RC1-CNx takes over RD. If the third control delay of RC1-CNx-CA1 on RD1 does not meet the delay requirement, RC1-CNx-CA1 is suspended and the relevant information of RD1 is deleted.
[0150] S319: Release CA resources, that is, RC1-CN1 releases CA resources, deletes RC1-CN1-CA1, and clears related configuration information.
[0151] Figure 4 The switching process of device control within the RC in the second embodiment of a multi-domain control fast switching method based on a novel industrial operating system is shown, which includes steps S401 to S423.
[0152] S401: Send a first control delay test command, that is, CN1 measures and determines the first control delay of RD1.
[0153] S402: Send a first control delay measurement report, that is, RD1 completes the first control delay test and sends a corresponding measurement report.
[0154] S403: Switching decision and scanning CN, including: when the first control delay is close to the minimum requirement met by the control, that is, greater than or equal to the difference between the delay constraint of RD1 and the first set value, RC1-CN1 performs node scanning within RC1. Because this process is a cross-RC or cross-region switching, it is assumed that RC1 has only one node and there is no other control node RC1-CNx, and step S404 is executed.
[0155] S404: Sending a message indicating that no CN is available, that is, RC1-CN1 sends a message indicating that no CN is available to RC1.
[0156] S405: Handover decision and RC scanning, including: RC1 decides to switch the control function of RD1 to the neighboring RC, scans the neighboring RCs, and when a neighboring RCn is found, it is used as the target RC, RCn-CNn is the target CN, and step S406 is executed.
[0157] S406: Request delay test, that is, notify RCn-CNn through the RC1 central network to determine the second control delay of CNn on RD1.
[0158] S407: Send a second control delay test command, that is, RCn-CNn measures and determines the second control delay of RD1.
[0159] S408: Send a second control delay measurement report, that is, RD1 completes the second control delay test and sends a corresponding measurement report.
[0160] S409: reporting the delay result, that is, RCn-CNn reports the measurement result of each second control delay to RC1 through RCn.
[0161] S410: Send a switching request. That is, if the second control delay of RCn-CNn is less than the delay constraint of device A minus the second set value, RC1 sends a switching request to RCn; if the second control delay of each RCn-CNx does not meet the requirements, the information that the control delay requirements are not met is returned.
[0162] S411: Accepting the request, that is, when the resources of RCn-CNn meet the requirements, RCn accepts the switching request of RC1, otherwise, the request is not accepted.
[0163] S412: Handover request response, that is, when the resources of RCn-CNn meet the requirements, RCn sends a handover request response to RC1.
[0164] S413: Send CA data, that is, RC1 sends synchronized CA data to RCn.
[0165] S414: Send CA data, that is, RCn sends synchronized CA data to RCn-CNn
[0166] S415: Store CA data, that is, RCn-CNn stores the received CA data.
[0167] S416: Return the storage result, that is, RCn sends the CA data storage result to RC1.
[0168] S417: Transferring the CA application, that is, RC1 transfers the CA application to RCn, so that RCn has the control function of RD1.
[0169] S418: Send CA application, that is, RCn sends CA application to RCn-CNn.
[0170] S419: Start the CA application, that is, RCn-CNn starts the control function of RD1.
[0171] S420: cyclically testing the third control delay, that is, RCn-CNn-CA1 measures and determines the third control delay of RD1.
[0172] S421: Take over RD, that is, when the third control delay of RCn-CNn-CA1 on RD1 is less than the delay constraint of device A minus the third set value, RCn-CNn takes over RD. If the third control delay of RCn-CNn-CA1 on RD1 does not meet the delay requirement, RCn-CNn-CA1 is suspended and the relevant information of RD1 is deleted.
[0173] S422: prompting that the requirement is met, that is, RCn sends a third control delay to RC1-CN1-CA1 to indicate that the requirement is met, prompting RC1-CN1 to release CA resources.
[0174] S423: Sending a switched signal, that is, RC1 sends a switched signal to RC1-CN1, and the control domain of RD1 is seamlessly switched from RC1 to RCn.
[0175] S424: Release CA resources, that is, RC1-CN1 releases CA resources, deletes RC1-CN1-CA1, and clears related configuration information.
[0176] In summary, embodiment 2 of a multi-domain control fast switching method based on a new industrial operating system controls a mobile terminal device, i.e., an edge device, in real time. When the terminal device is moving freely, seamless switching of the control domain is performed to achieve real-time control effects.
[0177] The following combination Figure 5A and Figure 5B An embodiment of a multi-domain control fast switching device based on a new industrial operating system is introduced.
[0178] An embodiment of a multi-domain control fast switching device based on a new industrial operating system is used to run the method described in embodiment 1 of a multi-domain control fast switching method based on a new industrial operating system, with all its advantages.
[0179] Figure 5A The structure of a first embodiment of a multi-domain control fast switching device based on a novel industrial operating system is shown, including: a period measurement module 510 , a measurement trigger module 520 and a switching trigger module 530 .
[0180] The period measurement module 510 is located at the source control node and is used for the source control node to periodically measure the first control delay between the source control node and the device A. For its working principle and advantages, please refer to step S210 of the first embodiment of a multi-domain control fast switching method based on a novel industrial operating system.
[0181] The measurement trigger module 520 is located in the coordinator of the platform layer of the new industrial operating system, and is used to select a target node from other control nodes in the cloud when the first control delay is greater than or equal to the difference between the delay constraint of device A and the first set value, and to enable each target node to measure the second control delay of device A. Its working principle and advantages can be referred to step S220 of the first embodiment of a multi-domain control fast switching method based on a new industrial operating system. The measurement trigger module 520 can be divided into a first trigger module and a second trigger module. The first trigger module is located on the source control node and is used to select the target node from the other control nodes of the sub-cloud where the source control node is located when there are other control nodes in the sub-cloud where the source control node is located; the second trigger module is located on the central management node of the sub-cloud where the source control node is located. When the second control delay of any target node in the sub-cloud where the source control node is located is not less than the difference between the delay constraint of device A and the second set value, the central management node of the sub-cloud where the source control node is located selects the node of the sub-cloud in the adjacent area as the target node.
[0182] The handover trigger module 530 is located in the orchestrator of the platform layer of the novel industrial operating system. It is configured to cause the source control node to hand over the control function of device A to the target node when the second control delay of the target node is less than the delay constraint of device A minus the second set value. For its operating principle and advantages, please refer to step S230 of the first embodiment of a method for rapid multi-domain control handover based on a novel industrial operating system.
[0183] Figure 5B The structure of a second embodiment of a multi-domain control fast switching device based on a new industrial operating system is shown. Figure 5A On the basis of the present invention, a target measurement module 540, a handover response module 550 and a handover confirmation module 560 are further added.
[0184] The target measurement module 540 is located in the target node and is configured to measure the second control delay between the target node and device A.
[0185] The switching response module 550 is located in the coordinator of the platform layer of the new industrial operating system. It is used to decide whether to accept the switching application based on its own resources before the source control node switches the control function of the device to the target node when the second control delay of a target node is less than the difference between the delay constraint of device A and the second set value, and sends an acceptance message to the source control node after deciding to accept the switch.
[0186] The switching confirmation module 560 is used to measure the third control delay of the control node for device A through the control function when the target node has the control function of device A; when the difference in the third control delay is less than the difference between the delay constraint of device A and the third set value, the target node becomes the new control node of the device and notifies the source control node to release the control function for device A; otherwise, the target node deletes the control function for device A, and the third set value is equal to the second set value.
[0187] The following is based on Figure 6 An embodiment of a method for scheduling CPU runtime of a control node in multi-domain control fast switching based on a novel industrial operating system is introduced.
[0188] The control node includes: computing resources, elastic microkernel and several adaptive partitions.
[0189] Among them, computer resources include chip resources, and the chip can be a SoC chip, an MPU chip, an MCU chip, or a GPU or an NPU chip.
[0190] Among them, the elastic microkernel includes a resource component and a kernel scheduler. The resource component is a virtual component that abstracts computer resources and realizes the isolation of adaptive partitions from computer resources. The CPU core resources of a computer are abstracted as the CPU running time of the computer, and abstracted as a single CPU running time based on the CPU core system (such as x86 system and ARM system), the number of CPU cores and the computing power of each CPU core. The virtual CPU execution time obtained after abstraction is divided into a certain proportion to ensure that each adaptive partition has a set of engineered resources. One or more threads / processes can run in each adaptive partition. The kernel scheduler is connected to the partition scheduler of each adaptive partition, and the kernel scheduler of the elastic microkernel directly schedules the tasks of the adaptive partition.
[0191] Each adaptive partition comprises a combination of several abstract and componentized computer resources, providing resources for the runtime capsules of the base layer of the new industrial operating system in the application scenarios of each embodiment of this application. An adaptive partition can have multiple runtime capsules, each of which supports threads, processes, containers, or one of the operating system scenarios. The control node is the physical node of the new industrial operating system in the application scenarios of each embodiment of this application.
[0192] Unlike conventional partitions, adaptive partitions do not necessarily require a partition operating system. For example, when running threads, processes, and containers, a partition operating system is not required. The lack of a partition operating system means that the adaptive partitions do not have a partition scheduler for the partition operating system. However, the elastic microkernel does have a partition scheduler for adaptive partitions, and all subsequent partition schedulers in this embodiment are embedded in the elastic microkernel. The data structure of each adaptive partition's partition scheduler defines the scheduling algorithm for that adaptive partition.
[0193] Figure 6 The present invention introduces a process of an embodiment of a method for scheduling CPU runtime of a control node in multi-domain control fast switching based on a novel industrial operating system, including steps S610 to S630.
[0194] S610: Configure the data structure of the partition scheduler of each adaptive partition and the CPU running time budget of each adaptive partition.
[0195] The CPU running time of each adaptive partition is configured according to the budget ratio. The data structure of the partition scheduler of each adaptive partition is configured based on one of the following methods: RMS monotonic rate, priority, and time schedule.
[0196] In some embodiments, when scheduling the corresponding budgeted CPU runtime for each adaptively partitioned task, the CPU runtime scheduled for tasks with a priority lower than a threshold is the duration of the minimum scheduling granularity. When no high-priority task is scheduled, the scheduling time of the low-priority task is more than the minimum scheduling granularity. Task priority ensures that critical tasks run, but does not provide guaranteed CPU time for important non-critical tasks, which may be starved during normal operation. Partitioning technology is used to ensure that low-priority tasks can obtain a minimum-granularity CPU runtime when the system load is high. Prevent unimportant or untrusted applications from monopolizing system resources. Provide security to prevent resources from being occupied and causing functions to become unresponsive.
[0197] S620: Schedule the corresponding budgeted CPU running time for the tasks of each adaptive partition according to the data structure of the partition scheduler of each adaptive partition.
[0198] Tasks run in one of the following scenarios: threads, processes, containers, and virtual machines. Accordingly, each adaptive partition's scheduler can be a thread, process, container, or virtual machine scheduler, but they essentially support task scheduling in the corresponding scenario in a thread-based manner.
[0199] Each adaptive partition's partition scheduler is connected to the elastic microkernel, which schedules tasks for each adaptive partition based on the data structure of the partition scheduler, achieving flexible scheduling of computer resources. Existing technologies use the microkernel to schedule resources for each partition. At this point, each partition's resources are already statically scheduled, and the partition scheduler within the partition performs secondary scheduling, which fails to achieve flexible scheduling of computer resources.
[0200] In some embodiments, the budgeted CPU runtime of each adaptive partition is converted into a CPU runtime time slice within a scheduling main frame, and when the elastic microkernel schedules a task for an adaptive partition, the time slice is scheduled to the task.
[0201] S630: When the CPU runtime actually used by any adaptive partition is lower than its budgeted CPU runtime, the remaining CPU runtime of the adaptive partition is allocated to other adaptive partitions.
[0202] Among them, when the actual CPU runtime used by an adaptive partition is lower than its budgeted CPU runtime, the elastic microkernel does not need to wait for the budgeted CPU runtime to be used up, but directly allocates the remaining CPU runtime of the adaptive partition to other adaptive partitions with tasks waiting to be scheduled.
[0203] Allocating the remaining CPU runtime of an adaptive partition to other adaptive partitions specifically involves scheduling the remaining CPU runtime to the highest-priority adaptive partition among the other adaptive partitions with tasks waiting to be scheduled. By scheduling the remaining CPU runtime to the highest-priority adaptive partition among the other partitions, the elastic microkernel dynamically schedules resources for the high-priority adaptive partition.
[0204] Allocating the remaining CPU runtime of an adaptive partition to other adaptive partitions with tasks waiting to be scheduled further specifically includes scheduling the remaining CPU runtime to the highest-priority task within the highest-priority adaptive partition. Thus, by scheduling the remaining CPU runtime to the highest-priority task within the highest-priority adaptive partition among other partitions, the elastic microkernel implements on-demand scheduling of tasks within high-priority partitions within high-priority adaptive partitions.
[0205] For example, at each control node, the priority of the adaptive partition where the running capsule for edge device control is located is set to the highest, and the priority of the task for edge device control is set to the highest, thereby improving the certainty of the control and switching tasks of the edge device.
[0206] Among them, the maximum CPU running time actually used by each adaptive partition in a scheduling main frame is the sum of the remaining CPU running time of other adaptive partitions occupied by the adaptive partition and its own budgeted CPU running time. That is, when an adaptive partition is called to occupy the remaining CPU running time of other adaptive partitions in a scheduling main frame, its scheduled time can exceed its own budgeted CPU running time, and the maximum is equal to the sum of the remaining CPU running time of other adaptive partitions occupied by the adaptive partition and its own budgeted CPU running time. When an adaptive partition is called within a scheduling main frame and does not occupy the remaining CPU running time of other adaptive partitions, its scheduled time is at most its own budgeted CPU running time.
[0207] The present application embodiment also provides a computing device, Figure 7 Detailed introduction.
[0208] The computing device 700 includes a processor 710 , a memory 720 , a communication interface 730 , and a bus 740 .
[0209] It should be understood that the communication interface 730 in the computing device 700 shown in this figure can be used to communicate with other devices.
[0210] The processor 710 may be connected to a memory 720. The memory 720 may be used to store the program code and data. Therefore, the memory 720 may be a storage unit within the processor 710, an external storage unit independent of the processor 710, or a component including both a storage unit within the processor 710 and an external storage unit independent of the processor 710.
[0211] Optionally, computing device 700 may further include a bus 740. Memory 720 and communication interface 730 may be connected to processor 710 via bus 740. Bus 740 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus 740 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figure shows only one line, but this does not imply that there is only one bus or only one type of bus.
[0212] It should be understood that in the embodiment of the present application, the processor 710 can adopt a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Alternatively, the processor 710 adopts one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.
[0213] The memory 720 may include a read-only memory and a random access memory, and provides instructions and data to the processor 710. A portion of the processor 710 may also include a non-volatile random access memory. For example, the processor 710 may also store information about the device type.
[0214] When the computing device 700 is running, the processor 710 executes the computer-executable instructions in the memory 720 to perform the operating steps of each method embodiment.
[0215] It should be understood that the computing device 700 according to the embodiment of the present application can correspond to the corresponding subject in executing the method according to each embodiment of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 700 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0216] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0217] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0219] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0220] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0221] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0222] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to perform the operating steps of each method embodiment.
[0223] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium.Computer-readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof.More specific examples (non-exhaustive list) of computer-readable storage medium include, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0224] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0225] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0226] The computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0227] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of protection of the present application, all of which fall within the scope of protection of the present application.
Claims
1. A multi-domain control fast switching method based on a new industrial operating system, characterized in that: A control node for switching devices on a multi-region cloud, wherein the novel industrial operating system is used to manage each node of the multi-region cloud, and the method includes: The current control node periodically measures a first control delay between the current control node and the device; When the first control delay is greater than or equal to the delay constraint of the device minus a first set value, selecting a target node from other control nodes in the cloud and triggering each target node to measure a second control delay for the device; A target node is selected from the target nodes whose second control delay is less than the delay constraint minus a second set value, and the current control node switches the control function of the device to the target node, wherein the second set value is greater than or equal to the first set value.
2. The method according to claim 1, characterized in that The cloud includes several sub-clouds in different regions, and selecting a target node from other control nodes in the cloud specifically includes: When there are other control nodes in the sub-cloud where the current control node is located, the current control node first selects the other control node as the target node; When the second control delay of any other control node in the sub-cloud where the current control node is located is not less than the difference between the delay constraint and the second set value, the central management node of the sub-cloud where the current control node is located selects the control node of the sub-cloud in the adjacent area as the target node.
3. The method according to claim 1, characterized in that After the current control node switches the control function of the device to the target node, the method further includes: When the target node has a control function of the device, measuring a third control delay of the target node on the device through the control function; When the difference of the third control delay is less than the difference of the delay constraint minus the third set value, the target node becomes the control node of the device and notifies the original control node to release the control function; otherwise, the target node deletes the control function of the device.
4. The method according to claim 1, characterized in that The selecting a target node from the target nodes where the second control delay is less than the difference between the delay constraint and the second set value specifically includes: When the second control delay of multiple target nodes is less than the difference between the delay constraint and the second set value, the target node with the smallest second control delay is selected as the node to be switched.
5. The method according to claim 1, characterized in that The current control node switches the control function of the device to the target node, specifically including: The current control node synchronizes the configuration data of the control function to the target node, and transfers the control function to the target node.
6. The method according to claim 1, characterized in that After selecting a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, and before the current control node switches the control function of the device to the target node, the method further includes: The current control node applies to the target node for switching the control function of the device; After the target node accepts the handover, the current control node hands over the control function of the device to the target node.
7. The method according to claim 1, characterized in that: Each relevant node measures the delay to the device, specifically including: Each relevant node sends a delay measurement command to the device and receives a corresponding measurement report from the device; Each target node obtains the delay of the relevant node to the device according to the measurement report.
8. The method according to claim 1, characterized in that: Also includes: The control function is dispatched to a running capsule with matching capabilities on a target node for final switching, wherein the elastic microkernel of the target node for final switching dynamically allocates resources for the control function, and the running capsule includes one of the following scenarios: thread, process, container, and virtual machine.
9. The method according to claim 8, characterized in that Also includes: The running capsule of each control node is located in the corresponding adaptive partition of the control node, and each adaptive partition is configured with its budgeted CPU running time; When the elastic microkernel of each control node allocates hardware resources to the running capsules on the control node, it is specifically used to schedule the budgeted CPU runtime of each adaptive partition for the tasks in the running capsules of the adaptive partition. When the CPU runtime actually used by any adaptive partition is lower than its budgeted CPU runtime, the remaining CPU runtime of the adaptive partition is allocated to the highest-priority task in the highest-priority adaptive partition among other adaptive partitions.
10. The method according to any one of claims 1 to 9, characterized in that: Also includes: The control function and its required resources are encapsulated as a mirror image so that the control function can be scheduled and managed in its lifecycle through Kubernetes.
11. A multi-domain control fast switching device based on a new industrial operating system, characterized in that: A control node for switching devices on a multi-region cloud, wherein the novel industrial operating system is used to manage each node of the multi-region cloud, and the device includes: a periodic measurement module, configured to periodically measure, by the current control node, a first control delay between the current control node and the device; a measurement triggering module, configured to, when the first control delay is greater than or equal to the difference between the delay constraint of the device and a first set value, select a target node from other control nodes of the cloud and trigger the target node to measure a second switching control delay for the device; A switching trigger module is used to select a target node from the target nodes whose second control delay is less than the difference between the delay constraint and the second set value, and switch the control function of the device from the current control node to the target node, wherein the second set value is greater than or equal to the first set value.
12. A computing device, characterized in that include, bus; a communication interface connected to the bus; at least one processor connected to the bus; as well as at least one memory connected to the bus and storing program instructions, wherein when the program instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 10.