WO2023272603A1 - 一种校准方法和电子设备 - Google Patents

一种校准方法和电子设备 Download PDF

Info

Publication number
WO2023272603A1
WO2023272603A1 PCT/CN2021/103680 CN2021103680W WO2023272603A1 WO 2023272603 A1 WO2023272603 A1 WO 2023272603A1 CN 2021103680 W CN2021103680 W CN 2021103680W WO 2023272603 A1 WO2023272603 A1 WO 2023272603A1
Authority
WO
WIPO (PCT)
Prior art keywords
calibration
sensor
processor
calibrated
data
Prior art date
Application number
PCT/CN2021/103680
Other languages
English (en)
French (fr)
Inventor
李远强
Original Assignee
东莞市小精灵教育软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 东莞市小精灵教育软件有限公司 filed Critical 东莞市小精灵教育软件有限公司
Priority to PCT/CN2021/103680 priority Critical patent/WO2023272603A1/zh
Publication of WO2023272603A1 publication Critical patent/WO2023272603A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00

Definitions

  • the invention relates to the technical field of data processing, in particular to a calibration method and electronic equipment.
  • Sensors are important components in electronic products, and sensors usually have accuracy requirements, so it is necessary to calibrate the sensors frequently during the operation of electronic products to ensure that the accuracy of the sensors meets the accuracy requirements.
  • the existing technology can only perform simple calibration. Since the sensor to be calibrated and the processor in the electronic product are independent of each other, the calibration process of the sensor to be calibrated in the electronic product is relatively complicated in the prior art, and the calibration accuracy is not high.
  • the purpose of the present invention is to provide a calibration method and electronic equipment to achieve the purpose of simplifying the sensor calibration process and improving the sensor calibration accuracy.
  • the present invention provides a kind of calibration method, comprises steps:
  • the calibration application triggers the running test interface to start a calibration thread to obtain calibration data
  • the processor calibrates the sensor to be calibrated according to the calibration data, and acquires a corresponding calibration result from the sensor to be calibrated.
  • the calibration application program triggers the running test interface to start a calibration thread, so as to obtain calibration data including steps:
  • the calibration input parameters include sensor type information and calibration type information
  • the calibration application program transmits the calibration input parameters to the running test interface corresponding to the sensor type information through the processor;
  • the sensor to be calibrated performs measurement according to the calibration type information and obtains measurement data, and transmits the measurement value to the processor;
  • the processor obtains corresponding calibration data according to the received measurement data.
  • the processor generating corresponding calibration data according to the received measurement data includes the steps of:
  • the processor periodically acquires the measurement data through the running test interface according to a preset time interval
  • the processor deletes the maximum value and the minimum value in the measurement data, and calculates the mean value of the remaining measurement data;
  • the processor obtains the calibration data according to the calculation result of the mean value.
  • the processor calibrates the sensor to be calibrated according to the calibration data, and obtaining a corresponding calibration result from the sensor to be calibrated includes the steps of:
  • the processor sends the calibration data to the running test interface, so that the sensor to be calibrated is calibrated according to the calibration data;
  • the sensor to be calibrated is measured again to obtain a test result, and the test result is transmitted to the processor;
  • the processor calculates the difference between the set value in the calibration type information and the test result
  • the processor determines that the calibration result is a calibration failure
  • the processor determines that the calibration result is a successful calibration.
  • the processor calibrates the sensor to be calibrated according to the calibration data, and after obtaining a corresponding calibration result from the sensor to be calibrated, the steps include:
  • the processor communicates the calibration data and calibration results to the calibration application for display.
  • the present invention also provides an electronic device, including: a calibration application program, a processor and a sensor to be calibrated;
  • the calibration application program includes an application interface, and the sensor to be calibrated includes a running test interface; the communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated; the calibration application program, the sensor to be calibrated and processor connection;
  • the calibration application is used to trigger the running test interface to start a calibration thread to obtain calibration data
  • the processor is configured to calibrate the sensor to be calibrated according to the calibration data, and obtain a corresponding calibration result from the sensor to be calibrated.
  • the calibration application program includes: an input module; the sensor to be calibrated includes a measurement module;
  • An input module configured to obtain calibration input parameters; the calibration input parameters include sensor type information and calibration type information;
  • the application interface is used to pass the calibration input parameters to the operation test interface corresponding to the sensor type information through the processor;
  • the measurement module is configured to perform measurement according to the calibration type information and obtain measurement data
  • the running test interface is used to transfer the measurement value to the processor
  • the processor is further configured to obtain corresponding calibration data according to the received measurement data.
  • the processor includes:
  • An acquisition module configured to periodically acquire the measurement data through the running test interface according to a preset time interval
  • the calculation module is used to delete the maximum value and the minimum value in the measurement data, perform mean value calculation on the remaining measurement data, and obtain calibration data according to the mean value calculation result.
  • the processor also includes: a processing module
  • the processor is further configured to send the calibration data to the running test interface
  • the measurement module is also used to calibrate according to the calibration data, and after the calibration operation is completed, perform measurement again to obtain a test result;
  • the running test interface is also used to transmit the test result to the processor
  • the processing module is configured to calculate the difference between the set value in the calibration type information and the test result; when the difference calculation result is greater than a preset threshold, the sensor to be calibrated determines that the calibration result is Calibration fails; when the difference calculation result is less than a preset threshold, the sensor to be calibrated determines that the calibration result is a calibration success.
  • the processor is further configured to transmit the calibration data and calibration results to the calibration application program for display.
  • the sensor calibration process can be simplified and the sensor calibration accuracy can be improved.
  • Fig. 1 is the flowchart of an embodiment of a kind of calibration method of the present invention
  • Fig. 2 is the flowchart of another embodiment of a kind of calibration method of the present invention.
  • Fig. 3 is the flowchart of another embodiment of a kind of calibration method of the present invention.
  • Fig. 4 is the flowchart of another embodiment of a kind of calibration method of the present invention.
  • Fig. 5 is a schematic structural diagram of an embodiment of an electronic device of the present invention.
  • a kind of calibration method comprises:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the sensors to be calibrated include but are not limited to ranging sensors such as gyroscopes, distance sensors, light sensors, and laser radars, as well as temperature sensors, pressure sensors, humidity sensors, and gyroscopes.
  • the running test interface refers to the runtest interface of the sensor to be calibrated.
  • the electronic device includes a processor and a sensor to be calibrated.
  • the electronic device can install and run a calibration application program. In this way, the calibration application program in the electronic device establishes a connection with the processor in a wireless manner, and the sensor to be calibrated establishes a connection with the processor in a wired or wireless manner, and the application interface of the calibration application program and the running test interface of the sensor to be calibrated Establish a communication connection.
  • the sensor to be calibrated uses the runtest interface to communicate with the processor (such as an ADSP chip), and the runtest interface includes sensor_open, sensor_write(), and sensor_close() interfaces.
  • the processor such as an ADSP chip
  • the calibration application program triggers the running test interface to start a calibration thread to obtain calibration data
  • the processor calibrates the sensor to be calibrated according to the calibration data, and acquires a corresponding calibration result from the sensor to be calibrated.
  • the present invention provides a calibration application program by itself, through the application interface provided by the electronic device, communicates with the running test interface of the sensor to be calibrated, and then, the electronic device starts the calibration thread under the running test interface, and obtains the sensor to be calibrated through the running test interface
  • the calibration data obtained by performing the test in the course of the calibration thread, and then, the electronic device calibrates the sensor to be calibrated according to the calibration data and obtains a calibration result corresponding to the sensor to be calibrated.
  • a calibration method comprising:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the calibration input parameters include sensor type information and calibration type information
  • this embodiment is an optimized embodiment of the above-mentioned embodiment, and the parts in this embodiment that are the same as those in the above-mentioned embodiment refer to the above-mentioned embodiment, and details are not repeated here.
  • the present invention needs to define the calibration type, and pre-store the corresponding processes and methods for realizing the calibration type. For example: adding sns_ddf_test_e is the definition of calibration type information as follows:
  • the calibration application program transmits the calibration input parameters to the running test interface corresponding to the sensor type information through the processor;
  • the sensor to be calibrated performs measurement according to the calibration type information and obtains measurement data, and transmits the measurement value to the processor;
  • the processor obtains corresponding calibration data according to the received measurement data
  • the calibration application program provides a human-computer interaction interface for obtaining calibration input parameters to initiate a calibration process
  • the sensor type information includes the above-mentioned temperature sensor, humidity sensor, distance sensor, and the like.
  • the calibration type information is set according to the sensor type.
  • the calibration types include barrier-free calibration, 10cm distance calibration, and 25cm distance calibration and other custom calibrations (that is, the distance between the measurement reference object and the electronic device is set as the preset distance).
  • the calibration application program After obtaining the calibration input parameters through the calibration application program, the calibration application program transmits the calibration input parameters to the processor, and then the processor transmits the calibration input parameters to the running test interface of the corresponding sensor according to the sensor type information. Then, the sensor to be calibrated controls itself to perform measurement according to the test process corresponding to the calibration type information to obtain corresponding measurement data, and the sensor to be calibrated sends the measurement value to the processor. The processor performs judgment, analysis and judgment according to the received measurement data to obtain corresponding calibration data.
  • the method of initiating calibration through the calibration application is by calling the calibration native method.
  • Calibration Native method :
  • the calibration input parameters that the native method needs to obtain are: calibrated sensor type information (light sensor, distance sensor, etc.), calibration type information (custom, such as distance 25cm calibration, barrier-free calibration).
  • the native method uses the sensor_open, sensor_write(), sensor_close() interfaces to establish communication with the processor, and then transfers the calibration input parameters sent by the upper-level calibration application program, that is, the calibration input parameters obtained by the calibration application program to the specific The runtest interface corresponding to the sensor to be calibrated.
  • the processor calibrates the sensor to be calibrated according to the calibration data, and acquires a corresponding calibration result from the sensor to be calibrated.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • a calibration method comprising:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the calibration input parameters include sensor type information and calibration type information
  • the calibration application program transmits the calibration input parameters to the running test interface corresponding to the sensor type information through the processor;
  • the sensor to be calibrated performs measurement according to the calibration type information and obtains measurement data, and transmits the measurement value to the processor;
  • the processor periodically acquires the measurement data through the running test interface according to a preset time interval
  • the processor deletes the maximum value and the minimum value in the measurement data, and calculates the mean value of the remaining measurement data;
  • this embodiment is an optimized embodiment of the above-mentioned embodiment, and the parts in this embodiment that are the same as those in the above-mentioned embodiment refer to the above-mentioned embodiment, and details are not repeated here.
  • the processor obtains the calibration input parameters through the calibration application program, the processor can know what type of calibration needs to be performed and the type of sensor to be calibrated.
  • the processor may also start a thread to obtain measurement data of the sensor to be calibrated, and perform corresponding calibration on the sensor to be calibrated according to the measurement data.
  • the processor periodically obtains measurement data from the sensor to be calibrated through the running test interface according to a preset time interval (for example, 5s or 10s), and the processor deletes the maximum and minimum values in the measurement data, Perform mean value calculation on the remaining measurement data, and then obtain calibration data according to the mean value calculation result.
  • a preset time interval for example, 5s or 10s
  • the processor implements a simple process corresponding to the sensor to be calibrated such as a distance sensor, and the selected calibration type is SNS_DDF_TEST_PS_25CM (that is, the distance 25cm calibration in the above-mentioned embodiment) is as follows: the processor starts the thread interval to periodically obtain the distance value of the distance sensor (i.e. a kind of measurement data of the present invention), distance value is removed maximum value and minimum value, then, processor carries out averaging calculation with other distance value, compares with 25cm according to distance average value, just can obtain according to comparison result Corresponding calibration data.
  • the processor starts the thread interval to periodically obtain the distance value of the distance sensor (i.e. a kind of measurement data of the present invention), distance value is removed maximum value and minimum value, then, processor carries out averaging calculation with other distance value, compares with 25cm according to distance average value, just can obtain according to comparison result Corresponding calibration data.
  • the processor calibrates the sensor to be calibrated according to the calibration data, and acquires a corresponding calibration result from the sensor to be calibrated.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • a calibration method comprising:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the calibration application program triggers the running test interface to start a calibration thread to obtain calibration data
  • the processor sends the calibration data to the running test interface, so that the sensor to be calibrated is calibrated according to the calibration data;
  • the processor calculates the difference between the set value in the calibration type information and the test result
  • the processor determines that the calibration result is a successful calibration.
  • this embodiment is an optimized embodiment of the above-mentioned embodiment, and the parts in this embodiment that are the same as those in the above-mentioned embodiment refer to the above-mentioned embodiment, and details are not repeated here.
  • the processor sends the calibration data to the running test interface, so that the sensor to be calibrated obtains the calibration data from the running test interface, and the sensor to be calibrated is calibrated according to the obtained calibration data. After the sensor to be calibrated completes the calibration operation according to the calibration data, it performs measurement again to obtain a test result, and then the sensor to be calibrated sends the test result to the processor through the running test interface.
  • the processor performs a difference calculation between the set value in the calibration type information and the test result, and if the difference calculation result is greater than a preset threshold, the processor determines that the calibration result is a calibration failure, and if the difference calculation result When the value is less than the preset threshold, the processor determines that the calibration result is a successful calibration.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • a calibration method comprising:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the calibration application program triggers the running test interface to start a calibration thread to obtain calibration data
  • the processor calibrates the sensor to be calibrated according to the calibration data, and acquires a corresponding calibration result from the sensor to be calibrated;
  • the processor transmits the calibration data and the calibration result to the calibration application program for display.
  • this embodiment is an optimized embodiment of the above-mentioned embodiment, and the parts in this embodiment that are the same as those in the above-mentioned embodiment refer to the above-mentioned embodiment, and details are not repeated here.
  • the processor returns the obtained calibration result and calibration data to the above native method through sns_ddf_smgr_notify_test_complete_with_data() and sns_ddf_smgr_notify_event(), that is, returns to the application interface of the calibration application.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • the calibration application can display the calibration data and calibration results corresponding to the sensor to be calibrated through the provided human-computer interaction interface, which is conducive to intuitive and convenient viewing of the calibration status of the sensor to be calibrated, and then decides whether to re-initiate a new calibration. checked.
  • a calibration method comprising:
  • S100 establishes a communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated, and respectively establishes a connection between the calibration application program and the sensor to be calibrated;
  • the calibration application program triggers the running test interface to start a calibration thread to obtain calibration data
  • the processor sends the calibration data to the running test interface, so that the sensor to be calibrated is calibrated according to the calibration data;
  • the processor calculates the difference between the set value in the calibration type information and the test result
  • the processor transmits the calibration data and the calibration result to the calibration application program for display.
  • this embodiment is an optimized embodiment of the above-mentioned embodiment, and the parts in this embodiment that are the same as those in the above-mentioned embodiment refer to the above-mentioned embodiment, and details are not repeated here.
  • a calibration application program on the electronic device, and then providing a measurement reference object (such as a baffle, a hand, etc.), and then detecting the distance value between the electronic device and the measurement reference object through a distance sensor, by The processor calculates the calibration data according to the distance value and the preset distance, so as to write the calibration data into the electronic device, and add the calibration method to the testing or manufacturing process of each electronic device, which can be automatically performed without peripheral equipment. Detection and calibration, low cost and high efficiency.
  • a measurement reference object such as a baffle, a hand, etc.
  • the present invention realizes the distance sensor calibration application program by itself, communicates with the runtest interface of the distance sensor through the interface provided by the Qualcomm platform, and then starts the calibration thread through the runtest interface to perform barrier-free calibration and 25CM calibration on the distance sensor.
  • the calibration data is calculated by the processor according to the light intensity and the preset light intensity value, so that the calibration data is written into the electronic device, and the calibration method is added to the testing or manufacturing process of each electronic device, which can eliminate the need for peripheral Automatic detection and calibration in the case of equipment, low cost and high efficiency.
  • an electronic device as shown in FIG. 5 , includes: a calibration application program, a processor, and a sensor to be calibrated;
  • the calibration application program includes an application interface, and the sensor to be calibrated includes a running test interface; the communication connection between the application interface of the calibration application program and the running test interface of the sensor to be calibrated; the calibration application program, the sensor to be calibrated and processor connection;
  • the calibration application is used to trigger the running test interface to start a calibration thread to obtain calibration data
  • the processor is configured to calibrate the sensor to be calibrated according to the calibration data, and obtain a corresponding calibration result from the sensor to be calibrated.
  • the sensors to be calibrated include but are not limited to ranging sensors such as gyroscopes, distance sensors, light sensors, and laser radars, as well as temperature sensors, pressure sensors, humidity sensors, and gyroscopes.
  • the running test interface refers to the runtest interface of the sensor to be calibrated.
  • the electronic device includes a processor and a sensor to be calibrated.
  • the electronic device can install and run a calibration application program. In this way, the calibration application program in the electronic device establishes a connection with the processor in a wireless manner, the sensor to be calibrated establishes a connection with the processor in a wired or wireless manner, and the application interface of the calibration application program and the running test interface of the sensor to be calibrated Establish a communication connection.
  • the sensor to be calibrated uses the runtest interface to communicate with the processor (such as an ADSP chip), and the runtest interface includes sensor_open, sensor_write(), and sensor_close() interfaces.
  • the processor such as an ADSP chip
  • the present invention provides a calibration application program by itself, through the application interface provided by the electronic device, communicates with the running test interface of the sensor to be calibrated, and then, the electronic device starts the calibration thread under the running test interface, and obtains the sensor to be calibrated through the running test interface
  • the calibration data obtained by performing the test in the course of the calibration thread, and then, the electronic device calibrates the sensor to be calibrated according to the calibration data and obtains a calibration result corresponding to the sensor to be calibrated.
  • the calibration application program includes: an input module; the sensor to be calibrated includes a measurement module;
  • An input module configured to obtain calibration input parameters; the calibration input parameters include sensor type information and calibration type information;
  • the application interface is used to transfer the calibration input parameters to the operation test interface corresponding to the sensor type information through the processor;
  • the measurement module is configured to perform measurement according to the calibration type information and obtain measurement data
  • the running test interface is used to transfer the measurement value to the processor
  • the processor is further configured to obtain corresponding calibration data according to the received measurement data.
  • the present invention needs to define the calibration type, and pre-store the corresponding processes and methods for realizing the calibration type. For example: adding sns_ddf_test_e is the definition of calibration type information as follows:
  • the calibration application program provides a human-computer interaction interface for obtaining calibration input parameters to initiate the calibration process, and the sensor type information includes the above-mentioned temperature sensor, humidity sensor, distance sensor, etc.
  • the calibration type information is set according to the sensor type.
  • the calibration types include barrier-free calibration, 10cm distance calibration, and 25cm distance calibration and other custom calibrations (that is, the distance between the measurement reference object and the electronic device is set as the preset distance).
  • the calibration application program transmits the calibration input parameters to the processor, and then the processor transmits the calibration input parameters to the running test interface of the corresponding sensor according to the sensor type information. Then, the sensor to be calibrated controls itself to perform measurement according to the test process corresponding to the calibration type information to obtain corresponding measurement data, and the sensor to be calibrated sends the measurement value to the processor. The processor performs judgment, analysis and judgment according to the received measurement data to obtain corresponding calibration data.
  • the method of initiating calibration through the calibration application is by calling the calibration native method.
  • Calibration Native method :
  • the calibration input parameters that the native method needs to obtain are: calibrated sensor type information (light sensor, distance sensor, etc.), calibration type information (custom, such as distance 25cm calibration, barrier-free calibration).
  • the native method uses the sensor_open, sensor_write(), sensor_close() interfaces to establish communication with the processor, and then transfers the calibration input parameters sent by the upper-level calibration application program, that is, the calibration input parameters obtained by the calibration application program to the specific The runtest interface corresponding to the sensor to be calibrated.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • the processor includes:
  • An acquisition module configured to periodically acquire the measurement data through the running test interface according to a preset time interval
  • the calculation module is used to delete the maximum value and the minimum value in the measurement data, perform mean value calculation on the remaining measurement data, and obtain calibration data according to the mean value calculation result.
  • the processor can know what type of calibration needs to be performed and the type of sensor to be calibrated.
  • the processor may also start a thread to obtain measurement data of the sensor to be calibrated, and perform corresponding calibration on the sensor to be calibrated according to the measurement data. Then, the processor periodically obtains measurement data from the sensor to be calibrated through the running test interface according to a preset time interval (for example, 5s or 10s), and the processor deletes the maximum and minimum values in the measurement data, Perform mean value calculation on the remaining measurement data, and then obtain calibration data according to the mean value calculation result.
  • a preset time interval for example, 5s or 10s
  • the processor implements a simple process corresponding to the sensor to be calibrated such as a distance sensor, and the selected calibration type is SNS_DDF_TEST_PS_25CM (that is, the distance 25cm calibration in the above-mentioned embodiment) is as follows: the processor starts the thread interval to periodically obtain the distance value of the distance sensor (i.e. a kind of measurement data of the present invention), distance value is removed maximum value and minimum value, then, processor carries out averaging calculation with other distance value, compares with 25cm according to distance average value, just can obtain according to comparison result Corresponding calibration data.
  • the processor starts the thread interval to periodically obtain the distance value of the distance sensor (i.e. a kind of measurement data of the present invention), distance value is removed maximum value and minimum value, then, processor carries out averaging calculation with other distance value, compares with 25cm according to distance average value, just can obtain according to comparison result Corresponding calibration data.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • the processor further includes: a processing module
  • the processor is further configured to send the calibration data to the running test interface
  • the measurement module is also used to calibrate according to the calibration data, and after the calibration operation is completed, perform measurement again to obtain a test result;
  • the running test interface is also used to transmit the test result to the processor
  • the processing module is configured to calculate the difference between the set value in the calibration type information and the test result; when the difference calculation result is greater than a preset threshold, the sensor to be calibrated determines that the calibration result is Calibration fails; when the difference calculation result is less than a preset threshold, the sensor to be calibrated determines that the calibration result is a calibration success.
  • the processor sends the calibration data to the running test interface, so that the sensor to be calibrated obtains calibration data from the running test interface, and the sensor to be calibrated is calibrated according to the acquired calibration data.
  • the sensor to be calibrated completes the calibration operation according to the calibration data, it performs measurement again to obtain a test result, and then the sensor to be calibrated sends the test result to the processor through the running test interface.
  • the processor performs a difference calculation between the set value in the calibration type information and the test result, and if the difference calculation result is greater than a preset threshold, the processor determines that the calibration result is a calibration failure, and if the difference calculation result When the value is less than the preset threshold, the processor determines that the calibration result is a successful calibration.
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • the processor is further configured to transmit the calibration data and calibration results to the calibration application program for display.
  • the processor After the processor obtains the calibration data and calibration results through the above method, it returns the calibration results and calibration data to the above native method through sns_ddf_smgr_notify_test_complete_with_data() and sns_ddf_smgr_notify_event(), that is, returns to the application interface of the calibration application .
  • the invention solves the problem that the sensor to be calibrated cannot be automatically calibrated under the electronic equipment system platform, and can calibrate the sensor to be calibrated based on the calibration data obtained by simple calculation, so that the sensor to be calibrated can have a better use effect after the calibration is successful. better, providing a better experience for users.
  • the calibration application can display the calibration data and calibration results corresponding to the sensor to be calibrated through the provided human-computer interaction interface, which is conducive to intuitive and convenient viewing of the calibration status of the sensor to be calibrated, and then decides whether to re-initiate a new calibration. checked.
  • the disclosed apparatus/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, for example, multiple Units or components may be combined or integrated into another system, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

