Digital twin construction method, apparatus, device, and storage medium

By constructing digital twins based on object models and object relationships, the problem of constructing digital twins of complex physical entities has been solved, and efficient monitoring and control of complex physical entities has been achieved, especially the diagnosis of large-scale industrial equipment and urban buildings.

CN114281903BActive Publication Date: 2025-10-10CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111447556.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-10-10
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Existing technologies cannot effectively construct digital twins of complex physical entities, cannot truly simulate the relationships between complex physical entities, and the granularity and dimensions of digital twins cannot meet the needs of multidimensional modeling.

Method used

By building the physical model of the sub-device based on the physical model description language, building the interactive relationship between the sub-devices based on the physical relationship description language, and combining the physical model and physical relationship to build a digital twin, a digital twin with controllable granularity and scalable dimensions is formed.

Benefits of technology

It enables effective monitoring, control and diagnosis of complex physical entities such as large-scale industrial equipment and urban buildings. The granularity of digital twins is controllable and the dimensions are scalable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114281903B_ABST
    Figure CN114281903B_ABST
Patent Text Reader

Abstract

The application provides a digital twin construction method, device and equipment and a storage medium. The method comprises the following steps: constructing a physical model of a sub-device based on a physical model description language, wherein the physical model is used to describe the sub-device; constructing a physical relationship of at least two sub-devices based on a physical relationship description language, wherein the physical relationship is used to describe an interaction relationship between the sub-devices; and constructing a digital twin based on the physical model of the at least two sub-devices and the physical relationship. The application can construct a digital twin for a complex physical entity, and the obtained digital twin has controllable granularity and expandable dimensions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet of Things technology, and in particular to a digital twin construction method, apparatus, device and storage medium. Background Art

[0002] With the development of IoT applications, the importance of digital incarnations of physical entities is gaining increasing attention. Digital twin technology, in particular, allows for the digitalization of physical entities in the physical world by creating an identical digital twin, enabling understanding, analysis, and optimization of the physical entity.

[0003] Currently, digital twins are usually constructed in the following way: based on a simple device model, a JSON document containing two main property sets is used to construct the digital twin, where one JSON document contains a set of observed values ​​or reported values, and the other JSON document contains a set of expected values.

[0004] The inventors have found that the above method can construct a digital twin of a simple physical entity, but it is impossible to construct a digital twin for a complex physical entity. Summary of the Invention

[0005] The present application provides a digital twin construction method, apparatus, device and storage medium for constructing a digital twin for a complex physical entity.

[0006] In a first aspect, the present application provides a digital twin construction method for constructing a digital twin of a target physical entity, where the target physical entity includes at least two sub-devices. The digital twin construction method includes:

[0007] Based on the physical model description language, a physical model of the sub-device is constructed, and the physical model is used to describe the sub-device;

[0008] Based on the object relationship description language, construct an object relationship between at least two sub-devices, where the object relationship is used to describe the interaction relationship between the sub-devices;

[0009] A digital twin is constructed based on the physical models and physical relationships of at least two sub-devices.

[0010] Optionally, a digital twin is constructed based on the physical models and physical relationships of at least two sub-devices, including: obtaining description data of the sub-device for each of the at least two sub-devices; converting the description data into a device shadow corresponding to the sub-device based on the physical model; and converting the device shadows of at least two sub-devices into a digital twin based on the physical relationship.

[0011] Optionally, based on the object model, the description data is converted into a device shadow corresponding to the sub-device, including: based on the object model, parsing the description data to obtain a target value corresponding to the target object name in the object model, wherein the object name is the key of the key-value pair, and the value corresponding to the object name is the value of the key-value pair; filling the target value into the value corresponding to the target object name in the object model to obtain the device shadow corresponding to the sub-device.

[0012] Optionally, based on the object relationship, the device shadows of at least two sub-devices are converted into digital twins, including: filling in the information contained in the device shadows of at least two sub-devices into the object relationship to obtain the digital twin.

[0013] Optionally, the digital twin construction method also includes: constructing a physical relationship between at least two digital twins based on a physical relationship description language; and constructing digital twins corresponding to at least two digital twins based on the at least two digital twins and the physical relationship between the at least two digital twins.

[0014] In a second aspect, the present application provides a method for applying a digital twin. The digital twin is constructed using the digital twin construction method described in the first aspect of the present application. The method for applying the digital twin includes:

[0015] Through the physical relationship in the digital twin, the control command is sent to the device shadow corresponding to the target sub-device, where the target sub-device is the sub-device contained in the physical entity corresponding to the digital twin;

[0016] Through the physical model in the digital twin, the control instructions in the device shadow are sent to the target sub-device so that the target sub-device executes the control instructions.

[0017] Optionally, the control instructions in the device shadow are sent to the target sub-device, including: if the target sub-device is determined to be online, the control instructions in the device shadow are sent to the target sub-device according to the timestamp corresponding to the control instructions; or, if the target sub-device is determined to be offline, the control instructions are cached in the device shadow, and when it is determined that the target sub-device is back online, the control instructions in the device shadow are sent to the target sub-device according to the timestamp corresponding to the control instructions.

[0018] In a third aspect, the present application provides a digital twin construction apparatus for constructing a digital twin of a target physical entity, wherein the target physical entity includes at least two sub-devices, and the digital twin construction apparatus includes:

[0019] A first building module is used to build a physical model of the sub-device based on a physical model description language, where the physical model is used to describe the sub-device;

[0020] A second building module is configured to build a physical relationship between at least two sub-devices based on a physical relationship description language, where the physical relationship is used to describe an interaction relationship between the sub-devices;

[0021] The processing module is used to construct a digital twin based on the physical models and physical relationships of at least two sub-devices.

[0022] Optionally, the processing module is specifically used to: obtain description data of each sub-device in at least two sub-devices; convert the description data into a device shadow corresponding to the sub-device based on the object model; and convert the device shadows of at least two sub-devices into digital twins based on the object relationship.

[0023] Optionally, when the processing module is used to convert the description data into the device shadow corresponding to the sub-device based on the object model, it is specifically used to: parse the description data based on the object model to obtain the target value corresponding to the target object name in the object model, wherein the object name is the key of the key-value pair, and the value corresponding to the object name is the value of the key-value pair; fill in the target value into the value corresponding to the target object name in the object model to obtain the device shadow corresponding to the sub-device.

[0024] Optionally, when the processing module is used to convert the device shadows of at least two sub-devices into digital twins based on the object relationship, it is specifically used to: fill in the information contained in the device shadows of at least two sub-devices into the object relationship to obtain the digital twin.

[0025] Optionally, the processing module can also be used to: construct a physical relationship between at least two digital twins based on a physical relationship description language; and construct digital twins corresponding to at least two digital twins based on at least two digital twins and the physical relationship between at least two digital twins.

[0026] In a fourth aspect, the present application provides an application device for a digital twin, wherein the digital twin is constructed by the digital twin construction method as described in the first aspect of the present application, and the application device for the digital twin includes:

[0027] A first sending module is configured to send a control instruction to a device shadow corresponding to a target sub-device through a physical relationship in the digital twin, wherein the target sub-device is a sub-device included in the physical entity corresponding to the digital twin;

[0028] The second sending module is used to send the control instructions in the device shadow to the target sub-device through the physical model in the digital twin, so that the target sub-device executes the control instructions.

[0029] Optionally, the second sending module is specifically used to: if it is determined that the target sub-device is online, then send the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction; or, if it is determined that the target sub-device is offline, then cache the control instruction in the device shadow, and when it is determined that the target sub-device is back online, then send the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction.

[0030] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0031] Memory stores computer-executable instructions;

[0032] The processor executes the computer-executable instructions stored in the memory to implement the digital twin construction method as described in the first aspect of this application.

[0033] In a sixth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0034] Memory stores computer-executable instructions;

[0035] The processor executes the computer-executable instructions stored in the memory to implement the application method of the digital twin as described in the second aspect of this application.

[0036] In the seventh aspect, the present application provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are executed by a processor, the digital twin construction method described in the first aspect of the present application is implemented.

[0037] In an eighth aspect, the present application provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are executed by a processor, the application method of the digital twin as described in the second aspect of the present application is implemented.

[0038] In a ninth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the digital twin construction method as described in the first aspect of the present application.

[0039] In a tenth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the application method of the digital twin as described in the second aspect of the present application.

