Clock chip frequency compensation method, device, electronic device and storage medium

By adaptively adjusting the detection period and frequency compensation method of the clock chip, the problem of large power loss of the clock chip under different precision requirements is solved, and the effects of adjustable precision and resource saving are achieved.

CN114553192BActive Publication Date: 2025-09-12GUANGDONG DAPU TELECOM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210291102.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2025-09-12
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing clock chips have large power loss in scenarios with different precision requirements, resulting in resource waste.

Method used

By obtaining historical and current temperature values, adaptively adjusting the detection period according to the accuracy level of the clock chip, and performing frequency compensation, a frequency compensation method with adjustable accuracy is implemented.

Benefits of technology

It reduces the power consumption of the clock chip, saves resources, and provides the flexibility to meet different precision requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114553192B_ABST
    Figure CN114553192B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for frequency compensation of a clock chip. The method comprises: obtaining historical temperature values ​​obtained by detecting a clock chip during a historical detection period; determining a current detection period based on the historical temperature values ​​and the accuracy level of the clock chip; obtaining a current temperature value obtained by detecting the clock chip during the current detection period; and frequency compensation of the clock chip based on the current temperature value. By using the above-mentioned scheme, the detection period of the clock chip can be adaptively adjusted according to the accuracy level of the clock chip, solving the problems of high power consumption and waste of resources caused by multiple level requirements of the clock chip in the same application scenario in the existing scheme. The scheme provided by the embodiment of the present invention can set the accuracy level of the clock chip according to customer needs, and has the beneficial effects of adjustable accuracy and resource saving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of chip design technology, and in particular to a clock chip frequency compensation method, device, electronic device, and storage medium. Background Art

[0002] Real-Time Clock (RTC) chips provide accurate real-time time and precise time references for electronic systems. They are widely used in daily life, such as water, electricity, and gas meters. Due to the characteristics of clock chips, temperature fluctuations during operation can cause the crystal oscillator frequency to fluctuate, resulting in inaccurate timekeeping. Therefore, frequency compensation is necessary for clock chips.

[0003] In the existing solution, the accuracy of the clock chip is defined at the factory, and there may be multiple accuracy requirements in an application scenario. For example, there may be a situation where the accuracy requirement is low during initial work and high in subsequent work. In this case, the highest level of clock chip accuracy requirement is generally set to meet multiple needs.

[0004] However, the above solution has the problem that a high-precision clock chip needs to be used to operate when a low-precision level is required, resulting in a large power loss and thus a waste of resources. Summary of the Invention

[0005] Embodiments of the present invention provide a clock chip frequency compensation method, device, electronic device, and storage medium to solve the problem of large power loss and resource waste in existing solutions when compensating clock chips.

[0006] According to one aspect of an embodiment of the present invention, a clock chip frequency compensation method is provided, comprising:

[0007] Acquire historical temperature values ​​obtained by detecting the clock chip during a historical detection period;

[0008] determining a current detection period according to the historical temperature value and the accuracy level of the clock chip;

[0009] Obtaining a current temperature value of the clock chip detected during the current detection period;

[0010] Frequency compensation is performed on the clock chip based on the current temperature value.

[0011] According to another aspect of the present invention, a clock chip frequency compensation device is provided, comprising:

[0012] A first acquisition module is used to obtain historical temperature values ​​obtained by detecting the clock chip during a historical detection period;

[0013] a determination module, configured to determine a current detection period according to the historical temperature value and the accuracy level of the clock chip;

[0014] A second acquisition module is used to obtain a current temperature value of the clock chip detected during the current detection period;

[0015] A compensation module is used to perform frequency compensation on the clock chip based on the current temperature value.

[0016] According to another aspect of the present invention, an electronic device is provided, comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the clock chip frequency compensation method described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the clock chip frequency compensation method described in any embodiment of the present invention when executed.

