Method for determining master equipment information and related device

By receiving and analyzing synchronization beacon messages and using device parameters and identifiers to select the master device, the problem of master device conflict in communication systems without fixed timing references is solved, ensuring stable synchronization of system timing.

CN121815395APending Publication Date: 2026-04-07HYTERA COMM CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In communication systems without a fixed timing reference, devices may select different master devices due to movement, leading to master device conflicts and affecting the stability of timing synchronization.

Method used

By receiving and analyzing synchronization beacon messages, and using parameters such as device type, location, power, battery capacity, and standby time, a comprehensive score or device identifier is determined, a master device is selected, and the master device for system timing synchronization is established through synchronization beacon correction messages, thus resolving master device conflicts.

Benefits of technology

This enables devices in different communication coverage areas to share a single master device information, ensuring stable timing and avoiding interference between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815395A_ABST
    Figure CN121815395A_ABST
Patent Text Reader

Abstract

The invention discloses a method for determining master equipment information and a related device. The first device receives a synchronization beacon message sent by the second device, wherein the synchronization beacon message carries second master device information recorded by the second device; the first equipment determines third main equipment information according to first main equipment information and second main equipment information of the first equipment, and the current main equipment information of the first equipment is the third main equipment information; when the third master device information is the first master device information, the first device sends a synchronization beacon correction message, the synchronization beacon correction message carries the third master device information, so that the second device and the first device are synchronized, and the master device information of the second device is confirmed to be the third master device information; and when the third main equipment information is the second main equipment information, the first equipment is synchronized with the second equipment according to the synchronization beacon message, so that one piece of main equipment information is determined from the multiple pieces of main equipment information, the problem of conflict of the main equipment is solved, and stable diffusion of a time sequence is further guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, and in particular to a method for determining master device information and related apparatuses. BACKGROUND

[0002] In a communication system without fixed timing reference, devices can use a direct mode (DMO) to communicate directly with each other. Because the communication system without fixed timing reference does not provide a base station device providing a reference timing, devices in the communication system without fixed timing reference can select a master device to synchronize timing based on master device information of the master device. However, devices in different coverage areas can select different master devices, and a master device conflict can occur as the devices move. SUMMARY

[0003] In view of the above problems, the present application provides a method for determining master device information and related apparatuses to solve the problem of master device conflict. The specific solutions are as follows:

[0004] A first aspect of the present application provides a method for determining master device information, applied to a first device, master device information of the first device being first master device information, and the method comprising:

[0005] The first device receives a synchronization beacon message sent by a second device, the synchronization beacon message carrying second master device information recorded by the second device;

[0006] The first device determines third master device information based on the first master device information and the second master device information, and current master device information of the first device being the third master device information;

[0007] When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, the synchronization beacon correction message carrying the third master device information, to synchronize the second device with the first device and confirm that master device information of the second device is the third master device information, the synchronization beacon correction message being a response message of the synchronization beacon message, and the third master device information being master device information for system timing synchronization;

[0008] When the third master device information is the second master device information, the first device synchronizes with the second device based on the synchronization beacon message.

[0009] A second aspect of the present application provides a method for determining master device information, applied to a second device, master device information of the second device being second master device information, and the method comprising:

[0010] The second device sends a synchronization beacon message to the first device. The synchronization beacon message carries the second master device information recorded by the second device, and the master device information of the first device is the first master device information.

[0011] The second device receives a synchronization beacon correction message sent by the first device. The synchronization beacon correction message carries third master device information, which is determined by the first device based on the first master device information and the second master device information.

[0012] The second device synchronizes with the first device based on the synchronization beacon correction message, and changes the master device information of the second device to the third master device information, which is the master device information for system timing synchronization.

[0013] A third aspect of this application provides an apparatus comprising at least one processor and a memory connected to the processor, wherein:

[0014] The memory is used to store computer programs;

[0015] The processor is used to execute the computer program so that the device can implement the above-described method for determining master device information.

[0016] A fourth aspect of this application provides a computer program product including computer-readable instructions that, when executed on a device, cause the device to perform the aforementioned method for determining master device information.

[0017] A fifth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by a device, enable the device to perform the aforementioned method for determining master device information.

[0018] A sixth aspect of this application provides an apparatus for determining master device information, applied to a first device, wherein the master device information of the first device is first master device information, the apparatus comprising:

[0019] The receiving unit is configured to receive a synchronization beacon message sent by the second device, wherein the synchronization beacon message carries second master device information recorded by the second device;

[0020] The determining unit is configured to determine third master device information based on the first master device information and the second master device information, wherein the current master device information of the first device is the third master device information;

[0021] The sending unit is configured to, when the third master device information is the first master device information, have the first device send a synchronization beacon correction message, wherein the synchronization beacon correction message carries the third master device information, so as to synchronize the second device with the first device, and to confirm that the master device information of the second device is the third master device information, wherein the synchronization beacon correction message is a response message to the synchronization beacon message, and the third master device information is the master device information for system timing synchronization;

[0022] A synchronization unit is used to synchronize the first device with the second device based on the synchronization beacon message when the third master device information is the second master device information.

[0023] A seventh aspect of this application provides an apparatus for determining master device information, applied to a second device, wherein the master device information of the second device is second master device information, the apparatus comprising:

[0024] A sending unit is configured to send a synchronization beacon message to a first device, wherein the synchronization beacon message carries second master device information recorded by the second device, and the master device information of the first device is first master device information.

[0025] A receiving unit is configured to receive a synchronization beacon correction message sent by the first device, wherein the synchronization beacon correction message carries third master device information, which is determined by the first device based on the first master device information and the second master device information;

[0026] The synchronization unit is used to synchronize with the first device based on the synchronization beacon correction message, and to change the master device information of the second device to the third master device information, wherein the third master device information is the master device information for system timing synchronization.

[0027] Using the above technical solution, the first device receives a synchronization beacon message sent by the second device, which carries the second master device information recorded by the second device. Based on its own first and second master device information, the first device determines the third master device information, and the first device's current master device information is the third master device information. When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, which carries the third master device information, to synchronize the second device with the first device and confirm that the second device's master device information is the third master device information. The synchronization beacon correction message is a response message to the synchronization beacon message, and the third master device information is the master device information for system timing synchronization. When the third master device information is the second master device information, the first device synchronizes with the second device based on the synchronization beacon message, thus determining one master device information from multiple master device information, resolving the master device conflict problem, and ensuring the stable propagation of timing information. Attached Figure Description

[0028] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0029] Figure 1 A schematic diagram illustrating a primary device conflict occurring in two communication coverage areas provided in this application;

[0030] Figure 2 A signaling diagram for a method of determining master device information provided in this application;

[0031] Figure 3 Another signaling diagram for a method of determining master device information provided in this application;

[0032] Figure 4 Another signaling diagram for a method of determining master device information provided in this application;

[0033] Figure 5 This is a schematic diagram of the TDMA frame structure provided in this application;

[0034] Figure 6 A flowchart illustrating the first device provided in this application that uses a "first-come, first-served" approach to select the master device;

[0035] Figure 7 A flowchart illustrating the designation of the second device provided in this application as the main device;

[0036] Figure 8 The timing diagram for competing for the master device using a "first-come, first-served" approach;

[0037] Figure 9 A flowchart for master device selection when there is no master device and the device types are different, provided for this application;

[0038] Figure 10 This is a timing diagram for different device types competing for the master device when there is no master device.

[0039] Figure 11 A flowchart illustrating the master device selection process when the master beacon timing ID is different when a master device is present, as provided in this application.

[0040] Figure 12 A flowchart for master device selection when there is a master device and the device types and master beacon timing IDs are the same, provided for this application;

[0041] Figure 13A flowchart for selecting the master device when the device type values ​​are different when there is a master device, as provided in this application;

[0042] Figure 14 A schematic diagram before the main equipment conflict is resolved;

[0043] Figure 15 A schematic diagram showing the resolution of conflicts with the main equipment.

[0044] Figure 16 The signaling diagram provided in this application for competing master devices during master device deregistration;

[0045] Figure 17 A schematic diagram of a device for determining master equipment information provided in this application;

[0046] Figure 18 A schematic diagram of another device for determining master equipment information provided in this application. Detailed Implementation

[0047] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0048] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0049] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0050] The applicant discovered through research that in a communication system without a fixed timing reference using DMO (hereinafter referred to as the communication system), the channel does not have a fixed time slot timing, that is, the communication system without a fixed timing reference does not provide a reference timing, such as wireless communication systems using DMR (Digital Mobile Radio) or PDT (Police Digital Trunking) standards that use direct-mode DMO.

[0051] Because communication systems without a fixed timing reference do not provide a reference timing, devices typically rely on the LBT (listen before transmit) principle. By listening to services on a specified frequency point, they determine the channel timing so that they can participate in services on channels with existing services, initiate new services in idle time slots on the channel, or initiate services using their own timing when no services are detected.

[0052] To ensure that devices in a communication system follow the same baseline timing, a device needs to be selected as the master device. The master device periodically sends synchronization beacon broadcasts during idle time slots. After receiving the synchronization beacon broadcasts sent by the master device, all slave devices synchronize their own timing with the master device's timing. Slave devices can forward synchronization beacons during idle time slots, thus achieving the effect of timing diffusion through synchronization beacon forwarding.

[0053] If a device powers on or switches to a new channel, and there is no fixed time slot timing on the channel, the device that first sends a synchronization beacon request can apply to become the master device in the communication system. Devices that receive the synchronization beacon request but do not yet have a master device can appoint the device that first sent the request as the master device. Once the device that first sent the synchronization beacon request recognizes that it has been appointed as the master device, it periodically sends synchronization beacon broadcasts. Other devices, upon receiving the master device's synchronization beacon broadcast, use the timing of the master device's broadcast as a timing reference to synchronize their timing, becoming slave devices in the system, and forwarding synchronization beacons during idle time slots.

[0054] Because the communication coverage area of ​​the device is limited, different communication coverage areas may select different master devices. As the device moves, multiple devices may converge in the same place. In this case, the device will most likely listen to synchronization beacon messages sent by devices in other communication coverage areas, such as synchronization beacon broadcasts sent by the master device or synchronization beacon forwarding sent by the slave device.

[0055] like Figure 1The diagram shows two communication coverage areas, denoted as Area 1 and Area 2, with an overlapping area, denoted as Area 3. In Area 1, device M_A is selected as the master device. Device B in Area 1 receives the synchronization beacon broadcast from device M_A and forwards the synchronization beacon during an idle time slot. In Area 2, device M_C is selected as the master device in Area 3. Device D receives the synchronization beacon broadcast from device M_C and forwards the synchronization beacon during an idle time slot. Device E in Area 3 first receives the synchronization beacon forward from device B and synchronizes it to the timing of the master device in Area 1. When device E subsequently receives the synchronization beacon forward from device D, if the timing of device D's synchronization beacon forwarding differs from that of device B, or if the master device information carried by device D differs from that carried by device B, device E determines that multiple master devices exist within the communication coverage area.

