Clock virtual compensation method and device, terminal equipment and storage medium

By obtaining the frequency deviation results of the terminal equipment in the wireless communication system and adjusting the relevant working parameters, virtual clock compensation is realized, and the problem of frequency drift of the crystal oscillator is solved, clock accuracy and anti-interference ability are improved, while system cost and complexity are reduced.

CN119865890APending Publication Date: 2025-04-22MORNINGCORE HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311368929.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In existing wireless communication systems, the frequency drift of the crystal oscillator results in a reduced clock accuracy, and the compensation scheme requires additional circuitry, increasing system cost and complexity.

Method used

By obtaining the frequency deviation results of the terminal device, the operating parameters related to the clock source are adjusted to achieve clock virtual compensation. This method does not require additional compensation circuits, and virtual compensation is performed through software.

Benefits of technology

While ensuring clock accuracy, the anti-interference ability of the clock circuit is improved, reducing the complexity of the clock circuit and the system hardware cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865890A_ABST
    Figure CN119865890A_ABST
Patent Text Reader

Abstract

The invention provides a clock virtual compensation method and device, terminal equipment and a storage medium, and relates to the technical field of communication. A frequency deviation result corresponding to terminal equipment is obtained; obtaining a target parameter value corresponding to a specified working parameter according to the frequency deviation result and a current parameter value corresponding to the specified working parameter of the terminal equipment; the specified working parameters are working parameters related to a clock source in the terminal equipment; and adjusting the current parameter value corresponding to the specified working parameter to the target parameter value, so that the terminal equipment works according to the target parameter value. According to the method, the working parameters related to the clock source are adjusted according to the frequency deviation condition caused by the clock source, the deviation of the clock source is not adjusted, namely virtual compensation instead of actual compensation is carried out on the clock source, so that a complex compensation circuit does not need to be additionally designed, the accuracy of the clock is ensured, and meanwhile, the accuracy of the clock is improved. And the anti-interference capability of the clock circuit can be improved, and the complexity of the clock circuit and the system hardware cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a clock virtual compensation method, device, terminal equipment and storage medium. Background Art

[0002] In wireless communication systems, high-precision clock sources are key components for the normal operation of the system. Their accuracy determines whether the system can work properly and the quality of its performance indicators. The clock source of wireless communication systems generally uses a crystal oscillator, which will produce frequency drift as the temperature changes.

[0003] In the prior art, in order to improve the clock accuracy of the crystal oscillator in different environments, the clock source generally uses a complex circuit design to compensate for the temperature effect. This compensation solution requires an additional compensation circuit and also increases the cost of the system. In addition, since the clock circuit is relatively sensitive and susceptible to external interference, it has higher requirements for circuit design. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a clock virtual compensation method, apparatus, terminal equipment and storage medium, so as to improve the anti-interference ability of the clock circuit while ensuring the clock accuracy, and reduce the complexity of the clock circuit and the system hardware cost.

[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0006] In a first aspect, the present invention provides a clock virtual compensation method, the method comprising:

[0007] Obtaining a frequency deviation result corresponding to the terminal device; the frequency deviation result represents a frequency deviation caused by a clock source of the terminal device;

[0008] Obtaining a target parameter value corresponding to a specified operating parameter according to the frequency deviation result and a current parameter value corresponding to a specified operating parameter of the terminal device; wherein the specified operating parameter is an operating parameter related to the clock source in the terminal device;

[0009] The current parameter value corresponding to the specified working parameter is adjusted to the target parameter value, so that the terminal device works according to the target parameter value.

[0010] In an optional implementation manner, obtaining a frequency deviation result corresponding to the terminal device includes:

[0011] When the terminal device searches for a network, a pre-stored initial relative frequency deviation is obtained, and the initial relative frequency deviation is used as a frequency deviation result corresponding to the terminal device.

[0012] In an optional implementation manner, obtaining a target parameter value corresponding to the specified operating parameter according to the frequency deviation result and a current parameter value corresponding to the specified operating parameter of the terminal device includes:

[0013] The parameter compensation value corresponding to the specified working parameter is obtained according to the product of the current parameter value corresponding to the specified working parameter and the initial relative frequency deviation, and the current parameter value corresponding to the specified working parameter is subtracted from the parameter compensation value corresponding to the specified working parameter to obtain the target parameter value corresponding to the specified working parameter; the current parameter value corresponding to the specified working parameter is the default configuration value.

[0014] In an optional implementation, the designated working parameters corresponding to the terminal device when searching for a network include a frequency parameter and a search duration parameter, and obtaining the parameter compensation value corresponding to the designated working parameter according to the product of the current parameter value corresponding to the designated working parameter and the initial relative frequency deviation, and subtracting the current parameter value corresponding to the designated working parameter from the parameter compensation value corresponding to the designated working parameter to obtain the target parameter value corresponding to the designated working parameter includes:

[0015] For the frequency parameter, obtaining a parameter compensation value corresponding to the frequency parameter according to the product of a current parameter value corresponding to the frequency parameter and the initial relative frequency deviation; subtracting the current parameter value corresponding to the frequency parameter from the parameter compensation value corresponding to the frequency parameter to obtain a target parameter value corresponding to the frequency parameter;

[0016] For the search duration parameter, obtain the parameter compensation value corresponding to the search duration parameter based on the product of the current parameter value corresponding to the search duration parameter and the initial relative frequency deviation; subtract the current parameter value corresponding to the search duration parameter from the parameter compensation value corresponding to the search duration parameter to obtain the target parameter value corresponding to the search duration parameter.

[0017] In an optional implementation manner, obtaining a frequency deviation result corresponding to the terminal device includes:

[0018] When the terminal device searches for a network and enters a normal working state, the real-time absolute frequency deviation with other devices is calculated according to the data received from other devices;

[0019] A frequency deviation result corresponding to the terminal device is obtained according to the real-time absolute frequency deviation.

[0020] In an optional implementation manner, the designated working parameters corresponding to the terminal device when searching for a network and entering a normal working state include frequency parameters and timing adjustment parameters; and obtaining a frequency deviation result corresponding to the terminal device according to the real-time absolute frequency deviation includes:

[0021] With respect to the frequency parameter, taking the real-time absolute frequency deviation as a frequency deviation result corresponding to the terminal device;

[0022] With respect to the timing adjustment parameter, a real-time relative frequency deviation is calculated according to the real-time absolute frequency deviation and the current real-time frequency of the other device, and the real-time relative frequency deviation is used as the frequency deviation result corresponding to the terminal device.

[0023] In an optional implementation manner, obtaining a target parameter value corresponding to the specified operating parameter according to the frequency deviation result and a current parameter value corresponding to the specified operating parameter of the terminal device includes:

[0024] For the frequency parameter, subtract the current parameter value corresponding to the frequency parameter from the real-time absolute frequency deviation to obtain the target parameter value corresponding to the frequency parameter; the current parameter value corresponding to the frequency parameter is the actual configuration value;

[0025] For the timing adjustment parameter, the parameter compensation value corresponding to the timing adjustment parameter is obtained according to the product of the current parameter value corresponding to the timing adjustment parameter and the real-time relative frequency deviation; the current parameter value corresponding to the timing adjustment parameter is subtracted from the parameter compensation value corresponding to the timing adjustment parameter to obtain the target parameter value corresponding to the timing adjustment parameter; the current parameter value corresponding to the timing adjustment parameter is the difference between the timing moment after adjustment and the timing moment before adjustment.

[0026] In a second aspect, the present invention provides a clock virtual compensation device, the device comprising:

[0027] A frequency deviation acquisition module, used to acquire a frequency deviation result corresponding to a terminal device; the frequency deviation result represents a frequency deviation caused by a clock source of the terminal device;

[0028] a parameter adjustment module, configured to obtain a target parameter value corresponding to the specified working parameter according to the frequency deviation result and a current parameter value corresponding to the specified working parameter of the terminal device; wherein the specified working parameter is an working parameter related to the clock source in the terminal device;

[0029] The parameter configuration module is used to adjust the current parameter value corresponding to the specified working parameter to the target parameter value so that the terminal device works according to the target parameter value.

[0030] In a third aspect, the present invention provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the clock virtual compensation method as described in any one of the aforementioned embodiments.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the clock virtual compensation method as described in any one of the aforementioned embodiments are implemented.

[0032] The clock virtual compensation method, device, terminal device and storage medium provided by the embodiment of the present invention obtain the frequency deviation result corresponding to the terminal device; the frequency deviation result characterizes the frequency deviation caused by the clock source of the terminal device; according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device, the target parameter value corresponding to the specified working parameter is obtained; wherein the specified working parameter is the working parameter related to the clock source in the terminal device; the current parameter value corresponding to the specified working parameter is adjusted to the target parameter value, so that the terminal device works according to the target parameter value. The method obtains the frequency deviation caused by the clock source, and then adjusts the working parameters related to the clock source in the terminal device, but does not adjust the deviation of the clock source itself, that is, the clock source is virtually compensated by software instead of actual compensation, so there is no need to design an additional complex compensation circuit, while ensuring the clock accuracy, it can also improve the anti-interference ability of the clock circuit, reduce the complexity of the clock circuit and the system hardware cost.

[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A schematic diagram showing the composition of an existing wireless communication system is shown;

[0036] Figure 2 A schematic diagram of the composition of an existing clock circuit is shown;

[0037] Figure 3 A schematic diagram of a flow chart of a clock virtual compensation method provided by an embodiment of the present invention is shown;

[0038] Figure 4 A schematic diagram of a circuit architecture of a terminal device provided by an embodiment of the present invention is shown;

[0039] Figure 5 A compensation schematic diagram of timing adjustment parameters is shown;

[0040] Figure 6 A functional module diagram of a clock virtual compensation device provided by an embodiment of the present invention is shown;

[0041] Figure 7 A block diagram of a terminal device provided by an embodiment of the present invention is shown.

[0042] Icons: 100 - terminal device; 110 - memory; 120 - processor; 130 - communication module; 600 - clock virtual compensation device; 610 - frequency deviation acquisition module; 620 - parameter adjustment module; 630 - parameter configuration module. DETAILED DESCRIPTION

[0043] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0044] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0045] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0046] The clock circuit is the core of the wireless communication system, providing clock and frequency reference for circuits and systems. Figure 1 The figure shows the schematic diagram of the existing wireless communication system. The clock source of the wireless communication system generally uses a crystal oscillator, which will produce frequency drift with the change of temperature. In order to improve the clock accuracy of the crystal oscillator in different environments, the clock source generally uses a complex circuit design to compensate for the temperature effect. This compensation solution requires additional compensation circuits, which also increases the cost of the system.