[0021] The clock chip frequency compensation scheme disclosed by the technology of the embodiment of the present invention first obtains the historical temperature value obtained by detecting the clock chip during the historical detection period; then determines the current detection period based on the historical temperature value and the accuracy level of the clock chip; then obtains the current temperature value obtained by detecting the clock chip during the current detection period; and finally, performs frequency compensation on the clock chip based on the current temperature value. By using the above scheme, the detection period of the clock chip can be adaptively adjusted according to the accuracy level of the clock chip, solving the problems of high power consumption and resource waste caused by multiple level requirements of the clock chip in the same application scenario in the existing scheme. The scheme provided by the embodiment of the present invention can set the accuracy level of the clock chip according to customer needs, with beneficial effects such as adjustable accuracy and resource saving.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is a flow chart of a clock chip frequency compensation method provided according to the first embodiment of the present invention;

[0025] Figure 2 This is a flow chart of a clock chip frequency compensation method provided according to the second embodiment of the present invention;

[0026] Figure 3 2 is a schematic structural diagram of a clock chip frequency compensation device provided according to a third embodiment of the present invention;

[0027] Figure 4 It is a structural diagram of an electronic device provided by the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. 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 units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] Figure 1A flowchart of a clock chip frequency compensation method is provided for embodiment 1 of the present invention. This embodiment is applicable to the situation where frequency compensation is performed on a clock chip. The method can be executed by a clock chip frequency compensation device. The clock chip frequency compensation device can be implemented in the form of hardware and / or software. The clock chip frequency compensation device can be configured in computer equipment such as servers.

[0032] The clock chip is a low-power real-time clock chip that needs to meet the requirements of high precision and low power consumption when in use. Since the 32K tuning fork crystal in the clock chip will be affected by temperature changes, its oscillation frequency will change with temperature, resulting in inaccurate timing of the clock chip. Therefore, it is necessary to detect the temperature changes of the clock chip. The frequency offset can be determined by the temperature changes, so as to compensate the frequency of the clock chip under different temperature conditions, so that the clock chip can continue to meet the high-precision requirements when working. In view of this, an embodiment of the present invention provides a clock chip frequency compensation scheme, which performs periodic detection on the temperature value of the clock chip to perform frequency compensation on the clock chip under different detection cycles, so that the clock chip meets the requirements of high precision and low power consumption.

[0033] Please refer to Figure 1 , the clock chip frequency compensation method provided by the embodiment of the present invention includes:

[0034] S110 , obtaining historical temperature values ​​obtained by detecting a clock chip during a historical detection period.

[0035] The historical detection cycle means that when the clock chip is working, a corresponding historical temperature value can be obtained after each detection cycle. The current historical detection cycle consists of two or more consecutive detection cycles. A detection cycle can be understood as a time period, that is, after accumulating at least two consecutive time periods of corresponding historical temperature values, it is convenient to execute subsequent steps. The advantage of doing this is to ensure the accuracy of the frequency compensation of the clock chip in subsequent steps.

[0036] Among them, in the historical detection cycle, the time period corresponding to each detection cycle is not necessarily the same. The next detection cycle needs to be determined in combination with the accuracy level of the clock chip in the subsequent steps. The advantage of this is that the clock chip can adaptively adjust the temperature detection cycle to make the timing accuracy of the clock chip more accurate.

[0037] In an optional manner, the above historical temperature values ​​are obtained by: acquiring analog temperature values ​​obtained by detecting a clock chip during a historical detection period; performing analog-to-digital conversion on the analog temperature values ​​to obtain historical temperature values.

[0038] The above-mentioned analog temperature value can be obtained by a temperature detection module integrated in the clock chip, and the temperature detection module can be implemented by a temperature sensor. Since the temperature obtained by the temperature sensor is an analog temperature value, an analog-to-digital conversion module can be integrated in the clock chip to convert the analog temperature value into a digital temperature value, thereby obtaining the historical temperature value corresponding to each historical detection cycle. In particular, the analog-to-digital converter (ADC) can be implemented.

[0039] S120: Determine a current detection cycle according to historical temperature values ​​and the accuracy level of the clock chip.

