A method and system for synchronizing upper and lower computer data based on digital twins

By constructing a full data model and hash data list of the lower computer, establishing mirror storage space for the upper and lower computers, and using network communication protocols to achieve two-way data synchronization, the problem of a single data interaction method in the existing technology is solved, and the data transmission rate and system stability are improved.

CN117312444BActive Publication Date: 2025-09-05WUHAN HUAZHONG NUMERICAL CONTROL +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311173480.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-09-05
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

The existing data interaction method between upper and lower computers has the problems of single interaction mode, data response delay and low conversion rate, which leads to excessive consumption of CPU and network resources, easily triggering data access errors and network congestion, and affecting production activities.

Method used

Using a digital twin-based approach, we build a full data model of the lower computer, create a hash data list and a data processing factory, establish mirror storage space for the upper and lower computers, and achieve two-way network connection through network communication protocols to perform synchronous list matching updates and data synchronization of twin data.

Benefits of technology

It improves data transmission rate, reduces system resource consumption, supports two-way data interaction, improves system stability and data access rights, and has better scalability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312444B_ABST
    Figure CN117312444B_ABST
Patent Text Reader

Abstract

A method for synchronizing upper and lower computer data based on digital twins, comprising: constructing a full data model of the lower computer according to a first preset rule; creating a lower computer hash data list and a data processing factory according to data model characteristics; creating upper and lower computer mirror storage space according to a second preset rule based on the lower computer hash data list; establishing a network connection between the upper and lower computers according to a third preset rule based on a network communication protocol; completing a synchronization list matching and updating of twin data in the hash data list according to data request and / or response results under different synchronization modes; pushing data packaged by the data factory to the upper computer according to the synchronization list content, and completing data synchronization between the upper and lower computers after the upper computer correctly receives and parses the data. In the present invention, the lower computer serves as the data entity, and the upper computer mirrors the lower computer data in a data mirroring manner, which has a higher data twinning degree, a faster transmission rate, and can also reduce system resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of numerical control technology, and in particular to a method and system for synchronizing upper and lower computer data based on digital twins. Background Art

[0002] CNC machine tools, as the foundation of the equipment manufacturing industry, are widely used in various fields. However, with the development of information technology and the improvement of users' data perception of various machine tool subsystems, traditional single digital control systems have obvious shortcomings in assembly deployment, sensor device access, data sharing, human-machine interaction, and intelligence and networking. Therefore, in order to accelerate the digitalization and intelligence of machine tools and equipment, and to meet their multi-scenario, multi-dimensional, and multi-complexity multi-terminal control needs in the future, relying on existing computer graphics and communication technologies, artificial intelligence and big data analysis technologies, new high-end digital control systems in the form of upper and lower computers are being applied, especially in the fully intelligent production lines of new digital factories, high-end CNC machine tools with high-speed and high-precision functions, and ultra-large and complex industrial production equipment.

[0003] Although existing upper and lower computer CNC systems can meet most intelligent and networked requirements, most of the data exchange between the upper and lower computers relies on a one-way, real-time request-response approach. This type of data exchange suffers from problems such as a single interaction method, delayed data response, and low conversion rate. This is especially true when faced with multiple types of sensitive data requests, such as those for axes, tools, registers, and PLCs. This can significantly consume the CPU and network resources of both the upper and lower computers, easily triggering an overload of instantaneous data conversion, resulting in data access errors and, in turn, triggering incorrect machine control instructions. In severe cases, this can lead to network congestion and system downtime, severely impacting users' actual production activities and causing unnecessary economic losses. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a method and system for synchronizing upper and lower computer data based on digital twins, which overcomes the above problems or at least partially solves the above problems.

[0005] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:

[0006] A method for synchronizing upper and lower computer data based on digital twins, comprising:

[0007] S100. Construct the full data model of the lower machine according to the first preset rule;

[0008] S200 obtains the constructed data model characteristics and creates a lower-level hash data list and data processing factory based on the data model characteristics;

[0009] S300 based on the lower machine hash data list, according to the second preset rules to create upper and lower machine mirror storage space;

