Method for obtaining calibration data, method for storing calibration data, device and equipment

By storing multiple calibration data in the unit storage space and reading the target calibration data using the initial offset value and number of bits, the problem of wasting storage resources in the prior art and adapting to different number of bits is solved, and efficient calibration data acquisition and storage is achieved.

CN115766490BActive Publication Date: 2025-06-17BEIJING ESWIN COMPUTING TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211270904.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2025-06-17
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

In the prior art, when storing and acquiring calibration data of WiFi chips, there is a problem of wasting storage resources and adapting to different bit counts.

Method used

Analytical processing is performed to obtain calibration data by storing multiple calibration data in a unit storage space and reading each bit of the target calibration data using the initial offset value and the number of bits.

Benefits of technology

The storage resource utilization rate of unit storage space is improved, and is suitable for the number of bits of different calibration data, achieving efficient calibration data acquisition and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766490B_ABST
    Figure CN115766490B_ABST
Patent Text Reader

Abstract

The present application discloses a method for obtaining calibration data, a method for storing calibration data, a device and equipment, belonging to the field of communication technologies. In this method, multiple calibration data of a WiFi chip to be calibrated are stored in a unit storage space. When obtaining target calibration data for calibrating the working parameters of the WiFi chip, an initial offset value and the number of bits corresponding to the target calibration data are obtained according to the working parameters, so as to read each bit included in the target calibration data from the unit storage space, and then the target calibration data is obtained by performing parsing processing on each bit. Since the number of bits included in the target calibration data can be any value less than the number of bits corresponding to the unit storage space, the present application is applicable to different situations of the number of bits included in the calibration data. Moreover, since the unit storage space can store multiple calibration data, the storage resource utilization rate of the unit storage space is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and particularly to a method for obtaining calibration data, a method for storing calibration data, a device, and an apparatus. Background Art

[0002] After manufacturing a WiFi (Wireless Fidelity) chip, it is necessary to obtain stored calibration data and calibrate various working parameters of the WiFi chip according to the calibration data, so that the values of the calibrated various working parameters meet the working requirements of the WiFi chip. Summary of the Invention

[0003] This application provides a method for obtaining calibration data, a method for storing calibration data, a device, and an apparatus, which are used to store multiple calibration data of a WiFi chip in a unit storage space and obtain the calibration data stored in the unit storage space. The technical solutions are as follows:

[0004] On the one hand, this application provides a method for obtaining calibration data, and the method includes:

[0005] Obtain the working parameters of the WiFi chip to be calibrated;

[0006] Based on the working parameters of the WiFi chip, obtain the initial offset value and the number of bits corresponding to the target calibration data. The initial offset value is used to indicate the starting address of the target calibration data in the unit storage space. The target calibration data is used to calibrate the working parameters, and multiple calibration data are stored in the unit storage space;

[0007] Based on the initial offset value and the number of bits, read each bit included in the target calibration data from the unit storage space;

[0008] Perform parsing processing on each bit to obtain the target calibration data.

[0009] In a possible implementation manner, the number of bits is less than the standard parsing number, and the standard parsing number is the number of bits required for performing data parsing; performing parsing processing on each bit to obtain the target calibration data includes: writing each bit included in the target calibration data and the first number of first padding bits into the first spare storage space. The number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing number, and the first number is not less than the difference between the standard parsing number and the number of bits of the target calibration data; taking the standard parsing number as a unit, perform data parsing on the bits included in the first spare storage space to obtain the target calibration data.

[0010] In a possible implementation, writing each bit included in the target calibration data and the first number of first padding bits into the first spare storage space includes: writing the i-th bit included in the target calibration data into the i-th bit position of the first spare storage space, and writing the first number of first padding bits into the remaining bit positions of the first spare storage space; where i is used to represent the serial number, 1 ≤ i ≤ N or 0 ≤ i ≤ N - 1, and N is used to represent the number of bits included in the target calibration data.

[0011] In a possible implementation, based on the working parameters of the WiFi chip, obtaining the initial offset value and the number of bits corresponding to the target calibration data includes: based on the working parameters of the WiFi chip, querying the correspondence between the working parameters and the offset value and the number of bits, and obtaining the initial offset value and the number of bits corresponding to the target calibration data.

[0012] Before obtaining the working parameters of the WiFi chip to be calibrated, it further includes: obtaining a calibration instruction, where the calibration instruction includes the identification information of the WiFi chip to be calibrated; determining the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the calibration instruction.

[0013] On the other hand, the present application provides a method for storing calibration data, and the method includes:

[0014] Obtaining multiple calibration data of the WiFi chip to be calibrated, where one calibration data is used to calibrate one working parameter of the WiFi chip;

[0015] Writing the multiple calibration data into the unit storage space, where the starting address of the target calibration data among the multiple calibration data in the unit storage space is indicated by the initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data are used to read each bit included in the target calibration data from the unit storage space.

[0016] In a possible implementation, writing the multiple calibration data into the unit storage space includes: based on the sum of the number of bits included in the multiple calibration data being less than the number of bits corresponding to the second spare storage space, and the number of bits corresponding to the second spare storage space being less than or equal to the number of bits corresponding to the unit storage space, sequentially writing each bit included in the multiple calibration data and the second number of second padding bits into the second spare storage space, where the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the multiple calibration data; writing the bits included in the second spare storage space into the unit storage space.

[0017] In a possible implementation, writing each bit included in a plurality of calibration data and a second quantity of second padding bits into a second spare storage space in sequence includes: writing the j-th bit among each bit included in the plurality of calibration data into the j-th bit position of the second spare storage space, and writing the second quantity of second padding bits into the remaining bit positions of the second spare storage space; where j is used to represent a serial number, 1 ≤ j ≤ M or 0 ≤ j ≤ M - 1, and M is used to represent the number of bits included in the plurality of calibration data.

[0018] In a possible implementation, after writing the plurality of calibration data into a unit storage space, it further includes: for any one of the plurality of calibration data, obtaining an offset value corresponding to the any one of the calibration data according to the starting address of the any one of the calibration data in the unit storage space; generating a correspondence relationship between the working parameter, the offset value, and the number of bits based on the working parameters, offset values, and number of bits corresponding to the respective calibration data.

[0019] In a possible implementation, before obtaining a plurality of calibration data of a WiFi chip to be calibrated, it further includes: obtaining a storage instruction, where the storage instruction includes identification information of the WiFi chip to be calibrated; determining the WiFi chip to be calibrated from a plurality of candidate WiFi chips according to the identification information included in the storage instruction.

[0020] On the other hand, a calibration data acquisition device is provided, and the device includes:

[0021] A first acquisition module, configured to acquire the working parameter of a WiFi chip to be calibrated;

[0022] The first acquisition module is further configured to, based on the working parameter of the WiFi chip, acquire an initial offset value and the number of bits corresponding to the target calibration data, where the initial offset value is used to indicate the starting address of the target calibration data in the unit storage space, the target calibration data is used to calibrate the working parameter, and the unit storage space stores a plurality of calibration data;

[0023] A second acquisition module, configured to read each bit included in the target calibration data from the unit storage space based on the initial offset value and the number of bits;

[0024] The second acquisition module is further configured to perform parsing processing on each bit to obtain the target calibration data.

[0025] In a possible implementation, the number of bits is less than the standard parsing number, where the standard parsing number is the number of bits required for performing data parsing; a second obtaining module, configured to write each bit included in the target calibration data and the first number of first padding bits into a first spare storage space, where the number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing number, and the first number is not less than the difference between the standard parsing number and the number of bits of the target calibration data; perform data parsing on the bits included in the first spare storage space in units of the standard parsing number to obtain the target calibration data.

[0026] In a possible implementation, the second obtaining module is configured to write the i-th bit included in the target calibration data into the i-th bit position of the first spare storage space, and write the first number of first padding bits into the remaining bit positions of the first spare storage space; where i is used to represent a serial number, 1 ≤ i ≤ N or 0 ≤ i ≤ N - 1, and N is used to represent the number of bits included in the target calibration data.

[0027] In a possible implementation, the first obtaining module is configured to query the correspondence between the working parameters, the offset value, and the number of bits based on the working parameters of the WiFi chip to obtain the initial offset value and the number of bits corresponding to the target calibration data.

[0028] In a possible implementation, the first obtaining module is further configured to obtain a calibration instruction, where the calibration instruction includes the identification information of the WiFi chip to be calibrated; determine the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the calibration instruction.

[0029] On the other hand, a storage device for calibration data is provided, and the device includes:

[0030] An obtaining module, configured to obtain multiple calibration data of the WiFi chip to be calibrated, where one calibration data is used to calibrate one working parameter of the WiFi chip;

[0031] A writing module, configured to write the multiple calibration data into a unit storage space, where the starting address of the target calibration data among the multiple calibration data in the unit storage space is indicated by the initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data are used to read each bit included in the target calibration data from the unit storage space.

[0032] In a possible implementation, a writing module is configured to sequentially write each bit included in a plurality of calibration data and a second number of second padding bits into a second spare storage space based on that the sum of the number of bits included in the plurality of calibration data is less than the number of bits corresponding to the second spare storage space, and the number of bits corresponding to the second spare storage space is less than or equal to the number of bits corresponding to a unit storage space, where the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the plurality of calibration data; and write the bits included in the second spare storage space into the unit storage space.

[0033] In a possible implementation, a writing module is configured to write the j-th bit among each bit included in a plurality of calibration data into the j-th bit position of the second spare storage space, and write a second number of second padding bits into the remaining bit positions of the second spare storage space; where j is used to represent a serial number, 1 ≤ j ≤ M or 0 ≤ j ≤ M - 1, and M is used to represent the number of bits included in the plurality of calibration data.

[0034] In a possible implementation, an obtaining module is further configured to, for any one of a plurality of calibration data, obtain an offset value corresponding to the any one of the calibration data according to the starting address of the any one of the calibration data in the unit storage space; and generate a correspondence relationship among the working parameters, the offset value, and the number of bits based on the working parameters, the offset value, and the number of bits corresponding to each calibration data.

[0035] In a possible implementation, an obtaining module is further configured to obtain a storage instruction, where the storage instruction includes identification information of a WiFi chip to be calibrated; and determine the WiFi chip to be calibrated from a plurality of candidate WiFi chips according to the identification information included in the storage instruction.

[0036] On the other hand, a computer device is provided, which includes a processor and a memory. At least one computer program is stored in the memory and is loaded and executed by the processor so that the computer device implements the method for obtaining calibration data or the method for storing calibration data as described in any one of the above.

[0037] On the other hand, a computer-readable storage medium is further provided. At least one computer program is stored in the computer-readable storage medium and is loaded and executed by the processor so that the computer implements the method for obtaining calibration data or the method for storing calibration data as described in any one of the above.

[0038] On the other hand, a computer program product or a computer program is also provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the above-mentioned calibration data acquisition methods or any one of the above-mentioned calibration data storage methods.

[0039] The technical solution provided by this application at least brings the following beneficial effects:

[0040] In this application, multiple calibration data of a WiFi chip to be calibrated are stored in a unit storage space. Thus, when it is necessary to use the target calibration data to calibrate the working parameters of the WiFi chip, by reading each bit included in the target calibration data from the unit storage space and then performing parsing processing on each bit, the target calibration data can be obtained. Since the number of bits included in the target calibration data can be any value less than the number of bits corresponding to the unit storage space, the solution of this application is applicable to different situations of the number of bits included in the calibration data. Moreover, since the unit storage space can store multiple calibration data, the storage resource utilization rate of the unit storage space is relatively high. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of this application;

[0043] Figure 2 is a flowchart of a calibration data storage method provided by an embodiment of this application;

[0044] Figure 3 is a flowchart of a calibration data acquisition method provided by an embodiment of this application;

[0045] Figure 4 is a schematic structural diagram of a calibration data acquisition device provided by an embodiment of this application;

[0046] Figure 5 is a schematic structural diagram of a calibration data storage device provided by an embodiment of this application;

[0047] Figure 6 is a schematic structural diagram of a server provided by an embodiment of this application;

[0048] Figure 7 It is a schematic structural diagram of a terminal provided by an embodiment of the present application. Specific implementation manners

[0049] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe in detail the embodiments of the present application with reference to the accompanying drawings.

[0050] After manufacturing a WiFi chip, a test device for testing the WiFi chip needs to obtain stored calibration data, and then use the calibration data to calibrate the working parameters of the WiFi chip so that the values of the calibrated working parameters meet the working requirements of the WiFi chip. Among them, the test device can obtain the stored calibration data by running test software. If the test software is developed in the C language, since among multiple standard data types in the C language, the standard data type with the least number of bits is the character (char) type corresponding to 8 bits (bit), therefore, for the data that the test software can process, the number of bits it includes needs to be greater than or equal to 8 bits.