[0040] The accuracy level of a clock chip indicates the allowable deviation between the actual measured value and the standard value. The current actual value and standard value refer to the actual output frequency and the standard output frequency of the clock chip at the same temperature, that is, the nominal frequency change, in parts per million (PPM).

[0041] Generally, the accuracy requirements for clock chips vary depending on their intended use. For example, the accuracy level can be set to ±2 PPM within the 0°C to +40°C range, ±3.5 PPM within the -40°C to +0°C range, and so on. The accuracy level of a clock chip can be set at the factory or adjusted based on customer needs. The current adjustment method is customizable by the customer through software. The specific method for setting the accuracy level and the accuracy level range for a clock chip are not limited here and are subject to actual needs.

[0042] Optionally, when determining the current detection cycle based on the historical temperature value and the accuracy level of the clock chip, it is also necessary to determine the frequency compensation error corresponding to the historical temperature value. The frequency compensation error can be compared with the accuracy level of the clock chip to determine the current detection cycle.

[0043] The frequency compensation error can be obtained based on historical temperature values ​​corresponding to at least two consecutive detection cycles in the historical detection cycle. The purpose of determining the frequency compensation error is to determine the frequency compensation error during the previous detection cycle using at least two historical temperature values, thereby determining the current detection cycle based on the current frequency compensation error and the accuracy level of the clock chip, thereby ensuring the accuracy of frequency compensation during the current temperature value obtained during the current detection cycle.

[0044] S130 , obtaining a current temperature value obtained by detecting the clock chip during the current detection period.

[0045] After the current detection cycle, the current temperature value corresponding to the current detection cycle can be directly obtained. The method for obtaining the current temperature value is the same as the method for obtaining the historical temperature value, which will not be repeated here.

[0046] S140 , performing frequency compensation on the clock chip based on the current temperature value.

[0047] After determining the current detection cycle based on the historical temperature values ​​and the accuracy level of the clock chip, in the process of obtaining the current temperature value according to the current detection cycle, the frequency compensation method of the clock chip can be, after obtaining the actual output frequency corresponding to the current temperature value, further obtaining the standard output frequency corresponding to the current temperature value, and comparing the actual output frequency with the standard output frequency, so as to perform frequency compensation on the clock chip based on the standard output frequency.

[0048] The clock chip frequency compensation method provided by an embodiment of the present invention first obtains the historical temperature value obtained by detecting the clock chip during the historical detection period; then determines the current detection period based on the historical temperature value and the accuracy level of the clock chip; then obtains the current temperature value obtained by detecting the clock chip during the current detection period; and finally, performs frequency compensation on the clock chip based on the current temperature value. By using the above scheme, the detection period of the clock chip can be adaptively adjusted according to the accuracy level of the clock chip, solving the problems of high power consumption and resource waste caused by multiple level requirements of the clock chip in the same application scenario in the existing scheme. The scheme provided by the embodiment of the present invention can set the accuracy level of the clock chip according to customer needs, and has beneficial effects such as adjustable accuracy and resource saving.

[0049] Example 2

[0050] Figure 2 This is a flow chart of a clock chip frequency compensation method provided by the second embodiment of the present invention. The relationship between this embodiment and the above embodiment is the refinement of the features of the corresponding steps. Figure 2 As shown, the method includes:

[0051] S210 , obtaining historical temperature values ​​obtained by detecting a clock chip during a historical detection period.

[0052] S220: Determine a frequency compensation error according to historical temperature values.

[0053] In the measurement circuit of the clock chip, real-time frequency compensation is generally not performed on the clock chip. For example, the temperature of the clock chip is not measured every 1 second to perform frequency compensation based on the current temperature. This method is labor-intensive and the frequency error is generally within the allowable range in a short period of time. Therefore, the temperature of the clock chip is usually detected at regular intervals, and the frequency compensation error during the detection cycle is determined. The accuracy of subsequent temperature and frequency measurements is then determined based on the current frequency error to ensure the accuracy of the clock chip.

[0054] An alternative method to determine the frequency compensation error based on historical temperature values ​​can be expressed by the following expression:

[0055] σ=a*|(T1-t) 2 -(T2-t) 2 | (1)

[0056] Wherein, σ represents the frequency compensation error, α represents the first preset parameter, t represents the second preset parameter, the historical detection period includes the first detection period and the second detection period, the second detection period is the detection period before the first detection period, the first detection period is the detection period before the current detection period, T1 represents the historical temperature value detected in the second detection period, and T2 represents the historical temperature value detected in the first detection period.

[0057] The first preset parameter a represents the opening coefficient of the clock crystal, and the second preset parameter t represents the time corresponding to the peak frequency in the temperature-frequency relationship information. The temperature-frequency relationship information is pre-stored in the clock chip and includes standard output frequencies corresponding to various temperature values. The first preset parameter a and the second preset parameter t are constants, and their specific values ​​are not limited here.

[0058] S230: Obtain an adjustment step size of a frequency compensation error.

[0059] The adjustment step is generally set according to user needs, and can be set to 1 second for example. The purpose of obtaining the adjustment step of the frequency compensation error is to adjust the historical detection cycle according to the adjustment step, which helps to more accurately determine the current detection cycle in subsequent steps.

[0060] S240: Determine a current detection cycle according to the frequency compensation error, the adjustment step size, and the accuracy level.

[0061] Optionally, determining a current detection period according to a frequency compensation error, an adjustment step, and an accuracy level includes:

[0062] Determine whether the frequency compensation error exceeds the accuracy level; if it does not exceed the accuracy level, the current detection period is equal to the first detection period plus the adjustment step; if it exceeds the accuracy level, the current detection period is equal to the first detection period minus the adjustment step.

[0063] Assume the accuracy level to be Δ, and determine the size of σ and Δ obtained according to formula (1). If the frequency compensation error does not exceed the accuracy level, it indicates that the compensation accuracy of the frequency compensation error in the historical detection cycle is sufficiently accurate. The detection time of the detection cycle can be appropriately extended, and the current detection cycle is equal to the first detection cycle plus the adjustment step size. Assume that the current detection cycle is ω2 and the first detection cycle is ω1. The current detection cycle can be expressed as: ω2 = ω1 + Δ. If the frequency compensation error exceeds the accuracy level, it indicates that the compensation accuracy of the frequency compensation error in the historical detection cycle does not meet the requirements corresponding to the accuracy level. The detection time of the detection cycle can be adaptively shortened. The current detection cycle can be expressed as: ω2 = ω1 - Δ.

[0064] S250: Obtain the current temperature value obtained by detecting the clock chip during the current detection period.

[0065] S260: Obtain the actual output frequency corresponding to the current temperature value.

[0066] When frequency compensation is performed on a clock chip according to the current temperature value, it is first necessary to obtain the actual output frequency corresponding to the current temperature value. The current actual output frequency can be directly obtained by monitoring the oscillation of the clock crystal.

[0067] S270: Obtain a standard output frequency corresponding to the current temperature value from the temperature-frequency relationship information.

[0068] The temperature-frequency relationship information includes the standard output frequency corresponding to each temperature value. The temperature-frequency relationship information can be pre-stored in the clock chip, so when the current temperature value is obtained, the standard output frequency corresponding to the current temperature value can also be directly obtained.

[0069] The temperature-frequency relationship information can be stored in the clock chip in the form of a curve, where the standard output frequency corresponding to each temperature value is described as a curve, forming a temperature-frequency characteristic curve. Alternatively, the information can be stored in the form of an array, where each temperature value and its corresponding standard output frequency form an array, forming a temperature-frequency relationship table. The specific storage format of the temperature-frequency relationship information in the clock chip is not limited herein.

[0070] S280: Perform frequency compensation on the clock chip according to the actual output frequency and the standard output frequency.

[0071] According to the actual output frequency corresponding to the current temperature value and the standard output frequency, the compensation range of frequency compensation is determined, so that the output frequency of the current temperature value approaches the standard output frequency to ensure the accuracy of the clock chip during operation.