[0056] Therefore, to ensure that the services of different devices do not interfere with each other, it is necessary to resolve the conflict problem of the master device. The method for determining master device information provided in this embodiment can determine a master device from multiple master device information, such as from... Figure 1 The system identifies one master device from the master device information of the two communication coverage areas, enabling the two communication coverage areas to share a single master device. This resolves the master device conflict issue and ensures stable timing propagation.

[0057] In this embodiment, the device can be a mobile device or a fixed device. The mobile device can be a digital walkie-talkie, such as a DMR digital walkie-talkie or a PDT digital walkie-talkie. The fixed device can be a vehicle-mounted device with a fixed power supply.

[0058] Please see Figure 2 This illustrates an optional flow of the method for determining master device information provided in this embodiment, which may include the following steps:

[0059] S101, the first device receives a synchronization beacon message sent by the second device, the synchronization beacon message carrying information about the second master device.

[0060] In this embodiment, the first device can be in a synchronization state, and the master device information of the first device is the first master device information, which can point to the master device that the first device has already determined. If the first device is the master device, the first master device information can be the device information of the first device; if the first device is the slave device, the first master device information can be the device information of the master device of the first device.

[0061] The second master device information points to the master device of the second device. Because the master device pointed to by the first master device information and the second master device information may be different, a master device conflict may occur. The second device sends a synchronization beacon message, which is used to inform other devices of the system master device's device information and synchronization timing.

[0062] The second device can periodically send synchronization beacon messages after a master device has been selected, or forward synchronization beacon messages after receiving them from the master device, or send synchronization beacon messages when a master device is determined. For example, the second device can send synchronization beacon messages in at least one of the following scenarios: the second device is powered on, the second device switches to a new channel, the second device's master device is lost or deregistered, or the second device receives a synchronization information message from the master device.

[0063] If the second device can be in an unsynchronized state, when selecting a master device in the unsynchronized state, the second device can send a synchronization beacon request to confirm the master device. The second master device information carried in the synchronization beacon request is obtained based on the device information of the second device to determine whether the second device can be used as the master device.

[0064] If the second device is in a synchronized state, i.e., has already synchronized with the master device, the second device can send at least one of the following messages: synchronization beacon response, synchronization beacon forwarding, synchronization beacon broadcasting, and synchronization beacon correction. When the second device is the master device, these messages can carry the second master device information. After receiving any of these messages, the first device executes step S102. If the second device has already selected a master device, then the second master device information is the master device information of the second device.

[0065] In this embodiment, the first device can be located in a first communication coverage area. When the first device implements the method for determining master device information, the first device can be any device within the first communication coverage area, and the first communication coverage area can be any communication coverage area in the aforementioned communication system. The second device can be located in a second communication coverage area. In this embodiment, by synchronizing beacon messages, devices in different communication coverage areas can synchronize with the master device and record the same master device information.

[0066] It's important to clarify here that the first and second communication coverage areas are dynamic. When multiple devices elect a master device, all devices recording information about the same master device form a communication coverage area. However, the extent of the communication coverage area changes when a device leaves or a new device joins.

[0067] S102. The first device determines the third master device information based on the first master device information and the second master device information. The current master device information of the first device is the third master device information. Subsequent synchronization beacon messages sent by the first device are all based on the third master device information as the master device information, so that the devices receiving the synchronization beacon messages can synchronize the beacon messages and record the third master device information as the master device information.

[0068] In this embodiment, the first master device information and the second master device information can indicate the device type of the master device. For example, if a device in a communication system can be a mobile device or a fixed device, the device type of the master device can indicate whether the master device is a mobile device or a fixed device. Specifically, the device type can be a terminal, a repeater, or a mobile device, etc. Generally, fixed devices have better performance than mobile devices; for example, the communication coverage of a fixed device is better than that of a mobile device, and the standby time of a fixed device is better than that of a mobile device. Therefore, the first device can determine the third master device information from the first master device information and the second master device information based on the device type of the master device indicated by the first master device information and the second master device information. For example, if the device type of the master device indicated by the first master device information is a fixed device, and the device type of the master device indicated by the second master device information is a mobile device, then the first device will determine the first master device information as the third master device information.

[0069] Whether mobile or fixed, device parameters may differ. These parameters may include device type, device location, device power, battery capacity, and standby time. Each parameter value is a specific value among these parameters. If multiple devices of the same type have different values ​​for at least one parameter, it indicates different performance characteristics. For example, higher device power results in a longer communication range and wider coverage; a larger battery capacity results in a longer standby time and better battery life. Therefore, this embodiment can determine the device type value based on at least one of the following: device type, device location, device power, device battery capacity, and device standby time.

[0070] In some examples, multiple target parameters are scored to obtain a comprehensive score, which serves as the device type value. The target parameters can be at least one of device type, device location, device power, device battery capacity, and device standby time. In some examples, multiple target parameters are compared according to priority to determine the device type value. Taking device type, device power, and device battery capacity as examples, the priority order of these three target parameters is device type, device power, and device battery capacity. If the device types are different, the device type value of the mobile device is lower than that of the fixed device. If the device types are the same, the device power is compared, with higher power having a higher device type value than lower power. If the device power is the same, the device battery capacity is compared, with higher battery capacity having a higher device type value than lower battery capacity. This embodiment does not limit the method for determining the device type value.

[0071] In some examples, the device type value can be determined based on the device's location information. The location information of fixed devices is fixed or changes little, while the location information of mobile devices changes significantly. Therefore, this embodiment can determine the device type value based on whether the device's location information changes, and / or the extent of the change in location information.

[0072] Regardless of the method used to determine the device type value, the following rule must be followed: the better the device's performance, the larger the device type value (a larger device type value indicates better device performance), or the smaller the device type value (a smaller device type value indicates better device performance). Therefore, in one possible implementation, the first device determines the third master device information based on the first master device information and the second master device information, including:

[0073] The first device determines the first master device information or the second master device information as the third master device information based on the device type value of the first master device information and the second master device information, and the preset master device competition rules.

[0074] The preset master device contention rule is used to indicate the relationship between the device type values ​​of the master device and the slave device. For example, in some examples, the preset master device contention rule specifies that the device with the larger device type value is the master device. Therefore, if the first device determines that the device type value of the first master device information is greater than the device type value of the second master device information, it will designate the first master device information as the third master device information. In other examples, the preset master device contention rule specifies that the device with the smaller device type value is the master device. Therefore, if the first device determines that the device type value of the first master device information is greater than the device type value of the second master device information, it will designate the second master device information as the third master device information. Either the first or second master device information records the device type value of the master device, or either master device information records information used to determine the device type value, such as at least one of device type, device location, device power, device battery capacity, and device standby time. Since the device battery capacity and device standby time may change with device usage, if the device type value is determined based on the device battery capacity and / or device standby time, the device type value can also change.

[0075] For example, if the device type value of a fixed device is less than that of a mobile device, the preset master device contention rule can instruct the device with the smaller device type value to be the master device, and the device information with the smaller device type value to be the master device information. If the device type value of a fixed device is greater than that of a mobile device, the preset master device contention rule can instruct the device with the larger device type value to be the master device, and the device information with the larger device type value to be the master device information. For devices within the same category, device type values ​​can also be distinguished. For example, if the device type value of a low-power fixed device is less than that of a high-power fixed device, the preset master device contention rule can instruct the device with the larger device type value to be the master device, and the device information with the larger device type value to be the master device information. The preset master device contention rule is either pre-set by the device or is a default rule in the device's program.

[0076] If the third master device information is the same as the first master device information, the first device can keep the master device information unchanged; if the third master device information is different from the first master device information, the first device will update the master device information to the third master device information.

[0077] S103. When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, which carries the third master device information, so that the second device can synchronize with the first device and confirm that the master device information of the second device is the third master device information.

[0078] The third master device information is the master device information for system timing synchronization. Multiple devices are triggered to use this third master device information as the master device information for system timing synchronization via a synchronization beacon correction message, enabling multiple devices to complete master device synchronization. For example, the first device can broadcast a synchronization beacon correction message or send a synchronization beacon correction message to the second device in a point-to-point manner. Devices that receive this synchronization beacon correction message can then record the third master device information as the master device information, thus completing timing synchronization with the master device.

[0079] In some examples, the message type of the synchronization beacon message can be multiple. For example, synchronization beacon request, master device synchronization beacon broadcast, slave device synchronization beacon forwarding, synchronization beacon response, etc., which are not limited in this embodiment.

[0080] S104. The second device synchronizes with the first device based on the synchronization beacon correction message and changes the master device information of the second device to the third master device information.

[0081] In this embodiment, the synchronization beacon correction message is used to instruct each device receiving the message to perform master device correction, specifically, to synchronize with the synchronization beacon correction message and change the master device information to third master device information. As described above... Figure 1 For example, each device located in the second communication coverage area can receive the synchronization beacon correction message. After receiving the synchronization beacon correction message, these devices can adjust their timing to align with the synchronization beacon correction message, that is, synchronize with the first device and change its master device information to the third master device information.

[0082] In some examples, the synchronization beacon correction message received by the second device is a synchronization beacon correction. After synchronizing with the master device's timing, the second device forwards the synchronization beacon, carrying the third master device information. Thus, by sending the third master device information, other devices in the second communication coverage area can update their master device information to the third master device information. This allows devices in the first and second communication coverage areas to share the same master device information, which points to a unique master device. This achieves the goal of devices in both coverage areas sharing the same master device. Slave devices in different coverage areas synchronize their timing with the unique master device, resolving master device conflicts and ensuring stable timing propagation.

[0083] S105. When the information of the third master device is the information of the second master device, the first device synchronizes with the second device based on the synchronization beacon message.

[0084] When the third master device information is the same as the second master device information, the first device uses the second device's master device as its own and synchronizes with the second device to align timing. When the third master device information is the same as the second master device information, the first device can also send a synchronization beacon forwarding. This beacon forwarding instructs each device to correct its master device information, specifically by changing the master device information to the third master device information. Based on the above... Figure 1 For example, each device located in the first communication coverage area can receive the synchronization beacon forwarding. After receiving the synchronization beacon forwarding, these devices can change their master device information into third master device information, so that each device located in the first communication coverage area and each device located in the second communication coverage area can share the same master device information, which solves the master device conflict problem and thus ensures the stable spread of timing.

[0085] The foregoing described a method for determining the third master device information using the device type value of the master device. In this embodiment, the first device can also determine the third master device information using other methods. For example, in one possible implementation, the first device determines the third master device information based on the first master device information and the second master device information, including:

[0086] When the device type values ​​in the first master device information and the second master device information are the same, the first device determines the first master device information or the second master device information as the third master device information based on the numerical values ​​of the device identifiers in the first master device information and the second master device information, and the preset master device competition rules.

[0087] In this embodiment, if the device type values ​​in the first master device information and the second master device information are the same, the first device can determine the third master device information based on the numerical values ​​of the device identifiers in the first master device information and the second master device information. If neither the first master device information nor the second master device information contains a device type value, then it is assumed that the device type values ​​of the two master device information are the same.