[0040] The digital twin construction method, device, equipment and storage medium provided by the application, through the object model description language, the object model of the sub-equipment is constructed, the object model is used to describe the sub-equipment, the object relationship description language is used to construct the object relationship of at least two sub-equipments, the object relationship is used to describe the interaction relationship between the sub-equipments, and the digital twin is constructed according to the object model and the object relationship of the at least two sub-equipments. Since the application considers the object relationship on the basis of the object model, the digital twin is constructed through the object model and the object relationship, therefore, the digital twin of the complex physical entity can be constructed, the granularity of the obtained digital twin is controllable, the dimension is expandable, so that the complex physical entity, such as large industrial equipment, city building, etc. can be monitored, controlled and diagnosed. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0042] Figure 1 The application scenario schematic diagram provided by an embodiment of the application;

[0043] Figure 2 The flowchart of the digital twin construction method provided by an embodiment of the application;

[0044] Figure 3 The device relationship schematic diagram of a manufacturing plant provided by an embodiment of the application;

[0045] Figure 4 The flowchart of the digital twin construction method provided by another embodiment of the application;

[0046] Figure 5 The flowchart of the application method of the digital twin provided by an embodiment of the application;

[0047] Figure 6 The structural schematic diagram of the digital twin construction device provided by an embodiment of the application;

[0048] Figure 7 The structural schematic diagram of the application device of the digital twin provided by an embodiment of the application;

[0049] Figure 8 The structural schematic diagram of the electronic device provided by an embodiment of the application. DETAILED DESCRIPTION

[0050] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0051] First, some technical terms involved in this application are explained:

[0052] The Internet of Things (IoT) refers to the use of various devices and technologies, including information sensors, radio frequency identification (RFID), global positioning systems (GPS), infrared sensors, and laser scanners, to collect real-time data on any object or process that requires monitoring, connection, and interaction. This data includes acoustic, optical, thermal, electrical, mechanical, chemical, biological, and location information. Through various network access options, this allows for ubiquitous connectivity between objects and between objects and people, enabling intelligent perception, identification, and management of objects and processes. The IoT is an information carrier based on the internet and traditional telecommunications networks, enabling all independently addressable, common physical objects to form an interconnected network.

[0053] Digital twins leverage data from physical models, sensor updates, and operational history to integrate multidisciplinary, multi-physics, multi-scale, and multi-probability simulation processes, mapping them in virtual space to reflect the entire lifecycle of the corresponding physical equipment. In layman's terms, digital twins are the digital equivalent of physical objects, constructed through digital means to understand, analyze, and optimize the physical entity. Digital twins can be understood as digital representations of the physical world.

[0054] Currently, digital twins are typically constructed using the following approach: Based on a simple device model or physical model, a digital twin is constructed using a JSON document containing two primary attribute sets. One JSON document contains a set of observed or reported values. Specifically, a detector on a device can read the device's current operating data (i.e., observed data) and update the corresponding attributes of the observed data. For example, a device's currently observed speed is 1000 RPM. The other JSON document contains a set of expected values. Specifically, expected values ​​are the values ​​that the control program wants to set on the device. For example, an application can set the engine speed to 1200 RPM. The JSON documents of these two primary attribute sets also store basic device information, such as the device's name, serial number, and current location. The attribute values ​​recorded in these two primary attribute set JSON documents serve as a digital representation of the object (i.e., the device), thereby constructing a digital twin of the single object (i.e., the device).

[0055] The above method can be used to construct digital twins of simple physical entities, but it is not possible to build digital twins for complex physical entities. Specifically, when the IoT platform collects device measurement values ​​(i.e., data describing the current state of the device), it can form a device shadow within the platform based on multiple measurement values ​​of the device. However, a single device shadow cannot form a digital twin of a complex physical entity. In addition, in the multidimensional modeling process of the digital twin, physical entities of different granularities need to be modeled, and a fine-grained single device model obviously cannot meet the different granularity requirements of multidimensional modeling. The digital twin thus constructed cannot restore the physical entity more realistically, nor can it simulate the relationship between complex physical entities.

[0056] Based on the above problems, the present application provides a digital twin construction method, device, equipment and storage medium. By constructing a digital twin based on the device shadow, a digital twin can be constructed for a complex physical entity. The obtained digital twin has controllable granularity and expandable dimensions, so that complex physical entities such as large industrial equipment and urban buildings can be monitored, controlled and diagnosed.

[0057] Below, the application scenarios of the solution provided in this application are first illustrated.

