A WiFi-based Web3D virtual single-chip digital twin system

By establishing 3D virtual scenes and real hardware scenes in WiFi networking scenarios, and using MQTT servers and communication gateways, the accurate IP address mapping and data synchronization between virtual and real microcontroller systems is achieved, which solves the problems of low development efficiency and high cost in the existing technology, and achieves efficient system development and cost savings.

CN114371916BActive Publication Date: 2025-05-23CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210160597.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-22
Publication Date
2025-05-23
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

It is difficult for the existing technology to accurately map virtual and real microcontroller systems in WiFi networking scenarios, resulting in low system development efficiency and high development costs.

Method used

By establishing 3D virtual scenes and real hardware scenes under the WiFi communication protocol, and using MQTT servers and communication gateways, precise IP address mapping and data synchronization between the virtual microcontroller system and the real microcontroller system is achieved.

Benefits of technology

It realizes the accurate mapping of virtual and real microcontroller systems in WiFi networking scenarios, improves system development efficiency, and significantly saves development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114371916B_ABST
    Figure CN114371916B_ABST
Patent Text Reader

Abstract

The Web3D virtual single-chip digital twin system based on WiFi disclosed in the present application includes: a 3D virtual scene; a virtual single-chip system set in the 3D virtual scene; a virtual WiFi module is provided in the virtual single-chip system; a virtual host computer connected to the virtual single-chip system for configuring a first IP address for the virtual single-chip system; a real hardware scene; a real single-chip system set in the real hardware scene; a real host computer connected to the real single-chip system for configuring a second IP address consistent with the first IP address for the real single-chip system; an MQTT server connecting the virtual single-chip system and the real single-chip system; and a communication gateway for verifying that the virtual single-chip system and the real single-chip system have consistent connection addresses. In the scenario of using WiFi networking, the present application can accurately map the virtual and real single-chip systems based on the control code, which greatly saves the development cost while improving the system development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of virtual single-chip microcomputer systems, and more specifically, to a WiFi-based Web3D virtual single-chip microcomputer digital twin system. Background Art

[0002] Digital twins make full use of data such as physical models, sensor updates, and operation history, integrate multi-disciplinary, multi-physical quantity, multi-scale, and multi-probability simulation processes, and complete mapping in virtual space, thereby reflecting the entire life cycle of the corresponding physical equipment. Digital twins are a concept that transcends reality and can be regarded as a digital mapping system of one or more important, interdependent equipment systems. Digital twins are a universally applicable theoretical and technical system, and are now widely used in product design, product manufacturing, medical analysis, engineering construction, and other fields.

[0003] At present, using WiFi communication to connect to the Internet is a widespread application; and for single-chip microcomputer systems, there are many application scenarios for using WiFi to communicate and remotely control single-chip microcomputer systems, so the development of single-chip microcomputer systems based on WiFi communication technology has become a hot research topic. In the development of single-chip microcomputer systems, since direct development using real single-chip microcomputer hardware will result in excessive costs, virtual single-chip microcomputer system development technology has emerged in the prior art. In the invention patent with application number 2022100240762 and the theme of "Web3D virtual single-chip microcomputer digital twin system based on ZigBee", it is proposed to use ZigBee communication technology to map virtual and real single-chip microcomputers to each other to improve the efficiency of system development; however, ZigBee communication technology is a short-range, low-energy technology. Compared with WiFi communication, there are significant differences in the way the two are connected to devices. When using WiFi communication to develop a single virtual single-chip microcomputer system mapping multiple real single-chip microcomputer systems or multiple virtual single-chip microcomputer systems mapping multiple real single-chip microcomputer systems, the above-mentioned development technology is used. If the technical solution of the patent is not disclosed, it may cause confusion in the mapping of virtual and real single-chip microcomputer systems, and the virtual and real systems cannot be precisely paired with each other, resulting in confusion in the development of system functions; although in the application number 202111252171.X, the theme is "A Collaborative Operation System of Web3D Multi-Virtual Single-chip Microcomputer Systems", the technology of using digital encoding and decoding is disclosed, combined with a computing encoder and an analytical decoder, so that the mutually mapped virtual and real single-chip microcomputer systems can achieve precise pairing. However, in the development of real single-chip microcomputer systems using WiFi communication, it is usually necessary to configure a gateway for communication channel regulation, and the use of encoding and decoding technology will undoubtedly bring a lot of additional development costs to the development, so this technology is not completely suitable for the development of single-chip microcomputer systems in this scenario, and it is difficult to support the verification of single-chip microcomputer functions. It can be said that the use of digital twin technology to perform virtual-to-real mapping operations on single-chip microcomputer systems that communicate based on WiFi is still blank.

