Multi-module carrier synchronization method, device, equipment and storage medium

By using the first communication method to directly send and receive synchronization frames and directly adjust the carrier cycle in a multi-power module parallel system, the problem of filtering delay in the traditional method is solved, and efficient carrier synchronization and interference immunity are achieved.

CN118631411APending Publication Date: 2024-09-10SHINRY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410838580.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

When multiple power modules are connected in parallel, the use of high and low level synchronization signals in the traditional method results in filtering delay, which cannot meet the low delay requirements of high-frequency synchronization, resulting in low carrier synchronization efficiency.

Method used

The synchronization frame is sent and received through the first communication method, and the carrier cycle is directly adjusted to avoid filtering delay and improve the carrier synchronization efficiency.

Benefits of technology

It achieves low-latency carrier synchronization, improves the efficiency of multi-module carrier synchronization, suppresses high-frequency circulation, and enhances anti-interference performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631411A
    Figure CN118631411A
Patent Text Reader

Abstract

The embodiment of the invention discloses a multi-module carrier synchronization method, device and equipment and a storage medium, the method is applied to a first module, the first module is any one of N modules, and the method comprises the following steps: obtaining a random code of a first synchronization frame to obtain a first random code; obtaining a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes; taking the module corresponding to the minimum value in the first random code and the N-1 second random codes as the host module; and adjusting a first carrier period of the first module based on the first synchronization frame and a synchronization frame corresponding to the host module, so that the carrier synchronization of the first module and the host module is realized. By adopting the embodiment of the invention, the multi-module carrier synchronization efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of carrier control technology, and in particular to a multi-module carrier synchronization method, device, equipment and storage medium. Background Art

[0002] With the development of science and technology, the use of a parallel system of multiple power modules to achieve corresponding functions has been widely used. When multiple power modules are connected in parallel, high-frequency circulating current will be generated between the power modules.

[0003] When high-frequency circulating current is suppressed between traditional power modules, a common synchronization signal is used for high-frequency synchronization. The master module sends a synchronization signal through IO, and each slave module simultaneously detects the synchronization signal for synchronization.

[0004] The synchronization signal usually uses a high and low level. Since high-frequency synchronization is required, a lower delay is required. However, there will be interference between the high and low levels, so filtering is required. Filtering will cause delays and cannot meet the low delay requirements of high-frequency synchronization, resulting in low efficiency of carrier synchronization. Summary of the invention

[0005] In order to solve the above-mentioned problems existing in the prior art, the embodiments of the present application provide a multi-module carrier synchronization method, device, equipment and storage medium, each module sends and receives synchronization frames sent by other modules to other modules through a first communication method, and synchronizes the carrier of each module with the host module. Since the synchronization frames sent through the first communication method do not need to be filtered, the delay of carrier synchronization is reduced, thereby improving the efficiency of carrier synchronization.

[0006] In a first aspect, an embodiment of the present application provides a multi-module carrier synchronization method, the method is applied to a first module, the first module is any one of N modules, and the method includes:

[0007] Acquire a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module;

[0008] Obtain a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes, wherein the N-1 second synchronization frames are synchronization frames generated by N-1 second modules and sent to the first module through the first communication method, the N-1 second synchronization frames correspond one-to-one to the N-1 second modules, and the N-1 second modules are the N-1 modules remaining after removing the first module from the N modules;

[0009] Using a module corresponding to a minimum value among the first random code and the N-1 second random codes as the host module;

[0010] Based on the first synchronization frame and the synchronization frame corresponding to the host module, a first carrier period of the first module is adjusted to synchronize the carriers of the first module and the host module.

[0011] In a feasible embodiment, before using the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the method further includes:

[0012] Determine whether there is a random code identical to the first random code among the N-1 second random codes;

[0013] If it exists, regenerate the target random code until the target random code and the N-1 second random codes are different, and use the target random code to replace the first random code;

[0014] Otherwise, the timers of the N-1 second modules are reset.

[0015] In a feasible embodiment, before using the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the method further includes:

[0016] Sorting the first random code and the N-1 second random codes in ascending order to obtain a sorting result;

[0017] Based on the sorting result, obtaining a sorting sequence number of the first module;

[0018] Compare the sorting sequence number with M historical sorting sequence numbers of the first module, wherein the M historical sorting sequence numbers are the sorting sequence numbers of the first module when the multi-module carrier synchronization method is executed M times before;

[0019] If the sorting sequence number is different from any one of the M historical sorting sequence numbers, a fourth synchronization frame is generated, and N-1 third synchronization frames are received, wherein the N-1 third synchronization frames are synchronization frames regenerated by the N-1 second modules after sending the N-1 second synchronization frames;

[0020] The multi-module carrier synchronization method is performed based on the fourth synchronization frame and the N-1 third synchronization frames.

[0021] In a feasible embodiment, before sorting the first random code and the N-1 second random codes in ascending order to obtain the sorting result, the method further includes:

[0022] Get the timer of each second module;

[0023] The second random code corresponding to the second module whose timer is reduced to the first threshold is cleared;

[0024] Based on the number of non-zero second random codes in the N-1 second random codes, the value of the number of online modules N is adjusted.

[0025] In a feasible embodiment, the first synchronization frame includes a current value of the first carrier, and the synchronization frame corresponding to the host module includes a current value of the main carrier;

[0026] The adjusting the first carrier period of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module includes:

[0027] Acquire a relative position A between the first module and the host module, where the relative position A is determined by the first random code and the random code of the host module;

[0028] Obtaining a difference D based on the current value of the first carrier and the current value of the main carrier;

[0029] Based on the difference D and the relative position A, the first carrier period is adjusted.

[0030] In a feasible embodiment, adjusting the first carrier period based on the difference D and the relative position A includes:

[0031] If the difference D is greater than the second threshold, then in each carrier cycle, a preset value is added to the first carrier cycle to obtain a target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously regulated to synchronize the carriers of the first module and the host module, wherein the regulation amount is expressed as D*A / N;

[0032] If the difference D is less than the second threshold, then in each carrier cycle, the preset value is subtracted from the first carrier cycle to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously adjusted to synchronize the carriers of the first module and the host module.