[0051] In the related art, to meet the requirement that the number of bits is greater than or equal to 8 bits, each calibration data is respectively stored in an 8-bit byte, and each calibration data is obtained by parsing each 8-bit byte. In the case where the number of bits included in the calibration data is less than 8 bits, this way of storing calibration data will cause waste of storage resources.

[0052] An embodiment of the present application proposes a method for obtaining calibration data and a method for storing calibration data, which are used to obtain a target calibration data among multiple calibration data stored in a unit storage space, and improve the utilization rate of storage resources in the unit storage space. Figure 1 It shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a terminal 11 and a server 12.

[0053] The method for obtaining calibration data provided by an embodiment of the present application can be executed by the terminal 11, or can be executed by the server 12, or can be jointly executed by the terminal 11 and the server 12. The embodiment of the present application does not limit this. That is, both the terminal 11 and the server 12 can be used as test devices for testing the WiFi chip. Exemplarily, for the case where the method for obtaining calibration data provided by an embodiment of the present application is jointly executed by the terminal 11 and the server 12, the server 12 undertakes the main computing work, and the terminal 11 undertakes the secondary computing work; or, the server 12 undertakes the secondary computing work, and the terminal 11 undertakes the main computing work; or, a distributed computing architecture is adopted between the server 12 and the terminal 11 for collaborative computing.

[0054] The calibration data storage method provided by the embodiments of this application can be executed by the terminal 11, or by the server 12, or jointly by the terminal 11 and the server 12. The embodiments of this application do not limit this. For the case where the calibration data storage method provided by the embodiments of this application is jointly executed by the terminal 11 and the server 12, the server 12 undertakes the main computing work and the terminal 11 undertakes the secondary computing work; or, the server 12 undertakes the secondary computing work and the terminal 11 undertakes the main computing work; or, a distributed computing architecture is adopted between the server 12 and the terminal 11 for collaborative computing.

[0055] It should be noted that the execution device of the calibration data acquisition method and the execution device of the calibration data storage method can be the same or different. The embodiments of this application do not limit this.

[0056] In a possible implementation, the terminal 11 can be any electronic product that can perform human-computer interaction with the user in one or more ways such as a keyboard, a touchpad, a touch screen, a remote control, voice interaction, or a handwriting device. For example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (Pocket PC), a tablet computer, a smart car machine, a smart TV, a smart speaker, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc. The server 12 can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. The terminal 11 and the server 12 establish a communication connection through a wired or wireless network.

[0057] Those skilled in the art should understand that the above-mentioned terminal 11 and server 12 are only examples. Other existing or future terminal or server that can be applied to this application should also be included within the protection scope of this application and are hereby incorporated by reference.

[0058] The calibration data storage method provided by the embodiments of this application can be as Figure 2 shown. This method can be executed by a test device for testing a WiFi chip. Combining with the Figure 1 illustrated implementation scenario, this test device can be the terminal 11 or the server 12. As Figure 2 shown, this method includes but is not limited to step 201 and step 202.

[0059] In step 201, multiple calibration data of the WiFi chip to be calibrated are obtained, and one calibration data is used to calibrate one working parameter of the WiFi chip.

[0060] Exemplarily, before obtaining multiple calibration data of the WiFi chip to be calibrated, the method further includes: obtaining a storage instruction, where the storage instruction includes identification information of the WiFi chip to be calibrated; determining the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the storage instruction. The method provided by the embodiments of the present application can be applicable to scenarios where there are multiple candidate WiFi chips. The test device can determine the chip to be calibrated from multiple candidate WiFi chips based on the identification information in the obtained storage instruction, and then execute the process of obtaining multiple calibration data of the WiFi chip to be calibrated and subsequent writing of the multiple calibration data into the unit storage space. The embodiments of the present application do not limit the manner of obtaining the storage instruction. The test device can generate the storage instruction or receive the storage instruction sent by other devices.

[0061] Regardless of which method is used to trigger the test device to determine the WiFi chip to be calibrated, the methods for the test device to obtain multiple calibration data of the WiFi chip to be calibrated include but are not limited to: the test device generates multiple calibration data of the WiFi chip to be calibrated, or the test device receives multiple calibration data of the WiFi chip to be calibrated sent by other devices. Among them, the other device that sends multiple calibration data of the WiFi chip to be calibrated can be the device that sends the storage instruction to the test device. In addition, whether the multiple calibration data of the WiFi chip to be calibrated are generated by the test device or by other devices other than the test device, generating multiple calibration data of the WiFi chip to be calibrated includes but is not limited to: obtaining the initial values of the respective operating parameters of the WiFi chip to be calibrated; for any one of the respective operating parameters, calculating the calibration data corresponding to the any one of the operating parameters based on the initial value of the any one of the operating parameters.

[0062] In the embodiments of the present application, the operating parameters of the WiFi chip to be calibrated include but are not limited to power and frequency offset. Correspondingly, the multiple calibration data include but are not limited to power calibration data and frequency calibration data. Among them, the power calibration data is used to calibrate the power, and the frequency calibration data is used to calibrate the frequency. For example, the power calibration data can include 4 bits, and the frequency calibration data can include 3 bits.

[0063] In step 202, write the multiple calibration data into the unit storage space.

[0064] Among them, the unit storage space can be the granularity used by the test device when determining the size of the storage space. In other words, the test device determines the size of the storage space according to an integer multiple of the unit storage space. For example, if the unit storage space is a byte of 8 bits, the test device determines the size of the storage space according to an integer multiple of the byte of 8 bits.

[0065] In an embodiment of the present application, when a test device writes multiple calibration data into a unit storage space, it includes, but is not limited to, writing the multiple calibration data into the unit storage space in the order of obtaining the multiple calibration data. The starting address of the target calibration data among the multiple calibration data in the unit storage space is indicated by an initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data can be used to read each bit included in the target calibration data from the unit storage space.

[0066] In a possible implementation manner, writing the multiple calibration data into the unit storage space includes: based on the sum of the number of bits included in the multiple calibration data being less than the number of bits corresponding to a second spare storage space, and the number of bits corresponding to the second spare storage space being less than or equal to the number of bits corresponding to the unit storage space, sequentially writing each bit included in the multiple calibration data and a second number of padding bits into the second spare storage space, where the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the multiple calibration data; writing the bits included in the second spare storage space into the unit storage space.

