An implementation method of a multi-device synchronization technology based on infrared radio frequency double synchronization

By using infrared and radio frequency dual synchronization technology, a reliable synchronization domain is established and a common execution time is determined, which solves the problems of network reliability and trigger determinism in multi-device synchronization, and realizes the reliability and consistency of multi-device synchronization. It is suitable for multi-camera, multi-sensor and wearable acquisition devices.

CN123185649APending Publication Date: 2026-11-27BEIJING LINGSHENG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611442232.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing wireless synchronization solutions struggle to simultaneously ensure network reliability and trigger determinism in multi-device synchronization. Radio frequency links are susceptible to channel contention and obstruction, while infrared links cannot reliably express device identity and status, leading to synchronization errors and deviations.

Method used

An infrared and radio frequency dual synchronization method is adopted. A trusted synchronization domain is established through the radio frequency link, and the synchronization command is transmitted through the infrared link. Combined with high-precision timers and channel tag cross-verification, the common execution time is determined, absorbing the differences in decoding and task scheduling between devices, and preventing false triggering and repeated execution.

Benefits of technology

It achieves reliable and consistent synchronization of multiple devices without wired clock connections between devices, and is suitable for multiple cameras, multiple sensors and wearable acquisition devices, reducing the probability of false triggering and repeated execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185649A_ABST
    Figure CN123185649A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of multi-device synchronization control, and specifically relates to a multi-device synchronization technology implementation method based on infrared radio frequency double synchronization, which comprises the following steps: each device first exchanges state frames through a radio frequency link periodically, verifies the device role, a working channel, a serial number and check information, and establishes a trusted synchronization domain with a validity period; when a synchronization operation trigger occurs, a sending device broadcasts a coded frame carrying a synchronization command and a radio frequency channel label through an infrared link; a receiving device records a local high-precision time stamp when infrared decoding is completed, back-projects a physical frame starting point according to an infrared frame air interface time, and obtains a common execution time point by superimposing a preset protection delay; each device executes the synchronization command when the local timer reaches the common execution time point. The present application suppresses false triggering and repeated execution through channel label cross verification, local echo shielding, repeated frame deduplication and idempotent state machine, and does not depend on a wired clock, and is suitable for multi-camera, multi-sensor and other collaborative terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multi-device synchronization control technology, specifically a method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization. Background Technology

[0002] When multiple cameras, sensors, or wearable data acquisition terminals perform synchronous recording, it is usually required that each device start or stop at the closest possible time. Existing wireless solutions mostly use a single radio frequency link to transmit control status and trigger commands simultaneously. However, the radio frequency link is affected by channel contention, retransmission, buffering, and protocol stack scheduling, and the arrival time of control frames may be subject to uncertain jitter. Although using infrared trigger alone has the advantages of fast propagation and good broadcast simultaneity, it is difficult to reliably express device identity, network status, working channel, and long-term online status, and may be affected by obstruction, local echo, and crosstalk from adjacent devices.

[0003] Radio frequency (RF) links offer wide coverage and the ability to verify identity and status, making them suitable for confirming device roles, operating channels, and online status. Infrared links, on the other hand, feature low propagation delay, stable trigger edges, and good broadcast simultaneity, enabling the generation of precise synchronization trigger events. However, simply superimposing these two without cross-verifying channel tags, device roles, and online status within the same trusted synchronization domain makes it difficult to prevent false triggering by different synchronization groups, different channels, or unauthorized devices, and also makes it difficult to guarantee that multiple receiving devices will perform operations at the same semantic moment.

[0004] Furthermore, if the task is started directly at the moment of "completing the reception of infrared frames," significant start-up deviations may still occur due to differences in decoding completion times, task scheduling, and initialization times at different receivers. If the infrared command is not cross-validated with the RF configuration, devices in different groups or on different channels may be falsely triggered. Therefore, a multi-device synchronization technology is needed that combines the RF status confirmation capability with the precise triggering capability of infrared, and can construct a common execution time locally on each device. Summary of the Invention

[0005] The purpose of this invention is to provide a method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization. This method achieves synchronization without relying on wired clock connections between devices, enables reliable grouping of multiple devices, resists interference from duplicate frames and erroneous channels, and enables synchronous start-up and synchronous stop through a unified delay. This solves the problem that a single wireless link cannot simultaneously ensure network reliability and trigger determinism.

[0006] The technical solution adopted by the present invention to achieve the above objectives is: a method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization, comprising the following steps:

[0007] Step S1: Configure device identifiers, device roles, synchronization group identifiers, and radio frequency working channels for multiple devices to be synchronized; calibrate the RTC module; use the calibrated RTC time as a common time reference; and initialize the radio frequency transceiver module, infrared transceiver module, high-precision timer, synchronization event queue module, and synchronization control state machine of each device to be synchronized.

[0008] Step S2: Each device to be synchronized periodically exchanges radio frequency status information through the radio frequency link, and verifies the device role, radio frequency working channel, communication validity and data integrity of the corresponding device based on the received radio frequency status information. When the preset verification conditions are met, the valid verification status of the corresponding device is established to form a trusted synchronization domain.

[0009] Step S3: When a synchronization operation request is generated, the sending end device to be synchronized determines whether the synchronization operation conditions are met based on its own radio frequency synchronization status and the trusted synchronization domain status. If the synchronization operation conditions are met, an infrared encoded frame carrying a synchronization command and radio frequency channel tag is generated and broadcast to the receiving end device to be synchronized in the trusted synchronization domain through the infrared link.

[0010] Step S4: Each receiving end device to be synchronized receives the infrared encoded frame, decodes and verifies its integrity, and cross-verifies the radio frequency channel tag in the infrared encoded frame with its current radio frequency working channel. After the verification is successful, a corresponding synchronization event is generated.

[0011] Step S5: When the receiving end device to be synchronized completes the reception of the infrared encoded frame, it records the local high-precision timestamp, determines the physical frame start reference time of the infrared encoded frame based on the air interface time of the infrared encoded frame, and adds a preset protection delay to the physical frame start reference time to obtain the common execution time corresponding to the synchronization operation.

[0012] Step S6: Each device to be synchronized determines whether the common execution time has been reached based on its local high-precision timer. When the common execution time is reached, it executes the corresponding business operation synchronously according to the synchronization command, and updates the synchronization control status after the synchronization operation is completed. It continues to maintain online verification and anomaly recovery of the device through the radio frequency link.

[0013] Step S2 includes the following steps:

[0014] Step S2-1: Each device to be synchronized periodically sends a status frame through the radio frequency link;

[0015] The status frame includes: frame header, protocol version, frame type, device role, radio frequency operating channel, frame sequence number, cyclic redundancy check (CRC) value, and frame tail.

[0016] Step S2-2: The receiving end uses a sliding window to locate candidate state frames in the continuous byte stream received by the radio frequency link, and verifies the state frames in sequence;

[0017] Step S2-3: When the frame header, protocol version, frame type, radio frequency working channel and cyclic redundancy check value of the status frame all meet the validity conditions, update the online time of the corresponding end device and maintain the valid status of the end device according to the online time;

[0018] Step S2-4: When the time since the most recent valid state frame exceeds the preset online valid window, cancel the trusted synchronization domain state of the corresponding end device.

[0019] Different device roles use different radio frequency status frame transmission periods, and the radio frequency status frame transmission periods corresponding to different device roles are not integer multiples of each other, in order to reduce the probability of continuous communication collisions when multiple devices to be synchronized transmit radio frequency status frames in a cycle.

[0020] The trusted synchronization domain is maintained based on the effective status of the devices to be synchronized within the synchronization group. In a master-slave synchronization scenario, the sending end determines the authorization conditions for the synchronization operation based on the effective status of multiple slave devices. The authorization conditions include at least one of the following: the specified device is online, the authorized node is online, or the number of online devices reaches a preset threshold.

[0021] Step S2 further includes radio frequency operating channel switching processing, specifically:

[0022] When the radio frequency operating channel of the device to be synchronized changes, the radio frequency synchronization status is set to the channel switching status, the existing valid verification status of the peer device is revoked, and the generation of new valid status information and synchronization authorization is suspended.

[0023] After the RF transceiver module completes the RF working channel switching, it updates the current RF working channel of the local device, and re-receives and verifies the status frame of the peer device based on the switched RF working channel in order to re-establish the trusted synchronization domain.

[0024] When the RF working channel switching fails, the channel switching status is canceled and synchronization operation is kept off.

[0025] Step S3 includes the following steps:

[0026] Step S3-1: When a synchronization operation request is generated by user key press, host computer command or other service event, the sending end device to be synchronized determines whether its local radio frequency working channel is in the channel switching state, and determines whether the trusted synchronization domain is valid according to the preset strategy; when the synchronization operation conditions are met, an infrared coded frame is generated.

[0027] The infrared coded frame includes: a fixed identifier, a synchronization command, a channel tag, and an integrity check value;

[0028] Step S3-2: Modulate the infrared coded frame with an infrared carrier and transmit it synchronously by at least two transmitters facing different infrared transmitters to broadcast the infrared coded frame to multiple receivers to be synchronized.

[0029] Step S3-3: The same infrared coded frame is sent at least twice consecutively, with an interval set between the two adjacent transmissions; multiple infrared transmitters facing different directions are started simultaneously by the same hardware synchronization manager; when the hardware synchronization manager is unavailable, multiple infrared transmitters are started in a manner that submits continuously without interfering with other tasks;

[0030] Step S3-4: After the transmitting end completes the transmission of the infrared encoded frame, it sets the local transmission echo shielding window. Within the local transmission echo shielding window, the echo signal generated by the local infrared transmission is ignored, so as to improve the reception reliability of infrared synchronization operation and avoid false triggering of local echo formation.

[0031] Step S4 includes the following steps:

[0032] Step S4-1: The receiving end device to be synchronized receives infrared encoded frames through at least two infrared receiver heads facing different directions;

[0033] Step S4-2: A synchronization event is generated after any infrared receiver head completes the decoding of a valid infrared encoded frame;

[0034] Step S4-3: Sequentially check the fixed identifier, command code range, channel tag range, and integrity check value of the infrared coded frame, and cross-check the channel tag with the current radio frequency operating channel of the machine, that is:

[0035] a) When the radio frequency working channel is in the channel switching state, the channel tag is inconsistent with the local radio frequency working channel, or the infrared encoded frame integrity verification fails, the corresponding synchronization event is rejected.

[0036] b) When the verification passes, a duplicate frame deduplication window is set for the same command and the same channel label. Within the duplicate frame deduplication window, for duplicate reception or the same synchronization event generated by multiple infrared receivers at the same time, only the first valid event is retained, and the first valid event is used as the synchronization event for subsequent processing.

[0037] Step S5 includes the following steps:

[0038] Step S5-1: When the infrared encoded frame is decoded, the receiving end records the receiving timestamp through a local high-precision timer, and accumulates the air interface time of the infrared encoded frame according to the marking duration and interval duration of the received infrared symbols.

[0039] Step S5-2: Calculate the physical frame start reference time of the infrared encoded frame by subtracting the air interface time from the received timestamp. Then, a preset protection delay is superimposed on the physical frame start reference time to obtain the common execution time:

[0040]

[0041] in, For the time of joint execution, This is the local timestamp used by the receiving end when it completes the reception of the infrared encoded frame. The air interface time of the infrared coded frame is calculated by accumulating the marking duration and interval duration of the received infrared symbols. Preset protection delay;