[0004] Therefore, how to provide a WiFi-based Web3D virtual MCU digital twin system, which can accurately map the virtual and real MCU systems based on control codes when using WiFi networking, thereby improving system development efficiency and greatly saving development costs, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a WiFi-based Web3D virtual single-chip microcomputer digital twin system, which can accurately map the virtual and real single-chip microcomputer systems based on control codes when using WiFi networking, thereby improving system development efficiency and greatly saving development costs.

[0006] The technical solutions provided by this application are as follows:

[0007] This application provides a WiFi-based Web3D virtual single-chip digital twin system, including:

[0008] 3D virtual scene based on WiFi communication protocol;

[0009] A virtual single-chip computer system is provided in the 3D virtual scene; a virtual WiFi module is provided in the virtual single-chip computer system; the virtual single-chip computer system is used to perform single-chip computer virtual simulation in the Web3D webpage front end;

[0010] A virtual host computer provided in the 3D virtual scene and connected to the virtual single-chip computer system; the virtual host computer is used to configure a first IP address for the virtual single-chip computer system;

[0011] A real hardware scenario under a WiFi communication protocol; a real single-chip microcomputer system in the real hardware scenario; the real single-chip microcomputer system is used to perform system development by configuring physical hardware;

[0012] A real host computer connected to the real single-chip computer system; the real single-chip computer is used to configure a second IP address consistent with the first IP address for the real single-chip computer system;

[0013] An MQTT server is provided between the 3D virtual scene and the real hardware scene, and connects the virtual single-chip microcomputer system and the real single-chip microcomputer system; the MQTT server is used to link the 3D virtual scene and the real hardware scene to transmit, store and synchronize data;

[0014] And a communication gateway is provided between the MQTT server and the real single-chip microcomputer system for verifying that the virtual single-chip microcomputer system and the real single-chip microcomputer system have the same connection address.

[0015] Furthermore, in a preferred embodiment of the present invention, the virtual host computer includes:

[0016] An IP receiving module, the receiving module is used to obtain a default IP address of the communication gateway;

[0017] An IP configuration module, the IP configuration module is connected to the virtual single-chip computer system and is used to preset a different first IP address for each virtual single-chip computer system;

[0018] A first IP comparison module connected to the IP receiving module and the IP configuration module; the first IP comparison module is used to compare the preset first IP address with the default IP address, and eliminate and reset the overlapping first IP address.

[0019] Furthermore, in a preferred embodiment of the present invention, the WiFi-based Web3D virtual single-chip microcomputer digital twin system also includes: a control terminal arranged between the MQTT server and the virtual single-chip microcomputer system.

[0020] Further, in a preferred embodiment of the present invention, the control terminal includes: a first IP acquisition module; the first IP acquisition module is connected to the IP receiving module and the MQTT server to obtain the default IP address from the MQTT server;

[0021] A data synchronization module, which is used to synchronize the operation status information and IP address information of the virtual single-chip computer system and the real single-chip computer system;

[0022] And an instruction configuration module connected to the IP acquisition module and the data synchronization module; the instruction configuration module is used to set system pairing instructions and data synchronization instructions; the system pairing instructions carry the first IP address information.

[0023] Further, in a preferred embodiment of the present invention, the communication gateway is used to connect the real single-chip microcomputer system and the MQTT server; the communication gateway includes: an instruction parsing module, the instruction parsing module is connected to the MQTT server to receive the system pairing instruction;

[0024] A second IP acquisition module connected to the real single-chip computer system for acquiring a second IP address;

[0025] An IP segment verification module connected to the instruction parsing module and the second IP acquisition module;

[0026] And an IP number verification module connected to the IP segment verification module.

[0027] Furthermore, in a preferred embodiment of the present invention, the virtual host computer further comprises: a conflict message receiving module, the conflict message receiving module is used to obtain an IP address conflict message sent by the system;

[0028] A third IP acquisition module, the third IP acquisition module is used to collect ARP table entries of network devices in the 3D virtual scene; the ARP table entries include the first IP address;

[0029] A second IP comparison module connected to the third IP acquisition module is used to detect overlaps with the first IP addresses; the second IP comparison module compares the first IP addresses in pairs, removes and resets the overlapping first IP addresses.

[0030] Furthermore, in a preferred embodiment of the present invention, the WiFi-based Web3D virtual single-chip digital twin system further includes:

[0031] A code editing box provided in the 3D virtual scene and connected to the virtual single-chip microcomputer system; the code editing box is used to write control codes for the virtual single-chip microcomputer according to requirements;

[0032] A virtual burner is provided between the virtual single-chip computer and the code editing box, and is used to burn each of the control codes into the virtual burner corresponding to the virtual single-chip computer;