[0088] A preset master device contention rule is used to determine the numerical relationship between the device identifiers of the master device and the slave device. For example, in some examples, the preset master device contention rule states that the device with the larger device identifier value is the master device. Based on this rule, if the device identifier value of the master device is greater than that of the slave device, and the device identifier value in the first master device information is greater than that in the second master device information, then the first device will determine the first master device information as the third master device information. In other examples, the preset master device contention rule states that the device with the smaller device identifier value is the master device. Based on this rule, if the device identifier value of the master device is less than that of the slave device, and the device identifier value in the first master device information is greater than that in the second master device information, then the first device will determine the second master device information as the third master device information.

[0089] For a master device within a communication coverage area, its device identifier is unique, and can be used to point to a unique master device. For example, the master device's device identifier can be used as the master device's beacon sequence number (Identity Document, ID) (referred to as the master beacon sequence number ID). The beacon sequence number ID can range from 0 to 255. Each device can choose a value from this range as its beacon sequence number ID. In the case of the same device type value or no device type value, the first device can determine the size of the master beacon sequence number ID in the master device information (the master beacon sequence number ID can be written into the master device information).

[0090] Assuming that the primary beacon timing ID in the first master device information is greater than the primary beacon timing ID in the second master device information, if the preset master device contention rule indicates that the device with the smaller beacon timing ID is the master device, the first device will determine the second master device information as the third master device information; if the preset master device contention rule indicates that the device with the larger beacon timing ID is the master device, the first device will determine the first master device information as the third master device information.

[0091] It's important to note that every device in a communication system has a device ID. Synchronization beacon messages and synchronization beacon correction messages can carry beacon timing IDs. When the device ID's value range and the beacon timing ID's value range or length differ, the device can use a mapping algorithm to generate the beacon timing ID carried in the message based on the device ID. When the device ID's value range and the beacon timing ID's value range or length are the same, the beacon timing ID carried in the message can reuse the device ID.

[0092] For example, if the device ID is 24 bits long and the beacon timing ID is 8 bits long, the device can call a Cyclic Redundancy Checksum (CRC) algorithm, such as CRC8, to generate an 8-bit beacon timing ID from the 24-bit device ID. That is, beacon timing ID = CRC8(device ID). The beacon timing ID can also be called a local mapping ID, which serves as the initial value for the beacon timing ID. If the device ID changes, the local mapping ID also changes accordingly. When the value range of the device ID and the value range of the beacon timing ID are different, the device can call a random function to generate the beacon timing ID. The specific process will not be described in this embodiment.

[0093] In some examples, when the device identifier values ​​in the first master device information and the second master device information are the same, a feasible way for the first device to determine the third master device information is: the first device determines the third master device information based on the device information of the first device according to the timing deviation value between the timing of the first device and the timing of the synchronization beacon message.

[0094] In this system, the timing of the first device is its local timing, while the timing of the synchronization beacon messages is the timing of the second device's master device. If the first device determines that the timing deviation is less than or equal to a preset deviation threshold, it can perform timing alignment with the second device, determining the first master device information as the third master device information. In this case, the first master device information, the second master device information, and the third master device information are identical. If the first device determines that the deviation is greater than the preset deviation threshold, it determines the third master device information based on the first device's device information.

[0095] Due to prolonged operation or movement of the device, the device's clock may drift. If the drift error exceeds a certain range, it will cause a deviation in the device's reference timing. Therefore, this embodiment introduces a preset deviation threshold to determine whether a deviation has occurred in the reference timing. The preset deviation threshold can be a deviation range, such as + / - 1.25ms (one method, not limited in this embodiment). If the timing deviation value exceeds this range, it will not only affect reception detection, but the timing inconsistency will also interfere with the timing of surrounding devices. Therefore, if the timing deviation value is greater than the preset deviation threshold, it indicates a deviation in the reference timing. The first device can then re-determine a new master device to re-synchronize timing using the new master device's timing. One method is to determine the third master device information based on the first device's device information, making the first device the new master device. For example, the first device can serve as the master device for at least the first and second communication coverage areas.

[0096] After the first device becomes the master device, it can periodically send synchronization beacon broadcasts during idle time slots. If other devices in the first and second communication coverage areas receive the synchronization beacon broadcast, they will update their master device information to the third master device information determined based on the device information of the first device, and can perform timing synchronization based on the timing of the first device.

[0097] In this embodiment, the process by which the first device determines the third master device information based on its own device information includes: the first device determining the device identifier in the third master device information according to a preset master device identifier generation rule. The preset master device identifier generation rule is used to determine the device identifier in the third master device information based on the relationship between the length of the device identifier in the master device information and the length of the complete device identifier of devices within the system. One method is as follows:

[0098] When the length of the device identifier in the master device information is greater than or equal to the length of the complete device identifier of the device in the system, the first device uses its own device identifier as the device identifier in the third master device information; when the length of the device identifier in the master device information is less than the length of the complete device identifier of the device in the system, the first device calculates the mapping value of its own device identifier based on the first calculation rule, and uses the mapping value as the device identifier in the third master device information. The size relationship between the mapping value and the device identifier in the second master device information satisfies the preset master device competition rule.

[0099] Taking a complete device identifier length of 24 bits as an example, if the device identifier length in the master device information is also 24 bits, then the first device uses its own device identifier as the device identifier in the third master device information.

[0100] If the device identifier in the master device information is 8 bits long, the first device records its own device identifier and calculates an 8-bit mapping value according to the first calculation rule. If the size relationship between the mapping value of the first device's own device identifier and the value of the device identifier in the second master device information satisfies the preset master device contention rule, the first device uses the mapping value of its own device identifier as the device identifier in the third master device information. If the size relationship between the mapping value of the first device's own device identifier and the value of the device identifier in the second master device information satisfies no preset master device contention rule, the first device can calculate other mapping values ​​of its own device identifier based on a random function and use the other mapping values ​​as the device identifier in the third master device information.

[0101] The random function can select a value based on a preset master device contention rule. For example, if the preset master device contention rule selects the master device with the larger device identifier value, then the minimum value of the random function is the device identifier value in the second master device information plus 1, and the maximum value of the random function is 2. 8 The random function generates a mapping value using the minimum and maximum values. The mapping value is set to `RandRange(Mix, Max)`, where `Max` (Maximum) is the maximum value and `Min` (Minimum) is the minimum value. If the default master device contention rule prioritizes the device with the smaller device identifier value, then the maximum value of the random function is the device identifier value in the second master device information, and the minimum value of the random function is 1. The random function generates the mapping value using the minimum and maximum values. In this example, when the first device is the master device, the device identifier of the first device is updated to the mapping value.

[0102] If the device identifier in the master device information is 8 bits long, and the device identifier of the first device itself is 24 bits long, the first device can calculate the mapping value of its own device identifier using a hash algorithm or modulo operation. For example, if the device identifier in the second master device information is 28 (8-bit value), and the device identifier of the first device is 1002 (24-bit value), and the default master device contention rule is that the device with the larger device identifier value becomes the master device, the first device can perform a hash algorithm on its own device identifier 1002 to obtain a value greater than the original master device 28, such as 35, which is then used as the device identifier in the third master device information. If the default master device contention rule is that the device with the smaller device identifier value becomes the master device, then the first device can perform a hash algorithm on its own device identifier 1003 to obtain a value less than the original master device 28, such as 13, which is then used as the device identifier in the third master device information. In this example, when the first device is the master device, the first device uses the confirmed third master device information as the master device information (the master device identifier is the mapping value of its own device identifier), and the first device's own device identifier remains unchanged.

[0103] In some scenarios, the master device can periodically send synchronization beacon broadcasts, and the slave device can start a beacon interval timer to maintain a heartbeat connection with the master device. When the beacon interval timer expires and the slave device does not receive the synchronization beacon broadcast, the slave device determines that it has lost connection with the master device, considers the master device lost, and enters a timing-dissynchronized state. While in the timing-dissynchronized state, the slave device has not identified the master device. For example, the master device may send synchronization beacon broadcasts every minute, such as a broadcast period of 4.5 minutes. Correspondingly, the slave device's beacon interval timer can be set to at least one broadcast period, such as 10 minutes. If the slave device fails to receive the master device's synchronization beacon broadcast at least twice within 10 minutes, the slave device considers the master device lost, and at this time, the slave device has not identified the master device. In some scenarios, the first device has just powered on or switched to a new channel, and the first device has not identified the master device. For these scenarios, this embodiment provides... Figure 3 The process shown is as follows: Figure 3 The process shown assumes the first device is in a bit synchronization state, meaning it has not synchronized with other devices in terms of timing or confirmed itself as the master device. This process may include the following steps:

[0104] S201, the first device receives a second synchronization beacon request sent by the third device. The master device information in the second synchronization beacon request is the fourth master device information obtained based on the device information of the third device.

[0105] In this embodiment, the third device can be any device capable of communicating with the first device, such as when the first device is within the communication coverage area of ​​the third device. The second synchronization beacon request is used to indicate that the master device information in the second synchronization beacon request be used as the master device information for system timing synchronization, so as to request the third device as the master device through the second synchronization beacon request. The fourth master device information can be the device information of the third device, such as using the device type value of the third device as the device type value of the fourth master device information, and / or obtaining the device identifier in the fourth master device information based on the device identifier of the third device. For example, the device identifier of the third device can be used as the device identifier in the fourth master device information, or a mapping value of the device identifier of the third device can be calculated based on the first calculation rule, and the mapping value can be used as the device identifier in the fourth master device information.

[0106] S202. The first device determines the master device information for system timing synchronization based on the device information of the first device and the information of the fourth master device.

[0107] In this embodiment, the first device can speed up the selection of the master device through a "first-come, first-served" mechanism. For example, if the second synchronization beacon request is the first message received by the first device to request master device information, then the first device will directly determine the fourth master device information as the master device information for system timing synchronization.

[0108] In one possible implementation, the device information of the first device and the fourth master device information include the device type. The first device can determine the master device information for system timing synchronization based on the device type. For example, if the device type of the first device is a fixed device and the device type in the fourth master device information is a mobile device, then the first device will determine the device information of the first device as the master device information; if the device type of the first device is a mobile device and the device type in the fourth master device information is a fixed device, then the first device will determine the fourth master device information as the master device information, thereby selecting the device more suitable for propagating the beacon as the master device based on the device type.

[0109] In one possible implementation, if the first device determines that the device types are the same (including cases where there is no device type value in the master device information, in which case the device types are the same by default), the first device determines the fourth master device information as the master device information, and speeds up the selection of the master device through the "first come, first served" mechanism.

[0110] Furthermore, for mobile or fixed devices, at least one parameter among device power, battery capacity, and standby time may differ for the same type of device. In this embodiment, the device type value can be determined based on at least one of device type, device location, device power, device battery capacity, and device standby time. The better the device's performance, the larger its device type value. Therefore, in one possible implementation, the first device determines the master device information for system timing synchronization based on the first device's device information and the fourth master device information, including:

[0111] The first device determines the fourth master device information as the master device information for system timing synchronization based on the size of the device type values ​​of the first device information and the fourth master device information, and according to a preset master device contention rule; or, if the device type values ​​of the first device information and the fourth master device information are the same, the fourth master device information is determined as the master device information for system timing synchronization. The fourth master device information is determined as the master device information for system timing synchronization according to the preset master device contention rule because the device information of the first device and the fourth master device information conform to the preset master device contention rule. For details, please refer to [link to relevant documentation]. Figure 1 The relevant explanations are as follows: If the two do not meet the preset master device competition rules, the first device determines that the fourth master device information is not the master device information for system timing synchronization.

[0112] Furthermore, after determining the fourth master device information as the master device information for system timing synchronization, the method for determining the master device information also includes: the first device determining that the value of the device identifier of the first device is greater than the value of the device identifier of the third device; if the preset master device contention rule indicates that the device with the larger device identifier value is the master device, the first device decreases the value of the device identifier of the first device, that is, obtains the mapping value of the device identifier of the first device, so that the mapping value is less than the value of the device identifier of the third device (if the device identifier in the fourth master device information is the mapping value of the device identifier of the third device, then the mapping value of the first device identifier is less than the mapping value of the device identifier of the third device); if the preset master device contention rule indicates that the device with the smaller device identifier value is the master device, the first device keeps the value of the device identifier of the first device unchanged.

[0113] The preset master device contention rule indicates the relationship between the values ​​of the master device identifier and the slave device identifier. The purpose of the first device adjusting its own device identifier's mapping value is to ensure that the relationship between the device identifiers of the first and third devices satisfies the numerical relationship indicated by the preset master device contention rule. The process of the first device adjusting its device identifier is detailed in the relevant descriptions in the above embodiments and will not be elaborated here. It should be noted that in a communication system, the device identifier is generally unique and fixed within the system. In this embodiment, adjusting the numerical value of the device identifier refers to adjusting the size of its mapping value.

[0114] S203. When the fourth master device information is determined to be the master device information for system timing synchronization, the first device records the fourth master device information as the master device information of the first device.

[0115] S204. The first device sends a first synchronization beacon response, which carries information about the fourth master device. The first device may broadcast the first synchronization beacon response, or send the first synchronization beacon response to the third device in a point-to-point manner.

[0116] If the first device determines, based on the device information of the first device and the device type value of the fourth master device information, and the preset master device competition rules, that the fourth master device information is not the master device information for system timing synchronization, the first device will not send the first synchronization beacon response message to the third device.

[0117] S205. After receiving the first synchronization beacon response, if the master device information in the first synchronization beacon response is the fourth master device information, the third device determines itself to be the master device. The third device can periodically send synchronization beacon broadcasts. After receiving the synchronization beacon broadcast, the first device can send synchronization beacon forwarding in an idle time slot, so that the timing of other devices that can receive the synchronization beacon forwarding is also synchronized to the timing of the third device.

[0118] One point to note here is that when the first device is in an unsynchronized state, the first device sends a first synchronization beacon request. The master device information in the first synchronization beacon request is obtained based on the device information of the first device. The first synchronization beacon request is used to indicate that the master device information in the first synchronization beacon request is used as the master device information for system timing synchronization.

[0119] Whether it's the first or third device, the devices can employ a random backoff contention mechanism to send synchronization beacon requests. This mechanism involves each device starting a random backoff timer to prevent multiple devices from transmitting signals over the air interface simultaneously, and selecting a master device from among them. The random backoff timer limits the interval between synchronization beacon requests. The device can call a function to generate a random time (called the random backoff time). Based on this generated random backoff time, the device starts the random backoff timer. After sending a synchronization beacon request within the random backoff time, the device can resend the request once the random backoff timer expires. When generating the random time, the function can incorporate factors such as battery capacity or standby time; the specific process is not elaborated here. By using random time, different devices can send synchronization beacon requests at different times, ensuring that the device with the best performance is chosen as the master device whenever possible.

[0120] After sending the first synchronization beacon request, if the first device receives a synchronization beacon response or other synchronization beacon messages, the first device determines whether the master device information in the received message indicates that it is the first device. If the master device information in the message indicates that it is the first device (if there is a mapping value, it determines whether the mapping value is the same), the first device acts as the master device and sends a synchronization beacon broadcast. If the master device information in the message does not indicate the first device, the first device can determine the master device information in the message as the master device information. When the message is a synchronization beacon request, a synchronization beacon response is also sent, which carries the master device information. Alternatively, if the device information in the message does not indicate the first device, the first device can refer to step S202 above for processing.

[0121] S206. The first device receives a synchronization beacon message sent by the second device, and the synchronization beacon message carries information about the second master device.

[0122] S207. The first device determines the third master device information based on the first master device information and the second master device information. The current master device information of the first device is the third master device information. The first master device information can be the aforementioned fourth master device information.

[0123] S208. When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, which carries the third master device information, so that the second device can synchronize with the first device and confirm that the master device information of the second device is the third master device information.

[0124] S209. The second device synchronizes with the first device based on the synchronization beacon correction message and changes the master device information of the second device to the third master device information.

[0125] S210. When the information of the third master device is the information of the second master device, the first device synchronizes with the second device based on the synchronization beacon message.

[0126] In this embodiment, steps S206 to S210 can be referred to steps S101 to S105, and will not be described again here. When the first device is in an unsynchronized state, through the above... Figure 3 The process shown determines the master device information for system timing synchronization, enabling the first device to share a master device with other devices for timing synchronization.

[0127] Please see Figure 4 This illustrates another optional process of the method for determining master device information provided in the embodiments of this application, which may include the following steps:

[0128] S101, the first device receives a synchronization beacon message sent by the second device, the synchronization beacon message carrying information about the second master device.

[0129] S102. The first device determines the third master device information based on the first master device information and the second master device information. The current master device information of the first device is the third master device information. The first master device information can be the aforementioned fourth master device information.

[0130] S103. When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, which carries the third master device information, so that the second device can synchronize with the first device and confirm that the master device information of the second device is the third master device information.

[0131] S104. The second device synchronizes with the first device based on the synchronization beacon correction message and changes the master device information of the second device to the third master device information.

[0132] S105. When the information of the third master device is the information of the second master device, the first device synchronizes with the second device based on the synchronization beacon message.