[0042] The preset protection delay is greater than the worst-case time consumed by infrared encoded frame transmission, reception and decoding, event queuing, control task wake-up, and service startup preparation.

[0043] Step S5-3: The transmitting end uses the local time when it starts sending infrared encoded frames as the frame start reference time, and adds the same preset protection delay as the receiving end to determine the local common execution time.

[0044] In step S6, the synchronization command includes: synchronization start, synchronization stop, and exception recovery; wherein, upon reaching the common execution time, the corresponding business operations are synchronously executed according to the synchronization command, specifically:

[0045] Step S6-1: During synchronization startup, the transmitting end device to be synchronized checks the storage medium, acquisition peripherals, and RF synchronization domain status. After meeting the synchronization startup conditions, it sends a synchronization start infrared encoding frame and enters the startup waiting state. The receiving end device to be synchronized enters the startup waiting state after completing the infrared encoding frame reception and channel cross-verification. At the common execution time, it creates an acquisition session to synchronously start data recording of at least one of the dual-camera video, inertial sensor, tactile sensor, and angle sensor, and saves it with the same session number.

[0046] Step S6-2: When synchronization stops, the transmitting end device to be synchronized sends a synchronization stop infrared encoded frame and enters the stop processing state. The receiving end device to be synchronized accepts the synchronization stop command through the same channel cross-check and stops the corresponding service execution unit or performs resource reclamation. Before the resource shutdown is completed, it rejects the new synchronization start command.

[0047] Step S6-3: When the device is in a task execution state and receives a repeat start command, it maintains the original task execution state. When the device is in a non-task execution state and receives a stop command, it maintains the current state. When the device is in a stopped processing state and receives a repeat switch command, it does not release resources repeatedly. When a storage medium is missing, device resources are insufficient, or service startup fails during startup, the startup waiting state is revoked and the device is restored to the synchronization ready state or the waiting RF verification state. When the RF heartbeat times out while the device is executing a task, the existing task is allowed to continue running and new synchronization startup is prohibited. When the RF channel is inconsistent, the infrared frame verification fails, the event queue is full, or the state machine conflicts, diagnostic information is recorded and the original state is maintained. After the synchronization operation is completed, online verification is maintained through the RF status frame, and anomaly recovery is performed.

[0048] A multi-device synchronization system based on infrared radio frequency dual synchronization includes multiple synchronization devices, each of which includes: a main controller and connected to it a radio frequency transceiver module, an infrared transmitting unit, an infrared receiving unit, a high-precision timer, a synchronization event queue module, and a synchronization control state machine;

[0049] The radio frequency transceiver module is used to exchange radio frequency status frames between multiple synchronization devices, and to verify the device role, radio frequency working channel and online status of the synchronization devices based on the radio frequency status frames, so as to establish and maintain a trusted synchronization domain.

[0050] The infrared transmitting unit is used to broadcast infrared coded frames carrying synchronization commands and radio frequency channel tags to multiple synchronization devices.

[0051] The infrared receiving unit is used to receive infrared encoded frames and generate a synchronization event after performing fixed identification, synchronization command, radio frequency channel tag and integrity verification on the infrared encoded frames.

[0052] The high-precision timer is used to provide a local timestamp when receiving an infrared encoded frame and to determine the common execution time based on the air interface time of the infrared encoded frame.

[0053] The synchronization event queue module is used to cache the synchronization events and send the synchronization events to the synchronization control state machine;

[0054] The synchronization control state machine is used to perform cross-verification of infrared channel tags and radio frequency working channels, calculation of common execution time, execution of synchronization commands and updating of synchronization control state according to the synchronization events in the synchronization event queue module, and to perform online verification and anomaly recovery through the radio frequency link maintenance device.

[0055] The radio frequency transceiver module is used to determine the devices participating in the synchronization and the state of the trusted synchronization domain, while the infrared transmitting unit and the infrared receiving unit are used to determine the common execution time of the synchronization operation.

[0056] The synchronous control state machine includes:

[0057] The synchronization control task module is used to read synchronization events from the synchronization event queue module and control the business execution unit to perform synchronization operations according to the common execution time.

[0058] The business execution unit is at least one of the following: camera, microphone, inertial sensor, tactile sensor, angle sensor, storage device, and actuator;

[0059] The present invention has the following beneficial effects and advantages:

[0060] 1. This invention combines radio frequency coarse synchronization with infrared fine synchronization. The radio frequency link is used to establish and maintain a reliable synchronization domain, and the infrared link is used to determine the common execution time. This enables scalable synchronous start and synchronous stop without the need for devices to share a wired clock.

[0061] 2. The present invention uses the physical frame start reference time of the infrared encoded frame as a benchmark and superimposes a unified preset protection delay to obtain a common execution time, which can absorb the differences between different devices in infrared decoding, task scheduling and service startup preparation, and improve the consistency of execution time of multiple devices.

[0062] 3. This invention improves synchronization reliability by using channel tag cross-checking, online valid window, local echo shielding, duplicate frame deduplication, and integrity verification to suppress repeated execution caused by mis-triggered devices from different channels, local echoes, duplicate frames, and simultaneous decoding by multiple receiver heads.

[0063] 4. This invention uses an event queue and an idempotent state machine to isolate infrared reception callbacks and time-consuming service operations, and performs state management for synchronous start-up, synchronous stop-up and abnormal recovery, avoiding repeated creation or release of resources. It is suitable for collaborative scenarios of multiple cameras, multiple sensors and wearable acquisition devices with one master and multiple slaves. Attached Figure Description

[0064] Figure 1 This is a schematic diagram of the overall architecture of the dual-synchronous multi-device system of the present invention.

