State synchronization method, apparatus and system for digital twin, and device and medium
By acquiring and comparing the state sequences of the virtual control system and mapping objects of the digital twin, and using sliding windows and knowledge bases to determine the expected state, the problem of low efficiency of digital twin state synchronization is solved, and efficient and low-cost state synchronization is achieved, ensuring that The normal operation and efficiency of the system.
Patent Information
- Application Number
- PCT/CN2023/104156
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-01-02
AI Technical Summary
The prior art is difficult to effectively synchronize the state of the digital twin with its mapping objects, resulting in low efficiency, high cost and large workload of state synchronization, and it is difficult to deal with various possible situations, affecting the normal operation and efficiency of the system.
By obtaining the state sequence of the virtual control system of the digital twin and the mapping object, establishing an association relationship using the sliding window and the knowledge base, determining the desired state based on the second state sequence, and updating the state of the digital twin to achieve synchronization.
It improves the efficiency of state synchronization, reduces implementation costs and workload, ensures the normal operation and work efficiency of mapped objects, and simplifies the state synchronization process.
Smart Images

Figure CN2023104156_02012025_PF_FP_ABST
Abstract
Description
Digital twin state synchronization method, device, system, equipment and medium Technical Field
[0001] The present invention relates to the field of digital twin technology, and in particular to a state synchronization method, device, system, equipment and medium for digital twins. Background Art
[0002] Digital Twin makes full use of data such as physical models, sensor updates, and operation history, integrates multi-disciplinary, multi-physical quantity, multi-scale, and multi-probability simulation processes, and completes mapping in virtual space, thereby reflecting the entire life cycle of the corresponding physical equipment.
[0003] How to synchronize the state of the digital twin with the mapped object (e.g., the physical production system) is a key requirement.
[0004] Summary of the Invention
[0005] The embodiments of the present invention provide a state synchronization method, apparatus, system, equipment and medium for digital twins.
[0006] A state synchronization method for a digital twin, comprising:
[0007] Acquire a first state sequence and a second state sequence, wherein the first state sequence represents a state of a virtual control system of the digital twin, and the second state sequence represents a state of a control system of a mapping object of the digital twin;
[0008] When the first state sequence and the second state sequence are inconsistent, determining the desired state of the digital twin based on the second state sequence;
[0009] Update the state of the digital twin to the desired state.
[0010] It can be seen that compared with the existing technology of simultaneously setting the digital twin and the mapping object to achieve state synchronization, in the embodiment of the present invention, when the first state sequence and the second state sequence are inconsistent, the expected state of the digital twin is determined based on the second state sequence of the virtual control system representing the digital twin, which improves the efficiency of state synchronization, reduces the implementation cost and workload, ensures the normal operation of the mapping object, and improves the work efficiency of the mapping object.
[0011] In one embodiment, it includes:
[0012] When the first state sequence and the second state sequence are inconsistent, the current state of the digital twin virtual control system is updated to the latest state in the second state sequence.
[0013] Therefore, when the first state sequence and the second state sequence are inconsistent, the latest state in the second state sequence can be directly used to update the current state of the virtual control system, thereby achieving timely update of the state of the virtual control system.
[0014] In one embodiment, it includes:
[0015] Running a simulation process that controls the digital twin via the virtual control system;
[0016] Synchronously collecting multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence;
[0017] A knowledge base including an association relationship between the first acquisition state sequence and the second acquisition state sequence is generated.
[0018] It can be seen that in the simulation process of the virtual control system controlling the digital twin, the respective state sequences of the virtual control system and the digital twin are collected synchronously, and a knowledge base containing the association relationship between the two state sequences is established, which facilitates the subsequent determination of the expected state based on the knowledge base.
[0019] In one embodiment, determining the desired state of the digital twin based on the second state sequence includes:
[0020] Taking the second state sequence as a comparison target, determining a hit region that meets the comparison target from the first acquisition state sequence of the knowledge base;
[0021] Determining, from the second acquired state sequence, the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area;
[0022] The latest state of the digital twin is determined as the expected state.
[0023] Therefore, by comparing the second state sequence with the knowledge base as the comparison target, the expected state of the digital twin can be conveniently determined.
[0024] In one embodiment, the second state sequence has a predetermined time length;
[0025] The step of using the second state sequence as a comparison target and determining a hit region that meets the comparison target from the first acquisition state sequence of the knowledge base includes:
[0026] Sliding a time window having the time length in a first acquisition state sequence of the knowledge base;
[0027] determining a region within the time window that has a maximum similarity to the second state sequence;
[0028] The region with the greatest similarity is determined as the hit region.
[0029] It can be seen that the hit area can be quickly determined through sliding window processing.
[0030] In one embodiment, it includes:
[0031] Obtaining the current state of the virtual control system;
[0032] When the current state is the same as the latest state in the first state sequence, updating the timestamp of the latest state to the timestamp of the current state;
[0033] When the current state is different from the latest state in the first state sequence, the current state is added to the first state sequence.
[0034] Therefore, by comparing the current state of the virtual control system with the latest state in the first state sequence, the first state sequence can be expanded or the timestamp updated, thereby achieving timely update of the first state sequence.
[0035] In one embodiment, it includes:
[0036] Obtaining the current state of the control system;
[0037] When the current state is the same as the latest state in the second state sequence, updating the timestamp of the latest state to the timestamp of the current state;
[0038] When the current state is different from the latest state in the second state sequence, the current state is added to the second state sequence.
[0039] Therefore, by controlling the comparison process between the current state of the control system and the latest state in the second state sequence, the second state sequence can be expanded or the timestamp updated, thereby achieving timely update of the second state sequence.
[0040] A state synchronization device for a digital twin, comprising:
[0041] An acquisition module, configured to acquire a first state sequence and a second state sequence, wherein the first state sequence represents the state of the virtual control system of the digital twin, and the second state sequence represents the state of the control system of the mapping object of the digital twin;
[0042] a determination module, configured to determine a desired state of the digital twin based on the second state sequence when the first state sequence and the second state sequence are inconsistent;
[0043] An updating module is used to update the state of the digital twin to the desired state.
[0044] It can be seen that compared with the existing technology of simultaneously setting the digital twin and the mapping object to achieve state synchronization, in the embodiment of the present invention, when the first state sequence and the second state sequence are inconsistent, the expected state of the digital twin is determined based on the second state sequence of the virtual control system representing the digital twin, which improves the efficiency of state synchronization, reduces the implementation cost and workload, ensures the normal operation of the mapping object, and improves the work efficiency of the mapping object.
[0045] In one embodiment, the determination module is used to update the current state of the digital twin virtual control system to the latest state in the second state sequence when the first state sequence and the second state sequence are inconsistent.
[0046] Therefore, when the first state sequence and the second state sequence are inconsistent, the latest state in the second state sequence can be directly used to update the current state of the virtual control system, thereby achieving timely update of the state of the virtual control system.
[0047] In one embodiment, the determination module is used to run a simulation process of controlling the digital twin via the virtual control system; synchronously collect multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; and generate a knowledge base containing the association relationship between the first collected state sequence and the second collected state sequence.
[0048] It can be seen that in the simulation process of the virtual control system controlling the digital twin, the respective state sequences of the virtual control system and the digital twin are collected synchronously, and a knowledge base containing the association relationship between the two state sequences is established, which facilitates the subsequent determination of the expected state based on the knowledge base.
[0049] In one embodiment, the determination module is used to take the second state sequence as a comparison target, and determine a hit area that meets the comparison target from the first collected state sequence of the knowledge base; determine the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area from the second collected state sequence; and determine the latest state of the digital twin as the expected state.
[0050] Therefore, by comparing the second state sequence with the knowledge base as the comparison target, the expected state of the digital twin can be conveniently determined.
[0051] In one embodiment, the second state sequence has a predetermined time length;
[0052] The determination module is used to slide a time window with the time length in the first acquisition state sequence of the knowledge base; determine the area in the time window that has the greatest similarity with the second state sequence; and determine the area with the greatest similarity as the hit area.
[0053] It can be seen that the hit area can be quickly determined through sliding window processing.
[0054] A digital twin state synchronization system, comprising:
[0055] a virtual control system for controlling the digital twin;
[0056] A control system for controlling the mapped object of the digital twin;
[0057] A state synchronization device is used to obtain a first state sequence and a second state sequence, wherein the first state sequence represents the state of the virtual control system of the digital twin, and the second state sequence represents the state of the control system of the mapping object of the digital twin; when the first state sequence and the second state sequence are inconsistent, determining the expected state of the digital twin based on the second state sequence; and updating the state of the digital twin to the expected state.
[0058] It can be seen that compared with the existing technology of simultaneously setting the digital twin and the mapping object to achieve state synchronization, in the embodiment of the present invention, when the first state sequence and the second state sequence are inconsistent, the expected state of the digital twin is determined based on the second state sequence of the virtual control system representing the digital twin, which improves the efficiency of state synchronization, reduces the implementation cost and workload, ensures the normal operation of the mapping object, and improves the work efficiency of the mapping object.
[0059] In one embodiment, the state synchronization device is used to run a simulation process of controlling the digital twin via the virtual control system; synchronously collect multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; and generate a knowledge base containing the association relationship between the first collected state sequence and the second collected state sequence.
[0060] It can be seen that in the simulation process of the virtual control system controlling the digital twin, the respective state sequences of the virtual control system and the digital twin are collected synchronously, and a knowledge base containing the association relationship between the two state sequences is established, which facilitates the subsequent determination of the expected state based on the knowledge base.
[0061] In one embodiment, the state synchronization device is used to take the second state sequence as a comparison target, determine a hit area that meets the comparison target from the first collected state sequence of the knowledge base; determine the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area from the second collected state sequence; and determine the latest state of the digital twin as the expected state.
[0062] Therefore, by comparing the second state sequence with the knowledge base as the comparison target, the expected state of the digital twin can be conveniently determined.
[0063] In one embodiment, the second state sequence has a predetermined time length;
[0064] The state synchronization device is used to slide a time window with the time length in the first acquisition state sequence of the knowledge base; determine the area within the time window that has the greatest similarity with the second state sequence; and determine the area with the greatest similarity as the hit area.
[0065] It can be seen that the hit area can be quickly determined through sliding window processing.
[0066] An electronic device, comprising:
[0067] processor;
[0068] a memory for storing executable instructions of the processor;
[0069] The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the state synchronization method of the digital twin as described in any one of the above items.
[0070] A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the state synchronization method of a digital twin as described in any one of the above items.
[0071] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the state synchronization method of a digital twin as described in any one of the above items is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, so that those skilled in the art will understand the above and other features and advantages of the present invention more clearly. In the accompanying drawings:
[0073] FIG1 is a flowchart of a state synchronization method of a digital twin according to an embodiment of the present invention.
[0074] FIG. 2 is an exemplary schematic diagram of a first state sequence and a second state sequence according to an embodiment of the present invention.
[0075] FIG3 is an exemplary flow chart of generating a state sequence according to an embodiment of the present invention.
[0076] FIG4 is an exemplary schematic diagram of generating a knowledge base according to an embodiment of the present invention.
[0077] FIG5 is an exemplary schematic diagram of determining a desired state of a digital twin according to an embodiment of the present invention.
[0078] FIG6 is a structural diagram of a state synchronization system of a digital twin according to an embodiment of the present invention.
[0079] FIG7 is a structural diagram of a state synchronization device for a digital twin according to an embodiment of the present invention.
[0080] FIG8 is a structural diagram of an electronic device according to an embodiment of the present invention.
[0081] The accompanying drawings are numerals as follows: DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail with reference to the following examples.
[0083] For the sake of brevity and intuitiveness in description, the solution of the present invention is explained below by describing several representative implementations. A large number of details in the implementations are only used to help understand the solution of the present invention. However, it is obvious that the technical solution of the present invention may not be limited to these details when implemented. In order to avoid unnecessarily obscuring the solution of the present invention, some implementations are not described in detail, but only a framework is given. Hereinafter, "including" means "including but not limited to", and "according to..." means "at least according to..., but not limited to only according to...". Due to the language habits of Chinese, when the number of a component is not specifically specified below, it means that the component can be one or more, or can be understood as at least one.
[0084] During product development, digital twins can virtually construct digital models of products for simulation testing and verification. During product manufacturing, digital twins can simulate equipment operation and changes resulting from parameter adjustments. Keeping the state of the digital twin synchronized with the mapped object (e.g., the physical production system) is a key requirement. For example, when building industrial metaverse applications, the physical production system needs to be projected into a virtual space for monitoring, analysis, and prediction. The key issue here is synchronizing the state of the digital twin of the physical production system with the physical production system.
[0085] The applicant found that it is difficult to achieve such state synchronization in real life. The main reasons include at least: (1) Insufficient sensing points: It is not economical to add additional sensors to detect the state of the physical production system. (2) It is difficult to establish a digital twin of the physical production system that takes into account all possibilities. Under normal circumstances, only normal conditions and some abnormal conditions can be considered when modeling the digital twin. If more possible conditions that physical production may face are included, the workload will increase significantly. (3) Limited bandwidth and communication delay: It is difficult to transmit large amounts of data between the digital twin and the physical production system.
[0086] The embodiment of the present invention proposes a general technical solution with low-cost implementation, which can synchronize the state of the digital twin with the mapping object, reduce the implementation cost and workload, ensure the normal operation of the mapping object, and improve the work efficiency of the mapping object.
[0087] Figure 1 is a flow chart of a state synchronization method for a digital twin according to an embodiment of the present invention. As shown in Figure 1 , the method includes:
[0088] Step 101: Obtain a first state sequence and a second state sequence, wherein the first state sequence represents the state of the virtual control system of the digital twin, and the second state sequence represents the state of the control system of the mapping object of the digital twin.
[0089] A digital twin is a simulation model that represents the object it maps to, such as a physical production line. The object that the digital twin maps to can be implemented as a real production system in the physical world. For example, the object that the digital twin maps to can be a production line. The control system of the mapped object (usually a real control system in the physical world) is used to drive the mapped object. For example, the control system of the mapped object can be implemented as a programmable logic controller (PLC) with control logic (e.g., a program). The virtual control system drives the digital twin. The digital twin can receive commands from its virtual control system and trigger actions. For example, the digital twin can be a production line simulation model in Tecnomatix factory simulation, and the virtual control system can be implemented as a PLC simulator with the same control logic as the control system of the object that the digital twin maps to. When conditions in the digital twin change, the digital twin generates sensor data, which will be fed into the virtual control system.
[0090] The specific method of obtaining the first state sequence and the second state sequence is described below.
[0091] Method (1): Based on a predetermined acquisition time sequence, a first state sequence and a second state sequence are acquired.
[0092] In method (1), the first state sequence can be implemented as a state sequence of a virtual control system based on an acquisition time sequence. Correspondingly, the second state sequence is a state sequence of a virtual control system based on the same acquisition time sequence. The first state sequence and the second state sequence are synchronized in time. That is, each state in the first state sequence is synchronized with the corresponding state in the second state sequence in acquisition time. Preferably, the first state sequence contains the latest state of the virtual control system (located at the latest acquisition time point of the first state sequence), and the second state sequence contains the latest state of the control system of the mapping object (located at the latest acquisition time point of the second state sequence). In this method of obtaining the first state sequence and the second state sequence, the same acquisition time sequence is used, so the first state sequence and the second state sequence can be obtained conveniently. However, since the state may not change for a long time, the length of the first state sequence and the second state sequence may be long.
[0093] Method (2): When the state of the virtual control system changes, a state is added to the first state sequence; when the state of the control system changes, a state is added to the second state sequence.
[0094] In mode (2), a state record is added to the first state sequence and the second state sequence only when the state changes, thereby preventing the first state sequence and the second state sequence from becoming too long.
[0095] In one embodiment, the method includes: obtaining the current state of the virtual control system; when the current state is the same as the latest state in a first state sequence, updating the timestamp of the latest state to the timestamp of the current state; when the current state is different from the latest state in the first state sequence, adding the current state to the first state sequence. In one embodiment, the method includes: obtaining the current state of the control system; when the current state is the same as the latest state in a second state sequence, updating the timestamp of the latest state to the timestamp of the current state; when the current state is different from the latest state in the second state sequence, adding the current state to the second state sequence.
[0096] Figure 3 is an exemplary flow chart of generating a state sequence according to an embodiment of the present invention. The method can be applied to generate a first state sequence and a second state sequence.
[0097] As shown in FIG3 , the method includes:
[0098] Step 301: Get the current state.
[0099] Step 302: Determine whether the current state is the same as the latest state in the state sequence. If they are the same, execute step 303 (corresponding to the "Y" branch); if they are different, execute step 304 (corresponding to the "N" branch) and end this process.
[0100] Step 303: Update the timestamp of the latest state to the timestamp of the current state, and end this process.
[0101] Step 304: Add the current state to the state sequence and end this process.
[0102] For example, assume that the latest state in the first state sequence (i.e., the latest entry in the first state sequence) includes input value A, output value B, and virtual register value C, with a timestamp of D. The current state of the virtual control system, as currently acquired, includes input value A, output value B, and virtual register value C, with a timestamp of E (the current time). Since the current state is the same as the latest state in the first state sequence, we only need to change the timestamp of the latest entry in the first state sequence from D to E.
[0103] For another example, assume that the latest state in the first state sequence (i.e., the latest entry in the first state sequence) includes: input value A, output value B, and virtual register value F, with a timestamp of D. The current state of the virtual control system currently being collected includes: input value A, output value B, and virtual register value C, with a timestamp of E (current time). Because the current state is different from the latest state in the first state sequence, a new entry needs to be added to the first state sequence. The contents of this new entry are: input value A, output value B, and virtual register value C, with a timestamp of E. The new entry is updated to become the latest state in the first state sequence.
[0104] Therefore, by comparing the current state of the virtual control system with the latest state in the first state sequence, the first state sequence can be expanded or the timestamp updated, thereby achieving timely update of the first state sequence.
[0105] For example, assume the latest state in the second state sequence (i.e., the latest entry in the second state sequence) includes input value A, output value B, and register value C, with a timestamp of D. The currently acquired current state of the control system includes input value A, output value B, and register value C, with a timestamp of E (the current time). Since the current state is the same as the latest state in the second state sequence, we only need to change the timestamp of the latest entry in the second state sequence from D to E.
[0106] For another example, assume the latest state in the second state sequence (i.e., the latest entry in the second state sequence) includes input value A, output value B, and register value F, with a timestamp of D. The currently acquired state of the control system includes input value A, output value B, and register value C, with a timestamp of E (current time). Because the current state is different from the latest state in the second state sequence, a new entry is added to the second state sequence. This new entry contains input value A, output value B, and register value C, with a timestamp of E. The new entry becomes the latest state in the second state sequence.
[0107] Therefore, by controlling the comparison process between the current state of the control system and the latest state in the second state sequence, the second state sequence can be expanded or the timestamp updated, thereby achieving timely update of the second state sequence.
[0108] Preferably, the states included in the first state sequence can be specifically implemented as input values of the virtual control system, output values of the virtual control system, and / or states of virtual registers in the virtual control system. The states included in the second state sequence can be specifically implemented as input values of the control system, output values of the control system, and / or states of corresponding registers in the control system.
[0109] When the first state sequence and the second state sequence are generated according to method (1): the values of the input / output ports in the virtual control system and the virtual registers in the virtual control system are sequentially read according to a predetermined acquisition time sequence, and the state of the virtual control system at each acquisition time point can be obtained accordingly, thereby forming the first state sequence. Similarly, the values of the input / output ports in the control system and the registers in the control system are sequentially read according to an acquisition time sequence equivalent to that of the first state sequence, and the state of the control system at each acquisition time point can be obtained accordingly, thereby forming the second state sequence.
[0110] When the first state sequence and the second state sequence are generated according to method (2): when the value of the input / output port in the virtual control system or the virtual register in the virtual control system changes, the state is added to the first state sequence, otherwise only the timestamp of the latest identical state is updated; when the value of the input / output port in the control system or the register in the control system changes, the state is added to the second state sequence, otherwise only the timestamp of the latest identical state is updated.
[0111] FIG. 2 is an exemplary schematic diagram of a first state sequence and a second state sequence according to an embodiment of the present invention.
[0112] In FIG2 , the second state sequence 10 includes the following steps: n ) collect the state of the control system in sequence. Each state includes: the input value of the control system (I1, I2…I x ), the output value of the control system (O1, O2…O y ) and the values of registers in the control system (R1, R2…R z ). Among them, T n It is the latest collection point.
[0113] The first state sequence 20 includes the following steps: n ') are collected in sequence. Each state includes: the input value of the virtual control system (I1', I2'...I x '), the output value of the virtual control system (O1', O2'...O y ') and the values of virtual registers in the virtual control system (R1', R2'...R z '). Among them, T n It is the latest collection point.
[0114] When the first state sequence 20 and the second state sequence 10 are generated according to the method (1), the acquisition sequence (T0, T1...T n ) and (T0', T1'...T n') are the same, and are the order of the acquisition time points. For example, when the sampling period is 1 second, T0 (T0') is the first second, T1 (T1') is the second second... T n (T n ') is the n+1th second.
[0115] When the first state sequence 20 and the second state sequence 10 are generated according to the method (2), the acquisition sequence (T0, T1...T n ) is the same as (T0', T1'...T n ') are the order of state changes in their respective sequences. For example, T0 is the first state acquisition time of the second state sequence 10, T1 is the first acquisition time of the control system state change... T n It is the time when the state of the control system changes for the nth time. For example, T0' is the time when the first state of the first state sequence 20 is collected, T1' is the time when the state of the virtual control system changes for the first time... n ' is the moment when the state of the virtual control system changes for the nth time. In terms of the specific time and number of sampling points, (T0, T1…T n ) and (T0', T1'...T n ') may not correspond exactly.
[0116] Step 102: When the first state sequence and the second state sequence are inconsistent, determine the expected state of the digital twin based on the second state sequence.
[0117] The first state sequence and the second state sequence as comparison objects are obtained in the same manner. For example, the first state sequence and the second state sequence are both obtained in manner (1) or in manner (2).
[0118] Here, the complete first state sequence can be compared with the complete second state sequence. When the first state sequence and the second state sequence are inconsistent, the first state sequence and the second state sequence are determined to be inconsistent. Alternatively, a region of a predetermined time length containing the latest record can be extracted from the first state sequence and compared with a region of the same time length containing the latest record extracted from the second state sequence. When the two regions are inconsistent, the first state sequence and the second state sequence are determined to be inconsistent.
[0119] For example, referring to Figure 2, a first comparison area 11 containing the latest state record is extracted from the first state sequence 10 and compared with a second comparison area 21 containing the latest state record extracted from the second state sequence 20, wherein the first comparison area 11 and the second comparison area 21 have the same time length.
[0120] When the first state sequence and the second state sequence are inconsistent, it is determined that the state of the digital twin is out of sync with the state of the mapped object, and the state of the digital twin needs to be updated. The desired state of the digital twin can be determined based on the second state sequence. For example, the desired state of the digital twin can specifically include the desired rotation speed of a shaft or the desired rotation angle of a robotic arm.
[0121] In one embodiment, the method includes: running a simulation process of controlling a digital twin via a virtual control system; synchronously collecting multiple states of the virtual control system and multiple states of the digital twin during the simulation process in a chronological order of the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; and generating a knowledge base containing an association relationship between the first collected state sequence and the second collected state sequence.
[0122] It can be seen that in the simulation process of the virtual control system controlling the digital twin (the control system and the mapping object may not participate in the simulation process), the respective state sequences of the virtual control system and the digital twin are collected synchronously, and a knowledge base containing the association relationship between the two state sequences is established, which facilitates the subsequent determination of the expected state based on the knowledge base.
[0123] FIG4 is an exemplary schematic diagram of generating a knowledge base according to an embodiment of the present invention. First, a simulation process of controlling the digital twin 34 via the virtual control system 33 is run. Then, multiple states of the virtual control system 33 during the simulation process are synchronously collected (each state includes: input values (I1', I2'...I x '), output values of the virtual control system 33 (O1', O2'...O y ') and the values of the virtual registers (R1', R2'...R z ')) and multiple states of the digital twin 34 corresponding to each state of the control system 33 (each state of the digital twin 34 includes specific values of S1...Sw, where S1...Sw are specific parameters of the digital twin 34, such as S1 is the rotation angle, S2 is the displacement, and so on). The multiple states of the virtual control system 33 form a first acquisition state sequence, and the multiple states of the digital twin 34 form a second acquisition state sequence.
[0124] The first acquisition state sequence and the second acquisition state sequence can be obtained based on the predetermined acquisition time sequence according to method (1). In method (1): according to the acquisition time sequence, multiple states of the virtual control system 33 and multiple corresponding states of the digital twin 34 in the simulation process are synchronously acquired. The first acquisition state sequence and the second acquisition state sequence are synchronized in time. For example, when the sampling period is 1 second, the state A1 of the virtual control system 33 at the 1st second, the state A2 at the 2nd second... the state An at the nth second, and the state B1 of the digital twin 34 at the 1st second, the state B2 at the 2nd second... the state Bn at the nth second are collected respectively. (A1, A2...An) form the first acquisition state sequence; (B1, B2...Bn) form the second acquisition state sequence.
[0125] The first acquisition state sequence and the second acquisition state sequence can be obtained according to method (2). When the state of the virtual control system 33 changes, the state is added to the first acquisition state sequence, and the state of the digital twin 34 is added to the first acquisition state sequence synchronously accordingly. For example: Assume that the latest state in the first acquisition state sequence (that is, the latest entry in the first acquisition state sequence) includes: input value A, output value B and virtual register value F, and the timestamp is D. The current state of the virtual control system currently acquired during the simulation process includes: input value A, output value B and virtual register value C, and the timestamp is E (current time). Since the current state is different from the latest state in the first acquisition state sequence, it is necessary to add a new entry to the first acquisition state sequence. The content of the new entry is: input value A, output value B and virtual register value C, and the timestamp is E. The new entry is updated to become the latest state in the first acquisition state sequence. Accordingly, a new entry is synchronously added to the second acquisition state sequence. The content of the new entry is: the state of the digital twin 33 acquired at the time of the timestamp E.
[0126] The first acquisition state sequence and the second acquisition state sequence are associated to form a knowledge base 50. In FIG4 , each entry 30 in the knowledge base 50 includes: a state 31 of the virtual control system 33 corresponding to the respective acquisition sequence number (each state includes: input values (I1′, I2′…I x '), output values of the virtual control system 33 (O1', O2'...O y ') and the values of the virtual registers (R1', R2'...R z ')) and the state 32 of the digital twin corresponding to the synchronous acquisition (each state includes: the specific parameters S1...Sw of the digital twin). The acquisition sequence number in the knowledge base 50 is (T0, T1...T I ), where T I is the latest entry.
[0127] In one embodiment, determining the desired state of the digital twin based on the second state sequence includes: using the second state sequence as a comparison target, determining a hit region that meets the comparison target from the first acquired state sequence of the knowledge base; determining the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit region from the second acquired state sequence; and determining the latest state of the digital twin as the desired state. Therefore, by using the second state sequence as a comparison target and comparing it with the knowledge base, the desired state of the digital twin can be conveniently determined.
[0128] In one embodiment, the second state sequence has a predetermined time length; using the second state sequence as a comparison target, determining a hit region that meets the comparison target from the first collected state sequence of the knowledge base includes: sliding a time window having a predetermined time length within the first collected state sequence of the knowledge base; determining a region within the time window that has the greatest similarity to the second state sequence; and determining the region with the greatest similarity as the hit region. As can be seen, the sliding window process can quickly determine the hit region. Specifically, pattern recognition, feature vectors, fuzzy matching, probability, and other methods can be used to determine the region with the greatest similarity.
[0129] FIG5 is an exemplary schematic diagram of determining a desired state of a digital twin according to an embodiment of the present invention.
[0130] In FIG5 , the second state sequence 10 and the knowledge base 50 are obtained in the same way. For example, both are obtained by the above-mentioned method (1) or the above-mentioned method (2). A comparison region 40 of a predetermined time length is selected from the second state sequence 10. The time length (T n-m ~T n ) is a sliding window that slides through the first collected state sequence of the knowledge base 50 to determine the hit region 41 with the greatest similarity. Then, the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit region 41 is read from the second collected state sequence of the knowledge base 50; the latest state of the digital twin is determined as the desired state.
[0131] For example, in FIG4, the acquisition order corresponding to the hit area 41 is T k-m ~T k。 The latest acquisition point in the hit area 41 is T k。 Therefore, the state corresponding to T in the second acquisition state sequence is k The state 42 of the digital twin is determined to be the desired state.
[0132] Step 103: Update the state of the digital twin to the desired state.
[0133] Figure 6 is a structural diagram of a state synchronization system for digital twins according to an embodiment of the present invention. The system includes: a virtual control system 602 for controlling a digital twin 601; and a control system 604 for controlling a mapping object 605 of the digital twin 601.
[0134] First, the state synchronization device 603 runs the simulation process of controlling the digital twin 601 through the virtual control system 602 (during the simulation process, the control system 604 and the mapping object 605 may not participate), and synchronously acquires multiple states of the virtual control system 602 and multiple corresponding states of the digital twin 601 during the simulation process, wherein the multiple states of the virtual control system 602 form a first acquisition state sequence, and the multiple states of the digital twin 601 form a second acquisition state sequence; and generates a knowledge base containing the association relationship between the first acquisition state sequence and the second acquisition state sequence.
[0135] After the knowledge base is generated, the digital twin 601, virtual control system 602, control system 604, and mapping object 605 begin operation. During operation, the state synchronization device 603 is used to obtain a first state sequence and a second state sequence, where the first state sequence represents the state of the virtual control system 602 of the digital twin 601, and the second state sequence represents the state of the control system 604 of the mapping object 605 of the digital twin 601. When the first state sequence and the second state sequence are inconsistent, the desired state of the digital twin 601 is determined based on the second state sequence, and the state of the digital twin 601 is updated to the desired state.
[0136] In one embodiment, the state synchronization device 603 is used to take the second state sequence as the comparison target, determine the hit area that meets the comparison target from the first collected state sequence of the knowledge base; determine the latest state of the digital twin 601 corresponding to the latest state of the virtual control system 602 in the hit area from the second collected state sequence; and determine the latest state of the digital twin 601 as the expected state.
[0137] In one embodiment, the second state sequence has a predetermined time length; the state synchronization device 603 is used to slide a time window with a time length in the first acquisition state sequence of the knowledge base; determine the area within the time window that has the greatest similarity with the second state sequence; and determine the area with the greatest similarity as the hit area.
[0138] FIG7 is a structural diagram of a state synchronization device for a digital twin according to an embodiment of the present invention. As shown in FIG7 , the state synchronization device 700 for a digital twin includes:
[0139] The acquisition module 701 is used to obtain a first state sequence and a second state sequence, wherein the first state sequence represents the state of the virtual control system of the digital twin, and the second state sequence represents the state of the control system of the mapping object of the digital twin; the determination module 702 is used to determine the expected state of the digital twin based on the second state sequence when the first state sequence and the second state sequence are inconsistent; the update module 703 is used to update the state of the digital twin to the expected state.
[0140] In one embodiment, the determination module 702 is configured to update the current state of the digital twin virtual control system to the latest state in the second state sequence when the first state sequence and the second state sequence are inconsistent.
[0141] In one embodiment, a determination module 702 is used to run a simulation process of controlling a digital twin via a virtual control system; synchronously collect multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; and generate a knowledge base containing an association relationship between the first collected state sequence and the second collected state sequence.
[0142] In one embodiment, the determination module 702 is used to take the second state sequence as the comparison target, determine the hit area that meets the comparison target from the first collected state sequence of the knowledge base; determine the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area from the second collected state sequence; and determine the latest state of the digital twin as the expected state.
[0143] In one embodiment, the second state sequence has a predetermined time length; the determination module 702 is used to slide a time window with a time length in the first acquisition state sequence of the knowledge base; determine the area within the time window that has the greatest similarity with the second state sequence; and determine the area with the greatest similarity as the hit area.
[0144] In summary, in this embodiment of the present invention, when the state of the digital twin and the physical system becomes out of sync, the digital twin's state can be automatically refreshed without the need for engineer intervention. Furthermore, this synchronization approach is highly tolerant: even in unexpected situations, the digital twin model can automatically recover after several iterations. Furthermore, generating the knowledge base does not require prior knowledge and can be iteratively generated through the execution of the digital twin.
[0145] The embodiment of the present invention also proposes an electronic device with a processor-memory architecture. Figure 8 is a structural diagram of an electronic device according to an embodiment of the present invention. As shown in Figure 8, the electronic device 800 includes a processor 801, a memory 802, and a computer program stored on the memory 802 and runnable on the processor 801. When the computer program is executed by the processor 801, it implements any of the above digital twin state synchronization methods. Among them, the memory 802 can be specifically implemented as a variety of storage media such as an electrically erasable programmable read-only memory (EEPROM), a flash memory (Flash memory), and a programmable program read-only memory (PROM). The processor 801 can be implemented to include one or more central processing units or one or more field programmable gate arrays, wherein the field programmable gate array integrates one or more central processing unit cores. Specifically, the central processing unit or the central processing unit core can be implemented as a CPU, an MCU or a DSP, and so on.
[0146] It should be noted that not all steps and modules in the above processes and structure diagrams are required, and certain steps or modules can be omitted based on actual needs. The execution order of the steps is not fixed and can be adjusted as needed. The division of the modules is merely for the convenience of describing the functional division adopted. In actual implementation, a module can be implemented by multiple modules, and the functions of multiple modules can be implemented by the same module. These modules can be located in the same device or in different devices.
[0147] The hardware modules in each embodiment can be implemented mechanically or electronically. For example, a hardware module may include a specially designed permanent circuit or logic device (such as a dedicated processor, such as an FPGA or ASIC) for performing a specific operation. The hardware module may also include a programmable logic device or circuit (such as a general-purpose processor or other programmable processor) temporarily configured by software to perform a specific operation. As for whether to implement the hardware module mechanically, or using a dedicated permanent circuit, or using a temporarily configured circuit (such as configured by software), it can be decided based on cost and time considerations.
[0148] The above are only preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0149] Nouns and pronouns referring to persons in this patent application are not limited to a specific gender.
Claims
1. A state synchronization method for digital twins, characterized in that: include: Acquire (101) a first state sequence and a second state sequence, wherein the first state sequence represents a state of a virtual control system of the digital twin, and the second state sequence represents a state of a control system of a mapping object of the digital twin; When the first state sequence and the second state sequence are inconsistent, determining (102) a desired state of the digital twin based on the second state sequence; The state of the digital twin is updated (103) to the desired state.
2. The method according to claim 1, characterized in that include: When the first state sequence and the second state sequence are inconsistent, the current state of the digital twin virtual control system is updated to the latest state in the second state sequence.
3. The method according to claim 1, characterized in that include: Running a simulation process that controls the digital twin via the virtual control system; Synchronously collecting multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; A knowledge base including an association relationship between the first acquisition state sequence and the second acquisition state sequence is generated.
4. The method according to claim 3, characterized in that Determining (102) the desired state of the digital twin based on the second state sequence includes: Taking the second state sequence as a comparison target, determining a hit region that meets the comparison target from the first acquisition state sequence of the knowledge base; Determine, from the second acquired state sequence, the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area; The latest state of the digital twin is determined as the expected state.
5. The method according to claim 4, characterized in that The second state sequence has a predetermined time length; The step of taking the second state sequence as a comparison target and determining a hit region that meets the comparison target from the first acquisition state sequence of the knowledge base comprises: In the first acquisition state sequence of the knowledge base, sliding a time window having the time length; Determining a region within the time window that has a maximum similarity to the second state sequence; The region with the maximum similarity is determined as the hit region.
6. The method according to claim 1, characterized in that include: Obtaining the current state of the virtual control system; When the current state is the same as the latest state in the first state sequence, updating the timestamp of the latest state to the timestamp of the current state; When the current state is not the same as the latest state in the first state sequence, the current state is added to the first state sequence.
7. The method according to claim 1, characterized in that include: Obtaining the current state of the control system; When the current state is the same as the latest state in the second state sequence, updating the timestamp of the latest state to the timestamp of the current state; When the current state is not the same as the latest state in the second state sequence, the current state is added to the second state sequence.
8. A state synchronization device for a digital twin, characterized in that: include: An acquisition module (701) is used to acquire a first state sequence and a second state sequence, wherein the first state sequence represents the state of a virtual control system of the digital twin, and the second state sequence represents the state of a control system of a mapping object of the digital twin; A determination module (702) is used to determine the expected state of the digital twin based on the second state sequence when the first state sequence and the second state sequence are inconsistent; An updating module (703) is used to update the state of the digital twin to the desired state.
9. The device according to claim 8, characterized in that The determination module (702) is used to update the current state of the digital twin virtual control system to the latest state in the second state sequence when the first state sequence and the second state sequence are inconsistent.
10. The device according to claim 8, characterized in that The determination module (702) is used to run a simulation process of controlling the digital twin via the virtual control system; synchronously collect multiple states of the virtual control system and multiple states of the digital twin during the simulation process, wherein the multiple states of the virtual control system form a first collected state sequence, and the multiple states of the digital twin form a second collected state sequence; generate a data stream containing the first collected state sequence and the second collected state sequence A knowledge base of the relationships between them.
11. The device according to claim 10, characterized in that The determination module (702) is used to use the second state sequence as a comparison target and determine a hit region that meets the comparison target from the first acquisition state sequence of the knowledge base; From the second acquired state sequence, determine the latest state of the digital twin corresponding to the latest state of the virtual control system in the hit area; and determine the latest state of the digital twin as the expected state.
12. The device according to claim 11, characterized in that The second state sequence has a predetermined time length; The determining module (702) is used to slide a time window having the time length in the first acquisition state sequence of the knowledge base; Determine a region within the time window that has the greatest similarity to the second state sequence; and determine the region with the greatest similarity as the hit region.
13. A state synchronization system of a digital twin, characterized in that: include: A virtual control system (602) for controlling the digital twin (601); A control system (604) for controlling a mapping object (605) of the digital twin (601); A state synchronization device (603) is used to obtain a first state sequence and a second state sequence, wherein the first state sequence represents the state of a virtual control system (602) of a digital twin (601), and the second state sequence represents the state of a control system (604) of a mapping object (605) of the digital twin (601); when the first state sequence and the second state sequence are inconsistent, determining the expected state of the digital twin (601) based on the second state sequence; and updating the state of the digital twin (601) to the expected state.
14. The system according to claim 13, characterized in that The state synchronization device (603) is used to run a simulation process of controlling the digital twin (601) via the virtual control system (602); synchronously collect multiple states of the virtual control system (602) and multiple states of the digital twin (601) during the simulation process, wherein the multiple states of the virtual control system (602) form a first collected state sequence, and the multiple states of the digital twin (601) form a second collected state sequence; and generate a knowledge base containing an association relationship between the first collected state sequence and the second collected state sequence.
15. The system according to claim 13, characterized in that The state synchronization device (603) is used to take the second state sequence as a comparison target and determine a hit area that meets the comparison target from the first collected state sequence of the knowledge base; Determine, from the second acquired state sequence, a digital twin (601) corresponding to the latest state of the virtual control system (602) in the hit area; Latest state: Determine the latest state of the digital twin (601) as the expected state.
16. The system according to claim 15, characterized in that The second state sequence has a predetermined time length; The state synchronization device (603) is used to slide a time window having the time length in the first acquisition state sequence of the knowledge base; Determine a region within the time window that has the greatest similarity to the second state sequence; and determine the region with the greatest similarity as the hit region.
17. An electronic device, characterized in that: include: Processor (801); A memory (802), configured to store executable instructions of the processor (801); The processor (801) is used to read the executable instructions from the memory (802) and execute the executable instructions to implement the state synchronization method of the digital twin according to any one of claims 1 to 7.
18. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the state synchronization method of the digital twin described in any one of claims 1-7 is implemented.
19. A computer program product, characterized in that It comprises a computer program which, when executed by a processor, implements the state synchronization method of a digital twin according to any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent workshop parallel control method and system
CN107861478A
Control system and method for operating a control system with real control and virtual control
CN108027603A
Method for simulating digital twinning real-time actions of assembly line based on PLC data
CN113189947A
Control system for supervisory control of independent cart technology tracks and lines
CN114036704A
Chassis data acquisition method and device based on digital twinning and storage medium
CN115099070A