[0133] S106. The first device receives a master device deregistration message. The master device deregistration message indicates that the master device information in the message is no longer used as the master device information for system timing synchronization. If the message carries third master device information, it indicates that the master device corresponding to the third master device information is deregistered. The message can also be a synchronization beacon message, in which a field is set to indicate master device deregistration. For example, a field can be added to the message, and this field indicates master device deregistration through a preset value. For example, a preset value of 1 indicates master device deregistration. Master device deregistration can also be considered as master device offline (decommissioned). After the master device is deregistered, its device information is recorded as the source master device's device information. The first device can save the source master device's device information (such as the master device's beacon timing ID) and deregistration identifier. The deregistration identifier can be the aforementioned preset field value. This identifier indicates that the current master device selection was triggered after the source master device was deregistered. The new master device selected this time can be the source master device's backup master device. The backup master device can reuse the source master device's device information or use the backup master device's device information.

[0134] When the selected master device is in any of the following situations: the battery enters low power mode, the power is exhausted, it is remotely killed, scanning is started, roaming is started, power off, or channel is switched, the device can no longer act as the master device. Therefore, before executing the above operation commands, the device will actively deregister its master device status, that is, actively send a synchronization beacon message carrying the master device deregistration instruction, so as to notify the slave devices to select a backup master device as soon as possible.

[0135] When a device initiates scanning or roaming, it iterates through the scan or roaming list members one by one to detect service activity. This means the device will not remain on the current channel periodically sending synchronization beacon messages. Consequently, the device is no longer qualified to be the master device and needs to actively deregister as the master device. For example, when a user operates to shut down device A, which is the master device, after receiving the shutdown command but before executing it, if there is an idle time slot on the channel, device A will send a synchronization beacon message carrying the active deregistration of the master device in the idle time slot, releasing its master device status. This allows devices within the communication system to select a new master device (i.e., a backup master device) as early as possible.

[0136] S107. The first device is changed to an unsynchronized state. This may be due to the first device clearing its recorded master device information or changing its synchronization status information.

[0137] S108. If the first device does not receive a synchronization beacon message from any fourth device within a preset time, it sends a first synchronization beacon request. The master device information in the first synchronization beacon request is obtained based on the device information of the first device. The first synchronization beacon request is used to indicate that the master device information in the first synchronization beacon request is used as the master device information for system timing synchronization, so as to request the first device to be the master device through the first synchronization beacon request.

[0138] The type of synchronization beacon message can be any synchronization beacon type within the system, such as synchronization beacon broadcast, synchronization beacon forwarding, synchronization beacon request, or synchronization beacon correction.

[0139] The first device may use a random backoff contention mechanism to send the first synchronization beacon request; please refer to the above description for details.

[0140] S109. After sending the first synchronization beacon request, the first device receives the second synchronization beacon response.

[0141] After sending the first synchronization beacon request, the first device starts a timer to wait for a beacon response. If the first device does not receive a message after the timer expires, it can continue to send the first synchronization beacon request.

[0142] S110. If the first device determines that the master device information carried in the second synchronization beacon response indicates that the first device is the master device, then the first device determines itself as the new master device, and the master device information carried in the second synchronization beacon response is the master device information for system timing synchronization.

[0143] If the first device determines that the master device information carried in the second synchronization beacon response is the same as the mapping value obtained based on the first device's device information, or the same as the first device's device identifier, then it determines itself as the new master device. In this case, the second synchronization beacon response is a response to the first synchronization beacon request.

[0144] S111. After the first device determines itself as the new master device, the first device sends a synchronization beacon broadcast. The master device information in the synchronization beacon broadcast is obtained based on the device information of the first device. After receiving the synchronization beacon broadcast, other devices synchronize with the first device in time.

[0145] If the first device determines that the device information carried in the first synchronization beacon response is different from the device information of the first device, the first device may refer to the above. Figure 1 The process for determining the information of the third master device is described in detail here.

[0146] S112. The first device receives the synchronization beacon message sent by the fourth device within a preset time and cancels the sending of the first synchronization beacon request.

[0147] S113. When the synchronization beacon message sent by the fourth device is a second synchronization beacon request message, the first device sends a first synchronization beacon response. The first synchronization beacon response carries the master device information from the second synchronization beacon request, and the master device information points to the new master device. The master device information in the second synchronization beacon request is obtained based on the device information of the fourth device, so as to determine the fourth device as the new master device.

[0148] Optionally, each device can specify a backup master device through a pre-defined frequency write method, such as including the backup master device's information in the master device's deregistration message. Alternatively, the master device can specify a backup master device according to other rules; the specific method is not limited.

[0149] As can be seen from the above technical solution, after the master device is deregistered, its slave devices (such as the first or fourth device) can send a synchronization beacon request. Other devices, upon receiving the synchronization beacon request, send a synchronization beacon response, appointing the sender of the synchronization beacon request as the new master device. Upon receiving the synchronization beacon response, a device determines whether the new master device's device information is its own. If so, it updates itself to become the new master device. The new master device checks its locally stored deregistration identifier. If the deregistration identifier is 1, it indicates that the source master device actively deregistered. The new master device can reuse the source master device's ID (the mapping value of the source master device's device identifier). The new master device is selected as the backup master device of the source master device and periodically sends synchronization beacon broadcasts according to the original synchronization timing. The synchronization beacon broadcasts can use the source master device's device information. In this way, devices in the communication system that have already used the source master device's timing for timing synchronization can continue to synchronize with the new master device without being affected, reducing operations while ensuring timing synchronization. If the deregistration flag is 0, the device acting as the new master device can use its own beacon timing ID as the primary beacon timing ID to perform synchronous beacon broadcasting.

[0150] In this embodiment, the synchronization beacon message includes: synchronization beacon correction message, synchronization beacon response message, synchronization beacon request message, etc., and may include synchronization beacon information units. The synchronization beacon information unit may include device information of the master device, such as the device type of the master device (hereinafter referred to as the master device type), the beacon timing ID (i.e., the master beacon timing ID, which can be a device identifier or a mapping value), and a master device deregistration indication. Furthermore, the synchronization beacon information unit may also include beacon hop count and beacon type. These parameters are explained below.

[0151] The equipment includes mobile and fixed devices. Fixed devices (such as mobile units) typically have a wider power range, with high-power versions reaching 25 or 30 watts. Mobile devices generally have a high power of 4 or 5 watts. If a communication system contains both mobile and fixed devices, the fixed device is usually chosen as the primary device. This results in a wider communication coverage area. In addition, fixed devices can be continuously powered by an external power source, ensuring that the primary device can consistently and stably broadcast the scheduled times.

[0152] Among mobile devices, those with sufficient battery power are more likely to be the primary device. If a mobile device is selected as the primary device, it can actively disconnect from the primary device when its battery level drops below 20% or enters a low-battery state, allowing a mobile device or fixed device with more battery power to become the new primary device.

[0153] To facilitate the differentiation of the device type of the master device (hereinafter referred to as the master device type), this embodiment can use either segmentation based on the master beacon timing ID range or by adding new master device type information units for differentiation and identification. Here, the device type is differentiated based on the size of the defined value of the master device type. For example, the device type value of a fixed device is greater than that of a mobile device. Of course, there are other differentiation methods, which are not limited to this one.

[0154] In some examples, the master device type can reuse the master beacon timing ID value, segmenting the master beacon timing ID range to map different device types. The master beacon timing ID can be defined as 8 bits, 16 bits, or 24 bits, or any bit length as needed. The following example illustrates the segmentation of the 8-bit master beacon timing ID range, where the master beacon timing ID value for mobile devices is lower than that for fixed devices, as shown in Table 1.

[0155] Table 1. Master Beacon Timing ID Information Unit

[0156]

[0157] The main device type can also be identified using the newly added information unit field, as shown in Table 2.

[0158] Table 2 Main Equipment Type Information Unit

[0159]

[0160] Master device deregistration instruction: When the battery of the selected master device enters a low power state, is depleted, is remotely killed, starts scanning, starts roaming, shuts down, or switches channels, the device can no longer act as the master device and needs to actively send a synchronization beacon message of master device deregistration instruction in order to notify the devices in the communication system to select a new master device as soon as possible.

[0161] The master device deregistration indication can be identified by adding a master device deregistration indication information unit, or by combining the values ​​of several information units, such as the timing beacon hop count and the time slot beacon type. The specific combination is not limited. This embodiment uses the addition of a master device deregistration indication information unit as an example, as shown in Table 3.

[0162] Table 3 Main Equipment Deregistration Instructions

[0163]

[0164] Beacon Hops: Beacon hop count (BH) represents the number of hops and range of a timing beacon propagation. A higher timing beacon hop count indicates a longer communication distance and a larger coverage area. Synchronization beacon broadcasts and forwards can carry the beacon hop count; the device automatically increments the count upon receiving a synchronization beacon broadcast or forward, as shown in Table 4.

[0165] Table 4 Timing Beacon Jump Count

[0166]

[0167] Beacon Type: Beacon Type (BT) represents the type of synchronization beacon (the type of synchronization beacon message). In the unsynchronized state, a device requests to become the master device by sending a synchronization beacon request; beacon type BT=00. In the synchronized state, the master device broadcasts a synchronization beacon; beacon type BT=01. In the synchronized state, a slave device forwards a synchronization beacon; beacon type BT=10. In the out-of-order synchronized state, a device responds to a synchronization beacon request with a synchronization beacon response; beacon type BT=11. In the synchronized state, a master or slave device corrects or calibrates a synchronization beacon; beacon type BT=11.

[0168] Table 5. Types of Time Slot Synchronization Beacons

[0169]

[0170] The aforementioned synchronization beacon information unit can be carried in the device's Time Division Multiple Access (TDMA) frame. Under the DMR / PDT standard, the device can adopt a 12.5kHz TDMA dual-slot structure. Figure 5A schematic diagram of the TDMA frame structure of the device is shown. The TDMA frame includes two time slots, each 30.0 ms long, and each air interface burst frame is 27.5 ms long. The remaining 2.5 ms is a guard time to allow power increase and transmission delay. In each air interface burst frame, several time periods on both sides of the TDMA burst center position are used to carry the synchronization word (SYNC) or embedded signaling. Optionally, the synchronization beacon information unit of this application can be carried by the payload on both sides of the synchronization word (SYNC) or embedded signaling.

[0171] The following describes the process of determining the master device and time synchronization in different scenarios:

[0172] Scenario 1: There is no master device in the communication system, and the master device is selected through contention.

[0173] When a device is newly powered on or has switched channels, it is in an unsynchronized state. The device can start a Beacon Idle Timer to monitor timing beacon activity on the current frequency. If the timer expires and no timing beacon activity is detected, the device can proactively send a synchronization request beacon to apply to become the master device and wait for a synchronization beacon response. If a synchronization response beacon is received, the device determines that the master beacon timing ID is its own beacon timing ID, updates itself to become the master device, and periodically broadcasts synchronization beacons. In one embodiment, the beacon timing ID is consistent with the device identifier; in another embodiment, the beacon timing ID is a mapping value of the device identifier.

[0174] When the timing of a communication system is not synchronized, and multiple devices apply to become the master device, a "first-come, first-served" principle can be adopted. The device that first receives the synchronization beacon request will be responded to, and the device that sent the synchronization beacon request will be appointed as the master device. If the synchronization beacon information element carried in the synchronization beacon request identifies different master device types, the device more suitable for broadcasting the synchronization beacon will be selected as the new master device. For example, between fixed and mobile devices, the fixed device will be given priority.

[0175] Using two mobile devices as an example, the process of selecting the primary device in a "first-come, first-served" manner is as follows: Figure 6 As shown, in a communication system, the first device in an unsynchronized state sends a synchronization beacon request to become the master device. The second device in an unsynchronized state can also send a synchronization beacon request to become the master device. The two devices can send synchronization beacon requests at the same time or with a TDMA cycle interval between them; the timing of the two devices sending the synchronization beacon requests is not limited.

[0176] If the first device receives the synchronization beacon request from the second device after sending the synchronization beacon request, the first device responds to the received synchronization beacon request, appoints the second device as the master device, and records the beacon timing ID of the second device in the synchronization beacon request as the master beacon timing ID.

[0177] The first device can locally store a mapping ID of a device identifier, which serves as the beacon timing ID of the first device. If the primary device is selected based on the device with the larger ID, and the primary beacon timing ID of the second device is less than or equal to the mapping ID of the first device, the mapping ID stored locally by the first device is adjusted. The adjustment method can be to call a random function. The maximum value of the random function's random range is the primary beacon timing ID minus 1, and the minimum value of the random range is the minimum value of the range of beacon timing IDs available to the mobile device, as shown in Table 1 above. A new mapping ID smaller than the primary beacon timing ID of the second device is then generated. If the primary beacon timing ID of the second device is greater than the mapping ID of the first device, the mapping ID stored locally by the first device remains unchanged.

[0178] Optionally, if the appointed master device is the device with the smaller ID, and the master beacon timing ID of the appointed second device is greater than that of the first device, the mapping ID stored locally on the first device can be adjusted to regenerate a mapping ID greater than that of the second device. For example, the first device can call a random function to generate the mapping ID stored locally on the first device. The maximum value of the random range of the random function is the maximum value of the range of beacon timing IDs available to the mobile device, as shown in Table 1 above (229). The minimum value of the random range is the master beacon timing ID plus 1.

[0179] The first device sends a synchronization beacon response to the second device. The master beacon timing ID carried in the synchronization beacon response is set to the master beacon timing ID of the second device carried in the synchronization beacon request, and the first device is updated to a slave device.

[0180] The first device receives the synchronization beacon broadcast sent by the master device (which is also the second device), keeps synchronized with the master device (i.e., the second device), and forwards the synchronization beacon in its idle time slots.

[0181] The process of the second device being designated as the main device is as follows: Figure 7 As shown, after the second device sends a synchronization beacon request and then receives a synchronization beacon response from the first device, it determines that the master beacon timing ID carried in the synchronization beacon response is the same as the mapping ID of the second device. If so, the second device becomes the master device and starts the synchronization beacon interval timer BeaconIntervalTimer to periodically send synchronization beacon broadcasts.

[0182] This section illustrates the competition between two mobile devices to apply for a master device, using examples and timing diagrams. The timing diagram is shown below. Figure 8 As shown in Table 6, the initial configurations of the two mobile devices are as follows.

[0183] Table 6 Initial configuration of the two mobile devices

[0184]

[0185] Upon powering on, devices MS A and MS B start their BeaconIdleTimer to monitor timing beacon activity on the current frequency. If MS A's BeaconIdleTimer times out without detecting any timing beacon activity, MS A proactively sends a synchronization beacon request when the channel is idle, using its own timing parameters (beacon type BT=00 (no synchronization beacon request), beacon hop count BH=0, master device MasterID=100 (local mapping ID)), requesting to become the master device. After sending the synchronization beacon request, MS A switches to receiving and waits for a beacon response. Similarly, if MS B's BeaconIdleTimer times out without detecting any timing beacon activity, MS B proactively sends a synchronization beacon request when the channel is idle, using its own timing parameters (beacon type BT=00, beacon hop count BH=0, master device MasterID=200), requesting to become the master device.

[0186] Figure 8 The timing difference between MS B and MS A shown is within one TDMA cycle interval. In DMR or PDT standards, one TDMA cycle interval is 60ms. Figure 8 As shown in the timing diagram, when MS A sends a synchronization beacon request, MS B is in the request preparation phase and does not receive the synchronization beacon request sent by MS A.

[0187] If MS A is waiting for a beacon response (starting a beacon response waiting timer to wait for a beacon response; if the timer expires and no beacon response is received, it continues to send synchronization beacon requests), and MS A receives the synchronization beacon request from MS B first, MS A judges the received synchronization beacon request. If the preset master device contention rule indicates that the device with the larger beacon timing ID is the master device, and MS B's master beacon timing ID is greater than MS A's mapping ID, then MS B is appointed as the master device, MS B's beacon timing ID becomes the master beacon timing ID, and MS A's mapping ID remains unchanged.

[0188] If the primary beacon timing ID of MS B is less than or equal to the mapping ID of MS A, for example, if the mapping ID of MS A is 300, adjust the local mapping ID of MS A and regenerate a mapping ID that is less than the primary beacon timing ID of MS B. For example, call the random function RandRange(6, 199) to regenerate a mapping ID between 6 and 199. For example, if the randomly generated mapping ID is 100, the local mapping ID of MS A will be updated from 300 to 100.

[0189] MS A can align its timing with MS B based on MSB's synchronization beacon request, allowing MS A to reply with a synchronization beacon response in an idle time slot without interfering with MS B. The synchronization beacon response contains the following information unit: (Beacon type BT=10 (unsynchronized device beacon response), beacon hop count BH=0, master device MasterID=200 (setting MS B as the master device)). MS A then updates itself as a slave device. In some examples, MS A can also send a synchronization beacon response using its own timing after determining MS B to be the master device. Upon receiving the synchronization beacon broadcast from MSB, MS A will synchronize its timing with MSB.

[0190] If MS B receives a synchronization beacon response from MS A while waiting for a beacon response, it determines that the master beacon timing ID carried in the synchronization beacon response is the same as the mapping ID of MS B. Confirming that it has been appointed as the master device, it then updates itself to become the master device. MS B starts a synchronization beacon interval timer (BeaconIntervalTimer) to periodically send synchronization beacon broadcasts. The synchronization beacon information unit in the synchronization beacon broadcast is (beacon type BT=01 (master device synchronization beacon broadcast), beacon hop count BH=0, master device MasterID=200).

[0191] MS A receives a synchronization beacon broadcast from the master device MS B, synchronizes the timing calibration to the master device's timing, and forwards the synchronization beacon when the channel is idle. The synchronization beacon information unit in the synchronization beacon forwarding is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=1 (first propagation TDMA timing), master device MasterID=200).

[0192] In Scenario 1, the main device selection process for different device types is as follows: Figure 9 As shown, the device could be a mobile device or a fixed device, with the fixed device being the primary device. Here, the device type can be distinguished by the value of the primary device type definition. For example, the device type value of a fixed device is greater than that of a mobile device. Other comparison methods are also possible, and no specific limitations are imposed.

[0193] The first device sends a synchronization beacon request to become the master device, and the second device sends the same request afterward.

[0194] When the first device receives a synchronization beacon request from the second device, if it detects that the device type value of the second device is greater than that of the first device, it responds to the received synchronization beacon request by sending a synchronization beacon response. The master beacon timing ID carried in the synchronization beacon response is set to the master beacon timing ID of the second device, thus appointing the second device as the master device and updating itself to a slave device. Subsequently, when the first device receives a synchronization beacon broadcast sent by the second device, the first device uses the timing of the second device for timing synchronization and attempts to send synchronization beacon forwarding in idle time slots.

[0195] If the device type value of the second device is determined to be less than that of the first device, the synchronization beacon request from the second device will not be responded to. Instead, the synchronization beacon request from the first device will be immediately sent in an adjacent idle time slot. While waiting for the response, if the synchronization beacon response from the second device is received, and the master beacon timing ID carried in the synchronization response is found to be the same as the mapping ID of the first device, then the first device will be promoted to master device. The first device will start a synchronization beacon interval timer (BeaconIntervalTimer) to periodically send synchronization beacon broadcasts so that other devices can use the timing of the first device for timing synchronization.

[0196] This will be illustrated with examples. Figure 10 The diagram shows the timing of a fixed device (Fix A, such as a mobile unit) and a mobile device (MS B) competing for the master device when there is no master device. The initial configurations of the two devices are shown in Table 7.

[0197] Table 7 Initial configuration of the two devices

[0198]

[0199] Upon powering on, both Fix A and MS B start their BeaconIdleTimer to monitor timing beacon activity on the current frequency. If Fix A's BeaconIdleTimer times out without detecting any timing beacon activity, Fix A proactively sends a synchronization beacon request when the channel is idle, using its own timing mechanism. The synchronization beacon request contains the following information: (Beacon type BT=00 (no synchronization beacon request), beacon hop count BH=0, Master ID=240 (local mapping ID)). Fix A then requests to become the master device.

[0200] After Fix A sends its synchronization beacon request, it switches to receiving and enters a waiting period for a synchronization beacon response. Similarly, MS B's BeaconIdleTimer times out, and since no timing beacon activity has been detected, MS B actively sends a synchronization beacon request when the channel is idle, using its own timing mechanism. The synchronization beacon request contains the following information: (beacon type BT=00, beacon hop count BH=0, master device MasterID=200), requesting to become the master device.

[0201] If Fix A receives a synchronization beacon request from MS B while waiting for a beacon response, Fix A judges the received request. If MS B's device type value is less than Fix A's, Fix A does not respond to MS B's synchronization beacon request and resends its own synchronization beacon request. In this embodiment, Fix A can continue to send synchronization beacon requests using its own timing, or it can align with MS B's timing and send the request on a nearby idle timing; this is not limited here. The purpose of aligning Fix A and MS B's timing is to ensure that the other can receive the synchronization beacon request in its next TDMA cycle, and to reduce the probability of air interface collisions or interference caused by multiple devices sending requests in their own timing. Timing alignment is also performed after receiving a synchronization beacon broadcast or forwarding, and finally, timing synchronization is performed based on the timing of the synchronization beacon broadcast or forwarding.

[0202] If MS B receives a synchronization beacon request from Fix A while waiting for a beacon response, MS B judges the received synchronization beacon request. If MS B's device type value is less than Fix A's device type value, MS B appoints Fix A as the master device of the communication system. The master device's beacon timing ID is the master beacon timing ID in Fix A's synchronization beacon request. MS B's mapping ID remains unchanged. MS B and Fix A's timings are aligned. MS B replies with a synchronization beacon response in an idle time slot. The synchronization beacon response contains the synchronization beacon information unit (beacon type BT=10 (no synchronization beacon response), beacon hop count BH=0, master device MasterID=240 (setting Fix A as the master device)), and updates itself to a slave device.

[0203] If Fix A receives a synchronization beacon response from MS B while waiting for a beacon response, and determines that the master beacon timing ID carried in the synchronization beacon response is the same as Fix A's beacon timing ID, confirming that it has been appointed as the master device, it updates itself as the master device, starts the synchronization beacon interval timer BeaconIntervalTimer, and periodically sends synchronization beacon broadcasts. The synchronization beacon information unit in the synchronization beacon broadcast is (beacon type BT=01 (master device synchronization beacon broadcast), beacon hop count BH=0, master device MasterID=240).

[0204] MS B receives the synchronization beacon broadcast sent by the master device Fix A, calibrates the timing of synchronization to the master device, and forwards the synchronization beacon when the channel is idle. The synchronization beacon information unit in the synchronization beacon forwarding is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=1 (first propagation TDMA timing), master device MasterID=240).

[0205] Scenario 2: The communication system already has a master device, and master device conflict selection occurs.

[0206] When a device moves to another communication coverage area, there may be multiple master devices (the number of master devices is greater than or equal to 2, and the master device can be a master device that has already been selected or a master device that is applying for a master device). The conflict resolution mechanism of the master device is as follows: the device that detects the master device conflict can make a judgment based on the timing deviation value or the device type value, etc., to select a new master device.

[0207] Taking two devices of the same type as an example, if no device type value is specified, the default device type value is the same. When two master devices conflict, the new master device selection process can choose the master device with the larger or smaller primary beacon time sequence ID as the new master device. This example illustrates selecting the device with the larger primary beacon time sequence ID as the new master device. Figure 11 As shown. Figure 11 The process for selecting the master device is shown when the master beacon timing ID is different.

[0208] When a first device receives a synchronization beacon message from a second device, if the primary beacon timing ID of the second device is different from that of the first device, a master device conflict is detected. The first device then compares the primary beacon timing IDs; if the primary beacon timing ID of the second device is greater than that of the first device, the first device updates to become the new slave device and selects the second device as the master. The first device then performs timing alignment with the second device and sends a synchronization beacon forwarding message in an idle time slot. The primary beacon timing ID in the forwarded synchronization beacon indicates that the second device is the master. The first device can be a device already synchronized with the master device. If the first device receives another synchronization beacon message, and the primary beacon timing ID carried in that message is different from the primary beacon timing ID recorded by the first device, then the first device determines that a master device conflict exists.

[0209] If the primary beacon timing ID of the second device is less than that of the primary beacon timing ID of the first device, the primary device of the first device remains unchanged. The first device sends a synchronization beacon correction, in which the primary beacon timing ID of the synchronization beacon correction is the primary beacon timeslot ID of the first device, so that the second device can update the synchronization beacon parameters of the primary device and correct its own timing to align with that of the first device.

[0210] Figure 12 The process for selecting the master device is shown when the device types are the same or the default, and the master beacon timing ID is the same.

[0211] When the first device receives a synchronization beacon message from the second device, if the master beacon timing ID of the second device is the same as that of the first device, and if there is a timing deviation between the timing corresponding to the synchronization beacon message and the local timing of the first device, and if the timing deviation is less than or equal to a preset deviation threshold, the master device of the first device remains unchanged, and the timing of the first device can be aligned with that of the second device to avoid mutual interference between the first and second devices.

[0212] If the timing deviation value is greater than the preset deviation threshold, the first device that detects the master device conflict calls a random function. The minimum value of the random range is set to the first device's master beacon timing ID plus 1, and a new master beacon timing ID with a larger value is generated. The first device that detects the master device conflict is promoted to the new master device, and the first device's beacon timing ID is the new master beacon timing ID. The new master device periodically sends synchronization beacon broadcasts when the channel is idle.

[0213] Figure 13 The process for selecting the master device when the device type values ​​are different is shown.

[0214] Upon detecting a master device conflict, the first device receives a synchronization beacon message from the second device. The first device determines whether the device type value carried in the synchronization beacon message is greater than the device type value of the first device's master device. If the device type value carried in the synchronization beacon message is greater than the device type value of the first device's master device, the second device is selected as the master device. Furthermore, the first and second devices align their timing and forward the synchronization beacon when the channel is idle.

[0215] If the device type value carried in the synchronization beacon message is less than the device type value of the primary device of the first device, the primary device of the first device remains unchanged. The first device sends a synchronization beacon correction to notify the second device to adjust its own timing to align with the timing of the primary device of the first device, and updates the recorded primary device information to the primary device information in the synchronization beacon correction message, that is, the primary device of the first device.

[0216] If the primary device type stored locally by the first device is a mobile device, and the primary device type carried by the synchronization beacon is a fixed device (which is greater than the primary device type of the first device), the synchronization beacons of the first device and the second device are time-aligned. The primary device carried in the synchronization beacon message is selected as the primary device, and the first device attempts to forward the synchronization beacon when the channel is idle.

[0217] For example, if the first device stores its master device type locally as a fixed device, but the synchronization beacon carries a master device type as a mobile device (less than the first device's master device type), the first device's locally stored master device type remains unchanged. The first device sends a synchronization beacon correction to notify the second device to adjust its timing to align with the first device's master device's timing. If the second device is the master device, after aligning its timing with the first device's master device, it needs to update itself to a slave device and attempt to forward the synchronization beacon when the channel is idle.

[0218] Optionally, if the fixed equipment is further subdivided into low-power fixed equipment and high-power fixed equipment, and the power of the high-power fixed equipment is higher than that of the low-power fixed equipment, the high-power fixed equipment shall be selected as the new main equipment when a main equipment conflict occurs.

[0219] This will be illustrated with examples. Figure 14The diagram illustrates the situation before master device conflict resolution. Area A contains multiple devices, with A0 as the master device. Devices in Area A use A0 as their timing reference, for example, the timing propagation from A1 to A3 outwards (A0->A1->A2->A3). The dotted circle containing A0 represents the coverage area of ​​Area A. Area B contains multiple devices, with B0 as the master device. Devices in Area B use B0 as their timing reference, for example, the timing propagation from B1 and B2 outwards (B0->B1 / B2). The dotted circle containing B0 represents the coverage area of ​​Area B. A3 is located in the overlapping coverage area of ​​Areas A and B. A3 can receive synchronization beacon messages from device B1 in Area B and discovers that B1's master device is B0, which differs from the master device A0 stored locally in A3. Therefore, the master device conflict needs to be resolved.

[0220] Taking two main devices as examples, assuming that A3 and B1 are of the same type (i.e., A0 and B0 are of the same type), and that the main devices are both mobile devices, the initial configuration of the two mobile devices is shown in Table 8.

[0221] Table 8 Initial configuration of the two mobile devices

[0222]

[0223] When A3 receives a synchronization beacon forward from B1, it parses the synchronization beacon information unit in the synchronization beacon forward, identifies that the master device type of B1 and the master device type of A3 are the same based on the master beacon timing ID, and further compares the master beacon timing ID.

[0224] Because the master beacon timing ID of A3 is greater than that of B1, and the default master device contention rule is to select the device with the larger master beacon timing ID as the master device, A3 selects the master device with the larger master beacon timing ID as the new master device. That is, A3's master device remains unchanged. A3 sends a synchronization beacon correction in an idle time slot. The synchronization beacon correction contains the following information: (beacon type BT=11 (synchronization beacon correction), beacon hop count BH=3 (3rd propagation TDMA timing) or beacon hop count BH=0 (not synchronization beacon forwarding; synchronization beacon correction within the system can set the beacon hop count BH to 0), master device MasterID=200), so as to notify the B1 device to update its synchronization parameters and correct its own timing to align with A3's master device.

[0225] B1 receives the synchronization beacon correction sent by A3, determines that B1's master beacon timing ID is less than A3's master beacon timing ID, aligns its timing with A3's timing, and selects A3's master device A0 as the master device. B1 attempts to forward the synchronization beacon when the channel is idle. The synchronization beacon information unit in the synchronization beacon forwarding is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=4 (4th propagation TDMA timing, BH set to A3.BH+1), master device MasterID=200).

[0226] Master device B0 in area B receives a synchronization beacon forwarding message from B1. It determines that B1's master beacon timing ID is greater than B0's master beacon timing ID, aligns its timing with B1's, updates itself to a slave device, and selects B1's master device A0 as the new master. B0 attempts to forward the synchronization beacon when the channel is idle. The synchronization beacon information unit in the forwarding message is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=5 (5th propagation TDMA timing, BH set to B1.BH+1), master device MasterID=200).