[0067] Exemplarily, the number of bits corresponding to the second spare storage space is the number of bits required to write data into the unit storage space. When the sum of the number of bits included in the multiple calibration data is less than the number of bits corresponding to the second spare storage space, by writing each bit of the multiple calibration data and the second number of second padding bits into the second spare storage space, it is possible to write each bit of the multiple calibration data into the unit storage space by writing the bits included in the second spare storage space into the unit storage space. In an embodiment of the present application, the number of bits corresponding to the second spare storage space can be 8 bits. Thus, the test device can use a test software developed in the C language to write the bits included in the second spare storage space into the unit storage space.

[0068] In a possible implementation manner, sequentially writing each bit included in the multiple calibration data and a second number of second padding bits into the second spare storage space includes: writing the j-th bit among each bit included in the multiple calibration data into the j-th bit position of the second spare storage space, and writing the second number of second padding bits into the remaining bit positions of the second spare storage space; where j is used to represent the serial number, 1 ≤ j ≤ M or 0 ≤ j ≤ M - 1, and M is used to represent the number of bits included in the multiple calibration data. In an embodiment of the present application, the second padding bit can be 0.

[0069] Exemplarily, for any one of the bits included in the multiple calibration data, when writing the any one bit to the corresponding bit position in the second spare storage space, first clear the corresponding bit position of the any one bit, and then write the any one bit to the cleared bit position. The principle is the same when writing any one of the second padding bits to the corresponding bit position in the second spare storage space, and will not be elaborated here.

[0070] Regarding the method of writing the bits included in the second spare storage space to the unit storage space, it includes but is not limited to: for any one of the multiple bits included in the second spare storage space, obtain the storage address corresponding to the any one bit in the unit storage space, clear the storage address corresponding to the any one bit, and write the any one bit to the cleared storage address. The storage address corresponding to the any one bit can be determined based on the bit position of the any one bit in the second spare storage space and the starting address of the bits included in the second spare storage space in the unit storage space.

[0071] For example, for the s-th bit among the multiple bits included in the second spare storage space, the storage address corresponding to the s-th bit is A + s, where A is used to represent the starting address of the bits included in the second spare storage space in the unit storage space, s is used to represent the serial number, 1 ≤ s ≤ K or 0 ≤ s ≤ K - 1, and K is used to represent the number of bits included in the second spare byte. Exemplarily, when the number of bits included in the second spare storage space is the same as the number of bits corresponding to the unit storage space, the starting address of the bits included in the second spare storage space in the unit storage space can be the same as the starting address of the unit storage space. When the number of bits included in the second spare storage space is less than the number of bits corresponding to the unit storage space, the starting addresses of the respective bits included in the second spare storage space in the unit storage space can be the same as or different from the starting address of the unit storage space.

[0072] In a possible implementation manner, the unit storage space is a certain byte among multiple consecutive bytes. In this case, the storage address corresponding to the s-th bit can be indicated by a first byte destination index (byte destinationindex, byte_dst_idx) and a first bit destination index (bit destination index, bit_dst_idx), where the first byte destination index is used to indicate the starting address of the unit storage space, and the first bit destination index is used to indicate the deviation between the storage address corresponding to the s-th bit and the starting address of the unit storage space. Taking the starting address of the bits included in the second spare storage space in the unit storage space being the same as the starting address of the unit storage space as an example, the embodiments of the present application provide a code logic for writing the bits included in the second spare storage space to the unit storage space, and the code logic can be as follows:

[0073]

[0074]

[0075] In this code logic, the starting address of the unit storage space is represented by bit_offset, and the number of bits included in the second spare storage space is represented by bit_cnt. The first byte source index is used to indicate the bit position of the bits in the second spare storage space within the second spare storage space, and the bit sequence number is represented by bit_src_cnt. Thus, in combination with this code logic, the s-th bit in the second spare storage space can be written to the corresponding storage address by performing the following operations (11) to (14).

[0076] Operation (11): Based on bit_offset, obtain the storage position corresponding to the s-th bit, and the storage position corresponding to the s-th bit is indicated by the first byte destination index and the first bit destination index.

[0077] Operation (12): Clear the storage position corresponding to the s-th bit.

[0078] Operation (13): Obtain the first byte source index of the s-th bit.

[0079] Operation (14): Read the s-th bit from the second spare storage space according to the first byte source index, and write the s-th bit to the cleared storage position.

[0080] After performing the above operations (11) to (14) on the s-th bit, similar operations to the above operations (11) to (14) can be performed on the s + 1-th bit until all bits in the second spare storage space are written to the corresponding storage positions.

[0081] Exemplarily, after writing multiple calibration data into the unit storage space, it further includes: for any one of the multiple calibration data, obtain the offset value corresponding to the any one of the calibration data according to the starting address of the any one of the calibration data in the unit storage space; generate the corresponding relationship between the working parameters, the offset value, and the number of bits based on the working parameters, the offset values, and the number of bits corresponding to each calibration data. Thus, when subsequently obtaining the target calibration data among the multiple calibration data, the initial offset value and the number of bits corresponding to the target calibration data can be obtained by looking up the corresponding relationship between the working parameters, the offset value, and the number of bits, and then the target calibration data can be obtained.

[0082] In the method provided by the embodiment of the present application, by storing multiple calibration data of the WiFi chip to be calibrated in a unit storage space, the storage resource utilization rate of the unit storage space is relatively high. Moreover, the number of bits included in each calibration data can be different, and this method can be applicable to different situations of the number of bits included in the calibration data.

[0083] The embodiment of the present application further provides a method for obtaining calibration data. This method can be executed by a test device for testing a WiFi chip. Combining Figure 1 with the shown implementation environment, this test device can be the terminal 11 or the server 12. As Figure 3 shown, the method for obtaining calibration data provided by the embodiment of the present application can include the following steps 301 to 304.

[0084] In step 301, obtain the working parameters of the WiFi chip to be calibrated.

[0085] Exemplarily, before obtaining the working parameters of the WiFi chip to be calibrated, this method further includes: obtaining a calibration instruction, where the calibration instruction includes the identification information of the WiFi chip to be calibrated; determining the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the calibration instruction. Thus, after determining the WiFi chip to be calibrated, the working parameters of the WiFi chip to be calibrated can be obtained according to the determined WiFi chip to be calibrated.

[0086] For example, the test device stores the working parameters of each candidate WiFi chip. After determining the WiFi chip to be calibrated, the test device obtains the stored working parameters of the WiFi chip to be calibrated. Of course, the working parameters of each candidate WiFi chip can also be stored in other devices outside the test device. In this case, after determining the WiFi chip to be calibrated, the test device can send a working parameter acquisition request to other devices storing the working parameters of each WiFi chip, and receive the working parameters of the WiFi chip to be calibrated returned by other devices in response to the working parameter acquisition request.

