Optical sensor calibration method and device, electronic equipment and storage medium
By automatically adjusting the transmitting power of the optical sensor to ensure that the receiving power meets preset conditions, the problem of low calibration efficiency of optical sensors is solved, and an efficient and accurate calibration process is achieved.
Patent Information
- Application Number
- CN202511252240.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-01-06
AI Technical Summary
Current optical sensor calibration technology is inefficient, requiring manual adjustment one by one, which is time-consuming and labor-intensive, resulting in cumbersome operation and extremely low efficiency.
By acquiring the adjustable power range of the transmitter and the target received power value of the receiver, the transmitter power is automatically adjusted so that the received power value of the receiver meets the preset calibration conditions, the target calibration power value is determined, and the calibration is completed.
It enables automatic calibration of optical sensors, improves calibration efficiency, reduces manual operation intensity, and significantly enhances calibration accuracy and consistency.
Smart Images

Figure CN121283533A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor calibration, and more particularly to an optical sensor calibration method and apparatus, electronic equipment and storage medium. Background Technology
[0002] A whole blood component separator is a device used for blood separation, separating components such as plasma and red blood cells. During blood separation, liquid or gaseous media flow within the device's pipes. To accurately detect the flow rate of these media, optical sensors are typically installed in the whole blood component separator to monitor the flow. Optical sensors are devices used to detect the transmittance of the tubing, often used to determine the type of substance within the tubing. For example, they can detect whether the medium flowing through the blood bag tubing is air, plasma, red blood cells, or another medium.
[0003] Before a whole blood component separator can be used, its optical sensors need to be calibrated. This can happen after the separator is assembled into a complete unit or during after-sales maintenance. Currently, the common calibration method requires manual adjustment of each sensor individually. However, manual calibration is not only tedious but also time-consuming and labor-intensive, resulting in extremely low calibration efficiency. Therefore, improving the calibration efficiency of optical sensors has become an urgent problem to be solved. Summary of the Invention
[0004] The main objective of this application is to provide an optical sensor calibration method, apparatus, electronic device, and storage medium, which aims to improve the calibration efficiency of optical sensors.
[0005] To achieve the above objectives, a first aspect of this application provides an optical sensor calibration method applied to an optical sensor having a transmitter and a receiver, the method comprising:
[0006] Obtain the adjustable power range of the transmitting end;
[0007] Obtain the target received power value of the receiving end;
[0008] The transmit power of the transmitter is adjusted based on the adjustable power range so that the receive power value of the receiver and the target receive power value meet the preset calibration conditions, thereby obtaining the target calibration power value.
[0009] The transmitter is calibrated according to the target calibration power value.
[0010] In some embodiments, adjusting the transmit power of the transmitter based on the adjustable power range so that the receive power value of the receiver and the target receive power value meet preset calibration conditions to obtain the target calibration power value includes:
[0011] The median value is calculated based on the adjustable power range to determine the initial transmission power value;
[0012] The transmitter power is adjusted according to the initial transmitter power value, and the receiver determines whether the preset calibration conditions are met to obtain the calibration result.
[0013] If the calibration result does not meet the preset calibration conditions, the adjustable power range is updated based on the initial transmit power value, the calibration result, and the target receive power value. The updated adjustable power range is then used as the adjustable power range. The process of calculating the median based on the adjustable power range is then returned to execute to determine the initial transmit power value.
[0014] If the calibration result indicates that it meets the preset calibration conditions, the constraint power range is obtained, and the target calibration power value is determined based on the constraint power range and the initial transmission power value.
[0015] In some embodiments, the calibration result includes a preliminary received power value, and updating the adjustable power range based on the preliminary transmit power value, the calibration result, and the target received power value includes:
[0016] If the initial received power value is greater than the target received power value, the maximum transmitted power value is updated based on the initial transmitted power value, and the adjustable power range is updated by the power range formed by the updated maximum transmitted power value and the minimum transmitted power value.
[0017] If the initial received power value is less than the target received power value, the minimum transmitted power value is updated based on the initial transmitted power value, and the adjustable power range is updated by the power range formed by the updated minimum transmitted power value and the maximum transmitted power value.
[0018] In some embodiments, adjusting the transmission power of the transmitting end based on the initial transmission power value, and determining whether the preset calibration conditions are met by the receiving end to obtain the calibration result, includes:
[0019] The transmission power of the transmitting end is adjusted according to the initial transmission power value;
[0020] Obtain the initial received power value of the receiving end;
[0021] The calibration result is determined based on the preliminary received power value, the target received power value, and the preset calibration conditions.
[0022] In some embodiments, the preset calibration conditions include an upper limit and a lower limit of the difference. Determining the calibration result based on the preliminary received power value, the target received power value, and the preset calibration conditions includes:
[0023] Calculate the difference between the preliminary received power value and the target received power value to obtain the power value difference;
[0024] If the power value difference is less than the upper limit of the difference and the power value difference is greater than the lower limit of the difference, the calibration result is determined to meet the preset calibration conditions.
[0025] In some embodiments, the constrained power range includes an upper constraint limit and a lower constraint limit, and the step of determining the target calibration power value based on the constrained power range and the preliminary transmit power value includes:
[0026] If the initial transmit power value is less than the upper constraint limit and the initial transmit power value is greater than the lower constraint limit, the target calibration power value is determined to be the initial transmit power value.
[0027] If the initial transmit power value is greater than or equal to the upper limit of the constraint, or if the initial transmit power value is less than or equal to the lower limit of the constraint, a preset error message will be output.
[0028] In some embodiments, after determining the target calibration power value as the preliminary transmit power value, the method further includes:
[0029] Obtain multiple preset power adjustment values;
[0030] The target calibration power value is adjusted according to each of the power adjustment values to obtain a plurality of alternative calibration power values; wherein the alternative calibration power values are within the constrained power range;
[0031] The transmitting power of the transmitting end is adjusted according to each of the alternative calibration power values, and the receiving power value of the receiving end is obtained to obtain the alternative receiving power value.
[0032] The alternative calibration power value corresponding to the alternative received power value with the smallest deviation from the target received power value is obtained as the target calibration power value.
[0033] To achieve the above objectives, a second aspect of this application provides an optical sensor calibration device for use with an optical sensor having a transmitter and a receiver. The device includes:
[0034] The first acquisition module is used to acquire the adjustable power range of the transmitting end;
[0035] The second acquisition module is used to acquire the target received power value of the receiving end;
[0036] The adjustment module is used to adjust the transmission power of the transmitter based on the adjustable power range, so that the received power value of the receiver and the target received power value meet the preset calibration conditions, and obtain the target calibration power value;
[0037] A calibration module is used to calibrate the transmitter according to the target calibration power value.
[0038] To achieve the above objectives, a third aspect of the present application provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.
[0039] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0040] This application proposes an optical sensor calibration method, apparatus, electronic device, and storage medium. It obtains the adjustable power range of the transmitter; obtains the target received power value of the receiver; adjusts the transmitter's transmission power based on the adjustable power range so that the receiver's received power value and the target received power value meet preset calibration conditions, obtaining a target calibration power value; and calibrates the transmitter based on the target calibration power value. Thus, this application's embodiment automatically adjusts the transmitter's transmission power based on the adjustable power range and the receiver's target received power value, ensuring the receiver's received power meets preset calibration conditions, obtaining the target calibration power value, and finally completing the automatic calibration of the transmitter based on this target calibration power value. This eliminates the tedious manual adjustment and repeated confirmation of numerous optical sensors, effectively improving the calibration efficiency of optical sensors, significantly reducing manual operation intensity, and improving calibration accuracy. Attached Figure Description
[0041] Figure 1 This is a flowchart of the optical sensor calibration method provided in the embodiments of this application;
[0042] Figure 2 yes Figure 1 The flowchart of step S103 in the process;
[0043] Figure 3 yes Figure 2 The flowchart of step S202 in the document;
[0044] Figure 4 yes Figure 3 The flowchart of step S303 in the process;
[0045] Figure 5 yes Figure 2 The flowchart of step S203 in the process;
[0046] Figure 6 yes Figure 2 The flowchart of step S204 in the process;
[0047] Figure 7 This is a flowchart of an optical sensor calibration method provided in another embodiment of this application;
[0048] Figure 8 This is a schematic diagram of the optical sensor calibration device provided in the embodiments of this application;
[0049] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0053] A whole blood component separator is a device used for blood separation, separating components such as plasma and red blood cells. During blood separation, liquid or gaseous media flow within the device's pipes. To accurately detect the flow rate of these media, optical sensors are typically installed in the whole blood component separator to monitor the flow. Optical sensors are devices used to detect the transmittance of the tubing, often used to determine the type of substance within the tubing. For example, they can detect whether the medium flowing through the blood bag tubing is air, plasma, red blood cells, or another medium.
[0054] Before a whole blood component separator can be used, its optical sensors need to be calibrated. This can happen after the separator is assembled into a complete unit or during after-sales maintenance. Currently, the common calibration method requires manual adjustment of each sensor individually. However, manual calibration is not only tedious but also time-consuming and labor-intensive, resulting in extremely low calibration efficiency. Therefore, improving the calibration efficiency of optical sensors has become an urgent problem to be solved.
[0055] Based on this, embodiments of this application provide an optical sensor calibration method and apparatus, electronic device and storage medium, aiming to improve the calibration efficiency of optical sensors.
[0056] This application provides an optical sensor calibration method, apparatus, electronic device, and storage medium, which are specifically described through the following embodiments. First, the optical sensor calibration method in this application is described.
[0057] The optical sensor calibration method provided in this application relates to the field of sensor calibration. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the optical sensor calibration method, but is not limited to the above forms.
[0058] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0059] Figure 1 This is an optional flowchart of the optical sensor calibration method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.
[0060] Step S101: Obtain the adjustable power range of the transmitter;
[0061] Step S102: Obtain the target received power value at the receiving end;
[0062] Step S103: Adjust the transmit power of the transmitter based on the adjustable power range so that the receive power value of the receiver and the target receive power value meet the preset calibration conditions, and obtain the target calibration power value.
[0063] Step S104: Calibrate the transmitter according to the target calibration power value.
[0064] Steps S101 to S104 of this embodiment involve obtaining the adjustable power range of the transmitter; obtaining the target received power value of the receiver; adjusting the transmitter power based on the adjustable power range so that the received power value of the receiver and the target received power value meet preset calibration conditions to obtain the target calibration power value; and calibrating the transmitter based on the target calibration power value. Thus, this embodiment automatically adjusts the transmitter power based on the adjustable power range and the target received power value of the receiver to achieve the preset calibration conditions, thereby obtaining the target calibration power value. Finally, it completes the automatic calibration of the transmitter based on this target calibration power value. This eliminates the tedious manual adjustment and repeated confirmation of numerous optical sensors, effectively improving the calibration efficiency of optical sensors, significantly reducing manual operation intensity, and improving calibration accuracy.
[0065] In step S101 of some embodiments, the optical sensor is a device used to detect the transmittance of a pipeline, determining the type of medium within the pipeline by measuring the intensity of the light signal transmitted through it. For example, in a blood separation method, the optical sensor can be used to identify whether the substance flowing through the blood separation pipeline is air, plasma, or red blood cells. The optical sensor includes a transmitter and a receiver; the transmitter emits a light signal of a certain power, and the receiver receives the light signal transmitted through the pipeline. The adjustable power range is the range of power values that the transmitter can adjust during actual calibration, such as 0-800 ohms.
[0066] In step S102 of some embodiments, the target received power value is the light signal intensity that the optical sensor needs to achieve under normal operating conditions. For example, in the blood separation process, the target received power value is usually set to a fixed reference value, such as 2000, to represent the ideal light intensity that the receiver should achieve after the light signal from the transmitter passes through the tube. This target received power value serves as a reference during calibration. By adjusting the transmitter's transmission power, the actual light intensity measured by the receiver is made as close as possible to the target received power value, ensuring that the optical sensor can accurately and stably identify air, plasma, and red blood cells in the tube, thus guaranteeing the accuracy and reliability of the blood separation process.
[0067] Please see Figure 2 In some embodiments, step S103, "adjusting the transmit power of the transmitter based on the adjustable power range so that the receive power value of the receiver and the target receive power value meet the preset calibration conditions, and obtaining the target calibration power value," may include, but is not limited to, steps S201 to S204:
[0068] Step S201: Calculate the median value based on the adjustable power range to determine the initial transmit power value;
[0069] Step S202: Adjust the transmission power of the transmitter according to the initial transmission power value, and determine whether the preset calibration conditions are met by the receiver to obtain the calibration result;
[0070] Step S203: If the calibration result does not meet the preset calibration conditions, update the adjustable power range based on the initial transmit power value, calibration result and target receive power value, and use the updated adjustable power range as the adjustable power range. Return to execute the median calculation based on the adjustable power range to determine the initial transmit power value.
[0071] Step S204: If the calibration result meets the preset calibration conditions, obtain the constraint power range, and determine the target calibration power value based on the constraint power range and the initial transmission power value.
[0072] Steps S201 to S204 of the embodiments of this application calculate a preliminary transmit power value through the adjustable power range of the transmitter. Based on the preliminary transmit power value and the preliminary receive power value actually detected by the receiver, combined with the preset target receive power value, it is determined whether the preset calibration conditions are met. If the conditions are not met, the adjustable power range is updated and recalculated until the preset calibration conditions are met. Then, the preliminary transmit power value that meets the conditions is further judged according to the constrained power range, so as to finally determine the target calibration power value. Therefore, this application can automatically and accurately determine the power that the transmitter needs to adjust, avoiding the inefficiency and calibration deviation caused by manual repeated adjustments, and improving the calibration efficiency and accuracy of optical sensors.
[0073] In step S201 of some embodiments, during the optical sensor calibration process, based on the adjustable power range of the optical sensor transmitter, half of the sum of the maximum power value and the minimum power value within this adjustable power range is taken as the initial transmission power value for the transmitter to perform the first transmission.
[0074] Please see Figure 3 In some embodiments, step S202, "adjusting the transmission power of the transmitter based on the initial transmission power value, determining whether the preset calibration conditions are met by the receiver, and obtaining the calibration result," may include, but is not limited to, steps S301 to S303:
[0075] Step S301: Adjust the transmission power of the transmitter according to the initial transmission power value;
[0076] Step S302: Obtain the preliminary received power value of the receiver;
[0077] Step S303: Based on the preliminary received power value, the target received power value, and the preset calibration conditions, a judgment is made to determine the calibration result.
[0078] Steps S301 to S303 as shown in the embodiments of this application adjust the transmission power of the transmitter by adjusting the initial transmission power value, and after obtaining the corresponding initial reception power value, compare it with the target reception power value to determine whether the calibration result meets the preset calibration conditions. This enables accurate determination of whether the transmitter and receiver have achieved the expected matching relationship, thus improving the accuracy of the calibration result.
[0079] In step S301 of some embodiments, the initial transmit power value is an intermediate power value determined based on the adjustable power range of the transmitter. Based on the initial transmit power value, the transmitter is controlled to transmit an optical signal corresponding to the initial transmit power value.
[0080] In step S302 of some embodiments, the preliminary received power value refers to the actual optical signal power value received by the receiver after the transmitter transmits the optical signal at the preliminary transmit power value.
[0081] Please see Figure 4 In some embodiments, the preset calibration conditions include an upper limit and a lower limit of the difference. Step S303, "determining the calibration result based on the preliminary received power value, the target received power value, and the preset calibration conditions," may include, but is not limited to, steps S401 to S402:
[0082] Step S401: Calculate the difference between the preliminary received power value and the target received power value to obtain the power value difference;
[0083] Step S402: If the power value difference is less than the upper limit of the difference and the power value difference is greater than the lower limit of the difference, the calibration result is determined to meet the preset calibration conditions.
[0084] In the embodiments of this application, steps S401 to S402 determine whether the optical sensor meets the preset calibration conditions based on whether the difference between the preliminary received power value and the target received power value falls within a preset allowable range, thereby accurately determining whether the preliminary received power value can be used to calibrate the transmitter.
[0085] In step S401 of some embodiments, the difference between the preliminary received power value and the target received power value is calculated to obtain the power value difference. That is, the power value difference is determined by calculating the numerical difference between the preliminary received power value actually received by the optical sensor receiver and the preset target received power value.
[0086] It should be noted that the initial transmit power value, the initial receive power value, the adjustable power range, and the calibration result are continuously updated in the iterative process of determining the target calibration power through median calculation, that is, in steps S201 to S204 and their corresponding sub-steps.
[0087] In step S402 of some embodiments, the upper limit of the difference refers to the maximum difference within the preset allowable range of power value difference, and the lower limit of the difference refers to the minimum difference within the preset allowable range of power value difference. During the calibration process of the optical sensor in the blood separation process, when the power value difference falls within the allowable range defined by the upper and lower limits of the difference, it is determined that the calibration result meets the preset calibration conditions, that is, it is considered that the deviation between the initial received power value and the target received power value of the receiving end is within an acceptable range.
[0088] For example, the target received power value is preset to 2000, the upper limit of the difference is 10, and the lower limit of the difference is -10. If the calculated power difference between the preliminary received power value and the target received power value is 5, since 5 is less than 10 and greater than -10, the power difference falls within the allowable range, and the calibration result is determined to meet the preset calibration conditions.
[0089] Please see Figure 5 In some embodiments, the calibration result includes a preliminary received power value, and step S203, "updating the adjustable power range based on the preliminary transmit power value, the calibration result, and the target received power value," includes, but is not limited to, steps S501 to S502:
[0090] Step S501: If the initial received power value is greater than the target received power value, update the maximum transmitted power value according to the initial transmitted power value, and update the adjustable power range with the power range formed by the updated maximum transmitted power value and the minimum transmitted power value.
[0091] Step S502: If the initial received power value is less than the target received power value, update the minimum transmitted power value according to the initial transmitted power value, and update the adjustable power range with the power range formed by the updated minimum transmitted power value and the maximum transmitted power value.
[0092] Steps S501 to S502 as shown in the embodiments of this application quickly update the maximum and minimum transmit power values of the adjustable power range of the transmitter by means of median approximation. This enables the actual received power value of the receiver to quickly approach the target received power value until the ideal received power meets the preset calibration conditions, thereby achieving rapid calibration convergence of the optical sensor and significantly improving the calibration speed.
[0093] In step S501 of some embodiments, if the initial received power value is greater than the target received power value, the maximum transmitted power value is updated according to the initial transmitted power value, and the adjustable power range is updated by the power range formed by the updated maximum transmitted power value and the minimum transmitted power value. For example, the initially determined maximum transmitted power value is 800, the minimum transmitted power value is 0, and the initial transmitted power value is 400. After transmitting with the initial transmitted power value of 400, the measured initial received power value is 2100, which is higher than the target received power value of 2000. This indicates that the initial transmitted power value is too high. Therefore, the maximum transmitted power value should be updated to the initial transmitted power value of 400 to form a new adjustable power range of 0 to 400.
[0094] In step S502 of some embodiments, if the initial received power value is less than the target received power value, the minimum transmitted power value is updated according to the initial transmitted power value, and the adjustable power range is updated by the power range formed by the updated minimum transmitted power value and the maximum transmitted power value. For example, the initially determined maximum transmitted power value is 800, the minimum transmitted power value is 0, and the initial transmitted power value is 400. After transmitting with the initial transmitted power value of 400, the measured initial received power value is 1900, which is lower than the target received power value of 2000. This indicates that the initial transmitted power value is too low. Therefore, the minimum transmitted power value should be updated to the initial transmitted power value of 400 to form a new adjustable power range of 400 to 800.
[0095] Please see Figure 6 In some embodiments, the constrained power range includes an upper constraint limit and a lower constraint limit. Step S204, "determining the target calibration power value based on the constrained power range and the initial transmit power value," includes, but is not limited to, steps S601 to S602:
[0096] Step S601: If the initial transmit power value is less than the upper limit of the constraint and the initial transmit power value is greater than the lower limit of the constraint, the target calibration power value is determined to be the initial transmit power value.
[0097] Step S602: If the initial transmit power value is greater than or equal to the upper limit of the constraint, or the initial transmit power value is less than or equal to the lower limit of the constraint, output a preset error message.
[0098] Steps S601 to S602, as shown in the embodiments of this application, compare the preliminary transmit power value with the upper and lower limits of the constraints. If the preliminary transmit power value is between the upper and lower limits of the constraints, the preliminary transmit power value is determined as the target calibration power value. If the preliminary transmit power value exceeds the range of the upper and lower limits of the constraints, an error message is output. This quickly clarifies whether the calibration power value meets the expected set reasonable range, preventing excessive performance differences between optical sensors due to excessively high or low power values of individual transmitters, and ensuring the stability, consistency, and efficiency of the optical sensor calibration process.
[0099] In step S601 of some embodiments, the initial transmit power value is updated in real time. In step S203, when the calibration result does not meet the preset calibration conditions, the adjustable power range is updated, and the initial transmit power is re-determined based on the updated adjustable power range. That is, the initial transmit power here is updated in real time.
[0100] The constrained power range is a range of transmitter power values that are set manually, such as 200-600. The purpose is to limit the power difference between different optical sensor channels during the calibration process, thereby ensuring the consistency of sensor performance and reducing the performance difference between channels during the production process.
[0101] The reason for setting a power constraint range is that, in actual production, there are differences in components and process fluctuations. Different optical sensor channels may still have slight differences in initial performance, component characteristics, and optical path installation details. Without setting a power constraint range, the transmitter power of some channels may be too high or too low. For example, one channel may require a transmitter power of 700 ohms to achieve the target value at the receiver, while another channel may only need 250 ohms. Although both may meet the target conditions after calibration, such extreme differences will lead to reduced long-term stability of the sensors and affect the overall performance consistency and reliability of the equipment. Therefore, by manually setting a power constraint range for the transmitter (e.g., 200-600 ohms), we ensure that the power of each channel sensor is within a reasonable and uniform range after calibration. This avoids extreme power differences between channels, improves the overall consistency of the optical sensors and the long-term stability of the equipment, and meets the requirements of production processes and quality control.
[0102] It should be noted that the constraint range in the above embodiment is (200-600), and it can be flexibly adjusted according to actual needs in other embodiments. No specific limitation is made here.
[0103] In step S602 of some embodiments, if the initial transmit power value is greater than or equal to the upper limit of the constraint, or the initial transmit power value is less than or equal to the lower limit of the constraint, a preset error message is output.
[0104] For example, if the adjustable power range is 0 to 800 and the constrained power range is 200 to 600, and the target calibration power value is finally determined to be 100 during the calibration process, a preset error message will be output, showing the error information of the calibration at this time, and notifying the staff to check the problem and recalibrate, for example, by adjusting the installation path of the sensor.
[0105] In another embodiment of this application, the adjustable power range is 0 to 800, and the target received power value is 2000. During the calibration process, if the difference between the received power of the receiver and 2000 does not meet the preset calibration conditions, an error will be reported, and staff will be notified to check the problem and recalibrate.
[0106] Please see Figure 7 In some embodiments, after step S601 "determining the target calibration power value as the preliminary transmit power value", steps S701 to S704 may be included, but are not limited to:
[0107] Step S701: Obtain multiple preset power adjustment values;
[0108] Step S702: Adjust the target calibration power value according to each power adjustment value to obtain multiple alternative calibration power values; wherein, the alternative calibration power values are within the constrained power range;
[0109] Step S703: Adjust the transmit power of the transmitter according to each alternative calibration power value, and obtain the receive power value of the receiver to obtain the alternative receive power value.
[0110] Step S704: Obtain the alternative calibration power value corresponding to the alternative received power value with the smallest deviation from the target received power value as the target calibration power value.
[0111] Steps S701 to S704 of the embodiments of this application first obtain multiple preset power adjustment values and apply them to the target calibration power value respectively. Then, the transmit power of the transmitter is adjusted using each alternative calibration power value to obtain the corresponding alternative receive power value. Finally, the alternative calibration power value corresponding to the alternative receive power value with the smallest deviation from the target receive power value is selected from these alternative receive power values as the final determined target calibration power value. Therefore, this application can accurately determine the target calibration power value closest to the target receive power value when the transmitter power and receiver power are nonlinearly related, avoiding the problem that the binary method may not be able to fully converge to the optimal solution, and significantly improving the accuracy of optical sensor calibration.
[0112] In step S701 of some embodiments, multiple power adjustment values are preset for adjusting the target calibration power value up or down, for example, setting the power adjustment values from positive 1 and negative 1.
[0113] In step S702 of some embodiments, the target calibration power value is adjusted according to each power adjustment value, that is, each preset power adjustment value is added to or subtracted from the target calibration power value to obtain a series of candidate calibration power values. It should be noted that when the candidate calibration power value is obtained by adding or subtracting, it is necessary to determine whether the candidate calibration power value obtained by adding or subtracting is still within the constrained power range. If not, the power value will not be selected as a candidate calibration power value.
[0114] In step S703 of some embodiments, the transmitting power of the transmitting end is adjusted according to each alternative calibration power value, and the receiving power value of the receiving end is obtained. That is, the transmitting end of the optical sensor transmits optical signals in sequence with each alternative calibration power value, and the receiving end measures the actual receiving power value corresponding to each alternative calibration power value to obtain a set of alternative receiving power values.
[0115] In step S704 of some embodiments, the candidate calibration power value corresponding to the candidate receive power value with the smallest deviation from the target receive power value is obtained as the target calibration power value. For example, the candidate receive power value with the smallest deviation from the target receive power value is selected from a set of measured candidate receive power values, and the candidate calibration power value corresponding to this candidate receive power value is determined as the final target calibration power value.
[0116] For example, if the target received power value is 2000 and the power adjustment values are positive 1 and negative 1, when transmitting with the target calibration power value of 400, the receiver measures an actual received power value of 2005. Subsequently, when transmitting with two alternative calibration power values of 401 and 399, the actual received power values are measured to be 1998 and 2012, respectively. Since 1998 has the smallest deviation from the target received power value of 2000, the corresponding alternative calibration power value of 401 is determined as the final target calibration power value.
[0117] It should be noted that the power adjustment value can be set to a series of values according to actual needs, such as from +10 to -10, and then the transmitter can be adjusted one by one according to +10, +9... -9, -10. No specific limitation is made here.
[0118] It should be noted that in practical applications, the transmit power of the transmitter and the receive power of the receiver are not completely linearly related. For example, if the target receive power is 2000, and the transmitter transmits at 400, the actual receive power may be measured as 2005. However, if the transmit power is slightly adjusted to 399, the actual receive power may be measured as 2012. This shows that the power change is not a strictly linear relationship. Therefore, it is necessary to use multiple sets of alternative calibration power values to determine the optimal transmit power value that is closer to the target receive power value, which will be used as the final target calibration power value.
[0119] In step S602 of some embodiments, the reason for outputting a preset error message when the initial transmit power value is greater than or equal to the upper limit of the constraint, or less than or equal to the lower limit of the constraint, is to reduce the channel difference between multiple optical sensors and to ensure production consistency. For a single optical sensor, the transmit power of its transmitter can be within the adjustable power range. However, for multiple optical sensors, if a unified constraint range is not set, there may be a large power deviation at the transmitter of each optical sensor. For example, the transmit power of one optical sensor may reach the upper limit of the constraint of 800, while another optical sensor may only need 200 to meet the requirements. Although the received power values of the receivers of each optical sensor meet the target requirements, the large difference in transmit power at the transmitter leads to significant differences in the performance between the optical sensor channels, thereby affecting the overall performance consistency of the equipment and the stability of production quality. Therefore, in the actual calibration process, by setting the upper and lower limits of the transmit power constraint, once the transmit power of an optical sensor exceeds the constraint range, an error message is output to prompt the operator to make adjustments, thereby ensuring that the transmit power of multiple optical sensors is ultimately within a unified and reasonable range, and ultimately ensuring the overall consistency and stability of the equipment.
[0120] In one embodiment, the optical sensor is used in a whole blood component separator. The separator contains multiple optical sensors, each including a transmitter and a receiver. The transmitter emits a light signal of a specific power into the separator's tubing, while the receiver receives the light signal after it has passed through the tubing to determine the type of medium flowing through it, such as air, blood plasma, or red blood cells. The optical sensor needs to be calibrated before practical application.The specific calibration process includes: First, obtaining the adjustable power range and the manually set constraint power range of the optical sensor transmitter, for example, the adjustable power range is 0-800, and the constraint power range is 200-600. The purpose of setting the constraint power range is to reduce the difference in transmission power between multiple optical sensor channels and ensure the consistency of optical sensor performance in each channel. Next, obtaining the target received power value of the receiver, for example, setting the target received power value to 2000. Then, calculating the median based on the adjustable power range to determine the initial transmission power value, i.e., taking the median value of 400 (0-800) as the initial transmission power value; then, based on the determined... The initial transmit power value is used to adjust the actual transmit power of the transmitter, and the initial receive power value of the receiver is measured. Then, the difference between the initial receive power value and the target receive power value is calculated. If the power difference is less than the upper limit and greater than the lower limit (e.g., the upper limit is 10 and the lower limit is -10), the optical sensor calibration result is determined to meet the preset calibration conditions. If the power difference exceeds the above allowable range, the adjustable power range is updated based on the comparison between the initial and target receive power values. For example, if the initial receive power value is greater than the target receive power value, the initial transmit power value of 400 is updated to the new maximum. The transmit power value is adjusted to a new adjustable power range of 0-400. The median of the adjustable power range is calculated again to obtain a new initial transmit power value of 200. This process is repeated until the preset calibration conditions are met. Once the calibration result meets the preset calibration conditions, it is then determined whether the initial transmit power value falls within the constrained power range. If the initial transmit power value is less than the upper limit of the constrained power range (600) and greater than the lower limit (200), then the initial transmit power value is determined as the target calibration power value. If the initial transmit power value is greater than or equal to the upper limit of the constrained power range (600), or less than or equal to the lower limit (200), then... The system outputs preset error messages to facilitate timely checks or readjustments by staff. Considering the potentially non-linear relationship between transmitter and receiver power, which may prevent accurate calculation of the target calibration power value using the median, this embodiment further sets multiple preset power adjustment values, for example, from +10 to -10. These adjust the initial transmitter power value (i.e., the target calibration power value) to generate multiple alternative calibration power values. The transmitter is adjusted one by one, and the corresponding alternative receiver power value is measured. Finally, the alternative calibration power value with the smallest deviation from the target receiver power value is selected as the final target calibration power value. For example, a receiver power value of 2005 is measured at a target calibration power value of 400, and a receiver power value of 1996 is measured at a transmitter power value of 390. This is recorded as (390, 1996). Similarly, (391, 1976)...(410, 2009) are measured.If the candidate received power value with the smallest deviation from the target received power value is 1998, and its corresponding candidate calibration power value is 401, then 401 will be used as the final target calibration power value. Through this complete calibration process, multiple optical sensors in the whole blood component separator can quickly and accurately determine the optimal transmitter power value, effectively avoiding the errors and inefficiencies caused by manual calibration, significantly improving the calibration efficiency and accuracy of the optical sensors, and thus ensuring the consistency and stability of the overall performance of the whole blood component separator.
[0121] Please see Figure 8 This application also provides an optical sensor calibration device for use with an optical sensor having a transmitter and a receiver, which can implement the above-described optical sensor calibration method. The device includes:
[0122] The first acquisition module 801 is used to acquire the adjustable power range of the transmitter.
[0123] The second acquisition module 802 is used to acquire the target received power value of the receiving end;
[0124] The adjustment module 803 is used to adjust the transmit power of the transmitter based on the adjustable power range, so that the receive power value of the receiver and the target receive power value meet the preset calibration conditions, and obtain the target calibration power value.
[0125] The calibration module 804 is used to calibrate the transmitter according to the target calibration power value.
[0126] The specific implementation of this optical sensor calibration device is basically the same as the specific embodiment of the optical sensor calibration method described above, and will not be repeated here.
[0127] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described optical sensor calibration method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0128] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0129] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0130] The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the optical sensor calibration method of the embodiments of this application.
[0131] The input / output interface 903 is used to implement information input and output;
[0132] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0133] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0134] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0135] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described optical sensor calibration method.
[0136] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0137] The optical sensor calibration method, device, electronic equipment, and storage medium provided in this application embodiment obtain the adjustable power range of the transmitter; obtain the target received power value of the receiver; adjust the transmitter power based on the adjustable power range so that the received power value and the target received power value of the receiver meet preset calibration conditions to obtain the target calibration power value; and calibrate the transmitter based on the target calibration power value. Thus, this application embodiment automatically adjusts the transmitter power based on the adjustable power range and the target received power value of the receiver to achieve the preset calibration conditions, obtain the target calibration power value, and finally completes the automatic calibration of the transmitter based on the target calibration power value. This eliminates the tedious manual adjustment and repeated confirmation of a large number of optical sensors, effectively improving the calibration efficiency of optical sensors, significantly reducing manual operation intensity, and improving calibration accuracy.
[0138] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0139] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0140] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0141] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0142] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
Claims
1. An optical sensor calibration method, characterized by, Applied to an optical sensor having a transmitting end and a receiving end, the method comprises: acquiring an adjustable power range of the transmitting end; acquiring a target receiving power value of the receiving end; adjusting the transmitting power of the transmitting end based on the adjustable power range, so that the receiving power value of the receiving end and the target receiving power value meet a preset calibration condition, to obtain a target calibration power value; calibrating the transmitting end according to the target calibration power value.
2. The method of claim 1, wherein, The method further comprises: performing median calculation on the adjustable power range to determine a preliminary transmitting power value; adjusting the transmitting power of the transmitting end according to the preliminary transmitting power value, and determining a calibration result by judging whether the preset calibration condition is met through the receiving end; if the calibration result indicates that the preset calibration condition is not met, updating the adjustable power range according to the preliminary transmitting power value, the calibration result and the target receiving power value, and taking the updated adjustable power range as the adjustable power range, and returning to perform the median calculation on the adjustable power range to determine the preliminary transmitting power value; if the calibration result indicates that the preset calibration condition is met, acquiring a constraint power range, and determining the target calibration power value according to the constraint power range and the preliminary transmitting power value.
3. The method of claim 2, wherein, The calibration result comprises a preliminary receiving power value, and the updating of the adjustable power range according to the preliminary transmitting power value, the calibration result and the target receiving power value comprises: if the preliminary receiving power value is greater than the target receiving power value, updating the maximum transmitting power value according to the preliminary transmitting power value, and updating the power range formed by the updated maximum transmitting power value and the minimum transmitting power value to the adjustable power range; if the preliminary receiving power value is less than the target receiving power value, updating the minimum transmitting power value according to the preliminary transmitting power value, and updating the power range formed by the updated minimum transmitting power value and the maximum transmitting power value to the adjustable power range.
4. The method of claim 2, wherein, The method further comprises: adjusting the transmitting power of the transmitting end according to the preliminary transmitting power value; acquiring a preliminary receiving power value of the receiving end; determining the calibration result according to the preliminary receiving power value, the target receiving power value and the preset calibration condition.
5. The method of claim 4, wherein, The preset calibration condition comprises an upper limit of a difference value and a lower limit of the difference value, and the determination of the calibration result according to the preliminary receiving power value, the target receiving power value and the preset calibration condition comprises: calculating a difference value between the preliminary receiving power value and the target receiving power value to obtain a power value difference; and determining the calibration result according to the power value difference, the upper limit of the difference value and the lower limit of the difference value. If the power value difference is less than the upper limit of the difference value and greater than the lower limit of the difference value, it is determined that the calibration result meets the preset calibration condition.
6. The method of claim 2, wherein, The constraint power range includes a constraint upper limit and a constraint lower limit, and the determining of the target calibration power value according to the constraint power range and the preliminary transmission power value includes: If the preliminary transmission power value is less than the constraint upper limit and greater than the constraint lower limit, the target calibration power value is determined as the preliminary transmission power value. If the preliminary transmission power value is greater than or equal to the constraint upper limit or less than or equal to the constraint lower limit, a preset error prompt is output.
7. The method of claim 6, wherein, After the target calibration power value is determined as the preliminary transmission power value, the method further includes: obtaining a plurality of preset power adjustment values; adjusting the target calibration power value according to each power adjustment value to obtain a plurality of candidate calibration power values, wherein the candidate calibration power values are within the constraint power range; adjusting the transmission power of the transmission end according to each candidate calibration power value and obtaining a candidate reception power value of the reception end; obtaining the candidate calibration power value corresponding to the candidate reception power value with the smallest deviation from the target reception power value as the target calibration power value.
8. An optical sensor calibration device, characterized by The device is applied to an optical sensor having a transmission end and a reception end, and includes: a first obtaining module configured to obtain an adjustable power range of the transmission end; a second obtaining module configured to obtain a target reception power value of the reception end; an adjusting module configured to adjust the transmission power of the transmission end based on the adjustable power range, so that a reception power value of the reception end meets a preset calibration condition with the target reception power value, and obtain a target calibration power value; a calibration module configured to calibrate the transmission end according to the target calibration power value.
9. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the optical sensor calibration method in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the optical sensor calibration method in any one of claims 1 to 7.