[0072] Accordingly, when executing step S210, in the historical monitoring cycle, each time a corresponding historical temperature value is obtained after a monitoring cycle, the clock chip will be frequency compensated according to the actual output frequency and the standard output frequency corresponding to the historical temperature value to ensure the accuracy of the output frequency corresponding to the temperature value obtained after each monitoring cycle.

[0073] Optionally, frequency compensation is performed on the clock chip according to the actual output frequency and the standard output frequency, including: determining a frequency error according to the actual output frequency and the standard output frequency; and when the frequency error exceeds a preset error value, frequency compensation is performed on the clock chip based on the frequency error.

[0074] The current frequency error can be set according to different user requirements, such as 1%, 3% or 5%, etc. The specific value of the frequency error is not limited here.

[0075] If the difference between the actual output frequency and the standard output frequency exceeds the frequency error value, the clock chip is compensated based on the frequency error. Frequency compensation can be performed based on the minimum, maximum, or intermediate value within the frequency error range. To ensure the accuracy of the temperature detection frequency during subsequent detection cycles based on the current temperature value, the actual output frequency is compensated to the standard output frequency. Accordingly, if the frequency error does not exceed the preset error value, the clock chip is not compensated. In other words, the actual output frequency corresponding to the current temperature value is the standard output frequency.

[0076] What you need to know is that when the clock chip is working, there is no need to constantly perform periodic compensation on the frequency of the clock chip by determining a new detection cycle. As the temperature of the clock chip gradually stabilizes with the working conditions, the corresponding frequency compensation error also tends to stabilize. When determining subsequent detection cycles based on the frequency compensation error, adjustment step, and accuracy level, the detection cycles also gradually tend to be the same, thereby ensuring smooth operation of the clock chip.

[0077] The technical solution provided by the embodiment of the present invention can be briefly described as the following process: setting the accuracy level of the clock chip, and assuming that the historical detection cycle includes a first detection cycle and a second detection cycle. When the clock chip starts working, the initial temperature value of the clock chip is obtained, and after analog-to-digital conversion, the first historical temperature value t1 is obtained; the frequency error is calculated based on the actual output frequency of t1, and the frequency compensation for the temperature of t1 is started; after the first detection cycle ω1, the second historical temperature value t2 can be obtained, and the frequency compensation for the temperature of t2 is started (the compensation method is the same as t1), wherein the current first detection cycle can be set according to the experience of the technician or set to a default cycle; the frequency compensation error is calculated based on the measured t1 and t2. It should be noted that at time points t1 and t2, the standard frequency has been compensated, so the current frequency compensation error is the frequency compensation error during the time period from t1 to t2. The second detection cycle ω2 is re-determined based on the relationship between the frequency compensation error and the accuracy level, ω2 = ω1-Δ, or ω2 = ω1+Δ. After the second detection cycle ω2, the third historical temperature value t3 is obtained, and the current frequency compensation error is calculated using the second historical temperature value t2 and the third historical temperature value t3. The current detection cycle is further re-determined based on the relationship between the current frequency compensation error and the accuracy level. After the current detection cycle, the current temperature value can be obtained. The process of determining the frequency compensation error based on the current temperature value and the previous temperature value and then determining the next detection cycle is repeated. After determining the next detection cycle, the frequency difference compensation is performed on the clock chip based on the next temperature value.

[0078] The clock chip frequency compensation solution provided in the embodiment of the present invention is that the same clock chip can cope with scenarios with various different accuracy level requirements. The detection cycle can be shortened when high accuracy is required, and the detection cycle can be extended when low accuracy is required. The accuracy level can be set according to customer needs. Compared with the existing compensation method based on fixed accuracy and fixed period, the power consumption of the compensation circuit can be reduced by more than 70%, and the implementation method is relatively simple.

[0079] Example 3

[0080] Figure 3 This is a schematic diagram of the structure of a clock chip frequency compensation device provided by the third embodiment of the present invention. Figure 3 As shown, the device includes: a first acquisition module 31, a determination module 32, a second acquisition module 33 and a compensation module 34, wherein:

[0081] A first acquisition module 31 is configured to acquire historical temperature values ​​obtained by detecting the clock chip during a historical detection period;

[0082] a determination module 32, configured to determine a current detection period based on the historical temperature value and the accuracy level of the clock chip;

[0083] A second acquisition module 33 is configured to acquire a current temperature value of the clock chip detected during the current detection period;

[0084] The compensation module 34 is configured to perform frequency compensation on the clock chip based on the current temperature value.

[0085] The clock chip frequency compensation device provided by the embodiment of the present invention first obtains the historical temperature value obtained by detecting the clock chip during the historical detection period; then determines the current detection period based on the historical temperature value and the accuracy level of the clock chip; then obtains the current temperature value obtained by detecting the clock chip during the current detection period; and finally, performs frequency compensation on the clock chip based on the current temperature value. By using the above scheme, the detection period of the clock chip can be adaptively adjusted according to the accuracy level of the clock chip, solving the problems of high power consumption and resource waste caused by the existence of multiple level requirements for the clock chip in the same application scenario in the existing scheme. The scheme provided by the embodiment of the present invention can set the accuracy level of the clock chip according to customer needs, and has beneficial effects such as adjustable accuracy and resource saving.

[0086] Optionally, the determination module 32 includes: a first determination unit, a first acquisition unit, and a second determination unit, wherein:

[0087] a first determining unit, configured to determine a frequency compensation error according to the historical temperature value;

[0088] A first acquiring unit, configured to acquire an adjustment step size of the frequency compensation error;

[0089] A second determining unit is configured to determine the current detection period according to the frequency compensation error, the adjustment step size, and the accuracy level.

[0090] Optionally, determining the frequency compensation error according to the historical temperature value includes:

[0091] σ=a*|(T1-t) 2 -(T2-t) 2 |

[0092] Among them, σ represents the frequency compensation error, α represents a first preset parameter, t represents a second preset parameter, the historical detection period includes a first detection period and a second detection period, the second detection period is the previous detection period of the first detection period, the first detection period is the previous detection period of the current detection period, T1 represents the historical temperature value detected in the second detection period, and T2 represents the historical temperature value detected in the first detection period.

[0093] Optionally, the second determination unit is specifically used to determine whether the frequency compensation error exceeds the accuracy level; if it does not exceed the accuracy level, the current detection period is equal to the first detection period plus the adjustment step; if it exceeds the accuracy level, the current detection period is equal to the first detection period minus the adjustment step.

[0094] Optionally, the compensation module 34 includes: a second acquisition unit, a third acquisition unit and a compensation unit, wherein:

[0095] A second acquiring unit, configured to acquire an actual output frequency corresponding to the current temperature value;

[0096] a third acquiring unit, configured to acquire a standard output frequency corresponding to the current temperature value from temperature-frequency relationship information, wherein the temperature-frequency relationship information includes standard output frequencies corresponding to various temperature values;

[0097] A compensation unit is used to perform frequency compensation on the clock chip according to the actual output frequency and the standard output frequency.

[0098] Optionally, the compensation unit is specifically used to determine the frequency error based on the actual output frequency and the standard output frequency; when the frequency error exceeds a preset error value, the clock chip is frequency compensated based on the frequency error; when the frequency error does not exceed the preset error value, the clock chip is not frequency compensated.

[0099] Optionally, the historical temperature value is obtained by: acquiring an analog temperature value obtained by detecting the clock chip during the historical detection period; and performing analog-to-digital conversion on the analog temperature value to obtain the historical temperature value.

[0100] The clock chip frequency compensation device provided in the embodiment of the present invention can execute the clock chip frequency compensation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0101] Example 4

[0102] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0103] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0104] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0105] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for clock chip frequency compensation.

[0106] In some embodiments, the method for clock chip frequency compensation can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for clock chip frequency compensation described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the method for clock chip frequency compensation in any other suitable manner (e.g., by means of firmware).