[0010] S400. According to the network communication protocol, a network connection is established between the upper and lower computers according to the third preset rule;

[0011] S500. According to the data request and / or response results under different synchronization modes, the synchronization list matching update of the twin data is completed in the hash data list;

[0012] S600. Push the data packaged by the data factory to the upper computer according to the synchronization list content. After the upper computer correctly receives and parses the data, the data synchronization between the upper and lower computers is completed.

[0013] Furthermore, in S100, a full data model of the lower computer is constructed according to a first preset rule, where the first preset rule includes:

[0014] S101. Classify the data sources for system access control;

[0015] S102 creates an entity abstract operation object for each type of data item and establishes a mapping relationship between each abstract object and the local memory data source;

[0016] S103. Combine data items of all single abstract objects to complete the construction of the full data model.

[0017] Furthermore, in S200, a lower-level computer hash data list and a data processing factory are created according to the data model characteristics. The specific method includes:

[0018] S201. Load the full data model file, create a hash data list and register all synchronization abstract objects;

[0019] S202. Build a data processing factory based on the data synchronization list in the hash table;

[0020] S203. The data factory completes the query, verification and packaging of local data by consulting the data list.

[0021] Furthermore, in S300, a mirror storage space of the upper and lower machines is created according to a second preset rule, where the second preset rule includes:

[0022] S301 creates a mirror storage space for the lower machine, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list;

[0023] S302. The host computer maps the hash data list of the slave computer, creates a mirror storage space of the host computer, and establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list.

[0024] Furthermore, in S400, a network connection between the upper and lower computers is established according to a third preset rule, where the third preset rule includes:

[0025] S401 creates a lower-level network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation;

[0026] S402 creates a host network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation;

[0027] S403. Start the data packet receiving and sending and parsing services in the upper and lower computer network communication respectively, so as to establish a two-way network communication connection between the upper and lower computers.

[0028] Furthermore, in S500, the synchronization list matching update of the twin data is completed in the hash data list. The specific method includes:

[0029] S501. The lower computer receives the data setting and access request data packet sent by the upper computer or the system itself synchronously pushes the request data packet;

[0030] S502. The lower computer performs a correctness screening check on the data packet and completes the data item classification and parsing operation based on the verification results;

[0031] S503. The lower computer queries the hash data list and completes data matching based on the data analysis results, and creates and / or updates a new synchronization order.

[0032] Furthermore, in S600, data synchronization between the upper and lower computers is completed, and the specific method includes:

[0033] S601. The lower computer reads the synchronization list and performs data packaging operations based on the list contents;

[0034] S602. The lower computer sends the target data packet to the lower computer to complete the data synchronization push and response operation;

[0035] S603. The host computer receives the target data packet and performs data caching, verification and parsing operations on it;

[0036] S604. The upper computer writes the target data into the mirror data area according to the analysis result, and sends a data synchronization completion status packet to the lower computer, completing the data synchronization operation of the target data item between the upper and lower computers.

[0037] The present invention also discloses a data synchronization system between upper and lower computers based on digital twins, comprising:

[0038] Full data model construction module, used to build the full data model of the lower computer;

[0039] The hash data list and data processing factory creation module is used to obtain the constructed data model characteristics and create the lower-level computer hash data list and data processing factory based on the data model characteristics;

[0040] The upper and lower computer mirror storage space creation module is used to create the upper and lower computer mirror storage space according to the lower computer hash data list and the second preset rule;

[0041] The upper and lower computer network connection establishment module is used to establish a network connection between the upper and lower computers according to the network communication protocol and the third preset rule;

[0042] The twin data synchronization list matching and update module is used to complete the synchronization list matching and update of the twin data in the hash data list based on the data request and / or response results under different synchronization modes;

[0043] The upper and lower computer data synchronization module is used to push data packaged by the data factory to the upper computer according to the synchronization list content. After the upper computer correctly receives and parses the data, the data synchronization between the upper and lower computers is completed.