[0033] A code development platform provided in the real hardware scenario for writing the control code;

[0034] A real programmer is arranged between the code development platform and the real single-chip microcomputer system; the real programmer is used to program the control code into the real single-chip microcomputer system.

[0035] Further, in a preferred embodiment of the present invention, in the 3D virtual scene, the rule for configuring the first IP address for the virtual single-chip computer includes: a single virtual single-chip computer system presets multiple first IP addresses, correspondingly mapping multiple real single-chip computer systems;

[0036] A single first IP address is preset in each of the virtual single-chip microcomputer systems, and each of the virtual single-chip microcomputer systems is mapped one-to-one to a single real single-chip microcomputer system.

[0037] Furthermore, in a preferred embodiment of the present invention, the virtual single-chip computer system comprises:

[0038] A virtual single-chip microcomputer development board; a virtual external power supply connected to the virtual single-chip microcomputer development board;

[0039] A virtual voltage converter provided between the virtual single-chip microcomputer development board and the virtual power supply;

[0040] The virtual external power supply is connected to the power interface of the virtual single-chip microcomputer development board through the virtual voltage converter to provide analog power input for the virtual single-chip microcomputer development board;

[0041] A code converter connected to the virtual burner;

[0042] The code converter is used to convert the control code into JavaScript code after running the burning and synchronize it to the CPU of the virtual single-chip microcomputer development board;

[0043] And a virtual external electronic component library connected to the virtual single-chip development board; the virtual external electronic component library is used to provide external virtual electronic components for the system.

[0044] Furthermore, in a preferred embodiment of the present invention, the virtual single-chip computer system further includes:

[0045] Virtual electronic components connected to the virtual single-chip microcomputer development board; the virtual electronic components include: a first timing state detector connected to the virtual single-chip microcomputer development board; the first timing state detector is used to detect the simulated power supply status of the virtual power supply; a second timing state detector is arranged on the CPU port of the virtual single-chip microcomputer development board; the second timing state detector is used to detect the CPU port status and continuously schedule the operation of each virtual electronic component; and a virtual power switch connected to the virtual single-chip microcomputer development board; the virtual power switch is connected to the virtual voltage converter to connect the power input for the virtual single-chip microcomputer system.

[0046] The present invention provides a WiFi-based Web3D virtual single-chip microcomputer digital twin system, which, compared with the prior art, comprises: a 3D virtual scene set under a WiFi communication protocol; a virtual single-chip microcomputer system set in the 3D virtual scene; a virtual WiFi module provided in the virtual single-chip microcomputer system; the virtual single-chip microcomputer system is used to perform single-chip microcomputer virtual simulation on the Web3D webpage front end; a virtual host computer connected to the virtual single-chip microcomputer system in the 3D virtual scene; the virtual host computer is used to configure a first IP address for the virtual single-chip microcomputer system; a real hardware scene set under a WiFi communication protocol; a real single-chip microcomputer system set in the real hardware scene; the real The single-chip microcomputer system is used for system development by configuring physical hardware; a real host computer connected to the real single-chip microcomputer system; the real single-chip microcomputer is used to configure a second IP address consistent with the first IP address for the real single-chip microcomputer system; an MQTT server is provided between the 3D virtual scene and the real hardware scene to connect the virtual single-chip microcomputer system and the real single-chip microcomputer system; the MQTT server is used to link the 3D virtual scene and the real hardware scene to transmit, store and synchronize data; and a communication gateway is provided between the MQTT server and the real single-chip microcomputer system to verify the virtual single-chip microcomputer system and the real single-chip microcomputer system with consistent connection addresses. In the WiFi-based Web3D virtual single-chip digital twin system provided by the present invention, the virtual single-chip system is based on Web front-end technology, and virtual electronic hardware is rendered through 3D modeling, and then different virtual electronic components are combined to restore multiple virtual single-chip systems. The virtual single-chip system configures the first IP address according to the virtual host computer; and the real single-chip system is built by physical electronic hardware. In the WiFi networking environment, each real single-chip system is relatively independently set, and the real host computer is used to configure the real single-chip system with a second IP address consistent with the first IP address, so that it can achieve mutual corresponding mapping; and the important thing is to lay out the communication gateway, which can verify the consistency of the first IP address and the second IP address, so as to correspond to the virtual single-chip system and the real single-chip system with the same connection address, and realize the accurate mapping of the virtual and real systems; and the MQTT server is provided between the virtual single-chip system and the real single-chip system, and the information data such as the synchronous operation status and address are synchronized, and the operation effect of the real single-chip system is consistent with the operation effect of the virtual single-chip system through the MQTT protocol. It is helpful to enhance the remote control experience in the WiFi scenario. Compared with the prior art, the technical solution involved in the present invention can accurately map the virtual and real single-chip computer systems based on control codes in a scenario of using WiFi networking, thereby improving the system development efficiency and greatly saving the development cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0048] Figure 1 This is an architecture diagram of a WiFi-based Web3D virtual single-chip digital twin system involved in an embodiment of the present invention;

