Construction method and device of digital twinborn model, computer equipment and storage medium

By using a pre-trained large language model to analyze requirement documents and generate logical code, the problem of repetitive twin model establishment in production enterprises is solved, and the efficiency and accuracy of digital twin models are improved.

CN120689478APending Publication Date: 2025-09-23SF TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410328284.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In production-oriented enterprises, there is a problem of repetitive twin model establishment and verification for the same machines, tools and equipment in different factory workshops, resulting in inefficiency and waste of resources.

Method used

Use pre-trained large language models to analyze requirement documents, call replica models and generate logic code, build digital twin models, and reduce repetitive operations.

Benefits of technology

It improves the efficiency and accuracy of establishing digital twin models and reduces the time and resource consumption of repetitive operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689478A_ABST
    Figure CN120689478A_ABST
Patent Text Reader

Abstract

The invention relates to a digital twinning model construction method and device, computer equipment and a storage medium, and relates to the technical field of digital twinning. The method comprises the following steps: acquiring a demand document of a to-be-constructed scene of a to-be-constructed digital twin model; inputting the demand document into a pre-trained large language model; the pre-trained large language model is used for analyzing the demand document, calling a duplicated model for constructing an entity in the to-be-constructed scene based on an analysis result, and generating a logic code of a to-be-constructed digital twin model; constructing a digital twinborn model based on a duplicated model called by a pre-trained large language model and the generated logic code; according to the method, the required digital twinborn model can be intelligently constructed according to the description of the actual demand document by utilizing the pre-trained large language model, and the establishment of the digital twinborn model for each demand document is not needed, so that the establishment efficiency and accuracy of the twinborn model corresponding to the scene to be constructed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital twin technology, and in particular to a method, apparatus, computer equipment, and storage medium for constructing a digital twin model. Background Art

[0002] With the progress of society and the development of the times, manufacturing companies are gradually finding it difficult to adapt to the rapid development and sudden changes in the market environment. Building a digital factory based on digital twin technology is the best way to solve these problems. By relying on real data from the entire product life cycle, the entire production process can be simulated, optimized, and reconstructed in a virtual environment, which is conducive to improving the success rate of innovation and optimization of manufacturing companies. Among them, the created digital factory includes all connected machines, tools, and equipment in the actual factory workshop. However, due to the large number of factory workshops and the fact that the same machines, tools, and / or equipment often exist in different factory workshops, how to avoid the repeated establishment and verification of twin models for the same machines, tools, and / or equipment is an urgent problem to be solved. Summary of the Invention

[0003] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for constructing a digital twin model that can reduce repetitive operations in the process of establishing a twin model to address the above technical problems.

[0004] In a first aspect, the present application provides a method for constructing a digital twin model, comprising:

[0005] Obtain the requirements document for the scenario to be built for the digital twin model to be built;

[0006] Inputting the requirement document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis result, and generate the logic code of the digital twin model to be built;

[0007] The digital twin model is constructed based on the replica model called by the pre-trained large language model and the generated logic code.

[0008] In one embodiment, inputting the requirement document into a pre-trained large language model includes:

[0009] Generate a prompt for guiding the pre-trained large language model to generate a preset output result according to the requirement document;

[0010] Combining the word prompt with a corresponding preset query question to obtain a requirement question for requesting the pre-trained large language model to construct the digital twin model;

[0011] The requirement question is input into the pre-trained large language model.

[0012] In one embodiment, before inputting the requirement document into the pre-trained large language model, the method further includes:

[0013] Acquire text data of the to-be-built scenario based on the requirement document, and acquire model data of the constructed twin model associated with the text data;

[0014] Cleaning the text data and the model data to obtain a sample data set;

[0015] The sample data set is input into a large language model and fine-tuned to the large language model to obtain a pre-trained large language model.

[0016] In one embodiment, cleaning the text data and the model data to obtain a sample data set includes:

[0017] Cleaning the text data and the model data to obtain sample keywords in the text data, and sample twin model construction steps and sample twin model logic codes associated with the constructed twin model in the model data; wherein the sample keywords include at least the device name, attribute name, and behavior associated with the constructed twin model, and the sample twin model logic code includes at least the attribute value of the attribute name and the function name corresponding to the behavior;

[0018] Generate a sample data pair based on the sample keyword, the sample twin model construction step and the sample twin model logic code that match the sample keyword;

[0019] A plurality of the sample data pairs are integrated into a sample data set.

[0020] In one embodiment, cleaning the text data and the model data includes:

[0021] Screening a data table including the text data and the model data to obtain attribute values ​​associated with the constructed twin model;

[0022] Completing or deleting empty values ​​in the attribute values ​​to obtain an updated data table;

[0023] Generate a corresponding text file based on the updated data table; wherein the text file includes at least the device name, attribute name, attribute value, behavior and function name corresponding to the behavior associated with the constructed twin model;

[0024] Extract the device name, the attribute name and the behavior associated with the constructed twin model in the text file to obtain the sample keyword; extract at least the attribute value of the attribute name and the function name corresponding to the behavior in the text file to obtain the sample twin model logic code.

[0025] In one embodiment, after obtaining the pre-trained large language model and before inputting the requirement document into the pre-trained large language model, the method further includes:

[0026] Acquire test data for the scenario to be constructed; wherein the test data includes test text data for the scenario to be constructed;

[0027] Inputting the test text data into the pre-trained large language model;

[0028] Obtaining a twin model of the result output by the pre-trained large language model;

[0029] Comparing the result twin model with the entity corresponding to the test text data to obtain a first comparison result;

[0030] The pre-trained large language model is adjusted based on the first comparison result to obtain an updated pre-trained large language model.

[0031] In a second aspect, the present application further provides a device for constructing a digital twin model, the device comprising:

[0032] The data acquisition module is used to obtain the requirement document of the scenario to be built for the digital twin model to be built;

[0033] A data processing module, configured to input the requirements document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirements document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis results, and generate logic code for the to-be-built digital twin model;

[0034] A result output module is used to build the digital twin model based on the replica model called by the pre-trained large language model and the generated logic code.

[0035] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0036] Obtain the requirements document for the scenario to be built for the digital twin model to be built;

[0037] Inputting the requirement document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis result, and generate the logic code of the digital twin model to be built;

[0038] The digital twin model is constructed based on the replica model called by the pre-trained large language model and the generated logic code.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0040] Obtain the requirements document for the scenario to be built for the digital twin model to be built;

[0041] Inputting the requirement document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis result, and generate the logic code of the digital twin model to be built;

[0042] The digital twin model is constructed based on the replica model called by the pre-trained large language model and the generated logic code.

[0043] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0044] Obtain the requirements document for the scenario to be built for the digital twin model to be built;

[0045] Inputting the requirement document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis result, and generate the logic code of the digital twin model to be built;

[0046] The digital twin model is constructed based on the replica model called by the pre-trained large language model and the generated logic code.

[0047] The above-mentioned digital twin model construction method, device, computer equipment, storage medium and computer program product, by inputting the requirement document of the scene to be constructed of the digital twin model to be constructed into the pre-trained large language model, analyzes the requirement document based on the pre-trained large language model, and calls the replica model required for constructing the digital twin model according to the analysis results, and generates the logic code required for constructing the digital twin model according to the analysis results, and then constructs the digital twin model of the scene to be constructed based on the replica model called by the pre-trained large language model and the generated logic code. That is, the pre-trained large language model can be used to intelligently construct the required digital twin model according to the description of the actual requirement document, and there is no need to establish a digital twin model for each requirement document of the scene to be constructed, which is conducive to improving the efficiency and accuracy of establishing the twin model corresponding to the scene to be constructed. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 Schematic diagram of a process for constructing a digital twin model in one embodiment;

[0050] Figure 2 Schematic diagram of a process for constructing a digital twin model in another embodiment;

[0051] Figure 3 1 is a structural block diagram of a device for constructing a digital twin model in one embodiment;

[0052] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0054] With the development and digital transformation of the logistics industry, digital twin technology is widely used in the logistics sector as a key tool and method for verifying and optimizing sorting plan algorithms. Digital twins are created by manually modeling the physical equipment, processes, and systems within a transfer yard using 3D modeling software. This is then accomplished by programming logic and rendering using UE to create a twin of the corresponding scene. However, due to the large number of logistics sites and the repetitive nature of the twin model, the creation and verification of the model requires significant time and effort.

[0055] Based on this, this application provides a method for constructing a digital twin model to solve the problem that there are many logistics sites and the establishment and verification of repetitive twin models requires a lot of time and effort.

[0056] Figure 1 FIG. 1 is a flow chart of a method for constructing a digital twin model in one embodiment. In one embodiment, as Figure 1 As shown, a method for constructing a digital twin model is provided. This embodiment takes the application of this method to a terminal as an example, where the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices; it can be understood that the method can also be applied to a server, where the server can be an independent server or a server cluster composed of multiple servers, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server.

[0057] In this embodiment, the method for constructing a digital twin model may include the following steps 101 to 103, wherein:

[0058] Step 101: Obtain a requirement document for a scenario to be constructed for a digital twin model to be constructed.

[0059] Specifically, the requirements document in step 101 includes the specific content of the corresponding digital twin model that the user needs to build. Taking the logistics scene as an example, the scene to be built includes the supply chain management, transportation planning, sorting plan, parcels, vehicles, sorting machines, conveyors and scanners and other related data and physical equipment in the logistics scene; the data twin model is used to establish corresponding 3D models for the physical equipment entities, logistics-related processes and systems in the scene to be built.

[0060] Execute step 101 to obtain the requirement document input by the user, which includes the scene to be constructed of the digital twin model to be constructed; taking the scene to be constructed as a logistics scene as an example, the requirement document can be filled in with any content related to the logistics scene according to the user's needs, and this application does not make any specific restrictions on this.

[0061] Step 102: Input the requirement document into the pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and build a replica model of the entity in the scene to be built based on the analysis results, and generate the logic code of the digital twin model to be built.

[0062] Specifically, after executing step 101 to obtain the requirement document of the scene to be constructed of the digital twin model to be constructed input by the user, you can choose to further execute step 102 to input the requirement document into the pre-trained large language model; the pre-trained large language model here has been trained and can be used to receive the requirement document input by the user, and perform content analysis and combination on the received requirement document to obtain a twin model associated with the content recorded in the requirement document.