[0087] In the embodiment of the present application, the test device can also directly obtain the working parameters of the WiFi chip to be calibrated without first determining the WiFi chip to be calibrated. For example, the test device receives a first instruction input externally, where the first instruction includes working parameter indication information for indicating the working parameters of the WiFi chip to be calibrated, so that the test device can obtain the working parameters of the WiFi chip to be calibrated according to the working parameter indication information. The first instruction can be an instruction sent by a device storing the working parameters of the WiFi chip to the test device.

[0088] In step 302, based on the working parameters of the WiFi chip, obtain the initial offset value and the number of bits corresponding to the target calibration data.

[0089] Exemplarily, the initial offset value is used to indicate the starting address of the target calibration data in the unit storage space. The target calibration data is used to calibrate the working parameters, and multiple calibration data are stored in the unit storage space.

[0090] In a possible implementation manner, obtaining the initial offset value and the number of bits corresponding to the target calibration data based on the working parameters of the WiFi chip includes: querying the correspondence between the working parameters and the offset value and the number of bits based on the working parameters of the WiFi chip, and obtaining the initial offset value and the number of bits corresponding to the target calibration data. The correspondence between the working parameters and the offset value and the number of bits can be the correspondence generated in the embodiment of the storage method of the calibration data shown above Figure 2 shown in the embodiment of the storage method of the calibration data.

[0091] In step 303, based on the initial offset value and the number of bits, read each bit included in the target calibration data from the unit storage space.

[0092] Exemplarily, reading each bit included in the target calibration data from the unit storage space based on the initial offset value and the number of bits includes: obtaining the address of the unit storage space, and reading each bit included in the target calibration data from the unit storage space based on the initial offset value and the number of bits. For example, if the unit storage space is a certain byte among a continuous plurality of bytes, the address of the unit storage space can be determined first, and then each bit included in the target calibration data can be read from the unit storage space.

[0093] In this case, the storage address of the i-th bit included in the target calibration data can be indicated by the second byte source index and the second bit source index, where the second byte source index is used to indicate the starting address of the unit storage space, and the second bit source index is used to indicate the deviation of the storage address of the i-th bit from the starting address of the unit storage space. Since the starting address of the target calibration data in the unit storage space can be indicated by the initial offset value corresponding to the target calibration data, the second bit source index corresponding to the i-th bit can be equal to the initial offset value + i.

[0094] In step 304, perform parsing processing on each bit to obtain the target calibration data.

[0095] Exemplarily, the number of bits included in the target calibration data is less than the standard parsing quantity, where the standard parsing quantity is the number of bits required for performing data parsing. For example, the standard parsing quantity is the number of bits for performing data parsing by a test software developed in C language. The standard parsing quantity may be 8 bits. By performing parsing processing on each bit, the target calibration data is obtained, including: writing each bit included in the target calibration data and a first quantity of first padding bits into a first spare storage space, where the number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing quantity, and the first quantity is not less than the difference between the standard parsing quantity and the number of bits of the target calibration data; and performing data parsing on the first spare storage space in units of the standard parsing quantity to obtain the target calibration data. The first spare storage space may be an 8-bit byte, and the first padding bits may be 0.

[0096] By using the first spare storage space as a transfer medium, writing the target calibration data into the first spare storage space, and then performing data parsing on the bits included in the first spare storage space in units of the standard parsing quantity, the test software developed in C language can obtain the target calibration data by parsing the bits included in the first spare storage space. Thus, each calibration data does not need to be stored in different unit storage spaces, and the method provided in the embodiments of the present application can improve the storage resource utilization rate of the unit storage space while realizing the acquisition of the target calibration data.

[0097] Exemplarily, writing each bit included in the target calibration data and a first quantity of first padding bits into the first spare storage space includes: writing the i-th bit included in the target calibration data into the i-th bit position of the first spare storage space, and writing the first quantity of first padding bits into the remaining bit positions of the first spare storage space; where i is used to represent the serial number, 1 ≤ i ≤ N or 0 ≤ i ≤ N - 1, and N is used to represent the number of bits included in the target calibration data. For any one of the bits included in the target calibration data, when writing the any one bit into the corresponding bit position in the first spare storage space, the corresponding bit position may be cleared first, and then the any one bit is written into the cleared bit position. The principle is the same when writing any one of the first padding bits into the corresponding bit position in the first spare storage space, and details are not described herein again.

[0098] In the embodiments of the present application, reading each bit included in the target calibration data and writing each bit included in the target calibration data into the first spare storage space can be executed alternately. That is to say, after reading the i-th bit included in the target calibration data, the i-th bit can be written into the first spare storage space, then the (i + 1)-th bit included in the target calibration data is read, and the (i + 1)-th bit is written into the first spare storage space. By alternately executing the operations of reading bits and writing bits, the read bits can be directly written into the first spare storage space, without occupying other storage spaces outside the first spare storage space to store the already read bits, nor transferring the already read bits from other storage spaces to the first spare storage space. The way of alternately executing reading bits and writing bits can reduce the occupation of storage space and shorten the time from starting to read each bit to writing each bit into the first spare storage space.

[0099] Taking one byte in a continuous plurality of bytes as the unit storage space as an example, the embodiments of the present application provide a code logic for writing each bit of the target calibration data into the first spare storage space, and the code logic can be as follows:

[0100]

[0101]

[0102] In this code logic, the starting read address is obtained according to the starting address of the unit storage space and the initial offset value corresponding to the target calibration data. The starting read address is represented by ori_offset, and the number of bits included in the target calibration data is represented by target_cnt. The second-byte destination index is used to indicate the bit position of the bits included in the target calibration data in the first spare storage space, and the bit sequence number is represented by bit_dst_cnt. Thus, in combination with this code logic, the i-th bit included in the target calibration data can be written into the i-th bit position in the first spare storage space by performing the following operations (21) to (24) on the i-th bit.

[0103] Operation (21), based on ori_offset, obtain the storage address of the i-th bit, and the storage address is represented by the second-byte source index and the second-bit source index.

[0104] Operation (22), obtain the second-byte destination index of the i-th bit.

[0105] Operation (23), clear the bit position of the i-th bit in the first spare storage space according to the second-byte destination index.

[0106] Operation (24), based on the second-byte source index and the second-bit source index, reads the i-th bit from the storage address of the i-th bit, and writes the i-th bit to the cleared bit position.

[0107] After performing the above operations (21) to (24) on the i-th bit, similar operations to the above operations (21) to (24) can be performed on the i + 1-th bit until all bits of the target calibration data are written to the corresponding bit positions.

[0108] In the method provided by the embodiments of the present application, multiple calibration data of the WiFi chip to be calibrated are stored in a unit storage space. When it is necessary to use the target calibration data to calibrate the working parameters of the WiFi chip to be calibrated, the initial offset and the number of bits corresponding to the target calibration data can be obtained first. According to the initial offset and the number of bits, each bit included in the target calibration data is read from the unit storage space, so that the target calibration data can be obtained by parsing and processing the read bits.

[0109] Since the number of bits included in the target calibration data can be any value less than the number of bits corresponding to the unit storage space, this method is applicable to different situations of the number of bits included in the calibration data. Moreover, since the unit storage space can store multiple calibration data, the storage resource utilization rate of the unit storage space is relatively high.

[0110] See Figure 4 , the embodiments of the present application provide an apparatus for obtaining calibration data, and the apparatus includes: a first acquisition module 401 and a second acquisition module 402.

[0111] The first acquisition module 401 is configured to acquire the working parameters of the WiFi chip to be calibrated;

[0112] The first acquisition module 401 is further configured to, based on the working parameters of the WiFi chip, acquire the initial offset value and the number of bits corresponding to the target calibration data. The initial offset value is used to indicate the starting address of the target calibration data in the unit storage space, the target calibration data is used to calibrate the working parameters, and the unit storage space stores multiple calibration data;

[0113] The second acquisition module 402 is configured to read each bit included in the target calibration data from the unit storage space based on the initial offset value and the number of bits;

[0114] The second acquisition module 402 is further configured to perform parsing and processing on each bit to obtain the target calibration data.

[0115] In a possible implementation, the number of bits is less than the standard parsing number, where the standard parsing number is the number of bits required for performing data parsing; a second obtaining module 402, configured to write each bit included in the target calibration data and the first number of first padding bits into a first spare storage space, where the number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing number, and the first number is not less than the difference between the standard parsing number and the number of bits of the target calibration data; and perform data parsing on the bits included in the first spare storage space in units of the standard parsing number to obtain the target calibration data.

[0116] In a possible implementation, the second obtaining module 402 is configured to write the i-th bit included in the target calibration data into the i-th bit position of the first spare storage space, and write the first number of first padding bits into the remaining bit positions of the first spare storage space; where i is used to represent a serial number, 1 ≤ i ≤ N or 0 ≤ i ≤ N - 1, and N is used to represent the number of bits included in the target calibration data.

[0117] In a possible implementation, a first obtaining module 401 is configured to query the correspondence between the working parameters, the offset value, and the number of bits based on the working parameters of the WiFi chip, so as to obtain the initial offset value and the number of bits corresponding to the target calibration data.

[0118] In a possible implementation, the first obtaining module 401 is further configured to obtain a calibration instruction, where the calibration instruction includes the identification information of the WiFi chip to be calibrated; and determine the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the calibration instruction.

[0119] In the device provided in the embodiment of the present application, multiple calibration data of the WiFi chip to be calibrated are stored in a unit storage space. When it is necessary to use the target calibration data to calibrate the working parameters of the WiFi chip to be calibrated, the initial offset and the number of bits corresponding to the target calibration data can be obtained first, and according to the initial offset and the number of bits, each bit included in the target calibration data is read from the unit storage space, so that the target calibration data can be obtained by performing parsing processing on the read bits.

[0120] Since the number of bits included in the target calibration data can be any value less than the number of bits corresponding to the unit storage space, the device is applicable to different situations of the number of bits included in the calibration data. Furthermore, since the unit storage space can store multiple calibration data, the storage resource utilization rate of the unit storage space is relatively high.

[0121] See Figure 5 , the embodiment of the present application provides a storage device for calibration data, and the device includes: an obtaining module 501 and a writing module 502.

[0122] An acquisition module 501, configured to acquire a plurality of calibration data of a WiFi chip to be calibrated, where one calibration data is used to calibrate one operating parameter of the WiFi chip;

[0123] A writing module 502, configured to write the plurality of calibration data into a unit storage space, where the starting address of the target calibration data among the plurality of calibration data in the unit storage space is indicated by an initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data are used to read each bit included in the target calibration data from the unit storage space.

[0124] In a possible implementation manner, the writing module 502 is configured to, based on that the sum of the number of bits included in the plurality of calibration data is less than the number of bits corresponding to a second spare storage space, and the number of bits corresponding to the second spare storage space is less than or equal to the number of bits corresponding to the unit storage space, sequentially write each bit included in the plurality of calibration data and a second number of second padding bits into the second spare storage space, where the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the plurality of calibration data; and write the bits included in the second spare storage space into the unit storage space.

[0125] In a possible implementation manner, the writing module 502 is configured to write the j-th bit among each bit included in the plurality of calibration data into the j-th bit position of the second spare storage space, and write the second number of second padding bits into the remaining bit positions of the second spare storage space; where j is used to represent a serial number, 1 ≤ j ≤ M or 0 ≤ j ≤ M - 1, and M is used to represent the number of bits included in the plurality of calibration data.

[0126] In a possible implementation manner, the acquisition module 501 is further configured to, for any one of the plurality of calibration data, obtain the offset value corresponding to the any one of the calibration data according to the starting address of the any one of the calibration data in the unit storage space; and generate a correspondence between the operating parameter and the offset value and the number of bits based on the operating parameters, offset values, and the number of bits corresponding to the respective calibration data.

[0127] In a possible implementation manner, the acquisition module 501 is further configured to obtain a storage instruction, where the storage instruction includes identification information of the WiFi chip to be calibrated; and determine the WiFi chip to be calibrated from a plurality of candidate WiFi chips according to the identification information included in the storage instruction.

[0128] In the apparatus provided in the embodiments of the present application, by storing a plurality of calibration data of the WiFi chip to be calibrated in the unit storage space, the storage resource utilization rate of the unit storage space is relatively high. Moreover, the number of bits included in each calibration data can be different, and the apparatus can be applicable to different situations of the number of bits included in the calibration data.

[0129] It should be noted that when the device provided in the above embodiments realizes its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiments and the method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.