[0058] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, in this application scenario, the physical entity 110 includes multiple sub-devices 111. Each sub-device 111 reports its own description data to the server 120. The server 120 constructs a digital twin of the physical entity 110 based on the description data reported by each sub-device 111. The specific implementation process of the server 120 constructing the digital twin of the physical entity 110 based on the description data reported by each sub-device 111 can be found in the solutions of the following embodiments.

[0059] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1 The equipment included in the Figure 1 The positional relationship between the devices in the Figure 1 In the application scenario shown, a data storage device may also be included. The data storage device may be an external memory relative to the server 120 or an internal memory integrated in the server 120 .

[0060] Next, the digital twin construction method is introduced through specific examples.

[0061] Figure 2A flowchart of a method for constructing a digital twin provided by an embodiment of the present application. The method of the embodiment of the present application is used to construct a digital twin of a target physical entity, the target physical entity comprising at least two sub-devices. The method of the embodiment of the present application can be applied in an electronic device, which can be a server or a server cluster, etc. As shown in Figure 2 The method of the embodiment of the present application comprises the following steps:

[0062] S201. Construct a thing model of a sub-device based on a thing model description language, the thing model being used to describe the sub-device.

[0063] In the embodiment of the present application, the thing model description language (TDL) can be understood as a language in JSON format. The thing model of a sub-device can be constructed using the thing model description language, and the obtained thing model is a JSON document based on a tree structure, which describes the sub-device. Specifically, the JSON document can describe the composition of the sub-device, such as the attributes (i.e. basic information), events and services, etc. of the sub-device. For example, the sub-device is a water meter, and the thing model of the water meter includes the basic information of the water meter, the water consumption and the power saving mode, etc. The basic information of the water meter includes basic attributes such as device identification, device key (KEY) and device latitude and longitude, etc.

[0064] S202. Construct a thing relationship of the at least two sub-devices based on a thing relationship description language, the thing relationship being used to describe the interaction relationship between the sub-devices.

[0065] In this step, the thing relationship description language (TRDL) can be understood as a language in JSON format. The thing relationship of the at least two sub-devices included in the target physical entity can be constructed using the thing relationship description language, and the obtained thing relationship is a JSON document based on a tree structure, which describes the interaction relationship between the sub-devices. For example, Figure 3 A schematic diagram of the device relationship of a manufacturing plant provided by an embodiment of the present application is shown in Figure 3 As shown in the figure, the manufacturing plant comprises workshop 1, which comprises a device gateway as a parent node, connected with three child nodes, i.e. a temperature sensor, a humidity sensor and a control switch. The thing relationship describes the relationship between the device gateway and the temperature sensor, the humidity sensor and the control switch, and also describes the relationship between the brother nodes, i.e. the temperature sensor, the humidity sensor and the control switch. Therefore, the thing relationship can describe the real relationship between the devices, and reflect the interaction relationship between the sub-devices (i.e. child nodes) included in the devices and the sub-devices (i.e. brother nodes).

[0066] S203: Construct a digital twin based on the physical models and physical relationships of at least two sub-devices.

[0067] After obtaining the physical models and physical relationships of at least two sub-devices, a digital twin can be constructed based on these physical models and physical relationships. The resulting digital twin is a complex JSON document containing the real-world data of each sub-device and the interactions between them. For details on how to construct a digital twin based on the physical models and physical relationships of at least two sub-devices, please refer to the subsequent examples and will not be further elaborated here.

[0068] The digital twin construction method provided in the embodiment of the present application is to construct a physical model of a sub-device based on a physical model description language, where the physical model is used to describe the sub-device, and to construct a physical relationship between at least two sub-devices based on a physical relationship description language, where the physical relationship is used to describe the interaction between the sub-devices. A digital twin is constructed based on the physical models and physical relationships of at least two sub-devices. Because the embodiment of the present application takes physical relationships into account on the basis of physical models and constructs digital twins through physical models and physical relationships, it is possible to construct digital twins for complex physical entities. The obtained digital twins have controllable granularity and scalable dimensions, thereby enabling monitoring, control, and diagnosis of complex physical entities such as large-scale industrial equipment and urban buildings.

[0069] Figure 4 This is a flowchart of a method for constructing a digital twin provided in another embodiment of the present application. Based on the above embodiment, this embodiment of the present application further explains how to construct a digital twin. Figure 4 As shown, the method of the embodiment of the present application may include:

[0070] S401. Construct a physical model of a sub-device based on a physical model description language. The physical model is used to describe the sub-device.

[0071] The detailed description of this step can be found in Figure 2 The relevant description of S201 in the illustrated embodiment will not be repeated here.

[0072] S402: Construct a physical relationship between at least two sub-devices based on a physical relationship description language. The physical relationship is used to describe the interaction relationship between the sub-devices.

[0073] The detailed description of this step can be found in Figure 2 The relevant description of S202 in the illustrated embodiment will not be repeated here.

[0074] In the embodiment of this application, Figure 2 The step S203 may further include the following three steps S403 to S405:

[0075] S403: For each of the at least two sub-devices, obtain description data of the sub-device.

[0076] In this step, the sub-device description data is the actual data of the sub-device, such as the sub-device's operating temperature and rotational speed, as well as fault alarm events reported when the temperature exceeds a threshold. For example, the sub-device description data may be the description data reported by the sub-device via a sensor included in the sub-device, and the format of the description data is a data format customized by the sub-device. For example, the sub-device description data may be obtained via the Message Queuing Telemetry Transport (MQTT) protocol.

[0077] S404: Based on the object model, convert the description data into a device shadow corresponding to the sub-device.

[0078] After obtaining the description data for each sub-device, the description data for each sub-device can be converted into the corresponding device shadow based on the object model. It can be understood that there is a one-to-one correspondence between sub-devices and device shadows. Specifically, a device shadow is a JSON document that describes a sub-device using its description data.

[0079] Furthermore, based on the object model, converting the description data into the device shadow corresponding to the sub-device may include: parsing the description data based on the object model to obtain the target value corresponding to the target object name in the object model, wherein the object name is the key of the key-value pair, and the value corresponding to the object name is the value of the key-value pair; filling the target value into the value corresponding to the target object name in the object model to obtain the device shadow corresponding to the sub-device.

[0080] For example, after obtaining the description data of the sub-device, since the description data of the sub-device is in a data format customized by the sub-device, the description data of the sub-device can be parsed based on the physical model to obtain the target value corresponding to the target object name in the physical model. For example, if the target object name in the physical model (that is, the key of the key-value pair) is temperature, parsing the description data of the sub-device can obtain the target value corresponding to the temperature (the value of the key-value pair) as 40°C. Then, 40°C can be filled in the value corresponding to the temperature in the physical model to obtain the device shadow corresponding to the sub-device.

[0081] S405: Based on the physical relationship, convert the device shadows of at least two sub-devices into digital twins.

[0082] After obtaining the device shadow corresponding to each sub-device, the device shadows of at least two sub-devices can be converted into digital twins based on the physical relationship.

[0083] Further, based on the object relationship, the device shadow of the at least two sub-devices is converted into the digital twin, including: information contained in the device shadow of the at least two sub-devices is correspondingly filled in the object relationship, and the digital twin is obtained.

[0084] Exemplarily, referring to Figure 3 The device shadow of the temperature sensor, the humidity sensor and the control switch can be respectively obtained, and then the device shadow of the temperature sensor, the humidity sensor and the control switch is respectively parsed, and information contained in the device shadow of the temperature sensor, the humidity sensor and the control switch is correspondingly filled in the object relationship, for example, the temperature value in the device shadow of the temperature sensor is correspondingly filled in the object relationship at a value corresponding to the temperature of the temperature sensor. After the information contained in the device shadow of each sub-device is correspondingly filled in the object relationship, the digital twin can be obtained.

[0085] The digital twin construction method provided by the embodiment of the present application constructs the object model of the sub-device based on the object model description language, the object model is used to describe the sub-device, constructs the object relationship of the at least two sub-devices based on the object relationship description language, the object relationship is used to describe the interaction relationship between the sub-devices, obtains the description data of each sub-device in the at least two sub-devices, converts the description data into the device shadow corresponding to the sub-device based on the object model, and converts the device shadow of the at least two sub-devices into the digital twin based on the object relationship. Since the embodiment of the present application considers the object relationship on the basis of the object model, and constructs the digital twin through the object model and the object relationship, the digital twin of a complex physical entity can be constructed, the granularity of the obtained digital twin is controllable, the dimension is expandable, and thus the complex physical entity such as a large industrial equipment or a city building can be monitored, controlled and diagnosed.