[0063] An optional implementation method is provided here. Taking the logistics scenario as an example of the scenario to be constructed, after receiving the demand document input by the user, the pre-trained large language model first analyzes and understands all the contents about the logistics scenario recorded in the demand document, so as to know the contents about the logistics scenario recorded in the demand document, such as supply chain management, transportation planning, sorting plan, package, vehicle, sorting machine, conveyor and scanner, and then based on these data contents in the analysis results, call a replica model that can construct a twin model of the entity corresponding to these data contents, such as a multidimensional model such as a 3D model, and generate logic code based on these data in the analysis results that can construct a twin model corresponding to these data contents. Among them, the entity can refer to physical equipment, physical process, physical plan, etc.; the replica model provided in this application uses a 3D model, which is only an optional implementation method provided by this application, but this application is not limited to this.

[0064] It can be seen that the pre-trained large language model in this application, after receiving the requirement document of the digital twin model to be generated input by the user, first analyzes and understands the requirement document, so as to convert the content of the requirement document into the corresponding 3D model calling interface and the corresponding twin model logic generation code; that is, the pre-trained large language model provided by this application can directly output the 3D model required to be called for the generation of the relevant digital twin model and its corresponding interface to be called, and the logic generation code required for the generation of the relevant digital twin model after receiving any requirement document about the digital twin model to be generated, without the need to re-select the 3D model to be called each time for different requirement content, and re-produce the logic code required to establish the twin model each time.

[0065] Step 103: Build a digital twin model based on the replica model called by the pre-trained large language model and the generated logic code.

[0066] Specifically, after the pre-trained large language model calls the 3D model (replica model) corresponding to the scene to be constructed based on the analysis results and generates the logic code of the digital twin model to be constructed, step 103 can be further executed to combine the 3D model called by the pre-trained large language model obtained by executing step 102 and the generated logic code to intelligently construct the digital twin model corresponding to the scene to be constructed in the requirement document.

[0067] Among them, regarding the content of combining the 3D model called by the pre-trained large language model and the generated logic code, an optional embodiment is provided here for reference. You can choose to use UE (UltraEdit, text editor) to output the digital twin model to be established. There are corresponding model modules and code modules in the UE, which is like a template. When the user wants to generate a digital twin of a car, the 3D model of the car and the function code of car movement, acceleration and deceleration, and passenger carrying will be generated at the same time based on the pre-trained large language model. Fill these two parts into the corresponding UE car creation template respectively, and the 3D model and function code can be combined to output the corresponding digital twin model of the car.

[0068] Digital twin models, through various digital means such as design tools, simulation tools, the Internet of Things, and virtual reality, map the various attributes of physical devices into virtual space, generating digital mirrors that can be disassembled, copied, transferred, modified, deleted, and repeatedly operated. This helps accelerate workers' understanding of physical entities and makes many operations that were previously impossible due to physical conditions and relied on real physical entities, such as simulation, batch replication, and virtual assembly, now accessible. Furthermore, digital twin models can combine IoT data collection, big data processing, and artificial intelligence modeling and analysis to evaluate the current state of physical factories, diagnose past problems, and predict future development trends. The digital twin models provide comprehensive decision-making support by providing analytical results and simulating various possibilities.

[0069] In the method for constructing a digital twin model provided by the above-mentioned application, the requirement document of the scene to be constructed of the digital twin model to be constructed is input into the pre-trained large language model, and the requirement document is analyzed based on the pre-trained large language model to call the replica model required for constructing the digital twin model according to the analysis results, and the logic code required for constructing the digital twin model is generated according to the analysis results. Then, based on the replica model called by the pre-trained large language model and the generated logic code, the digital twin model of the scene to be constructed can be constructed. That is, the pre-trained large language model can be used to intelligently construct the required digital twin model according to the description of the actual requirement document. There is no need to establish a digital twin model separately for each requirement document of the scene to be constructed, which is conducive to improving the efficiency and accuracy of establishing the twin model corresponding to the scene to be constructed.

[0070] Please continue to refer to Figure 1 In an exemplary embodiment, the step 102 of inputting the requirement document into the pre-trained large language model includes:

[0071] Generate prompts based on the requirements document to guide the pre-trained large language model to generate preset output results;

[0072] Combine the prompt with the corresponding preset query question to obtain the requirement question for requesting the pre-trained large language model to build the digital twin model;

[0073] Input the required questions into the pre-trained large language model.

[0074] Specifically, step 102 executed in the method for constructing a digital twin model provided in the present application inputs the requirement document into the pre-trained large language model. The specific execution can be selected as follows: generating a prompt based on the requirement document to guide the pre-trained large language model to generate a preset (specific) output result, and combining the prompt with the preset query question. Based on the combination of the prompt and the preset query question, a requirement question for requesting the pre-trained large language model to build the required digital twin model is obtained, and then the requirement question that the large language model can recognize is input into the pre-trained large language model; it can also be understood that a prompt will be generated according to the requirement document, and then a query (preset query question) is added and input into the pre-trained large language model. The pre-trained large language model will generate an API interface (Application Programming Interface) for establishing a 3D model based on the analysis and understanding of the document data. For example, if 3DMax is used for modeling, a 3DMax interface call will be generated. At the same time, the process logic code corresponding to the required digital twin model will also be generated.

