[go: up one dir, main page]

CN115236571A - Magnetic attraction function management method of electronic equipment and electronic equipment - Google Patents

Magnetic attraction function management method of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN115236571A
CN115236571A CN202210836481.4A CN202210836481A CN115236571A CN 115236571 A CN115236571 A CN 115236571A CN 202210836481 A CN202210836481 A CN 202210836481A CN 115236571 A CN115236571 A CN 115236571A
Authority
CN
China
Prior art keywords
magnetic field
electronic device
magnetic
target
field data
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.)
Pending
Application number
CN202210836481.4A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210836481.4A priority Critical patent/CN115236571A/en
Publication of CN115236571A publication Critical patent/CN115236571A/en
Priority to PCT/CN2023/106772 priority patent/WO2024012446A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R33/00Arrangements or instruments for measuring magnetic variables
    • G01R33/12Measuring magnetic properties of articles or specimens of solids or fluids

Landscapes

  • Physics & Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Magnetic Variables (AREA)

Abstract

The application discloses a magnetic attraction function management method of electronic equipment and the electronic equipment, and belongs to the technical field of electronic equipment. The electronic device comprises a magnetic field sensor, the method comprising: detecting magnetic field data of the electronic equipment in real time through the magnetic field sensor; and controlling a target device to perform magnetic field calibration according to the magnetic field data, wherein the target device is an electronic device in the electronic equipment, which is associated with the magnetic field data.

Description

电子设备的磁吸功能管理方法和电子设备Magnetic attraction function management method of electronic equipment and electronic equipment

技术领域technical field

本申请属于电子设备技术领域,具体涉及一种电子设备的磁吸功能管理方法和电子设备。The present application belongs to the technical field of electronic equipment, and in particular relates to a magnetic attraction function management method of electronic equipment and electronic equipment.

背景技术Background technique

由于电子设备与磁吸配件配合使用时会对整机磁场带来改变,而电子设备本身集成的敏感器件较多,较强磁场的变化会带来相关器件的正常工作,且不同的磁吸配件干扰情况不同,使得整机的磁场更加复杂。Since the use of electronic equipment and magnetic accessories will change the magnetic field of the whole machine, and the electronic equipment itself integrates many sensitive devices, the change of strong magnetic field will bring about the normal operation of related devices, and different magnetic accessories The interference situation is different, which makes the magnetic field of the whole machine more complicated.

发明内容SUMMARY OF THE INVENTION

本申请实施例的目的是提供一种电子设备的磁吸功能管理方法和电子设备,能够解决相关技术中电子设备与磁吸配件配合使用时导致整机磁场变化,继而影响电子设备内部相关器件正常工作的问题。The purpose of the embodiments of the present application is to provide a magnetic attraction function management method and electronic equipment for electronic equipment, which can solve the problem that the magnetic field of the whole machine changes when the electronic equipment and the magnetic attraction accessories are used together in the related art, which in turn affects the normal operation of related components inside the electronic equipment. work problem.

第一方面,本申请实施例提供了一种电子设备的磁吸功能管理方法,该电子设备包括磁场传感器,该方法包括:In a first aspect, an embodiment of the present application provides a method for managing a magnetic attraction function of an electronic device, where the electronic device includes a magnetic field sensor, and the method includes:

通过所述磁场传感器实时检测所述电子设备的磁场数据;Detect the magnetic field data of the electronic device in real time by the magnetic field sensor;

根据所述磁场数据控制目标器件进行磁场校准,其中,所述目标器件为所述电子设备内与所述磁场数据关联的电子器件。The target device is controlled to perform magnetic field calibration according to the magnetic field data, wherein the target device is an electronic device associated with the magnetic field data in the electronic device.

第二方面,本申请实施例提供了一种电子设备,该电子设备包括设置于所述电子设备的磁场传感器、处理器和目标器件;In a second aspect, an embodiment of the present application provides an electronic device, the electronic device includes a magnetic field sensor, a processor, and a target device disposed in the electronic device;

所述磁场传感器和所述处理器电连接,所述处理器和所述目标器件电连接,所述磁场传感器实时检测所述电子设备的磁场数据并发送给所述处理器;所述处理器根据所述磁场数据控制所述目标器件进行磁场校准,其中,所述目标器件为与所述磁场数据关联的电子器件。The magnetic field sensor is electrically connected to the processor, the processor is electrically connected to the target device, and the magnetic field sensor detects the magnetic field data of the electronic device in real time and sends it to the processor; The magnetic field data controls the target device to perform magnetic field calibration, wherein the target device is an electronic device associated with the magnetic field data.

第三方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .

第四方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the first aspect the method described.

第五方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method according to the first aspect.

在本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。In the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when the magnetic field interference occurs, the target device associated with the magnetic field data can be controlled to perform magnetic field calibration according to the magnetic field data, so that the magnetic field can be eliminated. interference, and improve the reliability of electronic equipment.

附图说明Description of drawings

图1为本申请实施例提供的一种磁吸功能管理方法的流程示意图;1 is a schematic flowchart of a method for managing a magnetic attraction function provided by an embodiment of the present application;

图2为本申请实施例提供的一种电子设备的结构示意图之一;FIG. 2 is one of the schematic structural diagrams of an electronic device provided by an embodiment of the present application;

图3为本申请实施例提供的一种电子设备的剖面示意图;3 is a schematic cross-sectional view of an electronic device according to an embodiment of the present application;

图4为本申请实施例提供的一种电子设备的结构示意图之二;FIG. 4 is the second schematic structural diagram of an electronic device provided by an embodiment of the present application;

图5为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的电子设备的磁吸功能管理方法和电子设备进行详细地说明。The method for managing the magnetic attraction function of an electronic device and the electronic device provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.

请参考图1,图1为本申请实施例提供的一种磁吸功能管理方法的流程示意图。如图1所示,本申请一方面实施例提供了一种磁吸功能管理方法,应用于电子设备,该电子设备包括磁场传感器,该方法包括以下步骤。Please refer to FIG. 1 , which is a schematic flowchart of a method for managing a magnetic attraction function according to an embodiment of the present application. As shown in FIG. 1 , an embodiment of the present application provides a method for managing a magnetic attraction function, which is applied to an electronic device, where the electronic device includes a magnetic field sensor, and the method includes the following steps.

步骤101:通过所述磁场传感器实时检测所述电子设备的磁场数据;Step 101: Detect the magnetic field data of the electronic device in real time by the magnetic field sensor;

本申请实施例中,示例性地,磁场传感器位于电子设备的内部,也可以位于电子设备的表面,可以实时检测电子设备内部的磁场数据,磁场传感器的数量可以为一个,也可以为多个;磁场传感器可以是磁力计,也可以复用手机内内部传感器霍尔器件。In the embodiment of the present application, for example, the magnetic field sensor is located inside the electronic device, or can be located on the surface of the electronic device, and can detect the magnetic field data inside the electronic device in real time, and the number of magnetic field sensors can be one or more; The magnetic field sensor can be a magnetometer, or can reuse the internal sensor Hall device in the mobile phone.

步骤102:根据所述磁场数据控制目标器件进行磁场校准,其中,所述目标器件为所述电子设备内与所述磁场数据关联的电子器件。Step 102 : control a target device to perform magnetic field calibration according to the magnetic field data, wherein the target device is an electronic device associated with the magnetic field data in the electronic device.

本申请实施例中,当电子设备受到外部磁场干扰时,电子设备内部的磁场将发生变化,则磁场传感器检测到的磁场数据将发生变化,由此,可以根据检测到的磁场数据对电子设备内部的目标器件进行磁场校准,其中,目标器件可以是电子设备内部与磁场相关的电子器件,也就是说,目标器件的运作原理与磁场数据相关,当磁场发生变化时,目标器件的运作将受到影响,例如精度受到影响,甚至无法正常工作等等。In the embodiment of the present application, when the electronic device is disturbed by an external magnetic field, the magnetic field inside the electronic device will change, and the magnetic field data detected by the magnetic field sensor will change. The target device is used for magnetic field calibration. The target device can be an electronic device related to the magnetic field inside the electronic device. That is, the operation principle of the target device is related to the magnetic field data. When the magnetic field changes, the operation of the target device will be affected. , such as accuracy is compromised, it doesn't even work, etc.

本实施例中,可选地,外部磁场干扰可以是与电子设备相匹配的外部磁吸配件产生,例如,当磁吸配件靠近电子设备或者贴附在电子设备表面时,将导致电子设备内部磁场发生变化。In this embodiment, optionally, the external magnetic field interference may be generated by an external magnetic attachment that matches the electronic device. For example, when the magnetic attachment is close to the electronic device or attached to the surface of the electronic device, the internal magnetic field of the electronic device will be caused. change.

本实施例中,可选地,目标器件可以为摄像模组、电子罗盘等电子器件。In this embodiment, optionally, the target device may be an electronic device such as a camera module and an electronic compass.

示例性地,电子设备的摄像模组采用磁力驱动的方式进行对焦时,则摄像模组对磁场的敏感度较高,整机内部磁场的变化将影响对焦的准确度,由于摄像模组原始是以地磁场为基准进行校准,则在磁吸配件磁吸固定至电子设备的预设位置后,可以根据检测到的磁场数据对摄像模组进行磁场校准,从而降低甚至消除磁场干扰,最终提升摄像模组对焦的准确度。又如,电子设备的电子罗盘检测地磁场实现指南功能,由于电子罗盘原始是以地磁场为基准实现指南功能,则在存在外部磁场干扰时,可以根据检测到的磁场数据对电子罗盘进行磁场校准,从而降低甚至消除磁场干扰,最终提升电子罗盘方向识别的准确度。Exemplarily, when the camera module of the electronic device is magnetically driven to focus, the sensitivity of the camera module to the magnetic field is high, and the change of the internal magnetic field of the whole machine will affect the accuracy of focusing. The calibration is based on the geomagnetic field. After the magnetic attachment is magnetically fixed to the preset position of the electronic device, the magnetic field calibration of the camera module can be performed according to the detected magnetic field data, so as to reduce or even eliminate the magnetic field interference and finally improve the camera. The accuracy of the module focusing. Another example is that the electronic compass of the electronic device detects the geomagnetic field to realize the guidance function. Since the electronic compass originally realized the guidance function based on the geomagnetic field, when there is external magnetic field interference, the electronic compass can be calibrated according to the detected magnetic field data. , thereby reducing or even eliminating magnetic field interference, and ultimately improving the accuracy of electronic compass direction recognition.

在本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。In the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when the magnetic field interference occurs, the target device associated with the magnetic field data can be controlled to perform magnetic field calibration according to the magnetic field data, so that the magnetic field can be eliminated. interference, and improve the reliability of electronic equipment.

在一些实施例中,可选地,所述根据所述磁场数据控制目标器件进行磁场校准包括:In some embodiments, optionally, the controlling the target device to perform magnetic field calibration according to the magnetic field data includes:

根据所述磁场数据生成校准参数;generating calibration parameters based on the magnetic field data;

根据所述校准参数控制目标器件进行磁场校准。The target device is controlled to perform magnetic field calibration according to the calibration parameters.

本实施例中,在利用磁场传感器检测到磁场数据后,即可对磁场数据进行处理,例如确定磁场变化量等等,外部磁场干扰的磁场方向等等,继而根据磁场数据生成校准参数,然后,再利用生成的校准参数来控制目标器件进行磁场校准,由此降低甚至消除外部磁场带来的负面影响。其中,可选地,根据磁场数据生成校准参数时,可以针对需要进行磁场校准的目标器件来生成,即不同目标器件所对应的校准参数不同。In this embodiment, after the magnetic field sensor is used to detect the magnetic field data, the magnetic field data can be processed, such as determining the amount of magnetic field change, etc., the magnetic field direction of external magnetic field interference, etc., and then generating calibration parameters according to the magnetic field data, and then, The generated calibration parameters are then used to control the target device to perform magnetic field calibration, thereby reducing or even eliminating the negative effects of external magnetic fields. Wherein, optionally, when the calibration parameter is generated according to the magnetic field data, it may be generated for a target device that needs to perform magnetic field calibration, that is, the calibration parameters corresponding to different target devices are different.

本申请的一些实施例中,所述电子设备与至少一个磁吸配件相匹配,所述通过所述磁场传感器实时检测所述电子设备的磁场数据之后,所述方法还包括:In some embodiments of the present application, the electronic device is matched with at least one magnetic attachment, and after the magnetic field data of the electronic device is detected in real time by the magnetic field sensor, the method further includes:

根据所述磁场数据,从所述至少一个磁吸配件中确定目标磁吸配件;determining a target magnetic attachment from the at least one magnetic attachment according to the magnetic field data;

显示与所述目标磁吸配件对应的功能界面和/或通知消息。A function interface and/or notification message corresponding to the target magnetic attachment is displayed.

本实施例中,电子设备可以与至少一个磁吸配件相匹配,示例性地,磁吸配件可以为磁吸充电宝、磁吸钱包、磁吸支架、磁吸充电器、磁吸保护套等等,电子设备可以与上述磁吸配件搭配使用,为了实现与磁吸配件的匹配,电子设备可以包括磁吸件,磁吸件与磁吸配件相匹配,例如,两者呈磁吸配合,磁吸配件可以被电子设备的磁吸件吸附固定在电子设备的表面,如电子设备的背面等。In this embodiment, the electronic device may be matched with at least one magnetic accessory, for example, the magnetic accessory may be a magnetic power bank, a magnetic wallet, a magnetic stand, a magnetic charger, a magnetic protective cover, etc. , the electronic device can be used in conjunction with the above-mentioned magnetic accessories. In order to achieve the matching with the magnetic accessories, the electronic device can include magnetic accessories, and the magnetic accessories are matched with the magnetic accessories. The accessories can be adsorbed and fixed on the surface of the electronic device, such as the back of the electronic device, by the magnetic attraction of the electronic device.

本申请实施例,电子设备可以根据磁场传感器检测到的磁场数据,从至少一个磁吸配件中识别出当前与电子设备靠近或者搭配使用的目标磁吸配件,从而根据识别出的目标磁吸配件,显示与该磁吸配件相对应的功能界面和/或通知消息,其中,与磁吸配件对应的功能界面中可以显示磁吸配件的图标、名称以及相关参数等等,而与磁吸配件对应的通知消息可以以系统消息的方式弹出,也可以在通知栏中推送显示等等。In this embodiment of the present application, the electronic device can identify, from at least one magnetic attachment, a target magnetic attachment that is currently close to or used in conjunction with the electronic device according to the magnetic field data detected by the magnetic field sensor, so that according to the identified target magnetic attachment, Displays a functional interface and/or notification message corresponding to the magnetic accessory, wherein the functional interface corresponding to the magnetic accessory can display the icon, name, and related parameters of the magnetic accessory, and the corresponding Notification messages can be popped up in the form of system messages, or pushed and displayed in the notification bar, etc.

由此,电子设备可以根据磁场传感器检测到的磁场数据自动识别出当前靠近电子设备或者正在与电子设备搭配使用的磁吸配件,方便用户查看管理,省去了手动添加相关磁吸配件的繁琐过程。As a result, the electronic device can automatically identify the magnetic accessories that are currently close to the electronic device or being used with the electronic device according to the magnetic field data detected by the magnetic field sensor, which is convenient for users to view and manage, and saves the tedious process of manually adding related magnetic accessories. .

本申请的一些实施例中,所述根据所述磁场数据,从所述至少一个磁吸配件中确定目标磁吸配件包括:In some embodiments of the present application, the determining, according to the magnetic field data, a target magnetic fitting from the at least one magnetic fitting includes:

将所述磁场数据与至少一个磁场强度范围进行比较,确定所述磁场数据所在的目标磁场强度范围,其中,每一所述磁场强度范围对应一个所述磁吸配件;comparing the magnetic field data with at least one magnetic field strength range, and determining a target magnetic field strength range where the magnetic field data is located, wherein each of the magnetic field strength ranges corresponds to one of the magnetic attachments;

根据所述目标磁场强度范围,确定目标磁吸配件。According to the target magnetic field strength range, the target magnetic attachment is determined.

本实施例中,可以理解的是,通常,不同磁吸配件产生的磁场变化量不同,即磁场强度不同,因此,在根据磁场传感器检测到的磁场数据识别出当前靠近电子设备或者正在与电子设备搭配使用的磁吸配件的类型时,可以根据检测到的磁场数据所在的磁场强度范围来定义不同的磁吸配件。其中,每一个磁吸配件对应一个磁场强度范围,则在检测到当前的磁场数据之后,将其与多个磁场强度范围进行比较,即可知道当前磁场数据所在的目标磁场强度范围,则该目标磁场强度范围所对应的目标磁吸配件即为当前靠近电子设备或者正在与电子设备搭配使用的磁吸配件。In this embodiment, it can be understood that, generally, the amount of change of the magnetic field generated by different magnetic accessories is different, that is, the intensity of the magnetic field is different. Therefore, according to the magnetic field data detected by the magnetic field sensor, it is recognized that the electronic device is currently approaching or is interacting with the electronic device. When matching the type of magnetic accessories used, different magnetic accessories can be defined according to the magnetic field strength range in which the detected magnetic field data is located. Among them, each magnetic attachment corresponds to a magnetic field strength range, after detecting the current magnetic field data, compare it with multiple magnetic field strength ranges to know the target magnetic field strength range where the current magnetic field data is located, then the target The target magnetic attachment corresponding to the magnetic field strength range is the magnetic attachment that is currently close to the electronic device or is being used with the electronic device.

总之,在本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。In a word, in the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when the magnetic field interference occurs, the target device associated with the magnetic field data can be controlled to perform magnetic field calibration according to the magnetic field data, so that the magnetic field calibration can be performed. Eliminate magnetic field interference and improve the reliability of electronic equipment.

请参考图2至图3,图2为本申请实施例提供的一种电子设备的结构示意图之一,图3为本申请实施例提供的一种电子设备的剖面示意图。如图2和图3所示,本申请另一方面实施例提供了一种电子设备,该电子设备包括设置于电子设备的磁场传感器3、处理器和目标器件;其中,磁场传感器3与处理器电连接,处理器还与目标器件电连接,磁场传感器3可以实时检测电子设备内部的磁场数据并发送给处理器,而处理器则可以根据接收到的磁场传感器3发送的磁场数据来控制目标器件进行磁场校准,目标器件可以为与磁场数据关联的电子器件。示例性地,处理器可以对磁场数据进行处理,例如确定磁场变化量等等,外部磁场干扰的磁场方向等等,继而根据磁场数据生成校准参数,然后,再利用生成的校准参数来控制目标器件进行磁场校准,由此降低甚至消除外部磁场带来的负面影响。其中,目标器件可以是电子设备内部与磁场数据相关的电子器件,也就是说,目标器件的运作原理与磁场数据相关,当磁场发生变化时,目标器件的运作将受到影响,例如精度受到影响,甚至无法正常工作等等。Please refer to FIG. 2 to FIG. 3 , FIG. 2 is one of schematic structural diagrams of an electronic device provided by an embodiment of the present application, and FIG. 3 is a schematic cross-sectional view of an electronic device provided by an embodiment of the present application. As shown in FIG. 2 and FIG. 3 , another embodiment of the present application provides an electronic device, the electronic device includes a magnetic field sensor 3, a processor and a target device disposed in the electronic device; wherein the magnetic field sensor 3 and the processor are Electrical connection, the processor is also electrically connected with the target device, the magnetic field sensor 3 can detect the magnetic field data inside the electronic device in real time and send it to the processor, and the processor can control the target device according to the received magnetic field data sent by the magnetic field sensor 3 For magnetic field calibration, the target device may be an electronic device associated with magnetic field data. Exemplarily, the processor may process the magnetic field data, such as determining the amount of magnetic field change, etc., the magnetic field direction of external magnetic field interference, etc., and then generate calibration parameters according to the magnetic field data, and then use the generated calibration parameters to control the target device. Perform magnetic field calibration, thereby reducing or even eliminating the negative effects of external magnetic fields. Among them, the target device can be an electronic device related to the magnetic field data inside the electronic device, that is to say, the operation principle of the target device is related to the magnetic field data. When the magnetic field changes, the operation of the target device will be affected, for example, the accuracy will be affected, doesn't even work and so on.

由此,本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,处理器即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。Therefore, in the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when the magnetic field interference occurs, the processor can control the target device associated with the magnetic field data to perform magnetic field calibration according to the magnetic field data. This eliminates magnetic field interference and improves the reliability of electronic equipment.

本申请的一些实施例中,磁场传感器3的数量可以为一个,也可以为两个或两个以上,具体数量可以根据电子设备对磁场的相关要求确定,而磁场传感器3的设置位置可以根据检测需求确定,磁场传感器可以位于电子设备的内部,也可以位于电子设备的表面,本申请实施例不做具体限定。In some embodiments of the present application, the number of the magnetic field sensors 3 may be one, or two or more, and the specific number may be determined according to the relevant requirements of the electronic device for the magnetic field, and the installation position of the magnetic field sensor 3 may be determined according to the detection According to the requirements, the magnetic field sensor may be located inside the electronic device, or may be located on the surface of the electronic device, which is not specifically limited in the embodiment of the present application.

本申请的一些实施例中,磁场传感器3的数量可以为一个,通过一个磁场传感器检测到的磁场数据,处理器控制不同的目标器件进行磁场校准。In some embodiments of the present application, the number of magnetic field sensors 3 may be one, and the processor controls different target devices to perform magnetic field calibration through magnetic field data detected by one magnetic field sensor.

本申请的另一些实施例中,磁场传感器3的数量与目标器件的数量相同,磁场传感器3与目标器件成对相邻设置。也就是说,由于目标器件对磁场的变化较为敏感,为了尽可能地降低外部磁场对目标器件的干扰,可以在每一个目标器件周围设置一个磁场传感器3,即目标器件与磁场传感器3相邻设置,以准确获取该目标器件所在位置或附近的磁场数据,由此可以确保检测到的磁场数据能够较为准确地反映该目标器件的真实磁场环境,从而提升磁场校准的准确度,进一步提升目标器件的可靠性。In other embodiments of the present application, the number of the magnetic field sensors 3 is the same as the number of the target devices, and the magnetic field sensors 3 and the target devices are arranged adjacent to each other in pairs. That is to say, since the target device is more sensitive to the change of the magnetic field, in order to reduce the interference of the external magnetic field on the target device as much as possible, a magnetic field sensor 3 can be arranged around each target device, that is, the target device is arranged adjacent to the magnetic field sensor 3 , so as to accurately obtain the magnetic field data at or near the target device, thus ensuring that the detected magnetic field data can more accurately reflect the real magnetic field environment of the target device, thereby improving the accuracy of magnetic field calibration and further improving the target device’s performance. reliability.

本申请的另一些实施例中,磁场传感器3可以是在电子设备原有结构的基础上增设的,也可以是复用电子设备内部原有的磁场传感器3。其中,增设磁场传感器3的方式可以方便根据需求设置磁场传感器3,即磁场传感器3的数量和位置可以灵活调整;而复用电子设备原有的磁场传感器3的方式则可以减少硬件成本,减少占用电子设备的内部空间、降低电子设备整机重量等。In other embodiments of the present application, the magnetic field sensor 3 may be added on the basis of the original structure of the electronic device, or may be a multiplexing of the original magnetic field sensor 3 inside the electronic device. Among them, the method of adding the magnetic field sensor 3 can be convenient to set the magnetic field sensor 3 according to the demand, that is, the number and position of the magnetic field sensor 3 can be flexibly adjusted; and the method of reusing the original magnetic field sensor 3 of the electronic device can reduce the hardware cost and occupation. The internal space of electronic equipment, reducing the overall weight of electronic equipment, etc.

本申请的一些实施例中,磁场传感器为磁力计或霍尔传感器。In some embodiments of the present application, the magnetic field sensor is a magnetometer or a Hall sensor.

如图2所示,本申请的一些实施例中,电子设备还与至少一个磁吸配件2相匹配,示例性地,磁吸配件2可以为磁吸充电宝、磁吸钱包、磁吸支架、磁吸充电器、磁吸保护套等等,电子设备可以与上述磁吸配件搭配使用,为了实现与磁吸配件2的匹配,电子设备可以包括磁吸件1,磁吸件1与磁吸配件2相匹配,例如,两者呈磁吸配合,磁吸配件2可以被电子设备的磁吸件1吸附固定在电子设备的表面,如电子设备的背面等。本实施例中,可选地,外部磁场干扰可以是与电子设备相匹配的外部磁吸配件产生,例如,当磁吸配件靠近电子设备或者贴附在电子设备表面时,将导致电子设备内部磁场发生变化。As shown in FIG. 2 , in some embodiments of the present application, the electronic device is also matched with at least one magnetic attachment 2 . Magnetic chargers, magnetic protective sleeves, etc. Electronic devices can be used with the above magnetic accessories. In order to match with the magnetic accessories 2, the electronic devices can include magnetic parts 1, magnetic parts 1 and magnetic accessories. 2 are matched, for example, the two are in a magnetic attraction fit, and the magnetic attachment 2 can be attached to the surface of the electronic device, such as the back of the electronic device, by the magnetic attraction part 1 of the electronic device. In this embodiment, optionally, the external magnetic field interference may be generated by an external magnetic attachment that matches the electronic device. For example, when the magnetic attachment is close to the electronic device or attached to the surface of the electronic device, the internal magnetic field of the electronic device will be caused. change.

本申请的一些实施例中,电子设备还包括线圈5,电子设备与磁吸配件2相匹配,而磁吸配件2通过该线圈5为电子设备无线充电。示例性地,线圈5为充电线圈,即线圈5通过充电电路与电子设备的电池连接,此时,磁吸配件2可以为磁吸充电宝、磁吸充电器、无线充电器等等,线圈5与磁吸配件2之间通过电磁波传递能量,即磁吸配件2通过电磁波将能量传递给线圈5,线圈5经过充电电路的整流、滤波等工序之后为电子设备的电池进行充电。In some embodiments of the present application, the electronic device further includes a coil 5 , the electronic device is matched with the magnetic attachment 2 , and the magnetic attachment 2 wirelessly charges the electronic device through the coil 5 . Exemplarily, the coil 5 is a charging coil, that is, the coil 5 is connected to the battery of the electronic device through a charging circuit. At this time, the magnetic accessory 2 can be a magnetic charging treasure, a magnetic charger, a wireless charger, etc., and the coil 5 Energy is transferred between the magnetic attachment 2 and the magnetic attachment 2 through electromagnetic waves, that is, the magnetic attachment 2 transmits energy to the coil 5 through electromagnetic waves, and the coil 5 charges the battery of the electronic device after the rectification and filtering of the charging circuit.

本申请的一些实施例中,电子设备还包括显示模组,显示模组用于在磁吸配件2靠近或者磁吸固定至电子设备的表面时,显示与磁吸配件2对应的功能界面和/或通知消息,其中,磁吸配件2对应的功能界面和/或通知消息根据磁场传感器3检测到的磁场数据确定。也就是说,本申请实施例还可以根据磁场传感器3检测到的磁场数据,识别出当前靠近或者磁吸固定至电子设备的表面的磁吸配件2的类型,从而根据识别出的磁吸配件2的类型显示与该磁吸配件2相对应的功能界面和/或通知消息,其中,与磁吸配件2对应的功能界面中可以显示磁吸配件2的图标、名称、相关参数以及设置选项等等,而与磁吸配件2对应的通知消息可以以系统消息的方式弹出,也可以在通知栏中推送显示等等。由此,电子设备可以根据检测到的磁场数据自动识别此时磁吸固定在电子设备上的磁吸配件2的类型,方便用户查看管理,省去了手动添加相关磁吸配件2的繁琐过程。In some embodiments of the present application, the electronic device further includes a display module, and the display module is used to display the function interface and/or corresponding to the magnetic attachment 2 when the magnetic attachment 2 approaches or is magnetically fixed to the surface of the electronic device. Or a notification message, wherein the function interface and/or notification message corresponding to the magnetic attachment 2 is determined according to the magnetic field data detected by the magnetic field sensor 3 . That is to say, the embodiment of the present application can also identify the type of the magnetic attachment 2 that is currently approaching or magnetically fixed to the surface of the electronic device according to the magnetic field data detected by the magnetic field sensor 3, so that according to the identified magnetic attachment 2 Displays the function interface and/or notification message corresponding to the magnetic accessory 2, wherein the icon, name, related parameters and setting options of the magnetic accessory 2 can be displayed in the functional interface corresponding to the magnetic accessory 2, etc. , and the notification message corresponding to the magnetic accessory 2 can be popped up in the form of a system message, or pushed and displayed in the notification bar, etc. Therefore, the electronic device can automatically identify the type of the magnetic attachment 2 magnetically fixed on the electronic device at this time according to the detected magnetic field data, which is convenient for the user to view and manage, and saves the tedious process of manually adding the relevant magnetic attachment 2 .

本申请的一些实施例中,可以理解的,通常不同磁吸配件2产生的磁场变化不同,因此,在根据磁场传感器3检测到的磁场数据识别出当前磁吸固定在电子设备的预设位置的磁吸配件2的类型时,可以根据检测到的磁场强度所在的范围来定义不同的磁吸配件2。In some embodiments of the present application, it can be understood that the changes of the magnetic field generated by different magnetic attachments 2 are usually different. Therefore, when it is identified according to the magnetic field data detected by the magnetic field sensor 3 that the current magnetic attraction is fixed at the preset position of the electronic device When determining the type of the magnetic attachment 2, different magnetic attachments 2 may be defined according to the range of the detected magnetic field strength.

本申请的一些实施例中,可选地,目标器件可以为摄像模组、电子罗盘等电子器件。示例性地,目标器件为摄像模组4,摄像模组4包括对焦马达和/或光学图像稳定器,其中,对焦马达需要采用磁力驱动的方式进行对焦,而光学图像稳定器也需要采用磁力驱动的方式进行对焦,则两者对磁场的变化较为敏感,会影响到其工作的稳定性,因而需要在存在外部磁场干扰时根据磁场传感器3检测到的磁场数据对其进行磁场校准,从而消除外部带来的磁场干扰。又如,目标器件为电子罗盘,电子设备根据电子罗盘检测地磁场实现指南功能,由于电子罗盘原始是以地磁场为基准实现指南功能,则在存在外部磁场干扰时,可以根据检测到的磁场数据对电子罗盘进行磁场校准,从而降低甚至消除磁场干扰,最终提升电子罗盘方向识别的准确度。In some embodiments of the present application, optionally, the target device may be an electronic device such as a camera module and an electronic compass. Exemplarily, the target device is a camera module 4, and the camera module 4 includes a focus motor and/or an optical image stabilizer, wherein the focus motor needs to be magnetically driven to focus, and the optical image stabilizer also needs to be magnetically driven. The two are more sensitive to changes in the magnetic field, which will affect the stability of their work. Therefore, when there is external magnetic field interference, it is necessary to perform magnetic field calibration according to the magnetic field data detected by the magnetic field sensor 3, so as to eliminate the external magnetic field. magnetic field interference. For another example, the target device is an electronic compass, and the electronic device realizes the guidance function based on the detection of the geomagnetic field by the electronic compass. Since the electronic compass originally realized the guidance function based on the geomagnetic field, when there is external magnetic field interference, it can be based on the detected magnetic field data. Perform magnetic field calibration on the electronic compass to reduce or even eliminate magnetic field interference and ultimately improve the accuracy of the direction recognition of the electronic compass.

本申请实施例中,示例性地,电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。In the embodiments of the present application, for example, the electronic device may be a terminal, and may also be other devices other than the terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a PDA, a vehicle electronic device, a Mobile Internet Device (MID), an augmented reality (AR)/virtual reality (VR) ) devices, robots, wearable devices, ultra-mobile personal computers (UMPCs), netbooks or personal digital assistants (PDAs), etc., and can also be personal computers (PCs), televisions (television, TV), teller machine or self-service machine, etc., which are not specifically limited in the embodiments of the present application.

总之,在本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。In a word, in the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when the magnetic field interference occurs, the target device associated with the magnetic field data can be controlled to perform magnetic field calibration according to the magnetic field data, so that the magnetic field calibration can be performed. Eliminate magnetic field interference and improve the reliability of electronic equipment.

可选地,如图4所示,本申请实施例还提供一种电子设备400,包括处理器401和存储器402,存储器402上存储有可在所述处理器401上运行的程序或指令,该程序或指令被处理器401执行时实现上述磁吸功能管理方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 4 , an embodiment of the present application further provides an electronic device 400 , including a processor 401 and a memory 402 . The memory 402 stores programs or instructions that can run on the processor 401 . When the program or the instruction is executed by the processor 401, each step of the above embodiment of the magnetic attraction function management method is implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

图5为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、以及处理器5010等部件。The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 5010, etc. part.

本领域技术人员可以理解,电子设备500还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器5010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 5010 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 5 does not constitute a limitation on the electronic device. The electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .

其中,传感器505,用于实时检测所述电子设备的磁场数据;Wherein, the sensor 505 is used to detect the magnetic field data of the electronic device in real time;

处理器5010,用于根据所述磁场数据控制目标器件进行磁场校准,其中,所述目标器件为所述电子设备内与所述磁场数据关联的电子器件。The processor 5010 is configured to control a target device to perform magnetic field calibration according to the magnetic field data, where the target device is an electronic device associated with the magnetic field data in the electronic device.

本申请实施例中,通过利用电子设备的磁场传感器实时检测电子设备的磁场数据,当发生磁场干扰时,即可根据磁场数据控制与磁场数据关联的目标器件进行磁场校准,由此可以消除磁场干扰,提升了电子设备的可靠性。In the embodiment of the present application, by using the magnetic field sensor of the electronic device to detect the magnetic field data of the electronic device in real time, when magnetic field interference occurs, the target device associated with the magnetic field data can be controlled to perform magnetic field calibration according to the magnetic field data, thereby eliminating the magnetic field interference. , improve the reliability of electronic equipment.

可选地,处理器5010,还用于根据所述磁场数据生成校准参数;Optionally, the processor 5010 is further configured to generate calibration parameters according to the magnetic field data;

处理器5010,还用于根据所述校准参数控制目标器件进行磁场校准。The processor 5010 is further configured to control the target device to perform magnetic field calibration according to the calibration parameter.

可选地,处理器5010,还用于根据所述磁场数据,从所述至少一个磁吸配件中确定目标磁吸配件;Optionally, the processor 5010 is further configured to determine a target magnetic attachment from the at least one magnetic attachment according to the magnetic field data;

显示单元506,用于显示与所述目标磁吸配件对应的功能界面和/或通知消息。The display unit 506 is configured to display a function interface and/or notification message corresponding to the target magnetic attachment.

可选地,处理器5010,还用于将所述磁场数据与至少一个磁场强度范围进行比较,确定所述磁场数据所在的目标磁场强度范围,其中,每一所述磁场强度范围对应一个所述磁吸配件;Optionally, the processor 5010 is further configured to compare the magnetic field data with at least one magnetic field intensity range, and determine a target magnetic field intensity range where the magnetic field data is located, wherein each magnetic field intensity range corresponds to one of the magnetic field intensity ranges. Magnetic accessories;

处理器5010,还用于根据所述目标磁场强度范围,确定目标磁吸配件。The processor 5010 is further configured to determine a target magnetic attachment according to the target magnetic field strength range.

应理解的是,本申请实施例中,输入单元504可以包括图形处理器(GraphicsProcessing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元506可包括显示面板5061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板5061。用户输入单元507包括触控面板5071以及其他输入设备5072中的至少一种。触控面板5071,也称为触摸屏。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that, in this embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042. camera) to process the image data of still pictures or videos. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072 . The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts, a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again.

存储器509可用于存储软件程序以及各种数据,存储器509可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器509可以包括易失性存储器或非易失性存储器,或者,存储器509可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器509包括但不限于这些和任意其它适合类型的存储器。The memory 509 can be used to store software programs and various data, and the memory 509 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store the operating system, at least one function required application programs or instructions (such as sound playback function, image playback function, etc.). Additionally, memory 509 may include volatile memory or non-volatile memory, or memory 509 may include both volatile and non-volatile memory. Wherein, the non-volatile memory may be Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (Erasable PROM, EPROM), Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous random access memory) DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 509 in this embodiment of the present application includes, but is not limited to, these and any other suitable types of memory.

处理器5010可包括一个或多个处理单元;可选的,处理器5010集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器5010中。The processor 5010 may include one or more processing units; optionally, the processor 5010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations involving an operating system, a user interface, and an application program, etc. Modem processors mainly deal with wireless communication signals, such as baseband processors. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 5010.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述磁吸功能管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned embodiments of the magnetic attraction function management method is implemented, and can To achieve the same technical effect, in order to avoid repetition, details are not repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器、随机存取存储器、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as computer read-only memory, random access memory, magnetic disk or optical disk, and the like.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述磁吸功能管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the above-mentioned magnetic attraction function management method In order to avoid repetition, the details are not repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述磁吸功能管理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the various processes in the above-mentioned embodiments of the magnetic attraction function management method, and can achieve the same The technical effect, in order to avoid repetition, will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (10)

1. A magnetic attraction function management method of an electronic device, wherein the electronic device comprises a magnetic field sensor, the method comprising:
detecting magnetic field data of the electronic equipment in real time through the magnetic field sensor;
and controlling a target device to perform magnetic field calibration according to the magnetic field data, wherein the target device is an electronic device in the electronic equipment, which is associated with the magnetic field data.
2. The method of claim 1, wherein controlling the target device for magnetic field calibration based on the magnetic field data comprises:
generating calibration parameters from the magnetic field data;
and controlling the target device to carry out magnetic field calibration according to the calibration parameters.
3. The method of claim 1, wherein the electronic device is mated with at least one magnetically attractive accessory, and wherein after detecting the magnetic field data of the electronic device in real time by the magnetic field sensor, the method further comprises:
determining a target magnetic attachment from the at least one magnetic attachment according to the magnetic field data;
and displaying a function interface and/or a notification message corresponding to the target magnetic attachment.
4. The method of claim 3, wherein said determining a target magnetic attachment from the at least one magnetic attachment based on the magnetic field data comprises:
comparing the magnetic field data with at least one magnetic field intensity range, and determining a target magnetic field intensity range in which the magnetic field data is located, wherein each magnetic field intensity range corresponds to one magnetic attraction accessory;
and determining a target magnetic suction accessory according to the target magnetic field intensity range.
5. An electronic device comprising a magnetic field sensor, a processor and a target device disposed on the electronic device;
the magnetic field sensor is electrically connected with the processor, the processor is electrically connected with the target device, and the magnetic field sensor detects the magnetic field data of the electronic equipment in real time and sends the data to the processor; and the processor controls the target device to carry out magnetic field calibration according to the magnetic field data, wherein the target device is an electronic device associated with the magnetic field data.
6. The electronic device of claim 5, wherein the number of magnetic field sensors is the same as the number of target devices, the magnetic field sensors being disposed adjacent to the target devices in pairs.
7. The electronic device of claim 5, wherein the magnetic field sensor is a magnetometer or a Hall sensor.
8. The electronic device of claim 5, further comprising a coil, wherein the electronic device is matched with a magnetic attachment, and the magnetic attachment wirelessly charges the electronic device through the coil.
9. The electronic device of claim 8, further comprising a driving component, wherein the driving component is connected to the coil, the driving component is configured to drive the coil to a target charging position according to the magnetic field data detected by the magnetic field sensor, and an energy transfer efficiency between the magnetic attraction fitting and the coil at the target charging position is greater than a preset efficiency threshold.
10. The electronic device of claim 5, wherein the target device is a camera module or an electronic compass.
CN202210836481.4A 2022-07-15 2022-07-15 Magnetic attraction function management method of electronic equipment and electronic equipment Pending CN115236571A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210836481.4A CN115236571A (en) 2022-07-15 2022-07-15 Magnetic attraction function management method of electronic equipment and electronic equipment
PCT/CN2023/106772 WO2024012446A1 (en) 2022-07-15 2023-07-11 Magnetic attraction function management method for electronic device, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210836481.4A CN115236571A (en) 2022-07-15 2022-07-15 Magnetic attraction function management method of electronic equipment and electronic equipment

Publications (1)

Publication Number Publication Date
CN115236571A true CN115236571A (en) 2022-10-25

Family

ID=83674202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210836481.4A Pending CN115236571A (en) 2022-07-15 2022-07-15 Magnetic attraction function management method of electronic equipment and electronic equipment

Country Status (2)

Country Link
CN (1) CN115236571A (en)
WO (1) WO2024012446A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116679243A (en) * 2022-12-12 2023-09-01 荣耀终端有限公司 Detection method, readable storage medium, program product, and electronic device
WO2024012446A1 (en) * 2022-07-15 2024-01-18 维沃移动通信有限公司 Magnetic attraction function management method for electronic device, and electronic device
CN119828345A (en) * 2024-12-19 2025-04-15 雷鸟创新技术(深圳)有限公司 Device calibration method, device, electronic device and computer readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487705A (en) * 2008-01-18 2009-07-22 宏达国际电子股份有限公司 Portable electronic device with electronic compass and electronic compass correction method
US20130328914A1 (en) * 2012-06-08 2013-12-12 Apple Inc. Peek mode and graphical user interface (gui) experience
CN103884326A (en) * 2012-12-21 2014-06-25 北京合众思壮科技股份有限公司 Electronic compass electronic compass
CN105004332A (en) * 2014-04-25 2015-10-28 广州市香港科大霍英东研究院 Correction method of electron compass of portable equipment
CN106918790A (en) * 2017-03-24 2017-07-04 深圳市沃特沃德股份有限公司 The calibration method of magnetic field intensity, device and terminal device
CN110108781A (en) * 2019-05-15 2019-08-09 中国人民银行印制科学技术研究所 Mobile device and its article discrimination methods, devices and systems, storage medium
CN112762915A (en) * 2020-12-21 2021-05-07 深圳酷派技术有限公司 Compass precision optimization method and device, storage medium and electronic equipment
CN214707215U (en) * 2021-02-23 2021-11-12 安克创新科技股份有限公司 Magnetic attraction type charging equipment
CN114279425A (en) * 2021-12-22 2022-04-05 努比亚技术有限公司 Compass precision improving method, terminal and computer readable storage medium
CN114325508A (en) * 2020-10-09 2022-04-12 苹果公司 Accessory device for communicating with an electronic device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI362482B (en) * 2007-12-31 2012-04-21 Htc Corp Portable electronic device with electronic compass and method for calibrating compass
CN114706135A (en) * 2022-03-21 2022-07-05 惠州Tcl移动通信有限公司 Magnetic field intensity compensation method and device, storage medium and mobile terminal
CN115236571A (en) * 2022-07-15 2022-10-25 维沃移动通信有限公司 Magnetic attraction function management method of electronic equipment and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487705A (en) * 2008-01-18 2009-07-22 宏达国际电子股份有限公司 Portable electronic device with electronic compass and electronic compass correction method
US20130328914A1 (en) * 2012-06-08 2013-12-12 Apple Inc. Peek mode and graphical user interface (gui) experience
CN103678184A (en) * 2012-06-08 2014-03-26 苹果公司 Detection system and method between accessory and electronic device
CN103884326A (en) * 2012-12-21 2014-06-25 北京合众思壮科技股份有限公司 Electronic compass electronic compass
CN105004332A (en) * 2014-04-25 2015-10-28 广州市香港科大霍英东研究院 Correction method of electron compass of portable equipment
CN106918790A (en) * 2017-03-24 2017-07-04 深圳市沃特沃德股份有限公司 The calibration method of magnetic field intensity, device and terminal device
CN110108781A (en) * 2019-05-15 2019-08-09 中国人民银行印制科学技术研究所 Mobile device and its article discrimination methods, devices and systems, storage medium
CN114325508A (en) * 2020-10-09 2022-04-12 苹果公司 Accessory device for communicating with an electronic device
CN112762915A (en) * 2020-12-21 2021-05-07 深圳酷派技术有限公司 Compass precision optimization method and device, storage medium and electronic equipment
CN214707215U (en) * 2021-02-23 2021-11-12 安克创新科技股份有限公司 Magnetic attraction type charging equipment
CN114279425A (en) * 2021-12-22 2022-04-05 努比亚技术有限公司 Compass precision improving method, terminal and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024012446A1 (en) * 2022-07-15 2024-01-18 维沃移动通信有限公司 Magnetic attraction function management method for electronic device, and electronic device
CN116679243A (en) * 2022-12-12 2023-09-01 荣耀终端有限公司 Detection method, readable storage medium, program product, and electronic device
CN119828345A (en) * 2024-12-19 2025-04-15 雷鸟创新技术(深圳)有限公司 Device calibration method, device, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
WO2024012446A1 (en) 2024-01-18

Similar Documents

Publication Publication Date Title
CN115236571A (en) Magnetic attraction function management method of electronic equipment and electronic equipment
US10929002B2 (en) Electronic device for controlling a plurality of applications
US9836275B2 (en) User device having a voice recognition function and an operation method thereof
US20250378137A1 (en) Method and apparatus for upgrading intelligent model, electronic device and non-transitory computer readable storage medium
WO2015194920A1 (en) Electronic device and method for controlling display
CN112905328B (en) Task processing method, device and computer-readable storage medium
KR102734793B1 (en) Electronic device for displaying message and operating method thereof
CN110046018A (en) Show method, apparatus, electronic equipment and the medium of message
CN110163296B (en) Image recognition method, device, equipment and storage medium
CN110049525A (en) Method for connecting network, device, electronic equipment and medium
CN108717365A (en) The method and apparatus for executing function in the application
CN108631694B (en) Voice coil motor control method and mobile terminal
CN114296824A (en) Page information configuration method, device, equipment and computer readable storage medium
CN113051485A (en) Group searching method, device, terminal and storage medium
CN112989198A (en) Push content determination method, device, equipment and computer-readable storage medium
CN108804151A (en) A kind of method and terminal of re-launching applications
US20220279129A1 (en) Electronic device and focusing method
KR20140068585A (en) Method and apparatus for distinction of finger touch and pen touch on touch screen
CN112036887A (en) Method, device, device and storage medium for resource transfer
CN110737692A (en) A method for retrieving data, and a method and device for establishing an index library
CN112765988A (en) Entity linking method, device and computer storage medium
CN111782767A (en) Question and answer method, device, equipment and storage medium
CN112560472A (en) Method and device for identifying sensitive information
WO2024149361A1 (en) Charging method and apparatus, electronic device, and readable storage medium
CN109918566B (en) Query method, device, electronic equipment and medium

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