[0086] On the basis of the above-mentioned embodiment, the object relationship of the at least two digital twins can be constructed based on the object relationship description language, and the digital twin corresponding to the at least two digital twins can be constructed according to the at least two digital twins and the object relationship of the at least two digital twins.

[0087] Exemplarily, the two digital twins can be respectively obtained through the above-mentioned digital twin construction method, and then the object relationship of the two digital twins can be constructed based on the object relationship description language, the object relationship contains the interaction relationship between the two digital twins. According to the two digital twins and the object relationship of the two digital twins, the digital twin corresponding to the two digital twins can be constructed. It can be understood that through the object relationship, the hierarchical relationship between different levels of digital twins can be determined, and then the digital twin corresponding to multiple digital twins can be constructed, that is, the granularity of the obtained digital twin is controllable, the dimension is expandable, and thus the complex physical entity such as a large industrial equipment or a city building can be monitored, controlled and diagnosed.

[0088] Figure 5 A flowchart of an application method of a digital twin provided by an embodiment of the present application. The digital twin is constructed by the digital twin construction method in any of the above method embodiments. As shown in the figure, the method of the embodiment of the present application comprises: Figure 5

[0089] S501, sending a control instruction to a device shadow corresponding to a target sub-device through a thing relationship in the digital twin.

[0090] The target sub-device is a sub-device contained in a physical entity corresponding to the digital twin.

[0091] In the embodiment of the present application, the control instruction is, for example, setting the rotating speed of the target sub-device to 1200 RPM. It can be understood that the control instruction contains the expected data of the target sub-device, and the control instruction is issued through the digital twin. Specifically, the control instruction is sent to the device shadow corresponding to the target sub-device through the thing relationship in the digital twin, and the device shadow saves the control instruction. It can be understood that the device shadow not only contains the real data of the target sub-device, but also contains the expected data of the target sub-device.

[0092] S502, sending the control instruction in the device shadow to the target sub-device through a thing model in the digital twin, so that the target sub-device executes the control instruction.

[0093] For example, after the control instruction is sent to the device shadow corresponding to the target sub-device, the control instruction is saved in the device shadow, that is, the expected data of the target sub-device is saved. Therefore, the control instruction saved in the device shadow can be sent to the target sub-device through the thing model in the digital twin, so that the target sub-device executes the control instruction.

[0094] The application method of the digital twin provided by the embodiment of the present application sends the control instruction to the device shadow corresponding to the target sub-device through the thing relationship in the digital twin, and sends the control instruction in the device shadow to the target sub-device through the thing model in the digital twin, so that the target sub-device executes the control instruction. Therefore, the target sub-device can be flexibly controlled to execute the control instruction.

[0095] On the basis of the above embodiment, further, sending the control instruction in the device shadow to the target sub-device can include: if it is determined that the target sub-device is online, sending the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction; or if it is determined that the target sub-device is offline, buffering the control instruction in the device shadow, and when it is determined that the target sub-device is online again, sending the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction.​

[0096] For example, whether the target sub-device is online can be determined based on whether the target sub-device reports description data in real time. If the target sub-device is determined to be online, the target sub-device's expected data stored in the device shadow is sent to the target sub-device based on the timestamp corresponding to the control instruction. If the target sub-device is determined to be offline, the target sub-device's expected data is cached in the device shadow, and when the target sub-device is determined to be back online, the target sub-device's expected data stored in the device shadow is sent to the target sub-device based on the timestamp corresponding to the control instruction. It can be understood that the execution time of the control instruction can be determined based on the timestamp corresponding to the control instruction. When multiple control instructions are cached in the device shadow, the order in which the control instructions are executed can be determined based on the timestamp corresponding to each control instruction. In this way, when issuing remote control instructions to the target sub-device, it is not necessary to consider whether the target sub-device's network is normal or whether the target sub-device is online. It is only necessary to cache the control instruction with the timestamp in the device shadow corresponding to the target sub-device. When the target sub-device is back online, the target sub-device obtains the control instruction cached in the device shadow and determines whether to execute the control instruction based on the timestamp. This can avoid the problem of control instruction issuance failure caused by the target sub-device being offline.

[0097] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0098] Figure 6 This is a schematic diagram of the structure of a digital twin construction device provided in one embodiment of the present application, which is used to construct a digital twin of a target physical entity, wherein the target physical entity includes at least two sub-devices. Figure 6 As shown, the digital twin construction device 600 of the embodiment of the present application includes: a first construction module 601, a second construction module 602 and a processing module 603. Among them:

[0099] The first construction module 601 is used to construct a physical model of a sub-device based on a physical model description language, where the physical model is used to describe the sub-device.

[0100] The second construction module 602 is configured to construct a physical relationship between at least two sub-devices based on a physical relationship description language, where the physical relationship is used to describe the interaction relationship between the sub-devices.

[0101] The processing module 603 is used to construct a digital twin based on the physical models and physical relationships of at least two sub-devices.

[0102] In some embodiments, the processing module 603 can be specifically used to: obtain description data of the sub-device for each of the at least two sub-devices; convert the description data into a device shadow corresponding to the sub-device based on the object model; and convert the device shadows of at least two sub-devices into digital twins based on the object relationship.

[0103] Optionally, when the processing module 603 is used to convert the description data into the device shadow corresponding to the sub-device based on the object model, it can be specifically used to: parse the description data based on the object model to obtain the target value corresponding to the target object name in the object model, wherein the object name is the key of the key-value pair, and the value corresponding to the object name is the value of the key-value pair; fill in the target value into the value corresponding to the target object name in the object model to obtain the device shadow corresponding to the sub-device.

[0104] Optionally, when the processing module 603 is used to convert the device shadows of at least two sub-devices into digital twins based on the object relationship, it can be specifically used to: fill in the information contained in the device shadows of at least two sub-devices into the object relationship to obtain the digital twin.

[0105] In some embodiments, the processing module 603 can also be used to: construct a physical relationship between at least two digital twins based on a physical relationship description language; and construct digital twins corresponding to at least two digital twins based on at least two digital twins and the physical relationship between at least two digital twins.

[0106] The device of the embodiment of the present application can be used to execute the scheme of the digital twin construction method in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0107] Figure 7 This is a schematic diagram of the structure of the application device of the digital twin provided in one embodiment of the present application, wherein the digital twin is constructed by the digital twin construction method in any of the above method embodiments. Figure 7 As shown, the digital twin application device 700 of the embodiment of the present application includes: a first sending module 701 and a second sending module 702. Among them:

[0108] The first sending module 701 is used to send the control instruction to the device shadow corresponding to the target sub-device through the physical relationship in the digital twin, where the target sub-device is the sub-device included in the physical entity corresponding to the digital twin;

[0109] The second sending module 702 is used to send the control instructions in the device shadow to the target sub-device through the physical model in the digital twin, so that the target sub-device executes the control instructions.

[0110] In some embodiments, the second sending module 702 can be specifically used to: if it is determined that the target sub-device is online, then send the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction; or, if it is determined that the target sub-device is offline, then cache the control instruction in the device shadow, and when it is determined that the target sub-device is online again, send the control instruction in the device shadow to the target sub-device according to the timestamp corresponding to the control instruction.

[0111] The device of the embodiment of the present application can be used to execute the solution of the application method of the digital twin in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0112] Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. For example, the electronic device can be provided as a server or a computer. Figure 8 The electronic device 800 includes a processing component 801, which further includes one or more processors, and a memory resource represented by a memory 802 for storing instructions executable by the processing component 801, such as an application. The application stored in the memory 802 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 801 is configured to execute the instructions to perform any of the above-described method embodiments.

[0113] The electronic device 800 may further include a power supply component 803 configured to perform power management of the electronic device 800, a wired or wireless network interface 804 configured to connect the electronic device 800 to a network, and an input / output (I / O) interface 805. The electronic device 800 may operate based on an operating system stored in the memory 802, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0114] The present application also provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the above-mentioned digital twin construction method and digital twin application method are implemented.

[0115] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned digital twin construction method and digital twin application method.

[0116] The computer readable storage medium described above can be implemented by any type of volatile or nonvolatile storage devices 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 read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0117] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the digital twin construction device or the application device of the digital twin.