[0044] Furthermore, the upper and lower computer data synchronization module completes data synchronization between the upper and lower computers. The specific method includes:

[0045] S601. The lower computer reads the synchronization list and performs data packaging operations based on the list contents;

[0046] S602. The lower computer sends the target data packet to the lower computer to complete the data synchronization push and response operation;

[0047] S603. The host computer receives the target data packet and performs data caching, verification and parsing operations on it;

[0048] S604. The upper computer writes the target data into the mirror data area according to the analysis result, and sends a data synchronization completion status packet to the lower computer, completing the data synchronization operation of the target data item between the upper and lower computers.

[0049] The present invention also discloses an electronic device, comprising:

[0050] a memory for storing instructions executable by the processor;

[0051] The processor is used to execute instructions to implement a method for synchronizing upper and lower computer data based on digital twins.

[0052] The beneficial effects of the above technical solutions provided by the embodiments of the present invention include at least:

[0053] The present invention discloses a method and system for data synchronization between upper and lower computers based on digital twins, the method comprising: constructing a full data model of the lower computer according to a first preset rule; obtaining the constructed data model features, and creating a lower computer hash data list and a data processing factory according to the data model features; creating upper and lower computer mirror storage space according to a second preset rule based on the lower computer hash data list; establishing a network connection between the upper and lower computers according to a third preset rule based on a network communication protocol; completing a synchronization list matching and updating of the twin data in the hash data list according to data request and / or response results under different synchronization modes; pushing data packaged by the data factory to the upper computer according to the synchronization list content, and completing data synchronization between the upper and lower computers after the upper computer correctly receives and parses the data.

[0054] Compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects:

[0055] 1) The method of the technical solution of the present invention adopts a network communication protocol for synchronous data transmission, which can improve the data transmission rate and greatly reduce the resource consumption of the system such as CPU, network and memory;

[0056] 2) The method of the technical solution of the present invention supports two-way interaction (active and passive) of data between upper and lower levels, making data exchange more convenient and faster, with higher real-time performance and better system stability;

[0057] 3) The method of the technical solution of the present invention supports complete mapping of all valid memory data of the slave computer, synchronizes more diverse data types and has a higher degree of data twinning, gives the master computer more data access rights, and has better scalability;

[0058] 4) The method of the technical solution of the present invention supports custom configuration of synchronization data items. According to the data access requirements of the host computer, the synchronization data item list can be consulted and necessary data items can be configured, thereby achieving flexible and controllable synchronization data types;

[0059] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0061] Figure 1 This is a flow chart of a method for synchronizing upper and lower computer data based on digital twins in Example 1 of the present invention;

[0062] Figure 2This is a functional flow chart of an embodiment of a method for synchronizing upper and lower computer data based on digital twins in Example 1 of the present invention. DETAILED DESCRIPTION

[0063] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0064] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method and system for synchronizing upper and lower computer data based on digital twins.

[0065] Example 1

[0066] This embodiment discloses a method for synchronizing upper and lower computer data based on digital twins. Figure 1 and 2 ,include:

[0067] S100. Construct the lower machine full data model according to the first preset rule; In S100 of this embodiment, construct the lower machine full data model according to the first preset rule, the first preset rule includes:

[0068] S101. Classify the data sources for system access control;

[0069] S102 creates an entity abstract operation object for each type of data item and establishes a mapping relationship between each abstract object and the local memory data source;

[0070] S103. Combine data items of all single abstract objects to complete the construction of the full data model.

[0071] Specifically, in this embodiment, based on the data characteristics of different types of abstract objects in the full data model of the lower computer, the lower computer updates the twin data object information to the hash data list. The data factory will retrieve the hash data list based on the synchronization item data request, and perform time-sharing and classification processing on the confirmed order data, and then temporarily store it in the data cache so that the lower computer can extract the target data packet.

[0072] S200 obtains the constructed data model features, and creates a lower machine hash data list and data processing factory based on the data model features; in S200 of this embodiment, the lower machine hash data list and data processing factory are created based on the data model features, the specific method includes:

[0073] S201. Load the full data model file, create a hash data list and register all synchronization abstract objects;

[0074] S202. Build a data processing factory based on the data synchronization list in the hash table;

[0075] S203. The data factory completes the query, verification and packaging of local data by consulting the data list.

[0076] Specifically, in this embodiment, based on the full data model constructed by the slave computer, shared memory mirroring is used to achieve an absolute twin of the complete memory area of ​​the slave computer, including other valid information such as the basic type attributes of the data, address mapping relationships, etc. For hash data lists containing different data types in the slave computer, the master computer will copy and twin them to ensure consistency of data retrieval and operation between the upper and lower computers.

[0077] S300 based on the lower machine hash data list, according to the second preset rules to create upper and lower machine mirror storage space; in S300 of the present embodiment, according to the second preset rules to create upper and lower machine mirror storage space, the second preset rules include:

[0078] S301 creates a mirror storage space for the lower machine, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list;

[0079] S302. The host computer maps the hash data list of the slave computer, creates a mirror storage space of the host computer, and establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list.

[0080] Specifically, in this embodiment, bidirectional data transfer between the upper and lower computers is achieved based on a network communication protocol. The upper computer sends a request message (active) and / or a synchronization operation data packet, and the lower computer receives the relevant request message and / or data packet and initiates passive data synchronization push, thereby establishing a data synchronization connection between the upper and lower computers and ensuring the consistency of the data storage order of each synchronization item between the upper and lower computers.

[0081] S400 according to the network communication protocol, according to the third preset rule to establish a network connection between the upper and lower computers; in S400 of the present embodiment, according to the third preset rule to establish a network connection between the upper and lower computers, the third preset rule includes:

[0082] S401 creates a lower-level network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation;

[0083] S402 creates a host network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation;

[0084] S403. Start the data packet receiving and sending and parsing services in the upper and lower computer network communication respectively, so as to establish a two-way network communication connection between the upper and lower computers.

[0085] Specifically, in this embodiment, the lower-level machine will parse out the respective associated data types according to the received data request and / or push response content, and create and / or update the relevant synchronization list by querying and retrieving the matching results of the hash data list.

[0086] S500. Based on the data request and / or response results under different synchronization modes, the synchronization list matching update of the twin data is completed in the hash data list; In S500 of this embodiment, the synchronization list matching update of the twin data is completed in the hash data list, and the specific method includes:

[0087] S501. The lower computer receives the data setting and access request data packet sent by the upper computer or the system itself synchronously pushes the request data packet;

[0088] S502. The lower computer performs a correctness screening check on the data packet and completes the data item classification and parsing operation based on the verification results;

[0089] S503. The lower computer queries the hash data list and completes data matching based on the data analysis results, and creates and / or updates a new synchronization order.

[0090] Specifically, in this embodiment, when a synchronization operation begins, the lower computer identifies the target type data items based on the matching synchronization list results, packages the data, and then completes the synchronization push and data response operations. After receiving the target data, the upper computer first caches the data packet queue, then performs data verification and parsing operations. Based on the verification and matching results, the parsed target data items are written to the upper computer's mirror data area, and a data synchronization operation completion status packet is sent to the lower computer, thereby achieving data synchronization between the upper and lower computers.

[0091] S600. Push the data packaged by the data factory to the upper computer according to the synchronization list content. After the upper computer correctly receives and parses the data, the data synchronization between the upper and lower computers is completed. In S600 of this embodiment, the data synchronization between the upper and lower computers is completed. The specific method includes:

[0092] S601. The lower computer reads the synchronization list and performs data packaging operations based on the list contents;

[0093] S602. The lower computer sends the target data packet to the lower computer to complete the data synchronization push and response operation;

[0094] S603. The host computer receives the target data packet and performs data caching, verification and parsing operations on it;

[0095] S604. The upper computer writes the target data into the mirror data area according to the analysis result, and sends a data synchronization completion status packet to the lower computer, completing the data synchronization operation of the target data item between the upper and lower computers.

[0096] Specifically, in this embodiment, when the host computer HMI or machine tool equipment sends a data request or synchronization instruction, the slave computer parses and verifies the target message, consults the hash data list to determine the synchronization data type, and then packages and pushes the data items to be synchronized based on the result. After receiving the synchronization data packet sent by the slave computer, the host computer unpacks the data and finally writes it into the mirror data area, completing the entire data synchronization process.

[0097] This embodiment discloses a method for data synchronization between upper and lower computers based on digital twins, including: constructing a full data model of the lower computer according to a first preset rule; obtaining the constructed data model features, and creating a lower computer hash data list and a data processing factory according to the data model features; creating upper and lower computer mirror storage space according to a second preset rule based on the lower computer hash data list; establishing a network connection between the upper and lower computers according to a third preset rule based on a network communication protocol; completing the synchronization list matching and updating of the twin data in the hash data list according to the data request and / or response results under different synchronization modes; pushing the data packaged by the data factory to the upper computer according to the content of the synchronization list, and completing the data synchronization between the upper and lower computers after the upper computer correctly receives and parses the data.

[0098] The present invention provides a method for synchronizing upper and lower computer data based on digital twins. In the method of the technical solution of the present invention, the lower computer serves as the data entity, and the upper computer mirrors the lower computer data through data mirroring. The two computers interact with each other in two directions through a network communication protocol. The interaction methods are more diverse (active and passive), the data twin degree is higher, and the data transmission rate can be greatly improved, reducing system resource consumption to improve the overall reliability of the CNC system.

[0099] Example 2

[0100] Based on the method for synchronizing upper and lower computer data based on digital twins in Example 1, this embodiment discloses a system for synchronizing upper and lower computer data based on digital twins, including:

[0101] The full data model construction module is used to construct the full data model of the lower computer; in this embodiment, the full data model construction module first classifies the data sources of the system access control, then creates entity abstract operation objects for each type of data item, and establishes a mapping relationship between each abstract object and the local memory data source, and finally combines all abstract objects to complete the construction of the full data model.

[0102] The hash data list and data processing factory creation module is used to obtain the constructed data model characteristics and create a lower-level hash data list and data processing factory based on the data model characteristics. In this embodiment, the hash data list and data processing factory creation module creates the hash data list and data processing factory based on the data model characteristics. The data model file is loaded, and each abstract object in the model file is treated as a data synchronization item and registered in the hash data list. The data processing factory is constructed based on the data synchronization list registered in the hash table to implement query, verification, and packaging operations for the local synchronized data.

[0103] The upper and lower machine mirror storage space creation module is used to create upper and lower machine mirror storage spaces based on the lower machine hash data list and according to a second preset rule. In this embodiment, the upper and lower machine mirror storage space creation module first creates a synchronization data source storage area on the lower machine. Upon successful creation, it establishes a lower machine data synchronization process. The lower machine synchronization process then establishes a mapping relationship between the data mirror operation area and the synchronization data source based on the hash list. Similarly, when the upper machine establishes the synchronization process, it simultaneously creates the upper machine mirror storage space and implements data initialization operations on the mirror space by mapping the lower machine hash list to ensure the consistency of the data storage order of the upper and lower synchronization items.

[0104] The upper and lower computer network connection creation module is used to establish a network connection between the upper and lower computers according to the network communication protocol and the third preset rule; in this embodiment, the upper and lower computers respectively establish network sockets based on the network communication protocol, bind the target IP information and the default network port number, and set their respective data transmission and reception delay modes. After completing the network configuration initialization, the data transmission and reception and parsing tasks are started to establish a two-way communication mechanism between the upper and lower computers.

[0105] The twin data synchronization list matching and update module is used to complete the twin data synchronization list matching and update in the hash data list based on the data request and / or response results under different synchronization methods; when the upper computer needs to access the system real-time data and / or perform data request and setting operations, it will package the corresponding request instructions and / or setting instructions and then send them to the lower computer for processing. When the lower computer receives the request response data and the synchronization push request, it will first retrieve the hash data list, and then perform data screening and data proofreading based on the configuration attributes and monitoring mechanisms of different data items (including periodic synchronization, synchronization upon change, and synchronization upon response), and create and / or update the relevant synchronization list based on the matching results.