一种校准方法,包括:(S100)建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将校准应用程序、待校准传感器分别与处理器建立连接;(S200)校准应用程序触发运行测试接口启动校准线程以获取校准数据;(S300)处理器根据校准数据对待校准传感器进行校准,并从待校准传感器处获取对应的校准结果。简化传感器校准流程,并且提高传感器校准精度。还公开了一种电子设备。

Description

一种校准方法和电子设备 技术领域
本发明涉及数据处理技术领域,尤指一种校准方法和电子设备。
背景技术
传感器是电子产品中重要的元器件,而传感器通常都存在精度要求,所以在电子产品运行过程中需要时常进行校准传感器,以保证传感器的精度满足精度要求。
而不同电子产品(不同品牌、不同型号的)的结构设计不同,相应地,传感器在不同电子产品中的放置位置也存在差异,进而带来校准数据的差异。因而只要是具有不同结构设计的电子产品,即使包含的传感器是相同型号,也需要对应进行传感器校准。
现有技术只能进行简单的校准,由于电子产品中的待校准传感器与处理器是相互独立的,因此现有技术中对电子产品中待校准传感器的校准流程比较复杂,并且校准精度不高。
发明内容
本发明的目的是提供一种校准方法和电子设备,实现解决简化传感器校准流程,并且提高传感器校准精度的目的。
本发明提供的技术方案如下:
本发明提供一种校准方法,包括步骤:
建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
所述校准应用程序触发所述运行测试接口启动校准线程以获取校准数据;
处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
进一步的,所述校准应用程序触发所述运行测试接口启动校准线程,以获取校准数据包括步骤:
通过所述校准应用程序获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
所述校准应用程序通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
所述待校准传感器根据所述校准类型信息进行测量并得到测量数据,并传递所述测量数值至所述处理器;
所述处理器根据接收的测量数据得到对应的校准数据。
进一步的,所述处理器根据接收的测量数据生成对应的校准数据包括步骤:
所述处理器按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
所述处理器将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算;
所述处理器根据均值计算结果得到校准数据。
进一步的,所述处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果包括步骤:
所述处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器根据所述校准数据进行校准;
所述待校准传感器在完成校准操作后,再次进行测量得到测试结果, 传递所述测试结果至所述处理器;
所述处理器将所述校准类型信息中的设定数值与所述测试结果进行差值计算;
在差值计算结果大于预设阈值时,所述处理器确定所述校准结果为校准失败;
在差值计算结果小于预设阈值时,所述处理器确定所述校准结果为校准成功。
进一步的,处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果之后包括步骤:
所述处理器将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
本发明还提供一种电子设备,包括:校准应用程序、处理器和待校准传感器;
所述校准应用程序包括应用接口,待校准传感器包括运行测试接口;所述校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接;所述校准应用程序、待校准传感器分别与处理器连接;
所述校准应用程序,用于触发所述运行测试接口启动校准线程以获取校准数据;
所述处理器,用于根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
进一步的,所述校准应用程序包括:输入模块;所述待校准传感器包括测量模块;
输入模块,用于获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
所述应用接口,用于通过处理器将所述校准输入参数,传递到所述传 感器类型信息对应的运行测试接口;
所述测量模块,用于根据所述校准类型信息进行测量并得到测量数据;
所述运行测试接口,用于传递所述测量数值至所述处理器;
所述处理器,还用于根据接收的测量数据得到对应的校准数据。
进一步的,所述处理器包括:
获取模块,用于按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
计算模块,用于将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算,根据均值计算结果得到校准数据。
进一步的,所述处理器还包括:处理模块;
所述处理器,还用于发送所述校准数据至所述运行测试接口;
所述测量模块,还用于根据所述校准数据进行校准,并在完成校准操作后,再次进行测量得到测试结果;
所述运行测试接口,还用于传递所述测试结果至所述处理器;
所述处理模块,用于将所述校准类型信息中的设定数值与所述测试结果进行差值计算;在差值计算结果大于预设阈值时,所述待校准传感器确定所述校准结果为校准失败;在差值计算结果小于预设阈值时,所述待校准传感器确定所述校准结果为校准成功。
进一步的,所述处理器,还用于将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
通过本发明提供的一种校准方法和电子设备,能够简化传感器校准流程,并且提高传感器校准精度。
附图说明
下面将以明确易懂的方式,结合附图说明优选实施方式,对一种校准方法和电子设备的上述特性、技术特征、优点及其实现方式予以进一步说明。
图1是本发明一种校准方法的一个实施例的流程图;
图2是本发明一种校准方法的另一个实施例的流程图;
图3是本发明一种校准方法的另一个实施例的流程图;
图4是本发明一种校准方法的另一个实施例的流程图;
图5是本发明一种电子设备的一个实施例的结构示意图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其他实施例中也可以实现本申请。在其他情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所述描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其他特征、整体、步骤、操作、元素、组件和/或集合的存在或添加。
为使图面简洁,各图中只示意性地表示出了与本发明相关的部分,它们并不代表其作为产品的实际结构。另外,以使图面简洁便于理解,在有些图中具有相同结构或功能的部件,仅示意性地绘示了其中的一个,或仅标出了其中的一个。在本文中,“一个”不仅表示“仅此一个”,也可以表示“多于一个”的情形。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
另外,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对照附图说明本发明的具体实施方式。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,并获得其他的实施方式。
本发明的一个实施例,如图1所示,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
具体的,待校准传感器包括但是不限于陀螺仪、距离传感器、光传感器、激光雷达等等测距传感器,还包括温度传感器、压力传感器、湿度传感器、陀螺仪等等。运行测试接口是指待校准传感器的runtest接口。电子设备中包括处理器和待校准传感器,此外,电子设备可安装运行校准应用程序。这样,电子设备中的校准应用程序与处理器通过无线方式建立连接,待校准传感器与处理器通过有线或者无线方式建立连接,并且,校准应用程序的应用接口与待校准传感器的运行测试接口之间建立通信连接。
示例性的,待校准传感器使用了runtest接口与处理器(例如ADSP芯片)取得通讯连接,runtest接口包括sensor_open,sensor_write(),sensor_close()接口。
S200所述校准应用程序触发所述运行测试接口启动校准线程以获取校准数据;
S300处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
本发明自行提供一个校准应用程序,通过电子设备提供的应用接口,与待校准传感器的运行测试接口进行通讯联系,然后,电子设备在运行测 试接口下启动校准线程,通过运行测试接口获取待校准传感器在校准线程过程中进行测试得到的校准数据,然后,电子设备根据校准数据对待校准传感器进行校准并且获得待校准传感器对应的校准结果。
本发明的一个实施例,如图2所示,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
S210通过所述校准应用程序获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
具体的,本实施例是上述实施例的优化实施例,本实施例中与上述实施例相同的部分参见上述实施例,在此不再一一赘述。本发明需要定义校准类型,以及预先储存实现校准类型相应的流程和方法。例如:添加sns_ddf_test_e也就是校准类型信息的定义如下:
SNS_DDF_TEST_PS_25CM,/**<ps_25cm校准*/
SNS_DDF_TEST_PS_CROSS,/**<无障碍校准*/
S220所述校准应用程序通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
S230所述待校准传感器根据所述校准类型信息进行测量并得到测量数据,并传递所述测量数值至所述处理器;
S240所述处理器根据接收的测量数据得到对应的校准数据;
具体的,校准应用程序提供一个人机交互界面,用于获取校准输入参数以发起校准流程,传感器类型信息包括上述温度传感器、湿度传感器、测距传感器等。校准类型信息是根据传感器类型来设定的。例如,对于距离传感器而言,校准类型包括无障碍校准、距离10cm校准以及距离25cm校准等自定义校准(即设定测量参照物与电子设备之间的距离作为预设距离)。
通过所述校准应用程序获取到校准输入参数之后,校准应用程序把校准输 入参数传递给处理器,再由处理器根据传感器类型信息,将所述校准输入参数传递给对应传感器的运行测试接口。然后,待校准传感器根据所述校准类型信息对应的测试流程,控制自身进行测得到对应的测量数据,待校准传感器将所述测量数值发送给所述处理器。处理器根据接收的测量数据进行判断分析判断得到对应的校准数据。
例如,通过校准应用程序发起校准的方法为通过调用校准Native方法。校准Native方法:
a)该native方法需要获取的校准输入参数为:校准的传感器类型信息(光传感器,距离传感器等),校准类型信息(自定义,如距离25cm校准,无障碍校准)。
b)该native方法使用了sensor_open,sensor_write(),sensor_close()接口与处理器建立通讯,进而将上层的校准应用程序发下来的校准输入参数,也就是校准应用程序获取的校准输入参数传递到具体待校准传感器所对应的runtest接口处。
S300处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
本发明的一个实施例,如图3所示,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
S210通过所述校准应用程序获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
S220所述校准应用程序通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
S230所述待校准传感器根据所述校准类型信息进行测量并得到测量数据,并传递所述测量数值至所述处理器;
S241所述处理器按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
S242所述处理器将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算;
S243所述处理器根据均值计算结果得到校准数据;
具体的,本实施例是上述实施例的优化实施例,本实施例中与上述实施例相同的部分参见上述实施例,在此不再一一赘述。由于处理器通过校准应用程序获取到校准输入参数,因此处理器能够知道需要进行什么类型的校准,校准的传感器类型。并且,处理器还可以启动线程获取待校准传感器的测量数据,根据测量数据对待校准传感器进行相应的校准。然后,处理器按照预设时间间隔(例如5s或者10s)周期性,通过所述运行测试接口从待校准传感器处获取到测量数据,处理器将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算,进而根据均值计算结果得到校准数据。
示例性的,处理器实现对应待校准传感器例如距离传感器,选择的校准类型为SNS_DDF_TEST_PS_25CM(即上述实施例中的距离25cm校准)的简单流程如下:处理器开启线程间隔周期性获取距离传感器的距离值(即本发明测量数据的一种),将距离值去除最大值和最小值,然后,处理器将其他距离值进行取平均值计算,根据距离平均值与25cm进行比较,根据比较结果就可以得到对应的校准数据。
S300处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
本发明的一个实施例,如图4所示,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
S200所述校准应用程序触发所述运行测试接口启动校准线程,以获取校准数据;
S310所述处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器根据所述校准数据进行校准;
S320所述待校准传感器在完成校准操作后,再次进行测量得到测试结果,传递所述测试结果至所述处理器;
S330所述处理器将所述校准类型信息中的设定数值与所述测试结果进行差值计算;
S340在差值计算结果大于预设阈值时,所述处理器确定所述校准结果为校准失败;
S350在差值计算结果小于预设阈值时,所述处理器确定所述校准结果为校准成功。
具体的,本实施例是上述实施例的优化实施例,本实施例中与上述实施例相同的部分参见上述实施例,在此不再一一赘述。处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器从运行测试接口处获取校准数据,并且待校准传感器根据获取到的校准数据进行校准。待校准传感器在根据校准数据完成校准操作后,再次进行测量得到测试结果,然后,待校准传感器通过运行测试接口将测试结果发送给处理器。处理器将所述校准类型信息中的设定 数值与所述测试结果进行差值计算,如果差值计算结果大于预设阈值时,处理器确定所述校准结果为校准失败,如果差值计算结果小于预设阈值时,处理器确定所述校准结果为校准成功。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
本发明的一个实施例,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
S200所述校准应用程序触发所述运行测试接口启动校准线程,以获取校准数据;
S300处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果;
S400所述处理器将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
具体的,本实施例是上述实施例的优化实施例,本实施例中与上述实施例相同的部分参见上述实施例,在此不再一一赘述。处理器将获取的校准结果和校准数据,通过sns_ddf_smgr_notify_test_complete_with_data(),以及sns_ddf_smgr_notify_event()返回到上述native方法中,也就是返回到校准应用程序的应用接口。本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。而且,校准应用程序可以通过所提供的人机交互界面进 行显示待校准传感器对应的校准数据和校准结果,有利于直观、方便查看待校准传感器的校准情况,进而决定是否重新发起新的校准,简化了查阅。
本发明的一个实施例,一种校准方法,包括:
S100建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
S200所述校准应用程序触发所述运行测试接口启动校准线程,以获取校准数据;
S310所述处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器根据所述校准数据进行校准;
S320所述待校准传感器在完成校准操作后,再次进行测量得到测试结果,传递所述测试结果至所述处理器;
S330所述处理器将所述校准类型信息中的设定数值与所述测试结果进行差值计算;
S340在差值计算结果大于预设阈值时,所述处理器确定所述校准结果为校准失败;
S350在差值计算结果小于预设阈值时,所述处理器确定所述校准结果为校准成功;
S400所述处理器将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
具体的,本实施例是上述实施例的优化实施例,本实施例中与上述实施例相同的部分参见上述实施例,在此不再一一赘述。
示例性的,通过在所述电子设备下载安装一校准应用程序,再提供具有测量参照物(例如挡板、手等),进而通过距离传感器检测电子设备与测量参照物之间的距离值,由处理器根据距离值及所述预设距离计算得到校准数据,从而将所述校准数据写入所述电子设备,将校准方法加入每台电子设备测试或制 造过程,能够无需外围设备的情况下自动检测校准,成本低效率高。
本发明自行实现了距离传感器校准应用程序,以及通过高通平台提供的接口,与测距传感器的runtest接口进行通讯联系,然后通过runtest接口启动校准线程,对距离传感器进行无障碍校准和25CM校准。
示例性的,通过在所述电子设备下载安装一校准应用程序,再提供具有所述预设光强值且对应照射所述光传感器的测试光源,进而通过光传感器检测其被测试光源照射时光照强度,由处理器根据光照强度及所述预设光强值计算得到校准数据,从而将所述校准数据写入所述电子设备,将校准方法加入每台电子设备测试或制造过程,能够无需外围设备的情况下自动检测校准,成本低效率高。
本发明的一个实施例,一种电子设备,如图5所示,包括:校准应用程序、处理器和待校准传感器;
所述校准应用程序包括应用接口,待校准传感器包括运行测试接口;所述校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接;所述校准应用程序、待校准传感器分别与处理器连接;
所述校准应用程序,用于触发所述运行测试接口启动校准线程以获取校准数据;
所述处理器,用于根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
具体的,待校准传感器包括但是不限于陀螺仪、距离传感器、光传感器、激光雷达等等测距传感器,还包括温度传感器、压力传感器、湿度传感器、陀螺仪等等。运行测试接口是指待校准传感器的runtest接口。电子设备中包括处理器和待校准传感器,此外,电子设备可安装运行校准应用程序。这样,电子设备中的校准应用程序与处理器通过无线方式建立连接,待校准传感器与处理器通过有线或者无线方式建立连接,并且,校准应用程序的应用接口与待 校准传感器的运行测试接口之间建立通信连接。
示例性的,待校准传感器使用了runtest接口与处理器(例如ADSP芯片)取得通讯连接,runtest接口包括sensor_open,sensor_write(),sensor_close()接口。
本发明自行提供一个校准应用程序,通过电子设备提供的应用接口,与待校准传感器的运行测试接口进行通讯联系,然后,电子设备在运行测试接口下启动校准线程,通过运行测试接口获取待校准传感器在校准线程过程中进行测试得到的校准数据,然后,电子设备根据校准数据对待校准传感器进行校准并且获得待校准传感器对应的校准结果。
基于前述实施例,所述校准应用程序包括:输入模块;所述待校准传感器包括测量模块;
输入模块,用于获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
所述应用接口,用于通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
所述测量模块,用于根据所述校准类型信息进行测量并得到测量数据;
所述运行测试接口,用于传递所述测量数值至所述处理器;
所述处理器,还用于根据接收的测量数据得到对应的校准数据。
具体的,本发明需要定义校准类型,以及预先储存实现校准类型相应的流程和方法。例如:添加sns_ddf_test_e也就是校准类型信息的定义如下:
SNS_DDF_TEST_PS_25CM,/**<ps_25cm校准*/
SNS_DDF_TEST_PS_CROSS,/**<无障碍校准*/
校准应用程序提供一个人机交互界面,用于获取校准输入参数以发起校准流程,传感器类型信息包括上述温度传感器、湿度传感器、测距传感器等。校 准类型信息是根据传感器类型来设定的。例如,对于距离传感器而言,校准类型包括无障碍校准、距离10cm校准以及距离25cm校准等自定义校准(即设定测量参照物与电子设备之间的距离作为预设距离)。
通过所述校准应用程序获取到校准输入参数之后,校准应用程序把校准输入参数传递给处理器,再由处理器根据传感器类型信息,将所述校准输入参数传递给对应传感器的运行测试接口。然后,待校准传感器根据所述校准类型信息对应的测试流程,控制自身进行测得到对应的测量数据,待校准传感器将所述测量数值发送给所述处理器。处理器根据接收的测量数据进行判断分析判断得到对应的校准数据。
例如,通过校准应用程序发起校准的方法为通过调用校准Native方法。校准Native方法:
a)该native方法需要获取的校准输入参数为:校准的传感器类型信息(光传感器,距离传感器等),校准类型信息(自定义,如距离25cm校准,无障碍校准)。
b)该native方法使用了sensor_open,sensor_write(),sensor_close()接口与处理器建立通讯,进而将上层的校准应用程序发下来的校准输入参数,也就是校准应用程序获取的校准输入参数传递到具体待校准传感器所对应的runtest接口处。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
基于前述实施例,所述处理器包括:
获取模块,用于按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
计算模块,用于将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算,根据均值计算结果得到校准数据。
具体的,由于处理器通过校准应用程序获取到校准输入参数,因此处理器能够知道需要进行什么类型的校准,校准的传感器类型。并且,处理器还可以启动线程获取待校准传感器的测量数据,根据测量数据对待校准传感器进行相应的校准。然后,处理器按照预设时间间隔(例如5s或者10s)周期性,通过所述运行测试接口从待校准传感器处获取到测量数据,处理器将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算,进而根据均值计算结果得到校准数据。
示例性的,处理器实现对应待校准传感器例如距离传感器,选择的校准类型为SNS_DDF_TEST_PS_25CM(即上述实施例中的距离25cm校准)的简单流程如下:处理器开启线程间隔周期性获取距离传感器的距离值(即本发明测量数据的一种),将距离值去除最大值和最小值,然后,处理器将其他距离值进行取平均值计算,根据距离平均值与25cm进行比较,根据比较结果就可以得到对应的校准数据。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
基于前述实施例,所述处理器还包括:处理模块;
所述处理器,还用于发送所述校准数据至所述运行测试接口;
所述测量模块,还用于根据所述校准数据进行校准,并在完成校准操作后,再次进行测量得到测试结果;
所述运行测试接口,还用于传递所述测试结果至所述处理器;
所述处理模块,用于将所述校准类型信息中的设定数值与所述测试结 果进行差值计算;在差值计算结果大于预设阈值时,所述待校准传感器确定所述校准结果为校准失败;在差值计算结果小于预设阈值时,所述待校准传感器确定所述校准结果为校准成功。
具体的,处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器从运行测试接口处获取校准数据,并且待校准传感器根据获取到的校准数据进行校准。待校准传感器在根据校准数据完成校准操作后,再次进行测量得到测试结果,然后,待校准传感器通过运行测试接口将测试结果发送给处理器。处理器将所述校准类型信息中的设定数值与所述测试结果进行差值计算,如果差值计算结果大于预设阈值时,处理器确定所述校准结果为校准失败,如果差值计算结果小于预设阈值时,处理器确定所述校准结果为校准成功。
本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。
基于前述实施例,所述处理器,还用于将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
具体的,处理器通过上述方式获取到将校准数据和校准结果后,将校准结果和校准数据通过sns_ddf_smgr_notify_test_complete_with_data(),以及sns_ddf_smgr_notify_event()返回到上述native方法中,也就是返回到校准应用程序的应用接口。本发明解决了电子设备系统平台下无法自动化对待校准传感器进行校准的问题,能基于简单的计算得到的校准数据,对待校准传感器进行校准,使待校准传感器在校准成功后的使用效果更佳,性能更佳,从而为用户提供更好的体验。而且,校准应用程序可以通过所提供的人机交互界面进行显示待校准传感器对应的校准数据和校准结果,有利于直观、方便查看待校准传感器的校准情况,进而决定是否重新发起新的校准,简化了查阅。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的程序模块完成,即将所述装置的内部结构划分成不同的程序单元或模块,以完成以上描述的全部或者部分功能。实施例中的各程序模块可以集成在一个处理单元中,也可是各个单元单独物理存在,也可以两个或两个以上单元集成在一个处理单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序单元的形式实现。另外,各程序模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。
它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述或记载的部分,可以参见其他实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其他的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过 一些接口,装置或单元的间接耦合或通讯连接,可以是电性、机械或其他的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可能集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
应当说明的是,上述实施例均可根据需要自由组合。以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (10)

  1. 一种校准方法,包括步骤:
    建立校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接,并将所述校准应用程序、待校准传感器分别与处理器建立连接;
    所述校准应用程序触发所述运行测试接口启动校准线程以获取校准数据;
    处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
  2. 根据权利要求1所述的校准方法,所述校准应用程序触发所述运行测试接口启动校准线程,以获取校准数据包括步骤:
    通过所述校准应用程序获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
    所述校准应用程序通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
    所述待校准传感器根据所述校准类型信息进行测量并得到测量数据,并传递所述测量数值至所述处理器;
    所述处理器根据接收的测量数据得到对应的校准数据。
  3. 根据权利要求2所述的校准方法,所述处理器根据接收的测量数据生成对应的校准数据包括步骤:
    所述处理器按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
    所述处理器将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算;
    所述处理器根据均值计算结果得到校准数据。
  4. 根据权利要求1所述的校准方法,所述处理器根据所述校准数据对所 述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果包括步骤:
    所述处理器发送所述校准数据至所述运行测试接口,使得所述待校准传感器根据所述校准数据进行校准;
    所述待校准传感器在完成校准操作后,再次进行测量得到测试结果,传递所述测试结果至所述处理器;
    所述处理器将所述校准类型信息中的设定数值与所述测试结果进行差值计算;
    在差值计算结果大于预设阈值时,所述处理器确定所述校准结果为校准失败;
    在差值计算结果小于预设阈值时,所述处理器确定所述校准结果为校准成功。
  5. 根据权利要求1-4任一项所述的校准方法,处理器根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果之后包括步骤:
    所述处理器将所述校准数据和校准结果,传递至所述校准应用程序以进行显示。
  6. 一种电子设备,包括:校准应用程序、处理器和待校准传感器;
    所述校准应用程序包括应用接口,待校准传感器包括运行测试接口;所述校准应用程序的应用接口与待校准传感器的运行测试接口之间的通信连接;所述校准应用程序、待校准传感器分别与处理器连接;
    所述校准应用程序,用于触发所述运行测试接口启动校准线程以获取校准数据;
    所述处理器,用于根据所述校准数据对所述待校准传感器进行校准,并从所述待校准传感器处获取对应的校准结果。
  7. 根据权利要求6所述的电子设备,所述校准应用程序包括:输入模块;所述待校准传感器包括测量模块;
    输入模块,用于获取校准输入参数;所述校准输入参数包括传感器类型信息以及校准类型信息;
    所述应用接口,用于通过处理器将所述校准输入参数,传递到所述传感器类型信息对应的运行测试接口;
    所述测量模块,用于根据所述校准类型信息进行测量并得到测量数据;
    所述运行测试接口,用于传递所述测量数值至所述处理器;
    所述处理器,还用于根据接收的测量数据得到对应的校准数据。
  8. 根据权利要求7所述的电子设备,所述处理器包括:
    获取模块,用于按照预设时间间隔周期性,通过所述运行测试接口获取所述测量数据;
    计算模块,用于将所述测量数据中的最大值和最小值删除,对剩余的测量数据进行均值计算,根据均值计算结果得到校准数据。
  9. 根据权利要求7所述的电子设备,所述处理器还包括:处理模块;
    所述处理器,还用于发送所述校准数据至所述运行测试接口;
    所述测量模块,还用于根据所述校准数据进行校准,并在完成校准操作后,再次进行测量得到测试结果;
    所述运行测试接口,还用于传递所述测试结果至所述处理器;
    所述处理模块,用于将所述校准类型信息中的设定数值与所述测试结果进行差值计算;在差值计算结果大于预设阈值时,所述待校准传感器确定所述校准结果为校准失败;在差值计算结果小于预设阈值时,所述待校准传感器确定所述校准结果为校准成功。
  10. 根据权利要求6-9任一项所述的电子设备,其特征在于:
    所述处理器,还用于将所述校准数据和校准结果,传递至所述校准应用 程序以进行显示。