[0033] In a feasible embodiment, before adjusting the first carrier period based on the difference D and the relative position A, the method further includes:

[0034] If the difference D is less than the preset error value, the N-1 third synchronization frames are received, and based on the fourth synchronization frame and the N-1 third synchronization frames, the multi-module carrier synchronization method is executed until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

[0035] In a second aspect, an embodiment of the present application provides a multi-module carrier synchronization device, the multi-module carrier synchronization device comprising an acquisition unit, a processing unit and an adjustment unit;

[0036] The acquisition unit is used to acquire a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module;

[0037] The acquisition unit is used to acquire a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes, wherein the N-1 second synchronization frames are synchronization frames generated by N-1 second modules and sent to the first module through the first communication method, and the N-1 second synchronization frames correspond to the N-1 second modules one by one, and the N-1 second modules are the N-1 modules remaining after removing the first module from the N modules;

[0038] The processing unit is configured to use a module corresponding to a minimum value among the first random code and the N-1 second random codes as the host module;

[0039] The adjustment unit is used to adjust the first carrier period of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module, so that the first module and the carrier of the host module are synchronized.

[0040] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0041] A processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as described in the first aspect.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method described in the first aspect.

[0043] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer is operable to cause the computer to execute the method described in the first aspect.

[0044] Implementing the embodiments of the present application has the following beneficial effects:

[0045] In an embodiment of the present application, the first module can obtain a first random code from a first synchronization frame generated by itself, and receive N-1 second synchronization frames sent to the first module by N-1 second modules through the first communication method, and obtain N-1 second random codes from the N-1 second synchronization frames. Then, the module corresponding to the minimum value of the first random code and the N-1 second random codes is used as the host module. Furthermore, the first module adjusts its own first carrier period based on the first synchronization frame and the synchronization frame corresponding to the host module, so that the first module is synchronized with the carrier of the host module. Therefore, any one of the N modules can adjust its own carrier period based on its own synchronization frame and the host module synchronization frame, and maintain carrier synchronization with the host module, thereby realizing carrier synchronization of the N modules. Moreover, each module sends the synchronization frame through the first communication method without filtering, which reduces the delay caused by carrier synchronization. On the basis of realizing the carrier synchronization of N modules, the efficiency of multi-module carrier synchronization is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 A schematic diagram of an application scenario of a multi-module carrier synchronization method provided in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a CAN synchronization frame provided in an embodiment of the present application.

[0049] Figure 3 A flowchart of a multi-module carrier synchronization method provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a process flow of a host module determination method provided in an embodiment of the present application;

[0051] Figure 5 A flowchart of a carrier cycle adjustment method provided in an embodiment of the present application;

[0052] Figure 6 A block diagram of the functional units of a multi-module carrier synchronization device provided in an embodiment of the present application;

[0053] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other steps or modules inherent to these processes, methods, products or devices.

[0056] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0057] First, see Figure 1 , Figure 1 A schematic diagram of an application scenario of a multi-module carrier synchronization method provided in an embodiment of the present application. Figure 1 As shown, when multiple power modules are running in the system at the same time, the multiple power modules need to be connected in parallel to achieve corresponding functions through the interaction between the power modules.

[0058] like Figure 1 As shown, the parallel system of N modules includes a first module, a second module 1, a second module 2, ..., a second module N-1. Among them, any two modules among the N modules are connected in parallel to the parallel system through two serial buses, and the two serial buses correspond to the high-level bus and the low-level bus of the synchronization signal respectively. Any two modules among the N modules can realize serial communication between the two modules through the two serial buses. Optionally, any two modules can send synchronization signals to each other through the two serial buses to realize carrier synchronization through the synchronization signals sent to each other.

[0059] It should be noted that the N in the above N modules represents the number of online modules in the system. In practical applications, the system may include disconnected modules, that is, the total number of modules in the system is greater than or equal to N.

[0060] Optionally, the parallel system of the above-mentioned N modules may include, for example: a three-phase power factor correction (Power Factor Correction, PFC) system, a single-phase PFC system, a three-phase inverter (Three-phase inverter), a single-phase inverter, and the like circuit topologies.

[0061] Exemplarily, the above-mentioned serial communication method can adopt, for example, controller area network (CAN) communication, serial communication interface (SCI) communication, serial peripheral interface (SPI) communication, etc. The embodiment of the present application takes the multi-module carrier synchronization method performed by CAN communication between each module as an example, and the steps of performing the multi-module carrier synchronization method by SCI communication and SPI communication are similar to the steps of performing the multi-module carrier synchronization method by CAN communication, and will not be repeated here.

[0062] It should be noted that when N modules are connected in parallel, a circulating current is easily formed between the input ripples of the parallel system, and the carrier phases of multiple modules are easily opposite between each power module, resulting in the formation of high-frequency circulating currents between multiple modules. For this reason, it is necessary to achieve high-frequency synchronization between the N modules to avoid the situation where the high-frequency carrier phases between multiple modules are opposite to suppress the high-frequency circulating current. In order to achieve high-frequency synchronization between the power modules, it is usually necessary to send a synchronization signal between the modules, but there will be interference between the high and low levels of the synchronization signal, so filtering is required, resulting in a higher delay in carrier synchronization.

[0063] To this end, in the embodiment of the present application, the N modules send synchronization signals via the CAN bus, and optionally, the synchronization signal may be a CAN synchronization frame. Figure 2 As shown, the CAN synchronization frame includes a random code and a current value of a carrier, wherein bits 0 and 1 of the CAN synchronization frame are used to store the random code, and bits 2 and 3 of the CAN synchronization frame are used to store the current value of the carrier.

[0064] Exemplarily, the first module can send its own CAN synchronization frame to the second module 1, the second module 2, ..., the second module N-1 through the CAN bus. The first module can receive the CAN synchronization frame sent by the second module 1, the second module 2, ..., the second module N-1 through the CAN bus. By detecting and processing the synchronization frames of each module, the carrier period of N-1 modules among the N modules can be synchronized with the carrier period of the target module, thereby realizing carrier synchronization of the N modules.

