A remote upgrading system for a bidirectional time comparison modem
Patent Information
- Application Number
- CN202310704625.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-06-14
AI Technical Summary
因此,为了更好的解决上述人力难以企及的应用场景中设备软件升级的问题,本发明设计了一种利用时间比对信号进行远程软件升级的系统
[0042]本发明在保证时间比对调制解调器性能指标不变同时,还能够安全快捷的实现系统软件的升级与维护,且同时尽量不增加硬件成本。
Smart Images

Figure CN116800609B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote time comparison. More specifically, it relates to a remote upgrade system for a bidirectional time comparison modem. Background Technology
[0002] A two-way time comparison modem is a device used for remote time comparison between different stations. This device calculates the time difference between two stations by transmitting time comparison signals between the master and slave stations, and is typically used for time synchronization between different clocks. The function of a two-way time comparison modem dictates that its operating scenarios are mostly for alignment between stations with distances exceeding 1000 kilometers. The master and slave stations are relatively dispersed, and slave stations are often deployed in locations difficult for humans to reach. For example, in satellite-to-ground time synchronization, slave stations are deployed on satellites or other spacecraft, and some slave stations deployed in measurement stations are often located in remote mountainous or island areas. Since the time comparison modem, as a subsystem of time synchronization, often requires corresponding software upgrades or adjustments along with upgrades to the master system, software upgrades require on-site disassembly of the device casing for software flashing. Therefore, to better solve the problem of device software upgrades in application scenarios where human access is difficult, this invention designs a system for remote software upgrades using time comparison signals. This system effectively solves the problem of difficult device software upgrades, while significantly reducing the workload of software maintenance, lowering maintenance costs, and improving efficiency. Summary of the Invention
[0003] One object of the present invention is to provide a remote upgrade system for a bidirectional time comparison modem.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A remote upgrade system for a bidirectional time-comparison modem includes: a master station and at least one slave station.
[0006] The master station is used to generate a first-time comparison signal and transmit it to the slave station.
[0007] The slave station is used to generate a second time comparison signal and transmit it to the master station.
[0008] The first time-matching signal and the second time-matching signal each have a three-layer structure.
[0009] in
[0010] The first layer is the carrier signal, used for the transmission of the first time comparison signal and the second time comparison signal.
[0011] The second layer is the pseudo code, which is generated by the modulation board and sent cyclically. It is used by the master station and the slave station to identify and capture each other's signals to establish communication.
[0012] The third layer is the frame data layer, which is used for the transmission of communication data, remote upgrade commands, and program files between the master station and the slave station.
[0013] Optionally, the main station includes
[0014] The first modulation board is used to generate a first-time comparison signal according to the control instructions of the main control computer.
[0015] The first demodulation board is used to analyze the second time-comparison signal.
[0016] The main control computer is used to control and configure the first modulation board and the first demodulation board, and to calculate the first time difference between the master station and the slave station based on the second time comparison signal parsed by the first demodulation board.
[0017] The slave station includes
[0018] The second modulation board is used to generate a second time comparison signal and a remote upgrade signal according to the control instructions of the main control computer.
[0019] The second demodulation board is used to analyze the first-time comparison signal;
[0020] The main control board is used to control and configure the second modulation board and the second demodulation board. Based on the first time comparison signal parsed by the second demodulation board, it calculates the second time difference between the master station and the slave station. According to the remote upgrade command, it upgrades the application software stored on the corresponding board of this station.
[0021] Optionally, the first demodulation board demodulates the second time comparison signal and sends the demodulated first frame data and the first pseudorange value to the main control computer via the bus;
[0022] The second demodulation board demodulates the first time comparison signal and sends the demodulated second frame data and the second pseudorange value to the main control board via the bus.
[0023] Optionally, after receiving the first pseudorange value, the master computer calculates the first time difference between the master station and the slave station based on the first pseudorange value and the first clock difference;
[0024] After receiving the second pseudorange value, the main control board calculates the second time difference between the master station and the slave station based on the second pseudorange value and the second clock difference.
[0025] The first clock difference is the clock difference between the first modulation board and the first demodulation board;
[0026] The second clock difference is the clock difference between the second modulation board and the second demodulation board;
[0027] Optionally, each of the boards includes a processor;
[0028] The processor's Flash memory is configured with three sectors;
[0029] The first sector is used to store the boot configuration software;
[0030] The second sector is used to store the parameters and flags read by the startup configuration software during system boot.
[0031] The third sector comprises the first and second storage areas and is used to store application software.
[0032] Optionally, the first storage area and the second storage area store the current version of the software and the previous version of the software respectively in a round-robin writing manner.
[0033] Optionally, the first frame of data includes communication data, remote upgrade instructions, version rollback instructions, and program files.
[0034] Optionally, the number of flags includes
[0035] Upgrade request flag, software version flag, and rollback flag;
[0036] An upgrade request flag is used to determine whether an upgrade instruction has been received.
[0037] The program version flag is used to store the address of the currently used version of the application software;
[0038] The backtracking flag is used to determine whether an application software version backtracking command has been received.
[0039] Optionally, each board processor is configured to modify the state of the upgrade request flag or rollback flag in the second sector of its own processor Flash according to the first frame data, so as to upgrade or roll back the application software stored in the processor.
[0040] Optionally, the system includes a fault-prevention mechanism so that the processor can automatically revert to the previous version when the application software itself encounters problems after the upgrade.
[0041] The beneficial effects of this invention are as follows:
[0042] This invention ensures that the performance indicators of the time-comparison modem remain unchanged, while also enabling safe and quick system software upgrades and maintenance, and minimizing the increase in hardware costs. Attached Figure Description
[0043] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0044] Figure 1 An exemplary system architecture diagram is shown, in which an embodiment of the present invention can be applied.
[0045] Figure 2 A schematic diagram of the time comparison signal structure described in this invention is shown.
[0046] Figure 3 This diagram illustrates that the processor Flash of the present invention is configured with three sectors.
[0047] Figure 4 A schematic diagram of an exemplary remote upgrade method in which an embodiment of the present invention can be applied is shown.
[0048] Figure 5 This diagram illustrates an exemplary software version backtracking method to which an embodiment of the present invention can be applied. Detailed Implementation
[0049] To more clearly illustrate the present invention, the following description is in conjunction with preferred embodiments and accompanying drawings. Figure 1-5 The present invention will be further described below. Similar components in the accompanying drawings are indicated by the same reference numerals. Those skilled in the art should understand that the following detailed description is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.
[0050] like Figure 1 As shown, a remote upgrade system for a bidirectional time comparison modem includes: a master station and at least one slave station.
[0051] Optionally, the main station includes
[0052] The first modulation board is used to generate a first-time comparison signal according to the control instructions of the main control computer.
[0053] The first demodulation board is used to analyze the second time-comparison signal.
[0054] The main control computer is used to control and configure the first modulation board and the first demodulation board, and to calculate the first time difference between the master station and the slave station based on the second time comparison signal parsed by the first demodulation board.
[0055] The slave station includes
[0056] The second modulation board is used to generate a second time comparison signal and a remote upgrade signal according to the control instructions of the main control computer.
[0057] The second demodulation board is used to analyze the first-time comparison signal;
[0058] The main control board is used to control and configure the second modulation board and the second demodulation board. Based on the first time comparison signal parsed by the second demodulation board, it calculates the second time difference between the master station and the slave station. According to the remote upgrade command, it upgrades the application software stored on the corresponding board of this station.
[0059] Optionally, the first demodulation board demodulates the second time comparison signal and sends the demodulated first frame data and the first pseudorange value to the main control computer via the bus;
[0060] The second demodulation board demodulates the first time comparison signal and sends the demodulated second frame data and the second pseudorange value to the main control board via the bus.
[0061] Optionally, after receiving the first pseudorange value, the master computer calculates the first time difference between the master station and the slave station based on the first pseudorange value and the first clock difference;
[0062] After receiving the second pseudorange value, the main control board calculates the second time difference between the master station and the slave station based on the second pseudorange value and the second clock difference.
[0063] The first clock difference is the clock difference between the first modulation board and the first demodulation board;
[0064] The second clock difference is the clock difference between the second modulation board and the second demodulation board;
[0065] In one specific embodiment, when the system is working, the master station and the slave station operate on the same principle. The master control computer and the master control board generate time comparison signals through the control modulation board and then transmit them to the other station via antenna.
[0066] Meanwhile, the time comparison signal received by the antenna is parsed by the demodulation board and then sent to the main control computer or main control board via the bus for processing.
[0067] The time comparison signal is as follows Figure 2 As shown, it has a three-layer structure, all of which are obtained by adjusting BPSK.
[0068] in
[0069] The first layer is the carrier signal, mainly for facilitating signal transmission.
[0070] The second layer is a pseudo-random code signal, or pseudocode, which is generated and cyclically transmitted by the modulation board. It is primarily used by the master and slave stations to identify and capture each other's signals, thereby establishing communication. In addition, another important function of the pseudocode is to calculate the pseudorange P between the two stations. The pseudorange P and the time difference Tic between the modulation and demodulation boards are the main parameters for calculating the inter-station time difference.
[0071] The third layer is the frame data layer, which carries message data and is mainly used for communication data transmission between two stations. Remote upgrade commands and software files are transmitted through this layer.
[0072] The demodulation board can implement carrier loop and code loop through internal software. These two loops allow the demodulation board to track and capture carrier and pseudocode signals, while simultaneously demodulating the compared signals. The inter-station pseudorange P can be calculated from the demodulated pseudocode phase. The demodulation board sends the demodulated frame data bits and pseudorange value P to the master controller via the bus. Upon receiving the data from the demodulation board, the master controller processes the frame data and takes appropriate actions based on the message content. Simultaneously, it measures the clock difference Tic between the modulation and demodulation boards, calculating the time difference between the master and slave stations based on the received pseudorange P and clock difference Tic. Frame data messages to be sent to the other station are edited by the master controller and sent to the modulation board via the bus. Upon receiving the frame data, the modulation board modulates the frame data signal using its generated pseudocode signal and carrier signal. The modulated signal is then transmitted to the other station via the antenna.
[0073] In one specific implementation, the bidirectional time comparison modem function is primarily implemented by embedded software within the processors of each board. To enable remote upgrades, all board processors are designed with the following software architecture.
[0074] like Figure 3 As shown, the software consists of three parts, dividing the Flash memory into three sectors to store the corresponding software.
[0075] The first sector (Bootloader) contains the boot configuration software and will not change during remote upgrades.
[0076] The second sector (Data) area is used to store parameters and flags that are read during boot by the bootloader.
[0077] The third sector includes the first storage area (App1) and the second storage area (App2), which are used to store application software. It mainly implements the business functions of time comparison modulation and demodulation. By writing to the two storage areas App1 and App2 in turn, the current version of the software and the previous version of the software can be stored respectively for version backtracking.
[0078] After a system reboot or reset, the processor first runs the bootloader software. The main function of the bootloader software is software upgrade management. The bootloader reads the upgrade request flag in Flash to determine whether an upgrade command has been received. If an upgrade command is received, it will begin accepting upgrade software files and store the files in the corresponding sectors. In addition, if a software rollback command is received, the bootloader will run the previous version of the software; otherwise, it will run the latest version of the software.
[0079] The following are the relevant flags used in the Data area of Flash to control remote upgrades:
[0080] Upgrade request flags:
[0081] The bootloader controls whether to perform a remote upgrade operation based on the status of the upgrade request flag, which has two states: enabled and disabled.
[0082] The software version flag stores the address of the currently used version of the App software. It is an array of two elements, representing the starting address and length of the software. The bootloader loads the App software by reading a certain length continuously starting from the starting address. The starting address has two values: the starting address of sector App1 and the starting address of sector App2 in Flash.
[0083] The backtracking flag is used for app software version backtracking. The bootloader controls whether to perform app software version backtracking based on the state of the backtracking flag, which has two states: enabled and disabled.
[0084] like Figure 4 As shown, a specific implementation method, the remote upgrade steps are as follows:
[0085] Step 1: The slave station receives the remote upgrade command from the master station;
[0086] Step 2: The slave master processor modifies the upgrade request flag in the Data area of the flash memory to the enabled state;
[0087] Step 3: Reset and restart the slave master controller processor;
[0088] Step 4: After the slave station's main control processor restarts, it enters the bootloader software;
[0089] Step 5: The bootloader software reads the upgrade request flag from the Data area of the flash memory;
[0090] Step 6: The slave site replies to the master site with the upgrade request;
[0091] Step 7: After receiving the request, the master station starts sending the software upgrade package file to the slave station, which receives and stores it in the cache;
[0092] Step 8: After the slave station has received the upgrade package, the master processor sends an upgrade request frame to the modulation board processor;
[0093] Step 9: The modulation board receives the upgrade request frame and modifies the upgrade request flag in the Data area of the flash to the enabled state, and then performs a reset and restart.
[0094] Step 10: After restarting, the modulation board processor enters the bootloader software, and the software reads the upgrade request flag.
[0095] Step 11: The modulation board processor sends an upgrade request to the main control processor;
[0096] Step 12: After receiving the upgrade request, the main control processor begins to send the software upgrade package file of the modulation board to the processor of the modulation board via the bus;
[0097] Step 13: The modulation board processor receives the software upgrade package and begins the upgrade process. It writes the upgrade software to the corresponding App storage area in Flash memory, alternating between App1 and App2 storage areas. For example, if the upgrade software version is 18.3 and the current version is 18.2, the bootloader will write the 18.3 software to the storage area where version 18.1 is located, while retaining the previous version (18.2) for rollback.
[0098] Step 14: After the upgrade writing is completed, the modulation board processor sends an upgrade completion frame to the main control processor. The bootloader of the modulation board will modify the upgrade request flag in the Data area of the flash to the disabled state, and at the same time, it will modify the software version flag in the Data area to the storage address of the App sector where the latest version of the software is located.
[0099] Step 15: The modulation board processor resets and restarts. After restarting, it enters the bootloader software. The bootloader software runs and reads the upgrade request flag and software version flag in the Data area of the Flash memory. Based on the results indicated by the flags, the bootloader software will jump to run the latest App software. The modulation board upgrade is complete.
[0100] Step 16: After receiving the upgrade completion signal frame from the modulation board processor, the main control processor begins to upgrade the demodulation board. The upgrade process is the same as that of the modulation board.
[0101] Step 17: After receiving upgrade completion signal frames from the modulation board processor and demodulation board processor respectively, the bootloader software of the slave station master control processor will control the modulation board to send an upgrade verification frame to the master station to determine whether the upgrade of the two modulation and demodulation boards is correct.
[0102] Step 18: The main station will reply after receiving the upgrade verification frame.
[0103] Step 19: After receiving the upgrade verification response from the slave station master processor, confirm that the modem and demodulation board upgrade was successful.
[0104] Step 20: After confirming the successful upgrade of the modem board, the main control processor bootloader begins upgrading its own software. The new software is written to the designated App sector in the Flash memory, and the upgrade request flag and software version flag in the Data area of the Flash memory are modified. After modification, an upgrade completion frame is sent to the main station.
[0105] Step 21: The main control processor resets and restarts, enters the bootloader software, reads the corresponding flags, and then jumps to the latest App software. Upgrade complete.
[0106] like Figure 5 As shown, a specific implementation method is the App software version rollback mechanism:
[0107] In Flash memory, the App1 and App2 storage areas are used to store the current version of the software and the previous version, respectively. When it is necessary to revert the software version to a previous version, the master station issues a version reversion command, which the slave station receives and performs the software version reversion operation. The version reversion operation is initiated by the master control processor, which sequentially controls the modulation board processor and the demodulation board processor to perform the software version reversion, and then the master control processor performs its own software reversion operation. After the reversion is completed, a reversion completion frame is sent to the master station.
[0108] The specific steps are as follows.
[0109] Step 1: The slave station receives the backtracking frame.
[0110] Step 2: The main controller processor modifies the backtracking flag in the Data area of the Flash memory to enable.
[0111] Step 3: The main control processor restarts and enters the bootloader.
[0112] Step 4: The main control processor bootloader reads the backtracking flag and enables it.
[0113] Step 5: The main control processor sends a backtracking command to the modulation board.
[0114] Step 6: The modulation board processor receives the backtracking instruction and modifies the backtracking flag in Flash to enable.
[0115] Step 7: The modulation board processor is reset and restarted, entering the bootloader software.
[0116] Step 8: The modulation board's processor bootloader software reads the backtracking flag and enables it.
[0117] Step 9: The modulator board's processor bootloader software modifies the software version flag in Flash to the storage address of the previous version of the App software, and then resets the rollback flag.
[0118] Step 10: The modulation board processor replies with a backtracking completion frame to the main control processor.
[0119] Step 11: The modulator board processor bootloader software jumps to the previous version of the software, ending the backtracking operation.
[0120] Step 12: After receiving the response from the modulation board, the main control processor sends a backtracking command to the demodulation board.
[0121] Step 13: After receiving the backtracking command, the demodulation board processor starts to execute the backtracking operation. The backtracking process is the same as that of the modulation board. After completion, it replies with a backtracking completion frame to the main control processor.
[0122] Step 14: The main control processor begins the backtracking of its own App software.
[0123] Step 15: The main control processor bootloader software modifies the software version flag in Flash to the storage address of the previous version of the App software, and then resets the backtrack flag.
[0124] Step 16: The master control processor controls the slave station to send a backtracking completion frame to the master station.
[0125] Step 17: The main control processor bootloader software jumps to the previous version of the software, ending the backtracking operation.
[0126] Step 18: The master station receives the backtracking completion frame, and the backtracking operation ends.
[0127] In one feasible implementation, the present invention also includes a fault-proofing mechanism, which specifically includes:
[0128] Relying on the watchdog mechanism in the processor, if an error occurs during the upgrade of the app software, causing the software to fail to run, the watchdog will be triggered after a period of time, and the processor will reset and restart to enter the bootloader software.
[0129] Utilizing this mechanism, this system has designed a remote upgrade error prevention mechanism. This allows the processor to automatically revert to the previous version if a problem occurs in the upgraded app software itself.
[0130] Application software upgrade errors mainly fall into the following two categories:
[0131] Modulation board or demodulation board upgrade error:
[0132] according to Figure 4 As shown in steps 17-19. After the modem board upgrade is complete, the master processor controls the slave station to send an upgrade verification frame to the master station. If the modem board processor software upgrade is normal, the master processor's bootloader software will receive a response from the master station to the upgrade verification frame sent by the slave station. If a software error occurs in the modem board after the upgrade, the master processor will not receive a response in step 19. In this system, if no response is received within a specified time after the slave station sends the upgrade verification frame, the master processor will consider the modem board upgrade to have failed and will send a software rollback command to both, rolling back the modem board software to the previous version. Afterward, the master processor will stop the upgrade and control the slave station to send a modem board upgrade error frame to the master station, informing the master station that the modem board upgrade has failed.
[0133] Main controller processor upgrade error:
[0134] If the master processor upgrade software fails, the slave station will not function properly. In this case, the master station can continuously send software rollback commands to the slave station. After the master processor software freezes for a period of time, the watchdog mechanism will be triggered, and the master processor will restart and enter the bootloader software. Upon receiving the software rollback command, the bootloader will roll back to the previous version of the software.
[0135] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. A remote upgrade system for a bidirectional time comparison modem, characterized in that, include: Master station and at least one slave station, The master station is used to generate a first-time comparison signal and transmit it to the slave station via an antenna. The slave station is used to generate a second time comparison signal and transmit it to the master station via an antenna. The first time-matching signal and the second time-matching signal each have a three-layer structure. in The first layer consists of carrier signals, used for the transmission of the first and second time-matching signals. The second layer is the pseudo code, which is generated by the modulation board and sent cyclically. It is used by the master station and the slave station to identify and capture each other's signals to establish communication. The third layer is the frame data layer, which is used for the transmission of communication data, remote upgrade instructions and program files between the master station and the slave station. The modulation board includes a processor; The processor's Flash memory is configured with three sectors; The first sector is used to store the boot configuration software; The second sector is used to store the parameters and flags read by the startup configuration software during system boot. The third sector includes the first and second storage areas and is used to store application software; The first storage area and the second storage area store the current version of the software and the previous version of the software respectively in a round-robin writing manner; The system includes a fault-prevention mechanism that allows the processor to automatically revert to the previous version when the application software itself encounters problems after an upgrade.
2. The system according to claim 1, characterized in that, The main station includes The first modulation board is used to generate the first comparison signal according to the control instructions of the main control computer. The first demodulation board is used to analyze the second time-comparison signal. The main control computer is used to control and configure the first modulation board and the first demodulation board, and to calculate the first time difference between the master station and the slave station based on the second time comparison signal parsed by the first demodulation board. The slave station includes The second modulation board is used to generate a second time comparison signal and a remote upgrade signal according to the control instructions of the main control computer. The second demodulation board is used to analyze the first-time comparison signal; The main control board is used to control and configure the second modulation board and the second demodulation board. Based on the first time comparison signal parsed by the second demodulation board, it calculates the second time difference between the master station and the slave station. According to the remote upgrade command, it upgrades the application software stored on the corresponding board of this station.
3. The system according to claim 2, characterized in that, The first demodulation board demodulates the second time comparison signal and sends the demodulated first frame data and the first pseudorange value to the main control computer via the bus. The second demodulation board demodulates the first time comparison signal and sends the demodulated second frame data and the second pseudorange value to the main control board via the bus.
4. The system according to claim 3, characterized in that, After receiving the first pseudorange value, the master computer calculates the first time difference between the master station and the slave station based on the first pseudorange value and the first clock difference. After receiving the second pseudorange value, the main control board calculates the second time difference between the master station and the slave station based on the second pseudorange value and the second clock difference. The first clock difference is the clock difference between the first modulation board and the first demodulation board; The second clock difference is the clock difference between the second modulation board and the second demodulation board.
5. The system according to claim 3, characterized in that, The first frame of data includes communication data, remote upgrade instructions, version rollback instructions, and program files.
6. The system according to claim 1, characterized in that, The marker quantity includes Upgrade request flag, software version flag, and rollback flag; An upgrade request flag is used to determine whether an upgrade instruction has been received. The program version flag is used to store the address of the currently used version of the application software; The backtracking flag is used to determine whether an application software version backtracking command has been received.
7. The system according to claim 5, characterized in that, Each board processor is used to modify the state of the upgrade request flag or rollback flag in the second sector of its own processor Flash according to the first frame of data, so as to upgrade or roll back the application software stored in the processor.
Citation Information
Patent Citations
Compressing and resolving method for transmission data amount of two-way time transfer modem
CN106533528A
Device upgrading method and terminal equipment
CN112199103A