Accessory identification method, accessory identification apparatus, electronic device, and computer-readable storage medium

The combination of Hall sensors and magnets is used to identify accessory types, solving the problems of high cost and large volume in the existing technology and achieving low-cost and small-volume accessory identification.

WO2025213380A1PCT designated stage Publication Date: 2025-10-16AAC ACOUSTIC TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/086950
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

Existing accessory identification methods have difficulty in identifying accessory types while reducing costs and occupying less space.

Method used

A Hall sensor is used as a detection element and a magnet as a trigger element. The state information of the detection element is used to identify the arrangement of the trigger elements on the accessory and determine the accessory type.

Benefits of technology

This achieves the goal of identifying accessory types while reducing costs, reducing hardware footprint, and improving identification flexibility and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024086950_16102025_PF_FP_ABST
    Figure CN2024086950_16102025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to the field of electronic product accessories, and provides an accessory identification method, an accessory identification apparatus, an electronic device, and a computer-readable storage medium. The accessory identification method comprises: providing a main unit equipped with an accessory, a detection element being provided in the area of the main unit close to the accessory; acquiring state information of the detection element, a trigger element being in the area of each accessory close to the main unit, the number of trigger elements on one accessory being less than or equal to the number of detection elements on the main unit on the corresponding area, the state information comprising a triggered state and a non-triggered state, if the detection element detects a matched trigger element, the state information being a triggered state, and if the detection element does not detect a matched trigger element, the state information being a non-triggered state; determining the arrangement situation of the trigger element on the accessory on the basis of the state information of each detection element; and determining the type of the accessory equipped on the main unit on the basis of the arrangement situation of the trigger element on the accessory. At least the type of the accessory can be identified, the cost is reduced, and the occupied volume is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Accessory identification method, accessory identification device, electronic device, and computer-readable storage medium TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the field of electronic product accessories, and in particular to an accessory identification method, an accessory identification device, an electronic device, and a computer-readable storage medium. BACKGROUND

[0002] The field of automatic identification technology is one of the main contents of modern information technology. Information technology includes physical signal, electrical signal technology, and sensor technology. Automatic identification technology has universal application in identifying the type of accessories assembled on an electronic product host. A specific area on an electronic product host can generally be assembled with different types of accessories. After assembling the accessories, the host needs to detect the type of the accessories to adjust the operating mode of the electronic product according to the type of the accessories. TECHNICAL PROBLEM

[0003] Current accessory identification methods are difficult to reduce costs and reduce occupied volume while identifying the type of accessories. TECHNICAL SOLUTION

[0004] Embodiments of the present disclosure provide an accessory identification method, an accessory identification device, an electronic device, and a computer-readable storage medium, which are at least beneficial in reducing costs and reducing occupied volume while identifying the type of accessories.

[0005] According to some embodiments of the present disclosure, the present disclosure provides an accessory identification method, which includes: providing a host, the host being assembled with at least one accessory, and the host being provided with at least one detection element near the area close to each accessory; obtaining the state information of the detection element on the host, each accessory being provided with a trigger element matching the detection element near the area close to the host, and the number of trigger elements on an accessory being less than or equal to the number of detection elements on the host in the corresponding area, the state information including triggering and non-triggering, if the detection element detects the matching trigger element, the state information of the detection element is triggering, and if the detection element does not detect the matching trigger element, the state information of the detection element is non-triggering; determining the arrangement of the trigger elements on the accessory according to the state information of each detection element on the host; and determining the type of the accessory assembled on the host according to the arrangement of the trigger elements on the accessory.

[0006] In some embodiments, the arrangement includes the number and the position; and determining the arrangement of the trigger elements on the accessory according to the state information of each of the detection elements on the host includes: determining the number and the position of the trigger elements on the accessory according to the number and the position of the triggered detection elements according to the state information.

[0007] In some embodiments, the detection elements include Hall sensors, and the trigger elements include magnets; and obtaining the state information of the detection elements on the host includes: if the Hall sensor detects a matching magnet at the corresponding position, the Hall sensor transmits one of a high signal or a low signal, and the state information of the Hall sensor is triggered; and if the Hall sensor does not detect a matching magnet at the corresponding position, the Hall sensor transmits the other of the high signal or the low signal, and the state information of the Hall sensor is untriggered.

[0008] In some embodiments, determining the type of the accessory assembled on the host according to the arrangement of the trigger elements on the accessory includes: setting a mapping relationship, the mapping relationship being used to represent the arrangement of the trigger elements corresponding to each type of the accessory; and determining the type of the accessory assembled on the host according to the arrangement of the trigger elements on the accessory and the mapping relationship.