[0065] Applied to the above scenario, in an embodiment of the present application, the first module obtains a random code of the first synchronization frame to obtain a first random code;

[0066] Obtain a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes;

[0067] The module corresponding to the minimum value of the first random code and the N-1 second random codes is used as the host module;

[0068] The first module adjusts the first carrier cycle of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module, so that the carriers of the first module and the host module are synchronized.

[0069] It can be seen that in the carrier synchronization system applied to the above-mentioned N power modules, each module in the N modules can send the CAN synchronization frame generated by itself to the remaining N-1 modules in the N modules through the CAN bus, and receive the CAN synchronization frame sent by the N-1 modules, so as to determine the host module in the N modules based on the random code in the CAN synchronization frame generated by itself and the random code in the CAN synchronization frame sent by the N-1 modules, and then realize carrier synchronization between the N-1 modules and the host module, so as to realize carrier synchronization between the N modules, suppress the high-frequency circulating current generated between the multi-power module system, and improve the anti-interference ability of the multi-power module system.

[0070] See also Figure 3 , Figure 3 A flowchart of a multi-module carrier synchronization method provided in an embodiment of the present application is provided. The method can be applied to the application scenario of the multi-module carrier synchronization method described above, and the method includes but is not limited to the following steps:

[0071] 301: Acquire a random code of a first synchronization frame to obtain a first random code.

[0072] In the embodiment of the present application, the first module is any one of the N modules, and the first synchronization frame is a synchronization frame generated by the first module. The synchronization frame of each module includes a random code, and the random code is used to distinguish the N modules and to sort the N modules, thereby determining the host module of the N modules. Among them, the random code in the first synchronization frame is the first random code. The first module can obtain the first random code from the first synchronization frame generated by itself.

[0073] Exemplarily, the bits 0 and 1 in the synchronization frame generated by each module in the N modules may represent the random code corresponding to each module. The first module may obtain the first random code by reading the bits 0 and 1 of the first synchronization frame.

[0074] Optionally, the first module may send a first synchronization frame to N-1 second modules via the CAN bus, and receive N-1 second synchronization frames sent by the N-1 second modules via the CAN bus, wherein the first synchronization frame and the N-1 second synchronization frames are used to synchronize the carriers of the N modules.

[0075] 302: Obtain a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes.

[0076] In an embodiment of the present application, N-1 second synchronization frames are synchronization frames generated by N-1 second modules and sent to the first module through the first communication method, and the N-1 second synchronization frames correspond one-to-one to the N-1 second modules, and the N-1 second modules are the N-1 modules remaining after removing the first module from the N modules. Optionally, the first communication method can be serial communication or parallel communication, for example, it can be CAN communication, SCI communication, SPI communication, and the like. Each second synchronization frame includes a second random code, and each second random code is used to distinguish the first module from the N-1 second modules, and is used to sort the N modules, thereby determining the host module of the N modules.

[0077] Exemplarily, the first module can send a first synchronization frame to N-1 second modules via the CAN bus, and the N-1 second modules can generate their own corresponding second synchronization frames, and send their own corresponding second synchronization frames to the remaining N-1 modules of the N modules except themselves via the CAN bus. The first module receives the second synchronization frame sent by each of the N-1 second modules via the CAN bus, and then obtains the random code of each of the N-1 second synchronization frames to obtain N-1 second random codes.

[0078] Exemplarily, the 0 and 1 bits in the synchronization frame generated by each module in the N modules can represent the random code corresponding to each module. The first module obtains the second random code of each second module by reading the 0 and 1 bits in the synchronization frame of each second module in the N-1 second modules, thereby obtaining N-1 second random codes.

[0079] Then, the first module analyzes the first random code and N-1 second random codes, and can determine the host module among the N modules according to the first random code and N-1 second random codes. Therefore, the first module only needs to maintain carrier synchronization with the host module to ensure carrier synchronization between the N modules.

[0080] 303: Use a module corresponding to the minimum value of the first random code and the N-1 second random codes as a host module.

[0081] In an embodiment of the present application, the first module can sort the N modules by obtaining the first random code and N-1 second random codes to obtain the sorting results of the random codes of the N modules, and thus determine the host module among the N modules based on the sorting results.

[0082] Specifically, after receiving the second random code sent by each of the N-1 second modules, the first module may put the second random code corresponding to each second module into a random array. Then, the first module sorts each second random code stored in the random array and its own first random code in ascending order to obtain the sorting result of the random codes corresponding to the N modules.

[0083] It should be noted that the first module can allocate storage space for the second random code corresponding to each second module, that is, allocate N-1 storage space for N-1 second random codes. After the first module receives all N-1 second random codes, the first random code and the N-1 second random codes are sorted. In the embodiment of the present application, a random array is used to dynamically store each second random code, and storage space can be dynamically allocated for each second random code, which saves storage space and improves storage efficiency.

[0084] Further, based on the sorting result of the random codes corresponding to the N modules, the first module uses the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module.

[0085] It can be seen that in the embodiment of the present application, the first module can obtain the first random code and N-1 second random codes by acquiring the first random code in the first synchronization frame and the second random code in each second synchronization frame, and take the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, so that the first module can achieve carrier synchronization with the host module so that each module can achieve carrier synchronization with the same host module, thereby achieving carrier synchronization between multiple power modules and improving the accuracy of carrier synchronization.

[0086] For example, Figure 4 As shown, before taking the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the following steps may also be included:

[0087] Determine whether there is a random code identical to the first random code among the N-1 second random codes;

[0088] If it exists, regenerate the target random code until the target random code and the N-1 second random codes are different, and use the target random code to replace the first random code;

[0089] Otherwise, the timers of the N-1 second modules are reset.

[0090] It should be noted that since the random codes corresponding to the N modules need to be sorted to determine the host module, the random codes corresponding to the N modules must be different, so that each module can determine the host module. Therefore, each module maintains carrier synchronization with the host module, which can ensure carrier synchronization between the N modules.

[0091] In the embodiment of the present application, after receiving the second synchronization frame sent by each of the N-1 second modules, the first module reads the second random code of each second synchronization frame, and then determines whether the first random code is the same as each received second random code.