[0065] Figure 2 This is a flowchart of the dual synchronization method of the present invention.

[0066] Figure 3 This is a timing diagram illustrating how the present invention determines the common execution time based on the infrared frame air interface time.

[0067] Figure 4 This is a schematic diagram of the synchronous control state machine of the device of the present invention. Detailed Implementation

[0068] The following description, with reference to the accompanying drawings, uses an embedded acquisition device as an example to illustrate a complete embodiment of the present invention. This embodiment is used to explain the technical principles of the present invention and is not intended to limit the radio frequency band, chip model, infrared carrier frequency, number of devices, or specific service type. This embodiment unfolds in the following stages, each stage belonging to the same complete synchronous process and not constituting multiple independent embodiments.

[0069] The overall flow of this embodiment is as follows:

[0070] S1: Configure device identifiers, device roles, synchronization group identifiers, and radio frequency working channels for multiple devices to be synchronized; calibrate the RTC module; use the calibrated RTC time as a common time reference; and initialize the radio frequency transceiver module, infrared transceiver module, high-precision timer, synchronization event queue module, synchronization control state machine, and service execution unit of each device to be synchronized.

[0071] S2: Each device to be synchronized periodically exchanges radio frequency status information through the radio frequency link, and verifies the device role, radio frequency working channel, communication validity and data integrity of the corresponding device based on the received radio frequency status information. When the preset verification conditions are met, the valid verification status of the corresponding device is established to form a trusted synchronization domain.

[0072] S3: When a synchronization operation request is generated, the sending end device to be synchronized determines whether the synchronization operation conditions are met based on its own radio frequency synchronization status and the trusted synchronization domain status. If the synchronization operation conditions are met, an infrared encoded frame carrying a synchronization command and radio frequency channel tag is generated and broadcast to the receiving end device to be synchronized in the trusted synchronization domain through the infrared link.

[0073] S4: Each receiving end device to be synchronized receives the infrared encoded frame, decodes and verifies the integrity of the infrared encoded frame, and cross-verifies the radio frequency channel tag in the infrared encoded frame with the current radio frequency working channel of the device. After the verification is successful, a corresponding synchronization event is generated.

[0074] S5: When the receiving end device to be synchronized completes the reception of the infrared encoded frame, it records the local high-precision timestamp, determines the physical frame start reference time of the infrared encoded frame based on the air interface time of the infrared encoded frame, and adds a preset protection delay to the physical frame start reference time to obtain the common execution time corresponding to the synchronization operation.

[0075] S6: Each device to be synchronized determines whether the common execution time has been reached based on its local high-precision timer. When the common execution time is reached, it executes the corresponding business operation synchronously according to the synchronization command, and updates the synchronization control status after the synchronization operation is completed. It continues to maintain online verification and abnormal recovery of the device through the radio frequency link.

[0076] The above steps S1 to S6 are the overall steps of this embodiment. The following describes the above overall steps in detail with reference to system composition, radio frequency coarse synchronization, infrared fine synchronization, joint execution time calculation, synchronization control state machine and multi-device expansion.

[0077] (I) System Composition and Initialization

[0078] like Figure 1 As shown, in step S1, each device to be synchronized includes a main controller, an RF transceiver module, an infrared transmitting unit, an infrared receiving unit, a high-precision timer, a synchronization event queue module, a synchronization control state machine, and a service execution unit. The main controller can be a microcontroller with a real-time operating system and hardware timers; the RF transceiver module can be a sub-GHz module with serial transparent transmission or packet transmission; the infrared transceiver unit can use 38kHz carrier modulation and generate and capture pulses by hardware remote control peripherals; the high-precision timer is used to provide microsecond-level local timestamps; the synchronization event queue module is used to buffer synchronization events generated by infrared reception callbacks; the synchronization control state machine includes a synchronization control task module, used to complete cross-checking, common execution time calculation, synchronization command execution, and state updates; the service execution unit can be at least one of a camera, microphone, inertial sensor, tactile sensor, angle sensor, storage device, or actuator.

[0079] After the device starts up, it configures a unique device identifier, device role, synchronization group identifier, and RF working channel for each device to be synchronized. Device roles include master device role and slave device role, and may also include left / right roles. It initializes the RF transceiver module, infrared transceiver module, high-precision timer, synchronization event queue module, synchronization control state machine, and service execution unit for each device to be synchronized. The RF transceiver module is set to packet receiving mode, and an RF synchronization daemon task is created.

[0080] (II) Establishment of Radio Frequency Coarse Synchronization and Trusted Synchronization Domain

[0081] Each device to be synchronized periodically exchanges radio frequency status information through the radio frequency link. In step S2 of this embodiment, the radio frequency status frame adopts a fixed length of 16 bytes, and its format is shown in Table 1.

[0082] Table 1. Examples of Radio Frequency Status Frames

[0083] Byte position Fields effect 0—1 Frame header Fixed identifiers are used to locate candidate frames from a continuous byte stream. 2 Protocol version Used for protocol compatibility verification 3 Frame type Indicates heartbeat, authorization, or extended control type. 4 Equipment Role For example, master / slave or left / right device roles 5 Radio frequency channel Cross-checking with channel labels in infrared frames 6 Serial Number Used for activity detection and extended deduplication. 7—13 Reserved fields Scalable synchronization groups, capability bits, or state summaries 14 CRC8 Perform integrity checks on the aforementioned fields. 15 Frame end Fixed termination mark

[0084] Each device to be synchronized periodically transmits the aforementioned status frames via the radio frequency link. To avoid continuous collisions between master and slave devices with the exact same period, different device roles use different radio frequency status frame transmission periods that are not integer multiples of each other. For example, the master device role uses a transmission period of 911ms, and the slave device role uses a transmission period of 1217ms. The above values ​​are only examples, and other periods can be selected according to the number of devices and duty cycle.