[0075] It should be explained that the above-mentioned preset output result refers to the digital twin model that the user who provides the demand document wants to output from the pre-trained large language model. The above-mentioned preset query question refers to the question template that the pre-trained large language model can recognize. For example, if the user's demand is "build a digital twin model about packages in the logistics field", then the corresponding preset query question can be, for example, "build a digital twin model about XX in the XX field"; that is, the preset query question is equivalent to an input template that can be recognized by the large language model.

[0076] It should be added that for the content of generating an API interface for building a 3D model, this application also provides an optional implementation method. In the process of building a digital twin model, the 3D modeling and 3D rendering processes do not require calling the 3D modeling API interface. Instead, you can choose to directly use 2D image data to build a 3D model and corresponding rendering; that is, use 2D multi-dimensional images to combine into a 3D image.

[0077] Figure 2 For a flow chart of a method for constructing a digital twin model in another embodiment, please refer to Figure 2 In an exemplary embodiment, before the step 102 of inputting the requirement document into the pre-trained large language model is performed, steps 201 to 203 are further included, wherein:

[0078] Step 201: obtain text data of the scenario to be constructed based on the requirements document, and obtain model data of the constructed twin model associated with the text data;

[0079] Step 202: Clean the text data and model data to obtain a sample data set;

[0080] In step 203 , the sample data set is input into the large language model and fine-tuning training is performed on the large language model to obtain a pre-trained large language model.

[0081] Specifically, the present application also provides an optional implementation method, which is that before executing step 102 to input the demand document into the large language model, it can also include at least three steps, namely, first executing step 201 to obtain the text data of the scene to be constructed, and the model data of the related twin model that has been constructed based on the text data. Taking the scene to be constructed as a logistics scene as an example, the text data may include data on supply chain management, transportation planning, sorting plans, packages, etc. of logistics work, and the model data may be model data corresponding to the related twin models that have been constructed for objects such as vehicles, packages, sorting machines, and six-sided scanners. Then, step 202 is executed to clean the acquired text data and the corresponding model data, that is, to preprocess the collected data to ensure the quality and availability of the data in the sample data set obtained after cleaning, so as to improve the accuracy of the large language model obtained by subsequent training based on the data; the multiple groups of text data and model data obtained after cleaning can constitute a sample data set, and the sample data set includes at least one group of corresponding matching text data and model data. Then, step 203 is executed, and the sample data set obtained by executing step 202 is input into the untrained large language model for execution, and a preset networking architecture (such as the LoRA architecture) is selected to perform fine-tuning training (such as SFT fine-tuning training) on ​​the large language model to improve the large language model's ability to understand, reason about, and generate code for the text of the sample data set input therein, thereby obtaining a pre-trained large language model. In this case, the preset networking architecture is the networking architecture selected by the user who wants to build a digital twin model. The above-mentioned preset networking architecture, taking the LoRA architecture as an example, is only an optional implementation method provided by this application, and this application is not limited to this. In this case, LoRA is the abbreviation of Long Range Radio, which can be translated into long-range radio in Chinese; SFT is the abbreviation of Supervised Fine-tuning, which can be translated into supervised fine-tuning in Chinese.

[0082] That is, this application trains the large language model by collecting existing requirement documents in the field of the scenario to be constructed and the corresponding generated twin model data, so as to obtain a trained large language model that can be used to output the required digital twin model based on the received requirement documents, thereby realizing the intelligent construction of the digital twin model required for the field of the scenario to be constructed. There is no need to establish a digital twin model separately for each requirement document of the scenario to be constructed, which is conducive to improving the efficiency and accuracy of establishing the corresponding twin model.

[0083] It should be added that the present application provides an optional implementation method, in which the collected requirement documents (text data) for training the large language model and the corresponding generated twin model data are in the form of QA pairs, where Q represents the questions asked by the user, that is, the specific requirement content in the requirement document. For example, it is necessary to establish a digital twin model of a small-piece sorting machine, which includes components such as a six-sided scanner and a grid. The corresponding generated digital twin model must also include a digital twin model of the sorting machine including components such as a six-sided scanner and a grid; A represents the corresponding answer, which not only includes the final generated digital twin model of the sorting machine, but also includes the specific steps for establishing the digital twin and the required code.

[0084] Please refer to Figure 2 In an exemplary embodiment, the above step 202 of cleaning the text data and model data to obtain a sample data set includes steps 221 to 223:

[0085] Step 221: Clean the text data and model data to obtain sample keywords in the text data, as well as sample twin model construction steps and sample twin model logic codes associated with the constructed twin model in the model data; wherein the sample keywords include at least the device name, attribute name, and behavior associated with the constructed twin model, and the sample twin model logic code includes at least the attribute value of the attribute name and the function name corresponding to the behavior;

[0086] Step 222: Generate a sample data pair based on the sample keyword, the sample twin model construction steps matching the sample keyword, and the sample twin model logic code;

[0087] Step 223: Integrate the multiple sample data pairs into a sample data set.