[0106] The upper and lower computer data synchronization module is used to push the data packaged by the data factory to the upper computer according to the content of the synchronization list, and complete the data synchronization between the upper and lower computers after the upper computer correctly receives and parses the data. In this embodiment, when a round of synchronization operation starts, the lower computer will read the synchronization list, and then perform data synchronization push and response operations based on the content of the synchronization list. When the upper computer receives the synchronization data packet sent by the lower computer, it will first cache the data, update the data cache queue, and then take the data in the queue for data verification and type matching operations. If the data is valid, it will be updated to the upper computer mirror storage, and the data synchronization completion status packet will be replied to the lower computer; if it is invalid, the data packet will be directly destroyed, waiting for the lower computer to resend the data or perform the next data synchronization process.

[0107] This embodiment also discloses an electronic device, comprising:

[0108] a memory for storing instructions executable by the processor;

[0109] A processor is used to execute instructions to implement a method for synchronizing upper and lower computer data based on digital twins in Example 1.

[0110] It should be understood that the specific order or hierarchy of steps in the disclosed processes is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0111] In the foregoing detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that embodiments of the claimed subject matter require more features than are expressly recited in each claim. On the contrary, as reflected in the appended claims, the invention comprises less than all the features of any individual disclosed embodiment. The appended claims are therefore hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0112] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein may be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described around their functions. Whether such functions are implemented as hardware or software depends on the specific application and the design constraints imposed on the entire system. A skilled person may implement the described functions in an adaptable manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of this disclosure.

[0113] The steps of the methods or algorithms described in conjunction with the embodiments herein may be directly embodied as hardware, software modules executed by a processor, or a combination thereof. The software module may be located in a RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and storage medium may also be present in a user terminal as discrete components.

[0114] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or external to the processor. In the latter case, it is communicatively coupled to the processor via various means, which are well known in the art.

[0115] The foregoing description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purposes of describing the above embodiments, but one of ordinary skill in the art will recognize that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to encompass all such changes, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent the term "comprising" is used in the specification or claims, the term is intended to be encompassed in a manner similar to the term "including," as explained in terms of "including," used as a transitional word in the claims. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or."

Claims

1. A method for synchronizing upper and lower computer data based on digital twins, characterized in that: include: S100. Construct the full data model of the lower machine according to the first preset rule; S200 obtains the constructed data model characteristics and creates a lower-level hash data list and data processing factory based on the data model characteristics; S300 based on the lower machine hash data list, according to the second preset rules to create upper and lower machine mirror storage space; S300, according to the second preset rules to create upper and lower machine mirror storage space, the second preset rules include: S301 creates a mirror storage space for the lower machine, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list; S302. The host computer maps the lower computer hash data list, creates a host computer mirror storage space, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization item in the hash list; S400. According to the network communication protocol, a two-way network communication connection is established between the upper and lower computers according to the third preset rule; S500. According to the data request and / or response results under different synchronization modes, the synchronization list matching update of the twin data is completed in the hash data list; S600. Push the data packaged by the data processing factory to the upper computer according to the synchronization list content. After the upper computer correctly receives and parses the data, the data synchronization between the upper and lower computers is completed.

2. A method for synchronizing upper and lower computer data based on digital twins according to claim 1, characterized in that: In S100, a full data model of the lower computer is constructed according to a first preset rule. The first preset rule includes: S101. Classify the data sources for system access control; S102 creates an entity abstract operation object for each type of data item and establishes a mapping relationship between each abstract object and the local memory data source; S103. Combine data items of all single abstract objects to complete the construction of the full data model.

3. The method for synchronizing upper and lower computer data based on digital twins according to claim 1, characterized in that: In S200, a lower-level computer hash data list and a data processing factory are created based on the data model characteristics. The specific method includes: S201. Load the full data model file, create a hash data list and register all synchronization abstract objects; S202. Build a data processing factory based on the data synchronization list in the hash table; S203. The data processing factory completes the query, verification and packaging of local data by consulting the data list.