[0092] If there is a random code identical to the first random code among the N-1 second random codes, the first module regenerates a target random code, and then detects whether the newly generated target random code is identical to each received second random code, until the target random code and the N-1 second random codes are different, and the target random code is used to replace the first random code;

[0093] Otherwise, the timers of the N-1 second modules are reset. Specifically, after determining that the first random code is different from the N-1 second random codes, the first module stores the N-1 second random codes in a random array, stores the timer of each second module, and resets the timer of each second module.

[0094] It should be noted that the minimum value of the random code generated by each module in the embodiment of the present application is the total number of preset modules. Exemplarily, the total number of preset modules can be, for example, 10. When the first module generates the first random code, the minimum value of the first random code is limited to 10. When each second module generates the corresponding second random code, the minimum value of the second random code is also limited to 10. When the first module regenerates the target random code, the minimum value of the target random code is limited to 10. Thus, after sorting the first random code and N-1 second random codes, the first module can assign a sorting number to each module, for example, the sorting number is an integer between 0 and 9. When a newly added module is connected to the multi-module parallel system, the minimum value of the random code of the newly added module is also 10, that is, the random code of the newly added module does not affect the sorting result of each previous module, thereby improving the stability of each module in the multi-module system.

[0095] It should be noted that the timer corresponding to each module is used to determine whether each module is online. The timer of each module continues to decay. When the timer is reduced to the first threshold, it means that the module corresponding to the timer is offline. For example, the module whose timer is reduced to 0 is offline. When the first module detects that N-1 second random codes are all different from the first random code, the timers corresponding to the N-1 second random codes will be reset, indicating that the N-1 second modules corresponding to the N-1 second random codes are all online modules.

[0096] It can be seen that the first module of the embodiment of the present application determines whether there is a random code identical to the first random code among the N-1 second random codes. If so, the target random code is regenerated until the target random code and the N-1 second random codes are different, and the target random code is used to replace the first random code. Otherwise, the module corresponding to the minimum value of the first random code and the N-1 second random codes is used as the host module. As a result, the random codes corresponding to the N modules are different, so that the unique host module among the N modules can be determined through the random code of each module, and the carrier synchronization of each module with the host module is achieved, thereby improving the accuracy of multi-module carrier synchronization.

[0097] Exemplarily, before taking the module corresponding to the minimum value among the first random code and the N-1 second random codes as the host module, the following steps may also be included:

[0098] Sort the first random code and N-1 second random codes in ascending order to obtain a sorting result;

[0099] Based on the sorting result, a sorting sequence number of the first module is obtained;

[0100] Compare the sorting sequence number with the M historical sorting sequence numbers of the first module;

[0101] If the sorting sequence number is different from any one of the M historical sorting sequence numbers, a fourth synchronization frame is generated, and N-1 third synchronization frames are received;

[0102] A multi-module carrier synchronization method is performed based on the fourth synchronization frame and N-1 third synchronization frames.

[0103] In an embodiment of the present application, the M historical sorting numbers are the sorting numbers of the first module when the multi-module carrier synchronization method is executed for the first M times, the N-1 third synchronization frames are the synchronization frames regenerated by the N-1 second modules after sending the N-1 second synchronization frames, and the fourth synchronization frame is the synchronization frame regenerated by the first module after sending the first synchronization frame.

[0104] Specifically, after receiving each second random code different from the first random code, the first module stores the second random code in a random array, thereby obtaining a random array storing N-1 second random codes. Then, the first random code and the N-1 second random codes in the random array are sorted to obtain a sorting result. Optionally, the sorting method may include, for example, bubble sort, selection sort, insertion sort, etc., which are not limited here.

[0105] Furthermore, the first module may obtain a sorting sequence number of the first module based on the sorting position of the first random code in the above N random codes.

[0106] In a feasible embodiment, before the first random code and the N-1 second random codes are sorted in ascending order and the sorting result is obtained, the following step is further included:

[0107] Get the timer of each second module;

[0108] The second random code corresponding to the second module whose timer is reduced to the first threshold is cleared;

[0109] Based on the number of non-zero second random codes in the N-1 second random codes, the value of the number of online modules N is adjusted.

[0110] In an embodiment of the present application, the first module may store a timer corresponding to each second module in N-1 second modules. The timer of each module is used to detect whether each module is online, and each timer will continue to decay. When the timer is reduced to the first threshold, it indicates that the module is disconnected from the multi-module parallel system. When the first module detects that the second random code of any second module is different from the first random code, the second random code of the second module is stored in the random array and the timer of the second module is reset.

[0111] Exemplarily, the initial values ​​of the timers of N-1 second modules are all set to 10, and each timer will continue to decrease by 1 during the second carrier cycle corresponding to each second module. When the first module detects that the second random code of any second module is different from the first random code, the second random code of the second module is stored in the random array, and the timer of the second module is reset to 10. If the timer of any second module is reduced to the first threshold, the random code of the second module is cleared from the random array.

[0112] Furthermore, the number of non-zero second random codes in the random array is counted, and the number of non-zero second random codes in the random array is used to update the number of online modules N. Then, the first module sorts the first random code and N-1 second random codes.

[0113] Therefore, it is possible to determine whether each second module is online based on the timer of each second module, and update the number of online modules N, thereby preventing the first module from using the disconnected second module as the host module and performing carrier synchronization with the disconnected second module, thereby improving the accuracy of multi-module carrier synchronization.

[0114] It should be noted that the embodiment of the present application sorts the random codes in ascending order, uses the module corresponding to the minimum value of the random code as the host module, and each module maintains carrier synchronization with the host module, thereby achieving carrier synchronization between N modules.

[0115] It should be understood that by selecting a module corresponding to any one of the N random codes as the host module, each module can be synchronized with the host module to achieve carrier synchronization of the N modules. The embodiment of the present application uses the module corresponding to the first random code and the minimum value of the N-1 second random codes as the host module to simplify the execution of the algorithm, facilitate each module to achieve carrier synchronization with the host module, and improve the efficiency of carrier synchronization.