[0047] like Figure 2 As shown in the figure, it is a schematic diagram of the composition of an existing clock circuit. The clock source used by the clock circuit integrates temperature compensation and voltage compensation circuits. The frequency offset caused by temperature changes can be compensated by adjusting the analog voltage signal. In this circuit, in order to compensate for the frequency deviation caused by temperature changes, a DAC (digital-to-analog converter) circuit needs to be configured outside the crystal oscillator, and a special interface circuit is required to digitally control the DAC. The control signal is generally provided by the baseband processing and control circuit or the RF circuit. There are also some designs that choose to integrate the DAC into the RF circuit or other peripherals. Since the clock circuit is relatively sensitive and susceptible to external interference, these circuit components will place higher requirements on the design.

[0048] In order to solve the above problems, an embodiment of the present invention provides a clock virtual compensation method, apparatus, terminal device and storage medium. The method obtains the frequency deviation caused by the clock source, and then adjusts the working parameters related to the clock source in the terminal device, but does not adjust the deviation of the clock source itself. That is, the clock source is virtually compensated by software rather than actually compensated. Therefore, there is no need to design an additional complex compensation circuit. While ensuring the clock accuracy, it can also improve the anti-interference ability of the clock circuit and reduce the complexity of the clock circuit and the system hardware cost.

[0049] The following describes various embodiments of the present invention in detail.

[0050] Please refer to Figure 3 , is a flow chart of a clock virtual compensation method provided by an embodiment of the present invention. It should be noted that the clock virtual compensation method of the present invention is not based on Figure 3 It should be understood that in other embodiments, the order of some steps in the clock virtual compensation method of the present invention can be interchanged according to actual needs, or some steps can be omitted or deleted. The clock virtual compensation method can be applied to terminal devices such as smart phones, tablet computers, and laptops. Figure 3 The specific process shown is described in detail.

[0051] Step S301, obtaining a frequency deviation result corresponding to the terminal device; the frequency deviation result represents the frequency deviation caused by the clock source of the terminal device.

[0052] In this embodiment, the frequency deviation result may be pre-stored in the terminal device, or may be calculated based on real-time data received by the terminal device, and can be obtained according to actual scenario needs.

[0053] Step S302, obtaining a target parameter value corresponding to the designated working parameter according to the frequency deviation result and the current parameter value corresponding to the designated working parameter of the terminal device; wherein the designated working parameter is a working parameter related to the clock source in the terminal device.

[0054] In this embodiment, since the specified working parameters are working parameters related to the clock source in the terminal device, the deviation of the clock source will affect the accuracy of these specified working parameters. In other words, when there is a deviation in the clock source, the actual parameter value corresponding to the specified working parameter of the terminal device may deviate from the expected value by configuring the specified working parameter according to the current parameter value, so it is necessary to adjust the current parameter value of the specified working parameter so that the actual parameter value corresponding to the specified working parameter reaches the expected value. Since the frequency deviation result characterizes the frequency deviation caused by the clock source, the current parameter value corresponding to the specified working parameter can be adjusted based on the frequency deviation result to obtain the corresponding target parameter value.

[0055] Step S303: adjusting the current parameter value corresponding to the designated working parameter to the target parameter value, so that the terminal device works according to the target parameter value.

[0056] In this embodiment, since the target parameter value is obtained based on the frequency deviation result and the current parameter value corresponding to the specified working parameter, after the current parameter value corresponding to the specified working parameter is adjusted according to the target parameter value, the terminal device can operate according to the target parameter value and make the actual parameter value corresponding to the specified working parameter reach the expected value.

[0057] It can be seen that the clock virtual compensation method provided by the embodiment of the present invention obtains the frequency deviation result corresponding to the terminal device; the frequency deviation result characterizes the frequency deviation caused by the clock source of the terminal device; according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device, the target parameter value corresponding to the specified working parameter is obtained; wherein the specified working parameter is the working parameter related to the clock source in the terminal device; the current parameter value corresponding to the specified working parameter is adjusted to the target parameter value, so that the terminal device works according to the target parameter value. This method obtains the frequency deviation caused by the clock source, and then adjusts the working parameters related to the clock source in the terminal device, but does not adjust the deviation of the clock source itself, that is, the clock source is virtually compensated by software instead of actual compensation, so there is no need to design an additional complex compensation circuit, while ensuring the clock accuracy, it can also improve the anti-interference ability of the clock circuit, reduce the complexity of the clock circuit and the system hardware cost.

[0058] In some embodiments, the specified working parameters of the terminal device may include working parameters affected by the clock source, such as frequency parameters, search duration parameters, and timing adjustment parameters. In scenarios such as when the terminal device is turned on or loses the network to search for or arrange the network, and when it enters a normal working state after searching the network, the terminal device needs to adjust these working parameters affected by the clock source. Below, the scenarios of the terminal device searching for the network and the terminal device searching for the network and entering a normal working state are described respectively.

[0059] For the scenario where the terminal device searches for a network, the above step S301 may include: when the terminal device searches for a network, obtaining a pre-stored initial relative frequency deviation, and using the initial relative frequency deviation as a frequency deviation result corresponding to the terminal device.

[0060] In this embodiment, the initial relative frequency deviation can be calculated by testing and calibrating the clock source during production calibration of the production line, and the frequency deviation value obtained is obtained. The initial relative frequency deviation is a relative deviation. For example, assuming that the RF circuit of the terminal device needs to transmit or receive at 2000MHz, the test frequency of the calibration instrument is 2000.003MHz, that is, the absolute deviation of the RF circuit caused by the clock source is +3KHz, and the relative deviation is +3KHz / 2000MHz = +1.5ppm (one millionth), then "+1.5ppm" is saved as the initial relative frequency deviation in the terminal device.

[0061] The initial relative frequency deviation may be a positive number or a negative number. When the initial relative frequency deviation is a positive number, it indicates that the actual transmission frequency is too large. When the initial relative frequency deviation is a negative number, it indicates that the actual transmission frequency is too small.

[0062] Accordingly, when the terminal device searches for a network, the target parameter value corresponding to the specified working parameter is obtained according to the initial relative frequency deviation. That is, the above step S302 may include:

[0063] The parameter compensation value corresponding to the specified working parameter is obtained according to the product of the current parameter value corresponding to the specified working parameter and the initial relative frequency deviation, and the current parameter value corresponding to the specified working parameter is subtracted from the parameter compensation value corresponding to the specified working parameter to obtain the target parameter value corresponding to the specified working parameter; the current parameter value corresponding to the specified working parameter is the default configuration value.

[0064] In this embodiment, when the terminal device searches for the network, the current parameter value corresponding to the specified working parameter is the default configuration value, that is, in the network search stage, it is expected that the actual parameter value corresponding to the specified working parameter is consistent with the default configuration value; but due to the deviation of the clock source, if the specified working parameter is still configured according to the default configuration value, then there will be a deviation between the actual parameter value corresponding to the specified working parameter and the default configuration value.

[0065] Since the initial relative frequency deviation is a relative deviation, the default configuration value and the initial relative frequency deviation are multiplied, and the parameter compensation value obtained is the value that needs to be compensated for the specified working parameter; when the parameter compensation value is a positive number, it indicates that configuring the specified working parameter according to the default configuration value will make the actual parameter value corresponding to the specified working parameter greater than the default configuration value, so the default configuration value is subtracted from the parameter compensation value, and the difference obtained is the target parameter value. The target parameter value is less than the default configuration value. The specified working parameter is configured according to the target parameter value, so that the actual parameter value corresponding to the specified working parameter can be reduced, thereby keeping consistent with the default configuration value. Similarly, when the parameter compensation value is a negative number, it indicates that configuring the specified working parameter according to the default configuration value will make the actual parameter value corresponding to the specified working parameter less than the default configuration value, so the default configuration value is subtracted from the parameter compensation value, and the difference obtained is the target parameter value. The target parameter value is greater than the default configuration value. The specified working parameter is configured according to the target parameter value, so that the actual parameter value corresponding to the specified working parameter can be increased, thereby keeping consistent with the default configuration value.

[0066] When the terminal device searches for the network, the working parameters affected by the clock source mainly include the frequency parameter and the search duration parameter, that is, the designated working parameters corresponding to the terminal device searching for the network include the frequency parameter and the search duration parameter. The above steps obtain the parameter compensation value corresponding to the designated working parameter according to the product of the current parameter value corresponding to the designated working parameter and the initial relative frequency deviation, and subtract the current parameter value corresponding to the designated working parameter from the parameter compensation value corresponding to the designated working parameter to obtain the target parameter value corresponding to the designated working parameter, which may specifically include:

[0067] For the frequency parameter, a parameter compensation value corresponding to the frequency parameter is obtained according to the product of the current parameter value corresponding to the frequency parameter and the initial relative frequency deviation; the current parameter value corresponding to the frequency parameter is subtracted from the parameter compensation value corresponding to the frequency parameter to obtain the target parameter value corresponding to the frequency parameter; for the search duration parameter, a parameter compensation value corresponding to the search duration parameter is obtained according to the product of the current parameter value corresponding to the search duration parameter and the initial relative frequency deviation; the current parameter value corresponding to the search duration parameter is subtracted from the parameter compensation value corresponding to the search duration parameter to obtain the target parameter value corresponding to the search duration parameter.

[0068] In this embodiment, the frequency parameter can be understood as the frequency of the local oscillator in the RF circuit of the terminal device. In the network search phase, the current parameter value corresponding to the frequency parameter is the preset frequency; the search duration parameter is the duration of the frequency synchronization and time synchronization of the search data when the terminal device initially searches the network. In the network search phase, the current parameter value corresponding to the search duration parameter is the preset duration. For example, if the RF circuit is configured to transmit or receive at 2000MHz, the current parameter value of the frequency of the local oscillator in the RF circuit is 2000MHz; if the initial search duration is preset in the terminal device as 20ms, the current parameter value corresponding to the search duration parameter is 20ms.

[0069] For the scenario where the terminal device searches for a network and enters a normal working state, the above step S301 may include:

[0070] When the terminal device searches for the network and enters a normal working state, the real-time absolute frequency deviation with other devices is calculated according to the data received from other devices; and the frequency deviation result corresponding to the terminal device is obtained according to the real-time absolute frequency deviation.

[0071] That is to say, after the terminal device enters the normal working state, it can perform normal data transmission and reception, and calculate the absolute frequency deviation with other devices (such as base stations or other terminals) in real time based on the received data, and obtain the frequency deviation result corresponding to the terminal device based on the real-time absolute frequency deviation. Therefore, after the terminal device enters the normal working state, the compensation for the specified working parameters is based on the calculated real-time absolute frequency deviation; and in the network search stage, the compensation for the specified working parameters is based on the pre-stored initial relative frequency deviation.

[0072] Among them, the real-time absolute frequency deviation can be a positive number or a negative number, which is the difference between the current operating frequency of the terminal device and the current operating frequency of other devices; when the real-time absolute frequency deviation is a positive number, it indicates that the actual operating frequency of the terminal device is larger than that of other devices; when the real-time absolute frequency deviation is a negative number, it indicates that the actual operating frequency of the terminal device is smaller than that of other devices.

[0073] In this embodiment, the corresponding designated working parameters when the terminal device searches for the network and enters the normal working state include frequency parameters and timing adjustment parameters. For the frequency parameter, the frequency parameter can be directly compensated according to the real-time absolute frequency deviation; for the timing adjustment parameter, the relative deviation needs to be further calculated according to the real-time absolute frequency deviation, so as to compensate the timing adjustment parameter according to the relative deviation.

[0074] Based on this, the above steps obtain the frequency deviation result corresponding to the terminal device according to the real-time absolute frequency deviation, including: for the frequency parameter, using the real-time absolute frequency deviation as the frequency deviation result corresponding to the terminal device; for the timing adjustment parameter, calculating the real-time relative frequency deviation according to the real-time absolute frequency deviation and the current real-time frequency of other devices, and using the real-time relative frequency deviation as the frequency deviation result corresponding to the terminal device.

[0075] That is to say, when the terminal equipment is in normal working condition, the compensation for frequency parameters is achieved by taking the real-time absolute frequency deviation as the frequency deviation result, and the compensation for timing adjustment parameters is achieved by calculating the ratio between the real-time absolute frequency deviation and the current parameter value corresponding to the frequency parameter to obtain the real-time relative frequency deviation, and taking the real-time relative frequency deviation as the frequency deviation result.

[0076] Accordingly, when the terminal device is in normal working condition, since the compensation of frequency parameters and timing adjustment parameters respectively adopts real-time absolute frequency deviation and real-time relative frequency deviation as frequency deviation results, there are differences in specific implementation methods when obtaining the target parameter value according to the frequency deviation result.

[0077] That is, the above step S302 may include:

[0078] For the frequency parameter, subtract the current parameter value corresponding to the frequency parameter from the real-time absolute frequency deviation to obtain the target parameter value corresponding to the frequency parameter; the current parameter value corresponding to the frequency parameter is the actual configuration value; for the timing adjustment parameter, obtain the parameter compensation value corresponding to the timing adjustment parameter according to the product of the current parameter value corresponding to the timing adjustment parameter and the real-time relative frequency deviation; subtract the current parameter value corresponding to the timing adjustment parameter from the parameter compensation value corresponding to the timing adjustment parameter to obtain the target parameter value corresponding to the timing adjustment parameter; the current parameter value corresponding to the timing adjustment parameter is the difference between the timing moment after adjustment and the timing moment before adjustment.

[0079] In this embodiment, after the terminal device searches the network and enters a normal working state, the current parameter value corresponding to the frequency parameter of the terminal device is the actual configuration value; for example, the current configuration operating frequency of the terminal device is 2000MHz, and the real-time absolute frequency deviation calculated by the terminal device based on the received data is 2kHz, then the target parameter value can be calculated to be 1999.998MHz, and the frequency parameter of the terminal device is adjusted from 2000MHz to 1999.998MHz, which can eliminate the frequency deviation between the terminal device and other devices.

[0080] Similarly, for timing compensation, when the terminal device wants to adjust the timing moment T2 (timing moment before adjustment) to T`2 (timing moment after adjustment), the current parameter value corresponding to the timing adjustment parameter can be calculated as (T`2-T2). Assuming that the current real-time relative frequency deviation is Xppm, the parameter compensation value X*(T`2-T2) corresponding to the timing adjustment parameter can be calculated. The target parameter value corresponding to the timing adjustment parameter obtained after compensation is [(T`2-T2)-X*(T`2-T2)]. In this way, the terminal device can accurately adjust the timing moment T2 to T`2 according to [(T`2-T2)-X*(T`2-T2)].

[0081] The specific implementation process of compensating the frequency parameter, the search duration parameter, and the timing adjustment parameter in the embodiment of the present invention is exemplarily described below with reference to the accompanying drawings. Figure 4 As shown, it is a schematic diagram of the circuit architecture of the terminal device provided by an embodiment of the present invention. Compared with the traditional complex clock circuit, the clock circuit of the present invention only includes a clock source, directly outputs a clock signal, and does not include complex control circuits such as DAC and filter circuits. A storage space for virtual calibration results is added to the storage module to store the virtual calibration results, and two virtual units are added to the baseband processing and control module, one is a virtual frequency compensation unit, and the other is a virtual timing compensation unit.

[0082] During production calibration of the production line, the clock source is still tested and calibrated in the normal way. However, unlike conventional test calibration, the test calibration only needs to obtain the deviation of the current clock source, without controlling and adjusting the deviation of the clock source, and record the relative deviation of this clock source, and record the relative deviation value as the virtual calibration result in the storage module. For example, assuming that the clock source used is 26M, the transmission frequency of the RF circuit is controlled to be 2000MHz during calibration, and the frequency tested by the calibration instrument is 2000.003MHz, that is, the absolute deviation of the RF circuit caused by the clock source is +3KHz, and the relative deviation is +3KHz / 2000MHz=+1.5ppm, then this "+1.5ppm" is saved in the storage module as the virtual calibration result; similarly, if the frequency tested by the calibration instrument is 1999.998MHz, the virtual calibration result is "-1ppm". It should be noted that the virtual calibration result here can be understood as the above-mentioned initial relative frequency deviation.

[0083] When the terminal device is turned on or loses the network to perform network search or network layout, the baseband processing and control module will control the RF circuit to send or receive at the specified frequency. For example, if the RF circuit is configured to transmit or receive at 2000MHz, the parameters of the local oscillator of the RF circuit can be configured to correspond to 2000MHz. The premise of this configuration is that the clock circuit is accurate. In an embodiment of the present invention, due to the deviation of the clock source, this normal configuration method will cause the RF circuit to be unable to transmit or receive at the accurate 2000MHz. For example, if the virtual calibration result is "-1ppm", it means that when the parameters of the local oscillator are configured to correspond to 2000MHz, the actual output frequency is 1999.998MHz.

[0084] Therefore, when configuring the frequency parameters of the local oscillator of the radio frequency circuit, the embodiment of the present invention fine-tunes the parameters according to the virtual calibration result and through the "virtual frequency compensation" unit. For example, if the virtual calibration result is "-1ppm" and it is necessary to transmit at a frequency of 2000MHz, then the "virtual frequency compensation" module calculates that the radio frequency parameter configuration needs to be adjusted (1ppm*2000MHz)=2KHz, that is, the parameters of the local oscillator of the radio frequency circuit need to be adjusted to 2000.002MHz, and the actual output frequency is a relatively accurate 2000MHz. It should be noted that the frequency compensation performed here by the "virtual frequency compensation" module can be for the local oscillator in the radio frequency circuit, or it can be a compensation unit implemented by other methods, such as adding an additional digital frequency compensation unit in the baseband processing and control module, but the frequency compensation value is obtained by using the virtual calibration result.

[0085] After the terminal device searches for the network and enters the normal working state, it will calculate the frequency deviation with the base station or other terminals in real time according to the received data. In the embodiment of the present invention, the terminal device can calculate the corresponding relative deviation for the obtained frequency deviation value, as a real-time virtual frequency deviation and store it in the storage module in real time for subsequent timing adjustment; it should be noted that the real-time virtual frequency deviation here can be understood as the above-mentioned real-time relative frequency deviation. For the adjustment of the frequency under normal working conditions, the parameters of the local oscillator can be adjusted directly according to the calculated frequency deviation value. For example, the current configured working frequency of the local oscillator is 2000MHz. If the real-time absolute frequency deviation calculated according to the received data is 2KHz, then in the subsequent work, the frequency parameters of the local oscillator are adjusted to (2000MHzz-2KHz)=1999.998MHz. Of course, as above, an additional digital frequency compensation unit can be added to the baseband processing and control module for compensation.

[0086] In addition to frequency deviation, in mobile communications, the deviation of the clock source will also affect the duration and timing of reception and transmission. When the terminal device initially searches the network, it needs to search for data for a long period of time for frequency synchronization and time synchronization. In the embodiment of the present invention, for the search duration, it is necessary to compensate through the virtual calibration result and the "virtual timing compensation" module. For example, if the virtual calibration result is -2ppm and the system stipulates that the initial search duration is 20ms, then in the actual search, the search duration of the baseband processing and control module needs to be set to "20ms+40ns".

[0087] During normal transmission and reception after the initial reception of the search network, the timing adjustment can refer to Figure 5 , T1, T2, ..., Tn are theoretical periodic timing points, but due to the influence of signal transmission time and clock differences between transceiver devices, it is necessary to frequently calculate the timing deviation based on the received data, and make timing adjustments to ensure synchronization between communication devices. Assuming that at time T2, the timing needs to be adjusted to T`2, then when making timing adjustments, it is necessary to first compensate the timing adjustment parameters based on the stored real-time virtual frequency deviation, and then the baseband processing and control module will make timing adjustments. Figure 5 For example, assuming that the current parameter value corresponding to the timing adjustment parameter calculated based on the received data is (T`2-T2), and the real-time virtual frequency deviation is Xppm, the compensation amount is X*(T`2-T2). After compensation, the timing adjustment parameter actually executed is [(T`2-T2)-X*(T`2-T2)].

[0088] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a clock virtual compensation device is given below. Figure 6, which is a functional module diagram of a clock virtual compensation device 600 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effect of the clock virtual compensation device 600 provided in this embodiment are the same as those of the above-mentioned embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiment. The clock virtual compensation device 600 includes: a frequency deviation acquisition module 610, a parameter adjustment module 620 and a parameter configuration module 630.

[0089] The frequency deviation acquisition module 610 is used to obtain the frequency deviation result corresponding to the terminal device; the frequency deviation result represents the frequency deviation caused by the clock source of the terminal device.

[0090] It can be understood that the frequency deviation acquisition module 610 can execute the above step S301.

[0091] The parameter adjustment module 620 is used to obtain the target parameter value corresponding to the specified working parameter according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device; wherein the specified working parameter is the working parameter related to the clock source in the terminal device.

[0092] It can be understood that the parameter adjustment module 620 can be executed to perform the above step S302.

[0093] The parameter configuration module 630 is used to adjust the current parameter value corresponding to the specified working parameter to the target parameter value, so that the terminal device works according to the target parameter value.

[0094] It can be understood that the parameter configuration module 630 can be executed to perform the above step S303.

[0095] Optionally, the frequency deviation acquisition module 610 may be configured to acquire a pre-stored initial relative frequency deviation when the terminal device searches for a network, and use the initial relative frequency deviation as a frequency deviation result corresponding to the terminal device.

[0096] Optionally, the parameter adjustment module 620 can be used to obtain a parameter compensation value corresponding to the specified working parameter based on the product of the current parameter value corresponding to the specified working parameter and the initial relative frequency deviation, and subtract the current parameter value corresponding to the specified working parameter from the parameter compensation value corresponding to the specified working parameter to obtain a target parameter value corresponding to the specified working parameter; the current parameter value corresponding to the specified working parameter is the default configuration value.

[0097] Optionally, the designated working parameters corresponding to the terminal device when searching for the network include a frequency parameter and a search duration parameter. The parameter adjustment module 620 can be specifically used to obtain, for the frequency parameter, a parameter compensation value corresponding to the frequency parameter according to the product of a current parameter value corresponding to the frequency parameter and an initial relative frequency deviation; subtract the current parameter value corresponding to the frequency parameter from the parameter compensation value corresponding to the frequency parameter to obtain a target parameter value corresponding to the frequency parameter; for the search duration parameter, obtain the parameter compensation value corresponding to the search duration parameter according to the product of a current parameter value corresponding to the search duration parameter and an initial relative frequency deviation; subtract the current parameter value corresponding to the search duration parameter from the parameter compensation value corresponding to the search duration parameter to obtain the target parameter value corresponding to the search duration parameter.

[0098] Optionally, the frequency deviation acquisition module 610 can be used to calculate the real-time absolute frequency deviation with other devices based on the data received from other devices when the terminal device searches for the network and enters a normal working state; and obtain the frequency deviation result corresponding to the terminal device based on the real-time absolute frequency deviation.

[0099] Optionally, the corresponding specified working parameters when the terminal device searches for the network and enters a normal working state include frequency parameters and timing adjustment parameters; the frequency deviation acquisition module 610 can be specifically used to use the real-time absolute frequency deviation as the frequency deviation result corresponding to the terminal device for the frequency parameter; for the timing adjustment parameter, the real-time relative frequency deviation is calculated based on the real-time absolute frequency deviation and the current real-time frequency of other devices, and the real-time relative frequency deviation is used as the frequency deviation result corresponding to the terminal device.

[0100] Optionally, the parameter adjustment module 620 can be used to, for the frequency parameter, subtract the current parameter value corresponding to the frequency parameter from the real-time absolute frequency deviation to obtain the target parameter value corresponding to the frequency parameter; the current parameter value corresponding to the frequency parameter is the actual configuration value; for the timing adjustment parameter, obtain the parameter compensation value corresponding to the timing adjustment parameter according to the product of the current parameter value corresponding to the timing adjustment parameter and the real-time relative frequency deviation; subtract the current parameter value corresponding to the timing adjustment parameter from the parameter compensation value corresponding to the timing adjustment parameter to obtain the target parameter value corresponding to the timing adjustment parameter; the current parameter value corresponding to the timing adjustment parameter is the difference between the timing moment after adjustment and the timing moment before adjustment.

[0101] It can be seen that the clock virtual compensation device provided by the embodiment of the present invention includes a frequency deviation acquisition module, a parameter adjustment module and a parameter configuration module. The frequency deviation acquisition module is used to obtain the frequency deviation result corresponding to the terminal device; the frequency deviation result represents the frequency deviation caused by the clock source of the terminal device; the parameter adjustment module is used to obtain the target parameter value corresponding to the specified working parameter according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device; wherein the specified working parameter is the working parameter related to the clock source in the terminal device; the parameter configuration module is used to adjust the current parameter value corresponding to the specified working parameter to the target parameter value, so that the terminal device works according to the target parameter value. By obtaining the frequency deviation caused by the clock source, and then adjusting the working parameters related to the clock source in the terminal device, the deviation of the clock source itself is not adjusted, that is, the clock source is virtually compensated by software instead of actual compensation, so there is no need to design a complex compensation circuit. While ensuring the clock accuracy, it can also improve the anti-interference ability of the clock circuit and reduce the complexity of the clock circuit and the system hardware cost.

[0102] Please refer to Figure 7 , is a block diagram of a terminal device 100 provided in an embodiment of the present invention. The terminal device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0103] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0104] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, when the computer program stored in the memory 110 is executed by the processor 120, the clock virtual compensation method disclosed in the above embodiments can be implemented.

[0105] The communication module 130 is used to establish a communication connection between the terminal device 100 and other devices through a network, and to send and receive data through the network.

[0106] It should be understood that Figure 7 The structure shown is only a schematic diagram of the structure of the terminal device 100. The terminal device 100 may also include Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown. Figure 7 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0107] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 120, the clock virtual compensation method disclosed in the above embodiments is implemented.

[0108] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0109] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0110] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A clock virtual compensation method, characterized in that: The method comprises: Obtaining a frequency deviation result corresponding to the terminal device; the frequency deviation result represents a frequency deviation caused by a clock source of the terminal device; Obtaining a target parameter value corresponding to a specified operating parameter according to the frequency deviation result and a current parameter value corresponding to a specified operating parameter of the terminal device; wherein the specified operating parameter is an operating parameter related to the clock source in the terminal device; The current parameter value corresponding to the specified working parameter is adjusted to the target parameter value, so that the terminal device works according to the target parameter value.

2. The clock virtual compensation method according to claim 1, characterized in that: The obtaining of the frequency deviation result corresponding to the terminal device includes: When the terminal device searches for a network, a pre-stored initial relative frequency deviation is obtained, and the initial relative frequency deviation is used as a frequency deviation result corresponding to the terminal device.

3. The clock virtual compensation method according to claim 2, characterized in that: The obtaining, according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device, a target parameter value corresponding to the specified working parameter includes: The parameter compensation value corresponding to the specified working parameter is obtained according to the product of the current parameter value corresponding to the specified working parameter and the initial relative frequency deviation, and the current parameter value corresponding to the specified working parameter is subtracted from the parameter compensation value corresponding to the specified working parameter to obtain the target parameter value corresponding to the specified working parameter; the current parameter value corresponding to the specified working parameter is the default configuration value.

4. The clock virtual compensation method according to claim 3, characterized in that: The designated working parameters corresponding to the terminal device when searching for a network include a frequency parameter and a search duration parameter, obtaining a parameter compensation value corresponding to the designated working parameter according to the product of a current parameter value corresponding to the designated working parameter and the initial relative frequency deviation, and subtracting the current parameter value corresponding to the designated working parameter from the parameter compensation value corresponding to the designated working parameter to obtain a target parameter value corresponding to the designated working parameter, including: For the frequency parameter, obtaining a parameter compensation value corresponding to the frequency parameter according to the product of a current parameter value corresponding to the frequency parameter and the initial relative frequency deviation; subtracting the current parameter value corresponding to the frequency parameter from the parameter compensation value corresponding to the frequency parameter to obtain a target parameter value corresponding to the frequency parameter; For the search duration parameter, obtain the parameter compensation value corresponding to the search duration parameter based on the product of the current parameter value corresponding to the search duration parameter and the initial relative frequency deviation; subtract the current parameter value corresponding to the search duration parameter from the parameter compensation value corresponding to the search duration parameter to obtain the target parameter value corresponding to the search duration parameter.

5. The clock virtual compensation method according to claim 1, characterized in that: The obtaining of the frequency deviation result corresponding to the terminal device includes: When the terminal device searches for a network and enters a normal working state, the real-time absolute frequency deviation with other devices is calculated according to the data received from other devices; A frequency deviation result corresponding to the terminal device is obtained according to the real-time absolute frequency deviation.

6. The clock virtual compensation method according to claim 5, characterized in that: The specified working parameters corresponding to the terminal device when searching for a network and entering a normal working state include frequency parameters and timing adjustment parameters; and obtaining the frequency deviation result corresponding to the terminal device according to the real-time absolute frequency deviation includes: With respect to the frequency parameter, taking the real-time absolute frequency deviation as a frequency deviation result corresponding to the terminal device; With respect to the timing adjustment parameter, a real-time relative frequency deviation is calculated according to the real-time absolute frequency deviation and the current real-time frequency of the other device, and the real-time relative frequency deviation is used as the frequency deviation result corresponding to the terminal device.

7. The clock virtual compensation method according to claim 6, characterized in that: The obtaining, according to the frequency deviation result and the current parameter value corresponding to the specified working parameter of the terminal device, a target parameter value corresponding to the specified working parameter includes: For the frequency parameter, subtract the current parameter value corresponding to the frequency parameter from the real-time absolute frequency deviation to obtain the target parameter value corresponding to the frequency parameter; the current parameter value corresponding to the frequency parameter is the actual configuration value; For the timing adjustment parameter, the parameter compensation value corresponding to the timing adjustment parameter is obtained according to the product of the current parameter value corresponding to the timing adjustment parameter and the real-time relative frequency deviation; the current parameter value corresponding to the timing adjustment parameter is subtracted from the parameter compensation value corresponding to the timing adjustment parameter to obtain the target parameter value corresponding to the timing adjustment parameter; the current parameter value corresponding to the timing adjustment parameter is the difference between the timing moment after adjustment and the timing moment before adjustment.

8. A clock virtual compensation device, characterized in that: The device comprises: A frequency deviation acquisition module, used to acquire a frequency deviation result corresponding to a terminal device; the frequency deviation result represents a frequency deviation caused by a clock source of the terminal device; a parameter adjustment module, configured to obtain a target parameter value corresponding to the specified working parameter according to the frequency deviation result and a current parameter value corresponding to the specified working parameter of the terminal device; wherein the specified working parameter is an working parameter related to the clock source in the terminal device; The parameter configuration module is used to adjust the current parameter value corresponding to the specified working parameter to the target parameter value so that the terminal device works according to the target parameter value.

9. A terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the clock virtual compensation 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 when the computer program is executed by a processor, the steps of the clock virtual compensation method according to any one of claims 1 to 7 are implemented.