Method and device for generating digital model and nonvolatile storage medium

By reading multiple data sources of edge devices in different storage devices and generating digital models, the problem of single data sources is solved, and dynamic management and intelligent management of edge devices are realized.

CN119442633APending Publication Date: 2025-02-14CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411487858.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When building a digital model of physical physical equipment in the prior art, the data source is single, resulting in the digital model being unable to simulate the full functions of physical physical equipment and being unable to support intelligent management.

Method used

Read the metadata, configuration data, and custom data of edge devices, including attribute data, through the same query interface, and generate a digital model of edge devices.

Benefits of technology

By integrating user-defined attribute data, the source of data is expanded, the compatibility between the digital model and edge devices is improved, dynamic management of edge devices is realized, and intelligent management is supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442633A_ABST
    Figure CN119442633A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for generating a digital model and a nonvolatile storage medium. The method comprises the steps that under the condition that a generation instruction is received, metadata of the edge device, configuration data of the edge device and self-defined data are read in different storage devices through the same query interface, the metadata and the configuration data are obtained by detecting the edge device, and the self-defined data are stored in the storage devices; the custom data is acquired through an external bus, the custom data comprises attribute data, the attribute data is changed parameters of the edge device in the operation process, and the generation instruction is used for indicating to generate a digital model of the edge device; and generating a digital model of the edge device according to the metadata, the configuration data and the custom data. The technical problem that the constructed digital model cannot simulate all functions of the entity physical equipment and cannot be used for supporting intelligent management due to the fact that the data source is single when the digital model of the entity physical equipment is constructed in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular, to a method and device for generating a digital model, and a non-volatile storage medium. Background Art

[0002] With the rapid development of the Internet of Things, artificial intelligence and big data technologies, modern industrial production is gradually transforming towards intelligence and automation, and enterprises are increasingly demanding the management of production equipment. They not only require real-time monitoring of the operating status of equipment, but also expect to optimize production processes and improve efficiency through deep data mining and intelligent analysis. As a key technology under this trend, digital twin technology achieves accurate monitoring and prediction of the entire life cycle of physical equipment by building a digital model of physical entities in virtual space, greatly improving the intelligence level of the Industrial Internet of Things (IoT). In related technologies, the digital model of physical equipment is constructed only by relying on the data of the physical equipment itself, which has the problem of a single source of data collection.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method and device for generating a digital model, and a non-volatile storage medium, so as to at least solve the technical problem that when constructing a digital model of a physical device in the related technology, the constructed digital model cannot simulate all functions of the physical device and cannot be used to support intelligent management due to a single data source.

[0005] According to one aspect of an embodiment of the present application, a method for generating a digital model is provided, comprising: upon receiving a generation instruction, reading metadata of an edge device, configuration data of the edge device, and custom data in different storage devices through the same query interface, wherein the metadata and configuration data are obtained by detecting the edge device, the custom data is obtained through an external bus, the custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of a system to be detected, and the generation instruction is used to instruct generation of a digital model of the edge device; and generating a digital model of the edge device according to the metadata, configuration data, and custom data.

[0006] Optionally, before reading the metadata, configuration data and custom data of the edge device in different storage devices, it includes: classifying the metadata, configuration data and custom data into static data and dynamic data; storing the static data in a relational database, and storing the dynamic data in a time series database, wherein the relational database stores static data based on a key-value relationship, and the time series database stores dynamic data based on a time sequence; and generating a time series table of the time series database, wherein the time series table is used to record update information of the dynamic data.

[0007] Optionally, metadata, configuration data and custom data are classified into static data and dynamic data, including: obtaining the update frequencies of metadata, configuration data and custom data respectively; determining data corresponding to an update frequency less than or equal to a preset update frequency as static data; and determining data corresponding to an update frequency greater than the preset update frequency as dynamic data.

[0008] Optionally, metadata, configuration data and custom data are classified into static data and dynamic data, including: respectively determining the types of interfaces for obtaining metadata, configuration data and custom data; determining data of type detection interface as static data, wherein the detection interface is an interface connected to an edge device; determining data of type bus interface as dynamic data, wherein the bus interface is an interface connected to an external bus, and the external bus is connected to a user-side device.

