A method for performing virtual machine synchronization operation based on RS232

Through the RS232-based method, the Beidou signal receiving device and the active serial switch, combined with the virtualization layer driver, the problem of time synchronization between the virtual machine cluster and the physical machine is solved, and high-precision and stable synchronization operation is achieved, and it is compatible with the existing technology.

CN113867893BActive Publication Date: 2025-05-16AEROSPACE SCI & ENG NETWORK INFORMATION DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111143667.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2025-05-16
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of time synchronization between virtual machine clusters and physical machines, especially in the context of virtualization technology, and traditional methods are difficult to be compatible with the synchronization operation of virtual machines.

Method used

Using the RS232-based method, the computer is timed through the Beidou signal receiving device, and the Beidou time pulse signal is distributed to multiple computers using an active serial switch, and the interrupt signal is transmitted to the virtual machine system through the virtualization layer driver, thereby realizing the synchronous operation of the virtual machine and the physical machine.

Benefits of technology

It realizes high-precision, stable and reliable time synchronization and operation synchronization, is compatible with existing timing protocols and application software, and supports synchronization operations between physical and virtual machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113867893B_ABST
    Figure CN113867893B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for performing virtual machine synchronization operation based on RS232, and belongs to the field of communication. The present invention provides time service for a computer through a Beidou signal receiving device, and also distributes Beidou's time pulse signal to multiple computers through a serial port switching device. It can provide time service for a physical computer, and can also provide time service for a virtual machine through virtualization technology. The software can perform synchronization operation according to signal interruption, with high precision, stability and reliability. The technical method is compatible with existing timing solutions and application software, and simultaneously realizes the timing and action synchronization of physical machines and virtual machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of communications, and in particular relates to a method for performing virtual machine synchronization operations based on RS232. Background Art

[0002] With the development of computer and network technology, various business scenarios have higher and higher requirements for cluster synchronization operations, including synchronization accuracy, efficiency, and reliability. Accuracy requires that the time source be accurate and the transmission be low latency; efficiency requires that the software and hardware be easy to deploy and occupy less system resources; reliability requires that the software technology be mature, widely applicable, and highly secure.

[0003] At the same time, since time synchronization and cluster operations often involve interactions with other parts of the system, high compatibility of software and hardware is also required, and duplication of construction is avoided. With the mature development of the deployment and application of Beidou satellites in my country, more and more devices are using Beidou's positioning and timing services. The use of domestically produced technical solutions is not only safer and more controllable, but also conducive to building an independent technical ecosystem.

[0004] Comparison of current main technical approaches:

[0005] (1) Synchronization based on Network Time Protocol

[0006] The time synchronization between the client and the server is mainly achieved through the NTP and PTP protocols, which can achieve millisecond / microsecond accuracy. It is generally used in server clusters in local area networks. The timing server needs to connect to other time source servers, generally GPS or network time synchronization services. The computers in the cluster use the local time as the standard and synchronize operation-related commands. This method of time synchronization has the disadvantage of periodic "regular synchronization". The application can only operate according to the local time, and the operation synchronization is indirectly achieved.

[0007] (2) Based on network multicast synchronization

[0008] Computers are networked through multicast. The broadcasting computer in the multicast sends data packets to the multicast address, and other machines in the group interpret the specific application semantics based on the received data packets. This method achieves operation synchronization through the network layer, and time consistency is difficult to guarantee.

[0009] (3) Synchronization based on application instructions

[0010] The application directly sends relevant instructions to the client, and the client performs relevant operations after receiving the instructions. This method does not have strong time consistency.

[0011] (4) Synchronization based on Beidou time signal

[0012] The BeiDou time source is received through the BeiDou signal card, and the computer time in the cluster is synchronized with this time as the benchmark, and the BeiDou source signal pulse is transmitted to the computer as the synchronization signal, and the computer performs operations synchronously according to this signal. This method solves the problems of time synchronization and operation synchronization at the same time, and uses the national BeiDou service as a reliable signal source.

[0013] In addition, with the gradual development of virtualization technology, signals can be used in virtual machines by modifying the virtualization layer, which greatly increases the flexibility of the technical solution. Summary of the invention

[0014] 1. Technical issues to be resolved

[0015] The technical problem to be solved by the present invention is how to provide a method for performing virtual machine synchronization operations based on RS232 to solve the problem of time synchronization between virtual machine clusters, virtual machines and physical machines.

[0016] (II) Technical solution

[0017] In order to solve the above technical problems, the present invention proposes a method for performing virtual machine synchronization operation based on RS232. The method is applied to a system including a front-end computer, an active serial port switch and a working computer. The front-end computer is equipped with a Beidou timing board and connected to the input serial port of the active serial port switch through a serial port. The output serial port of the active serial port switch is connected to the serial port of the working computer. The method comprises the following steps:

[0018] S11. The front-end computer is equipped with a Beidou timing board, which includes a Beidou signal receiving card and a Beidou signal pulse program. The Beidou signal receiving card receives Beidou's time pulse signal through a satellite link.

[0019] S12, the Beidou signal pulse program of the front-end computer reads the Beidou time from the Beidou time pulse signal and synchronizes the local time;

[0020] S13, the Beidou signal pulse program of the front-end computer processes the Beidou time pulse signal, converts the signal into a second pulse signal and outputs it through the serial port, and the signal is transmitted to the active serial port switch through the serial port line;

[0021] S14, the active serial port switch sends the serial port signal to each working computer through the downstream serial port;

[0022] S15, after receiving the serial port signal, the working computer converts the signal into an interrupt signal through the built-in driver of the computer and sends it to the virtual machine or physical machine through the virtualization layer or kernel;

[0023] S16. The application program in the virtual machine or physical machine triggers a program action according to the interrupt signal, thereby achieving the capability of synchronizing the virtual machine cluster.

[0024] Furthermore, the step S11 also includes: installing an operating system, a Beidou signal receiving card and a Beidou signal pulse program on the front-end computer.

[0025] Furthermore, before step S11, the method further includes: connecting the serial port output of the front-end computer to the input serial port of the active serial port switch, and debugging the output serial ports of the active serial port switch one by one to check the signal logic and strength.

[0026] Furthermore, the working computer includes a virtualized server and a physical server.

[0027] Furthermore, the interrupt signal of the virtualization layer in step S15 is implemented as follows: the virtualization server is installed with a pcie parallel port card, and the RX pin of the output serial port of the active serial port switch is connected to the tenth pin of the parallel port card, and the tenth pin is used to trigger an interrupt.

[0028] Furthermore, a virtualization layer driver is developed in the virtualization layer of the virtualization server to receive the switch signal from the serial port, and the driver of the virtualization layer of the virtualization server transmits the interrupt signal generated by the parallel port card to the virtual machine in the virtualization server.

[0029] Furthermore, the implementation of the virtualization layer driver is specifically as follows: modifying the qemu device simulation module of the virtualization layer, adding an interrupt monitoring program, and sending the interrupt generated by the parallel port to the virtual machine for processing after the monitoring program processes it.

[0030] Furthermore, the virtual machine loads the qemu-bd.ko driver, and the monitoring program processes the interruption generated by the parallel port and sends it to the qemu-bd.ko driver of the virtual machine for processing, and then sends a notification to the application of the virtual machine.

[0031] Furthermore, the interrupt signal of the kernel in step S15 is implemented as follows: the kernel of the physical server loads the host driver module host-bd.ko, and this driver receives the switch signal from the serial port, converts it into an interrupt signal, and then sends it to the application of the physical machine.

[0032] Furthermore, the program action in step S16 includes ntp synchronization time.

[0033] (III) Beneficial effects

[0034] The present invention proposes a method for performing virtual machine synchronization operation based on RS232, which provides time service for computers through Beidou signal receiving equipment, and distributes Beidou time pulse signals to multiple computers through serial port switching equipment. It can provide time service for physical computers, and can also provide time service for virtual machines through virtualization technology. The software can perform synchronization operation according to signal interruption, with high precision, stability and reliability. The technical method is compatible with existing timing solutions and application software, and realizes the timing and action synchronization of physical machines and virtual machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of the method of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0037] Based on the above reasons and the advantages and disadvantages of various technical solutions, the present invention uses Beidou signals for system time synchronization and application action synchronization, which has the characteristics of high reliability and high precision of the time source. At the same time, it uses the mature RS232 protocol to transmit signals, uses an active serial port switch to distribute serial port signals to each computer, and transmits interrupts to the virtual machine system through the virtualization layer driver.

[0038] This technical solution uses Beidou signal receiving equipment to provide time for computers, and also distributes Beidou's time pulse signal to multiple computers through serial port switching equipment. It can provide time for physical computers, and can also provide time for virtual machines through virtualization technology. The software can perform synchronous operations based on signal interrupts, with high accuracy, stability and reliability. This technical method is compatible with existing timing solutions and application software, and simultaneously realizes the timing and action synchronization of physical and virtual machines.

[0039] The method is applied to a system including a front-end computer, an active serial port switch and a working computer. The front-end computer is installed with a Beidou timing board and is connected to an input serial port of the active serial port switch through a serial port. The output serial port of the active serial port switch is connected to the serial port of the working computer.

[0040] The process of this method is as follows:

[0041] S11. The front-end computer is installed with a Beidou timing board, which includes a Beidou signal receiving card and a Beidou signal pulse program. The Beidou signal receiving card receives Beidou's time pulse signal through a satellite link.

[0042] S12, the Beidou signal pulse program of the front-end computer reads the Beidou time from the Beidou time pulse signal and synchronizes the local time

[0043] S13. The Beidou signal pulse program of the front-end computer processes the Beidou time pulse signal, converts the signal into a second pulse signal and outputs it through the serial port. The signal is transmitted to the active serial port switch through the serial port line.

[0044] S14. Using an active serial port switch is helpful to ensure signal strength. The active serial port switch sends the serial port signal to each working computer through the downstream serial port.

[0045] S15. After receiving the serial port signal, the working computer converts the signal into an interrupt signal through the built-in driver of the computer and sends it to the virtual machine or physical machine through the virtualization layer or kernel.

[0046] S16, the application in the virtual machine or physical machine triggers the program action according to the interrupt signal, so as to achieve the ability of virtual machine cluster synchronization. Specifically, various operations can be performed according to the interrupt signal, which can be ntp synchronization time or other operations. This interrupt signal is a synchronization signal.

[0047] The purpose of the present invention is to realize time synchronization and operation synchronization based on Beidou signals, realize the virtualization layer driver of RS232 custom signals, and be compatible with existing timing protocols, existing application software, operating systems and hardware environments.

[0048] Embodiment 1:

[0049] To implement this invention, the following steps can be performed:

[0050] S21. Install the operating system, Beidou signal receiving card and Beidou signal pulse program on the front-end computer.

[0051] S22. Connect the serial port output of the front-end computer to the input serial port of the active serial port switch, and debug the output serial ports of the active serial port switch one by one to check the signal logic and strength.

[0052] S23. Each working computer includes a virtualized server and a physical server. The virtualized server is installed with a PCIE parallel port card. The RX pin of the output serial port of the active serial port switch is connected to the tenth pin of the parallel port card. The tenth pin is used to trigger an interrupt.

[0053] S24, developing a virtualization layer driver in the virtualization layer of the virtualization server, receiving the switch signal from the serial port, and transmitting the interrupt signal generated by the parallel port card to the virtual machine in the virtualization server by the virtualization layer driver of the virtualization server. Specifically, modifying the qemu device emulation module of the virtualization layer, adding an interrupt monitoring program, the monitoring program processes the interrupt generated by the parallel port and sends it to the virtual machine for processing.

[0054] S25. The kernel of the physical server loads the host driver module host-bd.ko. This driver receives the switch signal from the serial port, converts it into an interrupt signal, and then sends it to the application of the physical machine.

[0055] S26, the virtual machine loads the qemu-bd.ko driver, the monitoring program processes the interruption generated by the parallel port and sends it to the qemu-bd.ko driver of the virtual machine for processing, and then sends the notification to the application of the virtual machine.

[0056] S27. The application of each virtual machine or physical machine receives the interrupt signal after the driver processes it, and the application synchronously executes related operations based on this information.

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

Claims

1. A method for performing virtual machine synchronization operation based on RS232, characterized in that: The method is applied to a system including a front-end computer, an active serial port switch and a working computer. The front-end computer is equipped with a Beidou timing board and connected to an input serial port of the active serial port switch through a serial port. The output serial port of the active serial port switch is connected to the serial port of the working computer. The method includes the following steps: S11. The front-end computer is equipped with a Beidou timing board, which includes a Beidou signal receiving card and a Beidou signal pulse program. The Beidou signal receiving card receives Beidou's time pulse signal through a satellite link. S12, the Beidou signal pulse program of the front-end computer reads the Beidou time from the Beidou time pulse signal and synchronizes the local time; S13, the Beidou signal pulse program of the front-end computer processes the Beidou time pulse signal, converts the signal into a second pulse signal and outputs it through the serial port, and the signal is transmitted to the active serial port switch through the serial port line; S14, the active serial port switch sends the serial port signal to each working computer through the downstream serial port; S15, after receiving the serial port signal, the working computer converts the signal into an interrupt signal through the built-in driver of the computer and sends it to the virtual machine or physical machine through the virtualization layer or kernel; S16, the application in the virtual machine or physical machine triggers the program action according to the interrupt signal, thereby achieving the ability of virtual machine cluster synchronization; in, The working computer includes a virtualized server and a physical server; The interrupt signal of the virtualization layer in step S15 is implemented as follows: the virtualization server is installed with a pcie parallel port card, and the RX pin of the output serial port of the active serial port switch is connected to the tenth pin of the parallel port card, and the tenth pin is used to trigger an interrupt.

2. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 1, characterized in that: The step S11 also includes: installing an operating system, a Beidou signal receiving card and a Beidou signal pulse program on the front-end computer.

3. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 1, characterized in that: Before step S11, the method further includes: connecting the serial port output of the front-end computer to the input serial port of the active serial port switch, and debugging the output serial ports of the active serial port switch one by one to check the signal logic and strength.

4. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 1, characterized in that: A virtualization layer driver is developed in the virtualization layer of the virtualization server to receive a switch signal from the serial port, and the driver of the virtualization layer of the virtualization server transmits an interrupt signal generated by the parallel port card to a virtual machine in the virtualization server.

5. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 4, characterized in that: The implementation of the virtualization layer driver is specifically as follows: modify the qemu device simulation module of the virtualization layer, add an interrupt monitoring program, and the monitoring program processes the interrupt generated by the parallel port and sends it to the virtual machine for processing.

6. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 5, characterized in that: The virtual machine loads the qemu-bd.ko driver, and the monitoring program processes the interruption generated by the parallel port and sends it to the qemu-bd.ko driver of the virtual machine for processing, and then sends a notification to the application of the virtual machine.

7. The method for performing virtual machine synchronization operation based on RS232 as claimed in claim 1, characterized in that: The kernel interrupt signal in step S15 is implemented as follows: the kernel of the physical server loads the host driver module host-bd.ko, which receives the switch signal from the serial port, converts it into an interrupt signal, and then sends it to the application of the physical machine.

8. The method for performing virtual machine synchronization operation based on RS232 as described in any one of claims 4 to 7, characterized in that: The program action in step S16 includes ntp synchronization time.

Citation Information

Patent Citations

  • Device and method of synchronous computation and timing control based on global navigation satellite system (GNSS)

    CN109581415A

  • Time unification card virtualization method and system and medium

    CN110377106A