[0009] In some embodiments, the at least one detection element corresponding to the accessory is uniformly distributed on a contact surface of the host for contacting the accessory.

[0010] In some embodiments, the detection elements are located inside the host, and the trigger elements are located inside the accessory.

[0011] In some embodiments, the host has a plurality of detection circuits corresponding to a plurality of the detection elements one by one; and obtaining the state information of the detection elements on the host includes: obtaining the state information of the corresponding detection elements on the host by each of the detection circuits.

[0012] According to some embodiments of the present disclosure, another aspect of the embodiments of the present disclosure further provides a device for identifying accessories, applied to a host device with at least one accessory, and the host device is provided with at least one detection element near the area of each accessory, comprising: an obtaining module, configured to obtain state information of the detection element on the host device, each accessory is provided with a trigger element matching the detection element near the area of the host device, and the number of the trigger element on an accessory is less than or equal to the number of the detection element on the host device in the corresponding area, the state information includes triggering and non-triggering, if the detection element detects the matching trigger element, the state information of the detection element is triggering, and if the detection element does not detect the matching trigger element, the state information of the detection element is non-triggering; a determining module, configured to determine the arrangement of the trigger element on the accessory according to the state information of each detection element on the host device; and an identifying module, configured to determine the type of the accessory assembled on the host device according to the arrangement of the trigger element on the accessory.

[0013] According to some embodiments of the present disclosure, another aspect of the embodiments of the present disclosure further provides an electronic device, comprising: a memory and a processor, the memory is configured to store computer instructions executable on the processor, and the processor is configured to implement the accessory identification method described in the above embodiments when executing the computer instructions.

[0014] According to some embodiments of the present disclosure, another aspect of the embodiments of the present disclosure further provides a computer readable storage medium, comprising: the computer program is executed to implement the accessory identification method described in the above embodiments.

[0015] The technical solutions provided by the embodiments of the present disclosure have at least the following advantages:

[0016] In the accessory identification method provided by the embodiment of the present disclosure, a host is first provided, at least one accessory is mounted on the host, and at least one detection element is provided in an area of ​​the host near each accessory; status information of the detection element on the host is obtained, a trigger element matching the detection element is provided in an area of ​​each accessory near the host, and the number of trigger elements on an accessory is less than or equal to the number of detection elements on the host in the corresponding area, and the status information includes triggering and non-triggering. If the detection element detects a matching trigger element, the status information of the detection element is triggered; if the detection element does not detect a matching trigger element, the status information of the detection element is not triggered; according to the status information of each detection element on the host, the arrangement of the trigger elements on the accessory is determined; according to the arrangement of the trigger elements on the accessory, the type of accessory mounted on the host is determined. In the related art, the following two methods are generally used to identify the type of accessory installed on a host: the first method is to set a camera or scanner on the host, set a QR code or barcode on the accessory, and have the host scan the accessory to read the information to identify the accessory type; the second method is to set a Near Field Communication (NFC) card reader on the host, set an NFC tag on the accessory, and use the NFC card reader on the host to read the relevant information on the NFC tag of the accessory to determine the type of accessory installed on the host. However, if the first method of scanning the code to identify the accessory type is used, the camera or scanner on the host occupies a large volume, requires high system platform resources, and the QR code or barcode on the accessory is easy to copy and misuse. If the second method of NFC identification of the accessory type is used, both the host and the accessory require a certain volume of antenna, which is costly. If the card reader is left on for a long time, it will cause high power consumption, and turning it on again when the card reader is in use will affect the user experience. The accessory identification method provided by the embodiment of the present disclosure provides another accessory identification method that does not require code scanning or NFC card reading. A detection element is set on the host, and a trigger element is set on the accessory. The trigger elements on accessories of different accessory types have different arrangements, and different status information of multiple detection elements on the host can be obtained accordingly to determine the type of accessory. In this way, it is possible to detect whether an accessory is assembled on the host and the type of the assembled accessory, and the cost is low, the hardware implementation is relatively simple, and the volume occupied is also small. In addition, the more detection elements on the host area corresponding to an accessory, the more different combinations of status information that can be generated by multiple detection elements, and the more types of accessories that can be identified. The number of detection elements corresponding to the accessories can be flexibly adjusted according to the number of types of accessories that need to be identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] One or more embodiments are illustrated by way of example in the drawings and described herein in connection with the specified embodiments. These embodiments are described in connection with the best mode contemplated for practicing the embodiments, and various changes and modifications recognizable by those of ordinary skill in the art can be made therein without departing from the spirit and scope of the disclosure, and the general principles and features described herein are more broadly applicable and can be employed to provide other examples. Other embodiments are set forth in the following claims.

[0018] FIG. 1 is a flowchart of a method for identifying a component according to an embodiment of the disclosure;

[0019] FIG. 2 is a schematic diagram of a host device with a component according to an embodiment of the disclosure;

[0020] FIG. 3 is a schematic diagram of a component identification device according to an embodiment of the disclosure;

[0021] FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the disclosure. Embodiments of the disclosure

[0022] As can be seen from the background, the current component identification method is difficult to reduce the cost and the occupied volume while identifying the type of the component.

[0023] The disclosure provides a component identification method. A host device with at least one component is provided. The host device is provided with at least one detection element near each component. The state information of the detection element on the host device is obtained. Each component is provided with a trigger element matching the detection element near the area of the host device. The number of trigger elements on the component is less than or equal to the number of detection elements on the host device in the corresponding area. The state information includes trigger and non-trigger. If the detection element detects the matching trigger element, the state information of the detection element is trigger. If the detection element does not detect the matching trigger element, the state information of the detection element is non-trigger. The arrangement of the trigger elements on the component is determined according to the state information of each detection element on the host device. The type of the component assembled on the host device is determined according to the arrangement of the trigger elements on the component. In this way, whether the component is assembled on the host device and the type of the assembled component can be detected. The cost is low, the hardware implementation is simple, and the occupied volume is small. In addition, the more detection elements on the host device area corresponding to a component, the more different combinations of state information generated by the multiple detection elements, and the more component types that can be identified. The number of detection elements corresponding to the component can be flexibly adjusted according to the number of component types to be identified.

[0024] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present disclosure will be described in detail below with reference to the drawings. However, those skilled in the art can understand that, in the embodiments of the present disclosure, many technical details are presented in order to make the readers better understand the present disclosure. However, the technical solutions claimed by the present disclosure can be implemented even without these technical details and based on various changes and modifications of the following embodiments.

[0025] FIG. 1 is a flowchart of a method for identifying an accessory according to an embodiment of the present disclosure. FIG. 2 is a schematic diagram of a host device equipped with an accessory according to an embodiment of the present disclosure.

[0026] Referring to FIGS. 1 and 2, S1, a host device 100 is provided, the host device 100 is equipped with at least one accessory 200, and the host device 100 is provided with at least one detection element 110 near a region of each accessory 200.

[0027] The host device 100 of an electronic product can have a region capable of being equipped with an accessory 200, and can be equipped with different types of accessories 200. By using a certain accessory identification method, it can be determined which type of accessory 200 is equipped on the host device 100, so that the host device 100 can adjust different running states.

[0028] In some embodiments, the host device 100 can have one or more regions equipped with an accessory 200, that is, the host device 100 can be equipped with one or more accessories 200. And each accessory 200 equipped on the host device 100 can be a plurality of different types of accessories 200. For example, if the host device is an electronic toy model, the electronic toy model can have a region equipped with a hat and shoes, and the hat and shoes can be accessories of the electronic toy model, and different types of hats and different types of shoes can be equipped. After the electronic toy model identifies the types of the equipped hat and shoes, it can adjust the corresponding running state. The at least one detection element 110 provided near the region of each accessory 200 of the host device 100 can be used to identify the category of the accessory 200. The more categories of accessories 200 that need to be identified, the more detection elements 110 can be provided in this region.

[0029] Referring to FIG. 1 and FIG. 2, S2, state information of the detection elements 110 on the host 100 is acquired, each accessory 200 is provided with trigger elements 210 matching the detection elements 110 in the area close to the host 100, and the number of trigger elements 210 on an accessory 200 is less than or equal to the number of detection elements 110 on the host 100 in the corresponding area, and the state information includes trigger and non-trigger, if the detection element 110 detects the matching trigger element 210, the state information of the detection element 110 is trigger, and if the detection element 110 does not detect the matching trigger element 210, the state information of the detection element 110 is non-trigger.

[0030] That is, a plurality of detection elements 110 are provided in the area corresponding to one accessory 200 on the host 100, and it is assumed that the number of detection elements 110 corresponding to the area of one accessory 200 is n. The n detection elements 110 are arranged on the host 100, each having a corresponding position. The accessory 200 in the area can have any integer number of trigger elements 210 less than or equal to n and greater than 0, and the number of trigger elements 210 on the accessory 200 can be n, n-1, etc. The position of one of the plurality of trigger elements 210 on the accessory 200 needs to correspond to a detection element 110 on the host 100. If the accessory 200 has a trigger element 210 at the position corresponding to a detection element 110, the detection element 110 detects the matching trigger element 210, and the state information of the detection element 110 is trigger; if the accessory 200 does not have a trigger element 210 at the position corresponding to a detection element 110, the detection element 110 cannot detect the matching trigger element 210, and the state information of the detection element 110 is non-trigger.

[0031] Specifically, referring to FIG. 2, the region where the accessory 200 is assembled on the host 100 is provided with three detection elements 110, and the positions of the single detection elements 110 are respectively set as position a, position b and position c. Correspondingly, the number of trigger elements 210 that the accessory 200 can have is less than or equal to 3 and greater than 0, and the number of trigger elements 210 that the accessory 200 can have is 1, 2 or 3. At this time, the accessory 200 assembled on the host 100 can have 7 kinds. If the number of trigger elements 210 on the accessory 200 is 1, the accessory 200 can include: trigger element 210 at position a, trigger element 210 at position b and trigger element 210 at position c three kinds, if the number of trigger elements 210 on the accessory 200 is 2, the accessory 200 can include: trigger element 210 at position a, b, trigger element 210 at position a, c, trigger element 210 at position b, c three kinds, if the number of trigger elements 210 on the accessory 200 is 3, the accessory 200 only has trigger element 210 at position a, b, c one kind, a total of 7 kinds. Correspondingly, the state information generated by the three detection elements 110 of this region also has 7 kinds, which are respectively: position a trigger, position b not trigger, position c not trigger; Position a not trigger, position b trigger, position c not trigger; Position a not trigger, position b not trigger, position c trigger; Position a trigger, position b trigger, position c not trigger; Position a trigger, position b not trigger, position c trigger; Position a not trigger, position b trigger, position c trigger; Position a trigger, position b trigger, position c trigger. If the three detection elements 110 are not triggered, the accessory is not assembled in this region. In step S1, the state information of all detection elements 110 needs to be obtained to perform the next accessory recognition step.

[0032] With reference back to FIG. 2, in some embodiments, the detection element 110 can comprise a Hall sensor, and the triggering element 210 can comprise a magnet; obtaining the state information of the detection element 110 on the host 100 can comprise: if the Hall sensor detects a matching magnet at the corresponding position, the Hall sensor transmits one of a high signal or a low signal, and the state information of the Hall sensor is triggered; if the Hall sensor does not detect a matching magnet at the corresponding position, the Hall sensor transmits the other of the high signal or the low signal, and the state information of the Hall sensor is not triggered. That is, if one Hall sensor detects a magnet at the corresponding position to transmit a low signal, and no magnet transmits a high signal; if one Hall sensor detects a magnet at the corresponding position to transmit a high signal, and no magnet transmits a low signal. That is, whether the Hall sensor has a magnet at the corresponding position will cause the Hall sensor to transmit two different signals. By detecting the signal transmitted by the Hall sensor, it can be determined whether the state information of the Hall sensor is triggered or not triggered. When the detection element 110 is a Hall sensor and the triggering element 210 is a magnet, the hardware implementation of the accessory identification method is relatively simple, and the overall cost is relatively low. Moreover, the Hall sensor and the magnet do not need to occupy a large volume, and can achieve the identification of the accessory type while reducing the cost and the occupied space of the detection element and the magnet.

[0033] It should be noted that when the detection element 110 is a Hall sensor and the triggering element 210 is a magnet, the adjacent Hall sensors need to maintain a certain distance to prevent mutual interference between adjacent Hall sensors and adjacent magnets, resulting in inaccurate identification results, and improve the accuracy of the accessory identification results.

[0034] With reference to FIG. 2, in some embodiments, at least one detection element 110 corresponding to an accessory 200 can be uniformly distributed on the contact surface of the host 100 for contacting the accessory 200. When the at least one detection element 110 corresponding to an accessory 200 is uniformly arranged on the contact surface of the host 100 for contacting the accessory 200, the distance between adjacent detection elements 110 can be the same, or the difference between the distances between adjacent detection elements 110 can be small. In this way, the distance between any two detection elements 110 can be kept within a range that is neither too small to cause interference nor too large to occupy a large space, which can avoid mutual interference between the detection elements 110, ensure the accuracy of the accessory identification results, and reduce the occupied space of the detection elements 110 and the triggering elements 210.

[0035] With reference to FIG. 2, in some embodiments, the detection element 110 can be located inside the host 100, and the triggering element 210 can be located inside the accessory 200. When the detection element 110 is located inside the host 100 and the triggering element 210 is located inside the accessory 200, both the detection element 110 and the triggering element 210 are hidden, which not only reduces the overall volume of the host 100 and the accessory 200 and improves the aesthetics, but also avoids information from being impersonated or stolen, thereby improving the security.

[0036] In other embodiments, the detection element 110 can also be located outside the host 100, and the triggering element 210 can also be located outside the accessory 200.

[0037] In some embodiments, the host 100 can have a plurality of detection circuits (not shown in the figure) corresponding to the plurality of detection elements 110 one by one; obtaining the state information of the detection element 110 on the host 100 can include: obtaining the state information of the corresponding detection element 110 on the host 100 by each detection circuit. In the case where the host 100 has a plurality of detection circuits corresponding to the plurality of detection elements 110 one by one, the state information of the corresponding detection element 110 on the host 100 can be obtained by each detection circuit. Since the state of the detection circuit will change when the detection element 110 is triggered or not, the state of the detection circuit can be obtained, and the state information of the detection element 110 can be determined based on the correspondence between the state of the detection circuit and whether the detection element 110 is triggered.

[0038] With reference to FIG. 1, S3, according to the state information of each detection element 110 on the host 100, the arrangement of the triggering element 210 on the accessory 200 is determined.

[0039] According to the above, with reference to FIG. 2, the area of the accessory 200 assembled above the host 100 is provided with three detection elements 110, and the positions of the single detection elements 110 are position a, position b, and position c, respectively. The state information of each detection element 110 can include seven cases: position a is triggered, position b is not triggered, and position c is not triggered; position a is not triggered, position b is triggered, and position c is not triggered; position a is not triggered, position b is not triggered, and position c is triggered; position a is triggered, position b is triggered, and position c is not triggered; position a is triggered, position b is not triggered, and position c is triggered; position a is not triggered, position b is triggered, and position c is triggered; and position a is triggered, position b is triggered, and position c is triggered. If all the three detection elements 110 are not triggered, it means that no accessory 200 is assembled in this area. If the state information of a certain detection element 110 is triggered, it can be determined that the accessory 200 at this position has a triggering element 210.

[0040] In some embodiments, the arrangement of the trigger elements 210 on the accessory 200 can also include only the number; determining the arrangement of the trigger elements 210 on the accessory 200 according to the state information of each detection element 110 on the host 100 can include: determining the number of the trigger elements 210 on the accessory 200 according to the number of the detection elements 110 whose state information is triggered. Specifically, as shown in FIG. 2, three detection elements 110 are arranged on the region of the accessory 200 above the host 100, and thus three types of accessories 200 can be detected, i.e., one detection element 110 whose state information is triggered, the accessory 200 has one trigger element; two detection elements 110 whose state information is triggered, the accessory 200 has two trigger elements 210; three detection elements 110 whose state information is triggered, the accessory 200 has three trigger elements 210.

[0041] In other embodiments, the arrangement of the trigger elements 210 on the accessory 200 can include the number and the position; determining the arrangement of the trigger elements 210 on the accessory 200 according to the state information of each detection element 110 on the host 100 can include: determining the number and the position of the trigger elements 210 on the accessory 200 according to the number and the position of the detection elements 110 whose state information is triggered. That is, the arrangement includes not only the number of the trigger elements 210 on the accessory 200, but also the position of the trigger elements 210 on the accessory 200. Specifically, as described above, when three detection elements 110 are arranged on the region of the accessory 200 above the host 100 in FIG. 2, there are seven combinations of the state information of the three detection elements 110, which can correspond to seven arrangements of the trigger elements 210 on the accessory, specifically: the number of the trigger elements 210 on the accessory 200 is one, i.e., the trigger element 210 is at position a, the trigger element 210 is at position b, and the trigger element 210 is at position c; the number of the trigger elements 210 on the accessory 200 is two, i.e., the trigger element 210 is at positions a and b, the trigger element 210 is at positions a and c, and the trigger element 210 is at positions b and c; the number of the trigger elements 210 on the accessory 200 is three, i.e., the accessory 200 has the trigger element 210 at positions a, b and c, and there are seven types in total. According to the state information of each detection element 110 on the host 100, the arrangement of the trigger elements 210 on the accessory 200 can be determined as one of the seven types. When the arrangement includes the number and the position, as few detection elements 110 and trigger elements 210 as possible can be used to identify as many types of accessories 200 as possible, which can simultaneously achieve the requirements of reducing the volume, reducing the cost, identifying more types of accessories, and effectively achieve the cost reduction and efficiency increase of the accessory identification.

[0042] Referring to FIG. 1, S4, the type of the accessory 200 assembled on the host 100 is determined according to the arrangement of the trigger element 210 on the accessory 200.

[0043] According to the above, after the arrangement of the trigger element 210 on the accessory 200 is determined according to the state information of each detection element 110 on the host 100, the type of the accessory 200 assembled on the host 100 can be determined according to the arrangement of the trigger element 210 on the accessory 200. The arrangement of the trigger element 210 on each type of accessory 200 can correspond to one type of accessory 200, so that the type of the accessory 200 can be identified when the arrangement type of the trigger element 210 on the accessory 200 is known.

[0044] In some embodiments, determining the type of the accessory 200 assembled on the host 100 according to the arrangement of the trigger element 210 on the accessory 200 can include: setting a mapping relationship, the mapping relationship being used to represent the arrangement of the trigger element 210 corresponding to each type of accessory; and determining the type of the accessory 200 assembled on the host 100 according to the arrangement of the trigger element 210 on the accessory 200 and the mapping relationship. Specifically, referring to FIG. 2, according to the above, it is known that three detection elements 110 are arranged on the area of the accessory 200 above the host 100, at this time, the arrangement of the trigger element 210 on the accessory 200 can have seven types, which are: the number of the trigger element 210 on the accessory 200 is one: the trigger element 210 is at position a, the trigger element 210 is at position b, and the trigger element 210 is at position c; the number of the trigger element 210 on the accessory 200 is two: the trigger element 210 is at positions a and b, the trigger element 210 is at positions a and c, and the trigger element 210 is at positions b and c; the number of the trigger element 210 on the accessory 200 is three: the accessory 200 has the trigger element 210 at positions a, b, and c. The seven types of the arrangement of the trigger element 210 on the accessory 200 and the types of the accessory 200 can have a mapping relationship, which can be: the trigger element 210 at position a—accessory one; the trigger element 210 at position b—accessory two; the trigger element 210 at position c—accessory three; the trigger element 210 at positions a and b—accessory four; the trigger element 210 at positions a and c—accessory five; the trigger element 210 at positions b and c—accessory six; and the trigger element 210 at positions a, b, and c—accessory seven. According to this one-to-one mapping relationship between the arrangement and the type of the accessory, the unique type of the accessory can be identified when the arrangement of the trigger element 210 on the accessory 200 is known.

[0045] Referring to Table 1 below, Table 1 is a kind of accessory identification corresponding table, when the detection element is Hall sensor, the trigger element is magnet, Hall sensor has magnet in corresponding position then transmits high signal, Hall sensor does not have magnet in corresponding position then transmits low signal, and when the region corresponding to this accessory on host has three detection elements, the accessory identification corresponding table in one case.It needs to be explained that, in Table 1, the identification result column "0" indicates that the state information of the detection element is not triggered, and the corresponding position does not have a trigger element, and "1" indicates that the state information of the detection element is triggered, and the corresponding position has a trigger element.

[0046] Accessory number Position a Position b Position c Sensor a Sensor b Sensor c Identification result Accessory 1 None None High Low High 001 Accessory 2 None High None Low High 010 Accessory 3 None High High Low High 011 Accessory 4 High None None Low Low 100 Accessory 5 High None High Low High 101 Accessory 6 High High None High High 110 Accessory 7 High High High High 111 None Accessory None None None Low Low 000

[0047] The three columns of position a, position b and position c in Table 1 indicate whether there is a magnet at the three positions, the three columns of sensor a, sensor b and sensor c indicate the signal type transmitted by the Hall sensor at the three positions, the identification result indicates the arrangement of the trigger element on the accessory, the column of identification result and the column of accessory number are the mapping relationship between the arrangement and the accessory type, one unique identification result can correspond to one unique accessory type, so as to realize the identification of the accessory type.

[0048] It needs to be explained that, the above description of the arrangement, state information, mapping relationship and accessory type of the detection element 110 and the trigger element 210 in reference to Figure 2 is only an example, for the case that one accessory 200 corresponds to three detection elements 110 on the host, in other embodiments, the detection elements 110 arranged in the region of the host 100 equipped with one accessory 200 can be n, n is any positive integer greater than 0, and the specific value of n can be selected according to the number of accessory types 200.

[0049] The accessory identification method provided by the embodiments of the present disclosure first provides a host device assembled with at least one accessory, the host device is provided with at least one detection element near the area close to each accessory; state information of the detection element on the host device is acquired, each accessory is provided with a trigger element matched with the detection element near the area close to the host device, and the number of the trigger element on the accessory is less than or equal to the number of the detection element of the host device on the corresponding area, the state information includes triggering and non-triggering, if the detection element detects the matched trigger element, the state information of the detection element is triggering, and if the detection element does not detect the matched trigger element, the state information of the detection element is non-triggering; the arrangement of the trigger element on the accessory is determined according to the state information of each detection element on the host device; and the type of the accessory assembled on the host device is determined according to the arrangement of the trigger element on the accessory. In this way, whether the accessory is assembled on the host device and the type of the assembled accessory can be detected, and the cost is relatively low, the hardware implementation is relatively simple, and the occupied volume is relatively small. In addition, the more the detection elements on the host device area corresponding to one accessory, the more the different combinations of the state information that can be generated by the plurality of detection elements, and the more the accessory types that can be identified, the number of the detection elements corresponding to the accessory can be flexibly adjusted according to the number of the accessory types to be identified.

[0050] Correspondingly, another embodiment of the present disclosure also provides an accessory identification device, and the accessory identification device provided by the another embodiment of the present disclosure is used to implement the accessory identification method provided by the above-mentioned embodiment. The accessory identification device provided by the another embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings. The same or corresponding parts of the above-mentioned embodiment can be referred to the corresponding description of the above-mentioned embodiment, and will not be described in detail below.

[0051] FIG. 3 is a schematic diagram of an accessory identification device provided by an embodiment of the present disclosure.

[0052] Referring to FIG. 3, the accessory identification device is applied to a host device assembled with at least one accessory, and the host device is provided with at least one detection element near the area close to each accessory. The accessory identification device includes: an acquisition module 310, configured to acquire state information of the detection element on the host device, each accessory is provided with a trigger element matched with the detection element near the area close to the host device, and the number of the trigger element on one accessory is less than or equal to the number of the detection element of the host device on the corresponding area, the state information includes triggering and non-triggering, if the detection element detects the matched trigger element, the state information of the detection element is triggering, and if the detection element does not detect the matched trigger element, the state information of the detection element is non-triggering; a determination module 320, configured to determine the arrangement of the trigger element on the accessory according to the state information of each detection element on the host device; and an identification module 330, configured to determine the type of the accessory assembled on the host device according to the arrangement of the trigger element on the accessory.

[0053] Correspondingly, another embodiment of the present disclosure also provides an electronic device, and the electronic device provided by another embodiment of the present disclosure is used to implement the accessory identification method provided by the above-mentioned embodiment. The electronic device provided by another embodiment of the present disclosure will be described in detail below in combination with the drawings. The same or corresponding parts as the previous embodiment can refer to the corresponding description of the previous embodiment, and the following will not be described in detail.

[0054] FIG. 4 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure.

[0055] Referring to FIG. 4, the electronic device provided by an embodiment of the present disclosure includes a memory 10 and a processor 20. The memory 10 is used to store computer instructions executable on the processor 20, and the processor 20 is used to implement the accessory identification method provided by the above-mentioned embodiment when executing the computer instructions.

[0056] The memory 10 and the processor 20 are connected in a bus manner, and the bus can include any number of interconnected buses and bridges. The bus connects one or more processors 20 and memories 10 and various circuits together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits together, which are well known in the art, and thus will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements such as multiple receivers and transmitters, which provide a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through the antenna, and further, the antenna also receives data and transmits the data to the processor 20.

[0057] The processor 20 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory 10 can be used to store data used by the processor 20 when performing operations.

[0058] Correspondingly, another embodiment of the present disclosure also provides a computer readable storage medium, and the computer readable storage medium provided by another embodiment of the present disclosure is used to implement the accessory identification method provided by the above-mentioned embodiment. The computer readable storage medium provided by another embodiment of the present disclosure will be described in detail below in combination with the drawings. The same or corresponding parts as the previous embodiment can refer to the corresponding description of the previous embodiment, and the following will not be described in detail.

[0059] The computer readable storage medium provided by an embodiment of the present disclosure has a computer program stored thereon, and the computer program is executed to implement the accessory identification method provided by the above-mentioned embodiment.

[0060] That is, a person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment methods can be completed by instructing the relevant hardware by a program stored in a storage medium, including a plurality of instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0061] A person of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for implementing the present disclosure, and in actual applications, various changes can be made in form and details without departing from the spirit and scope of the present disclosure. Any person skilled in the art can make respective changes and modifications without departing from the spirit and scope of the present disclosure, and therefore the protection scope of the present disclosure should be limited by the scope defined by the claims.

Claims

1. A method for identifying an accessory, characterized in that: include: A host is provided, wherein at least one accessory is mounted on the host, and at least one detection element is disposed in an area of ​​the host near each accessory; Obtaining status information of the detection element on the host, where each area of ​​the accessory close to the host is provided with a trigger element matching the detection element, and the number of the trigger elements on the accessory is less than or equal to the number of the detection elements on the host in the corresponding area, and the status information includes triggered and untriggered. If the detection element detects the matching trigger element, the status information of the detection element is triggered; if the detection element does not detect the matching trigger element, the status information of the detection element is untriggered; Determining the arrangement of the trigger elements on the accessory according to the status information of each of the detection elements on the host; The type of the accessory assembled on the host is determined according to the arrangement of the trigger elements on the accessory.

2. The accessory identification method according to claim 1, characterized in that: The arrangement includes quantity and position; The determining, based on the status information of each detection element on the host, the arrangement of the trigger elements on the accessory includes: The number and positions of the triggering elements on the accessory are determined according to the number and positions of the detection elements that are triggered by the status information.

3. The accessory identification method according to claim 1, characterized in that: The detection element includes a Hall sensor, and the trigger element includes a magnet; The acquiring of the status information of the detection element on the host comprises: If the Hall sensor detects a matching magnet at a corresponding position, the Hall sensor transmits a high signal or a low signal, and the state information of the Hall sensor is triggered; If the Hall sensor does not detect a matching magnet at a corresponding position, the Hall sensor transmits another of a high signal and a low signal, and the state information of the Hall sensor is not triggered.

4. The accessory identification method according to claim 1, characterized in that: The determining the type of the accessory mounted on the host according to the arrangement of the trigger elements on the accessory includes: Setting a mapping relationship, where the mapping relationship is used to represent the arrangement of the trigger elements corresponding to each type of the accessories; The type of the accessory mounted on the host is determined according to the arrangement of the trigger elements on the accessory and the mapping relationship.

5. The accessory identification method according to claim 1, characterized in that: The at least one detection element corresponding to one of the accessories is evenly distributed on a contact surface of the host for contacting the accessory.

6. The accessory identification method according to claim 1 or 5, characterized in that: The detection element is located inside the host, and the trigger element is located inside the accessory.

7. The accessory identification method according to claim 1, characterized in that: The host has a plurality of detection circuits corresponding to the plurality of detection elements on a one-to-one basis; The acquiring of the status information of the detection element on the host comprises: The status information of the corresponding detection element on the host is obtained through each detection circuit.

8. An accessory identification device, characterized in that: Applicable to a host equipped with at least one accessory, wherein at least one detection element is provided in an area of ​​the host near each accessory, the accessory identification device comprises: an acquisition module, configured to acquire status information of the detection element on the host, wherein each of the accessory is provided with a trigger element matching the detection element in an area close to the host, and the number of the trigger elements on an accessory is less than or equal to the number of the detection elements on the host in the corresponding area, and the status information includes triggered and untriggered. If the detection element detects the matching trigger element, the status information of the detection element is triggered; if the detection element does not detect the matching trigger element, the status information of the detection element is untriggered; a determination module, configured to determine the arrangement of the trigger elements on the accessory according to the status information of each detection element on the host; The identification module is used to determine the type of the accessory assembled on the host according to the arrangement of the trigger elements on the accessory.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the accessory identification method according to any one of claims 1 to 7 when executing the computer instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the accessory identification method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Earphone type identification device, earphone type identification method, equipment and storage medium

    CN114979925A

  • Accessory identification method and device, electronic equipment and storage medium

    CN116678446A

  • Personal care equipment detection method, personal care equipment, terminal and medium

    CN116779126A

  • Character recognition device using magnetic blocks and method thereof

    KR1020150007007A