4. The method for synchronizing upper and lower computer data based on digital twins according to claim 1, characterized in that: In S400, a network connection is established between the upper and lower computers according to a third preset rule. The third preset rule includes: S401 creates a lower-level network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation; S402 creates a host network socket based on the network communication protocol, binds the target IP information and completes the network configuration initialization operation; S403. Start the data packet receiving and sending and parsing services in the upper and lower computer network communication respectively, so as to establish a two-way network communication connection between the upper and lower computers.

5. The method for synchronizing upper and lower computer data based on digital twins according to claim 1, characterized in that: In S500, the synchronization list matching and updating of the twin data is completed in the hash data list. The specific method includes: S501. The lower computer receives the data setting and access request data packet sent by the upper computer or the system itself synchronously pushes the request data packet; S502. The lower computer performs a correctness screening check on the data packet and completes the data item classification and parsing operation based on the verification results; S503. The lower computer queries the hash data list and completes data matching based on the data analysis results, and creates and / or updates a new synchronization order.

6. The method for synchronizing upper and lower computer data based on digital twins according to claim 1, characterized in that: In S600, data synchronization between the upper and lower computers is completed. The specific methods include: S601. The lower computer reads the synchronization list and performs data packaging operations based on the list contents; S602. The lower computer sends the target data packet to the upper computer to complete the data synchronization push and response operation; S603. The host computer receives the target data packet and performs data caching, verification and parsing operations on it; S604. The upper computer writes the target data into the mirror data area according to the analysis result, and sends a data synchronization completion status packet to the lower computer, completing the data synchronization operation of the target data item between the upper and lower computers.

7. A data synchronization system between upper and lower computers based on digital twins, characterized in that: include: Full data model construction module, used to build the full data model of the lower computer; The hash data list and data processing factory creation module is used to obtain the constructed data model characteristics and create the lower-level computer hash data list and data processing factory based on the data model characteristics; The upper and lower computer mirror storage space creation module is used to create the upper and lower computer mirror storage space according to the lower computer hash data list and the second preset rule; Create a mirror storage space for the upper and lower computers according to the second preset rule. The second preset rule includes: S301 creates a mirror storage space for the lower machine, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization items in the hash list; S302. The host computer maps the lower computer hash data list, creates a host computer mirror storage space, establishes an absolute mapping relationship between the data synchronization operation area and the synchronization item in the hash list; The upper and lower computer network connection establishment module is used to establish a two-way network communication connection between the upper and lower computers according to the network communication protocol and the third preset rule; The twin data synchronization list matching and update module is used to complete the synchronization list matching and update of the twin data in the hash data list based on the data request and / or response results under different synchronization modes; The upper and lower computer data synchronization module is used to push the data packaged by the data processing factory to the upper computer according to the synchronization list content. After the upper computer correctly receives and parses the data, the data synchronization between the upper and lower computers is completed.

8. The data synchronization system between upper and lower computers based on digital twins according to claim 7, characterized in that: The upper and lower computer data synchronization module completes data synchronization between the upper and lower computers. The specific methods include: S601. The lower computer reads the synchronization list and performs data packaging operations based on the list contents; S602. The lower computer sends the target data packet to the upper computer to complete the data synchronization push and response operation; S603. The host computer receives the target data packet and performs data caching, verification and parsing operations on it; S604. The upper computer writes the target data into the mirror data area according to the analysis result, and sends a data synchronization completion status packet to the lower computer, completing the data synchronization operation of the target data item between the upper and lower computers.

9. An electronic device, characterized in that: include: a memory for storing instructions executable by the processor; A processor, configured to execute instructions to implement a method for synchronizing upper and lower computer data based on digital twins as recited in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Digital twin information synchronization method and system, readable storage medium and equipment

    CN112711631A

  • Digital twinning method based on intelligent rod, line and model workshops

    CN115099075A