[go: up one dir, main page]

CN113851215B - Magnetic sensor data processing method, device, terminal and storage medium - Google Patents

Magnetic sensor data processing method, device, terminal and storage medium Download PDF

Info

Publication number
CN113851215B
CN113851215B CN202111047592.9A CN202111047592A CN113851215B CN 113851215 B CN113851215 B CN 113851215B CN 202111047592 A CN202111047592 A CN 202111047592A CN 113851215 B CN113851215 B CN 113851215B
Authority
CN
China
Prior art keywords
magnetic field
field intensity
intensity data
data
magnetic sensor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111047592.9A
Other languages
Chinese (zh)
Other versions
CN113851215A (en
Inventor
丛冰
王建平
欧宏伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jifu Medical Technology Co ltd
Original Assignee
Shenzhen Jifu Medical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jifu Medical Technology Co ltd filed Critical Shenzhen Jifu Medical Technology Co ltd
Priority to CN202111047592.9A priority Critical patent/CN113851215B/en
Publication of CN113851215A publication Critical patent/CN113851215A/en
Application granted granted Critical
Publication of CN113851215B publication Critical patent/CN113851215B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/05Detecting, measuring or recording for diagnosis by means of electric currents or magnetic fields; Measuring using microwaves or radio waves
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/42Detecting, measuring or recording for evaluating the gastrointestinal, the endocrine or the exocrine systems
    • A61B5/4222Evaluating particular parts, e.g. particular organs
    • A61B5/4238Evaluating particular parts, e.g. particular organs stomach
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/42Detecting, measuring or recording for evaluating the gastrointestinal, the endocrine or the exocrine systems
    • A61B5/4222Evaluating particular parts, e.g. particular organs
    • A61B5/4255Intestines, colon or appendix
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Surgery (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Mathematics (AREA)
  • Veterinary Medicine (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Physiology (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Gastroenterology & Hepatology (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Endocrinology (AREA)
  • Artificial Intelligence (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Psychiatry (AREA)
  • Primary Health Care (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Epidemiology (AREA)
  • Radiology & Medical Imaging (AREA)
  • Bioinformatics & Cheminformatics (AREA)

Abstract

The invention discloses a magnetic sensor data processing method, which comprises the following steps: acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by rotating a magnetic sensor by 360 degrees; determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on the plurality of first magnetic field intensity data G; acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a j-th time point; correcting the original magnetic field intensity data D j according to B and M to obtain corrected magnetic field intensity data D jc of the magnet; acquiring acceleration data A j of the magnetic sensor at the j-th time point, which is acquired by an inertial sensor; determining a rotation matrix R j for compensating for the position and angle of the magnetic sensor according to a j; from R j、Djc and the first magnetic field strength data G, magnetic field strength data D jfrc of the magnet is determined. By the above processing, the accuracy of the magnetic field intensity data of the magnet is improved.

Description

Magnetic sensor data processing method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of medical equipment, in particular to a magnetic sensor data processing method and device applied to a gastrointestinal motility inspection system and a storage medium.
Background
Digestive system diseases are the second largest medical problem following cardiovascular diseases, and the number of patients suffering from gastrointestinal motility disorders accounts for more than half of the number of patients suffering from digestive tract diseases. Gastrointestinal motility refers to the strength and frequency of the muscle contraction peristalsis of the gastrointestinal part, dyspepsia is caused by gastrointestinal motility disorder, symptoms such as abdominal distension, constipation, nausea and vomiting can be caused by light people, diseases such as gastritis, gastroparesis, esophageal reflux and even canceration are easy to occur over time, and daily work and life of people are seriously influenced.
In the prior art, the position and posture information of the capsule provided with the magnet in the gastrointestinal tract is positioned through the magnetic sensor, and the movement track and peristaltic frequency of the capsule in the gastrointestinal tract are determined according to the position and posture information of the capsule in the gastrointestinal tract, so that a doctor can be assisted in evaluating the position and severity of gastrointestinal motility disorder. The accuracy and precision of the magnetic field intensity data of the magnet in the capsule acquired by the magnetic sensor are affected by the correction of the magnetic sensor, the compensation of the position and the posture of the magnetic sensor, the removal of geomagnetism and environmental interference magnetic fields, the removal of human respiration and motion influence and the like.
In the prior art, in the aspect of magnetic sensor correction, measurement and correction are mainly carried out in a single direction or in a plurality of directions; in the aspect of magnetic sensor position and posture compensation, the position and posture data of the magnetic sensor are manually measured and recorded before the experiment starts, and only the single value is used for compensation in subsequent calculation; in the aspect of removing geomagnetism and an environmental interference magnetic field, the geomagnetism and the environmental magnetic field data are measured once before the experiment is started, and the geomagnetism and the environmental interference magnetic field are removed by subtracting the geomagnetism and the environmental magnetic field data from the measured value of the magnetic sensor.
In the prior art, the method for eliminating the influence on the magnetic field intensity of the magnet measured by the magnetic sensor increases the magnetic field intensity data error measured by the magnetic sensor because of not considering the actual scene, thereby reducing the calculation accuracy of the position and the posture of the capsule provided with the magnet and further being unfavorable for doctors to accurately evaluate the gastrointestinal motility disorder part and the severity thereof.
Disclosure of Invention
In order to solve the technical problems in the prior art, the embodiment of the invention provides a magnetic sensor data processing method, a magnetic sensor data processing device and a storage medium, which are applied to a gastrointestinal motility inspection system and aim to improve the accuracy of magnetic field intensity data of a magnet in a capsule, thereby improving the calculation accuracy of the position and the posture of the capsule provided with the magnet and further assisting a doctor in accurately evaluating the gastrointestinal motility disorder part and the severity thereof.
The embodiment of the invention provides a magnetic sensor data processing method which is applied to a gastrointestinal motility checking system and comprises the following steps: s10: acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees;
S20: determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on the plurality of first magnetic field intensity data G;
S30: acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point;
S40: correcting the original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
s50: acquiring acceleration data A j of the magnetic sensor at the j-th time point, which is acquired by an inertial sensor;
S60: determining a rotation matrix R j for compensating for the position and angle of the magnetic sensor from the acceleration data a j;
S70: and determining magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc and the first magnetic field intensity data G.
In some embodiments, the method further comprises bandpass filtering the magnetic field strength data D jfrc of the magnet to obtain real magnetic field strength data of the magnet.
In some embodiments, step S10 is preceded by:
And rotating the magnetic sensor by 360 degrees along the z axis at preset deflection angle intervals in the xy plane, and collecting the magnetic field intensity of the geomagnetic and environment integrated magnetic field when the magnetic sensor rotates by 360 degrees under each deflection angle by the magnetic sensor to obtain a plurality of first magnetic field intensity data G.
In some embodiments, step S20 includes:
when G x is the axis of maximum data change, let M x =1, determine M y、Mz、Bx、By、Bz according to the following formula,
When G y is the axis of maximum data change, let M y =1, determine M x、Mz、Bx、By、Bz according to the following formula,
When G z is the axis of maximum data change, let M z =1, determine M x、My、Bx、By、Bz according to the following formula,
In some embodiments, step S60 includes:
S601: let the included angle between the magnetic sensor and the direction of the gravity acceleration g be alpha, then
Cosα=ac z/g, let the rotation angle of the magnetic sensor in xy plane be β, then
Determining angles alpha and beta according to the two formulas;
s602: from α and β, the rotation matrix R is determined according to the following two formulas:
In some embodiments, step S70 includes:
s701: performing angle supplementation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
s702: determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental integrated magnetic field of the magnetic sensor at angles a and β according to the following formula,
G′=Rjx(α)Rjy(β)G;
S703: removing the interference of the geomagnetism and the integrated magnetic field from the compensated and corrected magnetic field intensity data D jrc according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
An embodiment of the present invention provides a magnetic sensor data processing apparatus, including:
and a data acquisition module: the method comprises the steps of acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees, acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point, and acquiring acceleration data A j of the magnetic sensor acquired by an inertial sensor at the jth time point;
correction coefficient determination module: determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on a plurality of the first magnetic field intensity data G;
and a data correction module: the method comprises the steps of correcting original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
A rotation matrix determining module: determining a rotation matrix R j for compensating for the magnetic sensor position and angle from the acceleration data a j;
A magnetic field intensity data determination module: for determining magnetic field strength data D jfrc of the magnet from the rotation matrix R j, the corrected magnetic field strength data D jc, and the first magnetic field strength data G.
In some embodiments, the magnetic field strength data determination module comprises:
the data compensation unit is used for performing angle compensation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
A combined magnetic field component determining unit for determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental combined magnetic field of the magnetic sensor at angles alpha and beta according to the following formula,
G′=Rjx(α)Rjy(β)G;
The magnetic field intensity data is determined, which is used for removing the interference of geomagnetism and the integrated magnetic field to the magnetic field intensity data D jrc after compensation and correction according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
An embodiment of the present invention provides a computer device, including a processor and a memory, where the memory is configured to store at least one section of computer program, where the at least one section of computer program is loaded by the processor and executes the magnetic sensor data processing method described in any one of the embodiments above.
An embodiment of the present invention provides a computer readable storage medium, where at least one instruction, at least one section of a program, a code set, or an instruction set is stored, where the instruction, the program, the code set, or the instruction set is used to execute the magnetic sensor data processing method described in any one of the foregoing embodiments.
The embodiment of the invention provides a magnetic sensor data processing method, which comprises the following steps: acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees; determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on the plurality of first magnetic field intensity data G; acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point; correcting the original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet; acquiring acceleration data A j of the magnetic sensor at the j-th time point, which is acquired by an inertial sensor; determining a rotation matrix R j for compensating for the position and angle of the magnetic sensor from the acceleration data a j; and determining magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc and the first magnetic field intensity data G. The data processing method corrects the magnetic sensor by rotating the magnetic sensor for a plurality of times and collecting magnetic field intensity data of a geomagnetic and environmental integrated magnetic field; the position and the posture of the magnetic sensor are compensated in real time through acceleration data of the magnetic sensor, which are acquired in real time by an inertial sensor; and then removing the interference of geomagnetism and an environment comprehensive magnetic field through the real-time position and the gesture of the magnetic sensor to obtain the magnetic field intensity data of the magnet. Through the above processing, the accuracy of the magnetic field intensity data of the magnet is improved, so that the calculation accuracy of the position and the posture of the capsule provided with the magnet is improved, and a doctor is assisted to accurately evaluate the gastrointestinal motility disorder part and the severity thereof.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain, without limitation, the embodiments of the invention.
In the drawings:
FIG. 1 is a flow chart of a magnetic sensor data processing method according to an embodiment of the invention;
FIG. 2 is a block diagram of a magnetic sensor data processing device according to an embodiment of the present invention;
Fig. 3 is a block diagram of a magnetic field strength data determining module in a magnetic sensor data processing apparatus according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Unless explicitly stated, the method embodiments described herein are not limited to a particular order or sequence of steps, operations or processes. Additionally, some of the method embodiments described, steps or elements thereof may occur or be performed concurrently or with other steps or elements.
The gastrointestinal motility inspection system according to the embodiment of the present invention may be a gastrointestinal motility inspection system disclosed in chinese patent application with publication number CN112494027a, entitled "gastrointestinal motility inspection system", or may be other gastrointestinal motility inspection systems in the prior art, which is not limited herein. The number of magnetic sensors is not limited herein.
As shown in fig. 1, an embodiment of the present invention provides a magnetic sensor data processing method, which is applied to a gastrointestinal motility inspection system, including the steps of: the execution subject of the following steps may be a terminal device such as a PC or a mobile terminal, and is not limited herein. S10: acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees;
S20: determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on the plurality of first magnetic field intensity data G;
S30: acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point;
S40: correcting the original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
s50: acquiring acceleration data A j of the magnetic sensor at the j-th time point, which is acquired by an inertial sensor;
S60: determining a rotation matrix R j for compensating for the position and angle of the magnetic sensor from the acceleration data a j;
S70: and determining magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc and the first magnetic field intensity data G.
According to the magnetic sensor data processing method provided by the embodiment of the invention, the magnetic sensor is corrected by rotating the magnetic sensor for a plurality of times and collecting magnetic field intensity data of a geomagnetic and environment integrated magnetic field; the position and the posture of the magnetic sensor are compensated in real time through acceleration data of the magnetic sensor, which are acquired in real time by an inertial sensor; and then removing the interference of geomagnetism and an environment comprehensive magnetic field through the real-time position and the gesture of the magnetic sensor to obtain the magnetic field intensity data of the magnet. Through the above processing, the accuracy of the magnetic field intensity data of the magnet is improved, so that the calculation accuracy of the position and the posture of the capsule provided with the magnet is improved, and a doctor is assisted to accurately evaluate the gastrointestinal motility disorder part and the severity thereof.
In some embodiments, the magnetic sensor data processing method further includes bandpass filtering the magnetic field intensity data D jfrc of the magnet to obtain real magnetic field intensity data of the magnet. Thus, the accuracy of the data acquired by the magnetic sensor is further improved.
After the real magnetic field intensity data of the magnet are obtained through the data processing method in the embodiment, the terminal equipment determines the position and posture information and the movement frequency of the gastrointestinal motility capsule in the stomach and intestine according to the real magnetic field intensity data; the terminal device is used for determining the peristaltic frequency of the stomach and/or the intestines according to the position and posture information or the movement frequency. For a specific implementation method of the terminal device, please refer to the chinese patent application with publication number CN112494027a, entitled "gastrointestinal motility inspection system", which is not described herein.
In some embodiments, the step S10 includes, before: and rotating the magnetic sensor by 360 degrees along the z axis at preset deflection angle intervals in the xy plane, and collecting the magnetic field intensity of the geomagnetic and environment integrated magnetic field when the magnetic sensor rotates by 360 degrees under each deflection angle by the magnetic sensor to obtain a plurality of first magnetic field intensity data G.
In practice, as the subject wears the positioning plate (the magnetic sensor is arranged on the positioning plate) to walk at will, the direction of the magnetic sensor in the positioning plate can be any more directions in 360 degrees, and therefore, only one or more directions are adopted to correct the magnetic sensor, which can cause inaccurate correction of the magnetic sensor, thereby introducing residual errors and reducing the accuracy of calculation of the position and the posture of the capsule provided with the magnet. In the embodiment of the present invention, before the patient swallows the capsule provided with the magnet, the magnetic sensor is rotated 360 ° along the axis perpendicular to the plane in a cartesian coordinate system by a preset deflection angle, which may be set as required, for example, 5 °,10 °, etc., without limitation. And acquiring the magnetic field intensity of the geomagnetic and environmental integrated magnetic field once every rotation until 360-degree deflection is completed in the plane, so as to obtain a plurality of first magnetic field intensity data G= (Gx, gy, gz). For example, the magnetic sensor is rotated 360 ° along the z-axis in the xy-plane at a deflection angle of 10 °, and the first magnetic field intensity data G is acquired 36 times in total for each deflection rotation. Thus, the 360-degree panoramic correction method can comprehensively, efficiently and accurately correct each magnetic sensor.
In some embodiments, the step S20 includes:
In the Gx, gy, and Gz components, the scale correction coefficient M corresponding to the axis with the largest data change amount is set to 1. When G x is the axis of maximum data change, let M x =1, determine M y、Mz、Bx、By、Bz according to the following formula,
When G y is the axis of maximum data change, let M y =1, determine M x、Mz、Bx、By、Bz according to the following formula,
When G z is the axis of maximum data change, let M z =1, determine M x、My、Bx、By、Bz according to the following formula,
After a patient swallows a capsule provided with a magnet, the magnetic sensor acquires raw magnetic field intensity data D of the capsule in the gastrointestinal tract at each time point, and when the capsule is discharged from the body, the magnetic sensor acquires raw magnetic field intensity data D j of the magnet acquired at the jth time point.
Correcting the original magnetic field intensity data D j of the magnet acquired by the magnetic sensor at the jth time point according to the following formula to obtain corrected magnetic field intensity data D jc=(Djcx,Djcy,Djcz),
Djcx=Mx×(Djx-Bx),
Djcy=My×(Djy-By),
Djcz=Mz×(Djz-Bz)。
In some embodiments, an inertial sensor (Inertial measurement Unit, IMU) may be disposed on the locating plate where the magnetic sensor is located, the IMU being configured to collect acceleration data Ac of the magnetic sensor at each point in time (including the j-th point in time). And acquiring acceleration data A j of the magnetic sensor acquired by the IMU at the j-th time point.
The method for determining the rotation matrix R for compensating the position and angle of the magnetic sensor according to the acceleration data a j in the step S60 is specifically as follows:
S601: let the included angle between the magnetic sensor and the direction of the gravity acceleration g be alpha, then
Cosα=ac z/g, let the rotation angle of the magnetic sensor in xy plane be β, then
The angles α and β are determined according to the above two formulas, and the specific method is the prior art and will not be described herein again;
S602: from α and β, the rotation matrix r= (R jx(α),Rjy (β)) is determined according to the following two formulas:
further, the step S70 determines the magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc, and the first magnetic field intensity data G, and specifically includes:
S701: the corrected magnetic field intensity data D jc is angle-supplemented by the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc, specifically,
Djrc=Rjx(α)Rjy(β)Djc
S702: determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental integrated magnetic field of the magnetic sensor at angles a and β according to the following formula,
G′=Rjx(α)Rjy(β)G;
S703: removing the interference of the geomagnetism and the integrated magnetic field from the compensated and corrected magnetic field intensity data D jrc according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
According to the magnetic sensor data processing method provided by the embodiment of the invention, the magnetic sensor is corrected by rotating the magnetic sensor for a plurality of times and collecting magnetic field intensity data of a geomagnetic and environment integrated magnetic field; the position and the posture of the magnetic sensor are compensated in real time through acceleration data of the magnetic sensor, which are acquired in real time by an inertial sensor; and then removing the interference of geomagnetism and an environment comprehensive magnetic field through the real-time position and the gesture of the magnetic sensor to obtain the magnetic field intensity data of the magnet. Through the above processing, the accuracy of the magnetic field intensity data of the magnet is improved, so that the calculation accuracy of the position and the posture of the capsule provided with the magnet is improved, and a doctor is assisted to accurately evaluate the gastrointestinal motility disorder part and the severity thereof.
As shown in fig. 2, an embodiment of the present invention provides a magnetic sensor data processing apparatus including:
and a data acquisition module: the method comprises the steps of acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees, acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point, and acquiring acceleration data A j of the magnetic sensor acquired by an inertial sensor at the jth time point;
correction coefficient determination module: determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on a plurality of the first magnetic field intensity data G;
and a data correction module: the method comprises the steps of correcting original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
A rotation matrix determining module: determining a rotation matrix R j for compensating for the magnetic sensor position and angle from the acceleration data a j;
A magnetic field intensity data determination module: for determining magnetic field strength data D jfrc of the magnet from the rotation matrix R j, the corrected magnetic field strength data D jc, and the first magnetic field strength data G.
As shown in fig. 3, in some embodiments, the magnetic field strength data determination module includes:
the data compensation unit is used for performing angle compensation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
A combined magnetic field component determining unit for determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental combined magnetic field of the magnetic sensor at angles alpha and beta according to the following formula,
G′=Rjx(α)Rjy(β)G;
The magnetic field intensity data is determined, which is used for removing the interference of geomagnetism and the integrated magnetic field to the magnetic field intensity data D jrc after compensation and correction according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
The specific execution method of each module of the magnetic sensor data processing device and the unit of each module is referred to the specific description of the corresponding method item, and will not be repeated here.
The embodiment of the invention provides a terminal which can be electronic equipment such as a mobile phone, a tablet computer, wearable equipment, a PC and the like. The terminal is used for implementing the magnetic sensor data processing method provided in the above embodiment. The terminal may be a terminal device in chinese patent application publication number CN112494027a, entitled "gastrointestinal motility examination system". Specifically, the present invention relates to a method for manufacturing a semiconductor device. Generally, the terminal includes: a processor and a memory.
The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field Programmable GATE ARRAY ), PLA (Programmable Logic Array, programmable logic array). The processor may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor may incorporate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory is used to store at least one instruction, at least one program, set of codes, or set of instructions configured to be executed by one or more processors to implement the magnetic sensor data processing method described above. In some embodiments, the terminal may further optionally include: a peripheral interface and at least one peripheral. The processor, memory, and peripheral interfaces may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface via buses, signal lines or circuit boards. Specifically, the peripheral device includes: at least one of a radio frequency circuit, a display screen, a camera assembly, an audio circuit and a power supply.
The embodiment of the invention also provides a computer readable storage medium, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one section of program, the code set or the instruction set is executed by a processor to realize the magnetic sensor data processing method.
Alternatively, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory ), SSD (Solid STATE DRIVES), or optical disk, etc. The random access memory may include, among other things, reRAM (RESISTANCE RANDOM ACCESS MEMORY, resistive random access memory) and DRAM (Dynamic Random Access Memory ).
Embodiments of the present invention also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the terminal performs the above-described magnetic sensor data processing method.
The foregoing details of the optional implementation of the embodiment of the present invention have been described in conjunction with the accompanying drawings, but the embodiment of the present invention is not limited to the specific details of the foregoing implementation, and various simple modifications may be made to the technical solution of the embodiment of the present invention within the scope of the technical concept of the embodiment of the present invention, where all the simple modifications belong to the protection scope of the embodiment of the present invention.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, various possible combinations of embodiments of the present invention are not described in detail.
In addition, any combination of various embodiments of the present invention may be performed, so long as the concept of the embodiments of the present invention is not violated, and the disclosure of the embodiments of the present invention should also be considered.

Claims (5)

1. A magnetic sensor data processing method applied to a gastrointestinal motility inspection system, comprising the steps of:
Rotating a magnetic sensor by 360 degrees along a z axis at preset deflection angle intervals in an xy plane, and collecting the magnetic field intensity of geomagnetism and environment integrated magnetic fields when the magnetic sensor rotates by 360 degrees under each deflection angle to obtain a plurality of first magnetic field intensity data G;
S10: acquiring a plurality of first magnetic field intensity data G of geomagnetic and environment integrated magnetic fields acquired by a magnetic sensor along a coordinate system rotating 360 degrees;
s20: determining an offset correction coefficient B and a scale correction coefficient M for correcting the magnetic sensor based on the plurality of first magnetic field intensity data G; when G x is the axis of maximum data change, let M x =1, determine M y、Mz、Bx、By、Bz according to the following formula,
When G y is the axis of maximum data change, let M y =1, determine M x、Mz、Bx、By、Bz according to the following formula,
When G z is the axis of maximum data change, let M z =1, determine M x、My、Bx、By、Bz according to the following formula,
S30: acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a jth time point; s40: correcting the original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
S50: acquiring acceleration data A j of the magnetic sensor at the j-th time point, which is acquired by an inertial sensor; s60: determining a rotation matrix R for compensating the position and angle of the magnetic sensor according to the acceleration data a j, and specifically further includes:
s601: let the included angle between the magnetic sensor and the direction of the gravity acceleration g be alpha, cosalpha=Ac z/g,
Let the rotation angle of the magnetic sensor in the xy plane be beta
Determining angles alpha and beta according to the two formulas;
S602: from α and β, the rotation matrix R j is determined according to two formulas:
S70: determining magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc and the first magnetic field intensity data G, and performing band-pass filtering on the magnetic field intensity data D jfrc of the magnet to obtain real magnetic field intensity data of the magnet, wherein the method specifically further comprises:
s701: performing angle supplementation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
S702: determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental integrated magnetic field of the magnetic sensor at angles a and β according to the following formula,
G′=Rjx(α)Rjy(β)G;
S703: removing the interference of the geomagnetism and the integrated magnetic field from the compensated and corrected magnetic field intensity data D jrc according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
2. A magnetic sensor data processing apparatus, comprising:
And a data acquisition module: a a plurality of first magnetic field intensity data G that is used for acquireing geomagnetic and environment integrated magnetic field that the magnetic sensor rotated 360 along the coordinate system, specifically is: rotating the magnetic sensor by 360 degrees along the z axis at preset deflection angle intervals in the xy plane, wherein the magnetic sensor acquires the magnetic field intensity of the geomagnetic and environmental integrated magnetic field when rotating by 360 degrees under each deflection angle to obtain a plurality of first magnetic field intensity data G, the magnetic sensor is further used for acquiring original magnetic field intensity data D j of a magnet acquired by the magnetic sensor at a j-th time point and acquiring acceleration data A j of the magnetic sensor acquired by the inertial sensor at the j-th time point;
Correction coefficient determination module: the method is used for determining an offset correction coefficient B and a proportion correction coefficient M for correcting the magnetic sensor according to a plurality of first magnetic field intensity data G, and specifically comprises the following steps: when G x is the axis of maximum data change, let M x =1, determine M y、Mz、Bx、By、Bz according to the following formula,
When G y is the axis of maximum data change, let M y =1, determine M x、Mz、Bx、By、Bz according to the following formula,
When G z is the axis of maximum data change, let M z =1, determine M x、My、Bx、By、Bz according to the following formula,
And a data correction module: the method comprises the steps of correcting original magnetic field intensity data D j of the magnet according to the offset correction coefficient B and the proportion correction coefficient M to obtain corrected magnetic field intensity data D jc of the magnet;
A rotation matrix determining module: the rotation matrix R j for compensating the position and the angle of the magnetic sensor is determined according to the acceleration data A j, specifically:
let the included angle between the magnetic sensor and the direction of the gravity acceleration g be alpha, then
cosα=Acz/g,
Let the rotation angle of the magnetic sensor in the xy plane be beta
Determining angles alpha and beta according to the two formulas;
from α and β, the rotation matrix R j is determined according to two formulas:
A magnetic field intensity data determination module: the method is used for determining magnetic field intensity data D jfrc of the magnet according to the rotation matrix R j, the corrected magnetic field intensity data D jc and the first magnetic field intensity data G, specifically: band-pass filtering the magnetic field intensity data D jfrc of the magnet to obtain real magnetic field intensity data of the magnet, wherein the band-pass filtering specifically further comprises:
Performing angle supplementation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
Determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental integrated magnetic field of the magnetic sensor at angles a and β according to the following formula,
G′=Rjx(α)Rjy(β)G;
Removing the interference of the geomagnetism and the integrated magnetic field from the compensated and corrected magnetic field intensity data D jrc according to the following formula to obtain the magnetic field intensity data D jfrc of the magnet,
Djfrc=Djrc-G′。
3. The magnetic sensor data processing device of claim 2, wherein the magnetic field strength data determination module comprises:
the data compensation unit is used for performing angle compensation on the corrected magnetic field intensity data D jc through the rotation matrix R j to obtain compensated corrected magnetic field intensity data D jrc;
A combined magnetic field component determining unit for determining a component G' of the first magnetic field strength data G of the geomagnetic and environmental combined magnetic field of the magnetic sensor at angles alpha and beta according to the following formula,
G′=Rjx(α)Rjy(β)G;
And determining magnetic field intensity data, namely removing the interference of geomagnetism and a comprehensive magnetic field from the magnetic field intensity data D jrc after compensation and correction according to the following formula to obtain magnetic field intensity data D jfrc,Djfrc=Djrc -G' of the magnet.
4. A computer device comprising a processor and a memory for storing at least one computer program that is loaded by the processor and that performs the magnetic sensor data processing method of claim 1.
5. A computer-readable storage medium, characterized in that at least one instruction, at least one program, a set of codes, or a set of instructions for executing the magnetic sensor data processing method according to claim 1 are stored in the computer-readable storage medium.
CN202111047592.9A 2021-09-08 2021-09-08 Magnetic sensor data processing method, device, terminal and storage medium Active CN113851215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111047592.9A CN113851215B (en) 2021-09-08 2021-09-08 Magnetic sensor data processing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111047592.9A CN113851215B (en) 2021-09-08 2021-09-08 Magnetic sensor data processing method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113851215A CN113851215A (en) 2021-12-28
CN113851215B true CN113851215B (en) 2024-06-28

Family

ID=78973398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111047592.9A Active CN113851215B (en) 2021-09-08 2021-09-08 Magnetic sensor data processing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113851215B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104884902A (en) * 2012-08-02 2015-09-02 美新公司 Method and apparatus for data fusion of a three axis magnetometer and three axis accelerometer
CN107121707A (en) * 2017-05-09 2017-09-01 深圳清华大学研究院 A kind of error calibration method of magnetic sensor measuring basis and structure benchmark

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4844179B2 (en) * 2006-03-07 2011-12-28 ヤマハ株式会社 Magnetic data processing apparatus, method and program
DE102013222097B4 (en) * 2013-10-30 2023-03-02 Te Connectivity Germany Gmbh Temperature compensation method for control magnetic fields in a Hall sensor with OS adaptation
CN110567491B (en) * 2019-08-29 2021-10-08 青岛歌尔智能传感器有限公司 Initial alignment method and device of inertial navigation system and electronic equipment
CN112494027B (en) * 2020-11-25 2021-11-09 深圳市资福医疗技术有限公司 Gastrointestinal motility inspection system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104884902A (en) * 2012-08-02 2015-09-02 美新公司 Method and apparatus for data fusion of a three axis magnetometer and three axis accelerometer
CN107121707A (en) * 2017-05-09 2017-09-01 深圳清华大学研究院 A kind of error calibration method of magnetic sensor measuring basis and structure benchmark

Also Published As

Publication number Publication date
CN113851215A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN110378968B (en) Method and device for calibrating relative attitude of camera and inertial measurement unit
US11030918B2 (en) Identification and analysis of movement using sensor devices
CN112494027B (en) Gastrointestinal motility inspection system
CN102499762B (en) Three-dimensional spatial positioning system for medical ultrasonic probe relative to part to be checked and method
Huang et al. Monitoring and assessment of rehabilitation progress on range of motion after total knee replacement by sensor-based system
CN107348931B (en) Capsule endoscope space attitude determination system
CN103006164A (en) Endoscope tracking and positioning and digital human dynamic synchronous display device based on multi-sensor
EP3688474A1 (en) Sensor calibration considering subject-dependent variables and/or body positions
CN108577871B (en) A multi-axis sensor combination device for accurately evaluating cervical dystonia
CN110101388B (en) Portable spine measuring instrument and method based on MIMU
CN108354578A (en) A kind of capsule endoscope positioning system
US20170181689A1 (en) System and Method for Measuring the Muscle Tone
CN110141240A (en) A Spine Measuring Instrument Based on Magnetic/Inertial Devices
Bumacod et al. Image-processing-based digital goniometer using OpenCV
JP7270284B2 (en) Operation method of magnetic capsule endoscope full-posture measurement system
Mihcin Simultaneous validation of wearable motion capture system for lower body applications: Over single plane range of motion (ROM) and gait activities
WO2023179720A1 (en) Digestive tract database establishment method and apparatus, and storage medium
CN113851215B (en) Magnetic sensor data processing method, device, terminal and storage medium
Gregersen Novel bionics assessment of anorectal mechanosensory physiology
CN110007258B (en) Method and device for determining position of receiving coil of magnetic resonance system
Wazir et al. A wearable pendant sensor to monitor compliance with range of motion lymphatic health exercise
CN115067863B (en) Wireless capsule endoscope driving system based on spherical driver
CN216135861U (en) Gastrointestinal motility capsule and positioning system thereof
US20120283602A1 (en) Wireless electronic pegboard setup for quantification of dexterity
CN114719760B (en) Distributed motion monitoring system and displacement monitoring method for animal imaging

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant