Signal synchronization method and system
By introducing control modules, clock modules and switches into the redundant channel system, the synchronization of dual channels is achieved, which solves the problem of poor synchronization effect of dual channels in the prior art and improves synchronization reliability.
Patent Information
- Application Number
- CN202011630881.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The synchronization effect of existing redundant channels is poor, resulting in insufficient reliability of synchronized data.
By introducing control modules, clock modules and switches into the system, the control module is connected to the to-synchronous module and the clock module, the clock module is connected to the to-synchronous module, and the switch is connected to the to-synchronous module and the control module, achieving dual-channel synchronization.
It improves the synchronization effect and synchronization reliability of dual channels, solving the problem of poor synchronization effect of dual channels.
Smart Images

Figure CN112671498B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation control, and in particular to a signal synchronization method and system. Background Art
[0002] The redundant packet capture tool can realize the acquisition of information from two channels on redundant channels, which plays a great role in obtaining current communication information and analyzing the current communication status of the system.
[0003] However, the current methods for enhancing synchronization performance on redundant channels mainly include balancing the resources of the two channels to synchronize the processing speeds of the two channels, or achieving synchronization through communication between the two channels. However, there are often problems such as poor synchronization effect and insufficient reliability of synchronization data.
[0004] With respect to the above-mentioned problem of poor synchronization effect of dual channels, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a signal synchronization method and system to at least solve the technical problem of poor synchronization effect of dual channels.
[0006] According to one aspect of an embodiment of the present invention, a signal synchronization system is provided, comprising: a first module to be synchronized, a second module to be synchronized, a control module, a clock module and a switch, wherein a first end of the control module is connected to a first end of the first module to be synchronized, a second end of the control module is connected to a first end of the second module to be synchronized, a third end of the control module is connected to a first end of the clock module, a second end of the clock module is connected to a second end of the first module to be synchronized, and a third end of the clock module is connected to a second end of the second module to be synchronized; a fourth end of the control module, a third end of the first module to be synchronized, and a third end of the second module to be synchronized are connected to the switch.
[0007] Optionally, the control module is used to send a synchronization instruction to the first module to be synchronized and the second module to be synchronized, and send a start timing instruction to the first module to be synchronized and the second module to be synchronized.
[0008] Further, optionally, the first module to be synchronized and the second module to be synchronized receive a synchronization instruction sent by the control module, and clear the clock in the first module to be synchronized and the clock of the second module to be synchronized according to the synchronization instruction; the first module to be synchronized and the second module to be synchronized receive a start timing instruction sent by the control module, and use the clock module as a clock source for timing according to the start timing instruction.
[0009] Optionally, the fourth end of the first module to be synchronized is connected to the first channel of the dual redundant system for collecting data of the first channel; the fourth end of the second module to be synchronized is connected to the second channel of the dual redundant system for collecting data of the second channel; the first module to be synchronized and the second module to be synchronized synchronously obtain data of the first channel and the second channel according to the start timing instruction.
[0010] Further, optionally, the system also includes: a preset interface and a dual redundant system, wherein the preset interface is connected to the switch and connected to the computing terminal through the preset interface; the first channel of the dual redundant system is connected to the first module to be synchronized, and the second channel of the dual redundant system is connected to the second module to be synchronized.
[0011] According to another aspect of an embodiment of the present invention, a signal synchronization method is also provided, which is applied to the above-mentioned system, including: receiving a synchronization instruction sent by a control module; clearing the clock in a first module to be synchronized and the clock in a second module to be synchronized according to the synchronization instruction; receiving a start timing instruction sent by the control module; using the clock module as a clock source according to the start timing instruction, and synchronizing the clock in the first module to be synchronized and the clock in the second module to be synchronized according to the clock source.
[0012] Optionally, receiving the synchronization instruction sent by the control module includes: receiving the synchronization instruction sent by the control module through serial port communication.
[0013] Optionally, the method further includes: connecting to a computing terminal device via a switch.
[0014] Optionally, the method also includes: synchronizing the clock of the first module to be synchronized and the clock of the second module to be synchronized based on a clock source; collecting data of the first channel of the dual redundant system through the first module to be synchronized based on the clock synchronization after the synchronized timing, and collecting data of the second channel of the dual redundant system through the second module to be synchronized.
[0015] According to another aspect of an embodiment of the present invention, a signal synchronization method is provided, which is applied to the above system and includes: sending a synchronization instruction to a first module to be synchronized and a second module to be synchronized; and sending a start timing instruction to the first module to be synchronized and the second module to be synchronized.
[0016] In an embodiment of the present invention, the first end of the control module is connected to the first end of the first module to be synchronized, the second end of the control module is connected to the first end of the second module to be synchronized, the third end of the control module is connected to the first end of the clock module, the second end of the clock module is connected to the second end of the first module to be synchronized, and the third end of the clock module is connected to the second end of the second module to be synchronized; the fourth end of the control module, the third end of the first module to be synchronized, and the third end of the second module to be synchronized are connected to the switch, thereby achieving the purpose of dual-channel synchronization, thereby realizing the technical effect of improving the synchronization effect and synchronization reliability, and further solving the technical problem caused by poor dual-channel synchronization effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a schematic diagram of a signal synchronization system according to an embodiment of the present invention;
[0019] Figure 2 is a schematic flow chart of a signal synchronization system according to an embodiment of the present invention;
[0020] Figure 3 is a flow chart of a signal synchronization method according to an embodiment of the present invention;
[0021] Figure 4 It is a flowchart of another signal synchronization method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] Technical terms involved in this application:
[0025] MCU: Microcontroller Unit.
[0026] Example 1
[0027] According to one aspect of an embodiment of the present invention, a system for signal synchronization is provided. Figure 1 is a schematic diagram of a signal synchronization system according to an embodiment of the present invention, such as Figure 1 As shown, it includes: a first module to be synchronized 10, a second module to be synchronized 12, a control module 14, a clock module 16 and a switch 18, wherein a first end of the control module 14 is connected to a first end of the first module to be synchronized 10, a second end of the control module 14 is connected to a first end of the second module to be synchronized 12, a third end of the control module 14 is connected to a first end of the clock module 16, a second end of the clock module 16 is connected to a second end of the first module to be synchronized 10, and a third end of the clock module 16 is connected to a second end of the second module to be synchronized 12; a fourth end of the control module 14, a third end of the first module to be synchronized 10, and a third end of the second module to be synchronized 12 are connected to the switch 18.
[0028] Optionally, the control module 14 is configured to send a synchronization instruction to the first module to be synchronized 10 and the second module to be synchronized 12 , and send a start timing instruction to the first module to be synchronized 10 and the second module to be synchronized 12 .
[0029] Further, optionally, the first module to be synchronized 10 and the second module to be synchronized 12 receive a synchronization instruction sent by the control module 14, and clear the clock in the first module to be synchronized 10 and the clock of the second module to be synchronized 12 according to the synchronization instruction; the first module to be synchronized 10 and the second module to be synchronized 12 receive a start timing instruction sent by the control module 14, and use the clock module 16 as a clock source for timing according to the start timing instruction.
[0030] Optionally, the fourth end of the first module to be synchronized 10 is connected to the first channel of the dual redundant system for collecting data of the first channel; the fourth end of the second module to be synchronized 12 is connected to the second channel of the dual redundant system for collecting data of the second channel; the first module to be synchronized 10 and the second module to be synchronized 12 synchronously obtain data of the first channel and the second channel according to the start timing instruction.
[0031] Further, optionally, the signal synchronization system provided in the embodiment of the present application also includes: a preset interface and a dual redundant system, wherein the preset interface is connected to the switch 18 and is connected to the computing terminal through the preset interface; the first channel of the dual redundant system is connected to the first module to be synchronized 10, and the second channel of the dual redundant system is connected to the second module to be synchronized 12.
[0032] In summary, Figure 2 is a flow chart of a signal synchronization system according to an embodiment of the present invention. Figure 2 As shown, the redundant channel packet capture tool captures the data of the redundant channel through two channels containing two MCUs (the first module to be synchronized and the second module to be synchronized in the embodiment of the present application), and the two channels are respectively sent to the PC end (the computing terminal in the embodiment of the present application) via the switch 18 and RJ45 (the preset interface in the embodiment of the present application) in the form of Ethernet communication. In order to perform the synchronization operation, an external synchronization clock module and a trigger signal line are added as shown in FIG. Figure 2 As shown. Figure 2 It can be seen that the MCU1 (the first module to be synchronized in the embodiment of the present application) and MCU2 (the second module to be synchronized in the embodiment of the present application) perform acquisition, while the MCU3 (the control module in the embodiment of the present application) performs the control of the entire module.
[0033] Figure 2 The core of the clock distribution module is a chip CDCV304PWRG4 that can divide one clock into four (only three clock outputs are used in this design). The three clock outputs have a completely synchronized "heartbeat" and provide external clocks for the timers in MCU1, MCU2 and MCU3.
[0034] The time synchronization process of redundant channel microcontrollers is:
[0035] MCU3 monitors and controls the entire system. Time synchronization is initiated by MCU3, which sends synchronization instructions to MCU1 and MCU2 via serial communication. After receiving the instructions from MCU3, MCU1 and MCU2 will clear the count in the current timer and wait for further operation instructions.
[0036] MCU3 notifies MCU1 and MCU2 to start the timer in the form of a trigger signal, and MCU1 and MCU2 use the external common clock source (i.e., the clock module in the embodiment of the present application) as the clock of the timer to start counting, thereby completing the time synchronization of the two channels. In this way, the information of the two channels at the same time point can be obtained from the PC.
[0037] MCU1 and MCU2 have the same external "heartbeat" and the same counting initiation time. This operation ensures the time synchronization of the two channels, so that the redundant channel information captured by the current packet capture tool is synchronized in time. This ensures the reliability of data during the working process of the packet capture tool.
[0038] The data acquired by the redundant channels are highly synchronized in time, and the data analysis is reliable.
[0039] In an embodiment of the present invention, the first end of the control module is connected to the first end of the first module to be synchronized, the second end of the control module is connected to the first end of the second module to be synchronized, the third end of the control module is connected to the first end of the clock module, the second end of the clock module is connected to the second end of the first module to be synchronized, and the third end of the clock module is connected to the second end of the second module to be synchronized; the fourth end of the control module, the third end of the first module to be synchronized, and the third end of the second module to be synchronized are connected to the switch, thereby achieving the purpose of dual-channel synchronization, thereby realizing the technical effect of improving the synchronization effect and synchronization reliability, and further solving the technical problem caused by poor dual-channel synchronization effect.
[0040] Example 2
[0041] According to an embodiment of the present invention, a method embodiment of a signal synchronization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 3 is a flow chart of a signal synchronization method according to an embodiment of the present invention. Figure 3 As shown, in the system for signal synchronization in the above-mentioned embodiment 1, on the first module to be synchronized or the second module to be synchronized side, the signal synchronization method provided by the embodiment of the present application includes the following steps:
[0043] Step S302, receiving a synchronization instruction sent by a control module;
[0044] Optionally, receiving the synchronization instruction sent by the control module in step S302 includes: receiving the synchronization instruction sent by the control module through serial port communication.
[0045] Specifically, as in Example 1 Figure 2 As shown in the figure, the first module to be synchronized and the second module to be synchronized communicate with the control module via serial port communication, wherein the synchronization instruction sent by the control module is received via serial port communication. Subsequently, the first module to be synchronized is recorded as MCU1, the second module to be synchronized is recorded as MCU2, and the control module is recorded as MCU3. In the embodiment of the present application, MCU3 plays a role in monitoring and controlling the overall system, and time synchronization is initiated by MCU3.
[0046] Step S304, clearing the clock in the first module to be synchronized and the clock in the second module to be synchronized according to the synchronization instruction;
[0047] Specifically, after receiving the synchronization instruction from MCU3, MCU1 and MCU2 will clear the counts in the timer of MCU1 and the timer of MCU2, and then wait for further operation instructions from MCU3.
[0048] Step S306, receiving a start timing instruction sent by the control module;
[0049] Specifically, MCU3 notifies MCU1 and MCU2 to start the timer in the form of a trigger signal, that is, receives the timing start instruction sent by MCU3.
[0050] Step S308: Using the clock module as a clock source according to the timing start instruction, and synchronizing the clock in the first module to be synchronized and the clock in the second module to be synchronized according to the clock source.
[0051] Optionally, the signal synchronization method provided in the embodiment of the present application also includes: synchronizing the clock of the first module to be synchronized and the clock of the second module to be synchronized based on a clock source; collecting data of the first channel of the dual redundant system through the first module to be synchronized based on the clock synchronization after the synchronized timing, and collecting data of the second channel of the dual redundant system through the second module to be synchronized.
[0052] Specifically, MCU1 and MCU2 use the external common clock source as the timer clock and start counting, thereby completing the time synchronization of the two channels. In this way, the information of the two channels at the same time point can be obtained from the PC.
[0053] Optionally, the signal synchronization method provided in the embodiment of the present application also includes: connecting to a computing terminal device through a switch.
[0054] Specifically, Figure 2 As shown, MCU1 and MCU2 are connected to the PC via a switch, wherein in the embodiment of the present application, the PC can be preferably connected via RJ45.
[0055] Example 3
[0056] According to another aspect of an embodiment of the present invention, a signal synchronization method is also provided. Figure 4 FIG. 1 is a flow chart of another signal synchronization method according to an embodiment of the present invention. Figure 4 As shown, the signal synchronization system applied to the above-mentioned embodiment 1 includes, on the control module side:
[0057] Step S402, sending a synchronization instruction to the first module to be synchronized and the second module to be synchronized;
[0058] Step S404: Send a timing start instruction to the first module to be synchronized and the second module to be synchronized.
[0059] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0060] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0061] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0062] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0063] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0064] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0065] 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 principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A signal synchronization system, characterized in that: include: A first module to be synchronized, a second module to be synchronized, a control module, a clock module and a switch, a preset interface and a dual redundant system, wherein: The first end of the control module is connected to the first end of the first module to be synchronized, the second end of the control module is connected to the first end of the second module to be synchronized, the third end of the control module is connected to the first end of the clock module, the second end of the clock module is connected to the second end of the first module to be synchronized, and the third end of the clock module is connected to the second end of the second module to be synchronized; The fourth end of the control module, the third end of the first module to be synchronized, and the third end of the second module to be synchronized are connected to the switch; The preset interface is connected to the switch, and is connected to the computing terminal through the preset interface; the first channel of the dual redundant system is connected to the first module to be synchronized, and the second channel of the dual redundant system is connected to the second module to be synchronized; Wherein, the control module is used to send a synchronization instruction to the first module to be synchronized and the second module to be synchronized through a serial communication mode, and send a start timing instruction to the first module to be synchronized and the second module to be synchronized; the first module to be synchronized and the second module to be synchronized receive the synchronization instruction sent by the control module, and clear the clock of the first module to be synchronized and the clock of the second module to be synchronized according to the synchronization instruction; the first module to be synchronized and the second module to be synchronized receive the start timing instruction sent by the control module, and use the clock module as a clock source for timing according to the start timing instruction; The fourth end of the first module to be synchronized is connected to the first channel of the dual redundant system for collecting data of the first channel; the fourth end of the second module to be synchronized is connected to the second channel of the dual redundant system for collecting data of the second channel; the first module to be synchronized and the second module to be synchronized synchronously obtain the data of the first channel and the second channel according to the start timing instruction.
2. A signal synchronization method, characterized in that: The first module to be synchronized or the second module to be synchronized as claimed in claim 1 comprises: Receiving a synchronization instruction sent by a control module; Clearing the clock in the first module to be synchronized and the clock in the second module to be synchronized according to the synchronization instruction; Receiving a start timing instruction sent by the control module; Using the clock module as a clock source according to the start timing instruction, and synchronizing the clock of the first module to be synchronized and the clock of the second module to be synchronized according to the clock source; According to the clock synchronization after synchronization timing, data of the first channel of the dual redundant system is collected through the first module to be synchronized, and data of the second channel of the dual redundant system is collected through the second module to be synchronized.
3. The method according to claim 2, characterized in that The synchronization instruction sent by the receiving control module includes: The synchronization instruction sent by the control module is received through serial port communication.
4. The method according to claim 2, characterized in that: The method further comprises: Connect to computing terminal devices through switches.
Citation Information
Patent Citations
Signal synchronization system
CN214101397U