[0227] Similarly, B2 receives the synchronization beacon forwarding sent by B0, determines that B0's master beacon timing ID is greater than B2's master beacon timing ID, aligns its timing with B0's, and selects B0's master device A0 as the master device. B2 attempts to forward the synchronization beacon when the channel is idle. The synchronization beacon information unit in the synchronization beacon forwarding is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=6 (6th propagation TDMA timing, BH set to B0.BH+1), master device MasterID=200).

[0228] After the master device conflict is resolved, devices in region B and region A share the same master device. In this embodiment, the master device for all devices is A0, and the timing of all devices is synchronized. The coverage area diagram after the master device conflict is resolved is shown below. Figure 15 As shown.

[0229] Scenario 3: Deregistration / Loss of Master Equipment within the Communication System

[0230] The master device can periodically broadcast synchronization beacons, and the slave device can start a beacon interval timer (BeaconInterval) to maintain a heartbeat connection with the master device. When the beacon interval timer expires and the slave device does not receive a synchronization beacon broadcast or beacon forward, it loses connection with the master device, considers the master device lost, and enters a timing out-of-synchronization state. The slave device needs to reselect a new master device, and the selection process can be found in the process described in the scenario below or above. Figure 3 The process is shown below.

[0231] When the master device's battery level drops to low or is completely depleted, or when it executes any of the following commands: remote shutdown, activation of scanning or roaming, power off, or channel switching, the master device can proactively deregister itself before executing these commands. It can send a synchronization beacon message carrying a master device deregistration instruction to notify its slave devices to select a new master device as soon as possible. The selected new master device can use the source master device's ID and timing sequence. Slave devices that are already in a timing-synchronized state can continue to synchronize with the new master device using their existing timing sequence without being affected. The rules for selecting the new master device can be found in [link to relevant documentation]. Figure 4 The process shown is not elaborated here.