[0009] Optionally, the method for generating a digital model also includes: sending a trigger command to the digital model, and displaying the dynamic change process of the digital model under the action of the trigger command, wherein the trigger command is used to trigger the digital model to simulate the dynamic changes of the edge device, and the dynamic change process simulates the changes of the edge device during actual operation.

[0010] Optionally, before issuing a trigger command to the digital model, the method includes: receiving the trigger command, and determining in the historical commands whether there is a target historical command that implements the same function as the trigger command, wherein the historical command is a trigger command received before a target moment, and the target moment is the moment when the trigger command is received; when it is determined that there is a target historical command, determining the version number of the trigger command based on the version number of the target historical command; when there is no target historical command, creating a version number for the trigger command, and storing the trigger command and the version number in association with each other.

[0011] Optionally, sending a trigger command to the digital model includes: determining the running status of the digital model, wherein the running status includes: online and offline; when the running status of the digital model is online, sending a trigger command associated with the latest version number to the digital model, wherein the latest version number is the version number whose generation time is closest to the current time.

[0012] Optionally, after issuing a trigger command to the digital model, it includes: obtaining the status of multiple stored trigger commands, wherein the status includes: issued and to be issued; adding a first label to the trigger command with the status of issued, and adding a second label to the command with the status of to be issued, wherein the first label is used to indicate that the trigger command has been executed, and the second label is used to indicate that the trigger command is no longer executed.

[0013] According to another aspect of an embodiment of the present application, a device for generating a digital model is also provided, including: a reading module, which is used to read the metadata of the edge device, the configuration data of the edge device and the custom data in different storage devices through the same query interface when a generation instruction is received, wherein the metadata and configuration data are obtained by detecting the edge device, and the custom data is obtained through an external bus. The custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected, and the generation instruction is used to instruct the generation of a digital model of the edge device; a generation module, which is used to generate a digital model of the edge device based on the metadata, configuration data and custom data.

[0014] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, in which a computer program is stored, wherein the method for generating a digital model is executed by running the computer program on a device where the non-volatile storage medium is located.

[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for generating a digital model through the computer program.

[0016] According to another aspect of an embodiment of the present application, a computer program product is also provided, including computer instructions, which implement the steps of the above-mentioned method for generating a digital model when executed by a processor.

[0017] In an embodiment of the present application, when a generation instruction is received, the metadata, configuration data and custom data of the edge device are read in different storage devices through the same query interface, wherein the metadata and configuration data are obtained by detecting the edge device, the custom data is obtained through an external bus, the custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected, and the generation instruction is used to instruct the generation of a digital model of the edge device; the digital model of the edge device is generated according to the metadata, configuration data and custom data, and the purpose of enriching the data source is achieved by adding custom parameters related to the dynamic changes of the edge device to the data used to establish the digital model of the edge device; the digital model of the edge device is jointly established by using the dynamic data (metadata and configuration data) obtained by detecting the edge device and the custom parameters, so as to achieve the purpose of improving the fit between the digital model and the edge device, thereby realizing the technical effect of dynamically managing the edge device based on the digital model, thereby solving the problem that the constructed digital model cannot simulate all the functions of the physical device and cannot be used to support intelligent management technology due to the single data source when constructing the digital model of the physical device in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a method for generating a digital model according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of steps of a method for generating a digital model according to an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of issuing a trigger command to a digital model according to an embodiment of the present application;

[0022] Figure 4 is a structural diagram of a device for generating a digital model according to an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of the workflow of a device for generating a digital model according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0027] Metadata: data used to describe data. In this embodiment, the metadata of the edge device is information that describes the static properties and characteristics of the edge device itself, such as the identifier, type, manufacturer, model, serial number, maintenance record, etc. of the edge device.

[0028] Edge device: A device located at the edge of the network, that is, a device close to the data source and capable of data processing, for example, a terminal device connected to the Internet, such as a smartphone, tablet computer, IoT device, etc., where IoT devices can be smart sensors, industrial controllers, etc.

[0029] Digital twin: Make full use of physical models, sensors, operation history and other data, integrate multi-disciplinary, multi-physical quantity, multi-scale, and multi-probability simulation processes, complete mapping in virtual space, and thus reflect the entire life cycle of the corresponding physical equipment.

[0030] In the related art, the digital model of the edge device is established only by relying on the static attribute data of the edge device itself or only relying on the static attribute data and the dynamic data at the current moment, so it is impossible to observe the dynamic changes of the edge device through the data model. At the same time, the data management of the edge device is to interact with the data through the console, device or API of the edge side device. Since no unified data reading interface is provided, data acquisition needs to be carried out through different interfaces, resulting in a complicated data reading process, low data acquisition efficiency, and untimely data updates. Therefore, there are problems of a single data source and scattered and inconsistent interfaces. In addition, there are problems of low data storage flexibility, inability to expand device attribute data, and inability to issue commands intelligently. In order to solve this problem, a relevant solution is provided in the embodiment of the present application, which is described in detail below.

[0031] According to an embodiment of the present application, a method embodiment for generating a digital model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal for implementing the method of generating a digital model is shown. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0033] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method for generating a digital model in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned method for generating a digital model. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0037] The embodiment of the present application provides a method for generating a digital model that can be applied in the above operating environment. Figure 2 is a flowchart of the steps of the method for generating a digital model provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0038] Step S202, when receiving a generation instruction, read the metadata of the edge device, the configuration data of the edge device and the custom data in different storage devices through the same query interface, wherein the metadata and configuration data are obtained by detecting the edge device, and the custom data is obtained through an external bus. The custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected, and the generation instruction is used to instruct the generation of a digital model of the edge device.

[0039] The method provided in the embodiment of the present application is executed by a system with a digital twin function (such as EdgeX). In the embodiment of the present application, the system (such as EdgeX) that executes the method provided in the embodiment of the present application can be connected to the system to be detected, obtain the relevant data (metadata and configuration data) of any device in the system to be detected (such as an edge device located at the edge of the system to be detected) and store it; at the same time, the system (such as EdgeX) that executes the method provided in the embodiment of the present application can also be connected to the user-side device, obtain the user-entered custom data through the external bus connected to the user-side device and store it, or interact with the user through the interactive interface, obtain the user-entered custom data through the external bus connected to the interface and store it. When the user wants to establish a digital model for a certain device in the system to be detected, the user-side device that communicates with the system that executes the method provided in the embodiment of the present application will issue a generation instruction, or the generation instruction will be issued through the interactive interface of the system that executes the method provided in the embodiment of the present application; for example, if the user wants to establish a digital model of an edge device, a user instruction to generate a digital model of the edge device will be issued. In step S202, when the system executing the method provided by the embodiment of the present application receives a generation instruction, it reads the metadata of the edge device, the configuration data of the edge device and the custom data through a query interface, wherein the above metadata, configuration data and custom data are stored in different types of storage devices; the custom data is (dynamic) attribute data, which is a parameter that changes during the operation of the edge device. For example, if the edge device is a smart meter device, the custom data can be a parameter with dynamic attributes such as the ambient temperature of the smart meter device, and the metadata can be the name of the smart meter device, an identifier for uniquely identifying the smart meter device, etc.; the configuration data includes: a service interface for the interaction between the smart meter device and other devices, etc. The above-mentioned custom data comes from the user and can be maintained and updated by the user. The user can access the message bus by himself, and perform data processing such as synthesis, statistics, association, clustering, evolution, regression and generalization in the user-side application, and then call the digital twin interface to transfer the data back to the corresponding database.

[0040] According to an optional embodiment of the present application, before reading the metadata, configuration data and custom data of the edge device in different storage devices, it includes: classifying the metadata, configuration data and custom data into static data and dynamic data; storing the static data in a relational database, and storing the dynamic data in a time series database, wherein the relational database stores static data based on a key-value relationship, and the time series database stores dynamic data based on a time sequence; and generating a time series table of the time series database, wherein the time series table is used to record update information of the dynamic data.

