Clock switching methods, devices, equipment, media, and products based on satellite networks
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本申请提供一种基于卫星网络的时钟切换方法、装置、设备、介质及产品,解决了空天地跨域切换过程中的时钟抖动与控制失效问题
[0021]第五方面,本申请提供一种计算机程序产品,该计算机程序产品被存储在存储介质中,当该计算机程序产品被计算机执行时以实现上述第一方面的方法。
Smart Images

Figure CN122579289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a clock switching method, apparatus, device, medium and product based on satellite networks. Background Technology
[0002] As Industry 4.0 evolves into Industry 5.0, the application scenarios of industrial mobile devices, such as the combination of Automated Guided Vehicles (AGVs) and robotic arms, are expanding from enclosed indoor workshops to outdoor storage yards, ports, and even field environments. The 6th Generation (6G) network proposes a vision of integrated air-space-ground communication, utilizing low-Earth orbit satellites to provide connectivity for outdoor areas or areas without terrestrial base station coverage.
[0003] However, when a robot moves from indoors (a high-precision clock domain dominated by terrestrial network base stations) to outdoors (a wide-area clock domain dominated by satellites), due to the significant differences in transmission links between terrestrial and satellite networks, even if both trace back to the Global Navigation Satellite System, there may still be millisecond-level phase deviations when they reach the terminal. This can cause the Time-Sensitive Networking (TSN) clock to jump instantaneously, and the robot's servo drive may misinterpret this as a communication failure or synchronization loss, triggering a safety emergency stop. Summary of the Invention
[0004] This application provides a clock switching method, apparatus, device, medium, and product based on satellite networks, which solves the problems of clock jitter and control failure during cross-domain switching between air, space, and ground.
[0005] In a first aspect, embodiments of this application provide a clock switching method based on a satellite network. The method includes: receiving a first PTP message from an indoor base station and a second PTP message from satellite broadcast, wherein the first PTP message and the second PTP message are received simultaneously when a first device is detected leaving the coverage area of the indoor base station; calculating an original phase deviation based on a first time value of a first clock source corresponding to the first PTP message and a second time value of a second clock source corresponding to the second PTP message; calculating a frequency compensation factor based on the original phase deviation and a preset time window length; wherein the frequency compensation factor characterizes the rate of change of clock scaling; and adjusting the frequency step of a local clock within the preset time window length based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source.
[0006] The technical solution provided in this application brings at least the following beneficial effects: by receiving a first PTP message from an indoor base station and a second PTP message from satellite broadcast, wherein the first PTP message and the second PTP message are received simultaneously when the first device is detected to have left the coverage area of the indoor base station; calculating the original phase deviation based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message; calculating the frequency compensation factor based on the original phase deviation and a preset time window length; wherein the frequency compensation factor is used to characterize the rate of change of clock scaling; and adjusting the frequency step of the local clock within the preset time window length based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source. This solution does not perform a direct master clock source switch during the handover from a terrestrial network to a non-terrestrial network. Instead, it calculates the phase difference between the source clock and the target clock and uses a virtual phase-locked loop (V-PLL) to linearly stretch or compress the local clock frequency within a preset transition time window. This solves the clock jitter and control failure problem for mobile collaborative robots during the 6G air-space-ground cross-domain handover process.
[0007] One possible implementation is that, based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message, the calculation of the original phase deviation includes: taking the time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message as the original phase deviation.
[0008] Another possible implementation involves calculating the frequency compensation factor based on the original phase deviation and the preset time window length, including: calculating the ratio between the original phase deviation and the preset time window length; and using the ratio as the frequency compensation factor.
[0009] In another possible implementation, before adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, the method further includes: determining a target control mode that matches the current environmental information based on the current environmental information of the satellite; the current environmental information includes the signal-to-noise ratio (SNR) and expected round-trip time (RTT) of the satellite link; after adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, the method further includes: adjusting the control mode of the first device to the target control mode within the preset time window.
[0010] Another possible implementation, the aforementioned target control mode includes: modifying the Time-Aware Shaper (TAS) gating table of the TSN, closing the transmission time window of the high-frequency force control flow, and opening the transmission time window of the low-frequency trajectory planning flow at the same time.
[0011] Another possible implementation of the above method further includes: when the first device is a robot, when the signal transmission link of the indoor base station is detected to be disconnected, predicting the current position information of the robot's joints based on the joint motion information of the robot collected at the previous moment; transmitting the current position information to the robot's servo driver, so as to control the movement of the robot's joints through the servo driver.
[0012] Secondly, embodiments of this application provide a clock switching device based on a satellite network, comprising: a receiving module, a processing module, and an adjustment module;
[0013] The receiving module is configured to receive a first PTP message from an indoor base station and a second PTP message from satellite broadcasting, wherein the first PTP message and the second PTP message are received simultaneously when the first device is detected to have left the coverage area of the indoor base station; the processing module is configured to calculate the original phase deviation based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message; the processing module is further configured to calculate a frequency compensation factor based on the original phase deviation and a preset time window length; wherein the frequency compensation factor is used to characterize the rate of change of clock scaling; the adjustment module is configured to adjust the frequency step of the local clock within the preset time window length based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source.
[0014] One possible implementation is that the above processing module is specifically used to: take the time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message as the original phase deviation.
[0015] Another possible implementation, the above processing module is specifically used to: calculate the ratio between the original phase deviation and the preset time window length; and use the ratio as the frequency compensation factor.
[0016] In another possible implementation, the adjustment module is further configured to: before adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, determine a target control mode that matches the current environmental information based on the current environmental information of the satellite; the current environmental information includes the signal-to-noise ratio (SNR) and expected round-trip time (RTT) of the satellite link; the adjustment module is further configured to: after adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, adjust the control mode of the first device to the target control mode within the preset time window.
[0017] Another possible implementation, the aforementioned target control mode includes: modifying the TSN's TAS gating table, closing the transmission time window of high-frequency force control flow, and opening the transmission time window of low-frequency trajectory planning flow at the same time.
[0018] In another possible implementation, the above processing module is further configured to: when the first device is a robot, and upon detecting that the signal transmission link of the indoor base station is disconnected, predict the current position information of the robot's joints based on the joint motion information of the robot collected at the previous moment; transmit the current position information to the robot's servo driver, so as to control the movement of the robot's joints through the servo driver.
[0019] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory stores a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the method of the first aspect described above.
[0020] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a computer, implement the method of the first aspect described above.
[0021] Fifthly, this application provides a computer program product stored in a storage medium, which, when executed by a computer, implements the method described in the first aspect.
[0022] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0023] The beneficial effects of the second to sixth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0024] Figure 1A schematic diagram of the network architecture for a satellite network-based clock switching method provided in this application embodiment;
[0025] Figure 2 A flowchart illustrating a clock switching method based on a satellite network provided in this application embodiment;
[0026] Figure 3 A flowchart illustrating another clock switching method based on a satellite network provided in this application embodiment;
[0027] Figure 4 A flowchart illustrating another clock switching method based on a satellite network provided in this application embodiment;
[0028] Figure 5 A flowchart illustrating another clock switching method based on a satellite network provided in this application embodiment;
[0029] Figure 6 A flowchart illustrating another clock switching method based on a satellite network provided in this application embodiment;
[0030] Figure 7 A flowchart illustrating the implementation process of a clock switching method based on a satellite network, provided in this application embodiment;
[0031] Figure 8 A clock switching timing diagram in a satellite network-based clock switching method provided in an embodiment of this application;
[0032] Figure 9 A schematic diagram of a clock switching device based on a satellite network provided in an embodiment of this application;
[0033] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0034] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0035] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0036] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0037] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0038] As Industry 4.0 evolves into Industry 5.0, the application scenarios of industrial mobile devices, such as the combination of Automated Guided Vehicles (AGVs) and robotic arms, are expanding from enclosed indoor workshops to outdoor storage yards, ports, and even field environments. 6G networks propose a vision of integrated air-space-ground communication, utilizing low-Earth orbit (LEO) satellites to provide connectivity in outdoor areas or areas without terrestrial base station coverage. Time-Sensitive Networking (TSN) is a core technology ensuring microsecond-level synchronization between servos and controllers within a robot. However, when robots move from indoor environments (with a high-precision clock domain dominated by terrestrial base stations) to outdoor environments (with a wide-area clock domain dominated by satellites), they face drastic changes in the network environment.
[0039] Currently, the relevant technical solutions mainly fall into the following two categories:
[0040] Traditional mobile communication handover is based on hard handover (Reference Signal Received Power, RSRP) or "Make-Before-Break" (MBB) handover. While maintaining the connection, this results in a phase jump. The IEEE 1588 / Precision Time Protocol (PTP) Best Master Clock Algorithm (BMCA) directly switches the master clock when a new, better clock source is detected.
[0041] However, the above-mentioned related technical solutions have the following drawbacks:
[0042] 1. Risk of "Emergency Stop" Caused by Clock Phase Jump: The transmission links of terrestrial 5G networks and satellite networks differ significantly. Even if both trace back to the Global Navigation Satellite System (GNSS), there may still be millisecond-level phase deviations when they reach the terminal. The "hard handover" of existing technologies can cause a sudden jump in the Time-Sensitive Networking (TSN) clock. The robot's servo drive may misinterpret this as a communication failure or loss of synchronization, triggering an emergency stop.
[0043] 2. Lack of adaptive degradation to service capabilities: Indoor 5G supports low latency (<5ms) and high bandwidth, suitable for delicate operations such as force control; satellite links have high latency (>20ms) and large jitter. Existing technology does not link the robot's control mode when switching networks, causing it to still attempt to send high-frequency force control commands in the satellite environment, inevitably resulting in a large number of packet losses and control divergence.
[0044] 3. Control blind spot during switching: At the moment of clock source switching, there is a brief interruption of physical layer link reconstruction, and the existing technology lacks motion prediction compensation for this window period.
[0045] This application aims to address the clock jitter and control failure issues of mobile collaborative robots during 6G air-to-ground cross-domain handover. It employs a method combining virtual clock smoothing and functional safety degradation to eliminate clock phase jumps during handover and automatically adjusts the robot's operating mode based on link quality, ensuring the robot remains connected, doesn't stop abruptly, and operates continuously during cross-domain transitions.
[0046] The present application provides a clock switching method, apparatus, device, medium, and product based on satellite networks, which can be applied to wide-area heterogeneous spatiotemporal interconnection scenarios.
[0047] In one possible scenario: a multinational agricultural company deploys agricultural robots in farmlands across countries A, B, and C, managing them centrally through an Internet of Things (IoT) platform. For example, after a drone in country A completes soybean planting, the data is synchronized to a harvesting robot in country B, guiding it to adjust its harvesting time and simultaneously optimizing irrigation plans using satellite remote sensing data.
[0048] To address the aforementioned technical problems, embodiments of this application provide a clock switching method, apparatus, device, medium, and product based on a satellite network. The method involves receiving a first PTP message from an indoor base station and a second PTP message from satellite broadcasting, wherein the first and second PTP messages are received simultaneously when a first device is detected leaving the coverage area of the indoor base station. Based on a first time value of a first clock source corresponding to the first PTP message and a second time value of a second clock source corresponding to the second PTP message, an initial phase deviation is calculated. Based on the initial phase deviation and a preset time window length, a frequency compensation factor is calculated, whereby the frequency compensation factor characterizes the rate of change of clock scaling. Based on the frequency compensation factor and the second time value, the frequency step of the local clock is adjusted within the preset time window length to synchronize the local clock with the second clock source. This solution does not perform a direct master clock source switch during the handover from a terrestrial network to a non-terrestrial network. Instead, it calculates the phase difference between the source clock and the target clock and uses a virtual phase-locked loop (V-PLL) to perform a slight linear stretching or compression of the local clock frequency within a preset transition time window. This solves the clock jitter and control failure problems of mobile collaborative robots during the 6G air-space-ground cross-domain handover process.
[0049] The following description, in conjunction with the accompanying drawings, details the satellite network-based clock switching method, apparatus, device, medium, and product provided in the embodiments of this application.
[0050] Figure 1 This illustration shows a network architecture for a satellite network-based clock switching method according to an embodiment of this application. For example... Figure 1 As shown, the network architecture includes a satellite network-based clock switching device 101 and a terminal device 102. The satellite network-based clock switching device 101 and the terminal device 102 are interconnected.
[0051] In some embodiments, the satellite network-based clock switching device 101 may be a server, a computer, or a processor or processing unit within a server or computer. The server may be a single server or a server cluster comprising multiple servers. It should be noted that this application embodiment does not limit the specific device form of the satellite network-based clock switching device 101. Figure 1 The example shown is a clock switching device 101 based on a satellite network, which is a single server.
[0052] In some embodiments, the terminal device may be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and the embodiments of this application do not specifically limit it. Figure 1 The example shown is a mobile phone, with terminal device 102 as an example.
[0053] In some embodiments, the satellite network-based clock switching device 101 is based on the local high-precision hardware clock (T) of the terminal device 102. local Using an indoor base station as a unified reference, a first PTP message from an indoor base station and a second PTP message from satellite broadcast are received simultaneously when the first device is detected to have left the coverage area of the indoor base station. Based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message, an original phase deviation is calculated. Based on the original phase deviation and a preset time window, a frequency compensation factor is calculated. The frequency compensation factor is used to characterize the rate of change of clock scaling. Based on the frequency compensation factor and the second time value, the frequency step of the local clock is adjusted within the preset time window to synchronize the local clock with the second clock source.
[0054] It should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As network architectures evolve, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0055] See Figure 2 This is a flowchart illustrating a clock switching method based on a satellite network provided in an embodiment of this application. Figure 2 As shown, the satellite network-based clock switching method provided in this application embodiment can be implemented by the above-mentioned satellite network-based clock switching device, specifically including the following steps 201 to 204.
[0056] Step 201: The satellite network-based clock switching device receives a first PTP message from an indoor base station and a second PTP message from satellite broadcast.
[0057] The first PTP message and the second PTP message mentioned above are PTP messages received simultaneously when the first device is detected to have left the coverage area of the indoor base station.
[0058] In some embodiments, the first device includes, but is not limited to, an industrial mobile robot.
[0059] In some embodiments, the first device leaves the coverage area of the aforementioned indoor base station, that is, the first device leaves the signal coverage range of the current indoor base station, or the first device is outside the coverage area of the aforementioned indoor base station, etc.
[0060] It should be noted that PTP messages are a protocol used to achieve high-precision time synchronization over local area networks or wide area networks, and are especially suitable for systems and applications with extremely high time synchronization requirements.
[0061] It should be noted that the core of the simultaneously received PTP messages lies in the synchronization snapshot based on the local high-precision hardware clock (Local PHC), and does not mean that the PTP messages of the base station and the satellite arrive at the same nanosecond in physical space.
[0062] Step 202: The satellite network-based clock switching device calculates the original phase deviation based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message.
[0063] In some embodiments, the first time value of the first clock source corresponding to the first PTP message is T. gNB The value of the base station source clock.
[0064] For example, in 3GPP standard terminology, 5G base stations are called gNB (Next Generation NodeB). Even for 6G networks, academia and industry generally use gNB or 6G-gNB to refer to base stations.
[0065] In some embodiments, the second time value of the second clock source corresponding to the second PTP message is T.sat The value of the satellite target clock.
[0066] In some embodiments, the aforementioned original phase deviation is the difference between the phase of the signal and the reference phase when the signal is in its initial state or has not been calibrated / compensated, that is, the initial difference between the actual phase of the signal and the theoretical or expected phase.
[0067] It should be noted that the specific process for calculating the original phase deviation between the two is described as follows: using the local high-precision hardware clock (T) built into the terminal OBU. local This serves as a unified reference system. When a PTP message is received from the base station, the offset between the base station time and the local time is calculated. gNB When a satellite PTP message is received, the offset between the satellite time and the local time is calculated. sat Subsequently, at any chosen local reference time t0, the system calculates the virtual time T of the base station at that moment through mapping. gNB (t0) and the satellite's virtual time T sat (t0), thus obtaining the absolutely pure original phase deviation. .
[0068] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 202 above can be implemented through step 202a as follows.
[0069] Step 202a: The clock switching device based on the satellite network takes the time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message as the original phase deviation.
[0070] In some embodiments, the above-mentioned satellite network-based clock switching device can specifically calculate the original phase deviation using the following formula 1:
[0071] ΔP raw =T sat (t0) - T gNB (t0); (Formula 1)
[0072] Where, ΔP raw The original phase deviation; T sat (t0) represents the value of the clock source recorded by the satellite target clock at the same physical time t0; T gNB (t0) is the value of the clock source recorded by the base station source clock at the same physical time t0.
[0073] Thus, during the switch from a terrestrial network to a non-terrestrial network (NTN), a direct master clock source switch is not performed. Instead, the time accuracy is improved by calculating the phase difference between the source clock and the target clock, thus meeting the high reliability requirements.
[0074] Step 203: The satellite network-based clock switching device calculates the frequency compensation factor based on the original phase deviation and the preset time window length.
[0075] The frequency compensation factor mentioned above is used to characterize the rate of change of clock scaling.
[0076] In some embodiments, the frequency compensation factor α is a unitless frequency drift rate.
[0077] In some embodiments, the preset time window length is a fixed time interval (e.g., 1 second, 100 milliseconds), within which the system collects data, calculates features, or executes control logic. After the window length expires, the system may slide the window (e.g., move it once every 10 ms) or start a new window.
[0078] In some embodiments, combined with Figure 2 ,like Figure 4 As shown, step 203 above can be implemented through steps 203a and 203b.
[0079] Step 203a: The clock switching device based on the satellite network calculates the ratio between the original phase deviation and the preset time window length.
[0080] Step 203b: The satellite network-based clock switching device uses the ratio as a frequency compensation factor.
[0081] In some embodiments, the frequency compensation factor of the satellite network-based clock switching device described above can be calculated using the following formula 2:
[0082] ;(Formula 2)
[0083] Where α is the frequency compensation factor; ΔP raw For the original phase deviation; W time The preset time window length is the time window for smooth switching.
[0084] It should be noted that the frequency compensation factor α is calculated as follows: 1. Extract the deviation: Obtain the initial original phase difference ΔP from step 202. raw 2. Setting Window: Set the smooth transition time window W based on the current business tolerance level. time (For example, 5 seconds). 3. Calculate the slope: In order to calculate the slope at W... time Within a time limit, ΔP is exactly...raw To achieve phase difference matching (neither overshoot nor undershoot), the clock needs a constant relative speed difference. 4. Formula Definition: The formula for calculating the frequency compensation factor α is:
[0085] .
[0086] For example, suppose the satellite is 5ms ahead of the base station, i.e., ΔP raw =5ms, smooth window setting is W time =5s=5000ms, then α=5 / 5000=0.001. This means that the local clock frequency needs to be increased by 0.1%, that is, become 1.001 times the standard frequency.
[0087] In this way, the frequency compensation factor is calculated by using the original phase deviation and the preset time window length. Based on the frequency compensation factor α, the frequency step of the clock is dynamically fine-tuned, and soft switching is performed in the time dimension to avoid numerical jumps in the local clock counter.
[0088] Step 204: The satellite network-based clock switching device adjusts the frequency step of the local clock within a preset time window based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source.
[0089] In some embodiments, the preset time window length can be set to W for smooth switching. time
[0090] It should be noted that the dynamic fine-tuning of the clock frequency stepping is based on a PTP hardware clock (PHC) inside the TSN network card. It achieves timing by adding a step value (Tick / Addend) to the oscillator every cycle. The specific process is as follows:
[0091] a. Nominal step value: Under normal circumstances, assuming the network card crystal oscillator is 125MHz, the hardware accumulator will add a nominal step value (e.g., 8ns) to the time register every crystal oscillator cycle.
[0092] b. Modification of underlying registers: In response to the frequency compensation factor α calculated in step 203, the V-PLL algorithm directly issues modification instructions to the clock accumulator register of the MAC layer through the operating system kernel interface (such as the adjtime function in Linux).
[0093] c. Dynamic accumulation: The new step value becomes: Tick new =Tick nominal ×(1+α)
[0094] d. Transparent and smooth: In this way, the system time does not jump 5ms all at once, but rather, over the next 5 seconds, each crystal oscillator jump progresses slightly more or less than usual (i.e., the clock rate / slope is changed), and finally, at the end of the transition period, it smoothly slides into the phase of the target clock. To an oscilloscope or watchdog timer, the clock appears absolutely continuous.
[0095] In the satellite network-based clock switching method provided in this application, during the switching from a terrestrial network to a non-terrestrial network, a direct master clock source switch is not performed. Instead, by calculating the phase difference between the source clock and the target clock, a virtual phase-locked loop (V-PLL) is used to linearly stretch or compress the local clock frequency within a preset transition time window. This solves the clock jitter and control failure problems of mobile collaborative robots during the 6G air-space-ground cross-domain switching process.
[0096] In some embodiments, combined with Figure 2 ,like Figure 5 As shown, before step 204 above, the clock switching method based on satellite network provided in this application embodiment may further include the following step 301, and after step 204 above, the clock switching method based on satellite network provided in this application embodiment may further include the following step 302.
[0097] Step 301: The satellite network-based clock switching device determines the target control mode that matches the current environmental information based on the satellite's current environmental information.
[0098] In some embodiments, the aforementioned current environmental information includes the signal-to-noise ratio (SNR) and estimated round-trip time (RTT) of the satellite link.
[0099] In this embodiment of the application, the target control mode includes: modifying the TAS gating table of the TSN, closing the transmission time window of the high-frequency force control flow, and opening the transmission time window of the low-frequency trajectory planning flow at the same time.
[0100] It should be noted that closing the transmission time window of high-frequency force control flow and opening the transmission time window of low-frequency trajectory planning flow at the same time is not just dynamic priority scheduling, but a more advanced dynamic gating list (GCL) reconstruction.
[0101] For example, priority scheduling simply determines which network interface card (NIC) is queued first. If force control data is continuously generated at 1ms intervals, even though it has a lower priority, it will still accumulate in the buffer, eventually leading to satellite link congestion and the collapse of the entire queue.
[0102] It should be noted that the gated scheduling (TAS, IEEE 802.1Qbv) in this application is a mechanism unique to TSN, which controls the opening and closing of physical gates. The specific process is as follows: By modifying the Time-Aware Shaping (TAS) Gate Control List (GCL) of the TSN switching chip, the transmission time window (Time Slot) for 1ms high-frequency force-controlled traffic is directly closed at the physical media access layer, while simultaneously opening the transmission time window for 50ms low-frequency trajectory planning flow. This approach directly blocks high-frequency data from entering weak network links at the source. It is a time-based deterministic scheduling method, offering higher absolute security and congestion prevention capabilities than traditional priority-based statistical multiplexing scheduling.
[0103] In this way, by closing the transmission time window of high-frequency force control flow and opening the transmission time window of low-frequency trajectory planning flow at the same time, the allocation of system resources is optimized and the overall efficiency is improved.
[0104] Step 302: The satellite network-based clock switching device adjusts the control mode of the first device to the target control mode within a preset time window.
[0105] It should be noted that when an industrial mobile robot senses an insurmountable physical deterioration in the quality of the communication network (such as switching from a low-latency 5G terrestrial base station to a high-latency, low-bandwidth 6G satellite network, or even being in a brief communication dead zone), the robot system no longer forcibly maintains its original high-precision, high-frequency working state. Instead, it actively reduces its own operational complexity, control frequency, or running speed, adapting to the harsh network environment in a way that "sacrifices some performance to preserve overall safety."
[0106] For example, taking a robot as the first device, the specific process of adjusting the control mode to the target control mode includes:
[0107] a. Relax the degradation frequency of the control cycle.
[0108] Before the downgrade (in a 5G environment), the network conditions were excellent, and the robot performed ultra-high frequency real-time control with a 1ms cycle.
[0109] After downgrading (in a 6G satellite environment), the network cannot support 1ms throughput and latency. The system actively lengthens the control cycle, downgrading to low-frequency control with a cycle of 50ms or longer, in order to match the time slot of the satellite network.
[0110] b. Degradation of control mode changes business logic Before the degradation (5G environment), the robot may be performing complex closed-loop torque control (force control), such as the robotic arm performing fine constant force grinding or precision assembly, which requires extremely low end-to-end network latency to transmit real-time feedback force.
[0111] After downgrading (6G satellite environment): Force control is actively abandoned, and trajectory planning, which has lower real-time requirements, is used instead. That is, the robot is only told where to go, and its movements and postures are no longer corrected at the microsecond level.
[0112] c. Degradation of mechanical degrees of freedom and operating state
[0113] When entering satellite networks or blind spots, the composite robot (chassis + robotic arm) actively locks certain degrees of freedom of the robotic arm (stopping high-risk swinging or grasping movements), retaining only the chassis's basic navigation and obstacle avoidance capabilities. Simultaneously, it actively reduces its speed to allow for more safe braking distance and communication retransmission time.
[0114] Traditional communication technologies often address network degradation by optimizing it through algorithms (e.g., retransmission, routing changes). This application's functional safety degradation approach acknowledges the physical limitations of satellite networks (they cannot be modified), instead allowing the robot terminal to proactively adapt its behavior to the network. This flexible adaptive mechanism of network-service collaboration is key to ensuring the robot remains connected, doesn't crash, and doesn't lose control during cross-domain switching.
[0115] In this way, by accurately matching task requirements with control modes, the overall optimization of system performance, resource utilization, reliability, and cost can be achieved.
[0116] In some embodiments, combined with Figure 2 ,like Figure 6 As shown, after step 204 above, the clock switching method based on satellite network provided in this application embodiment may further include the following steps 401 and 402.
[0117] It should be noted that, Figure 6 The following is an illustrative example of steps 401 and 402 being executed after step 204. In actual implementation, steps 401 and 402 may also be executed before step 204. This application embodiment does not limit this.
[0118] Step 401: When the first device is a robot, the clock switching device based on the satellite network predicts the current position information of the robot's joints based on the joint motion information of the robot collected in the previous moment when it detects that the signal transmission link of the indoor base station is disconnected.
[0119] In some embodiments, the previous moment is the instant the physical link is disconnected, and the receiving gateway obtains the robot's joint angular velocity ω and angular acceleration β at the previous moment (t-1).
[0120] In some embodiments, the robot's joint motion information includes: the robot's joint angular velocity ω and angular acceleration β.
[0121] In some embodiments, the aforementioned prediction of the current position information of the robot's joints includes the theoretical position θ at the current time (t) predicted based on a rigid body dynamics model. pred :
[0122] θ pred =θ last +ω·Δt+0.5·β·(Δt) 2 ;(Formula 3)
[0123] Where, θ pred The theoretical position of the robot's joints at the current moment (t) is predicted based on a rigid body dynamics model; θ last ω represents the position of the robot's joint at the previous time (t-1); Δt is the difference between the previous time (t-1) and the current time (t); ω is the angular velocity of the robot's joint; and β is the angular acceleration of the robot's joint.
[0124] Step 402: The satellite network-based clock switching device transmits the current position information to the robot's servo drive, so as to control the robot's joint movement through the servo drive.
[0125] In some embodiments, a servo drive is an electronic device for precisely controlling the operation of a servo motor. It receives control signals (such as position, speed, or torque commands), converts electrical energy into mechanical energy, and provides real-time feedback on the motor status to achieve closed-loop control.
[0126] It should be noted that the execution conditions and circumstances are as follows: First, the triggering condition: it will only be triggered during cross-domain switching when the physical environment is extremely harsh (e.g., the 5G signal is instantly lost the moment the robot leaves the factory, while the satellite antenna is still in the blind zone window of tens to hundreds of milliseconds of completely disconnected physical signal during satellite search and link establishment). Even if the clock stretching of S3 is very smooth and the degradation of S4 is very reasonable, if the robot's servo drive does not receive any network data packets for several consecutive cycles within the aforementioned physical blind zone, its underlying watchdog will still determine that the bus is disconnected and immediately lock the motor (emergency brake stop). The function of S5 is to be activated the moment an interruption in the physical link (RF radio frequency layer) is detected. It uses the local edge computing gateway to forge reasonable control commands locally based on the inertia (speed, acceleration) of the previous moment and sends them to the chassis and robotic arm, deceiving the servo drive and making it maintain its original posture until the satellite link is restored several hundred milliseconds later, thus completely shielding the hard interruption of the physical layer.
[0127] Thus, during the brief data interruption caused by a hard network handover, the receiving gateway predicts and generates virtual control commands based on the dynamic model of the robot joints and the motion state of the previous moment, maintaining the "pseudo-synchronous" state of the servo system and preventing the triggering of a safety emergency stop.
[0128] The satellite network-based clock switching method provided in this application can operate in the "time-space-control" three-dimensional collaborative switching of the on-board unit (OBU) of a mobile collaborative robot. This application solves the problems of timing discontinuity and control insecurity during cross-domain switching by constructing a tightly coupled closed-loop control flow. The following specific embodiments illustrate the satellite network-based clock switching method of this application.
[0129] like Figure 7 As shown, the implementation process of the satellite network-based clock switching method provided in this application includes the following S1 to S5:
[0130] S1: Cross-Domain Boundary Perception and Dual-Clock Acquisition (Triggering Step). This step is the system's perception input. When the robot (i.e., the first device) detects that it is about to leave the indoor base station coverage area through visual simultaneous localization and mapping (SLAM) or electronic fence, this process is triggered to provide raw data for subsequent calculations. First, dual-mode listening is initiated. While the communication module maintains a connection with the base station, the satellite receiving module is activated, entering "dual-connection listening mode," simultaneously receiving PTP messages from the indoor base station and PTP messages broadcast by the satellite. Then, the raw phase difference extraction is performed, using the robot's high-precision timer T. localRecord the values T from two clock sources at the same physical time t0. gNB and T sat The system calculates the original phase deviation ΔP between the two. raw :
[0131] ΔP raw =T sat - T gNB ;(Formula 1)
[0132] The data ΔP raw It will be directly used as the key input parameter for the virtual phase-locked loop calculation in S2.
[0133] S2: Switching Strategy Analysis and Parameter Generation (Decision-Making Stage). This step is the computational hub of the system. Based on the deviation perceived in S1, the system calculates the clock stretch slope and the target level of functional degradation before executing the switching action. First, V-PLL parameter calculation is performed, and the time window for smooth switching is set to W. time (e.g., seconds). To achieve this in W... time Internal elimination ΔP raw The system calculates the required frequency compensation factor α (i.e., the "acceleration" of clock stretching / compression).
[0134] Then, target capability matching is performed. The OBU matches the optimal control level suitable for the current satellite environment in the "capability map" by detecting the signal-to-noise ratio (SNR) and expected round-trip time (RTT) of the satellite link.
[0135] Finally, the output flows, the calculated α value is transmitted to S3 to drive clock adjustment, and the determined target control level is transmitted to S4 to drive function degradation.
[0136] S3: Clock smoothing stretching based on a virtual phase-locked loop (V-PLL) (executed in the time domain). Responding to the calculation results of S2, this step performs a soft switch in the time dimension, aiming to deceive the servo driver so that it is unaware of the change in the clock source. First, linear frequency modulation is performed within the transition window W. time Internally, the OBU does not directly modify the value of the local clock counter (to avoid jumps), but instead dynamically fine-tunes the clock frequency step rate based on a factor α. Assuming the satellite clock is 5ms ahead of the base station, and W... time =5s. Then the robot adjusts its local clock frequency to 1.001 times the standard frequency. Then it performs phase tracking; during the 5-second transition period, the local clock T... local It gradually catches up with the satellite clock T with its extremely small "acceleration". sat When t=W timeAt that moment, the two phases coincide, and the system seamlessly locks to the satellite clock. This process is transparent and safe to the watchdog timer of the servo drive.
[0137] S4: Dynamic degradation of the robot's functional safety level (executed in the control domain), executed concurrently with S3. During the gradual change of the clock, the control mode must switch rapidly to prevent congestion of high-frequency commands in the low-speed satellite link. First, atomic motion locking is performed. Simultaneously with V-PLL startup, the controller executes the "Level B" strategy determined in S2, sending commands to softly lock the fine degrees of freedom of the end-effector, retaining only the movement capabilities of the upper arm and chassis. Then, TSN flow table remapping is performed. The scheduler modifies the TSN's Time-Aware Shaper (TAS) gating table, closing the high-bandwidth time slot allocated to "real-time force control (1ms period)" and opening the low-frequency time slot allocated to "path planning flow (50ms period)".
[0138] S5: Inertial-based physical blind spot compensation (lower-level step). This step addresses the moment (milliseconds) during the hard switch of the physical link in the execution of S3 and S4. Although logically smoothed, the physical signal may experience momentary interruptions. First, inertial prediction is performed. At the instant the physical link breaks, the receiving gateway uses the robot's joint angular velocity ω and angular acceleration β from the previous moment (t-1) to predict the theoretical position θ at the current moment (t) based on the rigid body dynamics model. pred :θ pred =θ last +ω·Δt+0.5·β·(Δt) 2 (Formula 3) Then, the virtual axis is injected, and the gateway automatically generates a virtual axis containing θ. pred The "pseudo-TSN data packet" is injected into the servo bus. This step, as a final "safety net," uses physical inertia to fill the communication black hole, ensuring that the servo drive will not trigger a "communication loss" emergency stop under any circumstances, achieving truly seamless switching.
[0139] In summary, the method flow of this application consists of five steps with a strict logical relationship: S1 is triggering and sensing, S2 is decision-making and parameter generation, S3 and S4 are parallel operations (handling the time domain and control domain respectively), and S5 is the physical layer's fallback guarantee.
[0140] It should be noted that S5 does not need to be executed every time. S1-S4 have already formed a complete logical level smooth transition scheme, and S5 is the system's last fallback mechanism.
[0141] like Figure 8As shown, the clock switching timing diagram in the satellite network-based clock switching method provided in this application is used to illustrate the optimization comparison between the S-shaped smooth transition curve of this application and the prior art method.
[0142] The system architecture and implementation environment provided in this application include an indoor 6G / 5G micro base station in the physical layer environment (latency T_delay<1ms, clock source CLK). 6NB ) and outdoor 6G non-terrestrial network (NTN) satellite network (latency T) delay >20ms, clock source CLK sat The controlled object is a mobile control robot / industrial mobile device equipped with an OBU. The control system has an embedded "functional safety state machine" and has multi-level degradation capability from "high-precision operation (Level A)" to "track navigation (Level B)".
[0143] The clock switching method based on satellite networks provided in this application can be applied to smooth cross-domain clock switching in 6G-TSN: during the switching from a terrestrial network to a non-terrestrial network (NTN), a direct master clock source switching is not performed. Instead, the phase difference between the source clock and the target clock is calculated, and within a preset transition time window, a virtual phase-locked loop (V-PLL) is used to perform a small linear stretching or compression of the local clock frequency to achieve gradual phase synchronization.
[0144] The satellite network-based clock switching method provided in this application can be applied to the functional safety degradation of robots based on communication quality awareness: establishing a mapping relationship between communication QoS indicators and robot control modes; when switching to a high-latency network, automatically downgrading the control mode from high-frequency torque / impedance control to low-frequency position / trajectory planning control, and synchronously adjusting the TSN network gate control list.
[0145] The clock switching method based on satellite networks provided in this application can be applied to communication blind spot compensation based on physical inertia: during the brief data interruption caused by network hard switching, the receiving gateway predicts and generates virtual control commands based on the dynamic model of the robot joint and the motion state of the previous moment, maintains the "pseudo-synchronous" state of the servo system, and prevents the triggering of a safety emergency stop.
[0146] The clock switching method based on satellite networks provided in this application can be applied to dual-mode clock tracking and decision-making in an integrated air-space-ground environment: a logical method for protecting the simultaneous parsing of ground and satellite PTP messages in overlapping coverage areas and predicting the optimal switching timing based on phase difference acceleration.
[0147] This application addresses the core needs of the Industrial Internet for wireless production lines and flexible manufacturing. Through an innovative cross-layer resource phase alignment algorithm, it solves the timing matching challenge when 6G carries the periodic control flow of industrial robots. This application fills the gap in microsecond-level deterministic scheduling in 6G networks, upgrading the mobile communication network to a deterministic network with bus-level stability. It reshapes the industrial communication architecture, achieving low-cost "pigtail trimming" in a standardized manner, and meeting the stringent requirements for ultra-low latency and extremely low jitter in scenarios such as industrial automation and cloud-based PLCs.
[0148] In terms of performance and deployment feasibility, this application eliminates waiting latency through precise phase alignment, achieving end-to-end latency of less than 1ms and zero scheduling wait. Simultaneously, it improves spectrum utilization by over 30% through "time-frequency dual-dimensional wrapping" and can tolerate terminal jitter at the ±50μs level. As a purely software-defined algorithm optimization solution, it is fully compatible with the 3GPP R16 / R17 standard framework and can be quickly deployed in existing network base stations and modules through firmware upgrades, greatly reducing the barrier to entry.
[0149] This application has broad industrialization prospects, focusing on high-value areas such as flexible manufacturing (AGV / robotic arm collaboration), embodied intelligent remote control, and smart grid differential protection. Due to the adoption of standard signaling extensions, this application is easily integrated by chip and module manufacturers, and can be deeply integrated as a "low-latency enhancement package" with industrial gateways and 6G private network systems, quickly establishing a commercial closed loop from technology research and development to industrial field applications.
[0150] Thus, this application combines virtual clock smoothing with functional safety degradation to eliminate clock phase jumps at the moment of switching, and automatically adjusts the robot's operation mode according to the link quality, ensuring that the robot "does not drop out, does not stop suddenly, and performs continuous actions" during cross-domain processes.
[0151] It should be noted that the descriptions of each step S1 to S5 in this embodiment can be found in the descriptions in the above embodiments, and will not be repeated here.
[0152] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there is no conflict, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0153] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0154] This application embodiment can divide the satellite network-based clock switching device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0155] In some embodiments, this application also provides a satellite network-based clock switching device. This satellite network-based clock switching device may include one or more functional modules for implementing the satellite network-based clock switching method of the above method embodiments.
[0156] For example, Figure 9 This is a schematic diagram of a clock switching device based on a satellite network, provided as an embodiment of this application. Figure 9 As shown, the satellite network-based clock switching device 900 includes: a receiving module 901, a processing module 902, and an adjustment module 903, wherein:
[0157] The receiving module 901 is used to receive a first PTP message from an indoor base station and a second PTP message from satellite broadcast, wherein the first PTP message and the second PTP message are PTP messages received simultaneously when the first device is detected to have left the coverage area of the indoor base station.
[0158] Processing module 902 is used to calculate the original phase deviation based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message.
[0159] The processing module 902 is also used to calculate the frequency compensation factor based on the original phase deviation and the preset time window length; wherein the frequency compensation factor is used to characterize the rate of change of clock scaling.
[0160] The adjustment module 903 is used to adjust the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source.
[0161] In the satellite network-based clock switching device provided in this application, the direct master clock source switching is not performed during the switching process from a terrestrial network to a non-terrestrial network. Instead, the local clock frequency is slightly stretched or compressed using a virtual phase-locked loop (V-PLL) within a preset transition time window by calculating the phase difference between the source clock and the target clock. This solves the clock jitter and control failure problem of mobile collaborative robots during the 6G air-space-ground cross-domain switching process.
[0162] In some embodiments, the processing module 902 is specifically used to: take the time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message as the original phase deviation.
[0163] In some other embodiments, the processing module 902 is specifically used to: calculate the ratio between the original phase deviation and the preset time window length; and use the ratio as the frequency compensation factor.
[0164] In some other embodiments, the adjustment module 903 is further configured to: before adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, determine a target control mode that matches the current environmental information based on the current environmental information of the satellite; the current environmental information includes the signal-to-noise ratio (SNR) and expected round-trip time (RTT) of the satellite link; the adjustment module 903 is further configured to: after adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, adjust the control mode of the first device to the target control mode within the preset time window.
[0165] In some other embodiments, the target control mode described above includes: modifying the TAS gating table of the TSN, closing the transmission time window of the high-frequency force control flow, and opening the transmission time window of the low-frequency trajectory planning flow at the same time.
[0166] In some other embodiments, the processing module 902 is further configured to: when the first device is a robot, and upon detecting that the signal transmission link of the indoor base station is disconnected, predict the current position information of the robot's joints based on the joint motion information of the robot collected at the previous moment; and transmit the current position information to the robot's servo driver so as to control the movement of the robot's joints through the servo driver.
[0167] It should be noted that the clock switching device based on the satellite network can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0168] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 10 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.
[0169] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0170] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0171] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0172] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the satellite network-based clock switching method provided in this application embodiment.
[0173] In another possible implementation, memory 91 can also be integrated with processor 92.
[0174] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0175] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0176] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described clock switching method embodiment based on satellite networks, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0177] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0178] This application also provides a readable storage medium storing a program or instructions that, when executed by a computer, implement the satellite network-based clock switching method provided in the above embodiments. It is understood that all or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; the readable storage medium can be any of the foregoing embodiments or memory; the readable storage medium can also be an external storage device of the service invocation device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, flash card, etc., equipped on the service invocation device. Further, the readable storage medium can include both internal storage units of the service invocation device and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the service invocation device. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0179] This application also provides a computer program product, which is stored in a storage medium and, when executed by a computer, implements the satellite network-based clock switching method provided in the above embodiments.
[0180] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better 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 computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0182] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A clock switching method based on a satellite network, the method comprising: Receive a first Precision Time Protocol (PTP) message from an indoor base station and a second PTP message from satellite broadcast, wherein the first PTP message and the second PTP message are PTP messages received simultaneously when the first device is detected to have left the coverage area of the indoor base station; The original phase deviation is calculated based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message; Based on the original phase deviation and the preset time window length, a frequency compensation factor is calculated; wherein, the frequency compensation factor is used to characterize the rate of change of clock scaling. Based on the frequency compensation factor and the second time value, the frequency step of the local clock is adjusted within the preset time window to synchronize the local clock with the second clock source.
2. The clock switching method based on satellite networks according to claim 1, characterized in that, Based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message, the original phase deviation is calculated, including: The time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message is taken as the original phase deviation.
3. The clock switching method based on satellite networks according to claim 1, characterized in that, The calculation of the frequency compensation factor based on the original phase deviation and the preset time window length includes: Calculate the ratio between the original phase deviation and the preset time window length; The ratio is used as the frequency compensation factor.
4. The clock switching method based on a satellite network according to any one of claims 1 to 3, characterized in that, Before adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, the method further includes: Based on the current environmental information of the satellite, a target control mode matching the current environmental information is determined; the current environmental information includes the signal-to-noise ratio (SNR) and estimated round-trip time (RTT) of the satellite link. After adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, the method further includes: Within the preset time window, the control mode of the first device is adjusted to the target control mode.
5. The clock switching method based on satellite networks according to claim 4, characterized in that, The target control mode includes: modifying the Time-Aware Shaper (TAS) gating table of the Time-Sensitive Network (TSN), closing the transmission time window of high-frequency force-controlled flow, and opening the transmission time window of low-frequency trajectory planning flow at the same time.
6. The clock switching method based on satellite networks according to claim 1, characterized in that, The method further includes: When the first device is a robot, when the signal transmission link of the indoor base station is detected to be disconnected, the current position information of the robot's joints is predicted based on the joint motion information of the robot collected at the previous moment. The current position information is transmitted to the robot's servo driver so that the robot's joint movement can be controlled by the servo driver.
7. A clock switching device based on a satellite network, characterized in that, The satellite network-based clock switching device includes: a receiving module, a processing module, and an adjustment module; The receiving module is configured to receive a first PTP message from an indoor base station and a second PTP message from satellite broadcast, wherein the first PTP message and the second PTP message are PTP messages received simultaneously when the first device is detected to have left the coverage area of the indoor base station. The processing module is used to calculate the original phase deviation based on the first time value of the first clock source corresponding to the first PTP message and the second time value of the second clock source corresponding to the second PTP message. The processing module is further configured to calculate a frequency compensation factor based on the original phase deviation and the preset time window length; wherein the frequency compensation factor is used to characterize the rate of change of clock scaling. The adjustment module is used to adjust the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, so that the local clock is synchronized with the second clock source.
8. The clock switching device based on a satellite network according to claim 7, characterized in that, The processing module is specifically used for: The time difference between the second time value of the second clock source corresponding to the second PTP message and the first time value of the first clock source corresponding to the first PTP message is taken as the original phase deviation.
9. The clock switching device based on a satellite network according to claim 7, characterized in that, The processing module is specifically used for: Calculate the ratio between the original phase deviation and the preset time window length; The ratio is used as the frequency compensation factor.
10. The satellite network-based clock switching device according to any one of claims 7 to 9, characterized in that, The adjustment module is also used for: Before adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, a target control mode matching the current environmental information is determined based on the current environmental information of the satellite; the current environmental information includes the signal-to-noise ratio (SNR) and expected round-trip time (RTT) of the satellite link. The adjustment module is also used for: After adjusting the frequency step of the local clock within the preset time window based on the frequency compensation factor and the second time value, the control mode of the first device is adjusted to the target control mode within the preset time window.
11. The clock switching device based on a satellite network according to claim 10, characterized in that, The target control mode includes: modifying the TAS gating table of TSN, closing the transmission time window of high-frequency force control flow, and opening the transmission time window of low-frequency trajectory planning flow at the same time.
12. The clock switching device based on a satellite network according to claim 7, characterized in that, The processing module is further configured to: When the first device is a robot, when the signal transmission link of the indoor base station is detected to be disconnected, the current position information of the robot's joints is predicted based on the joint motion information of the robot collected at the previous moment. The current position information is transmitted to the robot's servo driver so that the robot's joint movement can be controlled by the servo driver.
13. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the satellite network-based clock switching method as described in any one of claims 1-6.
14. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a computer, implement the satellite network-based clock switching method as described in any one of claims 1-6.
15. A computer program product, characterized in that, The computer program product is stored in a storage medium, and when executed by a computer, the computer program product implements the satellite network-based clock switching method as described in any one of claims 1-6.