Control method, device and equipment applied to electronic equipment

By using geomagnetic sensors in electronic devices to monitor the external magnetic field and controlling the working state of the microcontroller unit according to the magnetic field strength, the problem of microcontroller unit damaging files due to the influence of the magnetic field is solved, achieving higher equipment reliability and accuracy.

CN114935902BActive Publication Date: 2025-03-25NANCHANG YIQIN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210550938.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-03-25
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

The microcontroller units in electronic devices are susceptible to magnetic fields, resulting in the internal mirror files being damaged, and they need to be disassembled and reflashed before they can resume work.

Method used

By setting a geomagnetic sensor in the electronic device, the magnetic field electric signals at each moment within the preset time period are obtained, and the magnetic field intensity of the external environment is determined based on these signals. If the magnetic field strength is greater than or equal to the preset magnetic field threshold, the control microcontroller unit pauses the operation to prevent the magnetic field from damaging the file.

Benefits of technology

It effectively prevents the microcontroller from damaging internal files due to the influence of magnetic fields, reduces errors caused by the equipment during signal acquisition, conversion and calculation, provides electronic devices and users with more accurate information, and reduces the equipment failure rate caused by magnetic fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114935902B_ABST
    Figure CN114935902B_ABST
Patent Text Reader

Abstract

The present application provides a control method, device and equipment applied to electronic devices. The method includes: obtaining a first magnetic field electric signal at each moment within a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device; determining the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electric signal at each moment; if it is determined that the value represented by the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, then the microcontroller unit in the electronic device is controlled to be in a pause state. When the electronic device enters a strong magnetic field environment, the MCU in the electronic device is stopped to protect the files in the MCU from being damaged by the magnetic field; thereby, the problem of the internal mirror file being damaged due to the microcontroller unit being affected by a strong magnetic field can be solved without adding external devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to technical fields such as electronic equipment and magnetic field technology, and in particular to a control method, device and equipment applied to electronic equipment. Background Art

[0002] With the development of electronic devices, more and more electronic devices are applied to people's lives and work. Electronic devices, such as mobile terminals, wearable devices, etc., are equipped with a microcontroller unit (MCU); the microcontroller unit is an important component of the electronic device.

[0003] However, the microcontroller unit in the electronic device is easily affected by the magnetic field, which may damage the image file in the microcontroller unit, and thus the device needs to be disassembled and reflashed to restore the operation of the microcontroller unit. Summary of the invention

[0004] The present application provides a control method, device and equipment applied to electronic equipment, so as to solve the problem that the internal image file of a microcontroller unit is damaged due to the influence of a magnetic field.

[0005] In a first aspect, the present application provides a control method applied to an electronic device, comprising:

[0006] Acquire a first magnetic field electric signal at each moment within a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device;

[0007] Determining the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electrical signal at each of the moments;

[0008] If it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device, the micro control unit in the electronic device is controlled to be in a pause state.

[0009] In a feasible implementation, during the use of the electronic device, first, a geomagnetic sensor is set in the electronic device, and the geomagnetic sensor collects and obtains the first magnetic field electric signal of the external environment of the electronic device at each moment in the preset time period, and transmits it to the MCU; then the first magnetic field electric signal obtained at each moment is calculated to obtain the magnetic field value at each moment in the preset time period, and the average value of the magnetic field value at each moment in the preset time period can be obtained to obtain the magnetic field strength of the external environment where the electronic device is located; then the obtained magnetic field strength is compared with the magnetic field safety threshold pre-established by the electronic device, if the magnetic field strength is greater than or equal to the magnetic field safety threshold pre-established by the electronic device, the MCU will suspend work and send a signal to the electronic device to prompt the user that the environment is a strong magnetic field environment, if the magnetic field strength is less than the preset threshold, the MCU continues to work; thereby solving the problem of the microcontroller unit being affected by a strong magnetic field and causing the internal image file to be destroyed. In addition, it can also reduce the error generated by the device in the process of collecting signals, converting signals and calculating, and provide more accurate information for the electronic device and the user.

[0010] In a feasible implementation, during the use of the electronic device, when the electronic device processes the magnetic field electrical signals obtained at each moment within a preset time period and calculates the magnetic field values ​​at each moment within the preset time period, the magnetic field values ​​obtained at each moment within the preset time period are sorted, the maximum magnetic field value is determined, and the magnetic field strength of the external environment in which the electronic device is located is obtained, and then the obtained magnetic field strength is compared with the magnetic field safety threshold pre-established by the electronic device. If the magnetic field strength is greater than or equal to the magnetic field safety threshold pre-established by the electronic device, the MCU will suspend work and send a signal to the electronic device to prompt the user that the environment is a strong magnetic field environment. If the magnetic field strength is less than the preset threshold, the MCU continues to work.

[0011] In a feasible implementation, during the use of the electronic device, when the electronic device processes the magnetic field electrical signals obtained at each moment in a preset time period and calculates the magnetic field values ​​at each moment in the preset time period, the magnetic field values ​​obtained at each moment in the preset time period are sorted, the minimum magnetic field value is determined, and the magnetic field strength of the external environment in which the electronic device is located is obtained, and then the obtained magnetic field strength is compared with the magnetic field safety threshold pre-established by the electronic device. If the magnetic field strength is greater than or equal to the magnetic field safety threshold pre-established by the electronic device, the MCU will suspend work and send a signal to the electronic device to prompt the user that the environment is a strong magnetic field environment. If the magnetic field strength is less than the preset threshold, the MCU continues to work.

[0012] In a second aspect, the present application provides a control device applied to an electronic device, comprising:

[0013] A first acquisition unit is used to acquire a first magnetic field electric signal at each moment within a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device;

[0014] A first determining unit, configured to determine the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electrical signal at each of the moments;

[0015] The control unit is used to control the micro control unit in the electronic device to a pause state if it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device.

[0016] In a feasible implementation, first, a first acquisition unit acquires a first magnetic field electric signal of the external environment in which the electronic device is located at each moment within a preset time period; then, a first determination unit processes the first magnetic field signal of the external environment in which the electronic device is located at each moment within the preset time period to obtain a magnetic field value at each moment within the preset time period, and further calculates multiple magnetic field values ​​to obtain a magnetic field value, which is determined as the magnetic field strength of the external environment of the electronic device; then, the control unit compares the magnetic field strength with a preset magnetic field threshold corresponding to the electronic device; if it is determined that the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the microcontroller unit in the electronic device is controlled to be in a pause state; if the magnetic field strength is less than the preset magnetic field threshold corresponding to the electronic device, the MCU continues to work.

[0017] In a feasible implementation, the first determination unit further includes a screening module, which can screen out the maximum magnetic field value and the minimum magnetic field value among the magnetic field values ​​within the preset time period to obtain the screened magnetic field values.

[0018] In a feasible implementation, the first determination unit further includes a second determination module, which can calculate the average value of the screened magnetic field strength values ​​to obtain the average magnetic field strength value of the external environment of the electronic device in the current time period.

[0019] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0020] Memory; Memory for storing instructions executable by the processor;

[0021] The processor is configured to execute the method described in the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the first aspect.

[0024] The present application provides a control method, device and equipment for electronic devices, which obtains a first magnetic field electric signal at each moment in a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device; according to the first magnetic field electric signal at each moment, the magnetic field strength of the external environment in which the electronic device is located is determined; if it is determined that the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the microcontroller unit in the electronic device is controlled to be in a pause state. The MCU set in the electronic device collects the first magnetic field electric signal at each moment in the preset time period through the geomagnetic sensor, processes and calculates and averages it, obtains the magnetic field strength of the external environment in which the electronic device is located, reduces the error generated by the device in the process of collecting signals, converting signals and calculating, and provides more accurate information for the electronic device and the user; then compares the obtained magnetic field strength with the magnetic field safety threshold pre-established by the electronic device, if the magnetic field strength is greater than or equal to the magnetic field safety threshold pre-established by the electronic device, the MCU will suspend work and send a signal to the electronic device, prompting the user that the environment is a strong magnetic field environment, if the magnetic field strength is less than the preset threshold, the MCU continues to work; thereby solving the problem that the microcontroller unit is affected by a strong magnetic field and causes the internal image file to be destroyed. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0026] Figure 1 A flow chart of a control method applied to an electronic device provided in an embodiment of the present application;

[0027] Figure 2 A flowchart of another control method applied to an electronic device provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of the structure of a control device applied to an electronic device provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of the structure of another control device applied to an electronic device provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0031] Figure 6 A block diagram of an electronic device provided in an embodiment of the present application.