[0041] As mentioned in step S202, the system (such as EdgeX) that executes the method provided in the embodiment of the present application can be connected to the system to be detected and the user-side device at the same time, and obtains and stores the data (metadata and configuration data) of the system to be detected itself and the custom data input by the user side. In this embodiment, the system that executes the method provided in the embodiment of the present application classifies and stores the above data; specifically, in this embodiment, the above data is classified into dynamic data with time series and static data without time series, and the dynamic data is stored in a time series database (such as Influxdb) according to the time order defined according to the time when the data was generated, and the static data is stored in a relational database (such as MySQL) according to the key-value relationship between the static data. In addition, in this embodiment, after the dynamic data is stored in the time series database, a time series table is generated for recording the update information of the dynamic data (such as update time, status before and after update, value before and after update, etc.), wherein the update information of all dynamic data can be recorded in one time series table, or different types of dynamic data can be recorded in different time series tables; the time series table records each update information according to time, and supports query functions such as querying the latest value and querying the value by time range. In addition, in some embodiments, in addition to classifying and storing according to static data and dynamic data, the data can also be classified and stored according to the time when it was generated. For example, the time interval can be customized and the data belonging to the same time interval can be stored in one database. Static data mainly includes basic information such as device metadata, such as the device's unique identifier (device ID), device name, operating status, management status, device service name, device attribute file name, description, label, etc. When storing static data according to a key-value relationship, the information that can uniquely identify the device is used as the "key", and other descriptive information of the device is used as the "value". For example, the key-value relationship of static data includes the following forms: 1) Using device ID as the "key", in this case, the "value" is the device name, operating status, management status, device service name, device attribute file name, description, label, etc.; 2) Using device name as the "key", in this case, the "value" is the device ID, operating status, management status, device service name, device attribute file name, description, label, etc.

[0042] Optionally, metadata, configuration data and custom data are classified into static data and dynamic data, including: obtaining the update frequencies of metadata, configuration data and custom data respectively; determining data corresponding to an update frequency less than or equal to a preset update frequency as static data; and determining data corresponding to an update frequency greater than the preset update frequency as dynamic data.

[0043] As mentioned in the above embodiments, metadata, configuration data and custom data can be divided into dynamic data and static data for classified storage. When the above data is classified into dynamic data and static data, the dynamic data and static data can be distinguished according to the update frequency of the data according to the method in this embodiment. Specifically, the update frequency of the metadata, configuration data and custom data is obtained respectively, and the static data and dynamic data are distinguished by comparing the update frequency with the preset update frequency.

[0044] According to an optional embodiment of the present application, metadata, configuration data and custom data are classified into static data and dynamic data, including: respectively determining the types of interfaces for obtaining metadata, configuration data and custom data; determining data of type detection interface as static data, wherein the detection interface is an interface connected to an edge device; determining data of type bus interface as dynamic data, wherein the bus interface is an interface connected to an external bus, and the external bus is connected to a user-side device.

[0045] In the embodiment of the present application, the data can also be classified as static data or dynamic data according to its source. Specifically, in the present embodiment, the source of the data is determined by the type of interface for obtaining the data. For example, metadata and configuration data are obtained by detecting a device in the system to be detected (such as an edge device), then the interface for obtaining metadata and configuration data is the detection interface, and custom data is obtained from a user-side device (a user-side device or an interactive interface for interacting with a user), then the interface for obtaining custom data is a bus interface; usually, the data that can be obtained by detecting a device in the system to be detected (such as an edge device) is device metadata (device): data that describes basic information about the device, such as the name of the device, operating status, management status, name of the device service to which it belongs, name of the device attribute file to which it belongs, description, tags, etc.; device attributes associated with device metadata (device profile) (attributes associated with the device, which describe the specific characteristics and capabilities of the device, usually the value / state of dynamic attribute data at the time of detection): such as the output voltage of the electric meter device, which tends to be static data; and the custom data obtained from the bus interface are parameters that change during the operation of the edge device. Therefore, in this embodiment, the data obtained from the detection interface is classified as static data, and the data obtained from the bus interface is classified as dynamic data.

[0046] Step S204, generating a digital model of the edge device according to the metadata, configuration data and custom data.

[0047] In step S204, a digital model of the edge device is generated from the configuration data, metadata and custom data read from the same interface; before generating the digital model, the configuration data, metadata and custom data read from different storage devices / storage locations can be stored in a data structure to achieve the effect of data integration.

[0048] According to an optional embodiment of the present application, the method for generating a digital model also includes: issuing a trigger command to the digital model, and displaying the dynamic change process of the digital model under the action of the trigger command, wherein the trigger command is used to trigger the digital model to simulate the dynamic changes of the edge device, and the dynamic change process simulates the changes of the edge device during actual operation.