[0116] Exemplarily, the first module can set sorting numbers for N modules according to the sorting results of the first random code and N-1 second random codes. Optionally, the sorting numbers of the first random code and N-1 second random codes can be set to 0, and the first random code can obtain a module with a sorting number of 0 based on the sorting results of the random codes of N modules, and the module with the sorting number of 0 is used as the host module. Therefore, by using the module with the sorting number of 0 as the host module, when adjusting the carrier synchronization between the first module and the host module, the first module can directly use its own sorting number as the relative position of the first module and the host module, thereby calculating the carrier period that the first module needs to adjust, so as to adjust the first carrier period and synchronize the carrier of the first module with that of the host module.

[0117] It should be noted that the first module sorts the first random code and N-1 second random codes, indicating that the first module is always an online module in the multi-module parallel system. Since the timer of each second module will continue to decay, but in the process of any second module decaying to 0, the first module may put the second random code of the second module into the random array, and sort the first random code and the second random code in the random array, that is, the first module does not clear the second random code corresponding to the disconnected second module in time, so it sorts the first random code and the second random code in the random array. Therefore, after the first module obtains the sorting results of the random codes of N modules, it is necessary to detect whether the sorting results of the random codes of the N modules have changed to ensure that each of the N modules is an online module.

[0118] Exemplarily, the first module may set a sorting number for each module based on the sorting results of the random codes of the N modules. Optionally, when the number of online modules is 10, within a preset time period, when the first module detects that the sorting results of the random codes of the 10 modules do not change, the sorting number of each module may be set to an integer between 0 and 9 based on the sorting results of the random codes of the 10 modules. Thus, the first module may directly use the module with the sorting number 0 among the 10 modules as the host module, and each module performs carrier synchronization with the host module, thereby achieving carrier synchronization of the 10 modules.

[0119] It should be noted that the first module can select any module with sorting numbers from 0 to 9 as the host module. The embodiment of the present application adopts the module with sorting number 0 as the host module, and the sorting number of each module can be used directly as the relative position of each module and the host module, thereby simplifying the calculation of the first carrier period and improving the carrier synchronization efficiency of the first module.

[0120] Thus, the first module will obtain its current sorting sequence number and M historical sorting sequence numbers. The M historical sorting sequence numbers are the sorting sequence numbers obtained by the first module within M carrier cycles before obtaining its current sorting sequence number.

[0121] If its own sorting sequence number is different from any one of the M historical sorting sequence numbers, that is, the sorting sequence number of the first module has changed, the first module generates a fourth synchronization frame and receives N-1 third synchronization frames, that is, continues to receive the synchronization frame sent by each second module. Then, based on the fourth synchronization frame and the N-1 third synchronization frames, the above-mentioned multi-module carrier synchronization method is executed.

[0122] It should be noted that the fourth synchronization frame is a synchronization frame generated by the first module after sending the first synchronization frame, and the third synchronization frame is a synchronization frame generated by each second module after sending the corresponding second synchronization frame. Therefore, based on the fourth synchronization frame and N-1 third synchronization frames, the above-mentioned multi-module carrier synchronization method is executed, and it is only necessary to replace the first synchronization frame in the above-mentioned multi-module carrier synchronization method with the fourth synchronization frame, and replace the second synchronization frame in the above-mentioned multi-module carrier synchronization method with the third synchronization frame, which will not be repeated here.

[0123] If the sorting sequence number of the first module is the same as all the M historical sorting sequence numbers, the first module may use the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module.

[0124] It can be seen that in the embodiment of the present application, before the first module uses the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, it will sort the first random code and the N-1 second random codes, and detect whether its own sorting has changed, so as to determine that the N modules are all online modules in the multi-module parallel system, thereby avoiding the first module using the disconnected second module as the host module and performing carrier synchronization with the disconnected second module, thereby improving the accuracy of carrier synchronization of multi-power modules.

[0125] 304: Based on the first synchronization frame and the synchronization frame corresponding to the host module, adjust the first carrier period of the first module to synchronize the carriers of the first module with those of the host module.

[0126] In the embodiment of the present application, the first module can adjust its own first carrier period based on the current value of the carrier of the first synchronization frame and the current value of the carrier of the synchronization frame corresponding to the host module, so that the first module is synchronized with the carrier of the host module.

[0127] Exemplarily, the first synchronization frame includes the current value of the first carrier, and the synchronization frame corresponding to the host module includes the current value of the main carrier.

[0128] Adjusting the first carrier period of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module may include the following steps:

[0129] Obtaining a relative position A between the first module and the host module;

[0130] Based on the current value of the first carrier and the current value of the main carrier, a difference D is obtained;

[0131] Based on the difference D and the relative position A, the first carrier period is adjusted.

[0132] In the embodiment of the present application, the relative position A is determined by the first random code and the random code of the host module. The first module can determine the relative position A between the first module and the host module based on the first random code and the random code of the host module.

[0133] In a feasible embodiment, when the first module uses the module with the sequence number 0 as the host module, the first module may use its own sequence number as the relative position A between the first module and the host module.

[0134] Optionally, bits 2 and 3 in the CAN synchronization frame of each module are used to store the current carrier value of each module, that is, the first carrier current value of the first module is the value recorded in bits 2 and 3 in the first synchronization frame, the second carrier current value of each second module is the value recorded in bits 2 and 3 in the second synchronization frame, and the main carrier current value of the host module is the value recorded in bits 2 and 3 in the synchronization frame corresponding to the host module.

[0135] Then, the first module reads bits 2 and 3 in the first synchronization frame to obtain the current value of the first carrier, and reads bits 2 and 3 in the synchronization frame corresponding to the host module to obtain the current value of the main carrier, and calculates the difference D between the current value of the first carrier and the current value of the main carrier. Based on the difference D, the first carrier period and the relative position A, the first carrier period is adjusted.

[0136] It should be noted that the first module may store the first carrier current value and each received second carrier current value via a peripheral device, for example, the peripheral device may be a direct memory access (DMA).

[0137] Therefore, the first module can obtain the relative position A between the first module and the host module, calculate the difference D between the current value of the first carrier and the current value of the main carrier, and then adjust the first carrier period based on the difference D and the relative position A, so as to synchronize the carriers of the first module and the host module, thereby improving the efficiency of carrier synchronization.

