WO2025213380A1 - 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质 - Google Patents

配件识别方法、配件识别装置、电子设备以及计算机可读存储介质

Info

Publication number
WO2025213380A1
WO2025213380A1 PCT/CN2024/086950 CN2024086950W WO2025213380A1 WO 2025213380 A1 WO2025213380 A1 WO 2025213380A1 CN 2024086950 W CN2024086950 W CN 2024086950W WO 2025213380 A1 WO2025213380 A1 WO 2025213380A1
Authority
WO
WIPO (PCT)
Prior art keywords
accessory
host
detection element
trigger
status information
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
PCT/CN2024/086950
Other languages
English (en)
French (fr)
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.)
AAC Technologies Holdings Shenzhen Co Ltd
Original Assignee
AAC Acoustic Technologies Shenzhen 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 AAC Acoustic Technologies Shenzhen Co Ltd filed Critical AAC Acoustic Technologies Shenzhen Co Ltd
Priority to PCT/CN2024/086950 priority Critical patent/WO2025213380A1/zh
Priority to US18/764,144 priority patent/US20250322182A1/en
Publication of WO2025213380A1 publication Critical patent/WO2025213380A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092

Definitions

  • the 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.
  • Automatic identification technology is a key component of modern information technology.
  • Information technology encompasses physical and electrical signal technologies and sensor technologies.
  • Automatic identification technology is widely used to identify the type of accessories installed on electronic product hosts. Specific areas on electronic product hosts can often accommodate different types of accessories. After an accessory is installed, the host needs to detect the accessory type and adjust the electronic product's operating mode accordingly.
  • the 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 for reducing costs and occupying a small volume while identifying the type of accessory.
  • an embodiment of the present disclosure provides an accessory identification method, including: providing a host, on which at least one accessory is equipped, and at least one detection element is set in an area of the host near each accessory; obtaining status information of the detection element on the host, each accessory is set in an area near the host with a trigger element matching the detection element, 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 not triggered, if the detection element detects the matching trigger element, then the status information of the detection element is triggered, if the detection element does not detect the matching trigger element, then the status information of the detection element is not triggered; according to the status information of each detection element on the host, determining the arrangement of the trigger elements on the accessory; according to the arrangement of the trigger elements on the accessory, determining the type of the accessory equipped on the host.
  • the arrangement includes quantity and position; determining the arrangement of the trigger elements on the accessory based on the status information of each of the detection elements on the host includes: determining the number and position of the trigger elements on the accessory based on the number and position of the detection elements triggered by the status information.
  • the detection element includes a Hall sensor
  • the trigger element includes a magnet
  • obtaining the status information of the detection element on the host includes: if the Hall sensor detects a matching magnet at the corresponding position, the Hall sensor transmits a high signal or a low signal, and the status 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 a high signal or a low signal, and the status information of the Hall sensor is not triggered.
  • determining the type of the accessory mounted on the host based on the arrangement of the trigger elements on the accessory includes: setting a mapping relationship, where the mapping relationship is used to characterize the arrangement of the trigger elements corresponding to each type of the accessory; and determining the type of the accessory mounted on the host based on the arrangement of the trigger elements on the accessory and the mapping relationship.
  • 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.
  • the detection element is located inside the host, and the trigger element is located inside the accessory.
  • the host has multiple detection circuits corresponding to the multiple detection elements; obtaining the status information of the detection elements on the host includes: obtaining the status information of the corresponding detection element on the host through each detection circuit.
  • an embodiment of the present disclosure further provides an accessory identification device, which is applied to a host equipped with at least one accessory, and the host is provided with at least one detection element in an area close to each accessory, including: an acquisition module, used to obtain status information of the detection element on the host, each 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 not triggered, 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 not triggered; a determination module, used to determine the arrangement of the trigger elements on the accessory according to the status information of each detection element on the host; an identification module, used to determine the type of the accessory assembled on the host according to the arrangement of the trigger elements on the accessory.
  • an electronic device comprising: 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 described in the above embodiment when executing the computer instructions.
  • another aspect of the present disclosure further provides a computer-readable storage medium, comprising: when the computer program is executed, the accessory identification method described in the above embodiment is implemented.
  • 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.
  • 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.
  • 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.
  • NFC Near Field Communication
  • 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.
  • the accessory identification method 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.
  • the hardware implementation is relatively simple, and the volume occupied is also small.
  • 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.
  • FIG1 is a flowchart of an accessory identification method provided by an embodiment of the present disclosure.
  • FIG2 is a schematic diagram of a host equipped with accessories provided by an embodiment of the present disclosure
  • FIG3 is a schematic diagram of an accessory identification device provided by an embodiment of the present disclosure.
  • FIG4 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
  • a host computer is provided with at least one accessory.
  • the host computer has at least one detection element disposed in an area near each accessory.
  • Status information of the detection element on the host computer is obtained.
  • Each accessory is disposed in an area near the host computer with a trigger element that matches the detection element.
  • the number of trigger elements on the accessory is less than or equal to the number of detection elements on the host computer in the corresponding area.
  • Status information includes triggered and untriggered. If a detection element detects a matching trigger element, the detection element's status information is triggered. If a detection element does not detect a matching trigger element, the detection element's status information is untriggered. Based on the status information of each detection element on the host computer, the arrangement of the trigger elements on the accessory is determined.
  • the type of accessory mounted on the host computer is determined. In this manner, whether an accessory is mounted on the host computer and the type of the mounted accessory can be detected.
  • This method is cost-effective, has simple hardware implementation, and occupies a small space.
  • the more detection elements on the host computer area corresponding to an accessory the more different combinations of status information can be generated by the multiple detection elements, and the more types of accessories can be identified.
  • the number of detection elements corresponding to an accessory can be flexibly adjusted based on the number of accessory types to be identified.
  • Figure 1 is a flow chart of an accessory identification method according to an embodiment of the present disclosure.
  • Figure 2 is a schematic diagram of a host equipped with an accessory according to an embodiment of the present disclosure.
  • a host 100 is provided. At least one accessory 200 is mounted on the host 100 , and at least one detection element 110 is disposed in an area of the host 100 near each accessory 200 .
  • the host 100 of the electronic product may have an area for assembling accessories 200, and may assemble different types of accessories 200.
  • a certain accessory identification method may be used to distinguish which type of accessory 200 is assembled on the host 100, thereby enabling the host 100 to adjust to different operating states.
  • the host 100 may have one or more areas for assembling accessories 200, that is, one or more accessories 200 may be assembled on the host 100.
  • each accessory 200 assembled on the host 100 may be a variety of different types of accessories 200.
  • the host is an electronic toy model
  • the electronic toy model may have areas for assembling hats and shoes. Hats and shoes can both be accessories of the electronic toy model, and different types of hats and different types of shoes can be assembled. After the electronic toy model identifies the type of assembled hats and shoes, it can adjust different operating states accordingly.
  • At least one detection element 110 set in the area of the host 100 near each accessory 200 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 set in this area can also be.
  • the status information of the detection element 110 on the host 100 is obtained.
  • a trigger element 210 matching the detection element 110 is set in the area of each accessory 200 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.
  • the status information includes triggered and untriggered. If the detection element 110 detects a matching trigger element 210, the status information of the detection element 110 is triggered. If the detection element 110 does not detect a matching trigger element 210, the status information of the detection element 110 is untriggered.
  • multiple detection elements 110 may be installed in the area of the main unit 100 corresponding to an accessory 200. Assume that the number of detection elements 110 in the area corresponding to an accessory 200 is n. These n detection elements 110 are arranged on the main unit 100, each with a corresponding position.
  • the accessory 200 to be installed in this area can have any integer number of trigger elements 210 less than or equal to n and greater than 0.
  • the number of trigger elements 210 on the accessory 200 can be n, n-1, and so on.
  • the position of a specific trigger element 210 on the accessory 200 must correspond to a specific detection element 110 on the main unit 100.
  • the detection element 110 detects the matching trigger element 210, and the status information of this detection element 110 is triggered; if the accessory at the position corresponding to a detection element 110 does not have a trigger element 210, the detection element 110 cannot detect the matching trigger element 210, and the status information of this detection element 110 is not triggered.
  • three detection elements 110 are installed in the area where the accessory 200 is mounted above the main unit 100.
  • the positions of the individual detection elements 110 are set at positions a, b, and c. Accordingly, the number of trigger elements 210 that can be included on the accessory 200 can be less than or equal to three and greater than zero.
  • the number of trigger elements 210 that can be included on the accessory 200 is 1, 2, or 3. In this case, there are seven possible types of accessories 200 that can be mounted above the main unit 100. If the number of trigger elements 210 on the accessory 200 is 1, the accessory 200 may include: trigger element 210 at position a, trigger element 210 at position b, and trigger element 210 at position c.
  • the accessory 200 may include: trigger element 210 at positions a and b, trigger element 210 at positions a and c, and trigger element 210 at positions b and c. If the number of trigger elements 210 on the accessory 200 is 3, the accessory 200 only has one type of trigger element 210 at positions a, b, and c, for a total of 7 types.
  • the three detection elements 110 in this area also generate seven types of status information: position a triggered, position b untriggered, and position c untriggered; position a untriggered, position b triggered, and position c untriggered; position a untriggered, position b untriggered, and position c triggered; position a triggered, position b untriggered, and position c untriggered; position a triggered, position b untriggered, and position c triggered; position a untriggered, position b triggered, and position c triggered; position a untriggered, position b triggered, and position c triggered; position a triggered, position b triggered, and position c triggered; position a triggered, position b triggered, and position c triggered. If all three detection elements 110 are untriggered, no accessories are installed in this area. In step S1, the status information of all detection elements 110 must be obtained to proceed to the next step of accessory identification.
  • the detection element 110 may include a Hall sensor, and the trigger element 210 may include a magnet; obtaining the status information of the detection element 110 on the host 100 may include: if the Hall sensor detects a matching magnet at the corresponding position, the Hall sensor transmits a high signal or a low signal, and the status 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 a high signal or a low signal, and the status information of the Hall sensor is not triggered.
  • a Hall sensor detects a magnet at the corresponding position, it transmits a low signal, while if there is no magnet, it transmits a high signal; if a Hall sensor detects a magnet at the corresponding position, it transmits a high signal, while if there is no magnet, it transmits a low signal. In other words, whether there is a magnet at the corresponding position of the Hall sensor will cause the Hall sensor to transmit two different signals.
  • the detection element 110 is a Hall sensor and the trigger element 210 is a magnet
  • the hardware implementation of the accessory identification method is relatively simple and the overall cost is low.
  • the Hall sensor and the magnet do not need to occupy a large volume, which can achieve the goal of identifying the accessory type while reducing costs and reducing the space occupied by the detection element and the magnet.
  • the detection element 110 is a Hall sensor and the trigger element 210 is a magnet
  • a certain distance needs to be maintained between adjacent Hall sensors to prevent mutual interference between adjacent Hall sensors and adjacent magnets, resulting in inaccurate recognition results, and to improve the accuracy of the accessory recognition results.
  • At least one detection element 110 corresponding to an accessory 200 can be evenly distributed on the contact surface of the host 100 for contacting the accessory 200.
  • the distances between adjacent detection elements 110 can be the same, or the difference in distances between adjacent detection elements 110 can be small. In this way, the distance between any two detection elements 110 can be maintained within a range that is neither too small to cause interference nor too large to occupy a large space. This can avoid mutual interference between the detection elements 110, ensure the accuracy of the accessory recognition result, and reduce the space occupied by the detection elements 110 and the trigger element 210.
  • the detection element 110 may be located within the main unit 100, and the trigger element 210 may be located within the accessory 200.
  • both the detection element 110 and the trigger element 210 are concealed. This not only reduces the overall size of the main unit 100 and accessory 200, improving their aesthetics, but also prevents information from being impersonated or misused, thereby enhancing security.
  • the detection element 110 may also be located outside the host 100 , and the trigger element 210 may also be located outside the accessory 200 .
  • the host 100 may include multiple detection circuits (not shown) corresponding one-to-one with the multiple detection elements 110. Obtaining status information of the detection elements 110 on the host 100 may include obtaining status information of the corresponding detection element 110 on the host 100 through each detection circuit. If the host 100 includes multiple detection circuits corresponding one-to-one with the multiple detection elements 110, the status information of the corresponding detection element 110 on the host 100 may be obtained through each detection circuit. Because the status of the detection circuit changes depending on whether the detection element 110 is triggered, the status of the detection circuit can be obtained and the status information of the detection element 110 can be determined based on the corresponding relationship between the status of the detection circuit and whether the detection element 110 is triggered.
  • the arrangement of the trigger elements 210 on the accessory 200 is determined based on the status information of each detection element 110 on the host 100 .
  • three detection elements 110 are provided in the area of the accessory 200 mounted above the main unit 100.
  • the positions of the individual detection elements 110 are position a, position b, and position c, respectively.
  • the status information of each detection element 110 can include seven situations: 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 triggered, and position c is not triggered; position a is triggered, position b is not triggered, and position c is not triggered; position a is triggered, position b is not triggered, and position c is not triggered; position a is triggered, position b is not triggered, and position c is not triggered; position a
  • each detection element 110 on the host 100 Based on the status information of each detection element 110 on the host 100, it is possible to determine which of the seven possible arrangements of the trigger elements 210 on the accessory 200 is present.
  • the arrangement includes quantity and 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 meet multiple needs such as reducing volume, reducing costs, and identifying more types of accessories, effectively achieving cost reduction and efficiency improvement in accessory identification.
  • the type of the accessory 200 mounted on the host 100 is determined based on the arrangement of the trigger elements 210 on the accessory 200 .
  • the type of accessory 200 mounted on the host 100 can be determined based on the arrangement of the trigger elements 210 on the accessory 200.
  • Each arrangement of the trigger elements 210 on the accessory 200 corresponds to a type of accessory 200. Therefore, if the arrangement type of the trigger elements 210 on the accessory 200 is known, the type of accessory 200 can be identified.
  • determining the type of accessory 200 mounted on the host 100 based on the arrangement of the trigger elements 210 on the accessory 200 may include: setting a mapping relationship, where the mapping relationship is used to characterize the arrangement of the trigger elements 210 corresponding to each type of accessory; and determining the type of accessory 200 mounted on the host 100 based on the arrangement of the trigger elements 210 on the accessory 200 and the mapping relationship.
  • three detection elements 110 are set on the area of the accessory 200 assembled above the host 100.
  • the arrangement of the trigger elements 210 on the accessory 200 can be 7 kinds, specifically: the number of trigger elements 210 on the accessory 200 is 1: 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 trigger elements 210 on the accessory 200 is 2: 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 trigger elements 210 on the accessory 200 is 3: the accessory 200 positions a, b, and c all have one trigger element 210.
  • the arrangement of the trigger elements 210 on these seven types of accessories 200 can be mapped to the accessory 200 type.
  • trigger element 210 at position a accessory one
  • trigger element 210 at position b accessory two
  • trigger element 210 at position c accessory three
  • trigger element 210 at positions a and b accessory four
  • trigger element 210 at positions a and c accessory five
  • trigger element 210 at positions b and c accessory six
  • trigger element 210 at positions a, b, and c accessory seven.
  • This table shows accessory identification for a scenario where the detection element is a Hall sensor, the trigger element is a magnet, the Hall sensor transmits a high signal when a magnet is present at the corresponding position, and a low signal when no magnet is present at the corresponding position. Furthermore, the area on the host computer corresponding to this accessory has three detection elements. It should be noted that a “0" in the identification result column in Table 1 indicates that the detection element's status information is not triggered and the corresponding position does not have a trigger element. A "1" indicates that the detection element's status information is triggered and the corresponding position has a trigger element.
  • the three columns of Position a, Position b, and Position c indicate whether there are magnets at the three positions.
  • the three columns of Sensor a, Sensor b, and Sensor c indicate the types of signals transmitted by the Hall sensors at the three positions.
  • the recognition result indicates the arrangement of the trigger elements on the accessory.
  • the recognition result column and the accessory number column are the mapping relationship between the arrangement and the accessory type.
  • a unique recognition result can correspond to a unique accessory type, thereby enabling the identification of the accessory type.
  • the above reference Figure 2 for the arrangement of the detection elements 110 and the trigger elements 210, status information, mapping relationship and accessory type is only an example, for the case where one accessory 200 corresponds to 3 detection elements 110 on the host.
  • the number of detection elements 110 set in the area where an accessory 200 is assembled on the host 100 can be n, where n is any positive integer greater than 0, and the specific value of n can be selected according to the number of types of accessories 200.
  • the accessory identification method first provides a host computer equipped with at least one accessory, wherein the host computer has at least one detection element disposed in an area near each accessory.
  • Status information of the detection element on the host computer is obtained, wherein each accessory is disposed in an area near the host computer with a trigger element matching the detection element, and the number of trigger elements on the accessory is less than or equal to the number of detection elements on the host computer in the corresponding area.
  • the status information includes triggered and untriggered. If the detection element detects the matching trigger element, the detection element status information is triggered; if the detection element does not detect the matching trigger element, the detection element status information is untriggered. Based on the status information of each detection element on the host computer, the arrangement of the trigger elements on the accessory is determined.
  • the type of accessory mounted on the host computer is determined. In this manner, whether an accessory is mounted on the host computer and the type of the mounted accessory can be detected, and the method is low-cost, simple in hardware implementation, and occupies a small space. Furthermore, the more detection elements on the host computer area corresponding to an accessory, the more different combinations of status information can be generated by the multiple detection elements, and the more types of accessories can be identified. The number of detection elements corresponding to the accessory can be flexibly adjusted according to the number of accessory types to be identified.
  • another embodiment of the present disclosure further provides an accessory identification device, which is used to implement the accessory identification method provided in the above embodiment.
  • the accessory identification device provided in another embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings. For parts that are identical or corresponding to the previous embodiment, please refer to the corresponding description of the previous embodiment and will not be repeated in detail below.
  • FIG3 is a schematic diagram of an accessory identification device provided in an embodiment of the present disclosure.
  • the accessory identification device is applied to a host equipped with at least one accessory, and at least one detection element is set in an area of the host near each accessory.
  • the accessory identification device includes: an acquisition module 310, which is used to obtain status information of the detection element on the host, each accessory is set in an area near the host with a trigger element matching the detection element, 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 triggered and untriggered. If the detection element detects a matching trigger element, the status information of the detection element is triggered.
  • the detection element does not detect a matching trigger element, the status information of the detection element is untriggered; a determination module 320, which is used to determine the arrangement of the trigger elements on the accessory according to the status information of each detection element on the host; an identification module 330, which is used to determine the type of accessory assembled on the host according to the arrangement of the trigger elements on the accessory.
  • another embodiment of the present disclosure further provides an electronic device, which is used to implement the accessory identification method provided in the above embodiment.
  • the electronic device provided in another embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings. For parts that are identical or corresponding to the previous embodiment, please refer to the corresponding description of the previous embodiment and will not be described in detail below.
  • FIG4 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device provided by the embodiment of the present disclosure includes: a memory 10 and a processor 20.
  • the memory 10 is used to store computer instructions that can be executed on the processor 20.
  • the processor 20 is used to implement the accessory identification method provided by the aforementioned embodiment when executing the computer instructions.
  • the memory 10 and processor 20 are connected using a bus.
  • the bus can include any number of interconnected buses and bridges, connecting one or more processors 20 and various circuits of the memory 10.
  • the bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein.
  • the bus interface provides an interface between the bus and the transceiver.
  • the transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor 20.
  • the processor 20 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, 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.
  • another embodiment of the present disclosure further provides a computer-readable storage medium, which is used to implement the accessory identification method provided in the above embodiment.
  • the computer-readable storage medium provided in another embodiment of the present disclosure will be described in detail below in conjunction with the accompanying drawings. For parts that are identical or corresponding to the previous embodiment, please refer to the corresponding description of the previous embodiment and will not be repeated in detail below.
  • the computer-readable storage medium provided in the embodiment of the present disclosure stores a computer program, and when the computer program is executed, the accessory identification method provided in the aforementioned embodiment is implemented.
  • the program is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps in the methods described in the various embodiments of this application.
  • the aforementioned storage medium includes: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Toxicology (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Adornments (AREA)

Abstract

本公开实施例涉及电子产品配件领域,提供一种配件识别方法、配件识别装置、电子设备以及计算机可读存储介质,配件识别方法包括:提供装配有配件的主机,主机靠近配件的区域设置有检测元件;获取检测元件的状态信息,每一配件靠近主机的区域设置有触发元件,且一配件上的触发元件的数量小于或等于对应区域上的主机上的检测元件的数量,状态信息包括触发和未触发,若检测元件检测到匹配的触发元件,则状态信息为触发,若未检测到,则状态信息为未触发;根据每个检测元件的状态信息,确定配件上触发元件的排布情况;根据配件上触发元件的排布情况,确定装配于主机上的配件的类型。至少可以在识别配件类型的同时,降低成本,减小占用体积。

Description

配件识别方法、配件识别装置、电子设备以及计算机可读存储介质 技术领域
本公开实施例涉及电子产品配件领域,特别涉及一种配件识别方法、配件识别装置、电子设备以及计算机可读存储介质。
背景技术
自动识别技术领域是现代信息技术的主要内容之一。信息技术包括物理信号、电信号技术和传感器技术。自动识别技术在识别电子产品主机上装配的配件类型时具有普遍的应用。电子产品主机上的特定区域上一般可以装配有不同类型的配件,在装配配件后,主机需要检测配件的类型以根据配件类型调整电子产品的运行模式。
技术问题
目前的配件识别方法难以做到在识别配件类型的同时,降低成本以及减小占用体积。
技术解决方案
本公开实施例提供一种配件识别方法、配件识别装置、电子设备以及计算机可读存储介质,至少有利于在识别配件类型的同时,降低成本,减小占用体积。
根据本公开一些实施例,本公开实施例一方面提供一种配件识别方法,包括:提供主机,所述主机上装配有至少一个配件,且所述主机靠近每一所述配件的区域设置有至少一个检测元件;获取所述主机上的所述检测元件的状态信息,每一所述配件靠近所述主机的区域设置有与所述检测元件匹配的触发元件,且一所述配件上的所述触发元件的数量小于或等于对应区域上的所述主机上的所述检测元件的数量,所述状态信息包括触发和未触发,若所述检测元件检测到匹配的所述触发元件,则所述检测元件的所述状态信息为触发,若所述检测元件未检测到匹配的所述触发元件,则所述检测元件的所述状态信息为未触发;根据所述主机上每个所述检测元件的状态信息,确定所述配件上的所述触发元件的排布情况;根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型。
在一些实施例中,所述排布情况包括数量和位置;所述根据所述主机上每个所述检测元件的状态信息,确定所述配件上的所述触发元件的排布情况,包括:根据所述状态信息为触发的所述检测元件的数量和位置,确定所述配件上的所述触发元件的数量和位置。
在一些实施例中,所述检测元件包括霍尔传感器,所述触发元件包括磁铁;所述获取所述主机上的所述检测元件的状态信息,包括:若所述霍尔传感器检测到对应位置处匹配的磁铁,则所述霍尔传感器传输高信号或低信号中的一种,所述霍尔传感器的状态信息为触发;若所述霍尔传感器未检测到对应位置处匹配的磁铁,则所述霍尔传感器传输高信号或低信号中的另一种,所述霍尔传感器的状态信息为未触发。
在一些实施例中,所述根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型,包括:设定映射关系,所述映射关系用于表征每个类型的所述配件对应的所述触发元件的排布情况;根据所述配件上的触发元件的排布情况,以及所述映射关系,确定装配于所述主机上的所述配件的类型。
在一些实施例中,与一所述配件对应的所述至少一个检测元件均匀分布于所述主机用于与所述配件接触的接触面上。
在一些实施例中,所述检测元件位于所述主机内部,所述触发元件位于所述配件内部。
在一些实施例中,所述主机内具有与多个所述检测元件一一对应的多个检测电路;所述获取所述主机上的所述检测元件的状态信息,包括:通过每个所述检测电路获取所述主机上对应的所述检测元件的状态信息。
根据本公开一些实施例,本公开实施例另一方面还提供一种配件识别装置,应用于装配有至少一个配件的主机,且所述主机靠近每一所述配件的区域设置有至少一个检测元件,包括:获取模块,用于获取所述主机上的所述检测元件的状态信息,每一所述配件靠近所述主机的区域设置有与所述检测元件匹配的触发元件,且一所述配件上的所述触发元件的数量小于或等于对应区域上的所述主机上的所述检测元件的数量,所述状态信息包括触发和未触发,若所述检测元件检测到匹配的所述触发元件,则所述检测元件的所述状态信息为触发,若所述检测元件未检测到匹配的所述触发元件,则所述检测元件的所述状态信息为未触发;确定模块,用于根据所述主机上每个检测元件的状态信息,确定所述配件上的触发元件的排布情况;识别模块,用于根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型。
根据本公开一些实施例,本公开实施例另一方面还提供一种电子设备,包括:存储器、处理器,所述存储器用于存储可在所述处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时实现上述实施例所述的配件识别方法。
根据本公开一些实施例,本公开实施例另一方面还提供一种计算机可读存储介质,包括:所述计算机程序被执行时实现上述实施例所述的配件识别方法。
本公开实施例提供的技术方案至少具有以下优点:
本公开实施例提供的配件识别方法中,首先提供主机,主机上装配有至少一个配件,且主机靠近每一配件的区域设置有至少一个检测元件;获取主机上的检测元件的状态信息,每一配件靠近主机的区域设置有与检测元件匹配的触发元件,且一配件上的触发元件的数量小于或等于对应区域上的主机上的检测元件的数量,状态信息包括触发和非触发,若检测元件检测到匹配的触发元件,则检测元件的状态信息为触发,若检测元件未检测到匹配的触发元件,则检测元件的状态信息为未触发;根据主机上每个检测元件的状态信息,确定配件上的触发元件的排布情况;根据配件上的触发元件的排布情况,确定装配于主机上的配件的类型。在相关技术中,一般采用以下两种方法实现主机上装配的配件类型的识别:第一种方法为在主机上设置摄像头或扫描枪,在配件上设置二维码或条形码,通过主机对配件扫码读取信息实现配件类型的识别;第二种方法为在主机上设置近场通信(Near Field Communication,NFC)读卡器,在配件上设置NFC标签,通过主机上的NFC读卡器读取配件上NFC标签的相关信息确定装配于主机上的配件的类型。然而,若采用第一种扫码识别配件类型的方法,主机上的摄像头或扫描枪占用体积较大,对系统平台资源要求较高,且配件上的二维码或条形码容易被复制盗用,若采用第二种NFC识别配件类型的方法,主机和配件都需要占用一定体积的天线,且成本较高,读卡器长时间开启会造成耗电较高,读卡器使用时再开启则会影响用户体验。本公开实施例提供的配件识别方法则提供了另一种无须进行扫码或NFC读卡的配件识别方法,在主机上设置检测元件,在配件上设置触发元件,不同配件类型的配件上的触发元件具有不同的排布情况,可以对应得到主机上多个检测元件的不同状态信息,以此判断配件的类型。如此,可以检测主机上是否装配有配件,以及装配的配件的类型,且成本较低,硬件实现较为简单,占用的体积也较小。另外,一配件对应的主机区域上的检测元件越多,多个检测元件能够产生的状态信息的不同组合越多,能够识别的配件类型越多,可以根据需要识别的配件种类的多少,灵活调整配件对应的检测元件的数量。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,除非有特别申明,附图中的图不构成比例限制;为了更清楚地说明本公开实施例或传统技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1本公开实施例提供的一种配件识别方法的流程图;
图2为本公开实施例提供的一种装配有配件的主机的示意图;
图3为本公开实施例提供的一种配件识别装置的示意图;
图4为本公开实施例提供的一种电子设备的示意图。
本发明的实施方式
由背景技术可知,目前的配件识别方法难以做到在识别配件类型的同时,降低成本以及减小占用体积。
本公开实施例提供一种配件识别方法,首先提供装配有至少一个配件的主机,主机靠近每一配件的区域设置有至少一个检测元件;获取主机上的检测元件的状态信息,每一配件靠近主机的区域设置有与检测元件匹配的触发元件,且配件上的触发元件的数量小于或等于对应区域上的主机的检测元件的数量,状态信息包括触发和未触发,若检测到元件检测到匹配的触发元件,则检测元件的状态信息为触发,若检测元件未检测到匹配的触发元件,则检测元件的状态信息为未触发;根据主机上每个检测元件的状态信息,确定配件上的触发元件的排布情况;根据配件上的触发元件的排布情况,确定装配于主机上的配件的类型。如此,可以检测主机上是否装配有配件,以及装配的配件的类型,且成本较低,硬件实现较为简单,占用的体积也较小。另外,一配件对应的主机区域上的检测元件越多,多个检测元件能够产生的状态信息的不同组合越多,能够识别的配件类型越多,可以根据需要识别的配件种类的多少,灵活调整配件对应的检测元件的数量。
为使本发明实施例的目的、技术方案和优点更加清楚。下面将结合附图对本公开的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本公开各实施例中,为了使读者更好地理解本公开而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本公开所要求保护的技术方案。
图1为本公开实施例提供的一种配件识别方法的流程图。图2为本公开实施例提供的一种装配有配件的主机的示意图。
参考图1和图2,S1,提供主机100,主机100上装配有至少一个配件200,且主机100靠近每一配件200的区域设置有至少一个检测元件110。
电子产品的主机100可以具有能够装配配件200的区域,且可以装配不同类型的配件200,通过一定的配件识别方法可以分辨出主机100上装配了哪种类型的配件200,从而能够使主机100调整不同的运行状态。
在一些实施例中,主机100上可以具有一个或多个装配配件200的区域,也就是说,主机100上可以装配一个或多个配件200。且主机100上装配的每一配件200均可以为多种不同类型的配件200。例如,若主机为电子玩具模型,电子玩具模型可以具有装配帽子以及鞋子的区域,帽子和鞋子均可以为电子玩具模型的配件,且可以装配不同类型的帽子以及不同类型的鞋子,电子玩具模型识别出装配的帽子和鞋子的类型后,可以对应调整不同的运行状态。主机100靠近每一配件200的区域设置的至少一个检测元件110可以用于识别配件200的类别,需要识别的配件200的类别越多,则这一区域设置的检测元件110的个数也可以越多。
参考图1和图2,S2,获取主机100上的检测元件110的状态信息,每一配件200靠近主机100的区域设置有与检测元件110匹配的触发元件210,且一配件200上的触发元件210的数量小于或等于对应区域上的主机100上的检测元件110的数量,状态信息包括触发和未触发,若检测元件110检测到匹配的触发元件210,则检测元件110的状态信息为触发,若检测元件110未检测到匹配的触发元件210,则检测元件110的状态信息为未触发。
也就是说,主机100上对应设置一个配件200的区域上介意设置多个检测元件110,假定对应一个配件200的区域的检测元件110的个数为n个。这n个检测元件110排布于主机100上,每一个都具有对应的位置。需要装配与这一区域的配件200上可以具有任意小于或等于n且大于0的整数个触发元件210,配件200上触发元件210的个数可以为n、n-1……等。且配件200上的多个触发元件210中的某一个的位置需要与主机100上的某一检测元件110对应。若与一检测元件110对应的位置处的配件200上具有触发元件210,则检测元件110检测到匹配的触发元件210,这一检测元件110的状态信息为触发;若与一检测元件110对应的位置处的配件上不具有触发元件210,则检测元件110不能检测到匹配的触发元件210,这一检测元件110的状态信息为未触发。
具体的,参考图2,图2中装配位于主机100上方的配件200的区域上设置有三个检测元件110,设定单个检测元件110的位置分别为位置a、位置b以及位置c。相对应的,配件200上可以具有的触发元件210的个数可以为小于或等于3且大于0个,配件200上可以具有的触发元件210的个数为1个、2个或3个。此时,装配于主机100上方的配件200可以有7种。若配件200上的触发元件210的个数为1个,则配件200可以包括:触发元件210在位置a、触发元件210在位置b以及触发元件210在位置c三种,若配件200上的触发元件210的个数为2个,则配件200可以包括:触发元件210在位置a、b,触发元件210在位置a、c,触发元件210在位置b、c三种,若配件200上的触发元件210的个数为3个,则配件200仅具有位置a、b、c均具有触发元件210一种,总计7种。对应的,这一区域的三个检测元件110产生的状态信息也具有7种,分别为:位置a触发、位置b未触发、位置c未触发;位置a未触发、位置b触发、位置c未触发;位置a未触发、位置b未触发、位置c触发;位置a触发、位置b触发、位置c未触发;位置a触发、位置b未触发、位置c触发;位置a未触发、位置b触发、位置c触发;位置a触发、位置b触发、位置c触发。若三个检测元件110均为未触发,则并未在这一区域装配配件。在步骤S1中需要获取全部的检测元件110的状态信息,以进行下一步的配件识别步骤。
继续参考图2,在一些实施例中,检测元件110可以包括霍尔传感器,触发元件210可以包括磁铁;获取主机100上的检测元件110的状态信息,可以包括:若霍尔传感器检测到对应位置处匹配的磁铁,则霍尔传感器传输高信号或低信号中的一种,霍尔传感器的状态信息为触发;若霍尔传感器未检测到对应位置处匹配的磁铁,则霍尔传感器传输高信号或低信号中的另一种,霍尔传感器的状态信息为未触发。即,若一个霍尔传感器检测到对应位置处具有磁铁传输低信号,则不具有磁铁则传输高信号;若一个霍尔传感器检测到对应位置处具有磁铁传输高信号,则不具有磁铁传输低信号。也就是说,霍尔传感器对应位置是否具有磁铁会导致霍尔穿昂起传输不同的两种信号,通过检测霍尔传感器传输的信号,可以判定霍尔传感器的状态信息为触发还是非触发。检测元件110为霍尔传感器,触发元件210为磁铁时,配件识别方法的硬件实现较为简单,且整体成本较低,并且霍尔传感器与磁铁也不需要占用较大体积,能够实现在识别配件类型的同时,降低成本且减小检测元件与磁铁的占用空间。
需要说明的是,检测元件110为霍尔传感器,触发元件210为磁铁时,相邻的霍尔传感器之间需要保持一定的距离,以防止相邻的霍尔传感器以及相邻的磁铁之间产生相互干扰,导致识别结果不准确,提高配件识别结果的准确性。
参考图2,在一些实施例中,与一配件200对应的至少一个检测元件110可以均匀分布于主机100用于与配件200接触的接触面上。与一配件200对应的至少一个检测元件110在主机100用于与配件200接触的接触面上均匀排布时,相邻检测元件110之间的距离可以相同,或者,相邻检测元件110之间的距离的差可以较小,如此,可以使得任意两个检测元件110之间的距离保持在既不会过小导致产生干扰,又不会过大导致占用空间较大的范围内,既能够避免检测元件110之间的相互干扰,保证配件识别结果的准确性,又可以减小检测元件110以及触发元件210的占用空间。
继续参考图2,在一些实施例中,检测元件110可以位于主机100内部,触发元件210可以位于配件200内部。检测元件110位于主机100内部,触发元件210位置配件200内部时,检测元件110与触发元件210均为隐藏安装,不仅能够减小主机100与配件200的整体体积,提高美观性,还能够避免信息被冒充或盗用,提高安全性。
在另一些实施例中,检测元件110还可以位于主机100的外部,触发元件210也可以位于配件200的外部。
在一些实施例中,主机100内可以具有与多个检测元件110一一对应的多个检测电路(图中未示出);获取主机100上的检测元件110的状态信息,可以包括:通过每个检测电路获取主机100上对应的检测元件110的状态信息。在主机100内具有与多个检测元件110一一对应的多个检测电路的情况下,可以通过每个检测电路获取主机100上对应的检测元件110的状态信息。由于检测电路的状态会随着检测元件110是否被触发而改变,因此可以获取检测电路的状态,并基于检测电路的状态与检测元件110是否触发的对应关系确定检测元件110的状态信息。
参考图1,S3,根据主机100上每个检测元件110的状态信息,确定配件200上的触发元件210的排布情况。
根据上文所述,参考图2,装配于主机100上方的配件200的区域上设置有三个检测元件110,单个检测元件110的位置分别为位置a、位置b以及位置c。每个检测元件110的状态信息可以包括7种情况:位置a触发、位置b未触发、位置c未触发;位置a未触发、位置b触发、位置c未触发;位置a未触发、位置b未触发、位置c触发;位置a触发、位置b触发、位置c未触发;位置a触发、位置b未触发、位置c触发;位置a未触发、位置b触发、位置c触发;位置a触发、位置b触发、位置c触发。若三个检测元件110均为未触发,则并未在这一区域装配配件200。若某一检测元件110的状态信息为触发,则可以判断这一位置处的配件200上具有触发元件210。
在一些实施例中,配件200上的触发元件210的排布情况还可以仅包括数量;根据主机100上每个检测元件110的状态信息,确定配件200上的触发元件210的排布情况可以包括:根据状态信息为触发的检测元件110的数量,确定配件200上的触发元件210的数量。具体的,图2中装配于主机100上方的配件200的区域上设置有三个检测元件110,则可以检测三种配件200的类别,分别为一个检测元件110的状态信息为触发,配件200上具有一个触发元件;两个检测元件110的状态信息为触发,配件200上具有两个触发元件210;三个检测元件110的状态信息为触发,配件200上具有三个触发元件210三种。
在另一些实施例中,配件200上的触发元件210的排布情况可以包括数量和位置;根据主机100上每个检测元件110的状态信息,确定配件200上的触发元件210的排布情况,可以包括:根据状态信息为触发的检测元件110的数量和位置,确定配件200上的触发元件210的数量和位置。即排布情况不仅包括配件200上具有的触发元件210的个数,还包括配件200上具有的触发元件210所处的位置。具体的,根据上述内容可知,图2中装配于主机100上方的配件200的区域上设置有三个检测元件110时,这三个检测元件110的状态信息的组合情况共有7种,可以对应到7种配件上的触发元件210的排布情况,具体为:配件200上的触发元件210的个数为1个:触发元件210在位置a、触发元件210在位置b以及触发元件210在位置c三种,配件200上的触发元件210的个数为2个:触发元件210在位置a、b,触发元件210在位置a、c,触发元件210在位置b、c三种,配件200上的触发元件210的个数为3个:配件200位置a、b、c均具有触发元件210一种,总计7种。根据主机100上每个检测元件110的状态信息,能够确定出配件200上的触发元件210的排布情况为以上7种中的哪一种。排布情况包括数量和位置时,能够使用尽可能少的检测元件110以及触发元件210识别出尽可能多类型的配件200,能够同时实现减小体积、降低成本、识别更多配件类型等多种需求,有效地实现了配件识别的降本增效。
参考图1,S4,根据配件200上的触发元件210的排布情况,确定装配于主机100上的配件200的类型。
根据上文所述,根据主机100上每个检测元件110的状态信息,确定配件200上的触发元件210的排布情况后,可以根据配件200上触发元件210的排布情况,确定装配于主机100上的配件200的类型。每种配件200上的触发元件210的排布情况可以对应到一种类型的配件200,因此,在已知配件200上触发元件210的排布类型的情况下,可以识别出配件200的类型。
在一些实施例中,根据配件200上的触发元件210的排布情况,确定装配于主机100上的配件200的类型,可以包括:设定映射关系,映射关系用于表征每个类型的配件对应的触发元件210的排布情况;根据配件200上的触发元件210的排布情况,以及映射关系,确定装配于主机100上的配件200的类型。具体的,参考图2,根据上文所述可知,装配与主机100上方的配件200的区域上设置有三个检测元件110,此时配件200上的触发元件210的排布情况可以有7种,具体为:配件200上的触发元件210的个数为1个:触发元件210在位置a、触发元件210在位置b以及触发元件210在位置c三种,配件200上的触发元件210的个数为2个:触发元件210在位置a、b,触发元件210在位置a、c,触发元件210在位置b、c三种,配件200上的触发元件210的个数为3个:配件200位置a、b、c均具有触发元件210一种。这7种配件200上的触发元件210的排布情况与配件200类型之间可以具有映射关系,具体可以为:触发元件210在位置a—配件一;触发元件210在位置b—配件二;触发元件210在位置c—配件三;触发元件210在位置a、b—配件四;触发元件210在位置a、c—配件五;触发元件210在位置b、c—配件六;触发元件210在位置a、b、c—配件七。根据这种一一对应的排布情况与配件类型的映射关系,可以在已知配件200上触发元件210排布情况的情况下,识别出唯一的配件类型。
参考下表表1,表1为检测元件为霍尔传感器,触发元件为磁铁,霍尔传感器对应位置具有磁铁则传输高信号,霍尔传感器对应位置不具有磁铁则传输低信号,且主机上对应到这一配件的区域上具有三个检测元件时,一种情况下的配件识别对应表。需要说明的是,表1中识别结果一列“0”表示检测元件的状态信息为未触发,对应位置不具有触发元件,“1”表示检测元件的状态信息为触发,对应位置具有触发元件。
配件编号 位置a 位置b 位置c 传感器a 传感器b 传感器c 识别结果
配件1 001
配件2 010
配件3 011
配件4 100
配件5 101
配件6 110
配件7 111
无配件 000
表1中位置a、位置b、位置c三列说明的三个位置处是否具有磁铁,传感器a、传感器b、传感器c三列说明三个位置处霍尔传感器传输的信号类型,识别结果即说明配件上触发元件的排布情况,识别结果一列与配件编号一列即为排布情况与配件类型之间的映射关系,一种唯一的识别结果即能够对应唯一一种配件类型,从而能够实现配件类型的识别。
需要说明的是,以上参考图2对于检测元件110以及触发元件210的排布情况、状态信息、映射关系以及配件类型的说明仅为一种举例,为一个配件200对应到主机上的检测元件110的数量为3个的情况,在其他实施例中,主机100上装配一个配件200的区域设置的检测元件110可以为n个,n为任意大于0的正整数,n的具体数值可以根据配件200类型的多少进行选择。
本公开实施例提供的配件识别方法,首先提供装配有至少一个配件的主机,主机靠近每一配件的区域设置有至少一个检测元件;获取主机上的检测元件的状态信息,每一配件靠近主机的区域设置有与检测元件匹配的触发元件,且配件上的触发元件的数量小于或等于对应区域上的主机的检测元件的数量,状态信息包括触发和未触发,若检测到元件检测到匹配的触发元件,则检测元件的状态信息为触发,若检测元件未检测到匹配的触发元件,则检测元件的状态信息为未触发;根据主机上每个检测元件的状态信息,确定配件上的触发元件的排布情况;根据配件上的触发元件的排布情况,确定装配于主机上的配件的类型。如此,可以检测主机上是否装配有配件,以及装配的配件的类型,且成本较低,硬件实现较为简单,占用的体积也较小。另外,一配件对应的主机区域上的检测元件越多,多个检测元件能够产生的状态信息的不同组合越多,能够识别的配件类型越多,可以根据需要识别的配件种类的多少,灵活调整配件对应的检测元件的数量。
相应的,本公开另一实施例还提供一种配件识别装置,本公开另一实施例提供的配件识别装置用于实现上述实施例提供的配件识别方法。以下将结合附图对本公开另一实施例提供的配件识别装置进行详细说明,与前一实施例相同或者相应的部分,可参考前述实施例的相应说明,以下将不做详细赘述。
图3为本公开实施例提供的一种配件识别装置的示意图。
参考图3,应用于装配有至少一个配件的主机,且主机靠近每一配件的区域设置有至少一个检测元件,配件识别装置包括:获取模块310,用于获取主机上的检测元件的状态信息,每一配件靠近主机的区域设置有与检测元件匹配的触发元件,且一配件上的触发元件的数量小于或等于对应区域上的主机上的检测元件的数量,状态信息包括触发和未触发,若检测元件检测到匹配的触发元件,则检测元件的状态信息为触发,若检测元件未检测到匹配的触发元件,则检测元件的状态信息为未触发;确定模块320,用于根据主机上每个检测元件的状态信息,确定配件上的触发元件的排布情况;识别模块330,用于根据配件上的触发元件的排布情况,确定装配于主机上的配件的类型。
相应的,本公开另一实施例还提供一种电子设备,本公开另一实施例提供的电子设备用于实现上述实施例提供的配件识别方法。以下将结合附图对本公开另一实施例提供的电子设备进行详细说明,与前一实施例相同或者相应的部分,可参考前述实施例的相应说明,以下将不做详细赘述。
图4为本公开实施例提供的一种电子设备的示意图。
参考图4,本公开实施例提供的电子设备包括:存储器10、处理器20,存储器10用于存储可在处理器20上运行的计算机指令,处理器20用于在执行计算机指令时实现前述实施例提供的配件识别方法。
其中,存储器10和处理器20采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器20和存储器10的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器20。
处理器20负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器10可以被用于存储处理器20在执行操作时所使用的数据。
相应的,本公开另一实施例还提供一种计算机可读存储介质,本公开另一实施例提供的计算机可读存储介质用于实现上述实施例提供的配件识别方法。以下将结合附图对本公开另一实施例提供的计算机可读存储介质进行详细说明,与前一实施例相同或者相应的部分,可参考前述实施例的相应说明,以下将不做详细赘述。
本公开实施例提供的计算机可读存储介质上存储有计算机程序,计算机程序被执行时实现前述实施例提供的配件识别方法。
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域的普通技术人员可以理解,上述各实施方式是实现本公开的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本公开的精神和范围。任何本领域技术人员,在不脱离本公开的精神和范围内,均可作各自更动与修改,因此本公开的保护范围应当以权利要求限定的范围为准。

Claims (10)

  1. 一种配件识别方法,其特征在于,包括:
    提供主机,所述主机上装配有至少一个配件,且所述主机靠近每一所述配件的区域设置有至少一个检测元件;
    获取所述主机上的所述检测元件的状态信息,每一所述配件靠近所述主机的区域设置有与所述检测元件匹配的触发元件,且一所述配件上的所述触发元件的数量小于或等于对应区域上的所述主机上的所述检测元件的数量,所述状态信息包括触发和未触发,若所述检测元件检测到匹配的所述触发元件,则所述检测元件的所述状态信息为触发,若所述检测元件未检测到匹配的所述触发元件,则所述检测元件的所述状态信息为未触发;
    根据所述主机上每个所述检测元件的状态信息,确定所述配件上的所述触发元件的排布情况;
    根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型。
  2. 根据权利要求1所述的配件识别方法,其特征在于,所述排布情况包括数量和位置;
    所述根据所述主机上每个所述检测元件的状态信息,确定所述配件上的所述触发元件的排布情况,包括:
    根据所述状态信息为触发的所述检测元件的数量和位置,确定所述配件上的所述触发元件的数量和位置。
  3. 根据权利要求1所述的配件识别方法,其特征在于,所述检测元件包括霍尔传感器,所述触发元件包括磁铁;
    所述获取所述主机上的所述检测元件的状态信息,包括:
    若所述霍尔传感器检测到对应位置处匹配的磁铁,则所述霍尔传感器传输高信号或低信号中的一种,所述霍尔传感器的状态信息为触发;
    若所述霍尔传感器未检测到对应位置处匹配的磁铁,则所述霍尔传感器传输高信号或低信号中的另一种,所述霍尔传感器的状态信息为未触发。
  4. 根据权利要求1所述的配件识别方法,其特征在于,所述根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型,包括:
    设定映射关系,所述映射关系用于表征每个类型的所述配件对应的所述触发元件的排布情况;
    根据所述配件上的触发元件的排布情况,以及所述映射关系,确定装配于所述主机上的所述配件的类型。
  5. 根据权利要求1所述的配件识别方法,其特征在于,与一所述配件对应的所述至少一个检测元件均匀分布于所述主机用于与所述配件接触的接触面上。
  6. 根据权利要求1或5所述的配件识别方法,其特征在于,所述检测元件位于所述主机内部,所述触发元件位于所述配件内部。
  7. 根据权利要求1所述的配件识别方法,其特征在于,所述主机内具有与多个所述检测元件一一对应的多个检测电路;
    所述获取所述主机上的所述检测元件的状态信息,包括:
    通过每个所述检测电路获取所述主机上对应的所述检测元件的状态信息。
  8. 一种配件识别装置,其特征在于,应用于装配有至少一个配件的主机,且所述主机靠近每一所述配件的区域设置有至少一个检测元件,所述配件识别装置包括:
    获取模块,用于获取所述主机上的所述检测元件的状态信息,每一所述配件靠近所述主机的区域设置有与所述检测元件匹配的触发元件,且一所述配件上的所述触发元件的数量小于或等于对应区域上的所述主机上的所述检测元件的数量,所述状态信息包括触发和未触发,若所述检测元件检测到匹配的所述触发元件,则所述检测元件的所述状态信息为触发,若所述检测元件未检测到匹配的所述触发元件,则所述检测元件的所述状态信息为未触发;
    确定模块,用于根据所述主机上每个检测元件的状态信息,确定所述配件上的触发元件的排布情况;
    识别模块,用于根据所述配件上的所述触发元件的排布情况,确定装配于所述主机上的所述配件的类型。
  9. 一种电子设备,其特征在于,包括:存储器、处理器,所述存储器用于存储可在所述处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时实现权利要求1-7中任一项所述的配件识别方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被执行时实现权利要求1-7中任一项所述的配件识别方法。
PCT/CN2024/086950 2024-04-10 2024-04-10 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质 Pending WO2025213380A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2024/086950 WO2025213380A1 (zh) 2024-04-10 2024-04-10 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质
US18/764,144 US20250322182A1 (en) 2024-04-10 2024-07-03 Method and device for identification of accessory, electronic device and non-transitory computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2024/086950 WO2025213380A1 (zh) 2024-04-10 2024-04-10 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/764,144 Continuation US20250322182A1 (en) 2024-04-10 2024-07-03 Method and device for identification of accessory, electronic device and non-transitory computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2025213380A1 true WO2025213380A1 (zh) 2025-10-16

Family

ID=97306426

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/086950 Pending WO2025213380A1 (zh) 2024-04-10 2024-04-10 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质

Country Status (2)

Country Link
US (1) US20250322182A1 (zh)
WO (1) WO2025213380A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150007007A (ko) * 2013-07-10 2015-01-20 (유)어나더레인보우 자석 블록을 이용한 글자 인식 장치 및 그 방법
CN114979925A (zh) * 2022-05-10 2022-08-30 北京紫光展锐通信技术有限公司 耳机类型识别装置、耳机类型识别方法、设备及存储介质
CN116678446A (zh) * 2023-08-03 2023-09-01 北京小米移动软件有限公司 配件识别方法、装置、电子设备及存储介质
CN116779126A (zh) * 2022-03-11 2023-09-19 广州星际悦动股份有限公司 个人护理设备的检测方法、个人护理设备、终端及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203760751U (zh) * 2014-02-25 2014-08-06 番禺得意精密电子工业有限公司 电连接器组件
JP2018028488A (ja) * 2016-08-18 2018-02-22 東芝テック株式会社 外部入力制御装置、物品位置把握システム、及び、物品位置把握方法
KR102285073B1 (ko) * 2017-03-31 2021-08-03 삼성전자주식회사 복수개의 액세서리 장치들에 대응하는 콘텐트를 제공하기 위한 방법 및 그 전자 장치

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150007007A (ko) * 2013-07-10 2015-01-20 (유)어나더레인보우 자석 블록을 이용한 글자 인식 장치 및 그 방법
CN116779126A (zh) * 2022-03-11 2023-09-19 广州星际悦动股份有限公司 个人护理设备的检测方法、个人护理设备、终端及介质
CN114979925A (zh) * 2022-05-10 2022-08-30 北京紫光展锐通信技术有限公司 耳机类型识别装置、耳机类型识别方法、设备及存储介质
CN116678446A (zh) * 2023-08-03 2023-09-01 北京小米移动软件有限公司 配件识别方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US20250322182A1 (en) 2025-10-16

Similar Documents

Publication Publication Date Title
US6801956B2 (en) Arrangement with a microprocessor
US11734943B2 (en) Electronic device and method for obtaining information associated with fingerprint
US11435462B2 (en) Electronic device for performing ranging and method thereof
AU2012202352A1 (en) Method, system and apparatus for determining a hash code representing a portion of an image
CN105468548B (zh) 串行外围接口的通信
CN114003538A (zh) 一种智能网卡的识别方法及智能网卡
CN112800795A (zh) 一种低功耗检卡控制系统及方法
US20200192449A1 (en) Bus system
US5163145A (en) Circuit for determining between a first or second type CPU at reset by examining upper M bits of initial memory reference
US9160422B2 (en) Data capturing method of NFC protocol and NFC electronic device using the same
US7694029B2 (en) Detecting miscabling in a storage area network
US20230309097A1 (en) Existence of periodic/semi-static signals and channels outside of channel occupancy time (cot)
WO2025213380A1 (zh) 配件识别方法、配件识别装置、电子设备以及计算机可读存储介质
US8135895B2 (en) Virtual SATA port multiplier, virtual SATA device, SATA system and data transfer method in a SATA system
US20060082442A1 (en) Preambles with relatively unambiguous autocorrelation peak in RFID systems
CN118330746A (zh) 配件识别方法、装置、电子设备以及计算机可读存储介质
CN110536274A (zh) Nfc设备控制方法、装置、nfc设备和存储介质
CN101221547B (zh) 具有多个接口的存储卡及其复位控制方法
WO2025260606A1 (zh) 显示屏的信息确定方法、系统及发送卡
CN105094349B (zh) 动态键盘矩阵功能切换方法和系统
US20160360568A1 (en) SSIC device and link control method for SSIC device
US20060027654A1 (en) Card reader and data transmission method therefor
WO2026031023A1 (zh) 一种配件识别方法、装置及存储介质
US20190171456A1 (en) Electronic device and method for processing instruction using the same
JP4105608B2 (ja) カード認識システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24934463

Country of ref document: EP

Kind code of ref document: A1