[0088] Specifically, the present application provides step 202 for cleaning text data and model data to obtain a sample data set. The optional specific execution method is to implement it by at least executing steps 221 to 223. Step 221 is executed to clean the text data and model data to obtain sample keywords in the text data. For example, the keyword "sorting machine" is extracted from the content "a sorting machine needs to be established" in the text data, and at the same time, the sample twin model construction steps and sample twin model logic codes associated with the constructed twin model in the model data are obtained. For example, the (sample) twin model construction steps and (sample) corresponding to the constructed sorting machine twin model are obtained. Twin model logic code; then execute step 222, based on the sample keywords obtained by executing step 221, and the sample twin model construction steps and sample twin model logic codes that match the sample keywords, generate sample data pairs, that is, each sample data pair includes at least one corresponding matching set of sample keywords, and the sample twin model construction steps and sample twin model logic codes that match the sample keywords, and then execute step 223 to integrate the obtained multiple sample data pairs into a sample data set, that is, the sample data set includes multiple sets of sample keywords, and the sample twin model construction steps and sample twin model logic codes that match the sample keywords.

[0089] It should be added that the sample data pair obtained by executing step 222 is the QA pair corresponding to the requirement document (text data) used to train the large language model and the corresponding generated twin model data mentioned above, and the sample data set includes multiple collected QA pairs.

[0090] It should also be added that the sample keywords provided in this application include at least the device name, attribute name and behavior associated with the constructed twin model, and the sample twin model logic code includes at least the attribute value associated with the attribute name of the constructed twin model and the function name corresponding to the behavior. The sample twin model logic code also includes the code required to build the digital twin model corresponding to the keyword, and the code has good coding logic. Among them, the extraction, analysis and understanding of keywords in the requirements document is equivalent to knowing which devices, processes, specific functions, and related device parameters are in the user's requirements document based on the user's requirements document for the twin model.

[0091] By providing the big data model with multiple sets of sample keywords and sample twin model construction steps and sample twin model logic codes associated with the keywords, the large language model is trained to enable the large language model to have good data processing, parsing, and understanding capabilities for the requirements document, and to have the ability to call the 3D model required to establish the corresponding digital twin model based on the parsed requirements document, and at the same time have the ability to generate the logic code required to establish the corresponding digital twin model based on the parsed requirements document. By training the large language model with multiple sets of well-detailed sample data, a trained large language model is obtained that can be used to output the required digital twin model based on the received requirements document, thereby realizing the intelligent construction of the required digital twin model. There is no need to establish a digital twin model for each requirement document of the scene to be constructed, which is conducive to improving the efficiency and accuracy of the twin model establishment.

[0092] Please refer to Figure 2 In an exemplary embodiment, the above-mentioned step 202 of cleaning the text data and model data includes steps 224 to 226 (not shown), wherein:

[0093] Step 224: Filter the data table including text data and model data to obtain attribute values ​​associated with the constructed twin model;

[0094] Step 225: Fill in or delete the empty values ​​in the attribute values ​​to obtain an updated data table;

[0095] Step 226: Generate a corresponding text file based on the updated data table; wherein the text file includes at least the device name, attribute name, attribute value, behavior, and function name corresponding to the behavior associated with the constructed twin model;

[0096] Extract the device name, attribute name and behavior associated with the constructed twin model in the text file to obtain sample keywords; extract at least the attribute value of the attribute name and the function name corresponding to the behavior in the text file to obtain the sample twin model logic code.

[0097] Specifically, the present application also provides an optional implementation method, for the cleaning of text data and model data executed in step 202, the specific execution may include at least steps 224-226, execute step 224, filter the data table including text data and model data, and the data table may choose to record text data and model data in the form of QA pairs, so as to obtain attribute values ​​associated with the constructed twin model through screening; then execute step 225, when there are null values ​​in the attribute values ​​in the data table, fill in or delete the null values ​​in the attribute values ​​to update the data table and obtain an updated data table; then execute step 226, based on the updated data table, generate a text file (such as a Json file) corresponding to the content stored in the data table, the text file includes at least the device name, attribute name, attribute value, behavior and function name corresponding to the behavior associated with the constructed twin model, so as to improve the accuracy and generation efficiency of the subsequent logic code for generating the twin model through the large language model.

[0098] It should be noted that the device names, attribute names, and behaviors associated with the constructed twin model recorded in the text file are used to form the above-mentioned sample keywords; the attribute values ​​of the attribute names and the function names corresponding to the behaviors recorded in the text file are used to form the above-mentioned sample twin model logic code.

[0099] That is, cleaning text data and model data is equivalent to filtering the messy and complex table data to filter out the attribute values ​​corresponding to the relevant twin model devices, and then fill in the empty values ​​or remove the attribute values. Finally, the Excel table is generated into a Json file with the content: {According to the device name: {attribute name: attribute value}, {behavior: function name}}, etc.

[0100] Please refer to Figure 2 In an exemplary embodiment, after obtaining the pre-trained large language model in step 203 above and before inputting the requirement document into the pre-trained large language model in step 102, steps 204 to 208 are further included, wherein:

[0101] Step 204: Acquire test data for the scenario to be constructed; wherein the test data includes test text data for the scenario to be constructed;

[0102] Step 205: input the test text data into the pre-trained large language model;

[0103] Step 206: Obtain the twin model output by the pre-trained large language model;