[0232] To illustrate with an example, when a user shuts down the master device A, the master device A receives the shutdown command. Before executing the shutdown command, if there is an idle time slot on the channel, the master device A sends a synchronization beacon message carrying the active cancellation of the master device status in the idle time slot, releasing the master device qualification so that the slave devices can select a new master device as early as possible.

[0233] Taking a communication system with three devices A, B, and C as an example, before the master device A shuts down, it issues a deregistration instruction. Upon receiving the deregistration instruction, B and C compete to select a new master device. The initial configuration of the three devices is shown in Table 9. Figure 16 The signaling diagram shows the competition between B and C to select a new master device.

[0234] Table 9 Initial configuration of the three devices

[0235]

[0236] Master device A receives a shutdown command. Before executing the shutdown command, Master device A queries the channel. If an idle time slot is detected, Master device A sends a synchronization beacon message in the idle time slot. The synchronization beacon information unit in the synchronization beacon message is (BT=01, BH=0, MasterID=200, MasterOffline=1).

[0237] B and C receive the synchronization beacon message from the master device A and parse it to find that the master device deregistration instruction is 1, indicating that the master device A has actively released its master device status. Both B and C are eligible to apply to become the backup master device (i.e., the new master device). B and C use a random backoff contention mechanism to send a synchronization beacon request to apply to become the backup master device.

[0238] Assuming that device C has sufficient power (above 70%), C uses a random backoff contention mechanism to first issue a synchronization beacon request to become the master device. The synchronization beacon request contains the following information units: (BT=00, BH=1, MasterID=80, MasterOffline=0). After sending the synchronization beacon request, C enters a waiting period for a response from the synchronization beacon.

[0239] Before sending its own synchronization beacon request, B receives C's synchronization beacon request, cancels the transmission of its own request, replies with a synchronization beacon response, and appoints C as the new master. The synchronization beacon response contains the following information unit: (BT=10, BH=0, MasterID=80, MasterOffline=0). Since B's local mapping ID is larger than the MasterID carried in C's synchronization beacon request, B regenerates a mapping ID smaller than the new master beacon timing ID. For example, it calls the random function RandRange(6, 79) to regenerate a mapping ID between 6 and 79: 70.

[0240] While waiting for a beacon response, C receives a synchronization beacon response from B. C determines that the master beacon timing ID carried in the synchronization beacon response matches its mapped ID, confirming that it has been appointed as the master device. C then updates itself to become the new master device. C checks the locally stored deregistration flag of the source master device. If the deregistration flag is 1, it means the source master device actively deregistered. C can reuse the source master device's ID, i.e., the master beacon timing ID is set to the source master beacon timing ID, and C is selected as the backup master device of the source master device. C starts a synchronization beacon interval timer (BeaconIntervalTimer) to periodically broadcast synchronization beacons. The synchronization beacon information unit in the broadcast is (beacon type BT=01 (master device synchronization beacon broadcast), beacon hop count BH=0, master device MasterID=source master beacon timing ID=200).

[0241] B receives a synchronization beacon broadcast from backup master device C. It determines that C's master device and B's source master device are the same, and the timing deviation is less than a preset deviation threshold (e.g., 1.25ms). B synchronizes with C, that is, it maintains the timing of the source master device A. When the channel is idle, it forwards the synchronization beacon. The synchronization beacon information unit in the synchronization beacon forwarding is (beacon type BT=10 (slave device synchronization beacon forwarding), beacon hop count BH=1 (first propagation TDMA timing), master device MasterID=200).

[0242] The method described above for determining master device information enables devices in different communication coverage areas to use a unified timing sequence for timing synchronization and business communication, thereby extending the timing sequence to a larger communication coverage area and solving the problem of conflict or loss of master devices in overlapping coverage areas.

[0243] Furthermore, this application embodiment also provides a device, including at least one processor and a memory connected to the processor, wherein: the memory is used to store a computer program; the processor is used to execute the computer program so that the device can implement the above-described method for determining master device information.

[0244] This application also provides a computer program product including computer-readable instructions, which, when executed on a device, cause the device to implement the method for determining master device information as described above.

[0245] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by a device, the device can implement the above-described method for determining master device information.

[0246] This application embodiment also provides a device for determining master device information, applied to a first device, wherein the master device information of the first device is first master device information, and the optional structure of the device for determining master device information is as follows: Figure 17 As shown, it may include: a receiving unit 10, a determining unit 20, a sending unit 30, and a synchronization unit 40.

[0247] The receiving unit 10 is used to receive a synchronization beacon message sent by the second device, the synchronization beacon message carrying the second master device information recorded by the second device.

[0248] The determining unit 20 is used to determine the third master device information based on the first master device information and the second master device information, wherein the current master device information of the first device is the third master device information.

[0249] The sending unit 30 is used to send a synchronization beacon correction message when the third master device information is the first master device information. The synchronization beacon correction message carries the third master device information so that the second device can synchronize with the first device and confirm that the master device information of the second device is the third master device information. The synchronization beacon correction message is a response message to the synchronization beacon message. The third master device information is the master device information for system timing synchronization.

[0250] Synchronization unit 40 is used to synchronize the first device with the second device based on the synchronization beacon message when the third master device information is the second master device information.

[0251] In one possible implementation, the determining unit 20 determines either the first master device information or the second master device information as the third master device information based on the device type value of the first master device information and the second master device information, and a preset master device competition rule. The device type value is determined based on at least one of the following: device type, device location, device power, device battery capacity, and device standby time.

[0252] In one possible implementation, when the device type values ​​in the first master device information and the second master device information are the same, the determining unit 20 determines the first master device information or the second master device information as the third master device information based on the numerical values ​​of the device identifiers in the first master device information and the second master device information, and a preset master device competition rule.

[0253] In one possible implementation, when the device identifier values ​​in the first master device information and the second master device information are the same, if the timing deviation between the timing of the first device and the timing of the synchronization beacon message is greater than a preset deviation threshold, the determining unit 20 determines the third master device information based on the device information of the first device; if the timing deviation between the timing of the first device and the timing of the synchronization beacon message is less than or equal to the preset deviation threshold, the first master device information is determined as the third master device information.

[0254] In one possible implementation, the determining unit 20 determines the third master device information based on the device information of the first device, including: determining the device identifier in the third master device information according to the preset master device identifier generation rules.

[0255] In one possible implementation, when the length of the device identifier in the master device information is greater than or equal to the length of the complete device identifier of the device in the system, the determining unit 20 uses the device identifier of the first device itself as the device identifier in the third master device information; when the length of the device identifier in the master device information is less than the length of the complete device identifier of the device in the system, the determining unit 20 calculates the mapping value of its own device identifier based on the first calculation rule, and uses the mapping value as the device identifier in the third master device information. The size relationship between the mapping value and the device identifier in the second master device information satisfies the preset master device competition rule.

[0256] In one possible implementation, the sending unit 30 is further configured to send a first synchronization beacon request when the first device is in an unsynchronized state. The master device information in the first synchronization beacon request is obtained based on the device information of the first device. The first synchronization beacon request is used to indicate that the master device information in the first synchronization beacon request is used as the master device information for system timing synchronization.

[0257] In one possible implementation, the receiving unit 10 is further configured to receive a second synchronization beacon request sent by a third device, wherein the master device information in the second synchronization beacon request is a fourth master device information obtained based on the device information of the third device; the determining unit 20 is further configured to determine the master device information for system timing synchronization based on the device information of the first device and the fourth master device information, and when the fourth master device information is determined to be the master device information for system timing synchronization, the fourth master device information is recorded as the master device information of the first device, and the sending unit 30 is triggered to send a first synchronization beacon response to the third device, wherein the first synchronization beacon response carries the fourth master device information, so that the third device sets itself as the master device based on the first synchronization beacon response.

[0258] In one possible implementation, the determining unit 20 determines the fourth master device information as the master device information for system timing synchronization based on the size of the device type values ​​of the device information of the first device and the fourth master device information, and a preset master device competition rule; or, when the device type values ​​of the device information of the first device and the fourth master device information are the same, the fourth master device information is determined as the master device information for system timing synchronization.

[0259] In one possible implementation, when the determining unit 20 determines, based on the device information of the first device and the device type value of the fourth master device information, and a preset master device competition rule, that the fourth master device information is not the master device information for system timing synchronization, it prohibits the sending unit 30 from sending the first synchronization beacon response to the third device.

[0260] In one possible implementation, the receiving unit 10 is further configured to receive a master device deregistration message, which indicates that the master device information in the master device deregistration message is no longer used as the master device information for system timing synchronization. After the receiving unit 10 receives the master device deregistration message, the first device changes to an unsynchronized state. The receiving unit 10 is also configured to trigger the sending unit 30 to send a first synchronization beacon request if it does not receive a synchronization beacon message sent by the fourth device within a preset time. Correspondingly, the receiving unit 10 is also configured to receive a second synchronization beacon response. If the determining unit 20 determines that the master device information carried in the second synchronization beacon response indicates that the first device is the master device, then the first device is determined to be the new master device, and the master device information carried in the second synchronization beacon response is the master device information for system timing synchronization.

[0261] In one possible implementation, after the determining unit 20 determines that the first device is the new master device, it triggers the sending unit 30 to send a synchronization beacon broadcast, and the master device information in the synchronization beacon broadcast is obtained based on the device information of the first device.

[0262] This application also provides a device for determining master device information, applied to a second device, wherein the master device information of the second device is second master device information. The optional structure of the device for determining master device information is as follows: Figure 18 As shown, it may include: a transmitting unit 100, a receiving unit 200, and a synchronization unit 300.

[0263] The sending unit 100 is used to send a synchronization beacon message to the first device. The synchronization beacon message carries the second master device information recorded by the second device, and the master device information of the first device is the first master device information.

[0264] The receiving unit 200 is used to receive a synchronization beacon correction message sent by the first device. The synchronization beacon correction message carries third master device information, which is determined by the first device based on the first master device information and the second master device information.

[0265] Synchronization unit 300 is used to synchronize with the first device based on the synchronization beacon correction message, and to change the master device information of the second device to the third master device information, which is the master device information for system timing synchronization.

[0266] For a detailed description of each unit in the above-described device for determining master equipment information, please refer to the above-described method embodiments, which will not be described in detail here.

[0267] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0268] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0269] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0270] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method for determining master device information, characterized in that, Applied to a first device, wherein the master device information of the first device is first master device information, the method includes: The first device receives a synchronization beacon message sent by the second device, the synchronization beacon message carrying the second master device information recorded by the second device; The first device determines the third master device information based on the first master device information and the second master device information, and the current master device information of the first device is the third master device information; When the third master device information is the first master device information, the first device sends a synchronization beacon correction message, which carries the third master device information, so that the second device synchronizes with the first device and confirms that the master device information of the second device is the third master device information. The synchronization beacon correction message is a response message to the synchronization beacon message, and the third master device information is the master device information for system timing synchronization. When the third master device information is the second master device information, the first device synchronizes with the second device according to the synchronization beacon message.

2. The method according to claim 1, characterized in that, The first device determines the third master device information based on the first master device information and the second master device information, including: The first device determines the first master device information or the second master device information as the third master device information based on the device type values ​​of the first master device information and the second master device information, and a preset master device competition rule.

3. The method according to claim 2, characterized in that, The device type value is determined based on at least one of the following: device type, device location, device power, device battery capacity, and device standby time.

4. The method according to claim 1, characterized in that, The first device determines the third master device information based on the first master device information and the second master device information, including: When the device type values ​​in the first master device information and the second master device information are the same, the first device determines the first master device information or the second master device information as the third master device information based on the numerical values ​​of the device identifiers in the first master device information and the second master device information, and a preset master device competition rule.

5. The method according to claim 1, characterized in that, The first device determines the third master device information based on the first master device information and the second master device information, including: When the device identifier values ​​in the first master device information and the second master device information are the same, if the timing deviation between the timing of the first device and the timing of the synchronization beacon message is greater than a preset deviation threshold, the third master device information is determined based on the device information of the first device. If the timing deviation between the timing of the first device and the timing of the synchronization beacon message is less than or equal to a preset deviation threshold, the first master device information is determined as the third master device information.

6. The method according to claim 5, characterized in that, The step of determining the third master device information based on the device information of the first device includes: determining the device identifier in the third master device information according to a preset master device identifier generation rule.

7. The method according to claim 6, characterized in that, The step of determining the device identifier in the third master device information according to the preset master device identifier generation rule includes: When the length of the device identifier in the master device information is greater than or equal to the length of the complete device identifier of the device in the system, the first device uses its own device identifier as the device identifier in the third master device information. When the length of the device identifier in the master device information is less than the length of the complete device identifier of the device in the system, the first device calculates the mapping value of its own device identifier based on the first calculation rule, and uses the mapping value as the device identifier in the third master device information. The size relationship between the mapping value and the device identifier in the second master device information satisfies the preset master device competition rule.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: When the first device is in an unsynchronized state, the first device sends a first synchronization beacon request. The master device information in the first synchronization beacon request is obtained based on the device information of the first device. The first synchronization beacon request is used to indicate that the master device information in the first synchronization beacon request is used as the master device information for system timing synchronization.

9. The method according to claim 1, characterized in that, The method further includes: The first device receives a second synchronization beacon request sent by the third device, wherein the master device information in the second synchronization beacon request is fourth master device information obtained based on the device information of the third device; The first device determines the master device information for system timing synchronization based on the device information of the first device and the fourth master device information; When the fourth master device information is determined to be the master device information for system timing synchronization, the first device records the fourth master device information as the master device information of the first device; The first device sends a first synchronization beacon response to the third device, the first synchronization beacon response carrying the fourth master device information, so that the third device sets itself as the master device based on the first synchronization beacon response.

10. The method according to claim 9, characterized in that, The first device determines the master device information for system timing synchronization based on its own device information and the fourth master device information, including: The first device determines the fourth master device information as the master device information for system timing synchronization based on the device information of the first device and the device type value of the fourth master device information; Alternatively, when the device type values ​​of the first device and the fourth master device information are the same, the fourth master device information is determined to be the master device information for system timing synchronization.

11. The method according to claim 9, characterized in that, The method further includes: When the first device determines, based on the device information of the first device and the device type value of the fourth master device information, that the fourth master device information is not the master device information for system timing synchronization, the first device will not send the first synchronization beacon response to the third device.

12. The method according to claim 8, characterized in that, The first device being in an unsynchronized state includes: The first device receives a master device deregistration message, which indicates that the master device information in the master device deregistration message will no longer be used as the master device information for system timing synchronization. The first device has been changed to an unsynchronized state; The first device sends a first synchronization beacon request, including: If the first device does not receive a synchronization beacon message from the fourth device within a preset time, the first device sends a first synchronization beacon request. The method further includes: the first device receiving a second synchronization beacon response after sending the first synchronization beacon request; If the first device determines that the master device information carried in the second synchronization beacon response indicates that the first device is the master device, then the first device determines itself as the new master device.

13. The method according to claim 12, characterized in that, The method further includes: After the first device determines itself to be the new master device, the first device sends a synchronization beacon broadcast, and the master device information in the synchronization beacon broadcast is obtained based on the device information of the first device.

14. A method for determining master device information, characterized in that, Applied to a second device, wherein the master device information of the second device is second master device information, the method includes: The second device sends a synchronization beacon message to the first device. The synchronization beacon message carries the second master device information recorded by the second device, and the master device information of the first device is the first master device information. The second device receives a synchronization beacon correction message sent by the first device. The synchronization beacon correction message carries third master device information, which is determined by the first device based on the first master device information and the second master device information. The second device synchronizes with the first device based on the synchronization beacon correction message, and changes the master device information of the second device to the third master device information, which is the master device information for system timing synchronization.

15. A device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to enable the device to implement the method for determining master device information as described in any one of claims 1 to 14.