[0049] The method provided in the embodiment of the present application can simulate the dynamic change process of the edge device in actual operation by simulating the digital model. Specifically, in this embodiment, the system executing the method provided in the embodiment of the present application will send the command (i.e., trigger command) for operating the digital model input by the user or other components in EdgeX to the digital model, so that the digital model simulates the dynamic changes of the edge device in the actual operation process according to the trigger command; for example, the trigger command can trigger a set of debugging parameters stored in the system executing the method provided in the embodiment of the present application to be sent to the digital model, and display the dynamic change process of the digital model from the current parameters to the debugging parameters. For another example, the trigger command can only indicate a certain state. At this time, after the trigger command is sent to the digital model, the dynamic change process of the digital model from the current state to the state indicated by the trigger command is displayed.

[0050] Optionally, before issuing a trigger command to the digital model, the method includes: receiving the trigger command, and determining in the historical commands whether there is a target historical command that implements the same function as the trigger command, wherein the historical command is a trigger command received before a target moment, and the target moment is the moment when the trigger command is received; when it is determined that there is a target historical command, determining the version number of the trigger command based on the version number of the target historical command; when there is no target historical command, creating a version number for the trigger command, and storing the trigger command and the version number in association with each other.

[0051] This embodiment provides a command issuance strategy based on version management; in this embodiment, after receiving a command (i.e., a trigger command) issued by a user or other components in EdgeX to trigger a dynamic change of a digital model, it is not directly issued to the digital model because it is not certain whether the digital model is online. In this embodiment, after receiving the trigger command, it is necessary to store it first. Specifically, after receiving the trigger command, the digital twin system (a system that executes the method provided in the embodiment of the present application) first determines whether a trigger command (i.e., a target historical command) that implements the same function as the trigger command and is received before the moment (i.e., the target moment) of receiving the trigger command is stored in the digital twin system. If so, the version number of the target historical command is obtained, and the version number of the trigger command is determined based on the version number of the target historical command; if no historical command is stored, or if a trigger command that implements a different function and is received before the moment (i.e., the target moment) of receiving the trigger command is stored, a new version number is directly created for the trigger command. In the above scheme, when determining the version number of the trigger command based on the version number of the target historical command, the following methods can be used: 1) querying the version number with the largest value among multiple version numbers of multiple target historical commands, and adding 1 to the version number with the largest value as the version number of the trigger command; or 2) determining the generation time corresponding to multiple version numbers of multiple target historical commands, and adding 1 to the version number corresponding to the generation time closest to the current time. In this embodiment, in order to facilitate query, the trigger command and its corresponding version number are stored in association, for example, in the form of key value.

[0052] According to some optional embodiments of the present application, issuing a trigger command to a digital model includes: determining the operating status of the digital model, wherein the operating status includes: online and offline; when the operating status of the digital model is online, issuing a trigger command associated with the latest version number to the digital model, wherein the latest version number is the version number whose generation time is closest to the current time.

[0053] Figure 3 It is a schematic diagram of sending trigger commands to the digital model, such as Figure 3 As shown, the user / other components of EdageX initiate requests to the digital model through the business management platform in the digital twin system for receiving and commanding (i.e., triggering commands), such as Figure 3 As shown in , after receiving the trigger command, a version number is first generated for it and associated storage is performed, and it is marked as not executed. Figure 3As shown, the digital twin system detects the running status of the digital model and updates the online status of the device in a loop, wherein the digital twin system periodically requests access to the status of the digital model from the component (Core Meatadata) used to store device metadata, and the metadata component accesses the data in the device service (Device Service) component. If it is determined that the data in the device service (Device Service) component has been updated, the digital model is online, and the status of the digital model is returned and updated to online; at this time, after receiving the request, the business management platform sends a command with the latest version number to the specific service (the service to which the function implemented by the trigger command belongs), wherein the earliest version number can be determined by judging whether the version number is the closest to the current moment, or by judging whether the value is the largest.

[0054] Optionally, after issuing a trigger command to the digital model, it includes: obtaining the status of multiple stored trigger commands, wherein the status includes: issued and to be issued; adding a first label to the trigger command with the status of issued, and adding a second label to the command with the status of to be issued, wherein the first label is used to indicate that the trigger command has been executed, and the second label is used to indicate that the trigger command is no longer executed.