[0104] Step 207: Compare the resulting twin model with the entities corresponding to the test text data to obtain a first comparison result;

[0105] Step 208: Adjust the pre-trained large language model based on the first comparison result to obtain an updated pre-trained large language model.

[0106] Specifically, after training the large language model based on the text data of the scene to be constructed and the model data of the constructed twin model associated with the text data to obtain a pre-trained large language model, step 204 can be further executed to obtain test data about the scene to be constructed, which may at least include test text data about the scene to be constructed; the test data here is the data of the digital twin model to be built based on the requirements recorded in the test text data in the field to be constructed, and a matching model has been established. Then, step 205 is executed to input the test text data in the test data into the pre-trained large language model obtained by executing step 203, so as to obtain the result twin model associated with the content recorded in the test text data based on the pre-trained large language model in step 206; then step 207 is executed to compare the result twin model output by the pre-trained large language model with the entity in the scene to be constructed corresponding to the test text data, so as to obtain the difference between the result twin model and the entity in the corresponding actual scene, and integrate the obtained distinguishing features to obtain the first comparison result; finally, step 208 is executed to optimize and adjust the pre-trained large language model obtained by executing step 203 based on the obtained first comparison result to obtain an updated pre-trained large language model, which is conducive to improving the accuracy and reliability of the digital twin model established based on the pre-trained large language model. Among them, the entity can refer to, for example, physical equipment, physical process, physical plan, etc.

[0107] It should be noted that after executing step 208 to obtain the updated pre-trained large language model, the corresponding step 103 is executed as follows: based on the 3D model called by the (updated) pre-trained large language model and the generated logic code, a digital twin model of the logistics scene is constructed.

[0108] In addition, taking the logistics scenario as an example, the method provided in step 207 of the present application is to compare and analyze the digital twin model (result twin model) generated based on the pre-trained large language model with the operation status of the actual logistics system, and improve and adjust the pre-trained large language model according to the feedback results to improve the accuracy and reliability of the digital twin model established based on the pre-trained large language model; in addition, the present application also provides a method for verifying and optimizing the pre-trained large language model that has been trained. Specifically, the digital twin model (result twin model) generated based on the pre-trained large language model can be selected and compared with the test twin model associated with the test text data in the test data of the scene to be constructed obtained in step 204. According to the feedback results, the pre-trained large language model is improved and adjusted to improve the accuracy and reliability of the digital twin model established based on the pre-trained large language model. Since the constructed test twin model associated with the test text data is an accurate and recognized twin model, it can also be used as a reference object.

[0109] An optional embodiment provided here is to take the logistics scenario to be constructed as an example, establish a conveyor belt digital twin model based on the pre-trained large language model, input real package data, record the shape and size of the package in the twin model, and the time and position of the package on the conveyor belt, and compare them with the real data respectively to obtain the corresponding realism, which is the first comparison result.

[0110] It can be seen that the method for constructing a digital twin model provided by the present application, when applied to logistics scenarios, can be used to solve the problem in the prior art that due to the presence of thousands of devices in the logistics transfer yard, it takes a lot of time and resources to construct a twin model according to conventional technical means; and the fidelity of the twin model established each time requires manual parameter adjustment, and manual measurement and correction are required, which is too time-consuming and labor-intensive. The method for constructing a digital twin model provided by the present application utilizes the language understanding and logical reasoning capabilities of a large language model to realize functions such as calling and constructing 3D models and rendering scenes; utilizes the code generation capabilities of a large language model to realize the writing of logical codes in the twin model; that is, by passing in the requirement document for establishing a twin model, the corresponding twin model can be quickly and intelligently generated to make the establishment of the digital twin model efficient; by inputting precise data, a digital twin model with higher fidelity can be obtained to ensure the accuracy of the establishment of the digital twin model.

[0111] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0112] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a digital twin model for implementing the method for constructing a digital twin model involved above. The device provides a solution to the problem in the prior art that there are too many repetitive operations in the twin model establishment process and the related verification is time-consuming and labor-intensive. The relevant implementation scheme is similar to the implementation scheme described in the above method. Therefore, the specific limitations of the embodiments of the device for constructing one or more digital twin models provided below can be found in the limitations of the method for constructing a digital twin model above, and will not be repeated here.

[0113] Figure 3 This is a structural diagram of a device for constructing a digital twin model in an embodiment. Figure 1 、 Figure 2 Reference Figure 3 In an exemplary embodiment, as Figure 3 As shown, a digital twin model construction device 200 is provided, which includes: a data acquisition module 81, a data processing module 82 and a result output module 83, wherein:

[0114] The data acquisition module 81 is used to obtain the requirement document of the scene to be built of the digital twin model to be built;

[0115] The data processing module 82 is used to input the requirements document into the pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirements document, call and build a replica model of the entity in the scene to be built based on the analysis results, and generate the logic code of the digital twin model to be built;

[0116] The result output module 83 is used to build a digital twin model based on the replica model called by the pre-trained large language model and the generated logic code.

[0117] Specifically, the data acquisition module 81 is used to obtain the requirement document input by the user, which includes the scene to be constructed of the digital twin model to be constructed; taking the scene to be constructed as a logistics scene as an example, the requirement document can be filled in with any content related to the logistics scene according to the user's needs, and this application does not make any specific restrictions on this.

[0118] Among them, taking the logistics scenario as an example, the requirement document includes the specific content of the corresponding digital twin model that the user needs to build, such as supply chain management, transportation planning, sorting plan, packages, vehicles, sorting machines, conveyors and scanners in the logistics scenario and other related data and physical equipment; the data twin model is used to establish corresponding 3D models of physical equipment entities, logistics-related processes and systems in the logistics scenario.

[0119] The data processing module 82 is used to input the requirement document into the pre-trained large language model; the pre-trained large language model here has been trained and can be used to receive the requirement document input by the user, and perform content analysis and combination on the received requirement document to obtain a twin model associated with the content recorded in the requirement document.

[0120] An optional implementation method is provided here. Taking the logistics scenario as an example of the scenario to be constructed, after receiving the demand document input by the user, the pre-trained large language model first analyzes and understands all the contents about the logistics scenario recorded in the demand document, so as to know the contents about the logistics scenario recorded in the demand document, such as supply chain management, transportation planning, sorting plan, package, vehicle, sorting machine, conveyor and scanner, and then based on these data contents in the analysis results, call a replica model that can construct a twin model of the entity corresponding to these data contents, such as a multidimensional model such as a 3D model, and generate logic code based on these data in the analysis results that can construct a twin model corresponding to these data contents. Among them, the entity can refer to physical equipment, physical process, physical plan, etc.; the replica model provided in this application uses a 3D model, which is only an optional implementation method provided by this application, but this application is not limited to this.

[0121] It can be seen that the pre-trained large language model in this application, after receiving the requirement document of the digital twin model to be generated input by the user, first analyzes and understands the requirement document, so as to convert the content of the requirement document into the corresponding 3D model calling interface and the corresponding twin model logic generation code; that is, the pre-trained large language model provided by this application can directly output the 3D model required to be called for the generation of the relevant digital twin model and its corresponding interface to be called, and the logic generation code required for the generation of the relevant digital twin model after receiving any requirement document about the digital twin model to be generated, without the need to re-select the 3D model to be called each time for different requirement content, and re-produce the logic code required to establish the twin model each time.

[0122] The result output module 83 is used to combine the replica model called by the pre-trained large language model and the generated logic code to intelligently construct a digital twin model corresponding to the scenario to be constructed in the requirement document.

[0123] Among them, regarding the content of combining the 3D model called by the pre-trained large language model and the generated logic code, an optional embodiment is provided here for reference. You can choose to use UE (UltraEdit, text editor) to output the digital twin model to be established. There are corresponding model modules and code modules in the UE, which is like a template. When the user wants to generate a digital twin of a car, the 3D model of the car and the function code of car movement, acceleration and deceleration, and passenger carrying will be generated at the same time based on the pre-trained large language model. Fill these two parts into the corresponding UE car creation template respectively, and the 3D model and function code can be combined to output the corresponding digital twin model of the car.

[0124] In an exemplary embodiment, the data processing module 82 is used to input the demand document into the pre-trained large language model, including: the data processing module 82 is used to generate a word prompt for guiding the pre-trained large language model to generate a preset output result based on the demand document; the word prompt is combined with the corresponding preset query question to obtain the demand question for requesting the pre-trained large language model to construct the digital twin model, and the demand question is input into the pre-trained large language model. For details, please refer to Figure 1 , and the above Figure 1 Description.

[0125] In an exemplary embodiment, the data processing module 82 is used to input the requirement document into the pre-trained large language model, and further includes: using the data acquisition module 81 to obtain the text data of the scene to be constructed based on the requirement document, and obtaining the model data of the constructed twin model associated with the text data; cleaning the text data and model data to obtain a sample data set; inputting the sample data set into the large language model and fine-tuning the large language model to obtain a pre-trained large language model. For details, please refer to Figure 2 , and the above Figure 2 Description.

[0126] In an exemplary embodiment, the data processing module 82 is used to clean text data and model data, which can specifically include: the data processing module 82 is used to clean text data and model data to obtain sample keywords in the text data, and sample twin model construction steps and sample twin model logic codes associated with the constructed twin model in the model data; wherein the sample keywords at least include the device name, attribute name and behavior associated with the constructed twin model, and the sample twin model logic code at least includes the attribute value of the attribute name and the function name corresponding to the behavior; based on the sample keywords, and the sample twin model construction steps and sample twin model logic codes that match the sample keywords, generate sample data pairs; integrate multiple sample data pairs into a sample data set. For details, please refer to Figure 2 , and the above Figure 2 Description.

[0127] In an exemplary embodiment, the data processing module 82 is used to clean text data and model data, which may specifically include the following: the data processing module 82 is used to screen the data table including text data and model data to obtain attribute values ​​associated with the constructed twin model; complete or delete null values ​​in the attribute values ​​to obtain an updated data table; generate a corresponding text file based on the updated data table; wherein the text file includes at least the device name, attribute name, attribute value, behavior and function name corresponding to the behavior associated with the constructed twin model; extract the device name, attribute name and behavior associated with the constructed twin model in the text file to obtain sample keywords; extract at least the attribute value of the attribute name and the function name corresponding to the behavior in the text file to obtain the sample twin model logic code. For details, please refer to Figure 2 , and the above Figure 2 Description.