[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0034] With the continuous development of science and technology and the continuous improvement of people's material life, smart electronic devices have become more and more popular. When smart electronic devices involve wireless charging, magnetic charging bases have become standard. As smart electronic devices tend to be miniaturized, the thickness and price of smart wearable devices have become important selling points, but the control unit in the electronic device is extremely susceptible to magnetic field interference. If there is a strong magnetic field around, the image file in the control unit will be damaged, causing the main device to fail to start or freeze.

[0035] In the process of preventing magnetic interference of the equipment, it is necessary to add an anti-magnetic interference device to the control unit. By controlling the anti-magnetic interference device to absorb or isolate the external magnetic field signal, the influence of the external magnetic field of the control unit on the control unit can be reduced. The anti-magnetic interference device can be a shielding cover, anti-magnetic plate and other materials. The control unit is in a magnetic isolation environment and is not affected by the magnetic field strength of the external environment of the electronic equipment.

[0036] In one example, during the production process of an electronic device, a lightweight anti-magnetic cover is added to the outside of the control unit. The material used for the anti-magnetic cover may be lightweight anti-magnetic materials such as nanocrystals. When the electronic device is in an environment with a strong magnetic field, the anti-magnetic cover directly isolates the magnetic field signal generated by the geomagnetic sensor installed inside the electronic device from the magnetic field signal of the external environment of the electronic device. The control unit in the anti-magnetic cover will not be affected by the external magnetic field environment, and the control unit can work normally. At the same time, a small channel or hole can be left on the anti-magnetic cover for circuit connection between the control unit and other units in the electronic device, which will not affect the normal operation of the electronic device.

[0037] However, in the above method, the production cost of the electronic device is high, and the weight of the electronic device is also increased, which is inconvenient to use.

[0038] The present application provides a control method, device and equipment applied to electronic equipment, aiming to solve the above technical problems in the prior art.

[0039] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0040] Figure 1 A flow chart of a control method applied to an electronic device provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0041] S101. Acquire a first magnetic field electric signal at each moment in a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in an electronic device.

[0042] Exemplarily, the execution subject of this embodiment may be an electronic device, such as a wristband, a mobile phone, etc.

[0043] The electronic device is provided with a geomagnetic sensor, which collects magnetic field information of the external environment in which the electronic device is located. The geomagnetic sensor can transmit the collected magnetic field information to the MCU.

[0044] In one example, when the electronic device is working, the electronic device can obtain the first magnetic field electric signal at each moment in a preset time period. For each moment, the geomagnetic sensor will collect the first magnetic field electric signal in each direction at that moment, and the geomagnetic sensor will transmit the collected first magnetic field electric signal in each direction at that moment to the MCU.

[0045] The directions may be the x-axis, y-axis, and z-axis directions in the world coordinate system.

[0046] S102: Determine the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electrical signal at each moment.

[0047] For example, in step S101, when the electronic device is working, the electronic device can obtain a first magnetic field electric signal at each moment in a preset time period.

[0048] For each moment, the geomagnetic sensor will collect the first magnetic field electrical signals in various directions at that moment, and the geomagnetic sensor will transmit the collected first magnetic field electrical signals in various directions at that moment to the MCU.

[0049] Then, for each moment, the MCU calculates the first magnetic field electrical signals in each direction at that moment, and then obtains the magnetic field value at that moment. In an example, for each moment, the MCU obtains the first magnetic field electrical signals in the x-axis, y-axis, and z-axis directions at that moment, which can be recorded as u x 、u y 、u z Then, it is further processed according to the preset calculation method to obtain the magnetic field value u at that moment.

[0050] Then, the MCU determines the magnetic field strength of the external environment in which the electronic device is located according to the magnetic field values ​​at each moment in the preset time period.

[0051] In one example, the magnetic field values ​​obtained at each moment in a preset time period are calculated and processed, and an average value of the magnetic field values ​​at each moment is obtained, and the obtained average value is determined to be the magnetic field strength of the external environment where the electronic device is located.

[0052] Alternatively, the obtained magnetic field values ​​at each moment in the preset time period are sorted to determine the maximum magnetic field value; the maximum magnetic field value is determined as the magnetic field intensity of the external environment where the electronic device is located.

[0053] Alternatively, the obtained magnetic field values ​​at each moment in the preset time period are sorted to determine the minimum magnetic field value; the minimum magnetic field value is determined as the magnetic field intensity of the external environment where the electronic device is located.

[0054] S103: If it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device, the micro control unit in the electronic device is controlled to be in a pause state.

[0055] Exemplarily, for each electronic device, a preset magnetic field threshold corresponding to the electronic device is set; that is, the preset magnetic field threshold corresponds to the electronic device.

[0056] The MCU compares the magnetic field strength of the external environment in which the electronic device is located with the preset magnetic field threshold corresponding to the electronic device. If the MCU determines that the value represented by the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the MCU controls itself to stop working, that is, controls the MCU to a pause state; if the MCU determines that the value represented by the magnetic field strength is less than the preset magnetic field threshold corresponding to the electronic device, the MCU determines that it continues to work.

[0057] The preset magnetic field threshold may be 90% of the highest external magnetic field strength that the electronic device can adapt to.

[0058] In this embodiment, the first magnetic field electric signal at each moment in a preset time period is obtained; wherein the first magnetic field electric signal is collected by the geomagnetic sensor in the electronic device; according to the first magnetic field electric signal at each moment, the magnetic field strength of the external environment in which the electronic device is located is determined; if it is determined that the value represented by the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the micro control unit in the electronic device is controlled to be in a pause state, and if the value represented by the magnetic field strength is less than the preset magnetic field threshold corresponding to the electronic device, the micro control unit continues to work. The magnetic field information is collected by the geomagnetic sensor in the electronic device, and then the magnetic field strength of the external environment in which the electronic device is located is determined; if it is determined that the value represented by the magnetic field strength is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the micro control unit in the electronic device is controlled to be in a pause state, and then when the electronic device enters a strong magnetic field environment, the MCU in the electronic device is stopped to protect the files in the MCU from being damaged by the magnetic field; thus, the problem of the internal image file being damaged by the micro control unit being affected by a strong magnetic field can be solved without adding an external device. In addition, in this embodiment, corresponding preset magnetic field thresholds are set for different electronic devices, and then different electronic devices are protected in a targeted manner.

[0059] Figure 2 A flow chart of another control method applied to an electronic device provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the method includes:

[0060] S201. Acquire a third magnetic field electric signal at a second preset time before a preset time period, wherein the third magnetic field electric signal is collected by a geomagnetic sensor in an electronic device, and the third magnetic field electric signal represents magnetic field information of an internal environment of the electronic device where the geomagnetic sensor is located.

[0061] Exemplarily, the execution subject of this embodiment may be an electronic device, such as a wristband or a mobile phone.

[0062] Before electronic devices leave the factory or before initial operation, in order to reduce the defective rate of electronic devices before leaving the factory, it is necessary to first detect the internal magnetic field environment of the electronic devices. The geomagnetic sensor will collect the magnetic field information of the internal environment of the electronic devices. The geomagnetic sensor can transmit the collected magnetic field information of the internal environment of the electronic devices to the MCU.

[0063] In one example, when the electronic device is assembled, after the electronic device is powered on, the electronic device can obtain the third magnetic field electrical signal at the second preset moment before the preset time period. For the second preset moment before the preset time period, the geomagnetic sensor will collect the third magnetic field electrical signals in all directions of the internal environment of the electronic device where the geomagnetic sensor is located at that moment, and the geomagnetic sensor will transmit the third magnetic field electrical signals in all directions collected at that moment to the MCU.

[0064] S202: Determine a magnetic field value at a second preset moment according to a third magnetic field electric signal at a second preset moment.

[0065] Exemplarily, the third magnetic field electric signals in the x-axis, y-axis and z-axis directions in the world coordinate system at the second preset time before the preset time period acquired by the geomagnetic sensor can be respectively recorded as u x0 、u y0 、u z0 , and then process and calculate the third magnetic field electric signal in each direction to obtain the magnetic field value u0 at the second preset moment.

[0066] The calculation method can be Wherein, u0 is the magnetic field value at the second preset time, u x0 、u y0 、u z0 They are respectively third magnetic field electric signals in the x-axis, y-axis and z-axis directions in the world coordinate system at the second preset moment before the preset time period.

[0067] S203: If it is determined that the magnetic field value at the second preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, it is determined that the electronic device does not meet the factory conditions.

[0068] Exemplarily, for each electronic device, a preset magnetic field threshold corresponding to the electronic device is set; that is, the preset magnetic field threshold and the electronic device correspond to each other.

[0069] In one example, the magnetic field value at the second preset moment is compared with the preset magnetic field threshold corresponding to the electronic device. If the magnetic field value at the second preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the electronic device does not meet the factory conditions and needs to be further processed.

[0070] The preset magnetic field threshold may be 90% of the highest external magnetic field strength that the electronic device can adapt to.

[0071] S204: If it is determined that the magnetic field value at the second preset moment is less than the preset magnetic field threshold corresponding to the electronic device, execute step S205.

[0072] Exemplarily, the magnetic field value at the second preset moment is compared with the preset magnetic field threshold corresponding to the electronic device. If the magnetic field value at the second preset moment is less than the preset magnetic field threshold corresponding to the electronic device, the electronic device meets the factory conditions, and the next step S205 is performed.

[0073] S205. Acquire a second magnetic field electric signal at a first preset time before a preset time period, wherein the second magnetic field electric signal is collected by a geomagnetic sensor in the electronic device, and the second magnetic field electric signal represents magnetic field information of an external environment in which the electronic device is located.

[0074] Exemplarily, the geomagnetic sensor in the electronic device collects magnetic field information at a first preset time before a preset time period, and transmits the collected magnetic field information to the MCU.

[0075] In one example, when the electronic device is working, the geomagnetic sensor in the electronic device will collect the second magnetic field signal at the first preset moment before the preset time period. For the first preset moment before the preset time period, the geomagnetic sensor will collect the second magnetic field signals from all directions outside the electronic device at that moment, and the geomagnetic sensor will transmit the collected second magnetic field signals from all directions outside the electronic device at that moment to the MCU.

[0076] The directions may be the x-axis, y-axis, and z-axis directions in the world coordinate system.

[0077] S206. Determine the magnetic field value at the first preset moment according to the second magnetic field electric signal at the first preset moment.

[0078] For example, in step S205, while the electronic device is working, the electronic device may acquire a second magnetic field electric signal at a first preset moment.

[0079] Then, for the first preset moment, the MCU calculates the second magnetic field electric signals in all directions at the moment, and then obtains the magnetic field value at the moment.

[0080] In one example, for the first preset moment, the MCU can record the third magnetic field electric signal in the x-axis, y-axis and z-axis directions in the world coordinate system obtained by the geomagnetic sensor as u x1 、u y1 、u z1 Then, the second magnetic field electric signal in each direction is processed and calculated to obtain the magnetic field value u1 at the first preset moment.

[0081] The calculation method can be Wherein, u1 is the magnetic field value at the second preset time, u x1 、u y1 、uz1 They are respectively second magnetic field electric signals from the x-axis, y-axis and z-axis directions in the world coordinate system at the second preset moment.

[0082] S207: If it is determined that the magnetic field value at the first preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, execute step S208.

[0083] Exemplarily, the MCU compares the magnetic field value at the first preset moment with the preset magnetic field threshold corresponding to the electronic device. If the MCU determines that the magnetic field value at the first preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, it executes step S208; if it is less than, it returns to step 205 to continue to obtain the magnetic field information of the environment.

[0084] S208, obtaining a first magnetic field electric signal at each moment in a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in an electronic device.

[0085] Exemplarily, in order to reduce errors in the process of the device acquiring and processing information, after step S207, the MCU obtains the first magnetic field electric signals in various directions of the external environment of the electronic device at each moment within a preset time period. For each moment, the first magnetic field electric signals in various directions at that moment are collected, and the geomagnetic sensor transmits the collected first magnetic field electric signals in various directions at that moment to the MCU.

[0086] The directions may be the x-axis, y-axis, and z-axis directions in the world coordinate system.

[0087] S209: Determine the magnetic field value at each moment in the preset time period according to the first magnetic field electric signal at each moment in the preset time period.

[0088] For example, in step S208, when the electronic device is working, the electronic device can obtain the first magnetic field electric signal at each moment in a preset time period.

[0089] Then, for the first preset moment, the MCU calculates the first magnetic field electric signals in various directions at the moment, and then obtains the magnetic field value at the moment.

[0090] In one example, the MCU in the electronic device pre-stores the magnetic field electric signal for signal processing. The MCU obtains the first magnetic field electric signal in the x-axis, y-axis and z-axis directions in the world coordinate system at that moment within a preset time, which can be recorded as u x 、u y 、u z Then, it is further processed according to the calculation method preset by the MCU to obtain the magnetic field value u at that moment.

[0091] The calculation method can be Among them, u k is the magnetic field value at time k, u x 、u y 、u z They are respectively the first magnetic field electric signals from the x-axis, y-axis and z-axis directions in the world coordinate system at time k.

[0092] S210, filtering out the maximum magnetic field value and the minimum magnetic field value among the magnetic field values ​​within a preset time period, and filtering out the magnetic field values ​​after filtering.

[0093] Exemplarily, the magnetic field values ​​at each moment in a preset time period are sorted to determine the maximum magnetic field value;

[0094] Alternatively, the obtained magnetic field values ​​at each moment within the preset time period are sorted to determine the minimum magnetic field value; and then the screened magnetic field values ​​are obtained.

[0095] S211. Determine the average of the screened magnetic field values ​​as the magnetic field strength of the external environment.

[0096] In one example, step S211 includes the following process: determining a mean value according to the screened magnetic field values ​​and a preset weight corresponding to each of the screened magnetic field values; and determining the mean value as the magnetic field intensity.

[0097] Exemplarily, the filtered magnetic field values ​​within the preset time period obtained in step S210 are used to calculate the average value of the remaining magnetic field values ​​at each moment, and the obtained average value is determined as the magnetic field strength of the external environment in which the electronic device is located.

[0098] Optionally, the maximum magnetic field value obtained at each moment within the preset time period is determined as the magnetic field intensity of the external environment where the electronic device is located.

[0099] Alternatively, the minimum magnetic field value obtained at each moment in the preset time period is determined as the magnetic field intensity of the external environment where the electronic device is located.

[0100] S212: Obtain the working time of the electronic device, where the working time represents the working time of the electronic device after leaving the factory.

[0101] For example, the electronic device can record the working hours since leaving the factory. When the electronic device is in working state, the working hours will gradually increase. When the software is updated or the working time reaches a certain length of time, the electronic device will display a certain working time.

[0102] S213. Determine, according to a preset corresponding relationship, a magnetic field threshold corresponding to the working time, which is a preset magnetic field threshold corresponding to the electronic device; wherein the preset corresponding relationship represents a mapping relationship between the working time and the magnetic field threshold.

[0103] In one example, the preset corresponding relationship represents the mapping relationship between the working time, the external environment information, and the magnetic field threshold. Step S213 includes the following process: obtaining the external environment information of the external environment in which the electronic device is located; according to the preset corresponding relationship, determining the magnetic field threshold corresponding to the working time and the external environment information as the preset magnetic field threshold corresponding to the electronic device.

[0104] Exemplarily, a correspondence between working time, external environment information and a preset magnetic field threshold may be pre-set in the electronic device, which may be a mapping relationship between working time, external environment information and a preset magnetic field threshold.

[0105] In one example, an electronic device can record the working hours since leaving the factory. When the electronic device performs a software update or the working time reaches a certain length of time, the preset magnetic field threshold will change according to the mapping relationship between the preset working hours and the preset magnetic field threshold.

[0106] In one example, an electronic device can record external environmental information since leaving the factory. When the electronic device performs a software update or obtains external environmental information of the external environment in which the electronic device is located, the preset magnetic field threshold will change accordingly based on the mapping relationship between the preset external environmental information and the preset magnetic field threshold.

[0107] S214: If it is determined that the magnetic field strength of the external environment is greater than or equal to a preset magnetic field threshold corresponding to the electronic device, the microcontroller unit in the electronic device is controlled to be in a pause state.

[0108] Exemplarily, this step may refer to step S103 and will not be described in detail.

[0109] In this embodiment, based on the above embodiment, first, a third magnetic field electric signal is obtained at a second preset moment before a preset time period; then, the magnetic field value at the second preset moment is determined; if it is determined that the magnetic field value at the second preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, it is determined that the electronic device does not meet the factory conditions; thereby reducing the defective rate of the electronic device in subsequent factory testing; determining the magnetic field value at each moment within a preset time period; then, filtering out the maximum magnetic field value and the minimum magnetic field value among the magnetic field values ​​within the preset time period; determining the average of the filtered magnetic field values ​​as the magnetic field strength; thereby reducing information errors and providing accurate information services to users.

[0110] Figure 3A schematic diagram of a control device for electronic equipment provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device comprises:

[0111] The first acquisition unit 31 is used to acquire a first magnetic field electric signal at each moment in a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device.

[0112] The first determining unit 32 is used to determine the magnetic field strength of the external environment where the electronic device is located according to the first magnetic field electrical signal at each moment.

[0113] The control unit 33 is used to control the microcontroller in the electronic device to a pause state if it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device. The device of this embodiment can implement the technical solution in the above method, and its specific implementation process and technical principle are the same, which will not be repeated here.

[0114] Figure 4 A schematic diagram of the structure of another control device applied to an electronic device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device comprises:

[0115] The first acquisition unit 41 is used to acquire a first magnetic field electric signal at each moment in a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device.

[0116] The first determining unit 42 is used to determine the magnetic field strength of the external environment where the electronic device is located according to the first magnetic field electrical signal at each moment.

[0117] The control unit 43 is used to control the micro control unit in the electronic device to a pause state if it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device.

[0118] In one example, the first determining unit 42 includes:

[0119] The first determination module 421 is used to determine the magnetic field value at each moment in the preset time period according to the first magnetic field electric signal at each moment in the preset time period.

[0120] The screening module 422 is used to screen out the maximum magnetic field value and the minimum magnetic field value among the magnetic field values ​​within a preset time period, and the screened magnetic field values.

[0121] The second determination module 423 is used to determine the average of the screened magnetic field values, which is the magnetic field intensity.

[0122] In one example, the second determining module 423 includes:

[0123] The first determination submodule is used to determine the mean value according to the screened magnetic field values ​​and the preset weight corresponding to each of the screened magnetic field values.

[0124] The second determining submodule is used to determine the mean value as the magnetic field strength.

[0125] In one example, the device provided by this embodiment further includes:

[0126] The second acquisition unit 44 is used to obtain the working time of the electronic device before controlling the microcontroller unit in the electronic device to a pause state if the control unit determines that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device, wherein the working time represents the working time of the electronic device after leaving the factory.

[0127] The second determination unit 45 is used to determine the magnetic field threshold corresponding to the working time according to a preset corresponding relationship, which is a preset magnetic field threshold corresponding to the electronic device; wherein the preset corresponding relationship represents the mapping relationship between the working time and the magnetic field threshold.

[0128] In one example, the second determining unit 45 includes:

[0129] The acquisition module 451 is used to acquire external environment information of the external environment where the electronic device is located;

[0130] The third determination module 452 is used to determine the magnetic field threshold corresponding to the working time and the external environment information according to the preset corresponding relationship, which is the preset magnetic field threshold corresponding to the electronic device.

[0131] In one example, the device provided by this embodiment further includes:

[0132] The third acquisition unit 46 is used to acquire a second magnetic field electric signal at a first preset moment before the preset time period before the first acquisition unit acquires the first magnetic field electric signal at each moment within the preset time period, wherein the second magnetic field electric signal is collected by a geomagnetic sensor in the electronic device, and the second magnetic field electric signal represents the magnetic field information of the external environment in which the electronic device is located.

[0133] The third determining unit 47 is used to determine the magnetic field value at the first preset moment according to the second magnetic field electric signal at the first preset moment.

[0134] The fourth determining unit 48 is used to execute the step of the first acquiring unit acquiring the first magnetic field electric signal at each moment in the preset time period if it is determined that the magnetic field value at the first preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device.

[0135] In one example, the device provided by this embodiment further includes:

[0136] The fourth acquisition unit 49 is used to acquire a third magnetic field electric signal at a second preset moment before the preset time period before the first acquisition unit acquires the first magnetic field electric signal at each moment within the preset time period, wherein the third magnetic field electric signal is collected by a geomagnetic sensor in the electronic device, and the third magnetic field electric signal represents the magnetic field information of the internal environment of the electronic device where the geomagnetic sensor is located;

[0137] A fifth determining unit 410, configured to determine a magnetic field value at a second preset moment according to a third magnetic field electric signal at a second preset moment;

[0138] A sixth determining unit 411, configured to determine that the electronic device does not meet the factory conditions if it is determined that the magnetic field value at the second preset moment is greater than or equal to a preset magnetic field threshold corresponding to the electronic device;

[0139] The seventh determining unit 412 is used to execute the step of the first acquiring unit acquiring the first magnetic field electric signal at each moment in the preset time period if it is determined that the magnetic field value at the second preset moment is less than the preset magnetic field threshold corresponding to the electronic device.

[0140] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0141] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52; the memory 51; and a memory for storing instructions executable by the processor 52.

[0142] The processor 52 is configured to execute the method provided in the above embodiment.

[0143] The terminal device further includes a receiver 53 and a transmitter 54. The receiver 53 is used to receive instructions and data sent by other devices, and the transmitter 54 is used to send instructions and data to external devices.

[0144] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment, which device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0145] The device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0146] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0147] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0148] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0149] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0150] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0151] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0152] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800 and the temperature change of the device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0153] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0154] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0155] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0156] An embodiment of the present application also provides a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above method.

[0157] According to an embodiment of the present application, the present application also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0158] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0159] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A control method applied to an electronic device, characterized in that: The method comprises: Acquire a first magnetic field electric signal at each moment within a preset time period; wherein the first magnetic field electric signal is collected by a geomagnetic sensor in the electronic device; Determining the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electrical signal at each of the moments; Acquire the working time of the electronic device, wherein the working time represents the working time of the electronic device after leaving the factory; According to a preset corresponding relationship, determining a magnetic field threshold value corresponding to the working time as a preset magnetic field threshold value corresponding to the electronic device; wherein the preset corresponding relationship represents a mapping relationship between the working time and the magnetic field threshold value; If it is determined that the magnetic field strength is greater than or equal to a preset magnetic field threshold corresponding to the electronic device, the micro control unit in the electronic device is controlled to be in a pause state.

2. The method according to claim 1, characterized in that Determining the magnetic field strength of the external environment in which the electronic device is located according to the first magnetic field electrical signal at each of the moments includes: Determining the magnetic field value at each moment in the preset time period according to the first magnetic field electric signal at each moment in the preset time period; Filter out the maximum magnetic field value and the minimum magnetic field value among the magnetic field values ​​within the preset time period, and filter out the magnetic field values ​​after filtering; The average of the magnetic field values ​​after screening is determined as the magnetic field intensity.

3. The method according to claim 2, characterized in that Determining the mean of the magnetic field values ​​after the screening as the magnetic field strength comprises: Determining the mean value according to the screened magnetic field values ​​and a preset weight corresponding to each of the screened magnetic field values; The mean value is determined to be the magnetic field strength.

4. The method according to claim 1, characterized in that: The preset corresponding relationship represents the mapping relationship between the working time, the external environment information, and the magnetic field threshold; Determining, according to a preset corresponding relationship, a magnetic field threshold corresponding to the working time as a preset magnetic field threshold corresponding to the electronic device, including: Acquiring external environment information of the external environment in which the electronic device is located; According to the preset corresponding relationship, a magnetic field threshold corresponding to the working time and the external environment information is determined as a preset magnetic field threshold corresponding to the electronic device.

5. The method according to any one of claims 1 to 4, characterized in that: Before acquiring the first magnetic field electric signal at each moment within the preset time period, the method further includes: Acquire a second magnetic field electric signal at a first preset time before the preset time period, wherein the second magnetic field electric signal is collected by a geomagnetic sensor in the electronic device, and the second magnetic field electric signal represents magnetic field information of an external environment in which the electronic device is located; Determining the magnetic field value at the first preset moment according to the second magnetic field electrical signal at the first preset moment; If it is determined that the magnetic field value at the first preset moment is greater than or equal to the preset magnetic field threshold corresponding to the electronic device, the step of acquiring the first magnetic field electrical signal at each moment within the preset time period is performed.

6. A control device applied to an electronic device, characterized in that: The apparatus comprises means for executing the method of any one of claims 1-5.

7. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

9. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.

Citation Information

Patent Citations

  • Smart watch with magnetic field intensity detection function

    CN105652654A