[0085] The receiving end uses a sliding window to locate candidate state frames in the continuous byte stream received from the RF link. Each input byte attempts to verify a candidate frame; if verification is successful, the peer's role, RF operating channel, and latest reception time are recorded; if verification fails, the window slides forward one byte. The online time of the corresponding peer device is updated only when the frame header, protocol version, frame type, RF operating channel, and cyclic redundancy check value of the state frame all meet the validity conditions. The peer is marked as valid only when the local device does not have a channel to switch to and the peer's channel is consistent with the local device's channel. In this embodiment, the online validity window is set to 15 seconds; if no valid state frame is received within this window, the trusted synchronization domain status of the corresponding peer device is revoked. This forms a trusted synchronization domain with a validity period.

[0086] When the radio frequency (RF) working channel of the device to be synchronized changes, the RF synchronization status is first set to "channel pending switch," the existing valid authentication status of the peer device is revoked, and the generation of new valid status information and synchronization authorization is paused. After the RF transceiver module completes the RF working channel switch, it updates its current RF working channel and re-receives and verifies the peer device's status frame based on the switched RF working channel to re-establish the trusted synchronization domain. If the RF working channel switch fails, the "channel pending switch" status is revoked, and synchronization operation remains off. This two-stage switching avoids accepting synchronization events when the displayed channel, software channel, and actual channel of the RF module are inconsistent.

[0087] In a master-slave synchronization scenario, the sending end determines the authorization conditions for the synchronization operation based on the valid status of the multiple slave devices. These authorization conditions include at least one of the following: all specified nodes are online, at least one authorized node is online, or the number of online nodes reaches a preset threshold.

[0088] (III) Infrared precision synchronization triggering and reception verification

[0089] In step S3 of this embodiment, when a user presses a key, receives a host computer command, or other service event generates a synchronization operation request, the transmitting end device to be synchronized first determines whether its local radio frequency working channel is in a channel switching state, and determines whether the trusted synchronization domain is valid according to a preset strategy. When the synchronization operation conditions are met, the transmitting end generates an infrared coded frame. In this embodiment, the infrared coded frame uses a 38kHz infrared carrier with a carrier duty cycle of approximately 33% and a pulse timing resolution of 1μs. The infrared coded frame consists of a frame header symbol and 32 data bits, which are sent byte by byte. The frame header uses a 500μs marker plus a 2000μs interval; each data bit uses a 500μs marker, and logic 0 and logic 1 use 500μs and 1500μs intervals, respectively. The field format of the infrared coded frame is shown in Table 2.

[0090] Table 2 Examples of Infrared Synchronization Frames

[0091] Location Fields illustrate 1st byte Fixed sign For example, 0xA5 is used to quickly exclude infrared signals that are not part of this protocol. 2nd byte command code Start command or stop command 3rd byte Channel label The value is consistent with the radio frequency active channel. 4th byte Integrity verification Calculated from fixed identifier, command code, channel label and check constant

[0092] The transmitting end modulates the infrared coded frame with an infrared carrier and simultaneously transmits it from at least two infrared transmitters facing different directions to broadcast the infrared coded frame to multiple receiving devices to be synchronized. The same infrared coded frame is transmitted at least twice consecutively, with an interval between adjacent transmissions to improve reception success rate. Multiple infrared transmitters facing different directions are simultaneously started by the same hardware synchronization manager; when the hardware synchronization manager is unavailable, multiple infrared transmitters are started in a continuous submission manner without interfering with other tasks. After completing the transmission of the infrared coded frame, the transmitting end sets a local transmission echo shielding window, which in this embodiment is, for example, 250ms. Within the local transmission echo shielding window, the transmitting end ignores the echo signal generated by its own infrared transmission to avoid false triggering of local echo formation.

[0093] The receiving end, the device to be synchronized, receives infrared encoded frames through at least two infrared receivers facing different directions. A synchronization event is generated after any infrared receiver completes decoding of a valid infrared encoded frame. The receiving end sequentially checks the fixed identifier, command code range, channel tag range, and integrity check value of the infrared encoded frame, and cross-checks the channel tag with its current radio frequency (RF) operating channel. Specifically: when the RF operating channel is in a channel switching state, the channel tag is inconsistent with the local RF operating channel, or the infrared encoded frame integrity check fails, the corresponding synchronization event is rejected; when the check passes, a duplicate frame deduplication window is set for the same command and the same channel tag. In this embodiment, this window is, for example, 300ms. Within the duplicate frame deduplication window, for duplicate receptions or the same synchronization event generated simultaneously by multiple infrared receivers, only the first valid event is retained, and this first valid event is used as the synchronization event for subsequent processing.

[0094] (iv) Calculation of the time of joint execution

[0095] like Figure 3 As shown, the receiver records the reception timestamp using a local high-precision timer when the infrared encoded frame decoding is complete. The air interface time of the infrared coded frame is obtained by accumulating the marking duration and interval duration of the received infrared symbols. The receiving end uses the received timestamp minus the air interface time to reconstruct the physical frame start reference time of the infrared encoded frame: Then, a preset protection delay is superimposed on the physical frame start reference time to obtain the common execution time:

[0096]

[0097] in, The physical frame start reference time, For the time of joint execution, This is the local timestamp used by the receiving end when it completes the reception of the infrared encoded frame. The air interface time of the infrared encoded frame is accumulated based on the marking duration and interval duration of the received infrared symbols, and Δ is the preset protection delay.