PCT/CN2021/103680 2021-06-30 2021-06-30 一种校准方法和电子设备 WO2023272603A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/103680 WO2023272603A1 (zh) 2021-06-30 2021-06-30 一种校准方法和电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/103680 WO2023272603A1 (zh) 2021-06-30 2021-06-30 一种校准方法和电子设备

Publications (1)

Publication Number Publication Date
WO2023272603A1 true WO2023272603A1 (zh) 2023-01-05

Family

ID=84692155

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103680 WO2023272603A1 (zh) 2021-06-30 2021-06-30 一种校准方法和电子设备

Country Status (1)

Country Link
WO (1) WO2023272603A1 (zh)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016061762A (ja) * 2014-09-22 2016-04-25 カシオ計算機株式会社 電子機器及びセンサ較正方法、センサ較正プログラム
CN106302912A (zh) * 2016-08-17 2017-01-04 青岛海信移动通信技术股份有限公司 移动终端中校准光感特性曲线的方法及移动终端
CN107219515A (zh) * 2017-05-25 2017-09-29 深圳市金立通信设备有限公司 一种距离传感器的参数校准方法及终端
CN107290802A (zh) * 2017-07-18 2017-10-24 广东欧珀移动通信有限公司 接近传感器校准方法、接近传感器校准装置及智能终端
CN107339961A (zh) * 2016-12-20 2017-11-10 北京小米移动软件有限公司 校准距离传感器的方法及装置、电子设备
CN110361042A (zh) * 2019-07-25 2019-10-22 深圳中物兴华科技发展有限公司 一种温湿度监测装置自动计量检定方法及系统
CN110851313A (zh) * 2019-11-14 2020-02-28 东莞市小精灵教育软件有限公司 一种传感器调试方法、智能终端、存储介质及电子设备
CN111307195A (zh) * 2020-03-11 2020-06-19 深圳市创维电器科技有限公司 传感器通用校准方法、装置、设备和计算机可读存储介质
CN111504513A (zh) * 2020-04-23 2020-08-07 中国计量科学研究院 一种基于智能移动终端的数字显示温度计的校准方法
CN111537014A (zh) * 2020-05-28 2020-08-14 广州视源电子科技股份有限公司 一种温湿度校准方法、装置、设备和存储介质
CN112557876A (zh) * 2020-12-10 2021-03-26 苏州英嘉通半导体有限公司 一种用于芯片模拟参数校准的装置及其测试方法

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016061762A (ja) * 2014-09-22 2016-04-25 カシオ計算機株式会社 電子機器及びセンサ較正方法、センサ較正プログラム
CN106302912A (zh) * 2016-08-17 2017-01-04 青岛海信移动通信技术股份有限公司 移动终端中校准光感特性曲线的方法及移动终端
CN107339961A (zh) * 2016-12-20 2017-11-10 北京小米移动软件有限公司 校准距离传感器的方法及装置、电子设备
CN107219515A (zh) * 2017-05-25 2017-09-29 深圳市金立通信设备有限公司 一种距离传感器的参数校准方法及终端
CN107290802A (zh) * 2017-07-18 2017-10-24 广东欧珀移动通信有限公司 接近传感器校准方法、接近传感器校准装置及智能终端
CN110361042A (zh) * 2019-07-25 2019-10-22 深圳中物兴华科技发展有限公司 一种温湿度监测装置自动计量检定方法及系统
CN110851313A (zh) * 2019-11-14 2020-02-28 东莞市小精灵教育软件有限公司 一种传感器调试方法、智能终端、存储介质及电子设备
CN111307195A (zh) * 2020-03-11 2020-06-19 深圳市创维电器科技有限公司 传感器通用校准方法、装置、设备和计算机可读存储介质
CN111504513A (zh) * 2020-04-23 2020-08-07 中国计量科学研究院 一种基于智能移动终端的数字显示温度计的校准方法
CN111537014A (zh) * 2020-05-28 2020-08-14 广州视源电子科技股份有限公司 一种温湿度校准方法、装置、设备和存储介质
CN112557876A (zh) * 2020-12-10 2021-03-26 苏州英嘉通半导体有限公司 一种用于芯片模拟参数校准的装置及其测试方法