[0049] Figure 2 It is a structural schematic block diagram of a WiFi-based Web3D virtual single-chip microcomputer digital twin system involved in an embodiment of the present invention;

[0050] Figure 3 A schematic block diagram of the structure of a virtual host computer involved in an embodiment of the present invention;

[0051] Figure 4 is a schematic block diagram of the structure of a control terminal involved in an embodiment of the present invention;

[0052] Figure 5 The present invention is a block diagram showing the structure of a communication gateway according to an embodiment of the present invention.

[0053] Description of reference numerals:

[0054] 3D virtual scene 1; virtual single-chip computer system 2; virtual host computer 3; IP receiving module 301; IP configuration module 302; first IP comparison module 303; second IP comparison module 304; conflict message receiving module 305; third IP acquisition module 306; real hardware scene 4; real single-chip computer system 5; real host computer 6; MQTT server 7; communication gateway 8; instruction parsing module 801; second IP acquisition module 802; IP segment verification module 803; IP number verification module 804; code editing box 9; virtual burner 10; code development platform 11; real burner 12; control terminal 13; first IP acquisition module 1301; data synchronization module 1302; instruction configuration module 1303. DETAILED DESCRIPTION

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

[0056] It should be noted that when an element is referred to as being "fixed on" or "set on" another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0057] It should be understood that the terms "length", "width", "up", "down", "front", "back", "first", "second", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0059] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.

[0060] Please Figures 1 to 5As shown, the WiFi-based Web3D virtual single-chip digital twin system provided by an embodiment of the present invention includes: a 3D virtual scene 1 set under a WiFi communication protocol; a virtual single-chip system 2 set in the 3D virtual scene 1; a virtual WiFi module is provided in the virtual single-chip system 2; the virtual single-chip system 2 is used to perform single-chip virtual simulation on the Web3D web page front end; a virtual host computer 3 connected to the virtual single-chip system 2 and set in the 3D virtual scene 1; the virtual host computer 3 is used to configure a first IP address for the virtual single-chip system 2; a real hardware scene 4 set under a WiFi communication protocol; a real single-chip system 5 set in the real hardware scene 4; the real single-chip System 5 is used for system development by configuring physical hardware; a real host computer 6 connected to the real single-chip microcomputer system 5; the real single-chip microcomputer is used to configure a second IP address consistent with the first IP address for the real single-chip microcomputer system 5; an MQTT server 7 is provided between the 3D virtual scene 1 and the real hardware scene 4, connecting the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5; the MQTT server 7 is used to link the 3D virtual scene 1 and the real hardware scene 4 to transmit, store and synchronize data; and a communication gateway 8 is provided between the MQTT server 7 and the real single-chip microcomputer system 5 to verify that the connection addresses of the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5 are consistent.

[0061] The WiFi-based Web3D virtual single-chip digital twin system provided in an embodiment of the present invention specifically includes: a 3D virtual scene 1 set under a WiFi communication protocol; a virtual single-chip system 2 set in the 3D virtual scene 1; a virtual WiFi module is provided in the virtual single-chip system 2; the virtual single-chip system 2 is used to perform single-chip virtual simulation on the Web3D web page front end; a virtual host computer 3 connected to the virtual single-chip system 2 and set in the 3D virtual scene 1; the virtual host computer 3 is used to configure a first IP address for the virtual single-chip system 2; a real hardware scene 4 set under a WiFi communication protocol; a real single-chip system 5 set in the real hardware scene 4; the real single-chip System 5 is used for system development by configuring physical hardware; a real host computer 6 connected to the real single-chip microcomputer system 5; the real single-chip microcomputer is used to configure a second IP address consistent with the first IP address for the real single-chip microcomputer system 5; an MQTT server 7 is provided between the 3D virtual scene 1 and the real hardware scene 4, connecting the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5; the MQTT server 7 is used to link the 3D virtual scene 1 and the real hardware scene 4 to transmit, store and synchronize data; and a communication gateway 8 is provided between the MQTT server 7 and the real single-chip microcomputer system 5 to verify that the connection addresses of the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5 are consistent. In the WiFi-based Web3D virtual single-chip microcomputer digital twin system provided by the present invention, the virtual single-chip microcomputer system 2 is based on Web front-end technology, and virtual electronic hardware is rendered through 3D modeling, and then different virtual electronic components are combined to restore multiple virtual single-chip microcomputer systems 2. The virtual single-chip microcomputer system 2 is configured with the first IP address according to the virtual host computer 3; and the real single-chip microcomputer system 5 is built through physical electronic hardware. In the WiFi networking environment, each of the real single-chip microcomputer systems 5 is relatively independently set, and the real host computer 6 is used to configure the real single-chip microcomputer system 5. The second IP address consistent with the first IP address enables mutual corresponding mapping; and the important thing is to arrange the communication gateway 8, which can verify the consistency of the first IP address and the second IP address, so as to correspond the virtual single-chip computer system 2 and the real single-chip computer system 5 with the same connection address, and realize the accurate mapping of virtual and real systems; and the MQTT server 7 is provided between the virtual single-chip computer system 2 and the real single-chip computer system 5, to synchronize the operation status and address and other information data, and make the operation effect of the real single-chip computer system 5 consistent with the operation effect of the virtual single-chip computer system 2 through the MQTT protocol. It helps to enhance the remote control experience in the WiFi scenario.Compared with the prior art, the technical solution involved in the present invention can accurately map the virtual and real single-chip computer systems 5 based on control codes in the scenario of using WiFi networking, thereby improving the system development efficiency and greatly saving the development cost.