[0098] The preset protection delay Δ is greater than the worst-case time consumed by infrared coded frame transmission, reception decoding, event queuing, control task wake-up, and service startup preparation. In this embodiment, Δ is set to 100ms. The transmitting end uses the local time at which it begins transmitting the infrared coded frame as the frame start reference time, and adds the same preset protection delay as the receiving end to determine the local common execution time. The impact of propagation distance on common short-range multi-device applications is negligible relative to task scheduling time; for longer distance or higher precision scenarios, Δ or Δ can be increased. Further device calibration compensation values ​​are added. If the time between execution and the start of execution is long, the control task first uses an operating system delay to yield the processor; if the remaining time is less than a preset threshold, then task yielding or high-precision waiting is used to balance synchronization accuracy and processor usage.

[0099] (v) Synchronous control state machine and synchronous start / stop

[0100] like Figure 4As shown, the device synchronization control state machine sequentially goes through initialization, waiting for RF verification, synchronization ready, start waiting, task execution, and stop processing states. Synchronization events are written to a fixed-length event queue by the infrared receiver callback and notify high-priority control tasks. Control tasks complete cross-checking and state transitions in the order of events, avoiding direct file creation, camera startup, or storage resource release during hardware receiver callbacks. If a start command is received again during task execution, it returns directly; if a stop command is received outside of task execution, it returns directly; if any duplicate switching command is received during stop processing, resources are not released again. If no storage medium is detected at startup, device resources are insufficient, or service startup fails, the start waiting state is canceled and the device returns to the synchronization ready or waiting for RF verification state. This idempotent processing ensures that duplicate infrared frames and concurrent local key presses do not lead to duplicate creation or destruction of service sessions.

[0101] During synchronization startup, the transmitting device checks the storage medium, acquisition peripherals, and RF synchronization domain status. Upon meeting the synchronization startup conditions, it sends a synchronization start infrared encoded frame and enters a startup waiting state. The receiving device, after receiving the infrared encoded frame and performing channel cross-checking, enters the startup waiting state and creates an acquisition session during the co-execution time to synchronously start data recording from at least one of the dual-camera video, inertial sensor, tactile sensor, and angle sensor, saving the data with the same session number. During synchronization stop, the transmitting device sends a synchronization stop infrared encoded frame and enters a stop processing state; the receiving device accepts the synchronization stop command through the same channel cross-checking and stops the corresponding service execution unit or performs resource reclamation. Before resource closure is complete, the system rejects new synchronization start commands to prevent race conditions between the file system, camera stream, and sensor tasks. When a device is in a task execution state and receives a repeat start command, it maintains the original task execution state; when a device is not in a task execution state and receives a stop command, it maintains the current state; when a device is in a stop processing state and receives a repeat switch command, it does not repeatedly release resources. When the RF heartbeat times out while the device is performing a task, the existing task is allowed to continue running, and new synchronization startup is prohibited. When there is RF channel inconsistency, infrared frame verification failure, a full event queue, or state machine conflict, diagnostic information is recorded and the original state is maintained. After synchronization is completed, online verification is maintained via RF status frames, and anomaly recovery is performed.

[0102] (vi) Multi-device expansion and implementation parameters

[0103] In a master-slave scenario, the RF status frame can include a synchronization group identifier and device short address in the reserved fields, and the master device maintains an online bitmap of devices within the group; the infrared frame is still broadcast. The valid peer determination can be set to "at least one authorized node is online," "all specified nodes are online," or "the number of online nodes has reached a threshold." Different synchronization groups can use different RF channels, different infrared channel tags, or different fixed identifiers to reduce crosstalk between adjacent systems. The system can also send a synchronization result summary via RF so that the master device can confirm whether each slave device has started or stopped, but this result summary does not change the principle that the infrared link is the common source of execution time.

[0104] Typical implementation parameters for this embodiment are shown in Table 3.

[0105] Table 3 Example of Implementation Parameters

[0106] parameter Example value illustrate RF status frame length 16 bytes Expandable by synchronization group size RF role transmission cycle 911 ms / 1217 ms Use non-integer multiples of the period to reduce persistent collisions RF peer effective window 15 s Prevent new synchronous startups after timeout. Infrared carrier 38 kHz, approximately 33% duty cycle Adjustable according to infrared device Infrared data length 32-bit Fixed identifier, command, channel, verification Infrared repetition count 2 times Set a guard interval between two frames Local echo shielding window 250 ms To prevent local transmission from being received by local machine Duplicate Frame Deduplication Window 300 ms Avoid repeated execution Synchronous start protection delay Δ 100 ms It should cover the worst-case scheduling and preparation time.

[0107] Therefore, this embodiment establishes a trusted synchronization domain through a radio frequency link, transmits synchronization commands through an infrared link, and determines the common execution time. The receiving end uses the physical start reference time of the infrared frame as a benchmark, calculates the common execution time, and ensures the reliability and consistency of synchronization through channel tag cross-checking, local echo shielding, duplicate frame deduplication, and an idempotent state machine. This embodiment achieves synchronized start and stop of multiple devices without relying on wired clocks between devices, and is suitable for collaborative terminals such as multi-camera, multi-sensor, and wearable data acquisition devices.

[0108] In summary, based on the above embodiments, this invention combines radio frequency coarse synchronization with infrared fine synchronization: the radio frequency link is used for device identity, working channel, and online status verification to form a reliable synchronization domain with a validity period; the infrared link is used to transmit synchronization commands and determine the common execution time. This invention uses the physical start reference time of the infrared frame as a benchmark and superimposes a unified preset protection delay, which can absorb differences in decoding, task scheduling, and service startup preparation among different devices; simultaneously, through channel tag cross-checking, online effective window, local echo shielding, duplicate frame deduplication, and idempotent state machine, it reduces the probability of false triggering and repeated execution. This invention does not require multiple devices to share a wired clock, can be extended to a master-slave scenario, and is suitable for multiple cameras, multiple sensors, wearable acquisition devices, and other collaborative execution terminals.