Similar Documents

Publication Publication Date Title
EP3697035B1 (en) Link priority configuration method and device
CN106094055B (zh) 一种接近传感器的校准方法及终端
US11696159B2 (en) Method, apparatus, and non-transitory computer readable medium for testing terminals
WO2017092459A1 (zh) 片上系统soc的监控方法、装置和计算机存储介质
CN115048613A (zh) 一种指标同质化换算方法、装置、电子设备及存储介质
WO2023272603A1 (zh) 一种校准方法和电子设备
CN111693294A (zh) 车辆检测方法、装置、终端设备及存储介质
CN113447064B (zh) 一种校准方法和电子设备
CN112782983B (zh) 基于自学习的高温预警阈值的设置方法和系统
US20220163939A1 (en) Master device, arithmetic processing device, programmable logic controller, network, and information processing method
CN115951973B (zh) 模型处理方法、装置、终端设备及存储介质
CN106932004B (zh) 一种传感器的检测方法及装置
CN108877875B (zh) 生理传感器装置、方法及系统
KR20130094484A (ko) 의료기기 관리 시스템 및 방법
TW201715397A (zh) 基板管理控制器狀態偵測系統及方法
CN115454896A (zh) 基于smbus的ssd mctp控制消息验证方法、装置、计算机设备及存储介质
KR102266491B1 (ko) 센서 인증 기반 데이터 수집 시스템
JP6503984B2 (ja) 発信機検出システム、サーバ、発信機検出方法、及びプログラム
CN114267453A (zh) Ercp术后胰腺炎的风险评估方法、装置及存储介质
CN113900872A (zh) 一种硬件故障检测系统、方法及介质
CN110353637A (zh) 数据处理方法、装置及体温检测系统
CN108226097A (zh) 凝血快速测试装置
CN108956093A (zh) 红外散射装置的检测方法和移动终端
TWI815255B (zh) 轉接板的偵測方法
WO2021100896A1 (ko) 센서 인증 기반 데이터 수집 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21947557

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21947557

Country of ref document: EP

Kind code of ref document: A1