CN114371916A - Web3D virtual single-chip microcomputer digital twin system based on WiFi - Google Patents

Web3D virtual single-chip microcomputer digital twin system based on WiFi Download PDF

Info

Publication number
CN114371916A
CN114371916A CN202210160597.0A CN202210160597A CN114371916A CN 114371916 A CN114371916 A CN 114371916A CN 202210160597 A CN202210160597 A CN 202210160597A CN 114371916 A CN114371916 A CN 114371916A
Authority
CN
China
Prior art keywords
virtual
chip microcomputer
single chip
real
microcomputer system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210160597.0A
Other languages
Chinese (zh)
Inventor
王静
邹电
张应宝
王进
张澳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha University of Science and Technology
Original Assignee
Changsha University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changsha University of Science and Technology filed Critical Changsha University of Science and Technology
Priority to CN202210160597.0A priority Critical patent/CN114371916A/en
Publication of CN114371916A publication Critical patent/CN114371916A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The application discloses virtual singlechip digit twin system based on wiFi of Web3D includes: a 3D virtual scene; the virtual single chip microcomputer system is arranged in the 3D virtual scene; a virtual WiFi module is arranged in the virtual single-chip microcomputer system; the virtual upper computer is connected with the virtual single chip microcomputer system and used for configuring a first IP address for the virtual single chip microcomputer system; a real hardware scene; a real single chip system arranged in a real hardware scene; the real upper computer is connected with the real single chip microcomputer system and is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system; the MQTT server is connected with the virtual single chip microcomputer system and the real single chip microcomputer system; and a communication gateway for verifying the consistency of the connection addresses between the virtual singlechip system and the real singlechip system. According to the application, under the scene of WiFi networking, the virtual and real single chip microcomputer systems can be accurately mapped based on the control codes, and development cost is greatly saved while system development efficiency is improved.

Description

