Object retrieval method and system based on door lock tag
The multi-layer scanning mechanism of the door lock tag solves the problem of inaccurate retrieval of existing item retrieval systems in a multi-layer tag environment, achieves efficient and comprehensive item positioning, and improves the user experience.
Patent Information
- Application Number
- CN202510773745.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing item retrieval systems have strong limitations when scanning single-layer tags, the retrieval results in multi-layer tag environments are not accurate enough, and they lack deep scanning capabilities in the event of a miss, causing users to waste time and energy when searching for items.
Through the multi-layer scanning mechanism of the door lock tag, Bluetooth scanning is used to obtain the first layer of tag sets. If no hit is found, a multi-layer scanning instruction is generated, connections are established layer by layer, the scanning results are aggregated and filtered, and the location of the target object is located and fed back. This includes the steps of initial query request processing, multi-layer scanning instruction issuance, scanning result aggregation and filtering, target location positioning and feedback.
It achieves efficient and accurate item retrieval in a multi-layer tag environment, reduces the time and energy wasted by users in searching for items, and improves the comprehensiveness and efficiency of item retrieval.
Smart Images

Figure CN120386900B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of retrieval, and in particular to an object retrieval method and system based on door lock tags. Background Art
[0002] With the rapid development of the Internet of Things (IoT), smart home systems are becoming increasingly popular. Smart door locks not only enhance home security but also integrate multiple functions, such as Bluetooth communication and item retrieval, greatly facilitating daily life. However, existing item retrieval systems face several challenges in practical applications, including the limitations of single-layer tag scanning, inaccurate aggregation and filtering of search results in multi-layer tag environments, and a lack of deep scanning capabilities in the event of a miss. This results in users wasting time and energy searching for their items. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and system for item retrieval based on door lock tags to address the deficiencies in the prior art and enable comprehensive and efficient item retrieval.
[0004] One embodiment of the present application provides a method for retrieving an item based on a door lock tag, the method comprising:
[0005] Initial query request processing: Based on the item query request sent by the user through the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain the miss result and the list of tags to be queried.
[0006] Multi-layer scanning instruction issuance: Based on the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID. The first-layer tags switch to central mode to scan adjacent tags, generate a second-layer tag set, and update the miss results based on the scan results to obtain an expanded query network.
[0007] Scan result aggregation and filtering: Based on the scan results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record.
[0008] Target location positioning and feedback: Based on the scanning records returned by the deepest layer of tags, the tag location information of the target Tag-DID is extracted; the door lock summarizes the scanning records of each layer, generates a query result including the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval.
[0009] Optionally, the initial query request processing includes:
[0010] Request parsing and verification: Based on the query request sent by the mobile terminal, the door lock extracts the target Tag-DID and user identity information; wherein, the verification is achieved by comparing the APP-ID with the door lock registration information to obtain a legitimate query request;
[0011] First-layer scanning execution: Based on a legitimate query request, the door lock initiates Bluetooth scanning to obtain directly connectable tag advertising data packets; wherein, the scanning adopts the connectable advertising mode, parses the Tag-DID in the packet, and obtains the first-layer tag set;
[0012] Preliminary judgment of the results: Based on the matching results of the first-layer tag set and the target Tag-DID, if there is no hit, a multi-layer scanning instruction containing the door lock ID and the target Tag-DID is generated to obtain a list of tags to be queried.
[0013] Optionally, the issuing of the multi-layer scanning instruction includes:
[0014] Connection establishment and command encapsulation: Based on the list of tags to be queried, the door lock establishes a connection with each first-layer tag through the GATT protocol; wherein, the command encapsulation includes the target Tag-DID, door lock ID and scan timeout parameter to obtain a standardized scanning command;
[0015] Tag mode switching and scanning: Based on the received scanning command, the first-layer tag disconnects from the door lock and switches to central mode. The scanning uses connectable advertising monitoring to obtain the Tag-DID of the adjacent tags and generate the second-layer tag set.
[0016] Temporary storage and reporting of results: Based on the comparison results between the second-layer tag set and the target Tag-DID, the first-layer tag switches back to peripheral mode and reconnects to the door lock. If there is no hit, the expanded list of tags to be queried is reported, and if there is a hit, the target location is directly returned.
[0017] Optionally, the scanning result aggregation and filtering includes:
[0018] Command conflict detection: Based on the scanning command received by the tag, the door lock ID and target Tag-DID contained in it are extracted. If the same tag receives multiple commands with the same door lock ID and target Tag-DID, only the earliest received command is cached to obtain a deduplicated command set.
[0019] Scan execution and result marking: Based on the deduplication instruction set, the tag performs a single Bluetooth scan and marks the result attribution; wherein the tag includes the ID of the parent tag initiating the instruction and the target Tag-DID, and obtains a scan record with path information;
[0020] Selective result reporting: Based on the tag information, the tag only sends the complete scan result to the superior tag with the earliest instruction; among them, other superiors with the same request only receive brief confirmation information, reducing network redundancy.
[0021] Optionally, the target position positioning and feedback includes:
[0022] Leaf tag identifier extraction: Based on the scan records returned by the deepest tag layer, the self-Tag-DID and target Tag-DID contained in the records are parsed. The leaf tag ID is retained when the records are returned layer by layer to obtain the location anchor information.
[0023] Path tracing and integration: Based on the scan records reported by each layer of tags, the door lock reconstructs the query path; wherein, the integration filters irrelevant records through the door lock ID and target Tag-DID to obtain a valid location path;
[0024] Result generation and push: Based on the leaf tag ID in the valid location path, the door lock generates a visualization result containing the nearby location of the target object; wherein, the result is pushed to the user's mobile terminal through an encrypted channel, completing the retrieval closed loop.
[0025] Another embodiment of the present application provides an item retrieval system based on a door lock tag, the system comprising:
[0026] The processing module is used to process the initial query request: Based on the item query request sent by the user through the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried.
[0027] The issuing module is used to issue multi-layer scanning instructions: according to the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein, the first-layer tags switch to the center mode to scan the adjacent tags, generate the second-layer tag set, and update the miss result according to the scanning result to obtain the expanded query network;
[0028] A filtering module is used to aggregate and filter scan results: based on the scan results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record.
[0029] The feedback module is used for target location positioning and feedback: based on the scanning records returned by the deepest layer of tags, the tag location information of the target Tag-DID is extracted; among them, the door lock summarizes the scanning records of each layer, generates a query result containing the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval.
[0030] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when run.
[0031] Yet another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above methods.
[0032] Compared with the prior art, the present invention provides an item retrieval method based on door lock tags, which includes the following steps: initial query request processing: according to the item query request sent by the user through the mobile terminal, a miss result and a list of tags to be queried are obtained; multi-layer scanning instruction issuance: according to the list of tags to be queried, the door lock establishes a connection with the first layer of tags, and issues a scanning instruction containing the target Tag-DID and the door lock ID to obtain an extended query network; scanning result aggregation and filtering: according to the scanning results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated to obtain deduplicated scanning records; target position positioning and feedback: according to the scanning records returned by the deepest layer of tags, the tag position information of the target Tag-DID is extracted to generate a query result containing the target position and path, thereby enabling comprehensive and efficient item retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A hardware structure block diagram of a computer terminal for an item retrieval method based on a door lock tag provided by an embodiment of the present invention;
[0034] Figure 2 A schematic flow chart of a method for retrieving items based on door lock tags provided by an embodiment of the present invention;
[0035] Figure 3 A schematic structural diagram of an item retrieval system based on a door lock tag provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0037] The embodiment of the present invention first provides an object retrieval method based on a door lock tag, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.
[0038] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for an item retrieval method based on a door lock tag provided by an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0039] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can cause the processor to execute any one of the door lock tag-based object retrieval methods.
[0040] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0041] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the object retrieval methods based on the door lock tag.
[0042] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0043] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0044] See also Figure 2, an embodiment of the present invention provides an object retrieval method based on a door lock tag, which may include the following steps:
[0045] S201, initial query request processing: Based on the item query request sent by the user via the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried. Specifically, the initial query request processing includes:
[0046] Request parsing and verification: Based on the query request sent by the mobile terminal, the door lock extracts the target Tag-DID and user identity information; wherein, the verification is achieved by comparing the APP-ID with the door lock registration information to obtain a legitimate query request;
[0047] First-layer scanning execution: Based on a legitimate query request, the door lock initiates Bluetooth scanning to obtain directly connectable tag advertising data packets; wherein, the scanning adopts the connectable advertising mode, parses the Tag-DID in the packet, and obtains the first-layer tag set;
[0048] Preliminary judgment of the results: Based on the matching results of the first-layer tag set and the target Tag-DID, if there is no hit, a multi-layer scanning instruction containing the door lock ID and the target Tag-DID is generated to obtain a list of tags to be queried.
[0049] S202, issuing a multi-layer scanning instruction: Based on the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein the first-layer tags switch to a central mode to scan adjacent tags, generate a second-layer tag set, and update the miss results based on the scan results to obtain an expanded query network; specifically, issuing the multi-layer scanning instruction includes:
[0050] Connection establishment and command encapsulation: Based on the list of tags to be queried, the door lock establishes a connection with each first-layer tag through the GATT protocol; wherein, the command encapsulation includes the target Tag-DID, door lock ID and scan timeout parameter to obtain a standardized scanning command;
[0051] Tag mode switching and scanning: Based on the received scanning command, the first-layer tag disconnects from the door lock and switches to central mode. The scanning uses connectable advertising monitoring to obtain the Tag-DID of the adjacent tags and generate the second-layer tag set.
[0052] Temporary storage and reporting of results: Based on the comparison results between the second-layer tag set and the target Tag-DID, the first-layer tag switches back to peripheral mode and reconnects to the door lock. If there is no hit, the expanded list of tags to be queried is reported, and if there is a hit, the target location is directly returned.
[0053] S203, Scan Result Aggregation and Filtering: Based on the scan results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record. Specifically, the scan result aggregation and filtering includes:
[0054] Command conflict detection: Based on the scanning command received by the tag, the door lock ID and target Tag-DID contained in it are extracted. If the same tag receives multiple commands with the same door lock ID and target Tag-DID, only the earliest received command is cached to obtain a deduplicated command set.
[0055] Scan execution and result marking: Based on the deduplication instruction set, the tag performs a single Bluetooth scan and marks the result attribution; wherein the tag includes the ID of the parent tag initiating the instruction and the target Tag-DID, and obtains a scan record with path information;
[0056] Selective result reporting: Based on the tag information, the tag only sends the complete scan result to the superior tag with the earliest instruction; among them, other superiors with the same request only receive brief confirmation information, reducing network redundancy.
[0057] S204, Target Position Location and Feedback: Based on the scan records returned by the deepest layer of tags, the tag location information of the target Tag-DID is extracted; the door lock aggregates the scan records of each layer, generates a query result including the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval. Specifically, the target position location and feedback include:
[0058] Leaf tag identifier extraction: Based on the scan records returned by the deepest tag layer, the self-Tag-DID and target Tag-DID contained in the records are parsed. The leaf tag ID is retained when the records are returned layer by layer to obtain the location anchor information.
[0059] Path tracing and integration: Based on the scan records reported by each layer of tags, the door lock reconstructs the query path; wherein, the integration filters irrelevant records through the door lock ID and target Tag-DID to obtain a valid location path;
[0060] Result generation and push: Based on the leaf tag ID in the valid location path, the door lock generates a visualization result containing the nearby location of the target object; wherein, the result is pushed to the user's mobile terminal through an encrypted channel, completing the retrieval closed loop.
[0061] In practice, each object is equipped with a Bluetooth tag. When the owner is unsure whether an object is at home, they can communicate with the door lock through a mobile app, and the door lock will sense the presence of the corresponding Bluetooth tag. However, if an object is piled under a pile of goods or placed in a room separated by several walls, the door lock will not be able to sense the corresponding Bluetooth tag.
[0062] A Bluetooth tag is a wireless short-range communication device based on Bluetooth technology. Its implementation principle is based on Bluetooth Low Energy (BLE). BLE can transmit data in low-power mode, thereby extending the device's battery life. Bluetooth tags are assigned a unique ID (Bluetooth-Tag Declaration ID, or Tag-DID) at the factory. This Tag-DID is the Bluetooth tag's identifier, similar to the MAC address of a WiFi device. This unique ID ensures that the Bluetooth tag can be accurately identified and tracked. Bluetooth device scanning is the process of discovering the Tag-DIDs of other Bluetooth devices through Bluetooth broadcast and monitoring mechanisms.
[0063] 1. Core Concept: Each object contains a built-in Bluetooth tag. When the owner is unsure whether an object is at home, they can communicate with the door lock via their phone, and the door lock will sense the presence of the corresponding Bluetooth tag. However, if an object is piled under a pile of goods or placed in a room separated by several walls, the door lock will not be able to sense the corresponding Bluetooth tag. The solution is designed as follows: When the owner uses the mobile app to send a message to the door lock containing a tag ID, the door lock iterates through the Bluetooth tags it can currently sense. If the ID is not found, it notifies these Bluetooth tags to collect the Bluetooth tag IDs they can sense. Through progressive layers, if a Bluetooth tag senses the ID, it transmits the information to the door lock through the original loop, and the door lock responds to the owner's phone.
[0064] Further improvements are as follows: For a certain tag, it may receive queries from multiple parent tags. For queries with the same ID, it only responds to one of the parent tags. If multiple IDs need to be searched, multiple remote Bluetooth tags will transmit the query back through different paths.
[0065] Improvement 1: The initial requester must include their ID when making a request, and subsequent relayers must retain the initial requester's ID. Subsequent relayers only accept one superior for the same initial ID. 2. Each relayer must record the superior's information and the ID of the object being retrieved to facilitate result transmission. For identical object retrieval requests with the same initial ID, although only one is accepted, all responses must be sent back. The result must include both the ID of the object being retrieved and the ID of the initial requester. The receiving tag only accepts one result for a request with the same object ID and initial requester ID. Furthermore, for identical requests from multiple superiors, only one response is sufficient. For counting, the item ID is unknown, but the initial requester ID is known. The processing principle remains the same: if a tag is partially aggregated, each node must re-aggregate. The lowest level tag must include its own ID when transmitting back. To identify the specific location of the object ID, the leaf tag that found the object tag includes its ID in the response. In this case, only tags with three unique IDs are filtered out.
[0066] 2. The complete process of technical implementation is as follows:
[0067] (1) Prerequisites:
[0068] The owner's entrance door is installed with a smart door lock. The inner panel of the door lock has a Bluetooth communication module that supports Bluetooth tag scanning and Bluetooth communication.
[0069] The owner's mobile phone installs the smart door lock APP, which has an independent APP-ID.
[0070] The owner's item is equipped with a Bluetooth communication module (hereinafter referred to as a Bluetooth tag). It has an independent Bluetooth tag-DID. When sending advertising packets, it carries the Bluetooth tag ID number and supports Bluetooth communication. The Bluetooth tag supports dual-mode operation (the tag can function as a peripheral device (Peripheral) to connect to the door lock, and also as a central device (Central) to scan other tags).
[0071] The method of Bluetooth tag scanning (taking the low-energy Bluetooth BLE version as an example, this method is referenced in the following steps): the Bluetooth tag is in peripheral mode (Peripheral Mode), and regularly / periodically sends advertising data packets (containing basic information of the Bluetooth tag, divided into non-connectable and connectable advertising. The multi-layer scanning of the present invention adopts the connectable advertising mode), including the Bluetooth tag's MAC address (i.e. Tag-DID), UUID, indicator bit (whether it is connectable), etc.; the door lock is in central mode (Central Mode), actively / passively scanning / listening to the surrounding Bluetooth signals (i.e. channel scanning), receiving and parsing the advertising data packets sent from the Bluetooth tag, and extracting the Tag-DID from them. (Generally speaking, the pairing process is: the Bluetooth tag and the door lock are both turned on, the Bluetooth tag is in peripheral mode, and the door lock is in central mode. When the door lock listens to the Bluetooth tag's advertising data packet, it can extract the tag's MAC address (i.e., Tag-DID). The sensed Tag-DID is manually selected on the door lock panel and pairing is confirmed one by one. This pairing process is not the focus of this invention and will not be expanded.)
[0072] (2) To check whether the object Tag-DID (A15) is at home, the owner opens the mobile phone APP to communicate with the door lock and uses the Bluetooth tag of the door lock to scan and find the object.
[0073] The owner opens the mobile phone app to connect to the smart door lock at home, selects the object to be queried in the Bluetooth object query column of the APP's interactive page (for example, the object's Bluetooth ID number is Tag-DID (A15)) and clicks confirm. The APP sends a "Query Object" message to the door lock, including Tag-DID (A15) and so on. The door lock receives the "Query Object" message from the owner's APP, extracts the Bluetooth ID number Tag-DID (A15), and initiates a Bluetooth tag scan. According to the method in step (1), the door lock obtains the advertising data packet sent by the object's Bluetooth tag (including the object's Bluetooth tag ID number, etc.) by monitoring, and checks whether the Tag-DID of all scanned Bluetooth tags contains Tag-DID (A15) by comparing the tag ID number. Based on whether the comparison is successful (at this time, if Tag-DID (A15) is included, the query result is "yes", if Tag-DID (A15) is not included, the query result is "no"), the "Query Result" is replied to the APP, including Tag-DID (A15), whether it was found or not, etc. The owner takes subsequent actions based on the result of whether the object was found in the "Query Result" message received from the door lock by the APP, which will not be elaborated here.
[0074] (3) Further improvement: The door lock connects to the scanned Bluetooth tags one by one, notifies the Bluetooth tags to scan for Bluetooth tags, and sends the scan results back to the door lock to form a "first-level scan record table". The door lock summarizes and checks whether there is a Bluetooth tag that the owner wants to query, and returns the result to the owner. If Tag-DID (A15) is not found in the "first-level scan record table", the second and third levels of scanning are performed, and the scanning process progresses layer by layer. The Bluetooth tag at the deepest level returns the scan results along the original path until the Bluetooth tag to be queried is found or the level reaches the threshold requirement, and the scanning of the next level is no longer continued.
[0075] In step (2), when the door lock's Bluetooth device initiates a Bluetooth device scan, the object the owner is looking for (for example, Tag-DID (A15)) is buried under a pile of goods or placed in a room separated by several walls. At this time, the door lock's Bluetooth scan cannot sense the Bluetooth tag. To solve this problem, the following optimization is performed:
[0076] Additional prerequisites: The door lock supports no more than 20 Bluetooth devices connecting simultaneously (generally, due to technical reasons, the number of Bluetooth devices that support simultaneous connections will not exceed 20), and the owner's home has no more than 20 Bluetooth tags (for ease of description, it is assumed that there are 15; if there are more Bluetooth tags, the implementation of this invention requires the use of grouping, step-by-step, or other methods to achieve connection, send scan instructions, and receive reply messages, which are not explained in detail in this article); the Bluetooth tag is in the peripheral role by default and switches to the central role when performing a Bluetooth scan. The Bluetooth tag supports storing 200 Bluetooth tag scan records. The Bluetooth tag has been successfully paired with the door lock, and the Bluetooth tags have also been successfully paired with each other.
[0077] The door lock performs Bluetooth tag scanning according to step (2) (for example, the door lock directly performs Bluetooth tag scanning to obtain 10 Tag-DIDs, which does not include Tag-DID (A15)), and stores the scanning results in the "first-level scanning record table", which includes the Tag-DIDs of each Bluetooth tag, etc. The door lock then initiates a connection to the Bluetooth tags one by one according to the "first-level scanning record table" and sends a "connection request" message to it, including the door lock Bluetooth ID (M), the query target Tag-DID (A15), etc. The Bluetooth tag receives the "connection request", stores the door lock Bluetooth ID (M), the query target Tag-DID (A15), and responds to the confirmation message to establish a connection (at this point, the door lock establishes a connection with the 10 door locks); the door lock sends a "start scanning" command through the Bluetooth protocol (generally using the GATT (Generic Attribute Profile) protocol), including the target Tag-DID (A15), the scan duration parameter, etc., requesting the Bluetooth tag to perform the scan.
[0078] After receiving the "Start Scan" command, the Bluetooth tag disconnects from the door lock and switches from Peripheral Mode to Central Mode to perform the scan. The Bluetooth tag scans other Bluetooth tags according to the method in step (1) and caches them as Bluetooth tag scan records. At the same time, it queries and compares whether there is a Tag-DID (A15). After the Bluetooth tag disconnects from the door lock, the door lock detects the disconnection and enters the waiting state.
[0079] After the Bluetooth tag completes the scan, it switches from central mode back to peripheral mode and resends the advertising data packet. The door lock detects the Bluetooth tag's advertising data packet and re-initiates a connection request. After the connection is established, the Bluetooth tag sends the Bluetooth tag scan record to the door lock via the GATT protocol, including the tag's Tag-DID, the scanned Tag-DID, or Tag-DID (A15) (depending on whether the tag query and comparison result is found, if the result is "yes", only the target tag Tag-DID (A15) is sent; if the result is "no", all scanned Tag-DIDs are sent). The door lock receives and reads the Bluetooth tag scan record sent by the Bluetooth tag and stores it in the door lock's "Second Layer Scan Record Table", which includes the scanner ID Tag-DID (in this case, the scanner is the first layer Bluetooth tag scanned by the door lock), the scanned ID number (in this case, the scanned Bluetooth tag is the second layer Bluetooth tag scanned by the first layer Bluetooth tag), etc. The door lock queries whether the "second-layer scanning record table" contains Tag-DID (A15) according to the method in step (2). If the query result is "yes", it will reply to the owner APP, and the owner will process it on the APP, and the process will end; if the query result is "no", then according to the above method, the door lock notifies the first-layer Bluetooth tag, and then the first-layer tag notifies the second-layer tag to perform the Bluetooth tag scanning operation, and returns the scanning result to the door lock through the original route. The door lock obtains the "third-layer scanning record table". If the "third-layer scanning record table" still does not have Tag-DID (A15), the third-layer tag is initiated to perform the Bluetooth tag scanning operation, and the process is advanced layer by layer until Tag-DID (A15) is found or the number of layers reaches the threshold (generally the number of layers can be set to five layers) and no further entry is made to the next layer, and the process ends.
[0080] (4) Further improvement: If the Bluetooth tag of an object on this layer receives the "Start Scan" command from multiple upper-layer tags, it will first compare the query target Tag-DID in the command. If they are the same target Tag-DID, the scan result will only be replied to one of the upper layers. If they are different target Tag-DIDs, they must be replied according to the different upper layers. Optional improvement 1: Starting from the door lock, the Bluetooth tags of objects on each subsequent layer will carry the Tag-DID (M) number of the door lock when forwarding the "Start Scan" command of the upper layer. If the Bluetooth tag of an object on any layer receives the "Start Scan" command from multiple upper layers, if they carry the same Tag-DID (M) number of the door lock, it will only receive the "Start Scan" command from one upper layer and ignore the "Start Scan" command from other upper layers. Optional improvement 2: For "start scan" instructions from different superiors and for the same query target Tag-DID, after the scan is completed, only the superior who received the "start scan" instruction first will be replied with a detailed scan result message, while other superiors will reply with a simple scan result message. The superior who received the simple scan result reply message will no longer continue to reply to the superior, while the superior who received the detailed scan result needs to continue to reply to the superior.
[0081] In step (3), for a tag in a certain layer (such as Tag-DID (C) in the third layer), Tag-DID (C) may receive queries from multiple tags in the second layer (such as Tag-DID (B1) and Tag-DID (B2) in the second layer). Tag-DID (C) then needs to respond to and execute the "start scanning" instructions of Tag-DID (B1) and Tag-DID (B2) respectively, causing Tag-DID (C) to be disconnected and reconnected multiple times, as well as multiple switches between central mode and peripheral mode. To solve this problem, the following optimizations are made:
[0082] For example, after the third-layer Tag-DID (C) establishes a connection with the second-layer Tag-DID (B1) and Tag-DID (B2), it receives the "Start Scan" instruction (including the target Tag-DID to be searched) from Tag-DID (B1) and Tag-DID (B2). Whether the target Tag-DIDs in the "Start Scan" instructions received by Tag-DID (B1) and Tag-DID (B2) are the same, if they are different target Tag-DIDs to be searched (for example, Tag-DID (B1) requires to search for Tag-DID (X), and Tag-DID (B2) requires to search for Tag-DID (Y)), then after Tag-DID (C) performs a Bluetooth tag scan (at this time, Tag-DID (B1) and Tag-DID (B2) both require "Start Scan"), it will The scan results are analyzed according to step (3), and the scan results are returned along different paths according to different results (for example, if Tag-DID (X) is scanned, the reply message sent to Tag-DID (B1) only contains its own Tag-DID (C), the upper-layer Tag-DID (B1), and the target Tag-DID (X)); the reply message sent to Tag-DID (B2) only contains its own Tag-DID (C), the upper-layer Tag-DID (B2), and all the scanned Tag-DIDs); if it is the same target Tag-DID to be searched (for example, Tag-DID (B1) and Tag-DID (B2) both require to search Tag-DID (A15)), then after executing the Bluetooth tag scan, only one of the upper layers (for example, either Tag-DID (B1) or Tag-DID (B2)) is replied. In this way, the door lock can query multiple target Tag-DIDs at the same time through a multi-layer advancement method.
[0083] Optional Improvement 1: When the door lock issues a "Start Scan" command, it includes the target Tag-DID and the door lock's Tag-DID (M). Subsequent Bluetooth tag scans initiated layer by layer must include both the target Tag-DID and the door lock's Tag-DID (M). Furthermore, subsequent intermediate-level Bluetooth tags only accept the "Start Scan" command from the upper layer. This method limits the number of "Start Scan" commands sent by the intermediate layer, allowing only commands from the door lock's Tag-DID (M) to be received, reducing the overhead of Bluetooth tags at each layer.
[0084] For example: The door lock sends a "Start Scan" command, including Tag-DID (M) and the target Tag-DID (A15). After receiving the "Start Scan" command from the door lock, Tag-DID (B1) on the second layer (here, Tag-DID (B1) is used as an example, and the methods for other tags on the second layer are the same), it sends a "Start Scan" command to the third layer, including its own Tag-DID (B1), Tag-DID (M), and the target Tag-DID (A15). If Tag-DID (C1) on the third layer (here, Tag-DID (C1) is used as an example, and the methods for other tags on the second layer are the same) receives the "Start Scan" command from Tag-DID (B1) on the second layer, it sends a "Start Scan" command to the fourth layer, including its own Tag-DID (C1), Tag-DID (M), and the target Tag-DID (A15).
[0085] Optional Improvement 2: Take the third-layer Tag-DID (C) as an example.
[0086] After the third-layer Tag-DID (C) establishes a connection with the second-layer Tag-DID (B1), Tag-DID (B2), and Tag-DID (B3), it receives the "start scanning" instructions of Tag-DID (B1), Tag-DID (B2), and Tag-DID (B3) in sequence, and the target to be searched in the instructions is the same Tag-DID (A15). Then, after Tag-DID (C) performs a Bluetooth tag scan, it analyzes the scan results according to step (3) and replies to different upper layers according to different results (at this time, it is described as not scanning the target Tag-DID (A15). If Tag-DID (A15) is scanned, the message is replied in the same way), among which Tag-DID (B1) ( The reply message of Tag-DID (C), the superior that first receives the "Start Scan" command, includes its own Tag-DID (C), whether it has been scanned / not, and all the scanned Tag-DIDs (there may be multiple). After receiving the reply from Tag-DID (C), Tag-DID (B1) returns it to the door lock step by step, and the door lock sends the result to the owner's mobile phone APP; the reply message to Tag-DID (B2) and Tag-DID (B3) includes its own Tag-DID (C) and whether it has been scanned / not. After receiving the reply from Tag-DID (C), Tag-DID (B2) and Tag-DID (B3) are only cached in this tag for 5 minutes and then automatically deleted, and no further reporting is continued layer by layer to reduce the upper layer receiving a large number of identical reply messages.
[0087] (5) Further improvement: Each level of Bluetooth tags needs to record the upper level information and the Bluetooth ID of the searched object to facilitate the return of the results. A further improvement is that the Bluetooth tag in the deepest level includes its own Bluetooth ID in the message it replies to the upper level, and retains the Bluetooth ID during the subsequent layer-by-layer return to the door lock. When the door lock finally receives and summarizes the data, it can extract the Bluetooth ID of the target scanned based on the scan record, that is, the target is near the Bluetooth ID, and reply the result to the owner's mobile phone app.
[0088] In step (4), if the query results returned layer by layer finally converge to the door lock, the door lock summarizes them into the "first layer scan record table", "nth layer scan record table", etc. (according to the method of step (3), after the layer-by-layer feedback, the door lock initiates a deeper layer-by-layer scan query, so the scan results returned after each layer scan can form scan record tables of different levels). If the target Tag-DID (A15) is found at a certain level, but the specific location of Tag-DID (A15) is unknown from the "nth layer scan record table" (that is, which known tag scanned Tag-DID (A15), or which known tag is near Tag-DID (A15)). In order to solve this problem, the optimization is as follows:
[0089] According to the method in step (4), for a tag in a certain layer (for example, Tag-DID (C1) in the third layer), it receives inquiries for multiple tags in the second layer (for example, Tag-DID (B1) and Tag-DID (B2) in the second layer). At this time, after receiving the "start scanning" instruction, Tag-DID (C1) caches the two instructions, namely, instruction 1 contains Tag-DID (M), search target Tag-DID (A15), and upper-layer Tag-DID (B1), and instruction 2 contains Tag-DID (M), search target Tag-DID (A15), and upper-layer Tag-DID (B2). According to the method in step (4), Tag-DID (C1) only accepts one "start scanning" instruction, such as instruction 1. After the scanning is completed, Tag-DID (C1) sends a scanning record to the upper layer Tag-DID (B1) and Tag-DID (B2) (note that for the same object retrieval request with the same initial ID, although only one is accepted, the return needs to respond to both). The content includes Tag-DID (M), the search target Tag-DID (A15), and each Tag-DID in the scanning record.
[0090] At this time, if the second-layer Tag-DID (B1) receives response results from multiple third-layer tags (such as the third-layer Tag-DID (C1), Tag-DID (C2), etc.), and compares the response results, if they are the same (for example, they are all Tag-DID (M), the target Tag-DID (A15) is searched, and the various Tag-DIDs recorded are scanned, it means that Tag-DID (C1) and Tag-DID (C2) are together, and the scanned results are the same), then only one result / copy is accepted and uploaded to the upper layer (at this time, if the two results are the same, either one can be used). At this time, if the second-layer Tag-DID (B1) receives multiple identical "Start Scan" requests from the first-layer superior (for example, Tag-DID (B1) receives requests from two tags, Tag-DID (A1) and Tag-DID (A2), both of which contain Tag-DID (M) and the search target Tag-DID (A15)), then Tag-DID (B1) only responds to any one of the two tags, Tag-DID (A1) and Tag-DID (A2) (because the requests sent by Tag-DID (A1) and Tag-DID (A2) are the same).
[0091] When all the scan results that have been advanced to the nth layer are returned layer by layer until they are passed to the door lock, the door lock receives and summarizes them to form the "nth layer scan record table". At this time, the door lock can know the tag scan result records of all levels.
[0092] Further improvement: After the Bluetooth tag at the deepest layer executes the "start scanning" request instruction and performs the scan, the Bluetooth tag ID is carried in the reply message returned to the upper layer. In addition, each subsequent layer that reports layer by layer must retain the Bluetooth tag ID until the door lock receives and summarizes it, and records the Bluetooth tag ID that performs the scan in the "nth layer scan record table".
[0093] For example, the deepest Bluetooth tag Tag-DID (Z1) receives the "Start Scan" request instruction from the upper layer, which includes Tag-DID (M), the search target Tag-DID (A15), and the upper tag Tag-DID (Y1) that sent the instruction. After Tag-DID (Z1) executes and completes the Bluetooth tag scan, the scanned Bluetooth tag scan record is Tag-DID (n1) - Tag-DID (n5), Tag-DID (A15), and the reply message sent to the upper tag Tag-DID (Y1) includes Tag-DID (M), the search target Tag-DID (A15), this tag Tag-DID (Z1), Tag-DID (n1) - Tag-DID (n5); the Tag-DID (Y1) of the upper layer receives the reply message of Tag-DID (Z1) and other tags of the lower layer that have sent the "start scanning" request instruction, and filters it according to whether it contains Tag-DID (M), search target Tag-DID (A15), and Tag-DID (Y1) (Note: when the leaf tag of the object tag is found in the return, the ID is included in the result. At this time, only the three tags with different IDs are filtered. For example, no Tag-DID (Y1) means it is not sent to this tag, no Tag-DID (M) means it is not a query issued by the door lock, and no Tag-DID (A15) means the scan result for the search target is unknown), and the reply message to the upper layer includes: Tag-DID (M), search target Tag-DID (A15), Tag-DID (Z1), Tag-DID (n1) - Tag-DID (n5), and all forwarded reply messages until door lock Z must carry Tag-DID (Z1) (Note: This is because the search target Tag-DID (A15) is ultimately scanned by Tag-DID (Z1)). When the door lock finally receives and summarizes the "nth layer scan record table," it contains Tag-DID (Z1), the search target Tag-DID (A15), Tag-DID (n1) - Tag-DID (n5), and so on.
[0094] The door lock uses the door lock ID number Tag-DID (M) and the search target ID number Tag-DID (A15) to query the "nth layer scan record table" and extract the scan record with Tag-DID (A15) from it. For example, if the record is found: door lock ID number Tag-DID (M), search target ID number Tag-DID (A15), Tag-DID (Z1), then it can be determined that Tag-DID (A15) is near Tag-DID (Z1) (because Tag-DID (Z1) scanned Tag-DID (A15)). The door lock sends a "query object" reply message to the owner's mobile phone APP, including Tag-DID (A15), yes / no found (yes), location (Tag-DID (Z1)), etc. (If multiple tags scan the target, all records of scanning the target can be sent to the owner for query). The owner checks the reply message from the door lock through the mobile phone app and knows that Tag-DID (A15) has been found (yes / no found (yes) in the reply message) and is located near Tag-DID (Z1) (location (Tag-DID (Z1)) in the reply message). The owner takes subsequent measures based on this result, which will not be elaborated here.
[0095] Beneficial effect: The door lock requests the lower-layer tags to assist in Bluetooth tag scanning in a layer-by-layer manner. The Bluetooth tag that finally scans the target will carry its own tag number and send it back. The door lock can then determine whether the target is found and its location is near the Bluetooth tag that was finally scanned.
[0096] It can be seen that the initial query request processing: according to the item query request sent by the user through the mobile terminal, the missed results and the list of tags to be queried are obtained; the multi-layer scanning instruction is issued: according to the list of tags to be queried, the door lock establishes a connection with the first layer of tags, and issues a scanning instruction containing the target Tag-DID and the door lock ID to obtain an extended query network; the scanning result aggregation and filtering: according to the scanning results of each layer of tags in the extended query network, the query requests with the same target Tag-DID are aggregated to obtain the deduplicated scanning records; the target position positioning and feedback: according to the scanning record returned by the deepest layer of tags, the tag position information of the target Tag-DID is extracted, and the query result containing the target position and path is generated, thereby achieving comprehensive and efficient item retrieval.
[0097] Another embodiment of the present invention provides an item retrieval system based on a door lock tag, see Figure 3 , the system may include:
[0098] Processing module 301 is used to process an initial query request. Based on an item query request sent by a user via a mobile terminal, the door lock extracts the target Bluetooth tag ID as a Tag-DID and obtains a first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried.
[0099] The issuing module 302 is used to issue multi-layer scanning instructions: according to the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein, the first-layer tags switch to the center mode to scan the adjacent tags, generate a second-layer tag set, and update the miss result based on the scan result to obtain an expanded query network;
[0100] Filtering module 303 is used for scanning result aggregation and filtering: based on the scanning results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scanning result through the original path to obtain a deduplicated scanning record;
[0101] Feedback module 304 is used for target location positioning and feedback: based on the scanning records returned by the deepest layer of tags, the tag location information that hits the target Tag-DID is extracted; among them, the door lock summarizes the scanning records of each layer, generates a query result including the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval.
[0102] It can be seen that the initial query request processing: according to the item query request sent by the user through the mobile terminal, the missed results and the list of tags to be queried are obtained; the multi-layer scanning instruction is issued: according to the list of tags to be queried, the door lock establishes a connection with the first layer of tags, and issues a scanning instruction containing the target Tag-DID and the door lock ID to obtain an extended query network; the scanning result aggregation and filtering: according to the scanning results of each layer of tags in the extended query network, the query requests with the same target Tag-DID are aggregated to obtain the deduplicated scanning records; the target position positioning and feedback: according to the scanning record returned by the deepest layer of tags, the tag position information of the target Tag-DID is extracted, and the query result containing the target position and path is generated, thereby achieving comprehensive and efficient item retrieval.
[0103] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0104] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:
[0105] S201, initial query request processing: Based on the item query request sent by the user via the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried.
[0106] S202, issuing a multi-layer scanning instruction: Based on the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein, the first-layer tags switch to the center mode to scan adjacent tags, generate a second-layer tag set, and update the miss result based on the scan result to obtain an expanded query network;
[0107] S203, Scan Result Aggregation and Filtering: Based on the scan results of the tags at each layer in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record.
[0108] S204, Target Location and Feedback: Extract the tag location information of the target Tag-DID based on the scan records returned by the deepest layer of tags. The door lock aggregates the scan records of each layer, generates a query result containing the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval.
[0109] It can be seen that the initial query request processing: according to the item query request sent by the user through the mobile terminal, the missed results and the list of tags to be queried are obtained; the multi-layer scanning instruction is issued: according to the list of tags to be queried, the door lock establishes a connection with the first layer of tags, and issues a scanning instruction containing the target Tag-DID and the door lock ID to obtain an extended query network; the scanning result aggregation and filtering: according to the scanning results of each layer of tags in the extended query network, the query requests with the same target Tag-DID are aggregated to obtain the deduplicated scanning records; the target position positioning and feedback: according to the scanning record returned by the deepest layer of tags, the tag position information of the target Tag-DID is extracted, and the query result containing the target position and path is generated, thereby achieving comprehensive and efficient item retrieval.
[0110] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.
[0111] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0112] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0113] S201, initial query request processing: Based on the item query request sent by the user via the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried.
[0114] S202, issuing a multi-layer scanning instruction: Based on the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein, the first-layer tags switch to the center mode to scan adjacent tags, generate a second-layer tag set, and update the miss result based on the scan result to obtain an expanded query network;
[0115] S203, Scan Result Aggregation and Filtering: Based on the scan results of the tags at each layer in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record.
[0116] S204, Target Location and Feedback: Extract the tag location information of the target Tag-DID based on the scan records returned by the deepest layer of tags. The door lock aggregates the scan records of each layer, generates a query result containing the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval.
[0117] It can be seen that the initial query request processing: according to the item query request sent by the user through the mobile terminal, the missed results and the list of tags to be queried are obtained; the multi-layer scanning instruction is issued: according to the list of tags to be queried, the door lock establishes a connection with the first layer of tags, and issues a scanning instruction containing the target Tag-DID and the door lock ID to obtain an extended query network; the scanning result aggregation and filtering: according to the scanning results of each layer of tags in the extended query network, the query requests with the same target Tag-DID are aggregated to obtain the deduplicated scanning records; the target position positioning and feedback: according to the scanning record returned by the deepest layer of tags, the tag position information of the target Tag-DID is extracted, and the query result containing the target position and path is generated, thereby achieving comprehensive and efficient item retrieval.
[0118] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the scope of implementation of the present invention is not limited to what is shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which do not exceed the spirit covered by the description and drawings, should be within the scope of protection of the present invention.
Claims
1. A method for retrieving items based on door lock tags, characterized in that: The method comprises: Initial query request processing: Based on the item query request sent by the user through the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain the miss result and the list of tags to be queried. Multi-layer scanning instruction issuance: Based on the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID. The first-layer tags switch to central mode to scan adjacent tags, generate a second-layer tag set, and update the miss results based on the scan results to obtain an expanded query network. Scan result aggregation and filtering: Based on the scan results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record. Target location positioning and feedback: Based on the scan records returned by the deepest layer of tags, the location information of the tag that hits the target Tag-DID is extracted. The door lock aggregates the scan records of each layer, generates a query result containing the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval. The multi-layer scanning instruction is issued including: Connection establishment and command encapsulation: Based on the list of tags to be queried, the door lock establishes a connection with each first-layer tag through the GATT protocol; wherein, the command encapsulation includes the target Tag-DID, door lock ID and scan timeout parameter to obtain a standardized scanning command; Tag mode switching and scanning: Based on the received scanning command, the first-layer tag disconnects from the door lock and switches to central mode. The scanning uses connectable advertising monitoring to obtain the Tag-DID of the adjacent tags and generate the second-layer tag set. Temporary storage and reporting of results: Based on the comparison results between the second-layer tag set and the target Tag-DID, the first-layer tag switches back to peripheral mode and reconnects to the door lock. If a match is not found, the expanded list of tags to be queried is reported, and if a match is found, the target location is directly returned. The scanning result aggregation and filtering includes: Command conflict detection: Based on the scanning command received by the tag, the door lock ID and target Tag-DID contained in it are extracted. If the same tag receives multiple commands with the same door lock ID and target Tag-DID, only the earliest received command is cached to obtain a deduplicated command set. Scan execution and result marking: Based on the deduplication instruction set, the tag performs a single Bluetooth scan and marks the result attribution; wherein the tag includes the ID of the parent tag initiating the instruction and the target Tag-DID, and obtains a scan record with path information; Selective result reporting: Based on the tag information, the tag only sends the complete scan result to the parent tag that issued the earliest instruction; other parents with the same request only receive a brief confirmation message, reducing network redundancy; The target position positioning and feedback include: Leaf tag identifier extraction: Based on the scan records returned by the deepest tag layer, the self-Tag-DID and target Tag-DID contained in the records are parsed. The leaf tag ID is retained when the records are returned layer by layer to obtain the location anchor information. Path tracing and integration: Based on the scan records reported by each layer of tags, the door lock reconstructs the query path; wherein, the integration filters irrelevant records through the door lock ID and target Tag-DID to obtain a valid location path; Result generation and push: Based on the leaf tag ID in the valid location path, the door lock generates a visualization result containing the nearby location of the target object; wherein, the result is pushed to the user's mobile terminal through an encrypted channel, completing the retrieval closed loop.
2. The method according to claim 1, characterized in that The initial query request processing includes: Request parsing and verification: Based on the query request sent by the mobile terminal, the door lock extracts the target Tag-DID and user identity information; wherein, the verification is achieved by comparing the APP-ID with the door lock registration information to obtain a legitimate query request; First-layer scanning execution: Based on a legitimate query request, the door lock initiates Bluetooth scanning to obtain directly connectable tag advertising data packets; wherein, the scanning adopts the connectable advertising mode, parses the Tag-DID in the packet, and obtains the first-layer tag set; Preliminary judgment of the results: Based on the matching results of the first-layer tag set and the target Tag-DID, if there is no hit, a multi-layer scanning instruction containing the door lock ID and the target Tag-DID is generated to obtain a list of tags to be queried.
3. An item retrieval system based on door lock tags, characterized in that: The system comprises: The processing module is used to process the initial query request: Based on the item query request sent by the user through the mobile terminal, the door lock extracts the target Bluetooth tag ID as the Tag-DID and obtains the first-layer tag set through Bluetooth scanning. If the first-layer tag set does not contain the target Tag-DID, a multi-layer scanning instruction is generated to obtain a miss result and a list of tags to be queried. The issuing module is used to issue multi-layer scanning instructions: according to the list of tags to be queried, the door lock establishes a connection with the first-layer tags and issues a scanning instruction containing the target Tag-DID and the door lock ID; wherein, the first-layer tags switch to the center mode to scan the adjacent tags, generate the second-layer tag set, and update the miss result according to the scanning result to obtain the expanded query network; A filtering module is used to aggregate and filter scan results: based on the scan results of each layer of tags in the extended query network, query requests for the same target Tag-DID are aggregated. If the same tag receives the same query instruction from multiple superiors, it only responds to the instruction received earliest and returns the scan result through the original path to obtain a deduplicated scan record. The feedback module is used for target location positioning and feedback: based on the scan records returned by the deepest layer of tags, the location information of the tag that hits the target Tag-DID is extracted. The door lock aggregates the scan records of each layer, generates a query result containing the target location and path, and feeds it back to the user's mobile terminal to complete the item retrieval. The multi-layer scanning instruction is issued including: Connection establishment and command encapsulation: Based on the list of tags to be queried, the door lock establishes a connection with each first-layer tag through the GATT protocol; wherein, the command encapsulation includes the target Tag-DID, door lock ID and scan timeout parameter to obtain a standardized scanning command; Tag mode switching and scanning: Based on the received scanning command, the first-layer tag disconnects from the door lock and switches to central mode. The scanning uses connectable advertising monitoring to obtain the Tag-DID of the adjacent tags and generate the second-layer tag set. Temporary storage and reporting of results: Based on the comparison results between the second-layer tag set and the target Tag-DID, the first-layer tag switches back to peripheral mode and reconnects to the door lock. If a match is not found, the expanded list of tags to be queried is reported, and if a match is found, the target location is directly returned. The scanning result aggregation and filtering includes: Command conflict detection: Based on the scanning command received by the tag, the door lock ID and target Tag-DID contained in it are extracted. If the same tag receives multiple commands with the same door lock ID and target Tag-DID, only the earliest received command is cached to obtain a deduplicated command set. Scan execution and result marking: Based on the deduplication instruction set, the tag performs a single Bluetooth scan and marks the result attribution; wherein the tag includes the ID of the parent tag initiating the instruction and the target Tag-DID, and obtains a scan record with path information; Selective result reporting: Based on the tag information, the tag only sends the complete scan result to the parent tag that issued the earliest instruction; other parents with the same request only receive a brief confirmation message, reducing network redundancy; The target position positioning and feedback include: Leaf tag identifier extraction: Based on the scan records returned by the deepest tag layer, the self-Tag-DID and target Tag-DID contained in the records are parsed. The leaf tag ID is retained when the records are returned layer by layer to obtain the location anchor information. Path tracing and integration: Based on the scan records reported by each layer of tags, the door lock reconstructs the query path; wherein, the integration filters irrelevant records through the door lock ID and target Tag-DID to obtain a valid location path; Result generation and push: Based on the leaf tag ID in the valid location path, the door lock generates a visualization result containing the nearby location of the target object; wherein, the result is pushed to the user's mobile terminal through an encrypted channel, completing the retrieval closed loop.
4. The system according to claim 3, characterized in that The processing module is specifically used to: Request parsing and verification: Based on the query request sent by the mobile terminal, the door lock extracts the target Tag-DID and user identity information; wherein, the verification is achieved by comparing the APP-ID with the door lock registration information to obtain a legitimate query request; First-layer scanning execution: Based on a legitimate query request, the door lock initiates Bluetooth scanning to obtain directly connectable tag advertising data packets; wherein, the scanning adopts the connectable advertising mode, parses the Tag-DID in the packet, and obtains the first-layer tag set; Preliminary judgment of the results: Based on the matching results of the first-layer tag set and the target Tag-DID, if there is no hit, a multi-layer scanning instruction containing the door lock ID and the target Tag-DID is generated to obtain a list of tags to be queried.
5. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to claim 1 when executed.
6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to claim 1 .
Citation Information
Patent Citations
Mobile location and multimedia information pushing network system based on Bluetooth
CN102946378A
Household WiFi Bluetooth automatic alarm device and alarm method
CN113256923A