[0138] For example, Figure 5 As shown, based on the difference D and the relative position A, adjusting the first carrier period may include the following steps:

[0139] If the difference D is greater than the second threshold, then in each carrier cycle, the first carrier cycle is added with a preset value to obtain a target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycles are continuously adjusted to synchronize the carriers of the first module and the host module;

[0140] If the difference D is less than the second threshold, then in each carrier cycle, the first carrier cycle is subtracted from the preset value to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously adjusted to synchronize the carriers of the first module and the host module.

[0141] In the embodiment of the present application, the control amount can be expressed as D*A / N. After the first module calculates the difference D between the current value of the first carrier and the current value of the main carrier, the first module determines whether the difference D is greater than the second threshold. Exemplarily, in the embodiment of the present application, the second threshold can be 0, that is, it is determined whether the difference D between the current value of the first carrier and the current value of the main carrier is a positive value, thereby determining the phase difference between the current value of the first carrier and the current value of the main carrier.

[0142] Specifically, when the difference D is greater than the second threshold, that is, when the difference D between the current value of the first carrier and the current value of the main carrier is positive, in each carrier cycle, the first carrier cycle of the module is added with a preset value. Optionally, the preset value can be 1, that is, in each carrier cycle, the first carrier cycle is continuously added with 1 unit to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle. After increasing each carrier cycle by 1 unit and continuously adjusting D*A / N carrier cycles, the first carrier cycle of the first module can be synchronized with the carrier cycle of the host module.

[0143] When the difference D is less than the second threshold, that is, the difference D between the current value of the first carrier and the current value of the main carrier is negative, in each carrier cycle, the first carrier cycle of the module is subtracted from the preset value. Optionally, the preset value can be 1, that is, in each carrier cycle, the first carrier cycle is continuously subtracted by 1 unit to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle. After reducing each carrier cycle by 1 unit and continuously adjusting D*A / N carrier cycles, the first carrier cycle of the first module can be synchronized with the carrier cycle of the host module.

[0144] Therefore, after the carrier period of each module in the N modules is adjusted, the carrier periods between each module can be staggered with a fixed phase, that is, the difference between the carrier periods of any two adjacent modules in the N modules is equal.

[0145] It can be seen that the first module can continuously adjust the first carrier period in each carrier period based on the difference between the current value of the first carrier and the current value of the main carrier. After continuous adjustment for D*A / N periods, the first module and the host module can achieve carrier synchronization, thereby improving the accuracy of carrier synchronization between the first module and the host module. Moreover, the phase of the high-frequency carrier of each module in the N modules is staggered after adjustment, thereby avoiding the situation where at least two modules have opposite carrier phases to the host module, thereby suppressing high-frequency circulating current and improving the stability of the multi-power module parallel system.

[0146] Exemplarily, before adjusting the first carrier period based on the difference D and the relative position A, the method may further include the following steps:

[0147] If the difference D is less than the preset error value, N-1 third synchronization frames are received, and based on the fourth synchronization frame and N-1 third synchronization frames, the multi-module carrier synchronization method is executed until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

[0148] It should be noted that when the difference D between the current value of the first carrier of the first module and the current value of the main carrier is near 0, at this time, due to the electromagnetic interference in the multi-power module parallel system, jitter may occur when adjusting the current value of the first carrier, that is, the system stability of the first module is reduced. For this reason, in the embodiment of the present application, the first module will determine whether the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value. Within the preset error value, the first module may not adjust the first carrier period to avoid the above-mentioned jitter.

[0149] Specifically, if the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value, the first module adjusts the first carrier period based on the difference D and the relative position A;

[0150] If the difference D between the current value of the first carrier and the current value of the main carrier is less than the preset error value, the first module continues to receive N-1 third synchronization frames and executes the above-mentioned multi-module carrier synchronization method until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

[0151] Optionally, the preset error value may be 0, that is, in an ideal case, when a difference D occurs between the current value of the first carrier and the current value of the main carrier, the first module adjusts the first carrier period to synchronize the carriers of the first module and the host module.

[0152] Therefore, the first module of the embodiment of the present application can determine whether the difference D is greater than the preset error value before adjusting the first carrier period based on the difference D between the current value of the first carrier and the current value of the main carrier and the relative position A, so that when the first module adjusts the first carrier period, jitter will not occur due to frequent adjustment of the carrier period, thereby improving the stability of the carrier synchronization of the first module.

[0153] It can be seen that in the embodiment of the present application, the first module can determine the host module among the N modules based on the first synchronization frame generated by itself and the N-1 second synchronization frames sent to the first module by the N-1 second modules through the first communication method, and use the synchronization frame corresponding to the host module as the main synchronization frame. Then, the first module adjusts its own first carrier period based on the first synchronization frame and the main synchronization frame to synchronize the carrier of the first module with that of the host module. As a result, any one of the N modules can adjust its own carrier period based on its own synchronization frame and the main synchronization frame to maintain carrier synchronization with the host, thereby realizing carrier synchronization of the N modules. Moreover, each module sends the synchronization frame through the first communication method without filtering, which reduces the delay caused by carrier synchronization. On the basis of realizing carrier synchronization of N modules, the efficiency of multi-module carrier synchronization is improved.

[0154] See also Figure 6 , Figure 6 This is a block diagram of the functional units of a multi-module carrier synchronization device provided in an embodiment of the present application. Figure 6 As shown, the multi-module carrier synchronization device 600 includes an acquisition unit 601, a processing unit 602 and an adjustment unit 603;

[0155] The acquisition unit 601 is used to acquire a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module;

[0156] An acquisition unit 601 is used to acquire a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes, where the N-1 second synchronization frames are synchronization frames generated by the N-1 second modules and sent to the first module through the first communication method, and the N-1 second synchronization frames correspond to the N-1 second modules one by one, and the N-1 second modules are the N-1 modules remaining after the first module is removed from the N modules;

[0157] The processing unit 602 is configured to use a module corresponding to the minimum value of the first random code and the N-1 second random codes as a host module;

[0158] The adjustment unit 603 is used to adjust the first carrier cycle of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module, so as to synchronize the carriers of the first module and the host module.

[0159] In some possible embodiments, before taking the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the processing unit 602 is further configured to:

[0160] Determine whether there is a random code identical to the first random code among the N-1 second random codes;

[0161] If it exists, regenerate the target random code until the target random code and the N-1 second random codes are different, and use the target random code to replace the first random code;

[0162] Otherwise, the timers of the N-1 second modules are reset.

[0163] In some possible embodiments, before taking the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the processing unit 602 is further configured to:

[0164] Sort the first random code and N-1 second random codes in ascending order to obtain a sorting result;

[0165] Based on the sorting result, a sorting sequence number of the first module is obtained;

[0166] Compare the sorting sequence number with M historical sorting sequence numbers of the first module, wherein the M historical sorting sequence numbers are the sorting sequence numbers of the first module when the multi-module carrier synchronization method is executed M times before;

[0167] If the sorting sequence number is different from any one of the M historical sorting sequence numbers, a fourth synchronization frame is generated, and N-1 third synchronization frames are received, wherein the N-1 third synchronization frames are synchronization frames regenerated by the N-1 second modules after sending the N-1 second synchronization frames;

[0168] A multi-module carrier synchronization method is performed based on the fourth synchronization frame and N-1 third synchronization frames.

[0169] In some possible embodiments, before sorting the first random code and the N-1 second random codes in ascending order to obtain a sorting result, the processing unit 602 is further configured to:

[0170] Get the timer of each second module;

[0171] The second random code corresponding to the second module whose timer is reduced to the first threshold is cleared;

[0172] Based on the number of non-zero second random codes in the N-1 second random codes, the value of the number of online modules N is adjusted.

[0173] In some possible embodiments, the first synchronization frame includes the current value of the first carrier, and the synchronization frame corresponding to the host module includes the current value of the main carrier;

[0174] In terms of adjusting the first carrier period of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module, the adjustment unit 603 is specifically configured to:

[0175] Obtaining a relative position A between the first module and the host module, where the relative position A is determined by the first random code and the random code of the host module;

[0176] Based on the current value of the first carrier and the current value of the main carrier, a difference D is obtained;

[0177] Based on the difference D and the relative position A, the first carrier period is adjusted.

[0178] In some possible embodiments, in terms of adjusting the first carrier period based on the difference D and the relative position A, the adjusting unit 603 is specifically configured to:

[0179] If the difference D is greater than the second threshold, then in each carrier cycle, the first carrier cycle is added with a preset value to obtain a target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously regulated to synchronize the carriers of the first module and the host module, wherein the regulation amount is expressed as D*A / N;

[0180] If the difference D is less than the second threshold, then in each carrier cycle, the first carrier cycle is subtracted from the preset value to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously adjusted to synchronize the carriers of the first module and the host module.

[0181] In some possible embodiments, before adjusting the first carrier period based on the difference D and the relative position A, the adjusting unit 603 is further configured to:

[0182] If the difference D is less than the preset error value, N-1 third synchronization frames are received, and based on the fourth synchronization frame and N-1 third synchronization frames, the multi-module carrier synchronization method is executed until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

[0183] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 includes a transceiver 701, a processor 702 and a memory 703. They are connected via a bus 704. The memory 703 is used to store computer programs and data, and can transmit the data stored in the memory 703 to the processor 702. The electronic device 700 can be the multi-module carrier synchronization device 600 described above.

[0184] The processor 702 is used to read the computer program in the memory 703 and perform the following operations:

[0185] Acquire a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module;

[0186] Obtain a random code of each second synchronization frame in N-1 second synchronization frames to obtain N-1 second random codes, wherein the N-1 second synchronization frames are synchronization frames generated by the N-1 second modules and sent to the first module through the first communication method, the N-1 second synchronization frames correspond one-to-one to the N-1 second modules, and the N-1 second modules are the N-1 modules remaining after the first module is removed from the N modules;

[0187] The module corresponding to the minimum value among the first random code and the N-1 second random codes is used as the host module;

[0188] Based on the first synchronization frame and the synchronization frame corresponding to the host module, the first carrier cycle of the first module is adjusted to synchronize the carriers of the first module with those of the host module.

[0189] In some possible embodiments, before taking the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the processor 702 is specifically configured to perform the following operations:

[0190] Determine whether there is a random code identical to the first random code among the N-1 second random codes;

[0191] If it exists, regenerate the target random code until the target random code and the N-1 second random codes are different, and use the target random code to replace the first random code;

[0192] Otherwise, the timers of the N-1 second modules are reset.

[0193] In some possible embodiments, before taking the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the processor 702 is specifically configured to perform the following operations:

[0194] Sort the first random code and N-1 second random codes in ascending order to obtain a sorting result;

[0195] Based on the sorting result, a sorting sequence number of the first module is obtained;

[0196] Compare the sorting sequence number with M historical sorting sequence numbers of the first module, wherein the M historical sorting sequence numbers are the sorting sequence numbers of the first module when the multi-module carrier synchronization method is executed M times before;

[0197] If the sorting sequence number is different from any one of the M historical sorting sequence numbers, a fourth synchronization frame is generated, and N-1 third synchronization frames are received, wherein the N-1 third synchronization frames are synchronization frames regenerated by the N-1 second modules after sending the N-1 second synchronization frames;

[0198] A multi-module carrier synchronization method is performed based on the fourth synchronization frame and N-1 third synchronization frames.

[0199] In some possible embodiments, before sorting the first random code and the N-1 second random codes in ascending order to obtain the sorting result, the method further includes:

[0200] Get the timer of each second module;

[0201] The second random code corresponding to the second module whose timer is reduced to the first threshold is cleared;

[0202] Based on the number of non-zero second random codes in the N-1 second random codes, the value of the number of online modules N is adjusted.

[0203] In some possible embodiments, the first synchronization frame includes the current value of the first carrier, and the synchronization frame corresponding to the host module includes the current value of the main carrier;

[0204] In terms of adjusting the first carrier cycle of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module, the processor 702 is specifically configured to perform the following operations:

[0205] Obtaining a relative position A between the first module and the host module, where the relative position A is determined by the first random code and the host module random code;

[0206] Based on the current value of the first carrier and the current value of the main carrier, a difference D is obtained;