Web3D virtual single-chip microcomputer digital twin system based on WiFi
Technical Field
The application relates to the technical field of virtual single chip microcomputer systems, in particular to a Web3D virtual single chip microcomputer digital twin system based on WiFi.
Background
The digital twin is a simulation process integrating multidisciplinary, multi-physical quantity, multi-scale and multi-probability by fully utilizing data such as a physical model, sensor updating, operation history and the like, and mapping is completed in a virtual space, so that the full life cycle process of corresponding entity equipment is reflected. Digital twinning is an beyond-realistic concept that can be viewed as a digital mapping system of one or more important, interdependent equipment systems. The digital twin is a generally-adapted theoretical technical system and is applied to the fields of product design, product manufacturing, medical analysis, engineering construction and the like at present.
At present, the connection of the Internet by using a WiFi communication mode is a wide application; for the single chip microcomputer system, the application scenarios of using WiFi to communicate and remotely control the single chip microcomputer system are very many, so the development of the single chip microcomputer system based on the WiFi communication technology has become a popular research topic. In the development of a singlechip system, the cost is overlarge due to the fact that real singlechip hardware is directly used for development, a development technology of a virtual singlechip system appears in the prior art, and in an invention patent with the application number of 2022100240762 and the subject of being a Web3D virtual singlechip digital twin system based on ZigBee, a scheme for mapping a virtual singlechip and a real singlechip to each other by using a ZigBee communication technology to improve the development efficiency of the system is provided; however, the ZigBee communication technology is a short-distance and low-energy-consumption technology, and compared with WiFi communication, the connection modes of the two technologies and equipment are greatly different, and when WiFi communication is used for development of mapping a single virtual single chip microcomputer system to multiple real single chip microcomputer systems or mapping multiple virtual single chip microcomputer systems to multiple real single chip microcomputer systems, by adopting the technical scheme of the invention patent, mapping confusion of virtual and real single chip microcomputer systems may be caused, and the virtual and real systems cannot be precisely paired with each other, so that system function development confusion is caused; although the application No. 202111252171.X, which is a "cooperative operating system of Web3D multi-virtual single chip microcomputer system", discloses a technical scheme that a digital encoding and decoding technology is used in combination with a computing encoder and an analytic decoder, so that a virtual-real single chip microcomputer system mapped with each other can realize accurate pairing, in the development of a real single chip microcomputer system adopting WiFi communication, a gateway is usually required to be configured for communication channel regulation, and the adoption of an encoding and decoding technology undoubtedly brings much extra development cost to the development, so the technology is not completely suitable for the development of the single chip microcomputer system in the scene, and is also difficult to support the verification of the single chip microcomputer function. It can be said that the virtual-real mapping operation performed on the single chip microcomputer system based on the WiFi communication by using the digital twin technology is still a blank.
Therefore, how to provide a Web3D virtual single-chip microcomputer digital twin system based on WiFi, which can realize accurate mapping of virtual and real single-chip microcomputer systems based on control codes in a WiFi networking scenario, so as to improve system development efficiency and greatly save development cost, has become a technical problem to be solved urgently by technical personnel in the field.
Disclosure of Invention
In order to solve the technical problem, the application provides a Web3D virtual single-chip microcomputer digital twin system based on WiFi, which can realize accurate mapping of virtual and real single-chip microcomputer systems based on control codes in a scene of WiFi networking, so that the development efficiency of the system is improved, and meanwhile, the development cost is greatly saved.
The technical scheme provided by the application is as follows:
the application provides a virtual singlechip digit twin system of Web3D based on wiFi includes:
the 3D virtual scene is arranged under the WiFi communication protocol;
the virtual single chip microcomputer system is arranged in the 3D virtual scene; a virtual WiFi module is arranged in the virtual single-chip microcomputer system; the virtual single chip microcomputer system is used for carrying out single chip microcomputer virtual simulation at the front end of the Web3D webpage;
the virtual upper computer is arranged in the 3D virtual scene and connected with the virtual single chip microcomputer system; the virtual upper computer is used for configuring a first IP address for the virtual single chip microcomputer system;
a real hardware scene under the WiFi communication protocol; a real single chip system arranged in the real hardware scene; the real single chip microcomputer system is used for carrying out system development by configuring entity hardware;
the real upper computer is connected with the real single chip microcomputer system; the real single chip microcomputer is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system;
the MQTT server is arranged between the 3D virtual scene and the real hardware scene and is connected with the virtual single chip microcomputer system and the real single chip microcomputer system; the MQTT server is used for linking the 3D virtual scene and the real hardware scene to transmit, store and synchronize data;
and the communication gateway is arranged between the MQTT server and the real single chip microcomputer system and used for verifying the consistency of the connection addresses of the virtual single chip microcomputer system and the real single chip microcomputer system.
Further, in a preferred aspect of the present invention, the virtual upper computer includes:
the IP receiving module is used for acquiring a default IP address of the communication gateway;
the IP configuration module is connected with the virtual single chip microcomputer system and is used for presetting different first IP addresses for each virtual single chip microcomputer system;
the first IP comparison module is connected with the IP receiving module and the IP configuration module; the first IP comparison module is used for comparing the preset first IP address with the default IP address, and rejecting and resetting the overlapped first IP address.
Further, in a preferred mode of the present invention, the WiFi-based Web3D virtual single chip microcomputer digital twin system further includes: and the control terminal is arranged between the MQTT server and the virtual single chip microcomputer system.
Further, in a preferred aspect of the present invention, the control terminal includes: a first IP acquisition module; the first IP acquisition module is connected with the IP receiving module and the MQTT server and used for acquiring the default IP address from the MQTT server;
the data synchronization module is used for synchronizing the running state information and the IP address information of the real single chip microcomputer system of the virtual single chip microcomputer system;
the instruction configuration module is connected with the IP acquisition module and the data synchronization module; the instruction configuration module is used for setting a system pairing instruction and a data synchronization instruction; and the system pairing instruction carries the first IP address information.
Further, in a preferred mode 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: the instruction analysis module is connected with the MQTT server and used for receiving the system pairing instruction;
the second IP acquisition module is connected with the real single chip microcomputer system and used for acquiring a second IP address;
the IP section verification module is connected with the instruction analysis module and the second IP acquisition module;
and the IP number verification module is connected with the IP section verification module.
Further, in a preferred embodiment of the present invention, the virtual upper computer further includes: the collision message receiving module is used for acquiring an IP address collision message sent by a system;
a third IP collection module, configured to collect an ARP entry of a network device in the 3D virtual scene; the ARP table entry comprises the first IP address;
the second IP comparison module is connected with the third IP acquisition module and is used for carrying out coincidence detection on the first IP address; the second IP comparison module compares every two first IP addresses with each other, and eliminates and resets one superposed first IP address.
Further, in a preferred mode of the present invention, the WiFi-based Web3D virtual single chip microcomputer digital twin system further includes:
the code editing frame is arranged in the 3D virtual scene and connected with the virtual single chip microcomputer system; the code editing frame is used for writing control codes into the virtual single chip microcomputer according to requirements;
the code editor is arranged between the virtual single chip microcomputer and the code editing frame and is used for burning each control code to a virtual burner in the corresponding virtual single chip microcomputer;
the code development platform is arranged in the real hardware scene and used for writing the control codes;
the real burner is arranged between the code development platform and the real single chip microcomputer system; the real burner is used for burning the control code into the real single chip microcomputer system.
Further, in a preferred embodiment of the present invention, in the 3D virtual scene, a rule for configuring the first IP address for the virtual single chip includes: a plurality of first IP addresses are preset in a single virtual single chip microcomputer system, and a plurality of real single chip microcomputer systems are mapped correspondingly;
the single first IP address is preset in each virtual single chip microcomputer system, and each virtual single chip microcomputer system is mapped to the single real single chip microcomputer system in a one-to-one correspondence mode.
Further, in a preferred mode of the present invention, the virtual single chip microcomputer system includes:
a virtual singlechip development board; the virtual external power supply is connected with the virtual single chip microcomputer development board;
the virtual voltage converter is arranged between the virtual single chip microcomputer development board and the virtual power supply;
the virtual external power supply is connected with a power interface of the virtual single chip microcomputer development board through the virtual voltage converter and provides analog power supply input for the virtual single chip microcomputer development board;
the code converter is connected with the virtual burner;
the code converter is used for converting the control code into a JavaScript code after burning operation and synchronizing the JavaScript code into a CPU of the virtual single chip microcomputer development board;
the virtual external electronic element library is connected with the virtual single chip microcomputer development board; the virtual external electronic component library is used for providing external virtual electronic components for the system.
Further, in a preferred embodiment of the present invention, the virtual single chip microcomputer system further includes:
the virtual electronic component is connected with the virtual singlechip development board; the virtual electronic component includes: the first timing state detector is connected with the virtual singlechip development board; the first timing state detector is used for detecting the simulation power supply condition of the virtual power supply; the second timing state detector is arranged on the CPU port of the virtual singlechip development board; the second timing state detector is used for detecting the state of a CPU port and continuously scheduling each virtual electronic component to work; the virtual power switch is connected with the virtual singlechip development board; the virtual power switch is connected with the virtual voltage converter and used for connecting power supply input for the virtual single chip microcomputer system.
Compared with the prior art, the Web3D virtual singlechip digital twin system based on WiFi provided by the invention comprises the following components: the 3D virtual scene is arranged under the WiFi communication protocol; the virtual single chip microcomputer system is arranged in the 3D virtual scene; a virtual WiFi module is arranged in the virtual single-chip microcomputer system; the virtual single chip microcomputer system is used for carrying out single chip microcomputer virtual simulation at the front end of the Web3D webpage; the virtual upper computer is arranged in the 3D virtual scene and connected with the virtual single chip microcomputer system; the virtual upper computer is used for configuring a first IP address for the virtual single chip microcomputer system; a real hardware scene under the WiFi communication protocol; a real single chip system arranged in the real hardware scene; the real single chip microcomputer system is used for carrying out system development by configuring entity hardware; the real upper computer is connected with the real single chip microcomputer system; the real single chip microcomputer is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system; the MQTT server is arranged between the 3D virtual scene and the real hardware scene and is connected with the virtual single chip microcomputer system and the real single chip microcomputer system; the MQTT server is used for linking the 3D virtual scene and the real hardware scene to transmit, store and synchronize data; and the communication gateway is arranged between the MQTT server and the real single chip microcomputer system and used for verifying the consistency of the connection addresses of the virtual single chip microcomputer system and the real single chip microcomputer system. In the WiFi-based Web3D virtual single-chip microcomputer digital twin system provided by the invention, the virtual single-chip microcomputer system is based on a Web front-end technology, virtual electronic hardware is rendered through 3D modeling, different virtual electronic components are combined to restore a plurality of virtual single-chip microcomputer systems, and the virtual single-chip microcomputer systems configure the first IP address according to the virtual upper computer; the real single chip microcomputer system is built through entity electronic hardware, under a WiFi networking environment, each real single chip microcomputer system is relatively independently arranged, and a second IP address consistent with the first IP address is configured for the real single chip microcomputer system through the real upper computer, so that the real single chip microcomputer system can realize mutual corresponding mapping; what is important is that the communication gateway is arranged, so that the consistency of the first IP address and the second IP address can be verified, and the virtual single chip microcomputer system and the real single chip microcomputer system with consistent addresses are correspondingly connected, so that accurate mapping of a virtual system and a real system is realized; and the MQTT server is arranged between the virtual single chip microcomputer system and the real single chip microcomputer system, information data such as synchronous operation state, address and the like are synchronized, and the operation effect of the real single chip microcomputer system is consistent with that of the virtual single chip microcomputer system through an MQTT protocol. The remote control experience in a WiFi scene is enhanced. Compared with the prior art, the technical scheme of the invention can realize accurate mapping of the virtual and real single chip microcomputer systems based on the control codes under the scene of WiFi networking, thereby improving the system development efficiency and greatly saving the development cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an architecture diagram of a WiFi-based Web3D virtual single-chip microcomputer digital twin system according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a structure of a WiFi-based Web3D virtual single-chip microcomputer digital twin system according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a virtual upper computer according to an embodiment of the present invention;
fig. 4 is a block diagram schematically illustrating a structure of a control terminal according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a structure of a communication gateway according to an embodiment of the present invention.
Description of reference numerals:
3D virtual scene 1; a virtual single chip microcomputer system 2; a virtual upper computer 3; an IP receiving module 301; an IP configuration module 302; a first IP comparison module 303; a second IP comparison module 304; a collision message receiving module 305; a third IP acquisition module 306; a real hardware scene 4; a real single chip microcomputer system 5; a real upper computer 6; an MQTT server 7; a communication gateway 8; an instruction parsing module 801; a second IP acquisition module 802; an IP segment verification module 803; an IP number validation module 804; a code edit box 9; a virtual writer 10; a code development platform 11; a real burner 12; a control terminal 13; a first IP acquisition module 1301; a data synchronization module 1302; and an instruction configuration module 1303.
Detailed Description
In order to make those skilled in the art 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 with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that when an element is referred to as being "fixed" or "disposed" on another element, it can be directly on the other element or be indirectly disposed 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 be indirectly connected to the other element.
It will be understood that the terms "length," "width," "upper," "lower," "front," "rear," "first," "second," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like, as used herein, refer to an orientation or positional relationship indicated in the drawings that is solely for the purpose of facilitating the description and simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the application.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "plurality" or "a plurality" means two or more unless specifically limited otherwise.
It should be understood that the structures, ratios, sizes, and the like shown in the drawings are only used for matching the disclosure of the specification, so as to be understood and read by those skilled in the art, and are not used to limit the practical limit conditions of the present application, so that the modifications of the structures, the changes of the ratio relationships, or the adjustment of the sizes, do not have the technical essence, and the modifications, the changes of the ratio relationships, or the adjustment of the sizes, are all within the scope of the technical contents disclosed in the present application without affecting the efficacy and the achievable purpose of the present application.
As shown in fig. 1 to 5, the WiFi-based Web3D virtual single-chip microcomputer digital twin system provided in the embodiment of the present invention includes: the 3D virtual scene 1 is arranged under a WiFi communication protocol; the virtual single chip microcomputer system 2 is arranged in the 3D virtual scene 1; a virtual WiFi module is arranged in the virtual single-chip microcomputer system 2; the virtual single chip microcomputer system 2 is used for carrying out single chip microcomputer virtual simulation at the front end of the Web3D webpage; the virtual upper computer 3 is arranged in the 3D virtual scene 1 and connected with the virtual single chip microcomputer system 2; the virtual upper computer 3 is used for configuring a first IP address for the virtual single chip microcomputer system 2; a real hardware scene 4 under the WiFi communication protocol; a real single-chip microcomputer system 5 arranged in the real hardware scene 4; the real single chip microcomputer system 5 is used for carrying out system development by configuring entity hardware; a real upper computer 6 connected with the real single chip microcomputer system 5; the real single chip microcomputer is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system 5; the MQTT server 7 is arranged between the 3D virtual scene 1 and the real hardware scene 4 and is connected with the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5; the MQTT server 7 is used for linking the 3D virtual scene 1 and the real hardware scene 4 to transmit, store and synchronize data; and a communication gateway 8 arranged between the MQTT server 7 and the real single chip microcomputer system 5 and used for verifying the consistency of connection addresses of the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5.
The Web3D virtual single-chip microcomputer digital twin system based on the WiFi provided by the embodiment of the invention specifically comprises: the 3D virtual scene 1 is arranged under a WiFi communication protocol; the virtual single chip microcomputer system 2 is arranged in the 3D virtual scene 1; a virtual WiFi module is arranged in the virtual single-chip microcomputer system 2; the virtual single chip microcomputer system 2 is used for carrying out single chip microcomputer virtual simulation at the front end of the Web3D webpage; the virtual upper computer 3 is arranged in the 3D virtual scene 1 and connected with the virtual single chip microcomputer system 2; the virtual upper computer 3 is used for configuring a first IP address for the virtual single chip microcomputer system 2; a real hardware scene 4 under the WiFi communication protocol; a real single-chip microcomputer system 5 arranged in the real hardware scene 4; the real single chip microcomputer system 5 is used for carrying out system development by configuring entity hardware; a real upper computer 6 connected with the real single chip microcomputer system 5; the real single chip microcomputer is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system 5; the MQTT server 7 is arranged between the 3D virtual scene 1 and the real hardware scene 4 and is connected with the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5; the MQTT server 7 is used for linking the 3D virtual scene 1 and the real hardware scene 4 to transmit, store and synchronize data; and a communication gateway 8 arranged between the MQTT server 7 and the real single chip microcomputer system 5 and used for verifying the consistency of connection addresses of the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5. In the WiFi-based Web3D virtual single-chip microcomputer digital twin system provided by the invention, the virtual single-chip microcomputer system 2 is based on a Web front-end technology, virtual electronic hardware is rendered through 3D modeling, different virtual electronic components are combined to restore a plurality of virtual single-chip microcomputer systems 2, and the virtual single-chip microcomputer systems 2 configure the first IP address according to the virtual upper computer 3; the real single chip microcomputer systems 5 are built through physical electronic hardware, under a WiFi networking environment, the real single chip microcomputer systems 5 are arranged independently, and the real upper computer 6 is used for configuring second IP addresses consistent with the first IP addresses for the real single chip microcomputer systems 5, so that the real single chip microcomputer systems 5 can realize mutual corresponding mapping; what is important is that the communication gateway 8 is arranged, so that the consistency of the first IP address and the second IP address can be verified, and the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5 with consistent addresses are correspondingly connected, so that accurate mapping of a virtual system and a real system is realized; and the MQTT server 7 is arranged between the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5, information data such as running states, addresses and the like are synchronized, and the running effect of the real single chip microcomputer system 5 is consistent with that of the virtual single chip microcomputer system 2 through an MQTT protocol. The remote control experience in a WiFi scene is enhanced. Compared with the prior art, the technical scheme of the invention can realize accurate mapping of the virtual and real single chip microcomputer system 5 based on the control code under the scene of WiFi networking, thereby improving the system development efficiency and greatly saving the development cost.
Specifically, in an embodiment of the present invention, the virtual upper computer 3 includes:
an IP receiving module 301, configured to obtain a default IP address of the communication gateway 8;
the IP configuration module 302, where the IP configuration module 302 is connected to the virtual single chip microcomputer system 2, and is used to preset different first IP addresses for each virtual single chip microcomputer system 2; a first IP comparing module 303 connected to the IP receiving module 301 and the IP configuring module 302; the first IP comparing module 303 is configured to compare the preset first IP address with the default IP address, and reject and reset the overlapped first IP address.
The purpose of the IP receiving module 301 obtaining the default IP address from the MQTT server 7 is to: avoiding the preset first IP address from being overlapped with the default IP address of the communication gateway 8; resulting in IP address conflicts; the IP configuration module 302 configures the first IP address for the virtual single chip microcomputer system 2, and removes and resets the overlapped first IP address in combination with the first IP comparison module 303.
Specifically, in the embodiment of the present invention, the WiFi-based Web3D virtual single-chip microcomputer digital twin system further includes: and the control terminal 13 is arranged between the MQTT server 7 and the virtual single chip microcomputer system 2.
Specifically, in the embodiment of the present invention, the control terminal 13 includes: a first IP acquisition module 1301; the first IP collecting module 1301 is connected to the IP receiving module 301 and the MQTT server 7, and configured to obtain the default IP address from the MQTT server 7; a data synchronization module 1302, wherein the data synchronization module 1302 is configured to synchronize the operating state information and the 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 configured to set a system pairing instruction and a data synchronization instruction; and the system pairing instruction carries the first IP address information.
Specifically, in the 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: the instruction analysis module 801 is connected with the MQTT server 7 and used for receiving the system pairing instruction; a second IP acquisition module 802 connected to the real single chip microcomputer system 5 for acquiring a second IP address; an IP segment verification module 803 connected to the instruction parsing module 801 and the second IP collection module 802; and an IP number verification module 804 connected to the IP segment verification module 803.
As shown in fig. 1, a real hardware scene 4 in the WiFi communication mode corresponds to a 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 one-to-one mapping relation, and state synchronization is achieved through an MQTT internet of things instant messaging protocol.
Specifically, in the embodiment of the present invention, in a WiFi communication mode, the real single chip microcomputer system 5 with a WiFi module in the real hardware scene 4 interacts with a 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 microcomputer system 2 with the WiFi module in the Web-based 3D virtual scene 1 acquires the information data in the corresponding real single-chip microcomputer system 5 with the WiFi module from the MQTT server 7 through the book searching control terminal 13; and the virtual single chip microcomputer system 2 with the WiFi module in the 3D virtual scene 1 at the front end of the Web page sends data to the MQTT server 7, the real WiFi hotspot module takes out the data from the MQTT server 7, and broadcasts between the real single chip microcomputer systems 5 accessed to the WiFi network through IP verification and distribution instructions, so that the state of the virtual single chip microcomputer system 2 is mapped into the real single chip microcomputer system 5 corresponding to the IP address.
Specifically, in the embodiment of the present invention, the virtual upper computer 3 further includes: a conflict message receiving module 305, where the conflict message receiving module 305 is configured to obtain an IP address conflict message sent by a system; a third IP collecting module 306, where the third IP collecting module 306 is configured to collect an ARP entry of a network device in the 3D virtual scene 1; the ARP table entry comprises the first IP address; a second IP comparison module 304 connected to the third IP collection module 306 and configured to perform coincidence detection on the first IP address; the second IP comparing module 304 compares every two of the first IP addresses with each other, and rejects and resets one of the coincident first IP addresses.
In the embodiment of the present invention, there are two cases where IP address conflicts may occur: firstly, the first IP address preset for the virtual single chip microcomputer system 2 coincides with the default IP address of the communication gateway 8, so that IP conflicts are caused, and based on this, in the technical scheme of the application, the coinciding first IP address is removed and reset through the IP receiving module 301 and the first IP comparing module 303, so that the risk of first IP conflicts is avoided; secondly, the first IP addresses preset for the virtual single chip microcomputer system 2 are overlapped to cause IP conflicts, and for the IP conflicts, the third IP acquisition module 306 acquires the ARP entry, extracts the first IP address information from the ARP entry, and combines the second IP comparison module 304 to avoid the risk of the second IP conflicts.
Specifically, in the embodiment of the present invention, the WiFi-based Web3D virtual single-chip microcomputer digital twin system further includes: a code editing frame 9 arranged in the 3D virtual scene 1 and connected with the virtual single chip microcomputer system 2; the code editing frame 9 is used for writing control codes into the virtual single chip microcomputer according to requirements; the code editor is arranged between the virtual single chip microcomputer and the code editing frame 9 and is used for burning each control code to a virtual burner 10 corresponding to the virtual single chip microcomputer; a code development platform 11, provided in the real hardware scene 4, for writing the control code; the real burner 12 is arranged between the code development platform 11 and the real single chip microcomputer system 5; the real burner 12 is used for burning the control code into the real single chip microcomputer system 5.
Specifically, in the embodiment of the present invention, in the 3D virtual scene 1, the rule for configuring the first IP address for the virtual single chip microcomputer includes: a plurality of first IP addresses are preset in the single virtual single chip microcomputer system 2, and a plurality of real single chip microcomputer systems 5 are mapped correspondingly; the single first IP address is preset in each virtual single chip microcomputer system 2, and the single real single chip microcomputer system 5 is mapped in a one-to-one correspondence mode by each virtual single chip microcomputer system 2.
Wherein, as shown in fig. 2, for a digital twinning system: the real single chip microcomputer system 5 based on the WiFi communication mode in the real hardware scene 4 needs to be provided with a WiFi communication module, codes are written into the code development platform 11 of the real single chip microcomputer system 5, the codes are compiled and run and then are burnt into the real single chip microcomputer system 5 through the real burner 12, the second IP address is set through the real upper position, and then the WiFi networking is accessed by combining the communication gateway 8.
Specifically, in the embodiment of the present invention, data is uploaded to the MQTT server 7 through MQTT protocol in real time.
In the 3D virtual scene 1, the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5 are mapped one by one according to IP addresses, the virtual single chip microcomputer system 2 is provided with the virtual WiFi modules, different from the real single chip microcomputer system 5, control codes are input from the code editing frame 9 in the virtual scene, after code conversion is carried out, the control codes are written into the virtual single chip microcomputer system 2 with the WiFi modules, and finally the first IP address is set through the virtual upper computer 3. Because the 3D virtual scene 1 works based on the Web page and has access to the Internet, the 3D virtual scene can directly interact with the MQTT server 7 to synchronize the state information of the real scene. In addition, the control terminal 13 can configure instructions, and upload the first IP address carrying verification to be sent to the MQTT server 7; after the real single chip microcomputer system 5 acquires data from the MQTT server 7, the data are broadcasted, and the data are accurately sent to the corresponding real single chip microcomputer system 5 with the WiFi module according to the first IP address carried in the instruction, so that digital twins of the single chip microcomputer system with the WiFi module under the real hardware scene 4 are realized.
Specifically, in the embodiment of the present invention, the virtual single chip microcomputer system 2 includes:
a virtual singlechip development board; the virtual external power supply is connected with the virtual single chip microcomputer development board; the virtual voltage converter is arranged between the virtual single chip microcomputer development board and the virtual power supply; the virtual external power supply is connected with a power interface of the virtual single chip microcomputer development board through the virtual voltage converter and provides analog power supply input for the virtual single chip microcomputer development board; a transcoder connected to the virtual burner 10; the code converter is used for converting the control code into a JavaScript code after burning operation and synchronizing the JavaScript code into a CPU of the virtual single chip microcomputer development board; the virtual external electronic element library is connected with the virtual single chip microcomputer development board; the virtual external electronic component library is used for providing external virtual electronic components for the system.
Specifically, in the embodiment of the present invention, the virtual single chip microcomputer system 2 further includes: the virtual electronic component is connected with the virtual singlechip development board; the virtual electronic component includes: the first timing state detector is connected with the virtual singlechip development board; the first timing state detector is used for detecting the simulation power supply condition of the virtual power supply; the second timing state detector is arranged on the CPU port of the virtual singlechip development board; the second timing state detector is used for detecting the state of a CPU port and continuously scheduling each virtual electronic component to work; the virtual power switch is connected with the virtual singlechip development board; the virtual power switch is connected with the virtual voltage converter and used for connecting power supply input for the virtual single chip microcomputer system 2.
From the above, the Web3D virtual single-chip microcomputer digital twin system based on WiFi according to the embodiment of the present invention, wherein the virtual single-chip microcomputer system 2 is based on a Web front-end technology, renders virtual electronic hardware through 3D modeling, and combines different virtual electronic components to restore a plurality of virtual single-chip microcomputer systems 2, and the virtual single-chip microcomputer system 2 configures the first IP address according to the virtual upper computer 3; the real single chip microcomputer systems 5 are built through physical electronic hardware, under a WiFi networking environment, the real single chip microcomputer systems 5 are arranged independently, and the real upper computer 6 is used for configuring second IP addresses consistent with the first IP addresses for the real single chip microcomputer systems 5, so that the real single chip microcomputer systems 5 can realize mutual corresponding mapping; what is important is that the communication gateway 8 is arranged, so that the consistency of the first IP address and the second IP address can be verified, and the virtual single-chip microcomputer system 2 and the real single-chip microcomputer system 5 with consistent addresses are correspondingly connected, so that accurate mapping of a virtual system and a real system is realized; and the MQTT server 7 is arranged between the virtual single chip microcomputer system 2 and the real single chip microcomputer system 5, information data such as running states, addresses and the like are synchronized, and the running effect of the real single chip microcomputer system 5 is consistent with that of the virtual single chip microcomputer system 2 through an MQTT protocol. The remote control experience in a WiFi scene is enhanced. Compared with the prior art, the technical scheme of the invention can realize accurate mapping of the virtual and real single chip microcomputer system 5 based on the control code under the scene of WiFi networking, thereby improving the system development efficiency and greatly saving the development cost.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A Web3D virtual single-chip microcomputer digital twin system based on WiFi is characterized by comprising: the 3D virtual scene is arranged under the WiFi communication protocol;
the virtual single chip microcomputer system is arranged in the 3D virtual scene;
a virtual WiFi module is arranged in the virtual single-chip microcomputer system; the virtual single chip microcomputer system is used for carrying out single chip microcomputer virtual simulation at the front end of the Web3D webpage;
the virtual upper computer is arranged in the 3D virtual scene and connected with the virtual single chip microcomputer system; the virtual upper computer is used for configuring a first IP address for the virtual single chip microcomputer system;
a real hardware scene under the WiFi communication protocol; a real single chip system arranged in the real hardware scene; the real single chip microcomputer system is used for carrying out system development by configuring entity hardware;
the real upper computer is connected with the real single chip microcomputer system; the real single chip microcomputer is used for configuring a second IP address consistent with the first IP address for the real single chip microcomputer system;
the MQTT server is arranged between the 3D virtual scene and the real hardware scene and is connected with the virtual single chip microcomputer system and the real single chip microcomputer system; the MQTT server is used for linking the 3D virtual scene and the real hardware scene to transmit, store and synchronize data;
and the communication gateway is arranged between the MQTT server and the real single chip microcomputer system and used for verifying the consistency of the connection addresses of the virtual single chip microcomputer system and the real single chip microcomputer system.
2. The WiFi-based Web3D virtual single-chip microcomputer digital twin system as recited in claim 1, wherein the virtual upper computer comprises:
the IP receiving module is used for acquiring a default IP address of the communication gateway;
the IP configuration module is connected with the virtual single chip microcomputer system and is used for presetting different first IP addresses for each virtual single chip microcomputer system;
the first IP comparison module is connected with the IP receiving module and the IP configuration module; the first IP comparison module is used for comparing the preset first IP address with the default IP address, and rejecting and resetting the overlapped first IP address.
3. The WiFi-based Web3D virtual single-chip digital twin system according to claim 2, wherein the WiFi-based Web3D virtual single-chip digital twin system further comprises: and the control terminal is arranged between the MQTT server and the virtual single chip microcomputer system.
4. The WiFi-based Web3D virtual singlechip digital twin system as claimed in claim 3, wherein the control terminal comprises: a first IP acquisition module;
the first IP acquisition module is connected with the IP receiving module and the MQTT server and used for acquiring the default IP address from the MQTT server;
the data synchronization module is used for synchronizing the running state information and the IP address information of the real single chip microcomputer system of the virtual single chip microcomputer system;
the instruction configuration module is connected with the IP acquisition module and the data synchronization module; the instruction configuration module is used for setting a system pairing instruction and a data synchronization instruction; and the system pairing instruction carries the first IP address information.
5. The WiFi-based Web3D virtual singlechip digital twin system as claimed in claim 4, wherein the communication gateway is used for connecting the real singlechip system and an MQTT server; the communication gateway includes: the instruction analysis module is connected with the MQTT server and used for receiving the system pairing instruction;
the second IP acquisition module is connected with the real single chip microcomputer system and used for acquiring a second IP address;
the IP section verification module is connected with the instruction analysis module and the second IP acquisition module;
and the IP number verification module is connected with the IP section verification module.
6. The WiFi-based Web3D virtual singlechip digital twin system as claimed in claim 2, wherein the virtual upper computer further comprises: the collision message receiving module is used for acquiring an IP address collision message sent by a system;
a third IP collection module, configured to collect an ARP entry of a network device in the 3D virtual scene; the ARP table entry comprises the first IP address;
the second IP comparison module is connected with the third IP acquisition module and is used for carrying out coincidence detection on the first IP address; the second IP comparison module compares every two first IP addresses with each other, and eliminates and resets one superposed first IP address.
7. The WiFi-based Web3D virtual single-chip digital twin system according to claim 1, wherein the WiFi-based Web3D virtual single-chip digital twin system further comprises:
the code editing frame is arranged in the 3D virtual scene and connected with the virtual single chip microcomputer system; the code editing frame is used for writing control codes into the virtual single chip microcomputer according to requirements;
the code editor is arranged between the virtual single chip microcomputer and the code editing frame and is used for burning each control code to a virtual burner in the corresponding virtual single chip microcomputer;
the code development platform is arranged in the real hardware scene and used for writing the control codes;
the real burner is arranged between the code development platform and the real single chip microcomputer system; the real burner is used for burning the control code into the real single chip microcomputer system.
8. The WiFi-based Web3D virtual single-chip microcomputer digital twin system of claim 1, wherein in the 3D virtual scene, the rule for configuring the virtual single-chip microcomputer with the first IP address includes: a plurality of first IP addresses are preset in a single virtual single chip microcomputer system, and a plurality of real single chip microcomputer systems are mapped correspondingly;
the single first IP address is preset in each virtual single chip microcomputer system, and each virtual single chip microcomputer system is mapped to the single real single chip microcomputer system in a one-to-one correspondence mode.
9. The WiFi-based Web3D virtual single-chip microcomputer digital twin system as claimed in claim 1, wherein the virtual single-chip microcomputer system consists of:
a virtual singlechip development board; the virtual external power supply is connected with the virtual single chip microcomputer development board;
the virtual voltage converter is arranged between the virtual single chip microcomputer development board and the virtual power supply;
the virtual external power supply is connected with a power interface of the virtual single chip microcomputer development board through the virtual voltage converter and provides analog power supply input for the virtual single chip microcomputer development board;
the code converter is connected with the virtual burner;
the code converter is used for converting the control code into a JavaScript code after burning operation and synchronizing the JavaScript code into a CPU of the virtual single chip microcomputer development board;
the virtual external electronic element library is connected with the virtual single chip microcomputer development board; the virtual external electronic component library is used for providing external virtual electronic components for the system.
10. The WiFi-based Web3D virtual single-chip microcomputer digital twin system of claim 9, wherein the virtual single-chip microcomputer system further comprises:
the virtual electronic component is connected with the virtual singlechip development board; the virtual electronic component includes: the first timing state detector is connected with the virtual singlechip development board; the first timing state detector is used for detecting the simulation power supply condition of the virtual power supply; the second timing state detector is arranged on the CPU port of the virtual singlechip development board; the second timing state detector is used for detecting the state of a CPU port and continuously scheduling each virtual electronic component to work; the virtual power switch is connected with the virtual singlechip development board; the virtual power switch is connected with the virtual voltage converter and used for connecting power supply input for the virtual single chip microcomputer system.
CN202210160597.0A 2022-02-22 2022-02-22 Web3D virtual single-chip microcomputer digital twin system based on WiFi Pending CN114371916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210160597.0A CN114371916A (en) 2022-02-22 2022-02-22 Web3D virtual single-chip microcomputer digital twin system based on WiFi

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210160597.0A CN114371916A (en) 2022-02-22 2022-02-22 Web3D virtual single-chip microcomputer digital twin system based on WiFi