[0055] Still Figure 3 As shown, after the trigger command is issued to the digital model, the first label is marked for the trigger command that has been issued, wherein the first label is "executed" or a numerical value indicating that it has been executed; at the same time, the status of other stored trigger commands is queried, and the second label is marked for the trigger command whose status is to be issued, wherein the second label is "expired" or a numerical value indicating that it has been expired. The trigger command carrying the second label will not be issued to the digital model in the subsequent execution process. This is because the version number represented by the version of these trigger commands whose status is to be issued is smaller than the version represented by the latest version number. The reason why they are not issued may be due to obstruction or network disconnection during issuance. Since these commands have not been issued, the digital model has not changed dynamically, and the user / other components have issued updated versions of the commands. In order to avoid network problems when issuing commands later, resulting in disordered command issuance order, the control instructions received by the device are not the latest, resulting in ambiguity in issuing commands, returning errors, command issuance failures, etc., in this embodiment, they are marked with the second label so that they are no longer issued.

[0056] It should be noted that if the digital model is in an offline state after receiving the trigger instruction, the state of the digital model is waited for to be updated, and the trigger command can still be continuously received while waiting for the state of the digital model to be updated.

[0057] Through the above steps, it is possible to integrate user-defined attribute data when establishing a digital model of a physical device, thereby expanding the source of data and enriching the data used to generate the digital model. Before generating the digital model, the data used to establish the digital model stored in different storage devices are integrated together through the same interface, thereby improving the speed of generating the digital model. By adding enhanced functions such as data structure integration, custom attributes, classified storage, and intelligent distribution based on the IoT software framework EdgeX, a high degree of model simulation and intelligent management of IoT edge devices can be achieved.

[0058] Figure 4 It is a structural diagram of a device for generating a digital model provided according to an embodiment of the present application, including: a reading module 40, which is used to read the metadata of the edge device, the configuration data of the edge device and the custom data in different storage devices through the same query interface when a generation instruction is received, wherein the metadata and configuration data are obtained by detecting the edge device, and the custom data is obtained through an external bus. The custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected, and the generation instruction is used to instruct the generation of a digital model of the edge device; a generation module 42, which is used to generate a digital model of the edge device according to the metadata, configuration data and custom data.

[0059] It should be noted that Figure 4 The preferred implementation of the illustrated embodiment can be found in Figure 2 The relevant description of the illustrated embodiment will not be repeated here.

[0060] Figure 5 It is a schematic diagram of the workflow of a device for generating a digital model. The system for executing the method provided in the embodiment of the present application is a system that expands the device attributes and data sources based on the EdgeX framework, such as Figure 5 As shown, the reading module 40 obtains the metadata (Device Metadata), configuration data (Device Profile), and custom data of the edge device itself from the edge gateway side, such as service data (Device Service) related to the device service, classifies the metadata and configuration data as static data for management, and classifies the custom data as dynamic data for management; generates a digital model of the edge device through the generation module and based on the above data. The device for generating the digital model can also detect whether the status of the digital model is online after receiving the trigger command, and issue a trigger command when the status of the digital model is online, so that the digital model changes dynamically according to the trigger instruction.

[0061] An embodiment of the present application further provides a non-volatile storage medium, in which a computer program is stored, wherein the above method for generating a digital model is executed by running the computer program on a device where the non-volatile storage medium is located.

[0062] The above-mentioned non-volatile storage medium is used to store programs that perform the following functions: when receiving a generation instruction, the metadata, configuration data and custom data of the edge device are read in different storage devices through the same query interface, wherein the metadata and configuration data are obtained by detecting the edge device, and the custom data is obtained through an external bus. The custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected. The generation instruction is used to instruct the generation of a digital model of the edge device; the digital model of the edge device is generated according to the metadata, configuration data and custom data.

[0063] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above method for generating a digital model through the computer program.

[0064] The processor in the above-mentioned electronic device is used to run a program that performs the following functions: when receiving a generation instruction, the metadata of the edge device, the configuration data of the edge device and the custom data are read in different storage devices through the same query interface, wherein the metadata and configuration data are obtained by detecting the edge device, and the custom data is obtained through an external bus. The custom data includes attribute data, and the attribute data is a parameter that changes during the operation of the edge device. The edge device is a device located at the edge of the system to be detected. The generation instruction is used to instruct the generation of a digital model of the edge device; the digital model of the edge device is generated according to the metadata, configuration data and custom data.

[0065] According to an embodiment of the present application, a computer program product is also provided, including computer instructions, which implement the steps of the above-mentioned method for generating a digital model when the computer instructions are executed by a processor.