[0062] Specifically, in an embodiment of the present invention, the virtual host computer 3 includes:

[0063] An IP receiving module 301, the receiving module is used to obtain the default IP address of the communication gateway 8;

[0064] An IP configuration module 302, wherein the IP configuration module 302 is connected to the virtual single-chip microcomputer system 2, and is used to preset a different first IP address for each virtual single-chip microcomputer system 2; a first IP comparison module 303 connected to the IP receiving module 301 and the IP configuration module 302; the first IP comparison module 303 is used to compare the preset first IP address with the default IP address, and eliminate and reset the overlapping first IP address.

[0065] Among them, the purpose of the IP receiving module 301 obtaining the default IP address from the MQTT server 7 is to: avoid the overlap of the preset first IP address and the default IP address of the communication gateway 8; causing IP address conflict; the IP configuration module 302 configures the first IP address for the virtual single-chip computer system 2, and combines with the first IP comparison module 303 to eliminate and reset the overlapping first IP address.

[0066] Specifically, in an embodiment of the present invention, the WiFi-based Web3D virtual single-chip microcomputer digital twin system also includes: a control terminal 13 arranged between the MQTT server 7 and the virtual single-chip microcomputer system 2.

[0067] Specifically, in an embodiment of the present invention, the control terminal 13 includes: a first IP acquisition module 1301; the first IP acquisition module 1301 is connected to the IP receiving module 301 and the MQTT server 7 to obtain the default IP address from the MQTT server 7; a data synchronization module 1302, the data synchronization module 1302 is used to synchronize the operating status information and IP address information of the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5; and an instruction configuration module 1303 connected to the IP acquisition module and the data synchronization module 1302; the instruction configuration module 1303 is used to set system pairing instructions and data synchronization instructions; the system pairing instructions carry the first IP address information.

[0068] Specifically, in an embodiment of the present invention, the communication gateway 8 is used to connect the real single-chip microcomputer system 5 and the MQTT server 7; the communication gateway 8 includes: an instruction parsing module 801, the instruction parsing module 801 is connected to the MQTT server 7, and is used to receive the system pairing instruction; a second IP acquisition module 802 connected to the real single-chip microcomputer system 5, and is used to obtain a second IP address; an IP segment verification module 803 connected to the instruction parsing module 801 and the second IP acquisition module 802; and an IP number verification module 804 connected to the IP segment verification module 803.

[0069] Among them, Figure 1 As shown, the real hardware scene 4 under the WiFi communication mode corresponds to the 3D virtual scene 1; the real single-chip microcomputer system 5 with the WiFi module and the virtual single-chip microcomputer system 2 with the WiFi module are in a one-to-one mapping relationship, and state synchronization is achieved through the MQTT Internet of Things instant communication protocol.

[0070] Specifically, in an embodiment of the present invention, under the WiFi communication mode, the real single-chip computer system 5 with a WiFi module in the real hardware scene 4 interacts with the communication gateway 8; the communication gateway 8 can select a real WiFi hotspot to upload information data to the MQTT server 7, and the virtual single-chip computer system 2 with a WiFi module in the Web-based 3D virtual scene 1 obtains the corresponding information data in the real single-chip computer system 5 with a WiFi module from the MQTT server 7 through the book search control terminal 13; and the virtual single-chip computer system 2 with a WiFi module in the 3D virtual scene 1 at the front end of the Web page sends data to the MQTT server 7, and the real WiFi hotspot module takes out data from the MQTT server 7, distributes instructions through IP verification, and broadcasts between the real single-chip computer systems 5 connected to the WiFi network, thereby mapping the state of the virtual single-chip computer system 2 to the real single-chip computer system 5 corresponding to the IP address.