[0109] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Clearly, those skilled in the art can make various alterations and variations to the invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of equivalents of the invention, the invention is also intended to include these modifications and variations.

Claims

1. A method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization, characterized in that, Includes the following steps: Step S1: Configure device identifiers, device roles, synchronization group identifiers, and radio frequency working channels for multiple devices to be synchronized; calibrate the RTC module; use the calibrated RTC time as a common time reference; and initialize the radio frequency transceiver module, infrared transceiver module, high-precision timer, synchronization event queue module, and synchronization control state machine of each device to be synchronized. Step S2: Each device to be synchronized periodically exchanges radio frequency status information through the radio frequency link, and verifies the device role, radio frequency working channel, communication validity and data integrity of the corresponding device based on the received radio frequency status information. When the preset verification conditions are met, the valid verification status of the corresponding device is established to form a trusted synchronization domain. Step S3: When a synchronization operation request is generated, the sending end device to be synchronized determines whether the synchronization operation conditions are met based on its own radio frequency synchronization status and the trusted synchronization domain status. If the synchronization operation conditions are met, an infrared encoded frame carrying a synchronization command and radio frequency channel tag is generated and broadcast to the receiving end device to be synchronized in the trusted synchronization domain through the infrared link. Step S4: Each receiving end device to be synchronized receives the infrared encoded frame, decodes and verifies its integrity, and cross-verifies the radio frequency channel tag in the infrared encoded frame with its current radio frequency working channel. After the verification is successful, a corresponding synchronization event is generated. Step S5: When the receiving end device to be synchronized completes the reception of the infrared encoded frame, it records the local high-precision timestamp, determines the physical frame start reference time of the infrared encoded frame based on the air interface time of the infrared encoded frame, and adds a preset protection delay to the physical frame start reference time to obtain the common execution time corresponding to the synchronization operation. Step S6: Each device to be synchronized determines whether the common execution time has been reached based on its local high-precision timer. When the common execution time is reached, it executes the corresponding business operation synchronously according to the synchronization command, and updates the synchronization control status after the synchronization operation is completed. It continues to maintain online verification and anomaly recovery of the device through the radio frequency link.

2. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 1, characterized in that, Step S2 includes the following steps: Step S2-1: Each device to be synchronized periodically sends a status frame through the radio frequency link; The status frame includes: frame header, protocol version, frame type, device role, radio frequency operating channel, frame sequence number, cyclic redundancy check (CRC) value, and frame tail. Step S2-2: The receiving end uses a sliding window to locate candidate state frames in the continuous byte stream received by the radio frequency link, and verifies the state frames in sequence; Step S2-3: When the frame header, protocol version, frame type, radio frequency working channel and cyclic redundancy check value of the status frame all meet the validity conditions, update the online time of the corresponding end device and maintain the valid status of the end device according to the online time; Step S2-4: When the time since the most recent valid state frame exceeds the preset online valid window, cancel the trusted synchronization domain state of the corresponding end device.

3. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 2, characterized in that, Different device roles use different radio frequency status frame transmission periods, and the radio frequency status frame transmission periods corresponding to different device roles are not integer multiples of each other, in order to reduce the probability of continuous communication collisions when multiple devices to be synchronized transmit radio frequency status frames in a cycle. The trusted synchronization domain is maintained based on the effective status of the devices to be synchronized within the synchronization group. In a master-slave synchronization scenario, the sending end determines the authorization conditions for the synchronization operation based on the effective status of multiple slave devices. The authorization conditions include at least one of the following: the specified device is online, the authorized node is online, or the number of online devices reaches a preset threshold.

4. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 2, characterized in that, Step S2 further includes radio frequency operating channel switching processing, specifically: When the radio frequency operating channel of the device to be synchronized changes, the radio frequency synchronization status is set to the channel switching status, the existing valid verification status of the peer device is revoked, and the generation of new valid status information and synchronization authorization is suspended. After the RF transceiver module completes the RF working channel switching, it updates the current RF working channel of the local device, and re-receives and verifies the status frame of the peer device based on the switched RF working channel in order to re-establish the trusted synchronization domain. When the RF working channel switching fails, the channel switching status is canceled and synchronization operation is kept off.

5. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 1, characterized in that, Step S3 includes the following steps: Step S3-1: When a synchronization operation request is generated by user key press, host computer command or other service event, the sending end device to be synchronized determines whether its local radio frequency working channel is in the channel switching state, and determines whether the trusted synchronization domain is valid according to the preset strategy; when the synchronization operation conditions are met, an infrared coded frame is generated. The infrared coded frame includes: a fixed identifier, a synchronization command, a channel tag, and an integrity check value; Step S3-2: Modulate the infrared coded frame with an infrared carrier and transmit it synchronously by at least two transmitters facing different infrared transmitters to broadcast the infrared coded frame to multiple receivers to be synchronized. Step S3-3: The same infrared coded frame is sent at least twice consecutively, with an interval set between the two adjacent transmissions; multiple infrared transmitters facing different directions are started simultaneously by the same hardware synchronization manager; when the hardware synchronization manager is unavailable, multiple infrared transmitters are started in a manner that submits continuously without interfering with other tasks; Step S3-4: After the transmitting end completes the transmission of the infrared encoded frame, it sets the local transmission echo shielding window. Within the local transmission echo shielding window, the echo signal generated by the local infrared transmission is ignored, so as to improve the reception reliability of infrared synchronization operation and avoid false triggering of local echo formation.

6. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 1, characterized in that, Step S4 includes the following steps: Step S4-1: The receiving end device to be synchronized receives infrared encoded frames through at least two infrared receiver heads facing different directions; Step S4-2: A synchronization event is generated after any infrared receiver head completes the decoding of a valid infrared encoded frame; Step S4-3: Sequentially check the fixed identifier, command code range, channel tag range, and integrity check value of the infrared coded frame, and cross-check the channel tag with the current radio frequency operating channel of the machine, that is: a) When the radio frequency working channel is in the channel switching state, the channel tag is inconsistent with the local radio frequency working channel, or the infrared encoded frame integrity verification fails, the corresponding synchronization event is rejected. b) When the verification passes, a duplicate frame deduplication window is set for the same command and the same channel label. Within the duplicate frame deduplication window, for duplicate reception or the same synchronization event generated by multiple infrared receivers at the same time, only the first valid event is retained, and the first valid event is used as the synchronization event for subsequent processing.

7. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 1, characterized in that, Step S5 includes the following steps: Step S5-1: When the infrared encoded frame is decoded, the receiving end records the receiving timestamp through a local high-precision timer, and accumulates the air interface time of the infrared encoded frame according to the marking duration and interval duration of the received infrared symbols. Step S5-2: Calculate the physical frame start reference time of the infrared encoded frame by subtracting the air interface time from the received timestamp. Then, a preset protection delay is superimposed on the physical frame start reference time to obtain the common execution time: ; in, For the time of joint execution, This is the local timestamp used by the receiving end when it completes the reception of the infrared encoded frame. The air interface time of the infrared coded frame is calculated by accumulating the marking duration and interval duration of the received infrared symbols. Preset protection delay; The preset protection delay is greater than the worst-case time consumed by infrared encoded frame transmission, reception and decoding, event queuing, control task wake-up, and service startup preparation. Step S5-3: The transmitting end uses the local time when it starts sending infrared encoded frames as the frame start reference time, and adds the same preset protection delay as the receiving end to determine the local common execution time.

8. The method for implementing multi-device synchronization technology based on infrared radio frequency dual synchronization according to claim 1, characterized in that, In step S6, the synchronization command includes: synchronization start, synchronization stop, and exception recovery; wherein, upon reaching the common execution time, the corresponding business operations are synchronously executed according to the synchronization command, specifically: Step S6-1: During synchronization startup, the transmitting end device to be synchronized checks the storage medium, acquisition peripherals, and RF synchronization domain status. After meeting the synchronization startup conditions, it sends a synchronization start infrared encoding frame and enters the startup waiting state. The receiving end device to be synchronized enters the startup waiting state after completing the infrared encoding frame reception and channel cross-verification. At the common execution time, it creates an acquisition session to synchronously start data recording of at least one of the dual-camera video, inertial sensor, tactile sensor, and angle sensor, and saves it with the same session number. Step S6-2: When synchronization stops, the transmitting end device to be synchronized sends a synchronization stop infrared encoded frame and enters the stop processing state. The receiving end device to be synchronized accepts the synchronization stop command through the same channel cross-check and stops the corresponding service execution unit or performs resource reclamation. Before the resource shutdown is completed, it rejects the new synchronization start command. Step S6-3: When the device is in a task execution state and receives a repeat start command, it maintains the original task execution state. When the device is in a non-task execution state and receives a stop command, it maintains the current state. When the device is in a stopped processing state and receives a repeat switch command, it does not release resources repeatedly. When a storage medium is missing, device resources are insufficient, or service startup fails during startup, the startup waiting state is revoked and the device is restored to the synchronization ready state or the waiting RF verification state. When the RF heartbeat times out while the device is executing a task, the existing task is allowed to continue running and new synchronization startup is prohibited. When the RF channel is inconsistent, the infrared frame verification fails, the event queue is full, or the state machine conflicts, diagnostic information is recorded and the original state is maintained. After the synchronization operation is completed, online verification is maintained through the RF status frame, and anomaly recovery is performed.

9. A multi-device synchronization system based on infrared radio frequency dual synchronization, characterized in that, It includes multiple synchronization devices, which include: a main controller and connected to it a radio frequency transceiver module, an infrared transmitting unit, an infrared receiving unit, a high-precision timer, a synchronization event queue module, and a synchronization control state machine; The radio frequency transceiver module is used to exchange radio frequency status frames between multiple synchronization devices, and to verify the device role, radio frequency working channel and online status of the synchronization devices based on the radio frequency status frames, so as to establish and maintain a trusted synchronization domain. The infrared transmitting unit is used to broadcast infrared coded frames carrying synchronization commands and radio frequency channel tags to multiple synchronization devices. The infrared receiving unit is used to receive infrared encoded frames and generate a synchronization event after performing fixed identification, synchronization command, radio frequency channel tag and integrity verification on the infrared encoded frames. The high-precision timer is used to provide a local timestamp when receiving an infrared encoded frame and to determine the common execution time based on the air interface time of the infrared encoded frame. The synchronization event queue module is used to cache the synchronization events and send the synchronization events to the synchronization control state machine; The synchronization control state machine is used to perform cross-verification of infrared channel tags and radio frequency working channels, calculation of common execution time, execution of synchronization commands and updating of synchronization control state according to the synchronization events in the synchronization event queue module, and to perform online verification and anomaly recovery through the radio frequency link maintenance device. The radio frequency transceiver module is used to determine the devices participating in the synchronization and the state of the trusted synchronization domain, while the infrared transmitting unit and the infrared receiving unit are used to determine the common execution time of the synchronization operation.

10. A multi-device synchronization system based on infrared radio frequency dual synchronization according to claim 9, characterized in that, The synchronous control state machine includes: The synchronization control task module is used to read synchronization events from the synchronization event queue module and control the business execution unit to perform synchronization operations according to the common execution time. The business execution unit is at least one of a camera, microphone, inertial sensor, tactile sensor, angle sensor, storage device, and actuator.