[0066] It should be noted that the various modules in the above-mentioned digital model generation device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0067] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0068] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0070] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0071] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0072] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0073] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a digital model, characterized in that: include: In the case of receiving a generation instruction, metadata of an edge device, configuration data of the edge device, and custom data are read in different storage devices through a same query interface, wherein the metadata and the configuration data are obtained by detecting the edge device, the custom data is obtained through an external bus, the custom data includes attribute data, and the attribute data is a parameter of the edge device that changes during operation. The edge device is a device located at the edge of a system to be detected, and the generation instruction is used to instruct generation of a digital model of the edge device; A digital model of the edge device is generated based on the metadata, the configuration data, and the custom data.

2. The method according to claim 1, characterized in that Before reading metadata of an edge device, configuration data of the edge device, and custom data in different storage devices, including: classifying the metadata, the configuration data, and the custom data into static data and dynamic data; storing the static data in a relational database and storing the dynamic data in a time series database, wherein the relational database stores the static data according to a key-value relationship, and the time series database stores the dynamic data according to a time sequence; and A time series table of the time series database is generated, wherein the time series table is used to record update information of the dynamic data.

3. The method according to claim 2, characterized in that Classifying the metadata, the configuration data, and the custom data into static data and dynamic data includes: Respectively obtain the update frequencies of the metadata, the configuration data, and the custom data; Determine data corresponding to the update frequency that is less than or equal to the preset update frequency as the static data; And the data corresponding to the update frequency greater than the preset update frequency is determined as the dynamic data.

4. The method according to claim 2, characterized in that: Classifying the metadata, the configuration data, and the custom data into static data and dynamic data includes: Determine the types of interfaces for obtaining the metadata, the configuration data, and the custom data respectively; Determine the data of the type of detection interface as the static data, wherein the detection interface is an interface connected to the edge device; The data of the type of bus interface is determined as the dynamic data, wherein the bus interface is an interface connected to the external bus, and the external bus is connected to the user-side device.

5. The method according to claim 1, characterized in that The method also includes: issuing a trigger command to the digital model, and displaying the dynamic change process of the digital model under the action of the trigger command, wherein the trigger command is used to trigger the digital model to simulate the dynamic change of the edge device, and the dynamic change process simulates the changes of the edge device during actual operation.

6. The method according to claim 5, characterized in that Before sending a trigger command to the digital model, the method includes: receiving the trigger command, and determining whether there is a target historical command in the historical commands that implements the same function as the trigger command, wherein the historical command is a trigger command received before a target time, and the target time is the time when the trigger command is received; When it is determined that the target historical command exists, the version number of the trigger command is determined according to the version number of the target historical command; when the target historical command does not exist, a version number is created for the trigger command, and the trigger command and the version number are associated and stored.

7. The method according to claim 6, characterized in that Sending the trigger command to the digital model includes: Determining the operating state of the digital model, wherein the operating state includes: online and offline; When the running state of the digital model is online, the trigger command associated with the latest version number is issued to the digital model, wherein the latest version number is the version number whose generation time is closest to the current time.

8. The method according to claim 5, characterized in that After the trigger command is sent to the digital model, the method includes: Acquire the status of the stored multiple trigger commands, wherein the status includes: issued and to be issued; A first label is added to the trigger command whose status is the issued command, and a second label is added to the command whose status is the to-be-issued command, wherein the first label is used to indicate that the trigger command has been executed, and the second label is used to indicate that the trigger command is no longer executed.

9. A device for generating a digital model, characterized in that: include: A reading module, configured to read metadata of an edge device, configuration data of the edge device, and custom data in different storage devices through a same query interface when a generation instruction is received, wherein the metadata and the configuration data are obtained by detecting the edge device, the custom data is obtained through an external bus, the custom data includes attribute data, and the attribute data is a parameter of the edge device that changes during operation. The edge device is a device located at an edge position of a system to be detected, and the generation instruction is used to instruct generation of a digital model of the edge device; A generation module is used to generate a digital model of the edge device according to the metadata, the configuration data and the custom data.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the method for generating a digital model according to any one of claims 1 to 8 is executed by running the computer program on the device where the non-volatile storage medium is located.

11. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the method for generating a digital model according to any one of claims 1 to 8 through the computer program.

12. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method for generating a digital model according to any one of claims 1 to 8 are implemented.