[0071] Specifically, in an embodiment of the present invention, the virtual host computer 3 also includes: a conflict message receiving module 305, the conflict message receiving module 305 is used to obtain IP address conflict messages sent by the system; a third IP acquisition module 306, the third IP acquisition module 306 is used to collect ARP table entries of network devices in the 3D virtual scene 1; the ARP table entries include the first IP address; a second IP comparison module 304 connected to the third IP acquisition module 306, for performing overlap detection on the first IP address; the second IP comparison module 304 compares the first IP addresses with each other, eliminates and resets one of the overlapping first IP addresses.

[0072] Among them, in the embodiment of the present invention, there are two situations in which IP address conflicts may occur: first, the first IP address preset for the virtual single-chip microcomputer system 2 overlaps with the default IP address of the communication gateway 8, causing an IP conflict. Based on this, in the technical solution of the present application, the overlapping first IP address is eliminated and reset through the IP receiving module 301 and the first IP comparison module 303 to avoid the risk of the first IP conflict; second, there is an overlap between the first IP addresses preset for the virtual single-chip microcomputer system 2, resulting in an IP conflict. For this conflict, the ARP table entry is first obtained through the third IP acquisition module 306, and the first IP address information is extracted therefrom, and the risk of the second IP conflict is avoided in combination with the second IP comparison module 304.

[0073] Specifically, in an embodiment of the present invention, the WiFi-based Web3D virtual single-chip microcomputer digital twin system also includes: a code editing box 9 provided in the 3D virtual scene 1 and connected to the virtual single-chip microcomputer system 2; the code editing box 9 is used to write control codes for the virtual single-chip microcomputer according to needs; a virtual burner 10 provided between the virtual single-chip microcomputer and the code editing box 9, used to burn each of the control codes into the corresponding virtual single-chip microcomputer; a code development platform 11 provided in the real hardware scene 4, used to write the control code; a real burner 12 provided between the code development platform 11 and the real single-chip microcomputer system 5; the real burner 12 is used to burn the control code into the real single-chip microcomputer system 5.

[0074] Specifically, in an embodiment of the present invention, in the 3D virtual scene 1, the rules for configuring the first IP address for the virtual single-chip microcomputer include: a single virtual single-chip microcomputer system 2 presets multiple first IP addresses, correspondingly mapping multiple real single-chip microcomputer systems 5; a single first IP address is preset in each virtual single-chip microcomputer system 2, and each virtual single-chip microcomputer system 2 is mapped one-to-one to a single real single-chip microcomputer system 5.

[0075] Among them, Figure 2 As shown, for the digital twin system: in the real hardware scene 4, the real single-chip microcomputer system 5 based on the WiFi communication method needs to be equipped with a WiFi communication module, and the code of the real single-chip microcomputer system 5 is written on the code development platform 11. After compilation and running, the code is burned into the real single-chip microcomputer system 5 through the real burner 12, and the second IP address is set through the real upper level, and then connected to the WiFi network in combination with the communication gateway 8.

[0076] Specifically, in an embodiment of the present invention, data is uploaded to the MQTT server 7 in real time via the MQTT protocol.

[0077] Among them, in the 3D virtual scene 1, the virtual single-chip computer system 2 and the real single-chip computer system 5 are mapped one by one according to the IP address. The virtual single-chip computer system 2 has the virtual WiFi module. Unlike the real single-chip computer system 5, the control code is input from the code editing box 9 under the virtual scene, and after code conversion, it is written into the virtual single-chip computer system 2 with the WiFi module, and finally the first IP address is set by the virtual host computer 3. Since the 3D virtual scene 1 works based on the Web page and has been connected to the Internet, it can directly interact with the MQTT server 7 to synchronize the status information of the real scene. In addition, the control terminal 13 can configure instructions to upload the first IP address to be sent for verification to the MQTT server 7; after the real single-chip computer system 5 obtains data from the MQTT server 7, it will broadcast and accurately send the data to the corresponding real single-chip computer system 5 with the WiFi module according to the first IP address carried in the instruction, thereby realizing the digital twin of the single-chip computer system with the WiFi module under the real hardware scene 4.

[0078] Specifically, in an embodiment of the present invention, the virtual single-chip computer system 2 comprises:

[0079] A virtual single-chip microcomputer development board; a virtual external power supply connected to the virtual single-chip microcomputer development board; a virtual voltage converter arranged between the virtual single-chip microcomputer development board and the virtual power supply; the virtual external power supply is connected to the power interface of the virtual single-chip microcomputer development board through the virtual voltage converter to provide analog power input for the virtual single-chip microcomputer development board; a code converter connected to the virtual burner 10; the code converter is used to convert the control code into JavaScript code after running the burning and synchronize it to the CPU of the virtual single-chip microcomputer development board; and a virtual external electronic component library connected to the virtual single-chip microcomputer development board; the virtual external electronic component library is used to provide external virtual electronic components for the system.

[0080] Specifically, in an embodiment of the present invention, the virtual single-chip computer system 2 also includes: virtual electronic components connected to the virtual single-chip computer development board; the virtual electronic components include: a first timing state detector connected to the virtual single-chip computer development board; the first timing state detector is used to detect the simulated power supply status of the virtual power supply; a second timing state detector provided on the CPU port of the virtual single-chip computer development board; the second timing state detector is used to detect the CPU port status and continuously schedule the operation of each of the virtual electronic components; and a virtual power switch connected to the virtual single-chip computer development board; the virtual power switch is connected to the virtual voltage converter to connect the power input to the virtual single-chip computer system 2.

[0081] As described above, the embodiment of the present invention involves a WiFi-based Web3D virtual single-chip microcomputer digital twin system, wherein the virtual single-chip microcomputer system 2 is based on Web front-end technology, and virtual electronic hardware is rendered through 3D modeling, and then different virtual electronic components are combined to restore multiple virtual single-chip microcomputer systems 2, and the virtual single-chip microcomputer system 2 is configured with the first IP address according to the virtual host computer 3; and the real single-chip microcomputer system 5 is built through physical electronic hardware. In the WiFi networking environment, each of the real single-chip microcomputer systems 5 is relatively independently set, and the real host computer 6 is used for the real single-chip microcomputer system 5 A second IP address consistent with the first IP address is configured so that it can achieve mutual corresponding mapping; and what is important is that the communication gateway 8 is arranged to verify the consistency of the first IP address and the second IP address, so as to correspond to the virtual single-chip computer system 2 and the real single-chip computer system 5 with consistent connection addresses, and realize accurate mapping of virtual and real systems; and the MQTT server 7 is provided between the virtual single-chip computer system 2 and the real single-chip computer system 5 to synchronize information data such as operation status and address, and make the operation effect of the real single-chip computer system 5 consistent with the operation effect of the virtual single-chip computer system 2 through the MQTT protocol. It is helpful to enhance the remote control experience in the WiFi scenario. Compared with the prior art, the technical solution involved in the present invention can realize accurate mapping of virtual and real single-chip computer systems 5 based on control codes in the scenario of using WiFi networking, which improves the system development efficiency and greatly saves the development cost.

[0082] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A WiFi-based Web3D virtual single-chip digital twin system, It is characterized in that include: 3D virtual scene based on WiFi communication protocol; A virtual single-chip computer system disposed in the 3D virtual scene; The virtual single-chip computer system is provided with a virtual WiFi module; the virtual single-chip computer system is used to perform single-chip computer virtual simulation on the Web3D webpage front end; A virtual host computer provided in the 3D virtual scene and connected to the virtual single-chip computer system; the virtual host computer is used to configure a first IP address for the virtual single-chip computer system; Real hardware scenarios under WiFi communication protocol; A real single-chip microcomputer system in the real hardware scene; the real single-chip microcomputer system is used to perform system development by configuring physical hardware; A real host computer connected to the real single-chip computer system; the real single-chip computer is used to configure a second IP address consistent with the first IP address for the real single-chip computer system; An MQTT server is provided between the 3D virtual scene and the real hardware scene, and connects the virtual single-chip microcomputer system and the real single-chip microcomputer system; the MQTT server is used to link the 3D virtual scene and the real hardware scene to transmit, store and synchronize data; and a communication gateway disposed between the MQTT server and the real single-chip microcomputer system for verifying that the connection addresses of the virtual single-chip microcomputer system and the real single-chip microcomputer system are consistent; The virtual host computer includes: an IP receiving module, the receiving module is used to obtain the default IP address of the communication gateway; An IP configuration module, the IP configuration module is connected to the virtual single-chip microcomputer system, and is used to preset a different first IP address for each virtual single-chip microcomputer system; a first IP comparison module connected to the IP receiving module and the IP configuration module; the first IP comparison module is used to compare the preset first IP address with the default IP address, and eliminate and reset the overlapping first IP address; the virtual host computer also includes: a conflict message receiving module, the conflict message receiving module is used to obtain the IP address conflict message sent by the system; a third IP acquisition module, the third IP acquisition module being used to acquire ARP table entries of network devices in the 3D virtual scene; the ARP table entries including the first IP address; A second IP comparison module connected to the third IP acquisition module is used to detect overlaps with the first IP addresses; the second IP comparison module compares the first IP addresses in pairs, removes and resets the overlapping first IP addresses.

