Method and system for realizing adjoint relation analysis based on label record
Through the methods of active scanning of mobile tags, dynamic storage and deduplication processing, and collaborative transmission of neighboring tags, the problem of insufficient data acquisition and transmission efficiency in the existing accompanying relationship analysis technology is solved, and more accurate and efficient analysis results are achieved.
Patent Information
- Application Number
- CN202510775066.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing accompanying relationship analysis technology has shortcomings in data acquisition, processing and transmission efficiency, which has affected the accuracy and effectiveness of the analysis results.
The Bluetooth tags at the surrounding fixed IoT acquisition end are actively scanned and collected by mobile tags, and scan records are dynamically stored and deduplicated. The data is transmitted in a coordinated manner using adjacent tags, and a companion relationship analysis report is generated through the spatiotemporal trajectory matching algorithm.
It realizes more accurate and efficient accompanying relationship analysis, improves the accuracy and transmission efficiency of data acquisition, and provides new ideas for the development of Internet of Things technology.
Smart Images

Figure CN120282104A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data analysis, and particularly relates to a method and system for realizing co - occurrence relationship analysis based on tag records. Background Art
[0002] With the rapid development of Internet of Things technology, tag - based positioning and tracking technologies have been widely applied in fields such as warehouse management, logistics tracking, smart home, and intelligent transportation. As an important data mining technology, co - occurrence relationship analysis aims to reveal the spatial and temporal relationships between objects. However, existing co - occurrence relationship analysis technologies face challenges such as limitations in data collection, improper handling of duplicate data, low data transmission efficiency, and insufficient spatio - temporal matching algorithms, which affect the accuracy and effectiveness of analysis results. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and system for realizing co - occurrence relationship analysis based on tag records to solve the deficiencies in the prior art, enabling more accurate and efficient co - occurrence relationship analysis and providing new ideas and references for the further development of Internet of Things technology.
[0004] An embodiment of the present application provides a method for realizing co - occurrence relationship analysis based on tag records, and the method includes: Active scanning and acquisition by mobile tags: According to the periodic scanning mechanism of the mobile Bluetooth device A, actively scan the Bluetooth tags of surrounding fixed Internet of Things acquisition terminals, record the scanning records including the acquisition terminal Tag - DID, scanning timestamp, and its own Tag - DID, and obtain the original trajectory data of the mobile tags; Dynamic storage and duplicate removal processing: According to the timestamp and Tag - DID of the scanning records, perform repeatability detection through a time - window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition terminal Tag - DID exceeds 30 seconds, store it as a new record, otherwise discard it, and obtain the trajectory data set after duplicate removal; Data forwarding collaboration: According to the storage space utilization rate of the mobile tag A, when it exceeds the preset threshold, find the adjacent mobile tag B through Bluetooth broadcast, establish a temporary communication link, and transmit some scanning records in packets to the tag B, which forwards them to the fixed acquisition terminal to obtain the distributed collaborative transmission result; Platform co - occurrence relationship analysis: According to the direct scanning records and collaborative forwarding records from mobile tags uploaded by the fixed acquisition terminal, through a spatio - temporal trajectory matching algorithm, identify multiple mobile tags scanned by the same acquisition terminal within the same time window and geographical location, and generate a co - occurrence relationship analysis report.
[0005] Optionally, the active scanning and acquisition by the mobile tags includes: Scanning Trigger: According to the timer of the movable Bluetooth device A, scan the Bluetooth signals of the fixed acquisition terminals broadcasted peripherally every 2 seconds in the central mode to obtain the radio frequency signal strength data; Tag Identification: Analyze the Tag-DID and UUID of the fixed acquisition terminal according to the received Bluetooth broadcast packet, and filter out non-target acquisition terminals through the whitelist to obtain the set of effective acquisition terminal identifiers; Record Generation: Generate a timestamp according to the system clock at the scanning moment, generate a structured scanning record and write it into the cache queue.
[0006] Optionally, the dynamic storage and deduplication processing includes: Time Window Calculation: Query the recently stored records with the same Tag-DID according to the Tag-DID of the new scanning record, calculate the difference between the current timestamp and the timestamp of the most recent record to obtain the time interval ΔT; Threshold Comparison: According to the preset time window threshold of 30 seconds, discard the current record when ΔT ≤ 30 seconds, and append the current record to the storage queue when ΔT > 30 seconds to generate a deduplication flag bit; Storage Optimization: Manage the circular storage buffer according to the first-in, first-out principle, and trigger the warning flag bit when the storage space reaches 80% of the capacity.
[0007] Optionally, the data forwarding coordination includes: Coordination Request Broadcast: According to the storage warning flag bit, broadcast a coordination request message containing its own Tag-DID and the data volume to be transmitted in the peripheral mode to obtain a list of peripheral device responses; Link Negotiation: Select the optimal coordination device B to establish a point-to-point Bluetooth connection according to the evaluation result of the remaining storage space of the responding device, and negotiate a sub-packet transmission scheme; Data Sub-packet Transmission: Split the scanning records to be transmitted into multiple data blocks according to the MTU size, send them to device B through the reliable transmission mode, and receive the verification confirmation receipt.
[0008] Optionally, the platform companion relationship analysis includes: Trajectory Alignment: According to the records reported by multiple mobile tags containing the same acquisition terminal Tag-DID, establish a spatio-temporal trajectory point mapping relationship through the timestamp alignment algorithm; Companion Judgment: According to the preset time window of 30 seconds and the geographical fence threshold of 50 meters, generate a companion event mark when two tags meet the spatio-temporal coincidence condition at more than 3 consecutive trajectory points; Visualization Output: Generate a visualization analysis report containing the time axis, map trajectory, and tag association diagram according to the companion event mark.
[0009] Optionally, the storage optimization further includes: Emergency Disposal: When the storage space reaches 95% of its capacity, the earliest 10% of the records are automatically deleted and the remaining data is compressed; Priority Marking: Set a write protection flag for records containing the Tag-DID of the acquisition terminal in high-risk areas to prohibit automatic deletion.
[0010] Another embodiment of the present application provides a system for analyzing adjoint relationships based on tag records, the system comprising: An acquisition module, configured to actively scan and acquire by mobile tags: According to the periodic scanning mechanism of the mobile Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things acquisition terminals, record the scanning records including the acquisition terminal Tag-DID, the scanning timestamp, and its own Tag-DID, and obtain the original trajectory data of the mobile tags; A processing module, configured to perform dynamic storage and deduplication processing: According to the timestamp and Tag-DID of the scanning record, perform repeatability detection through a time window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition terminal Tag-DID exceeds 30 seconds, it is stored as a new record, otherwise it is discarded, and a deduplicated trajectory data set is obtained; A collaboration module, configured to perform data forwarding collaboration: According to the storage space utilization rate of the mobile tag A, when it exceeds a preset threshold, find a neighboring mobile tag B through Bluetooth broadcasting, establish a temporary communication link and transmit some of the scanning records in packets to the tag B, and the tag B forwards them to the fixed acquisition terminal to obtain a distributed collaborative transmission result; An analysis module, configured to perform platform adjoint relationship analysis: According to the direct scanning records and collaborative forwarding records from mobile tags uploaded by the fixed acquisition terminal, through a spatio-temporal trajectory matching algorithm, identify multiple mobile tags scanned by the same acquisition terminal within the same time window and geographical location, and generate an adjoint relationship analysis report.
[0011] Another embodiment of the present application provides a storage medium, in which a computer program is stored, and wherein the computer program is configured to execute the method described in any one of the above when running.
[0012] Another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of the above.
[0013] Compared with the prior art, a method for realizing companion relationship analysis based on tag records provided by the present invention has mobile tags actively scanning and collecting: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scanning the Bluetooth tags of the surrounding fixed Internet of Things collection terminals to obtain the original trajectory data of the mobile tags; dynamically storing and deduplicating: obtaining the deduplicated trajectory data set according to the timestamps and Tag-DIDs of the scanning records; data forwarding and collaboration: obtaining the distributed collaborative transmission result according to the storage space utilization rate of the mobile tag A; platform companion relationship analysis: generating a companion relationship analysis report according to the direct scanning records and collaborative forwarding records from the mobile tags uploaded by the fixed collection terminals, so as to realize more accurate and efficient companion relationship analysis and provide new ideas and references for the further development of Internet of Things technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 FIG. is a hardware structure block diagram of a computer terminal for a method for realizing companion relationship analysis based on tag records provided by an embodiment of the present invention; Figure 2 FIG. is a schematic flow chart of a method for realizing companion relationship analysis based on tag records provided by an embodiment of the present invention; Figure 3 FIG. is a schematic structural diagram of a system for realizing companion relationship analysis based on tag records provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.
[0016] An embodiment of the present invention first provides a method for realizing companion relationship analysis based on tag records, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers, etc.
[0017] The following takes running on a computer terminal as an example to describe it in detail. Figure 1 FIG. is a hardware structure block diagram of a computer terminal for a method for realizing companion relationship analysis based on tag records provided by an embodiment of the present invention. As Figure 1 shown, the computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory may include a non-volatile storage medium and an internal memory.
[0018] The non-volatile storage medium can store an operating system and computer programs. The computer programs include program instructions, and when the program instructions are executed, the processor can execute any method for realizing companion relationship analysis based on tag records.
[0019] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
[0020] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can be caused to execute any method for implementing adjoint relationship analysis based on tag records.
[0021] This network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 1 The structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0022] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0023] See Figure 2 , an embodiment of the present invention provides a method for implementing adjoint relationship analysis based on tag records, which may include the following steps: S201, Mobile tag active scanning and acquisition: According to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things acquisition terminals, record the scan records including the acquisition terminal Tag-DID, scan timestamp, and its own Tag-DID, and obtain the original trajectory data of the mobile tag; Specifically, the mobile tag active scanning and acquisition includes: Scan trigger: According to the timer of the movable Bluetooth device A, use the central mode to scan the Bluetooth signals broadcast by the surrounding fixed acquisition terminals every 2 seconds to obtain radio frequency signal strength data; Tag identification: Parse the Tag-DID and UUID (Universally Unique Identifier) of the fixed acquisition terminal according to the received Bluetooth broadcast packet, and filter out non-target acquisition terminals through a whitelist to obtain a set of valid acquisition terminal identifiers; Record generation: Generate a timestamp based on the system clock at the scanning moment, generate a structured scanning record, and write it into the cache queue.
[0024] S202, Dynamic storage and deduplication processing: According to the timestamp and Tag-DID of the scanning record, perform repeatability detection through the time window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition end Tag-DID exceeds 30 seconds, store it as a new record; otherwise, discard it to obtain a deduplicated trajectory dataset. Specifically, the dynamic storage and deduplication processing includes: Time window calculation: Query the most recently stored record with the same Tag-DID according to the Tag-DID of the new scanning record, calculate the difference between the current timestamp and the timestamp of the most recent record to obtain the time interval ΔT. Threshold comparison: According to the preset 30-second time window threshold, discard the current record when ΔT ≤ 30 seconds, and append the current record to the storage queue when ΔT > 30 seconds to generate a deduplication flag bit. Storage optimization: Manage the circular storage buffer according to the first-in, first-out principle, and trigger a warning flag bit when the storage space reaches 80% of its capacity. Specifically, the storage optimization also includes: Emergency handling: When the storage space reaches 95% of its capacity, automatically delete the earliest 10% of the records and compress the remaining data. Priority marking: Set a write protection flag for the records containing the Tag-DID of the acquisition end in the high-risk area to prohibit automatic deletion.
[0025] S203, Data forwarding collaboration: According to the storage space utilization rate of mobile tag A, when it exceeds the preset threshold, search for adjacent movable tag B through Bluetooth broadcast, establish a temporary communication link, and transmit some scanning records in packets to tag B, which forwards them to the fixed acquisition end to obtain a distributed collaborative transmission result. Specifically, the data forwarding collaboration includes: Collaboration request broadcast: According to the storage warning flag bit, broadcast a collaboration request message containing its own Tag-DID and the amount of data to be transmitted in the peripheral mode to obtain a list of responses from surrounding devices. Link negotiation: According to the evaluation result of the remaining storage space of the responding device, select the optimal collaborative device B to establish a point-to-point Bluetooth connection and negotiate a packet transmission scheme. Data packet transmission: Split the scanning records to be transmitted into multiple data blocks according to the size of the MTU (Maximum Transmission Unit), send them to device B through a reliable transmission mode, and receive a check confirmation receipt.
[0026] S204, Platform Adjacent Relationship Analysis: Based on the direct scanning records and collaborative forwarding records from mobile tags uploaded by fixed collection terminals, through the spatio-temporal trajectory matching algorithm, identify multiple mobile tags scanned by the same collection terminal within the same time window and geographical location, and generate an adjacent relationship analysis report.
[0027] Specifically, the platform adjacent relationship analysis includes: Trajectory Alignment: Based on the records of multiple mobile tags reporting the same collection terminal Tag-DID, establish a spatio-temporal trajectory point mapping relationship through the timestamp alignment algorithm; Adjacent Judgment: According to the preset 30-second time window and 50-meter geographical fence threshold, when two tags meet the spatio-temporal coincidence condition at more than 3 consecutive trajectory points, generate an adjacent event mark; Visualization Output: Generate a visualization analysis report including a timeline, a map trajectory, and a tag association graph based on the adjacent event mark.
[0028] In practical applications, Bluetooth tags (referred to as movable Bluetooth devices) are installed on many movable items. In management, in order to track and count the items / Bluetooth devices, the spatio-temporal trajectories of the Bluetooth devices can be collected point by point through fixed Internet of Things collection terminals by the roadside and sent to the platform for adjacent relationship analysis. However, this point-by-point collection method is inaccurate and may be omitted.
[0029] A Bluetooth tag is a wireless short-range communication device based on Bluetooth technology. Its implementation principle is based on Bluetooth Low Energy (BLE) technology. BLE can transmit data in a low-power mode, thus extending the battery life of the device. Each Bluetooth tag is assigned a unique ID (Bluetooth-Tag Declaration ID, Bluetooth tag declaration ID, referred to as Tag-DID) when it leaves the factory. This Tag-DID is the identity identifier of the Bluetooth tag, similar to the MAC address of a WiFi device. This unique ID ensures that the Bluetooth tag can be accurately identified and tracked. Based on this, this application proposes a method of using movable Bluetooth devices to scan and collect the Bluetooth tags of fixed Internet of Things collection terminals by the roadside to record their own spatio-temporal trajectories.
[0030] 1. Core idea: In the traditional solution, to verify the accompanying relationship between two tags, the IoT acquisition end (such as cameras and Bluetooth devices on roadside poles) needs to perform point-by-point acquisition, and then judge the accompanying relationship through the spatio-temporal trajectory consistency of the two tags. This method is not accurate enough and will miss some cases. The improved design is as follows: Each Bluetooth tag will sense the nearby Bluetooth IDs by itself and record the exact time period when it can sense a certain Bluetooth ID; when the IoT acquisition point on the roadside senses a Bluetooth tag, the tag will send the time period of accompanying all Bluetooth IDs at present to the acquisition end. Each acquisition end sends the data to the cloud, and the cloud can perform accurate accompanying relationship analysis. The tag should periodically record each spatio-temporal point and other tags at that spatio-temporal point; the spatio-temporal accompanying information of the tag should be read passively by the IoT reader; if the Bluetooth tag finds that it has not moved, it does not need to record periodically; the basis for judging no movement is that the Bluetooth ID of the nearby lamp post has not changed; if all sensed IoT IDs have not changed, only record a mark (indicating no change); if the cache is about to be full, the tag notifies the nearby tags that can be sensed and asks it to notify its IoT reader to come and read the data for it; Improvement point: Ask the nearby tags to help read and bring its own ID, and the nearby tags will transfer the data to its reader 2. The complete technical implementation process is as follows: (1) Prerequisites: The movable Bluetooth device has a unique Tag-DID, supports Bluetooth communication, supports storing the Bluetooth Tag-DIDs of the surrounding devices actively scanned, and the stored content includes Tag-DID, scanning time, geographical location, etc. The Bluetooth device has been successfully paired with the fixed IoT acquisition end on the roadside.
[0031] The fixed IoT acquisition end on the roadside is equipped with a Bluetooth module. The Bluetooth module has a unique Tag-DID, supports Bluetooth communication, supports storing the Bluetooth Tag-DIDs of the surrounding devices actively scanned, and is connected to the cloud platform, registers with the platform, and the platform records the list of IoT acquisition ends, including IoT acquisition end ID, acquisition end IP address, acquisition end geographical location, etc.
[0032] Method for Bluetooth tag scanning (illustrated by taking the low - power Bluetooth BLE version as an example, and this method is referred to in the following steps): The movable Bluetooth device is in the peripheral mode, and periodically / periodically sends advertising data packets (including the basic information of the Bluetooth tag, which is divided into non - connectable and connectable advertisements. The scanning in this invention uses the connectable advertisement mode), including the MAC address (i.e., Tag - DID), UUID, indication bit (whether it is connectable), etc. of the movable Bluetooth device; The IoT acquisition end is in the central mode, actively / passively scans / listens to the surrounding Bluetooth signals (i.e., channel scanning), receives and parses the advertising data packets sent from the Bluetooth tag, and extracts the Tag - DID from them.
[0033] (2) Collection of trajectory points of the movable Bluetooth device and calculation of the accompanying relationship: Multiple IoT acquisition ends collect and record the time when the movable Bluetooth device is scanned and the geographical location of the acquisition end to form a scan record / trajectory point, and send the Bluetooth scan record to the platform, where the platform performs the analysis and calculation of the accompanying relationship of the movable Bluetooth device.
[0034] The movable Bluetooth device A in the working state comes near the fixed IoT acquisition end on the roadside (such as the IoT acquisition end with the Bluetooth ID number N1. At this time, the two are within the range of Bluetooth communication distance). The Bluetooth module of N1 performs Bluetooth tag scanning and records the Bluetooth scan record. N1 sends the scan record to the platform, including the acquisition end ID (N1), the Tag - DID (A) of A, the scan timestamp t1, and the geographical location d1 (the geographical location of N1); When A comes near the fixed IoT acquisition end N2 on the roadside, the Bluetooth module of N2 performs Bluetooth tag scanning and records the Bluetooth scan record, including the acquisition end ID (N2), Tag - DID (A), scan timestamp t2, and geographical location d2. The IoT acquisition end continuously scans the nearby Bluetooth tags. If the same Tag - DID is scanned within 30 seconds, the repeated record is not sent repeatedly, that is, if there is a repeated Tag - DID, it is sent once every 30 seconds, and only the first acquisition record within the 30 - second time range is sent (that is, if continuously collected, only the scan records at the 1st second, 31st, 61st,... moments are collected and sent); According to the same method, the Bluetooth devices A or B are Bluetooth - scanned near more IoT acquisition ends N1 - Nn, and the Tag - DID (A / B), scan timestamp tn, and geographical location dn of A / B are sent to the platform.
[0035] The platform receives the Bluetooth scan records sent by the roadside fixed Internet of Things (IoT) collection terminals, forms the spatio-temporal sequences of Bluetooth device A and the spatio-temporal sequences of Bluetooth device A. Based on the associated analysis using big data (for example, if two Bluetooth devices are scanned for Bluetooth tags within a 30-second time range and at the same geographical location, then the two Bluetooth devices have an associated relationship at that time point and location point. If there are multiple points with an associated relationship, then an associated trajectory sequence can be depicted), the associated relationship between Bluetooth devices A and B can be depicted, that is, A and B have a sequence of the same spatio-temporal trajectory points.
[0036] Example of the associated relationship analysis method: For example, Bluetooth devices A and B are scanned and recorded by a series of IoT collection terminals as shown in the following table. It can be analyzed from Table 1 that Bluetooth devices A and B have spatio-temporal associated relationships at 4 trajectory points: t1 and t2 at N1 / d1, t4 at N1 / d1, and t9 at N3 / d3.
[0037] Table 1
[0038] (3) Further improvement: A movable Bluetooth device scans, collects, and records the Bluetooth tag information of the roadside fixed IoT collection terminals it has collected in its own scan records. After establishing a communication connection with the roadside fixed IoT collection terminal, it sends the stored scan records to the IoT collection terminal, and then the IoT collection terminal sends them to the platform for the associated relationship analysis and calculation of the movable Bluetooth device.
[0039] In step (2), for the associated analysis of movable Bluetooth devices, point-like collection by roadside fixed IoT collection terminals is required. Moreover, the roadside fixed IoT collection terminal must successfully scan a movable Bluetooth device and record the scan record. However, due to reasons such as network or device, if it fails to send the record to the platform successfully, then the platform lacks or misses this unreported scan record, resulting in a decrease in the accuracy of the associated relationship analysis and calculation of movable Bluetooth devices by the platform. To improve the accuracy of the associated relationship analysis and calculation, the following optimizations are made: A movable Bluetooth device A in a working state comes near a roadside fixed Internet of Things (IoT) collection end (such as the IoT collection end with ID N1). At this time, both are within the Bluetooth communication range. The Bluetooth module of A performs Bluetooth tag scanning and records the Bluetooth scan record. At this time, the Bluetooth module of A is in the state of scanning Bluetooth tags and can scan N1 which is in the peripheral mode. A stores the scan record, which includes the Tag-DID (A) of the movable Bluetooth device A itself, the scan timestamp t1, and the Tag-DID (N1) of the roadside fixed IoT collection end. In the same way, at time t2, when A comes near the IoT collection end N2, A can scan and record a scan record, which includes the Tag-DID (A) of the movable Bluetooth device A itself, the scan timestamp t2, and the Tag-DID (N2) of the roadside fixed IoT collection end. Similarly, if the movable Bluetooth device B comes near the IoT collection end N1 at time t3, B can scan and record a scan record, which includes the Tag-DID (B) of the movable Bluetooth device B itself, the scan timestamp t3, and the Tag-DID (N1) of the roadside fixed IoT collection end. When A scans the roadside fixed IoT collection end N1, N1 also senses the presence of A. A establishes a communication connection with N1 via Bluetooth. (Note that at this time, it is assumed that the Bluetooth of the roadside fixed IoT collection end is in the peripheral mode. When a connection is needed, A sends a "connection request" message to the collection end, including the Bluetooth ID (A) of A, etc. The collection end receives the "connection request" message and sends a confirmation message to establish the connection. The detailed process is not the focus of this invention and will not be elaborated.) A sends all the stored scan records to N1, the content including the Tag-DID (A) of the movable Bluetooth device A itself, the scan timestamp t of each scan record, and the Tag-DID of the scanned roadside fixed IoT collection end, etc. After A finishes sending the scan records, it deletes and clears all the scan records stored by itself. N1 receives all the scan records stored by A sent via the Bluetooth connection and sends these scan records to the platform through the networking with the platform. According to the method in step (2), the platform receives the scan records collected by movable Bluetooth devices sent by N1 and more other IoT collection ends, and the platform conducts the analysis and calculation of the accompanying relationship of the movable Bluetooth devices.
[0040] (4) Further improvement: If the movable Bluetooth device does not move, the repeated scan records collected must be checked for repetition. If the time interval between collecting the same Bluetooth Tag-DID exceeds the set time threshold, then discard and do not save this scan record.
[0041] In step (3), the movable Bluetooth device A continuously performs Bluetooth tag scans periodically. For example, it scans once every 2 seconds. If A stays in a certain position without moving, the Bluetooth Tag-DIDs scanned will be repetitive. If every scanned Bluetooth is stored in the scan record, it will cause the storage of device A to overflow in a short time, and the stored repetitive records are not very useful for the analysis and calculation of the accompanying relationship of the movable Bluetooth device. To reduce the storage of repetitive Bluetooth scan records, the following optimizations are made: The movable Bluetooth device A continuously performs Bluetooth scans periodically (usually set to scan once every 2 seconds). When it first scans the Tag-DID (Nn) of the roadside fixed IoT device N1, it is stored in the scan record, including the Tag-DID (A) of the movable Bluetooth device itself, the scan time t, and the Bluetooth Tag-DID (Nn) of the roadside fixed IoT collection device. If A scans the same Tag-DID (Nn) of the roadside fixed IoT device Nn multiple times within a subsequent period, by comparing it with the scan records stored in A, if it is the same Bluetooth Tag-DID and the difference between the timestamp of this scan and the timestamp of the stored scan record does not exceed the threshold range (usually set to 30 seconds, and can also be set to a longer time according to business needs if the acquisition accuracy is relaxed), then this scan record is not recorded repeatedly (at this time, it means that the Bluetooth device A has not moved); if the same Tag-DID of the IoT device is scanned this time and the difference between the scan timestamp and the timestamp of the stored scan record exceeds the threshold range, it should be recorded as a new scan record.
[0042] (5) Further improvement: When the storage of the movable Bluetooth device is about to be full, it borrows the forwarding of other movable Bluetooth devices and is indirectly connected to the roadside fixed IoT collection device, and sends the stored Bluetooth scan records to the platform through this IoT collection device.
[0043] In step (3), if the movable Bluetooth device A scans and stores a large number of Bluetooth scan records but has not been connected to the roadside fixed IoT collection device to send the stored Bluetooth scan records to the roadside fixed IoT collection device (at this time, the storage space cannot be cleared), when more scan records arrive, A will have insufficient storage space and cannot write, or will delete the historical records (such as deleting the earliest data according to the principle of first in first out) to free up space to store new Bluetooth scan records, but the data to be deleted is scanned and collected by A and is expected to be sent to the platform for accompanying relationship analysis. To export the Bluetooth scan records stored in A to the platform in a timely manner, the following optimizations are made: The movable Bluetooth device A records the cumulative number M of scanned records when continuously performing Bluetooth scanning and storing the scanned records (M is a dynamic data, that is, the cumulative number of records. Each time a record is scanned and stored, M is automatically incremented by 1). When M exceeds the threshold (generally, M can be set to 80% of the maximum storage capacity of A), a warning is triggered to prompt A to transfer the stored Bluetooth scanned records as soon as possible. At this time, if A moves near a roadside fixed Internet of Things collection terminal Z that can be connected via Bluetooth (for example, A has been successfully paired with the Internet of Things collection terminal Z, and Z has been connected to the platform), then the stored scanned records are sent to Z according to the method in step (3), and its own storage space is cleared, and M is set to 0 (at this time, the number of stored records is 0, and the accumulation can start from the first record); if A has not sensed and connected to a roadside fixed Internet of Things collection terminal, but senses a movable Bluetooth device B around it, then A sends a message "Please help me forward" to B, including its own Bluetooth ID number Tag-DID(A), the number M of Bluetooth scanned records, etc. After receiving A's "Please help me forward" message and sensing the roadside fixed Internet of Things collection terminal Y, B replies with a reply message "I'll forward", the content of which includes B's Bluetooth ID number Tag-DID(B), the remaining storage space capacity N of B (at this time, B may already have some scanned records not sent out), etc. After receiving B's reply, A first judges the size of M and N (since the available storage capacities of different Bluetooth devices are inconsistent). If M < N, then A sends M scanned records to B at one time. After B receives them, it sends the scanned records stored by itself and the scanned records received from A to Y according to the method in step (3) and clears its own storage space (sets N to 0, that is, N = 0); if M ≥ N, then A sends them step by step. First, N records are sent, and then it is checked whether (M - N) < N. If (M - N) < N, then A sends M - N records this time. Then continue to judge. If (M - N) ≥ N, continue to send step by step according to the aforementioned method. After A finishes sending all the scanned records, A disconnects the Bluetooth connection with B. After B sends all the scanned records forwarded by A to Y, B disconnects the Bluetooth connection with Y, and the process ends.
[0044] Beneficial effects: By using the Bluetooth of the movable Bluetooth device to scan the Bluetooth tags of the roadside fixed Internet of Things collection terminals around, the space-time trajectory of itself is recorded, and the stored Bluetooth scanned records are sent through the forwarding of other movable Bluetooth devices nearby.
[0045] It can be seen that for mobile tag active scanning and acquisition: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things acquisition terminals, and obtain the original trajectory data of the mobile tag; dynamic storage and deduplication processing: according to the time stamp and Tag-DID of the scanning record, obtain the deduplicated trajectory data set; data forwarding collaboration: according to the storage space utilization rate of the mobile tag A, obtain the distributed collaborative transmission result; platform companion relationship analysis: according to the direct scanning record and collaborative forwarding record from the mobile tag uploaded by the fixed acquisition terminal, generate a companion relationship analysis report, so as to achieve more accurate and efficient companion relationship analysis and provide new ideas and references for the further development of Internet of Things technology.
[0046] Another embodiment of the present invention provides a companion relationship analysis system based on tag records. Refer to Figure 3 , the system may include: An acquisition module 301, configured to perform mobile tag active scanning and acquisition: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things acquisition terminals, and record the scanning records including the acquisition terminal Tag-DID, scanning time stamp, and its own Tag-DID, so as to obtain the original trajectory data of the mobile tag; A processing module 302, configured to perform dynamic storage and deduplication processing: according to the time stamp and Tag-DID of the scanning record, perform repeatability detection through a time window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition terminal Tag-DID exceeds 30 seconds, store it as a new record, otherwise discard it, so as to obtain the deduplicated trajectory data set; A collaboration module 303, configured to perform data forwarding collaboration: according to the storage space utilization rate of the mobile tag A, when it exceeds a preset threshold, search for a neighboring movable tag B through Bluetooth broadcast, establish a temporary communication link and transmit part of the scanning records in packets to the tag B, and forward them to the fixed acquisition terminal by the tag B, so as to obtain the distributed collaborative transmission result; An analysis module 304, configured to perform platform companion relationship analysis: according to the direct scanning record and collaborative forwarding record from the mobile tag uploaded by the fixed acquisition terminal, identify multiple mobile tags scanned by the same acquisition terminal within the same time window and geographical location through a spatio-temporal trajectory matching algorithm, and generate a companion relationship analysis report.
[0047] It can be seen that for mobile tag active scanning and acquisition: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed IoT acquisition terminals to obtain the original trajectory data of the mobile tag; dynamic storage and deduplication processing: according to the timestamps and Tag-DIDs of the scanning records, obtain the deduplicated trajectory dataset; data forwarding collaboration: according to the storage space utilization rate of the mobile tag A, obtain the distributed collaborative transmission result; platform companion relationship analysis: according to the direct scanning records and collaborative forwarding records from the mobile tag uploaded by the fixed acquisition terminal, generate a companion relationship analysis report, so as to achieve more accurate and efficient companion relationship analysis and provide new ideas and references for the further development of IoT technology.
[0048] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0049] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for executing the following steps: S201, Mobile tag active scanning and acquisition: According to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed IoT acquisition terminals, record the scanning records including the acquisition terminal Tag-DID, scanning timestamp and its own Tag-DID, and obtain the original trajectory data of the mobile tag; S202, Dynamic storage and deduplication processing: According to the timestamps and Tag-DIDs of the scanning records, perform duplicate detection through the time window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition terminal Tag-DID exceeds 30 seconds, store it as a new record, otherwise discard it, and obtain the deduplicated trajectory dataset; S203, Data forwarding collaboration: According to the storage space utilization rate of the mobile tag A, when it exceeds the preset threshold, search for the adjacent movable tag B through Bluetooth broadcast, establish a temporary communication link and transmit some of the scanning records in packets to the tag B, and the tag B forwards them to the fixed acquisition terminal to obtain the distributed collaborative transmission result; S204, Platform companion relationship analysis: According to the direct scanning records and collaborative forwarding records from the mobile tag uploaded by the fixed acquisition terminal, through the spatio-temporal trajectory matching algorithm, identify multiple mobile tags scanned by the same acquisition terminal within the same time window and geographical location, and generate a companion relationship analysis report.
[0050] It can be seen that for the active scanning and collection of mobile tags: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things collection terminals, and obtain the original trajectory data of the mobile tags; for dynamic storage and deduplication processing: according to the time stamps and Tag-DIDs of the scanning records, obtain the deduplicated trajectory data set; for data forwarding and collaboration: according to the storage space utilization rate of the mobile tag A, obtain the distributed collaborative transmission result; for platform companion relationship analysis: according to the direct scanning records and collaborative forwarding records from the mobile tags uploaded by the fixed collection terminals, generate a companion relationship analysis report, so as to realize more accurate and efficient companion relationship analysis and provide new ideas and references for the further development of Internet of Things technology.
[0051] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0052] Specifically, the above electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0053] Specifically, in this embodiment, the above processor may be configured to execute the following steps through a computer program: S201, active scanning and collection of mobile tags: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things collection terminals, record the scanning records including the Tag-DID of the collection terminal, the scanning time stamp, and its own Tag-DID, and obtain the original trajectory data of the mobile tags; S202, dynamic storage and deduplication processing: according to the time stamps and Tag-DIDs of the scanning records, perform repeatability detection through a time window threshold comparison algorithm. If the adjacent scanning interval of the same collection terminal Tag-DID exceeds 30 seconds, store it as a new record, otherwise discard it, and obtain the deduplicated trajectory data set; S203, data forwarding and collaboration: according to the storage space utilization rate of the mobile tag A, when it exceeds a preset threshold, find a neighboring movable tag B through Bluetooth broadcasting, establish a temporary communication link, and transmit part of the scanning records in packets to the tag B, which is then forwarded by the tag B to the fixed collection terminal, and obtain the distributed collaborative transmission result; S204, platform companion relationship analysis: according to the direct scanning records and collaborative forwarding records from the mobile tags uploaded by the fixed collection terminals, through a spatio-temporal trajectory matching algorithm, identify multiple mobile tags scanned by the same collection terminal in the same time window and geographical location, and generate a companion relationship analysis report.
[0054] It can be seen that for mobile tag active scanning and acquisition: according to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed IoT acquisition terminals to obtain the original trajectory data of the mobile tags; for dynamic storage and deduplication processing: according to the timestamps and Tag-DIDs of the scanning records, obtain the deduplicated trajectory data set; for data forwarding collaboration: according to the storage space utilization rate of the mobile tag A, obtain the distributed collaborative transmission result; for platform companion relationship analysis: according to the direct scanning records and collaborative forwarding records from the mobile tags uploaded by the fixed acquisition terminals, generate a companion relationship analysis report, so as to be able to achieve more accurate and efficient companion relationship analysis and provide new ideas and references for the further development of IoT technology.
[0055] The structure, features and effects of the present invention have been described in detail based on the embodiments shown in the drawings above. The above are only the preferred embodiments of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or equivalent embodiments modified into equivalent changes, should still be within the protection scope of the present invention as long as they do not exceed the spirit covered by the description and the drawings.
Claims
1. A method for realizing adjoint relationship analysis based on tag records, characterized in that, The method includes: Mobile tag active scanning and acquisition: According to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things acquisition terminals, record the scanning records including the acquisition terminal Tag-DID, scanning timestamp, and its own Tag-DID, and obtain the original trajectory data of the mobile tag; Dynamic storage and deduplication processing: According to the timestamp and Tag-DID of the scanning record, perform repeatability detection through the time window threshold comparison algorithm. If the adjacent scanning interval of the same acquisition terminal Tag-DID exceeds 30 seconds, store it as a new record, otherwise discard it, and obtain the deduplicated trajectory data set; Data forwarding and collaboration: According to the storage space utilization rate of the mobile tag A, when it exceeds the preset threshold, search for the adjacent movable tag B through Bluetooth broadcast, establish a temporary communication link and transmit some scanning records in packets to the tag B, and the tag B forwards them to the fixed acquisition terminal to obtain the distributed collaborative transmission result; Platform accompanying relationship analysis: According to the direct scanning records and collaborative forwarding records from the mobile tag uploaded by the fixed acquisition terminal, identify multiple mobile tags scanned by the same acquisition terminal within the same time window and geographical location through the spatio-temporal trajectory matching algorithm, and generate an accompanying relationship analysis report.
2. The method according to claim 1, wherein The mobile tag active scanning and acquisition includes: Scanning trigger: According to the timer of the movable Bluetooth device A, use the central mode to scan the Bluetooth signals broadcast by the surrounding fixed acquisition terminals every 2 seconds to obtain the radio frequency signal strength data; Tag identification: Analyze the Tag-DID and UUID of the fixed acquisition terminal according to the received Bluetooth broadcast packet, and filter out non-target acquisition terminals through the white list to obtain the set of valid acquisition terminal identifiers; Record generation: Generate a timestamp according to the system clock at the scanning moment, generate a structured scanning record and write it into the cache queue.
3. The method according to claim 1, wherein The dynamic storage and deduplication processing includes: Time window calculation: Query the recently stored record with the same Tag-DID according to the Tag-DID of the new scanning record, calculate the difference between the current timestamp and the timestamp of the most recent record to obtain the time interval ΔT; Threshold comparison: According to the preset 30-second time window threshold, discard the current record when ΔT≤30 seconds, and append the current record to the storage queue when ΔT>30 seconds to generate a deduplication flag bit; Storage optimization: Manage the circular storage buffer according to the first-in-first-out principle, and trigger a warning flag bit when the storage space reaches 80% of the capacity.
4. The method according to claim 1, wherein The data forwarding and collaboration includes: Collaboration request broadcast: According to the storage warning flag bit, broadcast a collaboration request message containing its own Tag-DID and the amount of data to be transmitted using the peripheral mode to obtain a list of responses from surrounding devices; Link negotiation: According to the evaluation result of the remaining storage space of the responding device, select the optimal collaborative device B to establish a point-to-point Bluetooth connection and negotiate the packet transmission scheme; Data packet transmission: Split the scanning records to be transmitted into multiple data blocks according to the MTU size, send them to the device B through the reliable transmission mode, and receive the verification confirmation receipt.
5. The method according to claim 1, characterized in that, The platform accompanying relationship analysis includes: Trajectory Alignment: Based on the records reported by multiple mobile tags that contain the same collector Tag-DID, establish the mapping relationship of spatio-temporal trajectory points through the timestamp alignment algorithm; Companion Judgment: According to the preset 30-second time window and 50-meter geographical fence threshold, when two tags meet the spatio-temporal coincidence condition at more than 3 consecutive trajectory points, generate a companion event mark; Visualization Output: Generate a visual analysis report including a timeline, a map trajectory, and a tag association graph based on the companion event mark.
6. The method according to claim 3, wherein The storage optimization also includes: Emergency Disposal: When the storage space reaches 95% of its capacity, automatically delete the earliest 10% of the records and compress the remaining data; Priority Marking: Set a write protection flag for the records containing the Tag-DID of the collector in the high-risk area to prohibit automatic deletion.
7. An accompanying relationship analysis system implemented based on tag records, characterized in that, The system includes: A collection module for active scanning and collection by mobile tags: According to the periodic scanning mechanism of the movable Bluetooth device A, actively scan the Bluetooth tags of the surrounding fixed Internet of Things collectors, record the scanning records containing the collector Tag-DID, the scanning timestamp, and its own Tag-DID, and obtain the original trajectory data of the mobile tags; A processing module for dynamic storage and duplicate removal processing: According to the timestamp and Tag-DID of the scanning record, perform repeatability detection through the time window threshold comparison algorithm. If the adjacent scanning interval of the same collector Tag-DID exceeds 30 seconds, store it as a new record, otherwise discard it, and obtain the trajectory data set after duplicate removal; A collaboration module for data forwarding collaboration: According to the storage space utilization rate of the mobile tag A, when it exceeds the preset threshold, find the adjacent movable tag B through Bluetooth broadcast, establish a temporary communication link and transmit some scanning records in packets to the tag B, and forward them to the fixed collector by the tag B to obtain the distributed collaboration transmission result; An analysis module for platform companion relationship analysis: According to the direct scanning records and collaborative forwarding records from the mobile tags uploaded by the fixed collector, identify multiple mobile tags scanned by the same collector in the same time window and geographical location through the spatio-temporal trajectory matching algorithm, and generate a companion relationship analysis report.
8. The system according to claim 7, characterized in that, The collection module is specifically used for: Scanning Trigger: According to the timer of the movable Bluetooth device A, use the central mode to scan the Bluetooth signals broadcast by the surrounding fixed collectors every 2 seconds to obtain the radio frequency signal strength data; Tag Identification: Analyze the Tag-DID and UUID of the fixed collector from the received Bluetooth broadcast packet, and filter out non-target collectors through the white list to obtain a set of valid collector identifiers; Record Generation: Generate a timestamp based on the system clock at the scanning moment, generate a structured scanning record and write it into the cache queue.
9. A storage medium, characterized in that, A computer program is stored in the storage medium, wherein the computer program is set to execute the method described in any one of claims 1-6 when running.
10. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is set to run the computer program to execute the method described in any one of claims 1-6.
Citation Information
Patent Citations
Data transferring method and system and mobile terminal
CN103634032A
Protecting content-stream portions from modification or removal
CN109417544A
Method and system for discovering close contact person of specific user by using electromagnetic signal
CN112002431A
User track extraction method based on WiFi scanning records
CN112104979A
Trajectory analysis device, trajectory analysis method, and computer program
US20240112355A1