[0207] Based on the difference D and the relative position A, the first carrier period is adjusted.

[0208] In some possible embodiments, in terms of adjusting the first carrier period based on the difference D and the relative position A, the processor 702 is specifically configured to perform the following operations:

[0209] If the difference D is greater than the second threshold, then in each carrier cycle, the first carrier cycle is added with a preset value to obtain a target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously regulated to synchronize the carriers of the first module and the host module, wherein the regulation amount is expressed as D*A / N;

[0210] If the difference D is less than the second threshold, then in each carrier cycle, the first carrier cycle is subtracted from the preset value to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously adjusted to synchronize the carriers of the first module and the host module.

[0211] In some possible embodiments, before adjusting the first carrier cycle based on the difference D and the relative position A, the processor 702 is specifically configured to perform the following operations:

[0212] If the difference D is less than the preset error value, N-1 third synchronization frames are received, and based on the fourth synchronization frame and N-1 third synchronization frames, the multi-module carrier synchronization method is executed until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

[0213] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any multi-module carrier synchronization method recorded in the above method embodiments.

[0214] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute part or all of the steps of any multi-module carrier synchronization method recorded in the above method embodiments.

[0215] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0216] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0217] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.

[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0219] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.

[0220] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0221] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0222] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A multi-module carrier synchronization method, characterized in that: The method is applied to a first module, where the first module is any one of N modules, and includes: Obtaining a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module; Obtaining a random code for each of the N-1 second synchronization frames to obtain N-1 second random codes, where the N-1 second synchronization frames are synchronization frames generated by the N-1 second modules and sent to the first module via the first communication method, the N-1 second synchronization frames corresponding one-to-one to the N-1 second modules, and the N-1 second modules being the N-1 modules remaining after removing the first module from the N modules; The module corresponding to the minimum value among the first random code and the N-1 second random codes is used as the host module; Based on the first synchronization frame and the synchronization frame corresponding to the host module, a first carrier period of the first module is adjusted to synchronize the carriers of the first module with those of the host module.

2. The method according to claim 1, characterized in that Before using the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the method further includes: Determining whether there is a random code identical to the first random code among the N-1 second random codes; If so, regenerate the target random code until the target random code and the N-1 second random codes are all different, and use the target random code to replace the first random code; Otherwise, the timers of the N-1 second modules are reset.

3. The method according to claim 2, characterized in that Before using the module corresponding to the minimum value of the first random code and the N-1 second random codes as the host module, the method further includes: Sort the first random code and the N-1 second random codes in ascending order to obtain a sorting result; Based on the sorting result, obtaining a sorting sequence number of the first module; Comparing the sorting sequence number with M historical sorting sequence numbers of the first module, wherein the M historical sorting sequence numbers are the sorting sequence numbers of the first module when the multi-module carrier synchronization method is executed M times before; If the sorting sequence number is different from any one of the M historical sorting sequence numbers, a fourth synchronization frame is generated, and N-1 third synchronization frames are received, wherein the N-1 third synchronization frames are synchronization frames regenerated by the N-1 second modules after sending the N-1 second synchronization frames; The multi-module carrier synchronization method is performed based on the fourth synchronization frame and the N-1 third synchronization frames.

4. The method according to claim 2 or 3, characterized in that Before sorting the first random code and the N-1 second random codes in ascending order to obtain the sorting result, the method further includes: Get the timer of each second module; The second random code corresponding to the second module whose timer is reduced to the first threshold is cleared; The value of the number of online modules N is adjusted based on the number of non-zero second random codes in the N-1 second random codes.

5. The method according to claim 4, characterized in that The first synchronization frame includes a current value of the first carrier, and the synchronization frame corresponding to the host module includes a current value of the main carrier; The adjusting the first carrier period of the first module based on the first synchronization frame and the synchronization frame corresponding to the host module includes: Obtaining a relative position A between the first module and the host module, where the relative position A is determined by the first random code and the random code of the host module; Obtaining a difference D based on the current value of the first carrier and the current value of the main carrier; Based on the difference D and the relative position A, the first carrier period is adjusted.

6. The method according to claim 5, characterized in that The adjusting the first carrier period based on the difference D and the relative position A includes: If the difference D is greater than the second threshold, then in each carrier cycle, a preset value is added to the first carrier cycle to obtain a target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously regulated for a certain number of carrier cycles to synchronize the carriers of the first module and the host module, wherein the regulation amount is expressed as D*A / N; If the difference D is less than the second threshold, then in each carrier cycle, the preset value is subtracted from the first carrier cycle to obtain the target carrier cycle, and the target carrier cycle is used to replace the first carrier cycle, and the carrier cycle is continuously adjusted to synchronize the carriers of the first module and the host module.

7. The method according to claim 6, characterized in that Before adjusting the first carrier period based on the difference D and the relative position A, the method further includes: If the difference D is less than the preset error value, the N-1 third synchronization frames are received, and based on the fourth synchronization frame and the N-1 third synchronization frames, the multi-module carrier synchronization method is executed until the difference D between the current value of the first carrier and the current value of the main carrier is greater than the preset error value.

8. A multi-module carrier synchronization device, characterized in that: The multi-module carrier synchronization device includes an acquisition unit, a processing unit and an adjustment unit; The acquiring unit is configured to acquire a random code of a first synchronization frame to obtain a first random code, wherein the first synchronization frame is a synchronization frame generated by the first module; The acquisition unit is configured to acquire a random code of each of the N-1 second synchronization frames to obtain N-1 second random codes, wherein the N-1 second synchronization frames are synchronization frames generated by the N-1 second modules and sent to the first module via the first communication method, the N-1 second synchronization frames correspond one-to-one to the N-1 second modules, and the N-1 second modules are the N-1 modules remaining after removing the first module from the N modules; The processing unit is configured to use a module corresponding to a minimum value among the first random code and the N-1 second random codes as a host module; The adjustment unit is configured to adjust a first carrier period of the first module based on the first synchronization frame and a synchronization frame corresponding to the host module, so as to synchronize the carriers of the first module and the host module.

9. An electronic device, characterized in that: include: A processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.