[0128] In an exemplary embodiment, after the data processing module 82 is used to obtain the pre-trained large language model, and before the requirement document is input into the pre-trained large language model, it also includes calling the data acquisition module 81 to obtain the test data of the scene to be constructed; wherein the test data includes the test text data of the scene to be constructed; inputting the test text data into the pre-trained large language model; obtaining the result twin model output by the pre-trained large language model; comparing the result twin model and the entities corresponding to the test text data to obtain a first comparison result; calling the result output module 83 to adjust the pre-trained large language model based on the first comparison result to obtain an updated pre-trained large language model. For details, please refer to Figure 2 , and the above Figure 2 Description.

[0129] Each module in the digital twin model construction device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0130] Figure 4 The internal structure diagram of a computer device in one embodiment is shown in FIG. In an exemplary embodiment, a computer device is provided. The computer device may be a terminal. The internal structure diagram thereof may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means. The wireless means can be achieved via Wi-Fi, mobile cellular networks, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a method for constructing a digital twin model. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0131] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0132] Based on the same inventive concept, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the aforementioned method for constructing a digital twin model. The method for constructing a digital twin model is any one of the methods for constructing a digital twin model mentioned in the embodiments of the present application. For relevant embodiments, please refer to the above.

[0133] Based on the same inventive concept, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the aforementioned method for constructing a digital twin model. The method for constructing a digital twin model is any one of the methods for constructing a digital twin model mentioned in the embodiments of the present application. For relevant embodiments, please refer to the above.

[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0135] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0136] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0137] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for constructing a digital twin model, characterized in that: include: Obtain the requirements document for the scenario to be built for the digital twin model to be built; Inputting the requirement document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirement document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis result, and generate the logic code of the digital twin model to be built; The digital twin model is constructed based on the replica model called by the pre-trained large language model and the generated logic code.

2. The method for constructing a digital twin model according to claim 1, characterized in that: Inputting the requirement document into a pre-trained large language model includes: Generate a prompt for guiding the pre-trained large language model to generate a preset output result according to the requirement document; Combining the word prompt with a corresponding preset query question to obtain a requirement question for requesting the pre-trained large language model to construct the digital twin model; The requirement question is input into the pre-trained large language model.

3. The method for constructing a digital twin model according to claim 1, wherein: Before inputting the requirement document into the pre-trained large language model, the method further includes: Acquire text data of the to-be-built scenario based on the requirement document, and acquire model data of the constructed twin model associated with the text data; Cleaning the text data and the model data to obtain a sample data set; The sample data set is input into a large language model and fine-tuned to the large language model to obtain a pre-trained large language model.

4. The method for constructing a digital twin model according to claim 3, characterized in that: The cleaning of the text data and the model data to obtain a sample data set includes: Cleaning the text data and the model data to obtain sample keywords in the text data, and sample twin model construction steps and sample twin model logic codes associated with the constructed twin model in the model data; wherein the sample keywords include at least the device name, attribute name, and behavior associated with the constructed twin model, and the sample twin model logic code includes at least the attribute value of the attribute name and the function name corresponding to the behavior; Generate a sample data pair based on the sample keyword, the sample twin model construction step and the sample twin model logic code that match the sample keyword; A plurality of the sample data pairs are integrated into a sample data set.

5. The method for constructing a digital twin model according to claim 3 or 4, characterized in that: The cleaning of the text data and the model data includes: Screening a data table including the text data and the model data to obtain attribute values ​​associated with the constructed twin model; Completing or deleting empty values ​​in the attribute values ​​to obtain an updated data table; Generate a corresponding text file based on the updated data table; wherein the text file includes at least the device name, attribute name, attribute value, behavior and function name corresponding to the behavior associated with the constructed twin model; Extract the device name, the attribute name and the behavior associated with the constructed twin model in the text file to obtain the sample keyword; extract at least the attribute value of the attribute name and the function name corresponding to the behavior in the text file to obtain the sample twin model logic code.

6. The method for constructing a digital twin model according to claim 3, wherein: After obtaining the pre-trained large language model and before inputting the requirement document into the pre-trained large language model, the method further includes: Acquire test data for the scenario to be constructed; wherein the test data includes test text data for the scenario to be constructed; Inputting the test text data into the pre-trained large language model; Obtaining a twin model of the result output by the pre-trained large language model; Comparing the result twin model with the entity corresponding to the test text data to obtain a first comparison result; The pre-trained large language model is adjusted based on the first comparison result to obtain an updated pre-trained large language model.

7. A device for constructing a digital twin model, characterized in that: The device comprises: The data acquisition module is used to obtain the requirement document of the scenario to be built for the digital twin model to be built; A data processing module, configured to input the requirements document into a pre-trained large language model; wherein the pre-trained large language model is used to analyze the requirements document, call and construct a replica model of the entity in the to-be-built scenario based on the analysis results, and generate logic code for the to-be-built digital twin model; A result output module is used to build the digital twin model based on the replica model called by the pre-trained large language model and the generated logic code.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Heating ventilation and air conditioning system control code automatic modification method based on large language model

    CN121233090A