2. According to the WiFi-based Web3D virtual single-chip digital twin system of claim 1, It is characterized in that The WiFi-based Web3D virtual single-chip digital twin system also includes: a control terminal arranged between the MQTT server and the virtual single-chip system.

3. According to the WiFi-based Web3D virtual single-chip digital twin system of claim 2, It is characterized in that The control terminal includes: a first IP acquisition module; The first IP acquisition module is connected to the IP receiving module and the MQTT server to obtain the default IP address from the MQTT server; A data synchronization module, which is used to synchronize the operation status information and IP address information of the virtual single-chip computer system and the real single-chip computer system; And an instruction configuration module connected to the IP acquisition module and the data synchronization module; the instruction configuration module is used to set system pairing instructions and data synchronization instructions; the system pairing instructions carry the first IP address information.

4. According to the WiFi-based Web3D virtual single-chip digital twin system of claim 3, It is characterized in that The communication gateway is used to connect the real single-chip microcomputer system and the MQTT server; the communication gateway includes: an instruction parsing module, the instruction parsing module is connected to the MQTT server to receive the system pairing instruction; A second IP acquisition module connected to the real single-chip computer system for acquiring a second IP address; An IP segment verification module connected to the instruction parsing module and the second IP acquisition module; And an IP number verification module connected to the IP segment verification module.

5. According to the WiFi-based Web3D virtual single-chip digital twin system of claim 1, It is characterized in that The WiFi-based Web3D virtual single-chip digital twin system also includes: A code editing box provided in the 3D virtual scene and connected to the virtual single-chip microcomputer system; the code editing box is used to write control codes for the virtual single-chip microcomputer according to requirements; A virtual burner is provided between the virtual single-chip computer and the code editing box, and is used to burn each of the control codes into the virtual burner corresponding to the virtual single-chip computer; A code development platform provided in the real hardware scenario for writing the control code; A real programmer is arranged between the code development platform and the real single-chip microcomputer system; the real programmer is used to program the control code into the real single-chip microcomputer system.

6. The WiFi-based Web3D virtual single-chip digital twin system according to claim 1, It is characterized in that In the 3D virtual scene, the rule for configuring the first IP address for the virtual single-chip computer includes: a single virtual single-chip computer system presets multiple first IP addresses, correspondingly mapping multiple real single-chip computer systems; A single first IP address is preset in each of the virtual single-chip microcomputer systems, and each of the virtual single-chip microcomputer systems is mapped one-to-one to a single real single-chip microcomputer system.

7. The WiFi-based Web3D virtual single-chip digital twin system according to claim 1, It is characterized in that The virtual single-chip computer system comprises: A virtual single-chip microcomputer development board; a virtual external power supply connected to the virtual single-chip microcomputer development board; A virtual voltage converter provided between the virtual single-chip microcomputer development board and the virtual power supply; The virtual external power supply is connected to the power interface of the virtual single-chip microcomputer development board through the virtual voltage converter to provide analog power input for the virtual single-chip microcomputer development board; A code converter connected to the virtual burner; The code converter is used to convert the control code into JavaScript code after running the burning and synchronize it to the CPU of the virtual single-chip microcomputer development board; And a virtual external electronic component library connected to the virtual single-chip development board; the virtual external electronic component library is used to provide external virtual electronic components for the system.

8. According to the WiFi-based Web3D virtual single-chip digital twin system of claim 7, It is characterized in that The virtual single chip computer system also includes: Virtual electronic components connected to the virtual single-chip microcomputer development board; the virtual electronic components include: a first timing state detector connected to the virtual single-chip microcomputer development board; the first timing state detector is used to detect the simulated power supply status of the virtual power supply; a second timing state detector is arranged on the CPU port of the virtual single-chip microcomputer development board; the second timing state detector is used to detect the CPU port status and continuously schedule the operation of each virtual electronic component; and a virtual power switch connected to the virtual single-chip microcomputer development board; the virtual power switch is connected to the virtual voltage converter to connect the power input for the virtual single-chip microcomputer system.

Citation Information

Patent Citations

  • A collaborative operation method and system for a web3D multi-virtual microcontroller system

    CN113703925B

  • Production line digital twinning system

    CN111708332A

  • Cooperative operation method and system of web3D multi-virtual single-chip microcomputer system

    CN113703925A