[0130] Figure 6 FIG. is a schematic structural diagram of a server provided by an embodiment of the present application. The server may vary greatly due to different configurations or performances, and may include one or more processors 601 and one or more memories 602. Among them, at least one computer program is stored in one or more memories 602, and the at least one computer program is loaded and executed by one or more processors 601 to enable the server to implement the above Figure 2 storage method of calibration data provided by the method embodiment shown or Figure 3 acquisition method of calibration data shown. The processor 601 may be a central processing unit (CPU). Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input / output. The server may also include other components for implementing the functions of the device, which will not be elaborated here.

[0131] Figure 7 FIG. is a schematic structural diagram of a terminal provided by an embodiment of the present application. The terminal may be: a smart phone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal may also be referred to by other names such as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, etc.

[0132] Generally, the terminal includes: a processor 1001 and a memory 1002.

[0133] The processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0134] The memory 1002 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1002 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1001 so that the terminal implements the Figure 2 storage method of calibration data provided by the method embodiment shown above or the Figure 3 acquisition method of calibration data provided by the method embodiment shown above.

[0135] In some embodiments, the terminal may also optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002, and the peripheral device interface 1003 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1003 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, a positioning component 1008, and a power supply 1009.

[0136] The peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.

[0137] The radio frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 1004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area network, and / or WiFi network. In some embodiments, the radio frequency circuit 1004 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.

[0138] The display screen 1005 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to collect touch signals on or above the surface of the display screen 1005. The touch signals can be input to the processor 1001 as control signals for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1005, which is provided on the front panel of the terminal; in other embodiments, there may be at least two display screens 1005, which are respectively provided on different surfaces of the terminal or are in a foldable design; in other embodiments, the display screen 1005 may be a flexible display screen, which is provided on the curved surface or the folding surface of the terminal. Even, the display screen 1005 can also be set to an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 1005 can be prepared from materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0139] The camera module 1006 is used to collect images or videos. Optionally, the camera module 1006 includes a front camera and a rear camera. Generally, the front camera is provided on the front panel of the terminal, and the rear camera is provided on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera respectively, so as to realize the function of background blurring by fusing the main camera and the depth-of-field camera, the function of panoramic shooting by fusing the main camera and the wide-angle camera, and the VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera module 1006 may also include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. A two-color-temperature flash refers to a combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.

[0140] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 1001 for processing, or input to the radio frequency circuit 1004 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 1007 may further include a headphone jack.

[0141] The positioning component 1008 is used to locate the current geographical location of the terminal to achieve navigation or LBS (Location Based Service). The positioning component 1008 may be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the GLONASS system of Russia, or the Galileo system of the European Union.

[0142] The power supply 1009 is used to supply power to each component in the terminal. The power supply 1009 may be alternating current, direct current, a primary battery, or a rechargeable battery. When the power supply 1009 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery may also be used to support fast charging technology.

[0143] In some embodiments, the terminal further includes one or more sensors 1010. The one or more sensors 1010 include but are not limited to: an acceleration sensor 1011, a gyroscope sensor 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015, and a proximity sensor 1016.

[0144] The acceleration sensor 1011 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal. For example, the acceleration sensor 1011 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 1001 can control the display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 can also be used for game or collection of the user's motion data.

[0145] The gyroscope sensor 1012 can detect the body direction and rotation angle of the terminal. The gyroscope sensor 1012 can cooperate with the acceleration sensor 1011 to collect the 3D actions of the user on the terminal. Based on the data collected by the gyroscope sensor 1012, the processor 1001 can implement the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.

[0146] The pressure sensor 1013 can be disposed on the side frame of the terminal and / or the lower layer of the display screen 1005. When the pressure sensor 1013 is disposed on the side frame of the terminal, it can detect the holding signal of the user on the terminal, and the processor 1001 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor 1013. When the pressure sensor 1013 is disposed on the lower layer of the display screen 1005, the processor 1001 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 1005. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0147] The fingerprint sensor 1014 is used to collect the fingerprint of the user. The processor 1001 can identify the user's identity according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 can identify the user's identity according to the collected fingerprint. When the identity of the user is identified as a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations, and the sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings, etc. The fingerprint sensor 1014 can be disposed on the front, back, or side of the terminal. When there are physical buttons or a manufacturer's Logo (trademark) on the terminal, the fingerprint sensor 1014 can be integrated with the physical buttons or the manufacturer's Logo.

[0148] The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 according to the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera module 1006 according to the ambient light intensity collected by the optical sensor 1015.

[0149] The proximity sensor 1016, also known as a distance sensor, is typically disposed on the front panel of the terminal. The proximity sensor 1016 is used to collect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor 1016 detects that the distance between the user and the front of the terminal is gradually decreasing, the processor 1001 controls the display screen 1005 to switch from the lit state to the off state; when the proximity sensor 1016 detects that the distance between the user and the front of the terminal is gradually increasing, the processor 1001 controls the display screen 1005 to switch from the off state to the lit state.

[0150] Those skilled in the art can understand that Figure 7 the structure shown in

[0151] does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.

[0152] In an exemplary embodiment, a computer device is further provided. The computer device includes a processor and a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by one or more processors so that the computer device implements any one of the above-described calibration data acquisition methods or any one of the above-described calibration data storage methods. Figure 2 Figure 3 In an exemplary embodiment, a test system is further provided. The test system includes a first test device and a second test device. The first test device is used to execute the calibration data storage method provided by the method embodiment shown above Figure 2 Figure 3 and Figure 3 The second test device is used to execute the calibration data acquisition method provided by the method embodiment shown above. The respective functions of the first test device and the second test device can refer to the relevant descriptions in the above

[0153] and are not described in detail here.

[0154] In an exemplary embodiment, a computer program product or a computer program is further provided. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the above-mentioned methods for obtaining calibration data or any one of the above-mentioned methods for storing calibration data.

[0155] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by users or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the calibration data involved in this application is obtained under full authorization.

[0156] It should be understood that the term "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0157] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for obtaining calibration data, characterized in that, The method includes: Obtaining the working parameters of a Wi-Fi chip to be calibrated; Based on the working parameters of the Wi-Fi chip, obtaining an initial offset value and a number of bits corresponding to target calibration data, where the initial offset value is used to indicate the starting address of the target calibration data in a unit storage space, the target calibration data is used to calibrate the working parameters, the unit storage space stores multiple calibration data, the number of bits is less than a standard parsing number, the standard parsing number is the number of bits for performing data parsing, and both the unit storage space and the standard parsing number are 8 bits; Based on the initial offset value and the number of bits, reading each bit included in the target calibration data from the unit storage space; Writing the i-th bit included in the target calibration data to the i-th bit position of a first spare storage space, and writing a first number of first padding bits to the remaining bit positions of the first spare storage space, and performing data parsing on the bits included in the first spare storage space in units of the standard parsing number to obtain the target calibration data, the number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing number, the first number is not less than the difference between the standard parsing number and the number of bits of the target calibration data, i is used to represent a serial number, 1 ≤ i ≤ N or 0 ≤ i ≤ N - 1, and N is used to represent the number of bits included in the target calibration data.

