Data processing method and device, electronic equipment and computer program product
By identifying and processing the abnormal parts in the initial electrical data of the TMR sensor, using the data of the angular velocity sensor to assist in judgment, the interference problem of the TMR sensor when sensing the lens position is solved, and the accuracy and accuracy are improved.
Patent Information
- Application Number
- CN202411550712.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The existing TMR sensors have interference when sensing lens position, resulting in low accuracy and limited optimization effects, making it difficult to completely eliminate interference, increasing cost and device volume.
By acquiring data from the TMR sensor and the angular velocity sensor, the abnormal parts in the initial electrical data are identified and processed to reduce interference and improve data accuracy.
It effectively improves the accuracy of TMR sensors, reduces interference, and improves the accuracy of displacement measurement or position positioning.
Smart Images

Figure CN119475169A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method and device, an electronic device, and a computer program product. Background Art
[0002] Tunnel Magneto Resistance Sensor (TMR) is a sensor that can measure changes in magnetic fields through a thin film tunnel structure, and then perform displacement measurement or position positioning. For example, there are more and more solutions to use TMR sensors to sense the position of the lens. Currently, the TMR sensor is mainly optimized through structural design adjustments or magnetic circuit design to alleviate the interference of the TMR sensor, but the optimization effect is not good. Therefore, how to eliminate the interference of the TMR sensor to improve the accuracy of the TMR sensor has become a problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides a data processing method and device, electronic equipment, and computer program product, which can process abnormal electrical data collected by a TMR sensor to obtain more accurate target angle information, thereby effectively improving the accuracy of the TMR sensor.
[0004] In a first aspect, a data processing method is provided, which is applied to an electronic device, wherein the electronic device includes a tunnel magnetoresistance (TMR) sensor and an angular velocity sensor; the method includes: acquiring initial electrical data collected by the TMR sensor, and acquiring angular velocity data collected by the angular velocity sensor; identifying, based on the angular velocity data, that the initial electrical data is abnormal; determining abnormal electrical data present in the initial electrical data, and processing the abnormal electrical data to obtain target electrical data; and determining target angle information based on the target electrical data.
[0005] In the present application, the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor can be obtained, and according to the angular velocity data, it is identified that the initial electrical data is abnormal, so that when the abnormal electrical data in the initial electrical data is determined, the abnormal electrical data is processed to obtain the target electrical data, and the target angle information is determined according to the target electrical data. That is, the angular velocity data is used to assist in determining whether the initial electrical data collected by the TMR sensor is abnormal, and the abnormal electrical data in the initial electrical data is processed to reduce the interference in the initial electrical data, so that more accurate target angle information can be obtained, and the accuracy of the TMR sensor is effectively improved.
[0006] In a second aspect, a data processing device is provided, which is applied to an electronic device including a tunnel magnetoresistive TMR sensor and an angular velocity sensor; the data processing device includes: an acquisition module, an abnormality identification module and a processing module. The acquisition module is used to acquire the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor; the abnormality identification module is used to identify the presence of abnormalities in the initial electrical data based on the angular velocity data; the processing module is used to determine the abnormal electrical data in the initial electrical data, and process the abnormal electrical data to obtain target electrical data; and determine the target angle information based on the target electrical data.
[0007] In a third aspect, another electronic device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the electronic device also includes a memory. Optionally, the electronic device also includes a communication interface, and the processor is coupled to the communication interface.
[0008] In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect.
[0009] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.
[0010] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.
[0011] Optionally, there are one or more processors and one or more memories.
[0012] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0013] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0014] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.
[0015] The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0016] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.
[0017] In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram of a system architecture of an electronic device provided in an embodiment of the present application;
[0019] Figure 2 is a schematic flow chart of a data processing method provided in an embodiment of the present application;
[0020] Figure 3 is a schematic flow chart of a first specific example of a data processing method provided in an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of initial electrical data provided by an embodiment of the present application;
[0022] Figure 5is a schematic flow chart of a second specific example of the data processing method provided in an embodiment of the present application;
[0023] Figure 6 is a schematic flow chart of a third specific example of the data processing method provided in an embodiment of the present application;
[0024] Figure 7 is a schematic flow chart of a fourth specific example of a data processing method provided in an embodiment of the present application;
[0025] Figure 8 is a schematic flow chart of a fifth specific example of a data processing method provided in an embodiment of the present application;
[0026] Fig. 9 is a schematic block diagram of a data processing device provided in an embodiment of the present application;
[0027] Fig.10 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0029] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0030] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0031] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0032] In order to make the purpose and technical solution of the present application clearer and more intuitive, the data processing method and device, electronic device, and computer program product provided by the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] In practical applications, TMR sensors can provide electrical signals that correspond to the angle of the magnetic field. The electrical signals are usually very weak and need to be sampled and digitized by an analog / digital converter (A / D converter) for further processing and analysis, and used for displacement measurement or position positioning. For example, more and more electronic devices use TMR sensors to sense the position of the lens. Currently, the TMR sensor is optimized mainly through structural design adjustments or magnetic circuit design to alleviate the interference of the TMR sensor and improve the perception of the lens position. However, the optimization effect is not good. While the interference cannot be completely eliminated, it also causes excessive costs and increases the size of the device, which does not meet the needs of miniaturization.
[0034] Therefore, how to eliminate TMR sensor interference to obtain more accurate electrical data and improve the accuracy of displacement measurement or position positioning has become a problem that needs to be solved urgently.
[0035] The embodiment of the present application provides a data processing method and device, an electronic device, and a computer program product. The electronic device can obtain the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor, and identify the presence of abnormalities in the initial electrical data according to the angular velocity data, so as to process the abnormal electrical data when the abnormal electrical data in the initial electrical data is determined to obtain target electrical data, and determine the target angle information according to the target electrical data. That is, the angular velocity data is used to assist in determining whether the initial electrical data collected by the TMR sensor is abnormal, and the abnormal electrical data in the initial electrical data is processed to reduce the interference in the initial electrical data, so as to obtain more accurate target angle information, and effectively improve the accuracy of the TMR sensor.
[0036] The electronic devices involved in the embodiments of the present application may be mobile phones, watches, laptop computers, PDAs, mobile internet devices (MID), personal computers (PC), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in self-driving, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, personal digital assistants (PDA), etc., and the embodiments of the present application are not limited to this.
[0037] For example, Figure 1 A schematic diagram of a system architecture of an electronic device provided in an embodiment of the present application.
[0038] like Figure 1 As shown, the electronic device includes a processor 110 .
[0039] Optionally, the electronic device may further include a memory 130. The processor 110 and the memory 130 may communicate with each other through an internal connection path to transfer data. The memory 130 is used to store a computer program, and the processor 110 is used to call and run the computer program from the memory 130. The processor 110 and the memory 130 may be combined into a processing device, or more commonly, they are independent components. The processor 110 is used to execute the program code stored in the memory 130 to implement the above functions. In specific implementation, the memory 130 may also be integrated into the processor 110, or may be independent of the processor 110.
[0040] In addition, in order to make the functions of the electronic device more complete, the electronic device may further include one or more of an input unit 160, an audio circuit 180, and a sensor 101. The sensor 101 includes a tunnel magnetoresistance (TMR) sensor and an angular velocity sensor.
[0041] Optionally, the electronic device may further include a power supply 150 for providing power to various devices or circuits in the electronic device.
[0042] Understandably, Figure 1 The operations and / or functions of each module in the electronic device shown are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the description in the following method embodiments, and the detailed description is appropriately omitted here to avoid repetition.
[0043] Understandably, Figure 1 The processor 110 in the electronic device shown may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0044] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0045] Understandably, Figure 1 The power supply 150 shown is used to power the processor 110, the memory 130, and the input unit 160. The memory 130 can be used to store computer executable program codes, and the executable program codes include instructions. The memory 130 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the electronic device, etc. In addition, the memory 130 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the memory 130, and / or instructions stored in a memory provided in the processor. The electronic device can implement audio functions through an audio circuit 180, an application processor, etc. For example, music playback, recording, etc.
[0046] Figure 2 2 is a schematic flow chart of a data processing method 200 provided in an embodiment of the present application. Figure 2 As shown, the method 200 may include the following steps:
[0047] S201, acquiring initial electrical data collected by a TMR sensor, and acquiring angular velocity data collected by an angular velocity sensor.
[0048] In some embodiments, initial electrical data collected by the TMR sensor can be acquired by moving the magnetic grid.
[0049] Magnetic grating is a precision measurement technology that uses magnetic field changes to measure displacement. It usually consists of a magnetic scale (or magnetic scale) and a magnetic head. The magnetic scale is a ruler, round rod or disk with N and S poles that is precisely and equidistantly magnetized on the surface of a magnetic material or a magnetic coating of a non-magnetic material. The ruler is called a magnetic scale, the round rod is called a magnetic rod, and both are used for linear displacement measurement; the disk is called a magnetic disk, and is used for angular displacement measurement.
[0050] In the embodiment of the present application, the TMR sensor can be used to read the magnetic field changes on the magnetic grid. In this application, the magnetic grid scale can be used as a reference scale for detecting displacement, and the TMR sensor can be used as a magnetic head to read the recorded signal on the magnetic scale. Through the TMR sensor, the magnetization signal on the magnetic scale can be converted into an electrical signal (i.e., initial electrical data), and then displacement measurement or position positioning can be performed based on the electrical signal.
[0051] The electrical signal may include different electrical signals collected by the TMR sensor at different magnetic field angles.
[0052] An angular velocity sensor is a device that measures the angular velocity of an object. It works mainly based on the gyroscope principle or other specific physical effects. For example, when an object rotates, the sensitive element inside the angular velocity sensor will sense the corresponding change in physical quantity and convert the change in physical quantity into an electrical signal output, thereby reflecting the magnitude and direction of the object's angular velocity.
[0053] Among them, the mechanical gyroscope is a traditional mechanical gyroscope, which usually consists of a high-speed rotating rotor and a supporting structure. Due to the angular momentum of the rotor, it can resist the action of external torque, thereby maintaining the direction of its rotation axis stable. By measuring the angular change of the rotor axis relative to the reference system, the angular velocity of the object can be determined.
[0054] Optical gyroscopes use the principle of light interference to measure angular velocity. Common types include fiber optic gyroscopes and laser gyroscopes. Fiber optic gyroscopes determine angular velocity by measuring the phase change of light propagating in an optical fiber, while laser gyroscopes use the interference effect of laser beams in a ring cavity to measure angular velocity.
[0055] A MEMS gyroscope is usually composed of a micromechanical structure and an electronic circuit, and measures angular velocity by detecting the vibration or rotation of the microstructure.
[0056] In some embodiments, the electronic device may synchronously acquire initial electrical property data and angular velocity data.
[0057] Exemplarily, the electronic device can acquire angular velocity data while acquiring initial electrical property data, and synchronously terminate the acquisition of angular velocity data when the acquisition of initial electrical property data stops, that is, the angular velocity data and the initial electrical property data are data collected at the same time and of the same duration.
[0058] In some embodiments, the electronic device may also acquire the electrical property data and angular velocity data asynchronously, that is, the electronic device may determine the initial electrical property data from the acquired electrical property data, and determine the angular velocity data corresponding to the above S201 from the acquired angular velocity data.
[0059] Exemplarily, the electronic device may acquire electrical property data in a first time period, and acquire angular velocity data in a second time period, and there is a third time period that overlaps the first time period and the second time period, and the start time of the third time period is the first time period, and the end time is the second time period. The electronic device may determine the electrical property data collected from the first time period to the second time period as the initial electrical property data in S201, and determine the angular velocity data collected from the first time period to the second time period as the angular velocity data in S201, so as to ensure that the initial electrical property data and the angular velocity data are obtained when the electronic device is in the same state.
[0060] S202: Identify, based on the angular velocity data, whether the initial electrical data is abnormal.
[0061] In some embodiments, both the angular velocity data and the initial electrical data may represent angle information, and the electronic device may compare the angle information represented by the angular velocity data with the angle information represented by the initial electrical data to identify abnormalities in the initial electrical data.
[0062] Exemplarily, the electronic device may identify that the initial electrical data is abnormal when it is determined that the angular velocity data is different from or different from the angle information represented by the initial electrical data. Alternatively, the electronic device may identify that the initial electrical data is not abnormal when it is determined that the angular velocity data is the same as or similar to the angle information represented by the initial electrical data.
[0063] In other embodiments, the electronic device may also identify that anomalies exist in the initial electrical data and the angular velocity data based on changes in the initial electrical data and the angular velocity data.
[0064] Exemplarily, when the change amplitude of the initial electrical data does not conform to the fluctuation amount of the angular velocity data, the electronic device recognizes that there is an abnormality in the initial electrical data. Alternatively, when the change amplitude of the initial electrical data conforms to the fluctuation amount of the angular velocity data, the electronic device recognizes that there is no abnormality in the initial electrical data.
[0065] S203, determining abnormal electrical property data in the initial electrical property data, and processing the abnormal electrical property data to obtain target electrical property data.
[0066] In some embodiments, the electronic device may determine abnormal electrical data present in the initial electrical data based on data change information of the initial electrical data.
[0067] In a possible implementation method, the initial electrical data is the electrical data collected by the TMR sensor within a collection time period, and the initial electrical data may include multiple electrical values collected by the TMR sensor at different collection times within the above-mentioned collection time period. The data change information can be used to indicate the change of each electrical value among the multiple electrical values, and the electrical values with abnormal changes are determined as abnormal electrical data existing in the initial electrical data.
[0068] The electrical property value with abnormal change may be an electrical property value with a change different from the change of the above-mentioned multiple electrical property values.
[0069] In a possible case, the change of each electrical property value may be a change of each electrical property value relative to at least one other electrical property value included in the initial electrical property data.
[0070] Exemplarily, the initial electrical property data includes 5 electrical property values, such as electrical property value 1, electrical property value 2, electrical property value 3, electrical property value 4, and electrical property value 5. The change of electrical property value 5 may be a change relative to any one of electrical property values 1, electrical property value 2, electrical property value 3, and electrical property value 4. For example, the change is that the electrical property value 5 increases or decreases relative to the electrical property value 1.
[0071] Exemplarily, the change of the electrical property value 5 may also be a change relative to the electrical property value 1, the electrical property value 2, the electrical property value 3 and the electrical property value 4. For example, the electrical property value 5 increases or decreases relative to the average of the electrical property value 1, the electrical property value 2, the electrical property value 3 and the electrical property value 4.
[0072] In a possible case, the change of each electrical property value may be a change of each electrical property value relative to preset electrical property data.
[0073] Exemplarily, the initial electrical data includes 5 electrical values, such as electrical value 1, electrical value 2, electrical value 3, electrical value 4, and electrical value 5. The change of electrical value 5 may also be a change relative to a preset electrical value. The preset electrical value may be an electrical value obtained by pre-testing and used to determine whether the change of the electrical value in the initial electrical data is abnormal.
[0074] In one possible implementation, the initial electrical property data includes multiple electrical property values, and the data change information can also be used to indicate the change of each pair of electrical property values in the multiple electrical property values, and each pair of electrical property values with abnormal change can be determined as abnormal electrical property data existing in the initial electrical property data.
[0075] Each pair of electrical property values may be two electrical property values that are adjacent or non-adjacent at the time of collection among the multiple electrical property values included in the initial electrical property data.
[0076] In a possible case, the change of each pair of electrical property values may be the change of each pair of electrical property values relative to any other electrical property data.
[0077] Exemplarily, the initial electrical data includes 5 electrical values, such as electrical value 1, electrical value 2, electrical value 3, electrical value 4, and electrical value 5. Among them, the changes in electrical value 4 and electrical value 5 can be changes relative to any of the electrical values of electrical value 1, electrical value 2, electrical value 3, and electrical value 4. For example, the average of electrical value 5 and electrical value 4 increases or decreases relative to any of the electrical values of electrical value 1, electrical value 2, electrical value 3, and electrical value 4.
[0078] In another possible case, the change of each pair of electrical property values may be the change of each pair of electrical property values relative to other multiple electrical property data.
[0079] Exemplarily, the changes in electrical property values 4 and 5 may also be changes relative to at least two of electrical property values 1, electrical property value 2, electrical property value 3 and electrical property value 4. For example, the average of electrical property value 5 and electrical property value 4 increases or decreases relative to the average of electrical property value 1 and electrical property value 2.
[0080] In some embodiments, the electronic device may delete the abnormal electrical data to obtain target electrical data.
[0081] In one possible implementation, when the initial electrical data includes a large number of electrical values and the abnormal electrical data includes multiple electrical values, the electronic device can delete all electrical values included in the abnormal electrical data from the initial electrical data to achieve maximum elimination of interference with the initial electrical data and obtain better target electrical data.
[0082] In one possible implementation, when the initial electrical data includes a small number of electrical values and the abnormal electrical data includes multiple electrical values, the electronic device may delete some of the electrical values included in the abnormal electrical data from the initial electrical data, so as to eliminate interference with the initial electrical data while avoiding deleting too many electrical values, resulting in the target electrical data obtained including too small a number of electrical values, thereby affecting the application.
[0083] In some embodiments, the electronic device may perform replacement processing on the abnormal electrical data to obtain target electrical data.
[0084] In a possible implementation, the electronic device may replace the abnormal electrical data with preset electrical data to obtain target electrical data. The preset electrical data is electrical data obtained through pre-testing to eliminate the abnormal electrical data of the initial electrical data and obtain better target electrical data.
[0085] In another possible implementation, the electronic device can also determine reference electrical data based on the data change information of the abnormal electrical data and the data change information of the initial electrical data, and replace the above abnormal electrical data with the reference electrical data, so as to further improve the effect of eliminating the abnormal electrical data of the above initial electrical data through the reference electrical data, and obtain better target electrical data.
[0086] S204: Determine target angle information according to the target electrical property data.
[0087] In a possible case, the correspondence between the electrical data and the angle information may be determined in advance by testing.
[0088] In other embodiments, the electronic device may also calculate and determine the target angle information based on the target electrical property data, and may calculate and obtain the actual displacement based on the angle information and the slope of the displacement.
[0089] In the present application, the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor can be obtained, and according to the angular velocity data, it is identified that the initial electrical data is abnormal, so that when the abnormal electrical data in the initial electrical data is determined, the abnormal electrical data is processed to obtain the target electrical data, and the target angle information is determined according to the target electrical data. That is, the angular velocity data is used to assist in determining whether the initial electrical data collected by the TMR sensor is abnormal, and the abnormal electrical data in the initial electrical data is processed to reduce the interference in the initial electrical data, so that more accurate target angle information can be obtained, and the accuracy of the TMR sensor is effectively improved.
[0090] In some embodiments, the initial electrical data is different electrical data collected by the TMR sensor at different magnetic field angles, so that the electronic device can identify the presence of abnormalities in the above different electrical data according to the angular velocity data. For details, see the following Figure 3 and Figure 4 .
[0091] Figure 3 3 is a schematic flow chart of a data processing method 300 provided in an embodiment of the present application. Figure 3 As shown, the method 300 may include the following steps:
[0092] S301, acquiring initial electrical property data collected by a TMR sensor and acquiring angular velocity data collected by an angular velocity sensor, wherein the initial electrical property data includes first electrical property data and second electrical property data collected by the TMR sensor at different magnetic field angles.
[0093] In some embodiments, the magnetic grid may be moved to change the magnetic field angle, and initial voltage data collected by the TMR sensor at different magnetic field angles may be acquired.
[0094] Figure 4 This is a schematic diagram of the initial electrical data provided for this application. Figure 4 As shown, the horizontal axis is the magnetic field angle, and the vertical axis is the voltage. The initial electrical property data may include first electrical property data and second electrical property data, such as Figure 4 As shown, the first electrical property data may be voltage data collected by the TMR sensor and having a sine relationship with the magnetic field angle, and the second electrical property data may be voltage data collected by the TMR sensor and having a cosine relationship with the magnetic field angle.
[0095] S302: Calculate and obtain a first angle based on the first electrical property data and the second electrical property data.
[0096] In a possible implementation, the electronic device may normalize the first electrical property data and the second electrical property data, respectively, and calculate the first angle based on the normalized first electrical property data and the second electrical property data. That is, the first electrical property data and the second electrical property data are converted to a range of -1 to 1 to provide accurate basic data for subsequent angle calculations. The maximum electrical property value and the minimum electrical property value may be electrical property values collected by the TMR sensor under specific magnetic field conditions.
[0097] Exemplarily, the normalized first electrical property data and the normalized second electrical property data can be calculated by the following formula (1) and formula (2), respectively.
[0098]
[0099] Among them, Va" is the normalized first electrical property data, Vb" is the normalized second electrical property data, Va is the first electrical property data, and Vb is the second electrical property data.
[0100] As mentioned above Figure 4 As shown, the TMR sensor can output two orthogonal signals (similar to sine and cosine signals), and there is a 90-degree phase difference between the two signals (ie, the first electrical property data and the second electrical property data).
[0101] In a possible implementation, the atan() function may take into account the phase difference between the two signals, and the first angle may be calculated more accurately through this function.
[0102] Exemplarily, when the first electrical property data and the second electrical property data are Figure 4 In the case of the voltage data shown, the first angle can be calculated by formula (3).
[0103]
[0104] Wherein, α is the first angle, Va” is the normalized first electrical property data, and Vb” is the normalized second electrical property data.
[0105] It should be understood that the formula shown above is only exemplary and the present application does not limit it.
[0106] Optionally, in addition to obtaining the first angle by calculating through the formula as shown above, the first angle may also be determined based on a corresponding relationship between electrical data and the angle.
[0107] Exemplarily, the electronic device may compare the initial electrical data with the electrical data in the corresponding relationship, and when it is determined that there is electrical data similar to the initial electrical data, determine the angle corresponding to the electrical data as the first angle.
[0108] In some embodiments, the corresponding relationship between the electrical data and the angle may be determined in advance by testing, such as obtaining different electrical data by testing, and determining the angle of the different electrical data.
[0109] In a possible case, the angle in the corresponding relationship may be calculated in advance based on electrical data obtained from corresponding tests and the above formula.
[0110] In another possible case, the angle in the corresponding relationship may also be determined by an angle acquisition method.
[0111] S303: Calculate and obtain a second angle based on the angular velocity data and the acquisition time of the angular velocity data.
[0112] Angular velocity is the rate at which an object rotates around an axis. Angular velocity is usually represented by the symbol ω (Omega) and is measured in degrees per second (° / s) or radians per second (rad / s).
[0113] Angle is the total amount of rotation of an object around an axis, usually represented by the symbol θ (Theta) and measured in degrees (°) or radians (rad).
[0114] The relationship between angular velocity and angle can be expressed by integration. Specifically, angular velocity is the derivative of angle with respect to time, and angle is the result of integrating angular velocity with time. Specifically, the second angle can be calculated by the following formula (4).
[0115] θ=∫ωdt+θ0 (4)
[0116] Wherein, θ is the second angle, ω is the angular velocity, θ0 is the initial angle, and t is the time.
[0117] For example, if a constant angular velocity data of a gyroscope collected by the angular velocity sensor is 60° / s, then after one second, the gyroscope will rotate 60°, after two seconds, it will rotate 120°, and so on.
[0118] It should be understood that the formula shown above is only exemplary and the present application does not limit it.
[0119] S304, determining whether the first angle matches the second angle, if so, executing step S308, if not, executing step S305.
[0120] In some embodiments, there is a matching condition between the first angle and the second angle, and the electronic device can determine whether the first angle matches the second angle through the matching condition. Furthermore, when the first angle does not match the second angle, it is characterized that the accuracy or precision of the first angle calculated by the first electrical data and the second electrical data is low, and it is further inferred that there is an abnormality in the first electrical data and / or the second electrical data.
[0121] In some embodiments, the matching condition may be one (eg, a first matching condition), so that the electronic device determines whether the first angle and the second angle match by judging whether the first angle and the second angle satisfy the first matching condition.
[0122] In a possible case, the first matching condition may be that the first angle is the same as the second angle, that is, the electronic device may determine whether the first angle matches the second angle by determining whether the first angle is the same as the second angle.
[0123] In some embodiments, in addition to the first condition, the matching condition may also include other specific matching conditions, such as a second matching condition, so that the electronic device determines whether the first angle and the second angle match by judging whether the first angle and the second angle satisfy the first matching condition and the second matching condition.
[0124] In one possible case, the second matching condition may be that the difference between the first angle and the second angle is less than or equal to an angle threshold. That is, when the electronic device determines that the first angle is the same as the second angle, it is also necessary to determine whether the difference between the first angle and the second angle is less than or equal to the angle threshold to determine whether the first angle matches the second angle.
[0125] In some embodiments, the angle threshold may be obtained through testing.
[0126] In one possible case, the higher the performance requirement for the electronic device, the smaller the angle threshold can be, so as to obtain more accurate electrical data through data processing and calculate more accurate angle information.
[0127] It should be understood that the matching conditions shown above are merely exemplary. In actual operation, multiple other different matching conditions may also be included, and this application does not limit this.
[0128] S305: When the first angle matches the second angle, it is determined that the initial electrical data is abnormal.
[0129] In some embodiments, the electronic device can determine whether the first angle and the second angle do not meet the matching condition to determine whether the first angle and the second angle do not match, and when it is determined that the first angle and the second angle do not match, determine that the accuracy or precision of the first angle calculated by the first electrical data and the second electrical data is low, and infer that there is an abnormality in the first electrical data and / or the second electrical data.
[0130] In one possible case, the matching condition is a first matching condition, and the first matching condition may be that the first angle is the same as the second angle. The electronic device may determine that the first angle and the second angle do not satisfy the first matching condition, that is, the first angle and the second angle do not match, and the initial electrical data is abnormal when the first angle and the second angle are different.
[0131] In one possible case, there are multiple matching conditions, such as the first matching condition and the second matching condition. When the electronic device determines that the first angle is different from the second angle and whether the difference between the first angle and the second angle is greater than the angle threshold, it determines that the first angle and the second angle do not match, that is, the initial electrical data is abnormal.
[0132] S306, determining abnormal electrical property data in the initial electrical property data, and processing the abnormal electrical property data to obtain target electrical property data.
[0133] In some embodiments, the electronic device may determine abnormal electrical data in the initial electrical data according to data change information of the initial electrical data. Specific details may be referred to the above embodiments, and will not be described in detail to avoid repetition.
[0134] S307: Determine target angle information according to the target electrical property data.
[0135] S308: Determine target angle information according to the initial electrical data.
[0136] Optionally, following the above S304, when the above first angle matches the second angle, it can be determined that there is no abnormality in the initial electrical data, that is, no operation is required.
[0137] In the embodiment of the present application, the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor can be obtained, and the initial electrical data can be identified to be abnormal according to the angle determined by the angular velocity data, so that when the abnormal electrical data in the initial electrical data is determined, the abnormal electrical data is processed to obtain the target electrical data, and the target angle information is determined according to the target electrical data. That is, the angle determined by the angular velocity data is compared with the angle determined by the initial electrical data, so as to assist in judging the noise of the initial electrical data collected by the TMR sensor through the angular velocity data, and the abnormal electrical data in the initial electrical data is processed to flexibly eliminate the interference of the initial electrical data, obtain more accurate target angle information, and effectively improve the accuracy of displacement measurement or position positioning.
[0138] In some embodiments, the abnormal electrical data may be data with abnormal slope in the initial electrical data. In other words, the data change information of the initial electrical data may be slope information.
[0139] Figure 5 is a schematic flow chart of a data processing method 500 provided in an embodiment of the present application. Figure 5 As shown, the method 500 may include the following steps:
[0140] S501, acquiring initial electrical property data collected by a TMR sensor and acquiring angular velocity data collected by an angular velocity sensor, wherein the initial electrical property data includes a plurality of electrical property values.
[0141] In a possible implementation, the electronic device may synchronously acquire initial electrical property data and angular velocity data of the same duration.
[0142] S502: Identify, based on the angular velocity data, whether the initial electrical data is abnormal.
[0143] In a possible implementation, the electronic device can calculate a first angle based on the initial electrical data and a second angle based on the angular velocity data, so as to identify that the initial electrical data is abnormal when the first angle and the second angle match. For details, please refer to the description in the above embodiment, which will not be repeated here to avoid repetition.
[0144] S503, determining a first slope corresponding to each electrical property value in the initial electrical property data.
[0145] In some embodiments, the first slope corresponding to each of the electrical property values may be a first slope of the electrical property value relative to any other electrical property value included in the initial electrical property data.
[0146] S504, determining a target electrical property value having an abnormal first slope according to the first slopes corresponding to the respective electrical property values, and using the target electrical property value as abnormal electrical property data.
[0147] In some embodiments, the electronic device may compare the first slope with a reference slope to determine a target electrical property value at which the first slope is abnormal.
[0148] In one possible case, the reference slope is obtained by preliminary testing.
[0149] In another possible case, the reference slope may be a first slope corresponding to any other electrical property value included in the initial electrical property data.
[0150] In another possible case, the reference slope may also be calculated based on the first slope of multiple electrical property values included in the initial electrical property data.
[0151] S505: Process the abnormal electrical property data to obtain target electrical property data.
[0152] S506: Determine target angle information according to the target electrical property data.
[0153] In the embodiment of the present application, the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor can be obtained, and based on the angular velocity data, it is identified that the initial electrical data has an abnormality, and the abnormality can be a slope abnormality. When it is determined that the initial electrical data has an abnormal slope, the electrical data with an abnormal slope is processed to obtain target electrical data, and the target angle information is determined based on the target electrical data. That is, by eliminating the slope abnormality data in the initial electrical data, the effect of flexibly eliminating the interference of the initial electrical data is achieved, and based on the initial electrical data after the interference is eliminated, more accurate target angle information is obtained, which effectively improves the accuracy of displacement measurement or position positioning.
[0154] Below, the first slope is taken as the first slope corresponding to each pair of adjacent electrical property values in the initial electrical property data, and the reference slope may be the second slope corresponding to a plurality of consecutive pairs of adjacent electrical property values in the initial electrical property data.
[0155] Figure 6 600 is a schematic flow chart of a data processing method 600 provided in an embodiment of the present application. Figure 6 As shown, the method 600 may include the following steps:
[0156] S601, acquiring initial electrical data collected by the TMR sensor, and acquiring angular velocity data collected by the angular velocity sensor.
[0157] S602: Identify, based on the angular velocity data, whether the initial electrical data is abnormal.
[0158] In a possible implementation, the electronic device can calculate a first angle based on the initial electrical data and a second angle based on the angular velocity data, so as to identify that the initial electrical data is abnormal when the first angle and the second angle match. For details, please refer to the description in the above embodiment, which will not be repeated here to avoid repetition.
[0159] S603, calculating a first slope corresponding to each pair of adjacent electrical property values in the initial electrical property data.
[0160] In one possible case, the initial electrical data includes 10 electrical values, such as electrical value 1, electrical value 2, electrical value 3, electrical value 4, electrical value 5, electrical value 6, electrical value 7, electrical value 8, electrical value 9 and electrical value 10. The electronic device can respectively calculate the first slope corresponding to the electrical value 1 and the electrical value 2, the first slope corresponding to the electrical value 3 and the electrical value 4, the first slope corresponding to the electrical value 5 and the electrical value 6, the first slope corresponding to the electrical value 7 and the electrical value 8, and the first slope corresponding to the electrical value 9 and the electrical value 10.
[0161] For example, the electrical value 1 is (x1, y1), the electrical value 2 is (x2, y2), the electrical value 3 is (x3, y3), the electrical value 4 is (x4, y4), the electrical value 5 is (x5, y5), the electrical value 6 is (x6, y6), the electrical value 7 is (x7, y7), the electrical value 8 is (x8, y8), the electrical value 9 is (x9, y9), and the electrical value 10 is (x10, y10). The first slope of the electrical value 1 and the electrical value 2 is The first slope between the electrical property value 3 and the electrical property value 4 is The first slope between the electrical property value 5 and the electrical property value 6 is The first slope between the electrical property value 7 and the electrical property value 8 is The first slope between the electrical property value 9 and the electrical property value 10 is
[0162] S604, determining second slopes corresponding to a plurality of consecutive pairs of adjacent electrical property values.
[0163] In a possible case, the electronic device may determine the average of the first slopes corresponding to the above-mentioned multiple pairs of adjacent electrical property values as the second slopes corresponding to the multiple pairs of adjacent electrical property values.
[0164] When the initial electrical property data includes the above-mentioned 10 electrical property values, the consecutive multiple pairs of adjacent electrical property values here can be five consecutive pairs of adjacent electrical property values, such as electrical property value 1 and electrical property value 2, electrical property value 3 and electrical property value 4, electrical property value 5 and electrical property value 6, electrical property value 7 and electrical property value 8, and electrical property value 9 and electrical property value 10.
[0165] For example, the second slope corresponding to five consecutive pairs of adjacent electrical property values may be:
[0166] S605, comparing the first slopes and the second slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values to determine a target electrical property value having an abnormality in the first slope.
[0167] In one possible implementation, the difference between the first slope and the second slope corresponding to the first pair of adjacent electrical property values is calculated, and when the ratio between the difference and the second slope is greater than the slope ratio threshold, the first electrical property value included in the first pair of adjacent electrical property values is determined as the target electrical property value with an abnormal first slope.
[0168] In a possible case, the first pair of adjacent electrical property values here is any pair of adjacent electrical property values among the above-mentioned multiple consecutive pairs of adjacent electrical property values.
[0169] Exemplarily, corresponding to the above S604, when the above initial electrical data includes 10 electrical property values, the first pair of adjacent electrical property values here can be the above electrical property value 1 and electrical property value 2, electrical property value 3 and electrical property value 4, electrical property value 5 and electrical property value 6, electrical property value 7 and electrical property value 8, or electrical property value 9 and electrical property value 10.
[0170] Exemplarily, when the ratio of the difference between the first slope k1 corresponding to the electrical property value 1 and the electrical property value 2 and the above-mentioned second slope k and the second slope k is greater than the slope ratio threshold, the electrical property value 2 among the electrical property value 1 and the electrical property value 2 is determined as the target electrical property value in which the first slope is abnormal.
[0171] Similarly, the electronic device can determine whether the first slope of electrical property value 3 and electrical property value 4, electrical property value 5 and electrical property value 6, electrical property value 7 and electrical property value 8, or electrical property value 9 and electrical property value 10 has an abnormal target electrical property value by using the relationship between the slope difference, the ratio of the second slope and the slope ratio threshold.
[0172] Exemplarily, the slope ratio threshold may be 10%, that is, when the ratio of the difference between the first slope and the second slope to the second slope is greater than 10%, it is determined that the first slope has an abnormal target electrical property value.
[0173] In another possible implementation, when the direction of the first slope corresponding to the first pair of adjacent electrical property values is opposite to the direction of the second slope, the first electrical property value included in the first pair of adjacent electrical property values can be determined as the target electrical property value with an abnormal first slope. The first pair of adjacent electrical property values also includes a second electrical property value, and the collection time of the first electrical property value is different from the collection time of the second electrical property value.
[0174] Exemplarily, as above, the first pair of adjacent electrical property values here can also be the above-mentioned electrical property value 1 and electrical property value 2, electrical property value 3 and electrical property value 4, electrical property value 5 and electrical property value 6, electrical property value 7 and electrical property value 8, or electrical property value 9 and electrical property value 10. When the first slope k1 corresponding to the electrical property value 1 and the electrical property value 2 is in the opposite direction to the above-mentioned second slope k, the electronic device determines the electrical property value 1 (i.e., the second electrical property value) and the electrical property value 2 (i.e., the first electrical property value) as the target electrical property values with an abnormal first slope.
[0175] Similarly, the electronic device can determine that the first slope of electrical property value 3 and electrical property value 4, electrical property value 5 and electrical property value 6, electrical property value 7 and electrical property value 8, or electrical property value 9 and electrical property value 10 has an abnormal target electrical property value.
[0176] S606, processing the target electrical property value having an abnormal first slope to obtain target electrical property data.
[0177] In some embodiments, the electronic device may delete the target electrical property value having an abnormal first slope to obtain the target electrical property data.
[0178] In other embodiments, the electronic device may also replace the target electrical property data having an abnormal first slope to obtain the target electrical property data.
[0179] S607: Determine target angle information according to the target electrical property data.
[0180] In an embodiment of the present application, when it is determined that the initial electrical data has an abnormality, the first slope corresponding to each pair of adjacent electrical values in the initial electrical data can be flexibly compared with the second slopes corresponding to multiple consecutive pairs of adjacent electrical values in the initial electrical data to determine the electrical values with abnormalities in the first slope, and perform data processing on the electrical values with abnormalities in the first slope to obtain the target electrical data after interference elimination.
[0181] In some embodiments, the target electrical data may be obtained by replacing abnormal electrical data in the initial electrical data with fitting data, and the target angle may be determined based on the target electrical data.
[0182] Figure 7 700 is a schematic flow chart of a data processing method 700 provided in an embodiment of the present application. Figure 7 As shown, the method 700 may include the following steps:
[0183] S701, acquiring initial electrical data collected by the TMR sensor, and acquiring angular velocity data collected by the angular velocity sensor.
[0184] S702: Identify, based on the angular velocity data, whether the initial electrical data is abnormal.
[0185] S703, determining abnormal electrical property data in the initial electrical property data.
[0186] S704, determining fitting electrical data corresponding to the abnormal electrical data according to the normal electrical data in the initial electrical data, wherein the normal electrical data refers to the electrical data in the initial electrical data except the abnormal electrical data.
[0187] In some embodiments, the abnormal electrical data is electrical data having an abnormal slope in the initial electrical data, and the electronic device may determine fitting data for the abnormal electrical data based on the slope corresponding to the initial electrical data and the normal electrical data.
[0188] In one possible implementation, the normal electrical property data includes multiple normal electrical property values, and the initial electrical property data includes multiple electrical property values. The electronic device can determine the fitting data corresponding to the slope abnormal data based on the third slope corresponding to the multiple electrical property values and the multiple normal electrical property values, and the fitting data included in the fitting data has the same slope as the third slope corresponding to the normal electrical property values included in the normal electrical data.
[0189] In a possible case, the third slope is one, and the third slope may be a slope corresponding to multiple electrical property values in the initial electrical property data.
[0190] Exemplarily, when the initial electrical property data includes 10 electrical property values, the third slope may be the slope corresponding to the electrical property values 1 to 10, i.e., the second slope shown in the above embodiment. When electrical property value 2 is an abnormal value, the electronic device may determine fitting data based on the electrical property values (i.e., normal data) other than electrical property value 2 among the 10 electrical property values and the third slope here, and the slope of the fitting data and the electrical property values other than electrical property value 2 is the same as the third slope.
[0191] In another possible case, the third slope is multiple, that is, each third slope is a slope corresponding to a different electrical property value in the initial electrical property data.
[0192] Exemplarily, when the initial electrical property data includes 30 electrical property values, electrical property values 1 to 10 can correspond to a third slope 1 (i.e., the second slope mentioned above), electrical property values 11 to 20 can correspond to a third slope 2, and electrical property values 21 to 30 can correspond to a third slope 3.
[0193] When the electrical property value 2 is an abnormal value, the electronic device can determine fitting data based on the electrical property values 1 to 10 except the electrical property value 2 (i.e., normal data) and the third slope 1 here, and the slope of the fitting data and the electrical property values 1 to 10 except the electrical property value 2 is the same as the third slope 1.
[0194] When the electrical property value 18 is an abnormal value, the electronic device can determine fitting data based on the electrical property values 11 to 20 except the electrical property value 18 (i.e., normal data) and the third slope 2 here, and the slope of the fitting data and the electrical property values 11 to 20 except the electrical property value 18 is the same as the third slope 2.
[0195] When the electrical property value 23 is an abnormal value, the electronic device can determine fitting data based on the electrical property values 21 to 30 except the electrical property value 23 (i.e., normal data) and the third slope 3 here, and the slope of the fitting data and the electrical property values 21 to 30 except the electrical property value 23 is the same as the third slope 3.
[0196] S705, replacing the abnormal electrical property data with the fitting data to obtain target electrical property data.
[0197] S706: Determine target angle information according to the target electrical property data.
[0198] In an embodiment of the present application, when abnormal electrical data in the initial electrical data is determined, the abnormal electrical data can be replaced by fitting data, and the slope corresponding to the fitting data and the normal electrical data can be the same as the slope corresponding to the multiple electrical values included in the initial electrical data, so that the electronic device can eliminate interference in the initial electrical data through the fitting data and obtain the target electrical data.
[0199] In some embodiments, before determining the abnormal electrical data present in the above-mentioned initial electrical data, the initial electrical data can also be filtered to obtain filtered electrical data, abnormal data present in the filtered electrical data can be determined, and based on processing the abnormal electrical data, target electrical data can be obtained, and target angle information can be determined based on the target electrical data.
[0200] Figure 8 800 is a schematic flow chart of a data processing method 800 provided in an embodiment of the present application. Figure 8 As shown, the method 800 may include the following steps:
[0201] S801, acquiring initial electrical data collected by the TMR sensor, and acquiring angular velocity data collected by the angular velocity sensor.
[0202] S802: Identify, based on the angular velocity data, whether the initial electrical data is abnormal.
[0203] S803, filtering the initial electrical property data to obtain filtered electrical property data.
[0204] In some embodiments, the electronic device may convert the initial electrical property data from time domain signal data into frequency domain signal data, and perform filtering processing on the frequency domain signal data to obtain the filtered electrical property data.
[0205] In a possible implementation, the electronic device may convert the initial electrical data from time domain signal data into frequency domain signal data through Fourier transform, and perform filtering processing on the frequency domain signal data to obtain the filtered electrical data.
[0206] S804, determining abnormal electrical property data in the filtered electrical property data.
[0207] S805, processing the abnormal electrical property data to obtain target electrical property data.
[0208] S806: Determine target angle information according to the target electrical property data.
[0209] In an embodiment of the present application, when there are abnormalities in the initial electrical data, the initial electrical data can be first filtered to filter out defective electrical values, such as fixed-frequency noise, thereby effectively reducing the workload of subsequent abnormal electrical data determination operations, as well as reducing the amount of data processing in the process of processing the electrical data to obtain the target electrical data, thereby improving the efficiency of interference elimination.
[0210] It should be understood that the above embodiments may be coupled to each other, and this application does not limit this. Moreover, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0211] Combined with the above Figures 1 to 8 , describes in detail the data processing method of the embodiment of the present application, and will be combined with Fig. 9 and Fig.10 , describes in detail the data processing device of an embodiment of the present application.
[0212] Fig. 9 A data processing device 900 provided in an embodiment of the present application is shown. The data processing device 900 is applied to an electronic device including a tunnel magnetoresistive TMR sensor and an angular velocity sensor, and the data processing device 900 includes: an acquisition module 901 , an abnormality identification module 902 and a processing module 903 .
[0213] Among them, the acquisition module 901 is used to acquire the initial electrical data collected by the TMR sensor and the angular velocity data collected by the angular velocity sensor; the abnormality identification module 902 is used to: identify the presence of abnormalities in the above-mentioned initial electrical data based on the angular velocity data; the processing module 903 is used to: determine the abnormal electrical data present in the initial electrical data, and process the abnormal electrical data to obtain target electrical data; and determine the target angle information based on the target electrical data.
[0214] Optionally, the above-mentioned initial electrical data includes first electrical data and second electrical data collected by the above-mentioned TMR sensor under different magnetic field angles; the abnormality identification module 902 is used to: calculate and obtain a first angle based on the above-mentioned first electrical data and the above-mentioned second electrical data; calculate and obtain a second angle based on the above-mentioned angular velocity data and the collection time of the above-mentioned angular velocity data; when the above-mentioned first angle does not match the above-mentioned second angle, determine that the above-mentioned initial electrical data has an abnormality.
[0215] Optionally, the abnormality identification module 902 is used to: determine that there is an abnormality in the above-mentioned initial electrical data when the above-mentioned first angle is different from the above-mentioned second angle; or determine that there is an abnormality in the above-mentioned initial electrical data when the angle difference between the above-mentioned first angle and the above-mentioned second angle is greater than an angle threshold.
[0216] Optionally, the above-mentioned initial electrical data includes multiple electrical property values; the processing module 903 is used to: determine the first slope corresponding to each electrical property value in the above-mentioned initial electrical data; according to the first slopes corresponding to the above-mentioned each electrical property value, determine the target electrical property value in which the first slope has an abnormality, and use the above-mentioned target electrical property value as the abnormal electrical data.
[0217] Optionally, the processing module 903 is used to: calculate the first slope corresponding to each pair of adjacent electrical property values in the above-mentioned initial electrical property data; determine the second slope corresponding to multiple consecutive pairs of adjacent electrical property values; compare the first slopes corresponding to the above-mentioned multiple consecutive pairs of adjacent electrical property values with the above-mentioned second slopes to determine the target electrical property value where the first slope has an abnormality.
[0218] Optionally, the processing module 903 is used to: calculate the difference between the first slope corresponding to the first pair of adjacent electrical property values and the above-mentioned second slope; the above-mentioned first pair of adjacent electrical property values is any pair of adjacent electrical property values among the above-mentioned multiple consecutive pairs of adjacent electrical property values; when the ratio between the above-mentioned difference and the above-mentioned second slope is greater than the slope ratio threshold, the first electrical property value included in the above-mentioned first pair of adjacent electrical property values is determined as the target electrical property value with an abnormality in the first slope; or, when the direction of the first slope corresponding to the above-mentioned first pair of adjacent electrical property values is opposite to the direction of the above-mentioned second slope, the first electrical property value included in the above-mentioned first pair of adjacent electrical property values is determined as the target electrical property value with an abnormality in the first slope; wherein the above-mentioned first pair of adjacent electrical property values also includes a second electrical property value, and the collection time of the above-mentioned first electrical property value is different from the collection time of the above-mentioned second electrical property value.
[0219] Optionally, the processing module 903 is used to: determine the average of the first slopes corresponding to the above-mentioned multiple consecutive pairs of adjacent electrical property values as the second slopes corresponding to the above-mentioned multiple consecutive pairs of adjacent electrical property values.
[0220] Optionally, the processing module 903 is used to: determine the fitting electrical data corresponding to the above-mentioned abnormal electrical data based on the normal electrical data in the above-mentioned initial electrical data, the above-mentioned normal electrical data refers to the electrical data in the above-mentioned initial electrical data except the above-mentioned abnormal electrical data; replace the above-mentioned abnormal electrical data with the above-mentioned fitting data to obtain the above-mentioned target electrical data.
[0221] Optionally, the above-mentioned initial electrical property data includes multiple electrical property values, and the above-mentioned normal electrical property data includes multiple normal electrical property values; the processing module 903 is used to: determine the fitting data corresponding to the slope abnormal data based on the third slope corresponding to the above-mentioned multiple electrical property values and the above-mentioned multiple normal electrical property values, and the slope corresponding to the fitting values included in the above-mentioned fitting data and the normal electrical property values included in the above-mentioned normal electrical property data is the same as the above-mentioned third slope.
[0222] Optionally, the processing module 903 is used to: filter the initial electrical data to obtain filtered electrical data; and determine abnormal electrical data in the filtered electrical data.
[0223] Optionally, the processing module 903 is used to: convert the initial electrical data from time domain signal data into frequency domain signal data; and perform filtering processing on the frequency domain signal data to obtain the filtered electrical data.
[0224] It should be understood that the data processing device 900 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the data processing device 900 may be specifically an electronic device in the above-mentioned embodiment, or the functions of the electronic device in the above-mentioned embodiment may be integrated in the data processing device 900, and the data processing device 900 may be used to execute the various processes and / or steps corresponding to the electronic device in the above-mentioned method embodiment. To avoid repetition, they will not be repeated here. The above-mentioned data processing device 900 has the function of implementing the corresponding steps performed by the electronic device in the above-mentioned method; the above-mentioned functions can be implemented by hardware, or can be implemented by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. In an embodiment of the present application, Fig. 9 The data processing device 900 in the embodiment may also be a chip or a chip system, for example, a system on chip (SoC).
[0225] Fig.10 An electronic device 1000 provided in an embodiment of the present application is shown. The electronic device 1000 includes: a processor 1001 and a memory 1002, a communication interface 1003 and a bus 1004. The memory 1002 is used to store instructions, and the processor 1001 is used to execute the instructions stored in the memory 1002. The processor 1001, the memory 1002 and the communication interface 1003 are connected to each other through the bus 1004.
[0226] Among them, the electronic device 1000 includes a tunnel magnetoresistance TMR sensor and an angular velocity sensor, and the processor 1001 is used to: obtain initial electrical data collected by the TMR sensor, and obtain angular velocity data collected by the angular velocity sensor; identify that the above-mentioned initial electrical data is abnormal based on the angular velocity data; determine abnormal electrical data existing in the initial electrical data, and process the abnormal electrical data to obtain target electrical data; determine target angle information based on the target electrical data.
[0227] It should be understood that the electronic device 1000 can be specifically an electronic device in the above embodiment, or the function of the electronic device in the above embodiment can be integrated in the electronic device 1000, and the electronic device 1000 can be used to execute the various steps and / or processes corresponding to the electronic device in the above method embodiment. Optionally, the memory 1002 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1001. A part of the memory 1002 may also include a non-volatile random access memory. For example, the memory 1002 may also store information about the device type. The processor 1001 can be used to execute instructions stored in the memory, and when the processor executes the instruction, the processor 1001 can execute the various steps and / or processes corresponding to the electronic device in the above method embodiment. It should be understood that in the embodiment of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general processor may be a microprocessor or the processor may be any conventional processor, etc. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here. A person of ordinary skill in the art may realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in combination with computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways.For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be 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 they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present application may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: Applied to electronic equipment, the electronic equipment includes a tunnel magnetoresistance TMR sensor and an angular velocity sensor; the method includes: Acquire initial electrical data collected by the TMR sensor, and acquire angular velocity data collected by the angular velocity sensor; identifying, based on the angular velocity data, that the initial electrical property data is abnormal; Determining abnormal electrical property data in the initial electrical property data, and processing the abnormal electrical property data to obtain target electrical property data; Target angle information is determined according to the target electrical property data.
2. The method according to claim 1, characterized in that The initial electrical data includes first electrical data and second electrical data collected by the TMR sensor at different magnetic field angles; and identifying, based on the angular velocity data, that the initial electrical data is abnormal, includes: Calculate and obtain a first angle based on the first electrical property data and the second electrical property data; Calculate and obtain a second angle based on the angular velocity data and the acquisition time of the angular velocity data; When the first angle does not match the second angle, it is determined that an abnormality exists in the initial electrical data.
3. The method according to claim 2, characterized in that When the first angle does not match the second angle, determining that the initial electrical data is abnormal includes: When the first angle is different from the second angle, determining that the initial electrical data is abnormal; or, When the angle difference between the first angle and the second angle is greater than an angle threshold, it is determined that the initial electrical data is abnormal.
4. The method according to claim 1, characterized in that: The initial electrical property data includes a plurality of electrical property values; the determining of abnormal electrical property data in the initial electrical property data includes: Determine a first slope corresponding to each electrical property value in the initial electrical property data; According to the first slopes corresponding to the various electrical property values, a target electrical property value having an abnormal first slope is determined, and the target electrical property value is used as abnormal electrical property data.
5. The method according to claim 4, characterized in that The determining of the first slope corresponding to each electrical property value in the initial electrical property data includes: Calculating a first slope corresponding to each pair of adjacent electrical property values in the initial electrical property data; The step of determining, according to the first slopes corresponding to the respective electrical property values, a target electrical property value having an abnormal first slope includes: Determine a second slope corresponding to a plurality of consecutive pairs of adjacent electrical property values; The first slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values are compared with the second slopes to determine a target electrical property value having an abnormality in the first slope.
6. The method according to claim 5, characterized in that The step of comparing the first slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values with the second slopes to determine a target electrical property value having an abnormality in the first slope includes: Calculating a difference between a first slope corresponding to a first pair of adjacent electrical property values and the second slope; the first pair of adjacent electrical property values is any pair of adjacent electrical property values among the plurality of consecutive pairs of adjacent electrical property values; When the ratio between the difference and the second slope is greater than the slope ratio threshold, determining the first electrical property value included in the first pair of adjacent electrical property values as the target electrical property value having an abnormal first slope; or, When the direction of the first slope corresponding to the first pair of adjacent electrical property values is opposite to the direction of the second slope, the first electrical property value included in the first pair of adjacent electrical property values is determined as the target electrical property value having an abnormal first slope; The first pair of adjacent electrical property values also includes a second electrical property value, and a collection time of the first electrical property value is different from a collection time of the second electrical property value.
7. The method according to claim 5, characterized in that The determining of the second slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values comprises: The average of the first slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values is determined as the second slopes corresponding to the plurality of consecutive pairs of adjacent electrical property values.
8. The method according to claim 1, characterized in that The processing of the abnormal electrical data to obtain target electrical data includes: Determining fitting electrical data corresponding to the abnormal electrical data according to normal electrical data in the initial electrical data, wherein the normal electrical data refers to electrical data in the initial electrical data except the abnormal electrical data; The abnormal electrical property data is replaced with the fitting data to obtain the target electrical property data.
9. The method according to claim 8, characterized in that The initial electrical property data includes a plurality of electrical property values, and the normal electrical property data includes a plurality of normal electrical property values; and determining the fitting electrical property data corresponding to the abnormal electrical property data according to the normal electrical property data in the initial electrical property data includes: Based on the third slopes corresponding to the multiple electrical property values and the multiple normal electrical property values, fitting data corresponding to the slope abnormality data is determined, and the slopes corresponding to the fitting values included in the fitting data and the normal electrical property values included in the normal electrical property data are the same as the third slope.
10. The method according to claim 1, characterized in that Before determining abnormal electrical property data in the initial electrical property data, the method further includes: Performing filtering on the initial electrical property data to obtain filtered electrical property data; The determining of abnormal electrical property data present in the initial electrical property data includes: Abnormal electrical property data present in the filtered electrical property data is determined.
11. The method according to claim 10, characterized in that The filtering the initial electrical property data to obtain filtered electrical property data includes: Converting the initial electrical data from time domain signal data to frequency domain signal data; Filtering is performed on the frequency domain signal data to obtain the filtered electrical property data.
12. A data processing device, characterized in that: Applicable to electronic equipment including a tunnel magnetoresistive TMR sensor and an angular velocity sensor, the data processing device includes: An acquisition module, used to acquire initial electrical data collected by the TMR sensor and acquire angular velocity data collected by the angular velocity sensor; an abnormality identification module, used for identifying, based on the angular velocity data, that the initial electrical property data is abnormal; The processing module is used to determine abnormal electrical data in the initial electrical data, and process the abnormal electrical data to obtain target electrical data; and determine target angle information according to the target electrical data.
13. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store code instructions; the processor is used to run the code instructions to execute the method according to any one of claims 1 to 11.
14. A computer program product, comprising computer program code, characterized in that: When the computer program code is executed on a computer, the computer is caused to implement the method according to any one of claims 1 to 11.