[0118] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction-related hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes ROM, RAM, magnetic disk or optical disk and various storage media that can store program codes.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for constructing a digital twin, characterized in that: A method for constructing a digital twin of a target physical entity, wherein the target physical entity includes at least two sub-devices, and the method for constructing the digital twin includes: Building a physical model of the sub-device based on a physical model description language, wherein the physical model is used to describe the sub-device; Building a physical relationship between the at least two sub-devices based on a physical relationship description language, wherein the physical relationship is used to describe an interaction relationship between the sub-devices; Constructing the digital twin according to the physical models of the at least two sub-devices and the physical relationship; The constructing the digital twin according to the physical models of the at least two sub-devices and the physical relationship includes: obtaining description data of each sub-device of the at least two sub-devices; converting the description data into a device shadow corresponding to the sub-device based on the physical model; and converting the device shadows of the at least two sub-devices into the digital twin based on the physical relationship; The converting the description data into a device shadow corresponding to the sub-device based on the object model includes: parsing the description data based on the object model to obtain a target value corresponding to a target object name in the object model, wherein the object name is a key of a key-value pair and the value corresponding to the object name is a value of the key-value pair; filling the target value into the value corresponding to the target object name in the object model to obtain a device shadow corresponding to the sub-device; The method further includes: constructing a physical relationship between at least two digital twins based on a physical relationship description language; and constructing digital twins corresponding to the at least two digital twins according to the at least two digital twins and the physical relationship between the at least two digital twins.

2. The digital twin construction method according to claim 1, characterized in that: The converting the device shadows of the at least two sub-devices into the digital twin based on the physical relationship includes: The information contained in the device shadows of the at least two sub-devices is filled in correspondingly in the object relationship to obtain the digital twin.

3. A digital twin application method, characterized in that: The digital twin is constructed by the digital twin construction method according to any one of claims 1 to 2, and the application method of the digital twin includes: Sending control instructions to the device shadow corresponding to the target sub-device through the physical relationship in the digital twin, wherein the target sub-device is a sub-device included in the physical entity corresponding to the digital twin; The control instructions in the device shadow are sent to the target sub-device through the physical model in the digital twin, so that the target sub-device executes the control instructions.

4. The application method of the digital twin according to claim 3, characterized in that: The sending the control instruction in the device shadow to the target sub-device includes: If it is determined that the target sub-device is online, the control instruction in the device shadow is sent to the target sub-device according to the timestamp corresponding to the control instruction; or If it is determined that the target sub-device is offline, the control instruction is cached in the device shadow, and when it is determined that the target sub-device is back online, the control instruction in the device shadow is sent to the target sub-device according to the timestamp corresponding to the control instruction.

5. A digital twin construction device, characterized in that: A digital twin of a target physical entity is constructed, wherein the target physical entity includes at least two sub-devices, and the digital twin construction device includes: A first construction module is configured to construct a physical model of the sub-device based on a physical model description language, wherein the physical model is used to describe the sub-device; A second building module is configured to build a physical relationship between the at least two sub-devices based on a physical relationship description language, wherein the physical relationship is used to describe an interaction relationship between the sub-devices; a processing module, configured to construct the digital twin according to the physical models of the at least two sub-devices and the physical relationship; The processing module is specifically configured to obtain description data of each of the at least two sub-devices; convert the description data into a device shadow corresponding to the sub-device based on the object model; and convert the device shadows of the at least two sub-devices into the digital twin based on the object relationship; When the processing module is used to convert the description data into a device shadow corresponding to the sub-device based on the object model, the processing module is specifically used to: parse the description data based on the object model to obtain a target value corresponding to the target object name in the object model, wherein the object name is the key of a key-value pair and the value corresponding to the object name is the value of the key-value pair; fill the target value into the value corresponding to the target object name in the object model to obtain the device shadow corresponding to the sub-device; The processing module is also used to construct a physical relationship between at least two digital twins based on a physical relationship description language; and construct digital twins corresponding to the at least two digital twins according to the at least two digital twins and the physical relationship between the at least two digital twins.

6. A digital twin application device, characterized in that: The digital twin is constructed by the digital twin construction method according to any one of claims 1 to 2, and the application device of the digital twin includes: A first sending module is configured to send a control instruction to a device shadow corresponding to a target sub-device through a physical relationship in the digital twin, wherein the target sub-device is a sub-device included in the physical entity corresponding to the digital twin; The second sending module is used to send the control instructions in the device shadow to the target sub-device through the physical model in the digital twin, so that the target sub-device executes the control instructions.

7. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Digital twinning method and system based on graph database

    CN110442737A

  • Equipment shadow control method and device, storage medium and electronic equipment

    CN113037771A