2. The method according to claim 1, characterized in that, The obtaining the initial offset value and the number of bits corresponding to the target calibration data based on the working parameters of the Wi-Fi chip includes: Based on the working parameters of the Wi-Fi chip, querying the correspondence between the working parameters and the offset value and the number of bits to obtain the initial offset value and the number of bits corresponding to the target calibration data.

3. The method according to claim 1, characterized in that, Before obtaining the working parameters of the Wi-Fi chip to be calibrated, it further includes: Obtaining a calibration instruction, where the calibration instruction includes identification information of the Wi-Fi chip to be calibrated; Determining the Wi-Fi chip to be calibrated from multiple candidate Wi-Fi chips according to the identification information included in the calibration instruction.

4. A method for storing calibration data, characterized in that, The method includes: Obtaining multiple calibration data of the Wi-Fi chip to be calibrated, and one calibration data is used to calibrate one working parameter of the Wi-Fi chip; Based on the sum of the number of bits included in the multiple calibration data being less than the number of bits corresponding to the second spare storage space, and the number of bits corresponding to the second spare storage space being less than or equal to the number of bits corresponding to the unit storage space, write the j-th bit among the respective bits included in the multiple calibration data to the j-th bit position of the second spare storage space, write a second number of second padding bits to the remaining bit positions of the second spare storage space, and write the bits included in the second spare storage space to the unit storage space, where j is used to represent the serial number, 1 ≤ j ≤ M or 0 ≤ j ≤ M - 1, M is used to represent the number of bits included in the multiple calibration data, the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the multiple calibration data, the number of bits corresponding to the second spare storage space is the number of bits required to write data to the unit storage space, the number of bits corresponding to both the unit storage space and the second spare storage space is 8 bits, the starting address of the target calibration data in the multiple calibration data in the unit storage space is indicated by the initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data are used to read the respective bits included in the target calibration data from the unit storage space.

5. The method according to claim 4, characterized in that, After writing the bits included in the second spare storage space to the unit storage space, it further includes: For any one of the multiple calibration data, obtain the offset value corresponding to the any one of the calibration data according to the starting address of the any one of the calibration data in the unit storage space; Generate the correspondence between the working parameters, the offset values, and the number of bits based on the working parameters, the offset values, and the number of bits corresponding to the respective calibration data.

6. The method according to claim 4, characterized in that, Before obtaining the multiple calibration data of the wireless fidelity (WiFi) chip to be calibrated, it further includes: Obtain a storage instruction, where the storage instruction includes the identification information of the WiFi chip to be calibrated; Determine the WiFi chip to be calibrated from multiple candidate WiFi chips according to the identification information included in the storage instruction.

7. An apparatus for obtaining calibration data, characterized in that, The device includes: A first acquisition module, configured to acquire the working parameters of the wireless fidelity (WiFi) chip to be calibrated; The first acquisition module is further configured to, based on the working parameters of the WiFi chip, acquire the initial offset value and the number of bits corresponding to the target calibration data, where the initial offset value is used to indicate the starting address of the target calibration data in the unit storage space, the target calibration data is used to calibrate the working parameters, the unit storage space stores multiple calibration data, the number of bits is less than the standard parsing number, and the standard parsing number is the number of bits for performing data parsing, and both the unit storage space and the standard parsing number are 8 bits; A second acquisition module, configured to read the respective bits included in the target calibration data from the unit storage space based on the initial offset value and the number of bits; The second acquisition module is further configured to write the i-th bit included in the target calibration data to the i-th bit position of the first spare storage space, and write a first number of first padding bits to the remaining bit positions of the first spare storage space. Taking the standard parsing quantity as a unit, perform data parsing on the bits included in the first spare storage space to obtain the target calibration data. The number of bits corresponding to the first spare storage space is an integer multiple of the standard parsing quantity. The first number is not less than the difference between the standard parsing quantity and the number of bits of the target calibration data. The i is used to represent a serial number, 1≤i≤N or 0≤i≤N-1, and the N is used to represent the number of bits included in the target calibration data.

8. An apparatus for storing calibration data, characterized in that, The device includes: an acquisition module, configured to acquire a plurality of calibration data of a wireless fidelity (WiFi) chip to be calibrated, where one calibration data is used to calibrate one operating parameter of the WiFi chip; a writing module, configured to, based on that the sum of the number of bits included in the plurality of calibration data is less than the number of bits corresponding to a second spare storage space, and the number of bits corresponding to the second spare storage space is less than or equal to the number of bits corresponding to a unit storage space, write the j-th bit in each of the bits included in the plurality of calibration data to the j-th bit position of the second spare storage space, write a second number of second padding bits to the remaining bit positions of the second spare storage space, and write the bits included in the second spare storage space to the unit storage space, where the j is used to represent a serial number, 1≤j≤M or 0≤j≤M-1, the M is used to represent the number of bits included in the plurality of calibration data, the second number is the difference between the number of bits corresponding to the second spare storage space and the sum of the number of bits included in the plurality of calibration data, the number of bits corresponding to the second spare storage space is the number of bits required to write data to the unit storage space, the number of bits corresponding to both the unit storage space and the second spare storage space is 8 bits, the starting address of the target calibration data in the plurality of calibration data in the unit storage space is indicated by an initial offset value, and the initial offset value and the number of bits corresponding to the target calibration data are used to read each of the bits included in the target calibration data from the unit storage space.

9. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program code is stored in the memory. The at least one program code is loaded and executed by the processor to enable the computer device to implement the method for acquiring calibration data as described in any one of claims 1-3, or to implement the method for storing calibration data as described in any one of claims 4-6.

10. A computer-readable storage medium, characterized in that, At least one program code is stored in the computer-readable storage medium. The at least one program code is loaded and executed by a processor to enable a computer to implement the method for acquiring calibration data as described in any one of claims 1-3, or to implement the method for storing calibration data as described in any one of claims 4-6.

Citation Information

Patent Citations

  • Flash memory storage method and device of information, computer equipment and storage medium

    CN114968841A