Industrial control device and configuration method and apparatus thereof
By employing virtualization technology in lithium battery component production equipment, and dynamically allocating shared physical kernels to optimize resource configuration, the problem of unallocated hardware resources in dual-physical control equipment is solved, thereby improving production efficiency and reducing costs.
Patent Information
- Application Number
- CN202411450009.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-10-16
AI Technical Summary
In the existing technology, during the automated production process of lithium battery components, the hardware resources of dual physical control equipment cannot be allocated, resulting in the hardware resources of the control equipment for processing a certain task not meeting the operational requirements, thus affecting production efficiency.
An industrial control device is employed, which carries a first virtual machine running a real-time operating system and a second virtual machine running a time-sharing operating system. By judging the load status, the shared physical kernel is dynamically allocated to optimize resource configuration and ensure that the hardware resource requirements of real-time and non-real-time tasks are met.
It improves the production efficiency of lithium battery components, reduces situations where hardware resources cannot meet operational needs, lowers hardware costs, and enables multi-tasking on a single device through virtualization technology.
Smart Images

Figure CN119847007B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial control, and in particular to an industrial control device and a configuration method and apparatus thereof. BACKGROUND
[0002] To improve the assembly efficiency of lithium battery components, such as battery cells, industrial control devices are usually used to realize the automatic production of lithium battery components. In the related art, two physical control devices are usually used to control the production equipment of lithium battery components, such as a control device carrying a time-sharing operating system and a hard PLC control system, to realize the automatic production of lithium battery components. The hard PLC control system refers to a hardware or a dedicated ASIC chip to execute PLC instructions.
[0003] However, this method requires at least two control devices, at least one control device to execute non-real-time tasks of the time-sharing operating system, and another control device to execute real-time control tasks of the PLC control system. The hardware resources between the control device executing the non-real-time tasks and the control device executing the real-time control tasks cannot be allocated, which may cause the hardware resources of the control device processing a task to be unable to meet the running requirements of the task, thereby affecting the production efficiency of lithium battery components when using industrial control devices for the automatic production of lithium battery components. SUMMARY
[0004] In view of the above problems, the present application provides an industrial control device and a configuration method and apparatus thereof, which can improve the production efficiency of lithium battery components.
[0005] In a first aspect, an embodiment of the present application provides an industrial control device, which carries a first virtual machine running a real-time operating system and a second virtual machine running a time-sharing operating system; the second virtual machine is used to execute real-time control tasks for controlling the production equipment of lithium battery components, and the first virtual machine is used to execute non-real-time tasks; the industrial control device comprises at least one first physical core configured for the first virtual machine, at least one second physical core configured for the second virtual machine, and at least one shared physical core; the industrial control device is used to determine the load state of each first physical core configured for the first virtual machine according to the current real-time control task executed by the first virtual machine, to determine the corresponding resource configuration strategy for allocating the shared physical core to the first virtual machine and the second virtual machine according to the load state; wherein the load state comprises a full load state and a light load state, the resource configuration strategy corresponding to the full load state comprises allocating the shared physical core to the first virtual machine, and the resource configuration strategy corresponding to the light load state comprises allocating the shared physical core to the second virtual machine.
[0006] In the technical solution of the embodiment of the application, the first virtual machine running a real-time operating system and the second virtual machine running a time-sharing operating system are mounted on the same industrial control device, so that when the first physical core of the first virtual machine is saturated, more hardware resources are allocated to process real-time control tasks, and since non-real-time control tasks can be processed when idle, the allocation of shared physical cores to the first virtual machine has little effect on non-real-time control tasks, and the running pressure of each first physical core can be reduced, and when the first physical core of the first virtual machine is idle, more hardware resources are allocated to process non-real-time control tasks, improving the processing efficiency of non-real-time control tasks, thereby reducing the occurrence of a situation in which hardware resources for processing real-time control tasks or non-real-time control tasks cannot meet the running requirements, and improving the production efficiency of lithium battery assemblies.
[0007] In some embodiments, the industrial control device is specifically configured to: determine the load state of each first physical core configured for the first virtual machine according to a comparison result of a time parameter collected by a current real-time control task executed by the first virtual machine and a preset time parameter; wherein the time parameter greater than the preset time parameter corresponds to a full load state, and the time parameter less than or equal to the preset time parameter corresponds to a light load state; and the time parameter includes at least one of a scanning period or a jitter time. Thus, the load state of each first physical core configured for the first virtual machine can be determined by using the characteristics of the time parameter collected by the EtherCAT motion control task in the current real-time control task executed by the first virtual machine, improving the accuracy of load state determination, and further improving the rationality of subsequent hardware resource allocation using the load state.
[0008] In some embodiments, the industrial control device is specifically configured to: determine the load state as a full load state when the scanning period exceeds a preset scanning period or the jitter time exceeds a preset jitter time; or determine the load state as a light load state when the scanning period is less than or equal to the preset scanning period and the jitter time is less than or equal to the preset jitter time. Thus, when the load state of the first physical core is determined by using the time parameter, the scanning period and the jitter time can be used to determine the load state in multiple dimensions, improving the accuracy of load state determination.
[0009] In some embodiments, the industrial control device is specifically configured to: determine that the load state is a light load state, allocate the shared physical core to the second virtual machine, and detect fault information of the production device; in a case where the load state is the light load state, determine that an interval time length between a triggering time of the fault information and a current time reaches a preset time length, and allocate the shared physical core to the first virtual machine. Thus, the possibility that the physical resources required by the real-time control task suddenly increase, causing the first physical cores to possibly fail to effectively process the real-time control task, is reduced, and the processing efficiency of the real-time control task is further improved.
[0010] In some embodiments, the preset time length is determined according to a fault repair time length corresponding to the fault information. In this way, a case where the interval time length has not reached the preset time length, and the load state of each first physical core has switched to a full load state, is reduced.
[0011] In some embodiments, the industrial control device is further configured to: in a case where the shared physical core is allocated to the first virtual machine, determine that a duration that the load state of each first physical core is in a full load state reaches a target time length, and allocate at least one second physical core to the first virtual machine. Since the non-real-time task executed by the second virtual machine can be executed when the load is idle, the second physical core allocated to the first virtual machine has less impact on the non-real-time control task, and more physical resources can be allocated to the real-time control task to meet the physical resource requirement of the high-load real-time control task as much as possible, and the processing efficiency of the real-time control task is further improved.
[0012] In some embodiments, the industrial control device is further configured to: in a case where the shared physical core is allocated to the first virtual machine, determine that a duration that the load state of each first physical core is in a full load state reaches a target time length, and allocate at least one second physical core to the first virtual machine. Since the non-real-time task executed by the second virtual machine can be executed when the load is idle, the second physical core allocated to the first virtual machine has less impact on the non-real-time control task, and more physical resources can be allocated to the real-time control task to meet the physical resource requirement of the high-load real-time control task as much as possible, and the processing efficiency of the real-time control task is further improved.
[0013] In a second aspect, the application provides a configuration method of an industrial control device, applied to the industrial control device in any of the above embodiments, and the method comprises: determining a load state of each of the first physical cores configured for the first virtual machine according to a current real-time control task executed by the first virtual machine; and determining a corresponding resource configuration strategy for allocation of the shared physical core to the first virtual machine and the second virtual machine according to the load state; wherein the load state comprises a full load state and a light load state, the resource configuration strategy corresponding to the full load state comprises allocation of the shared physical core to the first virtual machine, and the resource configuration strategy corresponding to the light load state comprises allocation of the shared physical core to the second virtual machine.
[0014] In the technical solution of the embodiments of the application, when the load of the first physical core of the first virtual machine is saturated, more hardware resources are allocated for processing real-time control tasks, and since non-real-time control tasks can be processed when idle, the allocation of the shared physical core to the first virtual machine has less impact on non-real-time control tasks, and the running pressure of each first physical core can be reduced, while when the load of the first physical core of the first virtual machine is idle, more hardware resources are allocated for processing non-real-time control tasks, improving the processing efficiency of non-real-time control tasks, thereby reducing the occurrence of a situation that hardware resources for processing real-time control tasks or non-real-time control tasks cannot meet the running requirements, and improving the production efficiency of the lithium battery assembly.
[0015] In a third aspect, the application provides a configuration device of an industrial control device, applied to the industrial control device in any of the above embodiments, and the device comprises: a state determination module configured to determine a load state of each of the first physical cores configured for the first virtual machine according to a current real-time control task executed by the first virtual machine; and a resource configuration module configured to determine a corresponding resource configuration strategy for allocation of the shared physical core to the first virtual machine and the second virtual machine according to the load state; wherein the load state comprises a full load state and a light load state, the resource configuration strategy corresponding to the full load state comprises allocation of the shared physical core to the first virtual machine, and the resource configuration strategy corresponding to the light load state comprises allocation of the shared physical core to the second virtual machine.
[0016] In the technical solution of the embodiment of the present application, when the first physical core of the first virtual machine is in load saturation, more hardware resources are allocated to process real-time control tasks, and since non-real-time control tasks can be processed when idle, the allocation of shared physical cores to the first virtual machine has less impact on non-real-time control tasks, and meanwhile, the running pressure of each first physical core can be reduced, and when the first physical core of the first virtual machine is in load idle, more hardware resources are allocated to process non-real-time control tasks, improving the processing efficiency of non-real-time control tasks, thereby reducing the situation that the hardware resources for processing real-time control tasks or non-real-time control tasks cannot meet the running requirements, and improving the production efficiency of the lithium battery assembly.
[0017] In a fourth aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to execute the method in the implementation manner of the second aspect.
[0018] In a fifth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to execute the method in the implementation manner of the second aspect.
[0019] In a sixth aspect, the present application provides a computer program product, wherein the computer program product is run on a computer to make the computer execute the method in the implementation manner of the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are intended to only illustrate preferred embodiments and are not intended to limit the present application. Moreover, the same reference numbers in all the drawings represent the same elements. In the drawings:
[0021] Figure 1 Structure diagram of an industrial control device according to some embodiments of the present application;
[0022] Figure 2 First flowchart of a configuration method of an industrial control device according to some embodiments of the present application;
[0023] Figure 3 Second flowchart of a configuration method of an industrial control device according to some embodiments of the present application;
[0024] Figure 4 Structure diagram of a configuration device of an industrial control device according to some embodiments of the present application;
[0025] Figure 5 Structure diagram of an electronic device according to some embodiments of the present application.
[0026] Some of the drawing reference numbers in the detailed description are listed below:
[0027] 10 - industrial control device; 20 - production device; 101 - first virtual machine; 102 - second virtual machine; 103 - service virtual machine; 201 - first physical core; 202 - second physical core; 203 - shared physical core; 301 - state determining module; 302 - resource configuration module; 400 - electronic device; 401 - processor; 402 - memory; 403 - communication bus. DETAILED DESCRIPTION
[0028] The embodiments of the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover non-exclusive inclusion.
[0030] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.
[0031] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0033] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0034] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or a connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0035] To improve the assembly efficiency of lithium battery components, such as battery cells, industrial control equipment is typically used to automate their production. Related technologies often employ dual physical control equipment, such as a control device equipped with a time-sharing operating system and a hardware PLC control system, to control the lithium battery component production equipment and achieve automated production. The hardware PLC control system refers to hardware or a dedicated ASIC chip that executes PLC instructions.
[0036] However, this approach requires at least two control devices. One device executes non-real-time tasks of a time-sharing operating system, while the other executes real-time control tasks of a PLC control system. The hardware resources of the control device executing non-real-time tasks and the one executing real-time control tasks cannot be allocated. This can lead to situations where, in the automated production of lithium battery components using industrial control equipment, the hardware resources of the control device handling a particular task cannot meet the operational requirements. For example, during lithium battery component production, if a production device malfunctions, the subsequent production equipment will be under light load. Meanwhile, the malfunctioning equipment may experience material accumulation. When the malfunction is repaired, to avoid affecting the cycle time of the entire lithium battery component production line, the real-time control task may increase the cycle time of the production equipment for high-load processing. This can easily overload the hardware of the control device executing the real-time control task of the PLC control system, making it unable to meet the operational requirements and affecting the production efficiency of lithium battery components.
[0037] To address the aforementioned technical problems, this application provides an industrial control device. This industrial control device is equipped with a first virtual machine running a real-time operating system and a second virtual machine running a time-sharing operating system. The second virtual machine is used to execute real-time control tasks for the production equipment of lithium battery components, while the first virtual machine is used to execute non-real-time tasks. The industrial control device includes at least one first physical kernel configured for the first virtual machine, at least one second physical kernel configured for the second virtual machine, and at least one shared physical kernel. The industrial control device is used to obtain the load status of each first physical kernel configured for the first virtual machine based on the current real-time control task executed by the first virtual machine, and to determine a corresponding resource allocation strategy to allocate the shared physical kernel to the first and second virtual machines based on the load status. The load status includes a full-load state and a light-load state. The resource allocation strategy corresponding to the full-load state includes allocating the shared physical kernel to the first virtual machine, and the resource allocation strategy corresponding to the light-load state includes allocating the shared physical kernel to the second virtual machine. By mounting a first virtual machine running a real-time operating system and a second virtual machine running a time-sharing operating system on the same industrial control device, more hardware resources are allocated to handle real-time control tasks when the first physical kernel of the first virtual machine is saturated. Since non-real-time control tasks can be processed during idle periods, allocating a shared physical kernel to the first virtual machine has a minimal impact on non-real-time control tasks and also reduces the operating pressure on each first physical kernel. When the first physical kernel of the first virtual machine is idle, more hardware resources are allocated to handle non-real-time control tasks, improving the processing efficiency of non-real-time control tasks. This reduces the occurrence of situations where hardware resources for handling real-time or non-real-time control tasks cannot meet the operational requirements, thereby improving the production efficiency of lithium battery components.
[0038] Furthermore, since the first virtual machine running a real-time operating system and the second virtual machine running a time-sharing operating system are mounted on the same industrial control equipment, the production equipment can be controlled by the processor core of a single dual-system industrial control computer to automate the production of lithium battery components. This eliminates the need for multiple physical control systems and the need for dedicated ASIC chips to execute PLC instructions, thus reducing hardware costs.
[0039] An industrial control device is provided according to some embodiments of this application, such as... Figure 1As shown, the industrial control device 10 is equipped with a first virtual machine 101 running a real-time operating system and a second virtual machine 102 running a time-sharing operating system; the second virtual machine 102 is used to perform real-time control tasks for the lithium battery component production equipment 20, and the first virtual machine 101 is used to perform non-real-time tasks; the industrial control device 10 includes at least one first physical kernel 201 configured for the first virtual machine 101, at least one second physical kernel 202 configured for the second virtual machine 102, and at least one shared physical kernel 203; the industrial control device 10 is used to perform real-time control tasks according to the first virtual machine 101. 1. The current real-time control task being executed determines the load status of each of the first physical kernels 201 configured for the first virtual machine 101, and determines the corresponding resource configuration strategy to allocate the shared physical kernel 203 to the first virtual machine 101 and the second virtual machine 102 based on the load status; wherein, the load status includes a full load status and a light load status, the resource configuration strategy corresponding to the full load status includes allocating the shared physical kernel 203 to the first virtual machine 101, and the resource configuration strategy corresponding to the light load status includes allocating the shared physical kernel 203 to the second virtual machine 102.
[0040] In some embodiments, the real-time operating system may be deployed with logic motion control programs for soft PLCs and motion control programs for EtherCAT, to achieve functions such as sequential control, interlocking alarms, one-button initialization, and cycle control. The time-sharing operating system may be a Windows system, which may be deployed with programming software for soft PLCs and a human-machine interface.
[0041] The central processing unit (CPU) of the industrial control device 10 is a multi-core processor, which includes N processor cores, i.e., N physical cores. The industrial control device 10 can pre-allocate physical cores for the first virtual machine 101 and the second virtual machine 102, and select at least one physical core from among them as a shared physical core 203. For example, the industrial control device 10 can create a service virtual machine 103, which runs an independent operating system and is configured with one physical core. The service virtual machine 103 can be equipped with a hypervisor for configuring the hardware resources of the first virtual machine 101 and the second virtual machine 102. Through the service virtual machine 103, n physical cores can be configured for the first virtual machine 101 as first physical cores 201, m physical cores can be configured for the second virtual machine 102 as second physical cores 202, and the remaining physical cores can be configured as a shared physical core 203. If the central processing unit of the industrial control equipment 10 has 8 physical cores, it can be configured with 3 physical cores as 3 first physical cores 201 for the first virtual machine 101 and another 3 physical cores as 3 second physical cores 202 for the second virtual machine 102 through the service virtual machine 103, and the remaining physical core can be configured as a shared physical core 203.
[0042] Each first physical kernel 201 configured for the first virtual machine 101 is used to execute real-time control tasks for real-time control of the lithium battery component production equipment 20. These real-time control tasks may include EtherCAT motion control tasks and logic control tasks. The lithium battery component can be battery-related components, such as battery packs, cells, electrodes, or tabs. The lithium battery component production equipment 20 may include equipment from various processes on the lithium battery component production logistics line, such as servo drivers, stepper motors, and barcode scanners. Each second physical kernel 202 configured for the second virtual machine 102 is used to execute non-real-time tasks such as data transmission and reception and edge data analysis, including non-real-time tasks such as file reading and writing, disk access, and inter-memory communication.
[0043] The first virtual machine 101 can communicate with each production device 20 of the lithium battery assembly. For example, it can communicate with the production device 20 through an EtherCAT network card, so that each first physical core 201, which executes real-time control tasks, can send corresponding control commands to each production device 20 to control each production device 20 to perform corresponding operations. The first virtual machine 101 can also communicate with the second virtual machine 102. For example, by installing virtual network card drivers in the first virtual machine 101 and the second virtual machine 102 and assigning corresponding IP addresses, the first virtual machine 101 and the second virtual machine 102 can perform normal network communication.
[0044] In some embodiments, during the operation of the industrial control device 10, the industrial control device 10 can detect the current real-time control task executed by the first virtual machine 101 to determine the load status of each first physical core 201 based on the current real-time control task executed by the first virtual machine 101. For example, considering that different real-time control tasks require different hardware resources, the required number of physical cores can be preset for different real-time control tasks. For instance, different numbers of physical cores can be set for real-time control tasks with different control cycles. The speed of the control cycle is directly proportional to the number of physical cores; that is, a real-time control task with a faster control cycle requires more physical cores.
[0045] After detecting the current real-time control task being executed by the first virtual machine 101, the number of physical cores required to execute the current real-time control task can be determined based on the task, and then compared with the number of first physical cores 201 configured for the first virtual machine 101. If the number of physical cores is greater than or equal to the number of first physical cores 201, it indicates that the load on each first physical core 201 configured for the first virtual machine 101 is at full load when executing the current real-time control task. In this case, it can be determined that the load state of each first physical core 201 is at full load, that is, each first physical core 201 is operating at its design load limit. If the number of physical cores is less than the number of first physical cores 201, it indicates that the load on each first physical core 201 configured for the first virtual machine 101 is relatively small when executing the current real-time control task. Therefore, it can be determined that the load state of each first physical core 201 is at light load.
[0046] If each of the first physical kernels 201 is under full load, the shared physical kernel 203 can be allocated to the first virtual machine 101 via the service virtual machine 103. This allows the shared physical kernel 203 and each of the first physical kernels 201 to jointly execute the current real-time control task, thereby reducing the load pressure on each of the first physical kernels 201 and improving the execution efficiency of the current real-time control task. Since the first virtual machine 101 executes non-real-time tasks, such as data manipulation and edge data analysis, these non-real-time tasks can be processed when each of the second physical kernels 202 is idle. Therefore, the impact on the non-real-time control task is relatively small at this time. If each of the first physical kernels 201 is under light load, the shared physical kernel 203 can be allocated to the second virtual machine 102 via the service virtual machine 103. This allows the shared physical kernel 203 and each of the second physical kernels 202 to jointly execute non-real-time control tasks, thereby ensuring the processing efficiency of real-time tasks while also improving the processing efficiency of non-real-time tasks.
[0047] An industrial control device 10 is provided, which is equipped with a first virtual machine 101 running a real-time operating system and a second virtual machine 102 running a time-sharing operating system. The second virtual machine 102 is used to perform real-time control tasks to control the lithium battery component production equipment 20 in real time, and the first virtual machine 101 is used to perform non-real-time tasks. The industrial control device 10 includes at least one first physical kernel 201 configured for the first virtual machine 101, at least one second physical kernel 202 configured for the second virtual machine 102, and at least one shared physical kernel 203. The industrial control device 10 is used to determine the load status of each first physical kernel 201 configured for the first virtual machine 101 according to the current real-time control task executed by the first virtual machine 101, so as to determine the corresponding resource configuration strategy to allocate the shared physical kernel 203 to the first virtual machine 101 and the second virtual machine 102 according to the load status. The load status includes a full load status and a light load status. The resource configuration strategy corresponding to the full load status includes allocating the shared physical kernel 203 to the first virtual machine 101, and the resource configuration strategy corresponding to the light load status includes allocating the shared physical kernel 203 to the second virtual machine 102. By mounting a first virtual machine 101 running a real-time operating system and a second virtual machine 102 running a time-sharing operating system on the same industrial control device 10, more hardware resources are allocated to handle real-time control tasks when the first physical kernel 201 of the first virtual machine 101 is saturated with load. Since non-real-time control tasks can be processed when idle, allocating a shared physical kernel 203 to the first virtual machine 101 has a smaller impact on non-real-time control tasks, and can also reduce the operating pressure of each first physical kernel 201. When the first physical kernel 201 of the first virtual machine 101 is idle, more hardware resources are allocated to handle non-real-time control tasks, improving the processing efficiency of non-real-time control tasks. This can reduce the occurrence of situations where the hardware resources used to handle real-time or non-real-time control tasks cannot meet the operating requirements, thereby improving the production efficiency of lithium battery components.
[0048] To more accurately determine the load status of the first physical core 201 and further improve the rationality of hardware resource allocation, in some embodiments, the industrial control device 10 is specifically used for:
[0049] Based on the time parameters collected by the current real-time control task executed by the first virtual machine 101 and the comparison result with the preset time parameters, the load status of each of the first physical kernels 201 configured by the first virtual machine 101 is determined; wherein, if the time parameter is greater than the preset time parameter, the corresponding load status is a full load status, and if the time parameter is less than or equal to the preset time parameter, the corresponding load status is a light load status; the time parameter includes at least one of scan cycle or jitter time.
[0050] In some embodiments, the real-time control task executed by the first virtual machine 101 includes an EtherCAT motion control task and a logic control task. The EtherCAT motion control task is mainly used to collect time parameters of the real-time control task, such as the scan cycle and jitter time. The scan cycle can include the real-time scan cycle and the cyclic scan cycle of the logic control task. These time parameters can reflect whether any abnormalities occur during the execution of the real-time control task. If the collected time parameters of the real-time control task are less than or equal to the expected value, it indicates that the real-time control task can execute smoothly, meaning the execution process is normal. If the collected time parameters of the real-time control task are greater than the expected value, it indicates that the real-time control task cannot execute smoothly, meaning the execution process is abnormal. These time parameters are also affected by the load status of each first physical core 201. If each first physical core 201 is fully loaded, it cannot effectively execute the real-time control task, and the collected time parameters will appear abnormal.
[0051] Therefore, the industrial control device 10 can obtain the time parameters of the current real-time control task through the EtherCAT motion control task executed by the first virtual machine 101, such as at least one of the scan cycle or jitter time of the real-time control task. After obtaining the time parameters of the current real-time control task, the time parameters can be compared with the preset time parameters, i.e., the expected value. If the time parameter is greater than the preset time parameter, it can be determined that the load state of each first physical core 201 is full load; otherwise, it can be determined that the load state of each first physical core 201 is light load.
[0052] As one possible implementation, the time parameter can be a scan cycle. Once the scan cycle is obtained, it can be compared with a preset scan cycle. This preset scan cycle can be the maximum scan cycle measured when each first physical core 201 is under light load. If the scan cycle is greater than the preset scan cycle, it can be determined that each first physical core 201 is under full load; otherwise, it can be determined that each first physical core 201 is under light load. For example, the real-time scan cycle in the scan cycle can be compared with a preset real-time scan cycle, and the logic control task cyclic scan cycle in the scan cycle can be compared with a preset cyclic scan cycle. If the real-time scan cycle is greater than the preset real-time scan cycle, or the logic control task cyclic scan cycle is greater than the preset cyclic scan cycle, it can be determined that each first physical core 201 is under full load; otherwise, it can be determined that each first physical core 201 is under light load. The preset real-time scan cycle can be the maximum real-time scan cycle measured when each first physical core 201 is under light load, and the preset cyclic scan cycle can be the logic control task cyclic scan cycle measured when each first physical core 201 is under light load. Under normal circumstances, the real-time scanning cycle is usually less than 1ms, while the logic control task cyclic scanning cycle is usually less than 10ms. Therefore, the preset real-time scanning cycle can be set to 1ms, and the logic control task cyclic scanning cycle can be set to 10ms.
[0053] As another possible implementation, the time parameter can be the jitter time. Once the jitter time is obtained, it can be compared with a preset jitter time. This preset jitter time can be the maximum jitter time measured when each first physical core 201 is under light load. If the jitter time is greater than the preset jitter time, it can be determined that each first physical core 201 is under full load; otherwise, it can be determined that each first physical core 201 is under light load.
[0054] In this way, the load status of the physical kernels can be used to affect the time parameters collected by the EtherCAT motion control task. By using the time parameters collected by the EtherCAT motion control task in the current real-time control task executed by the first virtual machine 101, the load status of each first physical kernel 201 configured in the first virtual machine 101 can be determined, thereby improving the accuracy of load status determination and further improving the rationality of subsequent hardware resource allocation based on load status.
[0055] To further improve the accuracy of load status determination, in some embodiments, the industrial control device 10 is specifically used to: determine the load status as full load when the scanning cycle exceeds a preset scanning cycle or the jitter time exceeds a preset jitter time; or, determine the load status as light load when the scanning cycle is less than or equal to the preset scanning cycle and the jitter time is less than or equal to the preset jitter time.
[0056] In some embodiments, the time parameters may include a scan period and a jitter time. When the scan period and jitter time are obtained, the scan period can be compared with a preset scan period, and the jitter time can be compared with a preset jitter time. If the scan period is greater than the preset scan period, or the jitter time is greater than the preset jitter time, it can be determined that each first physical core 201 is in a fully loaded state; if the scan period is less than or equal to the preset scan period, and the jitter time is less than or equal to the preset scan period, it can be determined that each first physical core 201 is in a lightly loaded state. Therefore, when using time parameters to determine the load state of the first physical core 201, the judgment can be made from multiple dimensions, including the scan period and jitter time, improving the accuracy of load state determination.
[0057] The scan cycle being greater than the preset scan cycle can be defined as either a preset real-time scan cycle being greater than the preset real-time scan cycle, or a logic control task loop scan cycle being greater than the preset loop scan cycle. Otherwise, the scan cycle can be determined to be less than or equal to the preset scan cycle.
[0058] Considering that each of the first physical cores 201 is in a light-load state, it may be due to a malfunction in the lithium battery component production equipment 20. For example, during the lithium battery component manufacturing process, the production equipment 20 includes various process equipment, which are strongly coupled together by the material flow conveyor belt, forming a near-semi-discrete, semi-continuous manufacturing structure. When a process equipment malfunctions, materials accumulate at the malfunctioning equipment, while the equipment responsible for handling subsequent processes remains idle, waiting for the preceding process equipment 20 to repair the malfunction. At this time, the physical resources required for the real-time control task are relatively small, thus each of the first physical cores 201 is in a light-load state. However, after the malfunction is repaired, to avoid affecting the cycle time of the entire material flow line, the real-time control task will increase the cycle time of the production equipment 20 to perform high-load processing. At this time, the physical resources required for the real-time control task will suddenly increase, causing each of the first physical cores 201 to be unable to effectively handle the real-time control task. Therefore, in some embodiments, the industrial control device 10 is specifically used for:
[0059] If the load state is determined to be light load, the shared physical kernel 203 is allocated to the second virtual machine 102, and the fault information of the production equipment 20 is detected;
[0060] When the load state is light load, if the interval between the trigger time of the fault information and the current time reaches a preset time, the shared physical kernel 203 is allocated to the first virtual machine 101.
[0061] In some embodiments, when each of the first physical kernels 201 is under light load, the shared physical kernel 203 can be allocated to the second virtual machine 102 to detect whether there is fault information in the production equipment 20. For example, the second virtual machine 102 can collect the operating data of each process equipment in the production equipment 20 to determine whether there is fault information in the production equipment 20.
[0062] If no fault information is detected in the production equipment 20, it can be determined that the light load state of each first physical core 201 is not caused by the fault of the production equipment 20, and the shared physical core 203 will not be reallocated.
[0063] If a fault is detected in the production equipment 20, it can be determined that the light load state of each first physical core 201 is caused by the fault of the production equipment 20. At this time, the interval T = t2 - t1 can be obtained based on the trigger time of the fault information, i.e. the time t1 when the production equipment 20 malfunctions, and the current time t2.
[0064] After obtaining the interval duration, it can be compared with the preset duration. The preset duration can be set according to the actual situation, such as being the average fault repair time of production equipment 20, or less than the average fault repair time of production equipment 20.
[0065] Alternatively, the preset duration can be determined based on the fault repair duration corresponding to the fault information. For example, the fault type can be determined based on the fault information, and the fault repair duration of all faults of that fault type can be obtained. The average fault repair duration of each fault repair duration can then be determined as the preset duration, or the preset duration can be set to be less than the average fault repair duration of each fault repair duration. Alternatively, the shortest fault repair duration among all fault repair durations can be determined as the preset duration, or the preset duration can be set to be less than the shortest fault repair duration, in order to reduce the occurrence of situations where the interval duration has not yet reached the preset duration, but the load state of each first physical core 201 has already switched to full load state.
[0066] If the interval reaches the preset duration when the load state of each first physical core 201 is light, it indicates that the fault of the production equipment 20 may be about to be repaired, and the demand for hardware resources for the real-time control task may increase. At this time, the shared physical core 203 can be allocated to the first virtual machine 101 through the service virtual machine 103 to reduce the possibility that the physical resources required by the real-time control task will suddenly increase, causing each first physical core 201 to be unable to effectively handle the real-time control task, thereby further improving the processing efficiency of the real-time control task.
[0067] To further improve the processing efficiency of real-time control tasks, in some embodiments, the industrial control device 10 is also used to: when the shared physical kernel 203 is allocated to the first virtual machine 101, determine that the duration of the full load state of each of the first physical kernels 201 reaches a target duration, and allocate at least one second physical kernel 202 to the first virtual machine 101.
[0068] Considering that the real-time control tasks executed by the first virtual machine 101 may require a large amount of physical resources, simply adding a shared physical kernel 203 to the first virtual machine 101 may still not be enough to remove each first physical kernel 201 from a fully loaded state. For example, if the production equipment 20 experiences a prolonged failure period, resulting in a large accumulation of materials, even adding a shared physical kernel 203 to the first virtual machine 101 during the repair process may not meet the physical resource requirements of the real-time control tasks. Therefore, when allocating the shared physical kernel 203 to the first virtual machine 101, it is necessary to detect whether the load status of each first physical kernel 201 is at full load. If the duration of full load for each of the first physical cores 201 is less than the target duration, it indicates an abnormal fluctuation in load, and no reallocation of physical resources is required. If the duration reaches the target duration, it indicates that the number of physical cores allocated to the first virtual machine 101 is insufficient to fully meet the physical resource requirements of the real-time control task. In this case, the second physical cores 202 of the second virtual machine 102 can be allocated through the service virtual machine 103 to allocate at least one second physical core 202 to the first virtual machine 101. The target duration can be set according to the actual situation.
[0069] For example, when allocating at least one second physical core 202 to the first virtual machine 101, a single second physical core 202 can be allocated to the first virtual machine 101 at least once, until the first physical core 201 exits the full-load state, or the number of second physical cores 202 currently configured in the second virtual machine 102 reaches a preset number. The preset number is the minimum number of physical cores required for the second virtual machine 102 to execute non-real-time tasks, such as a preset number of 1. For instance, assuming the number of second physical cores 202 allocated to the second virtual machine 102 is 3, when allocating at least one second physical core 202 to the first virtual machine 101, one second physical core 202 can be allocated to the first virtual machine 101 first. If all first physical cores 201 exit the full-load state at this point, the allocation of the second physical core 202 ends; if they do not exit the full-load state, another second physical core 202 is allocated to the first virtual machine 101. Since only one second physical core 202 remains for the second virtual machine 102 at this point, the allocation of the second physical core 202 ends to avoid the inability to handle non-real-time control tasks.
[0070] Since the non-real-time tasks executed by the second virtual machine 102 can be executed when the load is idle, allocating the second physical kernel 202 to the first virtual machine 101 has a smaller impact on the non-real-time control tasks. At the same time, more physical resources can be allocated to the real-time control tasks to meet the physical resource requirements of the high-load real-time control tasks as much as possible, thereby further improving the processing efficiency of the real-time control tasks.
[0071] Alternatively, in some embodiments, the industrial control device 10 is further configured to: when the shared physical kernel 203 is allocated to the first virtual machine 101, determine that the duration of the full load state of each of the first physical kernels 201 reaches a target duration, and share each of the second physical kernels 202 to the first virtual machine 101.
[0072] In some embodiments, when the shared physical kernel 203 is allocated to the first virtual machine 101, the load status of each first physical kernel 201 can be detected as fully loaded. If the duration of the fully loaded state of each first physical kernel 201 reaches a target duration, it indicates that the number of physical kernels allocated to the first virtual machine 101 cannot fully meet the physical resource requirements of the real-time control task. In this case, the second physical kernels 202 of the second virtual machine 102 can be shared with the first virtual machine 101 through the service virtual machine 103, so that the first virtual machine 101 can jointly execute the real-time control task through each first physical kernel 201, each second physical kernel 202, and the shared physical kernel 203, thereby further improving the processing efficiency of the real-time control task. Since the non-real-time tasks executed by the second virtual machine 102 can be executed when the load is idle, sharing each second physical kernel 202 with the first virtual machine 101 has a smaller impact on non-real-time control tasks, while also meeting the physical resource requirements of high-load real-time control tasks as much as possible, thereby further improving the processing efficiency of real-time control tasks.
[0073] Figure 2 A flowchart illustrating a configuration method for an industrial control device according to an embodiment of this application is shown. This configuration method for the industrial control device is applied to the industrial control device in any of the above embodiments.
[0074] In some embodiments, the configuration method of the industrial control device includes:
[0075] S101, based on the current real-time control task being executed by the first virtual machine, determine the load status of each of the first physical kernels configured for the first virtual machine;
[0076] S102, Based on the load status, determine the corresponding resource configuration strategy to allocate the shared physical kernel between the first virtual machine and the second virtual machine;
[0077] The load states include full load and light load states. The resource configuration strategy corresponding to the full load state includes allocating the shared physical kernel to the first virtual machine, and the resource configuration strategy corresponding to the light load state includes allocating the shared physical kernel to the second virtual machine.
[0078] When the first physical kernel of the first virtual machine is saturated with load, more hardware resources are allocated to handle real-time control tasks. Since non-real-time control tasks can be processed when idle, allocating shared physical kernels to the first virtual machine has little impact on non-real-time control tasks and can also reduce the operating pressure of each first physical kernel. When the first physical kernel of the first virtual machine is idle, more hardware resources are allocated to handle non-real-time control tasks, improving the processing efficiency of non-real-time control tasks. This can reduce the occurrence of situations where hardware resources used to handle real-time or non-real-time control tasks cannot meet the operating requirements, thereby improving the production efficiency of lithium battery components.
[0079] In some embodiments, determining the load state of each of the first physical cores configured for the first virtual machine based on the current real-time control task executed by the first virtual machine includes: determining the load state of each of the first physical cores configured for the first virtual machine based on a comparison result between a time parameter collected by the current real-time control task executed by the first virtual machine and a preset time parameter; wherein, if the time parameter is greater than the preset time parameter, the corresponding load state is a full load state, and if the time parameter is less than or equal to the preset time parameter, the corresponding load state is a light load state; the time parameter includes at least one of scan cycle or jitter time.
[0080] In some embodiments, the load state of each of the first physical kernels configured for the first virtual machine is determined based on the time parameters collected by the current real-time control task executed by the first virtual machine, including: determining the load state as a full load state when the scan cycle exceeds a preset scan cycle or the jitter time exceeds a preset jitter time; or determining the load state as a light load state when the scan cycle is less than or equal to the preset scan cycle and the jitter time is less than or equal to the preset jitter time.
[0081] In some embodiments, based on the load state, a corresponding resource configuration strategy is determined to allocate the shared physical kernel to the first virtual machine and the second virtual machine, including: determining that the load state is a light load state, allocating the shared physical kernel to the second virtual machine, and detecting the fault information of the production equipment; when the load state is a light load state, determining that the interval between the trigger time of the fault information and the current time reaches a preset duration, and allocating the shared physical kernel to the first virtual machine.
[0082] In some embodiments, the preset duration is determined based on the fault repair duration corresponding to the fault information.
[0083] In some embodiments, the method further includes: when allocating the shared physical kernel to the first virtual machine, determining that the duration for which the load state of each of the first physical kernels is in a fully loaded state reaches a target duration, and allocating at least one second physical kernel to the first virtual machine.
[0084] In some embodiments, the method further includes: when allocating the shared physical kernels to the first virtual machine, determining that the duration of the full load state of each of the first physical kernels reaches a target duration, and sharing each of the second physical kernels to the first virtual machine.
[0085] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below. In some embodiments, such as Figure 3 As shown, a configuration method for an industrial control device is provided. This configuration method is applied to the industrial control device in any of the above embodiments and includes:
[0086] S201, based on the time parameters collected by the EtherCAT motion control task in the current real-time control task executed by the first virtual machine, the load status of each first physical core configured for the first virtual machine is obtained. The time parameters include the scan period and jitter time. If the scan period exceeds a preset scan period, or the jitter time exceeds a preset jitter time, the load status is determined to be full load; or, if the scan period is less than or equal to the preset scan period, and the jitter time is less than or equal to the preset jitter time, the load status is determined to be light load.
[0087] S202, determine that the load status is light, allocate the shared physical kernel to the second virtual machine, and detect the fault information of the production equipment.
[0088] S203, under light load conditions, if the interval between the trigger time of the fault information and the current time reaches a preset duration, allocate the shared physical kernel to the first virtual machine. The preset duration is determined based on the fault repair duration corresponding to the fault information.
[0089] S204, if the load status is determined to be full, allocate the shared physical kernel to the first virtual machine.
[0090] S205, if a shared physical kernel is allocated to a first virtual machine, and the duration of the full load state of each first physical kernel reaches the target duration, at least one second physical kernel is allocated to the first virtual machine; or, each second physical kernel is shared to the first virtual machine.
[0091] Figure 4The diagram shows a schematic structural block diagram of a configuration device for an industrial control equipment according to an embodiment of this application. It should be understood that this device is related to... Figure 2 The method embodiments executed in this document correspond to the steps involved in the aforementioned method. The specific functions of this device can be found in the description above; to avoid repetition, detailed descriptions are omitted here. This device includes at least one software functional module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware. Specifically, this device can be applied to industrial control equipment in any of the above embodiments. The device includes: a status determination module 301, used to determine the load status of each of the first physical kernels configured for the first virtual machine based on the current real-time control task executed by the first virtual machine; and a resource configuration module 302, used to determine a corresponding resource configuration strategy to allocate the shared physical kernels between the first virtual machine and the second virtual machine based on the load status; wherein the load status includes a full-load state and a light-load state, the resource configuration strategy corresponding to the full-load state includes allocating the shared physical kernels to the first virtual machine, and the resource configuration strategy corresponding to the light-load state includes allocating the shared physical kernels to the second virtual machine.
[0092] In the technical solution of this application embodiment, when the first physical kernel of the first virtual machine is saturated with load, more hardware resources are allocated to process real-time control tasks. Since non-real-time control tasks can be processed when idle, allocating shared physical kernels to the first virtual machine has little impact on non-real-time control tasks, and can also reduce the operating pressure of each first physical kernel. When the first physical kernel of the first virtual machine is idle, more hardware resources are allocated to process non-real-time control tasks, improving the processing efficiency of non-real-time control tasks. This can reduce the occurrence of situations where hardware resources used to process real-time or non-real-time control tasks cannot meet the operating requirements, thereby improving the production efficiency of lithium battery components.
[0093] According to some embodiments of this application, the state determination module 301 is specifically used to: determine the load state of each of the first physical kernels configured by the first virtual machine based on the comparison result of the time parameter collected by the current real-time control task executed by the first virtual machine and the preset time parameter; wherein, if the time parameter is greater than the preset time parameter, the corresponding load state is a full load state, and if the time parameter is less than or equal to the preset time parameter, the corresponding load state is a light load state; the time parameter includes at least one of scan cycle or jitter time.
[0094] According to some embodiments of this application, the state determination module 301 is specifically used to: determine the load state as a full load state when the scanning cycle exceeds a preset scanning cycle or the jitter time exceeds a preset jitter time; or, determine the load state as a light load state when the scanning cycle is less than or equal to the preset scanning cycle and the jitter time is less than or equal to the preset jitter time.
[0095] According to some embodiments of this application, the resource configuration module 302 is specifically used to: determine that the load state is a light load state, allocate the shared physical kernel to the second virtual machine, and detect the fault information of the production equipment; when the load state is a light load state, determine that the interval between the trigger time of the fault information and the current time reaches a preset duration, and allocate the shared physical kernel to the first virtual machine.
[0096] According to some embodiments of this application, the preset duration is determined based on the fault repair duration corresponding to the fault information.
[0097] According to some embodiments of this application, the resource configuration module 302 is further configured to: when the shared physical kernel is allocated to the first virtual machine, determine that the duration of the full load state of each of the first physical kernels reaches a target duration, and allocate at least one second physical kernel to the first virtual machine.
[0098] According to some embodiments of this application, the resource configuration module 302 is further configured to: when allocating the shared physical kernels to the first virtual machine, determine that the duration of the full load state of each of the first physical kernels reaches a target duration, and share each of the second physical kernels to the first virtual machine.
[0099] According to some embodiments of this application, such as Figure 5As shown, this application embodiment provides an electronic device 400, including: a processor 401 and a memory 402. The processor 401 and the memory 402 are interconnected and communicate with each other through a communication bus 403 and / or other forms of connection mechanism (not shown). The memory 402 stores a computer program executable by the processor 401. When the computing device is running, the processor 401 executes the computer program to execute a configuration method for an industrial control device in any optional implementation. For example: based on the current real-time control task executed by the first virtual machine, the load state of each of the first physical kernels configured for the first virtual machine is determined; based on the load state, a corresponding resource configuration strategy is determined to allocate the shared physical kernels to the first virtual machine and the second virtual machine; wherein, the load state includes a full load state and a light load state, the resource configuration strategy corresponding to the full load state includes allocating the shared physical kernels to the first virtual machine, and the resource configuration strategy corresponding to the light load state includes allocating the shared physical kernels to the second virtual machine.
[0100] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the method in any of the aforementioned optional implementations.
[0101] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0102] This application provides a computer program product that, when run on a computer, causes the computer to perform a method in any of the optional implementations.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. An industrial control device, characterized in that, The industrial control device is equipped with a first virtual machine running a real-time operating system and a second virtual machine running a time-sharing operating system; the first virtual machine is used to perform real-time control tasks to control the lithium battery component production equipment in real time, and the second virtual machine is used to perform non-real-time tasks; the industrial control device includes at least one first physical kernel configured for the first virtual machine, at least one second physical kernel configured for the second virtual machine, and at least one shared physical kernel. The industrial control device is used to determine the load status of each of the first physical kernels configured for the first virtual machine based on the current real-time control task executed by the first virtual machine, so as to determine the corresponding resource configuration strategy to allocate the shared physical kernels to the first virtual machine and the second virtual machine based on the load status. The load state includes a full load state and a light load state. The resource configuration strategy corresponding to the full load state includes allocating the shared physical kernel to the first virtual machine, and the resource configuration strategy corresponding to the light load state includes allocating the shared physical kernel to the second virtual machine. The production equipment includes equipment for each process step, and these equipment steps are strongly coupled together by a material flow conveyor belt; and The industrial control equipment is specifically used for: The load state is determined to be light load state, the shared physical kernel is allocated to the second virtual machine, and the fault information of the production equipment is detected; the detection of the fault information of the production equipment includes: collecting the operating data of each process equipment in the production equipment through the second virtual machine to determine whether there is fault information in the production equipment; If a fault is detected in the production equipment, and it is determined that the light load state of each first physical core is caused by a fault in the production equipment, then when the load state is light load, if the interval between the trigger time of the fault information and the current time reaches a preset time, the shared physical core is allocated to the first virtual machine.
2. The industrial control equipment according to claim 1, characterized in that, The industrial control equipment is specifically used for: Based on the comparison between the time parameters collected by the current real-time control task executed by the first virtual machine and the preset time parameters, the load status of each of the first physical kernels configured by the first virtual machine is determined. Wherein, if the time parameter is greater than the preset time parameter, the corresponding load state is a full load state; if the time parameter is less than or equal to the preset time parameter, the corresponding load state is a light load state; the time parameter includes at least one of scanning cycle or jitter time.
3. The industrial control equipment according to claim 2, characterized in that, The industrial control equipment is specifically used for: If the scanning cycle exceeds a preset scanning cycle, or the jitter time exceeds a preset jitter time, the load state is determined to be a full load state; or, If the scan cycle is less than or equal to the preset scan cycle and the jitter time is less than or equal to the preset jitter time, the load state is determined to be a light load state.
4. The industrial control equipment according to claim 1, characterized in that, The preset duration is determined based on the fault repair duration corresponding to the fault information.
5. The industrial control equipment according to any one of claims 1-4, characterized in that, The industrial control equipment is also used for: When the shared physical kernel is allocated to the first virtual machine, if the duration of the full load state of each of the first physical kernels reaches the target duration, at least one second physical kernel is allocated to the first virtual machine.
6. The industrial control equipment according to any one of claims 1-4, characterized in that, The industrial control equipment is also used for: When the shared physical kernels are allocated to the first virtual machine, if the duration of the full load state of each of the first physical kernels reaches the target duration, then each of the second physical kernels is shared to the first virtual machine.
7. A method for configuring industrial control equipment, characterized in that, Applied to the industrial control equipment as described in any one of claims 1-6, the method comprises: Based on the current real-time control task being executed by the first virtual machine, determine the load status of each of the first physical kernels configured for the first virtual machine; Based on the load status, a corresponding resource configuration strategy is determined to allocate the shared physical kernel between the first virtual machine and the second virtual machine; The load state includes a full load state and a light load state. The resource configuration strategy corresponding to the full load state includes allocating the shared physical kernel to the first virtual machine, and the resource configuration strategy corresponding to the light load state includes allocating the shared physical kernel to the second virtual machine. The production equipment includes equipment for each process, and the equipment for each process is strongly coupled together by the logistics line conveyor belt. Specifically, the load state is determined to be a light load state, the shared physical kernel is allocated to the second virtual machine, and the fault information of the production equipment is detected; the detection of the fault information of the production equipment includes: collecting the operating data of each process equipment in the production equipment through the second virtual machine to determine whether there is fault information in the production equipment; If a fault is detected in the production equipment, and it is determined that the light load state of each first physical core is caused by a fault in the production equipment, then when the load state is light load, if the interval between the trigger time of the fault information and the current time reaches a preset time, the shared physical core is allocated to the first virtual machine.
8. A configuration device for industrial control equipment, characterized in that, Applied to the industrial control equipment as described in any one of claims 1-6, the device comprises: The status determination module is used to determine the load status of each of the first physical kernels configured for the first virtual machine based on the current real-time control task being executed by the first virtual machine. The resource configuration module is used to determine the corresponding resource configuration strategy based on the load status to allocate the shared physical kernel between the first virtual machine and the second virtual machine; The load states include full load and light load. The resource allocation strategy corresponding to the full load state includes allocating the shared physical kernel to the first virtual machine, and the resource allocation strategy corresponding to the light load state includes allocating the shared physical kernel to the second virtual machine. The production equipment includes equipment for each process, which is strongly coupled together by a conveyor belt. The process involves determining that the load state is light load, allocating the shared physical kernel to the second virtual machine, and detecting fault information in the production equipment. Detecting fault information in the production equipment includes: collecting operating data of each process device in the production equipment through the second virtual machine to determine whether fault information exists in the production equipment. If fault information is detected, and it is determined that the light load state of each first physical kernel is caused by a fault in the production equipment, then, in the case of a light load state, if the interval between the trigger time of the fault information and the current time reaches a preset duration, the shared physical kernel is allocated to the first virtual machine.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the configuration method of the industrial control equipment as described in claim 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the configuration method of the industrial control equipment as described in claim 7.
Citation Information
Patent Citations
Load balancing method based on KVM virtual cluster
CN104994145A
Method, device and physical machine for dynamically allocating CPU resources
CN109144706A
Task processing method and device, electronic equipment and computer readable storage medium
CN114327767A