[0107] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0109] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0111] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0112] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0113] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0114] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A clock chip frequency compensation method, characterized in that: include: Acquire historical temperature values ​​obtained by detecting the clock chip during a historical detection period; determining a current detection period according to the historical temperature value and the accuracy level of the clock chip; Obtaining a current temperature value of the clock chip detected during the current detection period; Performing frequency compensation on the clock chip based on the current temperature value; The determining of the current detection period according to the historical temperature value and the accuracy level of the clock chip includes: determining a frequency compensation error based on the historical temperature value; Obtaining an adjustment step size of the frequency compensation error; determining the current detection period according to the frequency compensation error, the adjustment step size, and the accuracy level; The determining of the current detection period according to the frequency compensation error, the adjustment step, and the accuracy level includes: determining whether the frequency compensation error exceeds the accuracy level; If the accuracy level is not exceeded, the current detection period is equal to the first detection period plus the adjustment step size; If the accuracy level is exceeded, the current detection period is equal to the first detection period minus the adjustment step, and the first detection period is the previous detection period of the current detection period.

2. The method according to claim 1, characterized in that The determining of the frequency compensation error according to the historical temperature value includes: σ=a*|(T1-t) 2 -(T2-t) 2 | Wherein, σ represents the frequency compensation error, α represents a first preset parameter, t represents a second preset parameter, the historical detection period includes a first detection period and a second detection period, the second detection period is the previous detection period of the first detection period, T1 represents the historical temperature value detected in the second detection period, and T2 represents the historical temperature value detected in the first detection period.

3. The method according to claim 1, characterized in that Performing frequency compensation on the clock chip based on the current temperature value includes: Obtaining the actual output frequency corresponding to the current temperature value; Obtaining a standard output frequency corresponding to the current temperature value from temperature-frequency relationship information, wherein the temperature-frequency relationship information includes standard output frequencies corresponding to various temperature values; Frequency compensation is performed on the clock chip according to the actual output frequency and the standard output frequency.

4. The method according to claim 3, characterized in that Performing frequency compensation on the clock chip according to the actual output frequency and the standard output frequency includes: determining a frequency error according to the actual output frequency and the standard output frequency; When the frequency error exceeds a preset error value, performing frequency compensation on the clock chip based on the frequency error; The method further comprises: When the frequency error does not exceed the preset error value, frequency compensation is not performed on the clock chip.

5. The method according to claim 1, wherein The historical temperature values ​​are obtained in the following manner: Obtaining a simulated temperature value obtained by detecting the clock chip during the historical detection period; Perform analog-to-digital conversion on the simulated temperature value to obtain the historical temperature value.

6. A clock chip frequency compensation device, characterized in that: include: A first acquisition module is used to obtain historical temperature values ​​obtained by detecting the clock chip during a historical detection period; a determination module, configured to determine a current detection period according to the historical temperature value and the accuracy level of the clock chip; A second acquisition module is used to obtain a current temperature value of the clock chip detected during the current detection period; a compensation module, configured to perform frequency compensation on the clock chip based on the current temperature value; The determination module includes: a first determination unit, a first acquisition unit, and a second determination unit, wherein: a first determining unit, configured to determine a frequency compensation error according to the historical temperature value; A first acquiring unit, configured to acquire an adjustment step size of the frequency compensation error; a second determining unit, configured to determine the current detection period according to the frequency compensation error, the adjustment step size, and the accuracy level; Among them, the second determination unit is specifically used to determine whether the frequency compensation error exceeds the accuracy level; if it does not exceed the accuracy level, the current detection period is equal to the first detection period plus the adjustment step; if it exceeds the accuracy level, the current detection period is equal to the first detection period minus the adjustment step, wherein the first detection period is the previous detection period of the current detection period.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the clock chip frequency compensation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the clock chip frequency compensation method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Wearable device sampling precision calibration scheme

    CN111880641A

  • Real-time clock compensation method and device, terminal equipment and medium

    CN114201001A