Publications (1)

Publication Number Publication Date
CN114371916A true CN114371916A (en) 2022-04-19

Family

ID=81145022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210160597.0A Pending CN114371916A (en) 2022-02-22 2022-02-22 Web3D virtual single-chip microcomputer digital twin system based on WiFi

Country Status (1)

Country Link
CN (1) CN114371916A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366708A (en) * 2023-04-11 2023-06-30 南京审计大学 System and method for dynamically switching entity equipment in network target range virtual-real combined scene

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366708A (en) * 2023-04-11 2023-06-30 南京审计大学 System and method for dynamically switching entity equipment in network target range virtual-real combined scene
CN116366708B (en) * 2023-04-11 2023-10-27 南京审计大学 System and method for dynamically switching entity equipment in network target range virtual-real combined scene

Similar Documents

Publication Publication Date Title
CN107465608B (en) Internet of Things Multifunctional gateway based on NB-IoT
CN104660682B (en) A kind of OPC data collection and monitoring intelligent terminal based on TD-LTE
Guoqiang et al. Design and implementation of a smart IoT gateway
CN102722971B (en) Intelligent data acquisition device with solidified protocol
CN204598011U (en) A kind of OPC data acquisition and monitoring intelligent terminal based on TD-LTE
CN211557493U (en) Edge thing allies oneself with communication analytic device
CN114371916A (en) Web3D virtual single-chip microcomputer digital twin system based on WiFi
CN111010317A (en) Bluetooth production and test method and system based on serial port and Bluetooth low-energy consumption dual protocol
CN105530220A (en) OPC-based interface method for realizing system communication of two different types of protocols
CN205119225U (en) Domestic heating system remote monitering system
CN107992439A (en) A kind of expansible data interactive method and system
CN202111737U (en) Network management enhanced E1/ETH protocol converter
CN109445384A (en) A kind of more apparatus control systems
CN212086506U (en) Gateway
CN117119332A (en) Power distribution network data acquisition method and system based on Beidou short message communication
CN107592411A (en) A kind of communication interface and communication means
CN209055883U (en) A kind of asymmetric data processing unit based on multicore POWERPC processor
CN203261357U (en) Novel universal Internet-of-things gateway
CN101938765A (en) Method and system for automatically adapting network manager and network element
CN213043692U (en) Intelligent energy gateway supporting multi-terminal self-adaptive access
Wang The Internet of Things smart home system design based on ZigBee/GPRS technology
CN103916427A (en) First mobile communication terminal and communication method thereof, and system for Internet of Things
CN210402688U (en) Photovoltaic power station wireless data acquisition system
CN102013918B (en) Method, system and device for transmitting data
CN205375162U (en) Remote monitering system based on WIFI of family network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination