An internet of things cross-physical group data collection method, electronic device and medium
Patent Information
- Application Number
- CN202611179401.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-08-05
AI Technical Summary
[0004]现有技术在完成跨物理组业务数据采集时,存在整体采集效率低下的问题
[0017]本发明提供的物联网跨物理组数据采集方法,由服务器统一完成整个物联网跨物理组数据采集方法的全流程调度工作。具体如下:
Smart Images

Figure CN122698879B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) wireless communication technology, and in particular to an IoT cross-physical group data acquisition method, electronic device, and medium. Background Technology
[0002] In a LoRa TDMA data acquisition system, each gateway manages a physical group, and each physical group includes multiple devices. Each device is uniquely identified by its physical group ID and its device serial number within the group. When using this acquisition system to collect service data, it is typically necessary to span multiple physical groups.
[0003] In existing technologies, when collecting service data across physical groups, the user specifies the physical group where the collection device is located one by one, and the collection system sends collection commands to the corresponding gateway sequentially for each physical group. During the sequential sending of collection commands, it is necessary to wait for all collection devices in the current physical group to respond before sending collection commands to the next physical group. After the collection devices in the current physical group respond, they collect and send the service data to the gateway.
[0004] Existing technologies suffer from low overall collection efficiency when collecting business data across physical groups. Summary of the Invention
[0005] This invention aims to address one of the technical problems in related technologies to a certain extent. To this end, this invention provides an IoT cross-physical group data acquisition method, electronic device, and medium, which have the advantages of improving cross-physical group acquisition efficiency and real-time acquisition performance.
[0006] To achieve the above objectives, as a first aspect of the present invention, an IoT cross-physical group data acquisition method is provided for a server, wherein the IoT cross-physical group data acquisition method includes: The data collection request is parsed to obtain at least one virtual service group information; the virtual service group information is maintained by the server. Query multiple device member sets corresponding to the virtual service group information, and perform union deduplication on the multiple device member sets to determine the target collection device set; Based on the metadata of each target acquisition device in the target acquisition device set, multiple physical group acquisition units are obtained; wherein, the metadata includes the physical group identifier to which the target acquisition device belongs and the device serial number within the group, the physical group identifier of different physical group acquisition units is different, and each physical group acquisition unit includes at least one target acquisition device; A collection mask bitmap corresponding to the serial number of the device within the group is generated for each physical group collection unit, and collection instructions are encapsulated and sent to the corresponding gateway; wherein, the gateway does not parse virtual service group information; Update the corresponding acquisition mask bitmap according to the response status of the target acquisition device forwarded by the gateway. If the updated acquisition mask bitmap meets the preset group switching conditions, determine the physical group acquisition unit corresponding to the next acquisition instruction according to the physical group identifier. Receive the collected data and assign it according to the virtual service group label; when the same target collection device belongs to multiple virtual service group information, assign the collected data obtained in the same collection to the collection results corresponding to the respective virtual service group information.
[0007] Optionally, the bit index in the acquisition mask bitmap corresponds to the device serial number in the corresponding physical group acquisition unit; The step of updating the corresponding acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway, and determining the physical group acquisition unit corresponding to the next acquisition instruction according to the physical group identifier when the updated acquisition mask bitmap meets the preset group switching conditions, includes: Update the bit value of the corresponding bit index in the acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway. In the acquisition mask bitmap, if all the bit values of the bit index corresponding to the serial number of each target acquisition device are in the first acquisition state, or if the bit values of the M consecutive bit indices starting from the highest bit index in the acquisition mask bitmap are in the first acquisition state in the current acquisition round, it is determined that the preset group switching condition is met; where M is greater than 1, and M is determined according to the number of channels and the current maximum serial number of the device to be responded to. The physical group acquisition unit corresponding to the next acquisition command is determined according to the ascending order of the physical group identifiers.
[0008] Optionally, updating the bit value of the corresponding bit index in the acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway includes: If the target acquisition device's response status indicates a successful response, the corresponding bit index value will be switched to the first acquisition status. If the response status of the target acquisition device indicates a failure, the bit value of the corresponding bit index is retained.
[0009] Optionally, the IoT cross-physical group data acquisition method further includes: Before sending the acquisition command to the corresponding gateway, the target acquisition devices within the physical group acquisition unit are screened. Update the acquisition mask bitmap based on the selected target acquisition devices.
[0010] Optionally, before sending the acquisition command to the corresponding gateway, the target acquisition devices within the physical group acquisition unit are screened, including: Obtain the active time from the metadata of the target acquisition device; If the difference between the active time and the current time is less than a preset offline threshold, the target acquisition device is determined to be an online device. If the difference between the active time and the current time is greater than or equal to a preset offline threshold, the target acquisition device is determined to be an offline device. The step of updating the acquisition mask bitmap according to the filtered target acquisition devices includes: In the acquisition mask bitmap, the bit value of the corresponding bit index of the offline device is switched to the first acquisition state; In the acquisition mask bitmap, the bit value of the corresponding bit index of the online device remains unchanged.
[0011] Optionally, generating a data acquisition mask bitmap corresponding to the serial number of the device within each physical group and encapsulating the data acquisition instructions for each physical group data acquisition unit includes: The length of the acquisition mask bitmap is obtained by adding one to the maximum device serial number corresponding to the target acquisition device within the same physical group acquisition unit; wherein, the device serial number corresponds one-to-one with the bit index of the acquisition mask bitmap. The acquisition mask bitmap is initialized using the first acquisition state; Set the bit value of the bit index corresponding to the serial number of the target acquisition device to the second acquisition state; wherein, the first acquisition state is zero and the second acquisition state is one; Assign acquisition configuration information to each physical group acquisition unit, and encapsulate the acquisition configuration information and the corresponding acquisition mask bitmap into a corresponding acquisition instruction; the acquisition configuration information includes at least one of the physical group identifier, time slot duration, number of channels, and channel index list. The acquisition command is sent to the gateway that manages the physical group acquisition unit.
[0012] Optionally, the IoT cross-physical group data acquisition method further includes: Obtain the collected data forwarded by the gateway; Based on the correspondence between the target acquisition device and the virtual service group information, the acquired data is tagged with virtual service groups and saved to the server.
[0013] As a second aspect of the present invention, an IoT cross-physical group data acquisition method is provided for a gateway, wherein the IoT cross-physical group data acquisition method includes: Receive collection instructions sent by the server; The acquisition command is sent to each device within the physical group acquisition unit corresponding to the acquisition command; Receive the corresponding data collected from each target acquisition device; Each of the collected data is sent to the server; wherein, the gateway does not parse the virtual service group information.
[0014] As a third aspect of the present invention, an IoT cross-physical group data acquisition method is provided for a device, wherein the IoT cross-physical group data acquisition method includes: Receive data collection instructions; The acquisition command is parsed to obtain the acquisition mask bitmap; Determine the bit index in the acquisition mask bitmap based on the device serial number; Find the bit value of the bit index; When the bit value is in the second acquisition state, the device starts the acquisition mode and sends the acquired data to the gateway; When the bit value is in the first acquisition state, the device does not participate in this acquisition; wherein, the device does not parse virtual service group information.
[0015] As a fourth aspect of the present invention, an electronic device is provided, comprising: One or more processors; A memory having stored thereon one or more computer programs that, when executed by one or more processors, cause the one or more processors to implement the Internet of Things cross-physical group data acquisition method according to the first, second, and third aspects of the present invention.
[0016] As a fifth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the Internet of Things cross-physical group data acquisition method according to the first, second, and third aspects of the present invention.
[0017] The IoT cross-physical group data acquisition method provided by this invention has its entire process scheduling uniformly completed by a server. Specifically: First, the user-sent data collection request is parsed to obtain virtual service group information. Then, multiple device member sets corresponding to the virtual service group information are queried, and a union-deduplication process is performed on these sets to determine the target data collection device set. Multiple target data collection devices corresponding to this data collection request are then selected. This achieves automated parsing and device matching based on service data collection requirements, solving the problems of existing technologies that require manual specification of target data collection devices one by one and have low automation levels, significantly reducing the cost of manual intervention.
[0018] After identifying multiple target acquisition devices, this application further groups the devices based on their metadata to obtain multiple physical groups. After grouping, different physical groups have different physical group identifiers, and each physical group includes at least one target acquisition device. This step completes physical-level grouping based on the actual IoT topology of the target acquisition devices, solving the problem that traditional virtual service acquisition requirements must be strongly bound to the physical topology, leading to errors in manual grouping. By decoupling virtual service acquisition requirements from the physical topology, the accuracy of subsequent generation of acquisition mask bitmaps and issuance of acquisition commands is ensured.
[0019] After the physical groups are divided, the server generates a corresponding acquisition mask bitmap for each physical group's acquisition unit (i.e., the physical group) and encapsulates the acquisition instructions. The acquisition mask bitmap is used to mark the target acquisition devices within the physical group that need to participate in acquisition, providing data basis for subsequent acquisition scheduling.
[0020] Subsequently, the acquisition command is sent to the corresponding target physical group. During the acquisition process, the acquisition mask bitmap of the group is dynamically updated in real time by receiving the response status of the target acquisition devices forwarded by the gateway. When the updated acquisition mask bitmap meets the preset group switching conditions, the system switches to the next target physical group and the corresponding next acquisition command in an orderly manner according to the physical group identifier. The process of acquiring mask bitmap updates and judging group switching conditions is repeated in the next acquisition process. This method does not require waiting for all devices in the current physical group to complete their responses before triggering group switching. By judging the bitmap status, it automatically skips devices that have successfully responded and offline invalid devices. This solves the core problems of existing technologies, such as the need for the entire group to complete its response before group switching, large redundant waiting latency, and low cross-group acquisition efficiency, and achieves dynamic, efficient, and intelligent acquisition scheduling across physical groups.
[0021] In summary, this application decouples virtual service acquisition requirements from the physical topology by automating the parsing of service acquisition needs, matching target acquisition devices, and automatically grouping target acquisition devices. Through an automated acquisition scheduling process comprised of generating acquisition mask bitmaps and acquisition commands, dynamically updating the acquisition mask bitmaps during acquisition, and determining group switching conditions, it solves the problem of low cross-physical group acquisition efficiency caused by manual configuration and waiting for all devices in a group to respond, as required by traditional technologies. This effectively improves the overall scheduling efficiency and real-time performance of cross-physical group data acquisition in LoRa TDMA acquisition systems, and is particularly suitable for parallel acquisition scenarios involving large-scale, multi-physical-group devices.
[0022] These features and advantages of the present invention will be disclosed in detail in the following specific embodiments and accompanying drawings. The preferred embodiments or means of the present invention will be shown in detail in conjunction with the accompanying drawings, but are not intended to limit the technical solutions of the present invention. In addition, each of these features, elements and components appearing in the following text and drawings is a plurality of, and different symbols or numbers are used for convenience of representation, but all represent parts with the same or similar construction or function. Attached Figure Description
[0023] The present invention will be further described below with reference to the accompanying drawings: Figure 1 A flowchart of an IoT cross-physical group data acquisition method for a server provided by the present invention; Figure 2 A flowchart illustrating one embodiment of step S150 of the IoT cross-physical group data acquisition method provided by the present invention; Figure 3 A flowchart illustrating one embodiment of step S151 of the IoT cross-physical group data acquisition method provided by the present invention; Figure 4 Another flowchart of an IoT cross-physical group data acquisition method provided by the present invention; Figure 5 A flowchart illustrating one embodiment of step S250 of the IoT cross-physical group data acquisition method provided by the present invention; Figure 6 A flowchart illustrating one embodiment of step S260 of the IoT cross-physical group data acquisition method provided by the present invention; Figure 7 A flowchart illustrating one embodiment of step S140 of the IoT cross-physical group data acquisition method provided by the present invention; Figure 8 A flowchart of an IoT cross-physical group data acquisition method for a gateway provided by the present invention; Figure 9 A flowchart of an IoT cross-physical group data acquisition method for devices provided by the present invention; Figure 10 A schematic diagram of the structure of an Internet of Things (IoT) cross-physical group data acquisition system provided by the present invention; Figure 11 This is a schematic diagram of a module of one embodiment of the electronic device provided by the present invention; Figure 12 This is a schematic diagram of the computer-readable storage medium provided by the present invention.
[0024] Explanation of reference numerals in the attached figures 101: Processor; 102: Memory; 103: I / O interface; 104: Bus. Detailed Implementation
[0025] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described are intended to explain the present invention and should not be construed as limiting the invention.
[0026] The terms "an embodiment," "example," or "trademark" used in this specification refer to a particular feature, structure, or characteristic described in connection with the embodiment itself that may be included in at least one embodiment disclosed in this invention. The phrase "in an embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment.
[0027] In existing technologies, networking devices employ two independent grouping systems. One system consists of virtual service groups defined based on service collection needs, while the other consists of physical groups defined based on network topology, with each physical group managed by a corresponding gateway. These two independent grouping systems require regular manual maintenance by staff, resulting in cumbersome operations and high manual management costs.
[0028] More importantly, when performing cross-physical group data acquisition, existing technologies must issue independent acquisition commands to each group and wait for all devices in the current physical group to respond before issuing acquisition commands to the next group. Since each group has to wait for the slowest responding device in the group to complete its response, a large amount of invalid idle time is generated, which is the main reason for the low acquisition efficiency.
[0029] Meanwhile, in actual networking scenarios, devices frequently experience state changes such as power-on, power-off, and malfunctions. Existing technologies cannot detect these state changes, resulting in additional wasted time and further exacerbating the problem of low overall data acquisition efficiency.
[0030] In view of this, in order to solve the problem of low efficiency in cross-physical group data acquisition in the prior art, as a first aspect of the present invention, a cross-physical group data acquisition method for the Internet of Things is provided, for use on a server, such as... Figure 1 As shown, the IoT cross-physical group data acquisition method includes: In step S110, the acquisition request is parsed to obtain at least one virtual service group information; the virtual service group information is maintained by the server. In step S120, multiple device member sets corresponding to the virtual service group information are queried, and the union of all device member sets corresponding to the multiple virtual service group information is performed to remove duplicates, thereby determining the target acquisition device set. In step S130, the target acquisition devices in the target acquisition device set are grouped according to their metadata to obtain multiple physical group acquisition units; wherein, the metadata includes the physical group identifier to which the target acquisition device belongs and the device serial number within the group, the physical group identifier of different physical group acquisition units is different, and each physical group acquisition unit includes at least one target acquisition device; In step S140, a collection mask bitmap corresponding to the serial number of the device within the group is generated for each physical group collection unit, and the collection instruction is encapsulated and sent to the corresponding gateway; wherein, the gateway does not parse the virtual service group information; In step S150, the corresponding acquisition mask bitmap is updated according to the response status of the target acquisition device forwarded by the gateway. If the updated acquisition mask bitmap meets the preset group switching conditions, the physical group acquisition unit corresponding to the next acquisition instruction is determined according to the physical group identifier. In step S160, the collected data is received and assigned according to the virtual service group label; if the same target collection device belongs to multiple virtual service group information, the collected data obtained in the same collection is assigned to the collection results corresponding to the corresponding virtual service group information respectively.
[0031] In addition to storing and maintaining metadata information for each device, the server also stores and maintains information for multiple virtual service groups. This allows for the establishment of a mapping relationship between devices within virtual service groups and physical groups, providing accurate data support for subsequent steps. In one embodiment, the server maintains the following metadata storage structure, field definitions, data types, and business meanings for each device: Device metadata = { EUID: string, / / Globally unique identifier for the device G:int, / / The physical network group ID (physical group identifier) to which the device belongs. S:int, / / The device's intra-group serial number within the corresponding physical group F_start:float, / / Device LoRa communication start frequency F_step:float, / / LoRa channel frequency step interval vGroups:string[], / / A list of virtual service group labels bound to the device, example: ["Irrigation Zone A", "High Priority"] status: enum, / / Device online status enumeration, distinguishing between online and offline lastActive:timestamp, / / Timestamp of the latest data reported by the device collisionHistory:float / / Device historical communication collision probability } In the aforementioned metadata, the vGroups field records a list of tags for the virtual group to which the current device belongs, facilitating reverse retrieval of the virtual service group to which the device belongs. A single device can belong to multiple virtual groups.
[0032] Virtual service group information (referred to as virtual group) is a set of device tags maintained by the server. Essentially, it is a set of device EUIDs with named identifiers. The virtual group structure is defined as follows: Virtual group = { name: string, / / Group name (e.g., "Irrigation District A") members:EUID[], / / A list of unique identifiers for all member devices under this virtual machine. priority: enum, / / Data collection priority, divided into three levels: high, normal, and low. createTime:timestamp / / Virtual group creation timestamp } As can be seen from the above virtual group structure, a device can belong to multiple virtual groups, and there is a many-to-many mapping relationship between devices and virtual groups. Since the virtual groups are maintained by the server, adding, deleting, or modifying virtual groups according to business needs will not affect the device firmware. Neither the device nor the gateway needs to be aware of the virtual group information, thus reducing the operating burden of the device.
[0033] The following describes the implementation process of automatically parsing business data collection requirements and matching target collection devices in steps S110 and S120, using a specific scenario: A user sends a data collection request for "Irrigation Zone A". After the server executes step S110 to parse the request, it obtains the virtual business group information with the group name "Irrigation Zone A". In step S120, using this group name as the search index, it queries and retrieves the virtual group structure with the pre-stored name "Irrigation Zone A" on the server, and reads the internal "members" field to obtain a list of all device EUIDs (Unique Device Identifiers) corresponding to the "Irrigation Zone A" virtual group, i.e., the device member set. Each EUID in the EUID list is matched with the EUID of each device's metadata stored on the server. If a match is found, the device with the matching EUID is determined to be the target collection device for this data collection. It should be noted that the above steps do not consider deduplication. Deduplication will be explained in detail later.
[0034] In addition, to avoid mismatch issues caused by data inconsistency between the two storage structures, a two-way verification logic can be added in step S120. For example, the vGroups virtual group label list in the device metadata can be read synchronously to check whether the virtual service group name corresponding to this collection exists in the group list of the device. This two-way verification can prevent data inconsistency from matching the wrong target collection device.
[0035] It should be noted that performing a two-way verification step or directly traversing the virtual group list of each device's metadata to complete the matching results in more retrieval loops, higher data reading overhead, and lower overall execution efficiency compared to the approach proposed in this application, which first retrieves virtual groups, determines all device identifiers under that group, and then matches metadata to determine the target acquisition device.
[0036] As defined in the metadata above, each device's metadata also stores the physical network group ID (i.e., field G) and the device's intra-group sequence number (i.e., S) within the group. After multiple target acquisition devices are identified according to step S120, step S130 is executed: The G and S corresponding to each device are read. Target acquisition devices with the same G correspond to one physical network group; different Gs are independent physical groups. Each group G contains at least one target acquisition device. Simultaneously, within the same G, the S values of all devices in that group are read, and the devices within the group are sorted in ascending order based on the value of S, providing an ordered index for generating the acquisition mask bitmap in subsequent step S140.
[0037] The bit index of the acquisition mask bitmap corresponds to the device serial number within the corresponding physical group. In the description of the scheduling method for generating cross-group acquisition plans and issuing acquisition commands in this application, the acquisition command format defined in Table 1 is given in advance.
[0038] Table 1
[0039] As one implementation of step S150, such as Figure 2 As shown, the step of updating the corresponding acquisition mask bitmap according to the response status of the target acquisition device in the target physical group forwarded by the gateway, and determining the physical group acquisition unit corresponding to the next acquisition command according to the physical group identifier when the updated acquisition mask bitmap meets the preset group switching conditions, includes: In step S151, the bit value of the corresponding bit index in the acquisition mask bitmap is updated according to the response status of the target acquisition device forwarded by the gateway. In step S152, if all the bit values of the bit indices corresponding to the serial numbers of each target acquisition device in the acquisition mask bitmap are in the first acquisition state, or if the bit values of the M consecutive bit indices starting from the highest bit index in the acquisition mask bitmap are in the first acquisition state in the current acquisition round, it is determined that the preset group switching condition is met; where M is greater than 1, and M is determined according to the number of channels and the current maximum serial number of the device to be responded to. In step S153, the physical group acquisition unit corresponding to the next acquisition command is determined according to the ascending order of the physical group identifiers.
[0040] To ensure accuracy and efficiency in the data acquisition process, and to accommodate potential anomalies such as momentary malfunctions or power outages during data acquisition, this application also dynamically updates the acquisition mask bitmap in real time based on the device status. A specific implementation method for updating the bit values of the acquisition mask bitmap in step S151 is provided. As an optional implementation method for step S151, such as... Figure 3 As shown, updating the bit value of the corresponding bit index in the acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway includes: In step S151a, if the response status of the target acquisition device indicates a successful response, the bit value of the corresponding bit index is switched to the first acquisition status. In step S151b, if the response status of the target acquisition device indicates a response failure, the bit value of the corresponding bit index is retained.
[0041] Specifically, during the data acquisition process, in the Mask bitmap, 1 represents a target acquisition device that needs to participate in the current acquisition, and 0 represents a target acquisition device that does not need to participate in the current acquisition or has already completed valid acquisition. Taking the first acquisition state as 0 and the second acquisition state as 1 as an example: Each time the gateway receives a successful response from a device, it immediately reports it to the server. Since the bit index of the Mask corresponds to the device serial number within the corresponding physical group, the server clears the bit value corresponding to the responding device in the Mask of that physical group to 0 according to the response state; for devices that fail to respond, the corresponding bit value in the Mask is not changed. Simultaneously, the server can check whether the bit values corresponding to all target acquisition devices to be acquired in the acquisition mask bitmap are all 0; if so, it means that all target acquisition devices in the current physical group acquisition unit have completed valid acquisition. The server can also check whether the first M high-order bits of the Mask are all 0. If all are 0, it means that all target acquisition devices in the high-order bit range have responded, triggering early termination and immediately switching to the next physical group acquisition unit. It should be noted that the conditions of all target acquisition bits being 0 and the first M highest bits of the Mask being 0 are also the preset group switching conditions of this application. Specifically, M is the preset high-order byte judgment width (which can be dynamically adjusted based on N_channels and the current maximum pending device sequence number). If all high-order bytes are 0, it means that the remaining devices to be collected are all located in the low-order byte sequence number range (devices with smaller sequence numbers). The batch valid collection task of the current physical group has been completed, and the group can be switched in advance to improve the overall scheduling efficiency.
[0042] It should also be noted that after completing the data collection for this group, the device status information for this group will be updated in the corresponding metadata. This will be summarized into a list of responding devices, with the reason for each device noted. Devices that do not respond after a timeout are marked as "suspected offline"; devices that fail to respond after a collision retry are marked as "weak signal"; and for devices that have completed data collection normally, the last active time (lastActive) will be updated to the current time.
[0043] To further reduce invalid acquisition time slots and improve overall acquisition and scheduling efficiency before executing the acquisition scheduling process for each physical group, target acquisition devices within the target physical group will undergo pre-screening before acquisition. For example... Figure 4 As shown, as another preferred embodiment of the IoT cross-physical group data acquisition method, the IoT cross-physical group data acquisition method further includes: In step S210, the collection request is parsed to obtain virtual service group information; In step S220, multiple device member sets corresponding to the virtual service group information are queried, and the multiple device member sets are subjected to union deduplication processing to determine the target acquisition device set; In step S230, the target acquisition devices in the target acquisition device set are grouped according to their metadata to obtain multiple physical group acquisition units; In step S240, a data acquisition mask bitmap corresponding to the serial number of the device in the group is generated for each physical group acquisition unit and the acquisition command is encapsulated. In step S250, before sending the acquisition command to the corresponding gateway, the target acquisition devices within the physical group acquisition unit are screened. In step S260, the acquisition mask bitmap is updated according to the selected target acquisition devices; In step S270, a corresponding collection instruction is sent to the gateway that manages the target physical group. The corresponding collection mask bitmap is updated according to the response status of the target collection device forwarded by the gateway. If the updated collection mask bitmap meets the preset group switching conditions, the physical group collection unit corresponding to the next collection instruction is determined according to the physical group identifier. The gateway does not parse virtual service group information. In step S280, the collected data is received and assigned according to the virtual service group label.
[0044] In the scheme without adding pre-screening processing, the acquisition mask bitmap generated in step S240 will mark all target devices matched by the service as to be acquired, which may include devices that have been powered off for a long time, have lost signal, or are offline due to faults. After the gateway receives the acquisition command, it will still allocate wireless time slots and send downlink acquisition messages to these offline devices. Subsequent waiting for timeouts and multiple retransmissions and retries will consume a large amount of channel time slots and server scheduling resources. The offline devices will never be able to report data, and this part of the time slot overhead is a completely ineffective loss, which greatly increases the total acquisition time of a target physical group and reduces the overall progress of cross-group rotation acquisition.
[0045] Therefore, in order to reduce the occupation of invalid wireless channel time slots, narrow the effective acquisition range of the acquisition mask bitmap, and reduce the interactive computational overhead between the server and the gateway, as an optional implementation of the specific pre-screening processing step S250, such as... Figure 5 As shown, before sending the acquisition command to the corresponding gateway, the process of filtering the target acquisition devices within the physical group acquisition unit includes: In step S251, the active time in the metadata of the target acquisition device is obtained; In step S252, if the difference between the active time and the current time is less than a preset offline threshold, the target acquisition device is determined to be an online device. In step S253, if the difference between the active time and the current time is greater than or equal to a preset offline threshold, the target acquisition device is determined to be an offline device.
[0046] As an optional implementation of step S260, such as Figure 6 As shown, updating the acquisition mask bitmap according to the filtered target acquisition devices includes: In step S261, in the acquisition mask bitmap, the bit value of the corresponding bit index of the offline device is switched to the first acquisition state; In step S262, the bit value of the corresponding bit index of the online device is kept unchanged in the acquisition mask bitmap.
[0047] Specifically, before issuing the collection command, the server reads the last active time (lastActive) stored in the target collection device's metadata, calculates the difference between the current system time and lastActive, and compares this difference with a preset offline threshold, such as 10 minutes. If the time difference is greater than or equal to the preset offline threshold (exemplarily set to 10 minutes), it indicates that the device has not reported any messages for a long time, and is determined to be a long-term offline device. It is removed from the collection plan, the corresponding Mask bit is cleared to 0, and the target device does not need to participate in this collection. If the time difference is less than the preset offline threshold, it indicates that the device has recently had data interaction, and is determined to be an online and valid collection device.
[0048] Before the acquisition command is issued, the acquisition mask bitmap is pre-screened. Only online target acquisition devices are marked as pending acquisition in the Mask bitmap. Offline devices are cleared and shielded in advance and do not participate in acquisition, reducing invalid transmission and waiting time, further avoiding invalid acquisition processes and improving overall acquisition efficiency.
[0049] Traditional methods, while employing acquisition mask bitmaps to aid acquisition scheduling, are essentially static. These bitmaps only mark which target acquisition devices in the group are selected during task initialization, without pre-screening or updating based on response status during acquisition. Furthermore, they do not correlate data changes within the bitmap with automatic group switching conditions. To visually differentiate the scheduling performance of traditional static masks with the dynamic acquisition mask bitmaps described in this application, Table 2 below compares the execution effects under different business scenarios. Table 2 compares the scheduling effects of static and dynamic acquisition mask bitmaps in different scenarios.
[0050] Table 2
[0051] As an example, the following provides an embodiment of the automatic generation of cross-physical group acquisition plans.
[0052] When a user initiates a data collection request for the virtual group "Irrigation Area A", the server automatically performs the following steps: Step 1: Query the virtual group members, members = query_vgroup("irrigation area A"), and find a total of 23 devices.
[0053] Step 2: Group the devices by physical group G. After matching and grouping the devices with the metadata stored internally on the server, the 23 devices are divided into 3 groups: plan[0] = {G=0, devices=[A,B,C,...10 in total]}, Physical group 0 has a total of 10 target acquisition devices, namely device A, device B, device C, etc.; plan[5] = {G=5, devices=[D,E,F,... a total of 8 units]}, the physical group 5 has a total of 8 target acquisition devices, namely D, E, F, etc.; plan[8] = {G=8, devices=[G,H,I,... a total of 5 units]}, the physical group 8 has a total of 5 target acquisition devices, namely G, H, I, etc.
[0054] Step 3: Pre-screening (removing offline devices).
[0055] For each plan[G], check the lastActive time of each device; If the time difference between the current time and lastActive is greater than or equal to the preset offline threshold (e.g., 10 minutes), the device is marked as offline and removed from the participation list of that physical group.
[0056] Step 4: Generate a Mask bitmap for each physics group, as follows: plan[0].Mask = Generates a 16-byte bitmap (corresponding to position 1) for the 10 devices in group G=0; plan[5].Mask = Generates a 16-byte bitmap (corresponding to position 1) for the 8 devices in group G=5; plan[8].Mask = Generates a 16-byte bitmap (corresponding to position 1) for the 5 devices in group G=8.
[0057] Step 5: Calculate a list of channel indexes for each physical group.
[0058] Based on historical channel quality data, available channels are selected for each physical group, as follows: plan[0].Channel_List = [0, 3, 6, 9]; plan[5].Channel_List = [1, 4, 7, 10]; plan[8].Channel_List = [0, 2, 5, 7].
[0059] Step 6: Execute the data collection plan in order of physical group ID, and send data collection instructions to each gateway in ascending order of G.
[0060] The execution sequence of the data acquisition plan corresponding to the above embodiments is as follows: t=0ms: Send CMD{G=0, Mask=..., Δt=300ms, N_channels=4, Channel_List=[0,3,6,9]} to G=0; t≈900ms: Data collection completed at G=0 (10 devices respond), data sent to G=5; t≈1500ms: G=5 completes data collection (8 devices respond), and sends data to G=8; t≈1800ms: G=8 data acquisition completed (5 devices responded), all data acquisition completed.
[0061] Table 3 below compares the execution time and operational differences between the traditional manual data collection scheme and the automatic scheduling scheme of this invention under the same data collection scale.
[0062] Table 3
[0063] As can be seen from Table 3 above, the traditional solution not only requires multiple manual operations and a fixed waiting time for each group to complete; the present invention achieves one-click fully automatic cross-physical group collection, and with the help of pre-screening and dynamic masking group switching mechanism, the overall collection time is greatly reduced, and the collection time is significantly reduced in this example scenario.
[0064] Considering that in real-world scenarios, when a user simultaneously collects data from multiple virtual packets, the same device may belong to multiple packets. If the collection process is executed separately for each virtual service packet, collection commands will be repeatedly issued, occupying redundant wireless time slots and significantly reducing overall collection scheduling efficiency. To address the resource waste caused by repeated device collection, a union deduplication process is performed according to step S120. Especially for the case of simultaneously collecting data from multiple virtual packets, a specific implementation method for deduplication is the set union algorithm. The set union algorithm is described in detail below with reference to an embodiment.
[0065] Step 1: Obtain the member set of each virtual group. For example, call the group query function vgroup_members("Irrigation Area A") to obtain the member set S_1={A, B, C} of Irrigation Area A, which contains three target acquisition devices; call the group query function vgroup_members("Special Monitoring") to obtain the member set S_2={B, C, D, E} of the Special Monitoring Group, which contains four target acquisition devices.
[0066] Step 2: Calculate the union of all virtual grouped devices to achieve automatic deduplication.
[0067] Calculate S_union = S_1 ∪ S_2, and after merging, obtain a unique set S_union={A,B,C,D,E}. Overlapping devices B and C retain only one record.
[0068] Step 3: Generate a data acquisition plan for the union set. Following steps S130 to S160, generate a data acquisition plan for the deduplicated target data acquisition device to complete the data acquisition.
[0069] Step 4: Attach source group labels to the collected device data to distinguish the virtual service group to which the data belongs. For example, data from target acquisition device A is labeled "from irrigation area A", data from target acquisition device B is labeled "from irrigation area A + special monitoring", and data from target acquisition device D is labeled "from special monitoring".
[0070] After the above deduplication logic processing, overlapping devices B and C only perform a single acquisition. The acquired data can be used by two virtual packet services at the same time, reducing or avoiding the problems of repeatedly issuing instructions and repeatedly occupying channel time slots.
[0071] In practical applications, the set union deduplication algorithm supports joint data collection from any number of virtual groups. The unified union formula is: S_union = vgroup_1 ∪ vgroup_2 ∪ ... ∪ vgroup_N; all overlapping devices are collected in only one round, and the final collected data is assigned to the corresponding business reports of each virtual group based on the group labels. Furthermore, the server merges the collection results of all physical groups, combines them with the virtual group source labels carried by the devices, and generates a unified report. Users do not need to switch between multiple reports to obtain complete business-perspective data. An example data structure for the unified report is as follows: Unified Report = { / / Virtual group summary summary: { targetCount: 23, / / Total number of target devices receivedCount: 21, / / Number of received records offlineCount: 1, / / Number of offline users failedCount: 1, / / Number of failures successRate: 91.3% / / Success Rate }, / / Detailed breakdown by physical component byGroup: { "G=0": {target:10, received:10, ...}, "G=5": {target:8, received:7, offline:1, ...}, "G=8": {target:5, received:5, ...} }, / / Assigned by virtual group byVGroup: { "Irrigation Area A": {target:23, received:21, ...}, "Special Monitoring": {target:4, received:4, ...} }, / / List of unresponsive devices missing: [ {EUID: "xxx", G:5, S:3, reason: "Offline"}, {EUID: "yyy", G:5, S:7, reason: "Collision failed"} ] }
[0072] As an optional implementation of step S140, such as Figure 7 As shown, the step of generating a data acquisition mask bitmap corresponding to the serial number of the device within each physical group and encapsulating the data acquisition instructions includes: In step S141, the length of the acquisition mask bitmap is obtained by incrementing the maximum device serial number corresponding to the target acquisition device within the same physical group acquisition unit by one; wherein, the device serial number corresponds one-to-one with the bit index of the acquisition mask bitmap. In step S142, the acquisition mask bitmap is initialized using the first acquisition state; In step S143, the bit value of the bit index corresponding to the target acquisition device serial number is set to the second acquisition state; wherein, the first acquisition state is zero and the second acquisition state is one; In step S144, acquisition configuration information is assigned to each physical group, and the acquisition configuration information and the corresponding acquisition mask bitmap are encapsulated into a corresponding acquisition instruction; the acquisition configuration information includes at least one of the physical group identifier, time slot duration, number of channels, and channel index list. In step S145, the acquisition command is sent to the gateway that manages the target physical group.
[0073] For details on the fields, byte lengths, and definitions of the collection configuration information in the collection command, please refer to Table 1 above. Subsequently, the collection configuration information and the collection mask bitmap are encapsulated together to generate a complete collection command and send it to the corresponding gateway.
[0074] After the gateway forwards the collected data from each device to the server, the server performs virtual service group tracing processing on the reported data. The corresponding post-collection processing steps are as follows: First, the server receives all the collected data forwarded by the gateway. Then, based on the correspondence between the target collection device and the virtual service group information, the server tags the collected data with the corresponding virtual service group information, attaching a corresponding virtual service group information tag to each piece of collected data. If the same target collection device belongs to multiple virtual service groups, the collected data obtained in the same collection is assigned to the collection results corresponding to each of the multiple virtual service groups, and these collection results are saved to the server.
[0075] As a second aspect of the present invention, an IoT cross-physical group data acquisition method is provided for a gateway, such as... Figure 8 As shown, the IoT cross-physical group data acquisition method includes: In step S310, a data acquisition command sent by the server is received; In step S320, the acquisition command is sent to each device in the physical group corresponding to the acquisition command; In step S330, the corresponding acquisition data sent by each target acquisition device is received; In step S340, each of the collected data is sent to the server; wherein, the gateway does not parse the virtual service group information.
[0076] As a third aspect of the present invention, an Internet of Things (IoT) cross-physical group data acquisition method is provided for devices, such as... Figure 9 As shown, the IoT cross-physical group data acquisition method includes: In step S410, a data acquisition command is received; In step S420, the acquisition command is parsed to obtain an acquisition mask bitmap; In step S430, the bit index in the acquisition mask bitmap is determined based on the device serial number; In step S440, the bit value of the bit index is found; In step S450, when the bit value is in the second acquisition state, the device starts the acquisition mode and sends the acquired data to the gateway. In step S460, when the bit value is in the first acquisition state, the device does not participate in this acquisition; wherein, the device does not parse the virtual service group information.
[0077] It should be noted that the gateway and the device are unaware of virtual packets; the device only maintains physical coordinates (G, S), and the gateway only performs forwarding tasks. The entire complex scheduling process is handled by the server. For each device, the device parameters shown in Table 4 are permanently set at the time of manufacture or network access.
[0078] Table 4
[0079] The device can pre-build a local available channel table based on F_start and F_step: F[i] = F_start + i × F_step.
[0080] The following are several embodiments of an IoT cross-physical group data acquisition method according to this application.
[0081] Example 1: Single virtual group cross-physical group acquisition.
[0082] Scenario: A user initiates a data collection for "Irrigation Zone A". Irrigation Zone A = 10 devices with G=0 + 8 devices with G=5 + 5 devices with G=8 = 23 devices; After pre-screening: S=3 and S=7 with G=5 are offline (no response for >10 minutes) and are removed; The final number of valid devices is 21.
[0083] Execution: Generate a Mask with G=0 (10 bits = 1), and issue a data collection command; all 10 devices respond, the high bits of the Mask are cleared to 0, and the process ends early, taking approximately 900ms; Generate a Mask with G=5 (6 bits = 1, 2 devices have been removed from offline status), and issue it; 6 devices respond, taking approximately 600ms; Generate a Mask with G=8 (5 bits = 1), and issue it; 5 devices respond, taking approximately 300ms; merge the results and generate a unified report.
[0084] Results: The total time was approximately 1.8 seconds, and all valid devices successfully returned the collected data (21 out of 21 valid devices). The traditional solution takes approximately 43 seconds.
[0085] Example 2: Deduplication through joint collection of multiple virtual groups.
[0086] Scenario: The user simultaneously collects data from "Irrigation Zone A" and "Temperature Control Zone B". Irrigation Zone A = {A, B, C, D, E} (spanning G=0 and G=5); Temperature Control Zone B = {B, C, F, G, H} (spanning G=0 and G=8); Union = {A, B, C, D, E, F, G, H} (8 devices); B and C are deduplicated and collected only once.
[0087] Execution: Calculate the union S_union = {A,B,C,D,E,F,G,H}; Decompose by physical group: G=0 contains {A,B,C}, G=5 contains {D,E}, G=8 contains {F,G,H}; Collect the three physical groups in sequence; Label the results: Data from B and C are simultaneously included in the "Irrigation Zone A" and "Temperature Control Zone B" reports.
[0088] Results: Originally, two separate data collection sessions were required (2×8=16 sessions), but after deduplication, only 8 sessions were required, reducing the number of data collection sessions by 50%.
[0089] Example 3: Dynamic Mask and Early Termination Collaboration.
[0090] Scenario: G=0 groups of 50 devices, N_channels=4.
[0091] Pre-screening before data collection: Three devices were detected whose current time and lastActive time difference exceeded a preset offline threshold and were excluded when generating a mask. Only 47 bits of a valid mask are equal to 1.
[0092] During data collection: The first 30 devices all respond within approximately 2.4 seconds; among devices 31-40, the 5 critical devices all respond within 3 seconds; the server determines the set of critical devices based on the priority information of the target data collection devices, and maintains the set of responding devices based on the response status forwarded by the gateway; when all target data collection devices in the set of critical devices belong to the set of responding devices, the server records non-critical devices that have not yet successfully responded as skipped devices, determines that the preset group switching conditions are met, and switches to the next physical group. Therefore, when critical business data has already been collected, the invalid time slots occupied by waiting for non-critical devices can be reduced.
[0093] Results: In this example, pre-screening reduced the invalid waiting time slots corresponding to 3 offline devices; the grouping judgment based on the set of critical devices reduced the continued waiting time slots corresponding to 7 non-critical devices, resulting in a total reduction of 10 / 50 = 20% in time slot occupancy.
[0094] Based on several embodiments of this application, Tables 5 and 6 below (taking 23 devices across 3 groups as an example) provide a comparison table of the technical effects and a comparison table of the quantitative effects between this application and traditional methods.
[0095] Table 5
[0096] Table 6
[0097] An IoT cross-physical group data acquisition system applicable to the IoT cross-physical group data acquisition method provided by the present invention is as follows: Figure 10 As shown, the entire system has a four-layer structure: the user / service layer, the server-side virtual packet abstraction layer, the gateway layer, and the device layer.
[0098] The user / business layer serves as the entry point for upper-layer business interactions and supports various data collection requests, such as "collect data for irrigation zone A," "collect data for all alarm sensors," and "collect data for irrigation canal A and temperature control zone B." It should be noted that the data collection requests listed above are only a few examples and do not represent the only supported requests.
[0099] The server executes the entire set of IoT cross-physical group data acquisition methods for computation and scheduling, comprising six core modules: storage device metadata, virtual group management, joint acquisition deduplication, acquisition plan generation, dynamic mask update, and result merging. Device metadata is shown in Table 1. Virtual group management maintains the binding relationship between business tags and devices, distinguishing between business virtual groups and underlying physical groups; joint acquisition deduplication is used to remove duplicate devices before acquisition when multiple virtual groups are jointly acquired, avoiding duplicate acquisition; acquisition plan generation is used to split target acquisition devices according to physical group IDs, dividing them into independent acquisition units; dynamic mask update is used to generate acquisition mask bitmaps, pre-screen acquisition mask bitmaps, and update acquisition mask bitmaps in real time during acquisition, and to pre-switch groups based on the acquisition mask bitmap status; result merging is used to summarize all physical group data returned, attach virtual business group tags, and obtain a unique multi-dimensional unified acquisition report.
[0100] The gateway layer does not need to perform any virtual packet processing logic; it only forwards packets and is essentially a transparent forwarding layer. It only forwards acquisition commands and receives uplink data, and is unaware of the concept of virtual packets.
[0101] The device layer only maintains the physical coordinates of the device (physical group identifier G, device's internal sequence number S within the corresponding physical group) and fixed parameters (F_start, F_step), and is unaware of virtual grouping; it only relies on the corresponding bit values of the Mask bitmap in the acquisition command to determine whether it participates in this acquisition, generates a local communication channel table based on the fixed parameters of the frequency point, and completes data reporting.
[0102] The IoT cross-physical group data acquisition method of the present invention is a selective acquisition method. It achieves selective acquisition at the service level through virtual service group information, retrieving only devices corresponding to user-specified groups. Union deduplication reduces the computational overhead of repeatedly selecting the same target acquisition device when multiple virtual service group information is available. Furthermore, the acquisition mask bitmap helps selectively determine the target acquisition devices to participate in acquisition within a single physical group, and offline devices are automatically blocked through pre-screening. For cross-physical group acquisition, the physical group covered by the service issues the acquisition command, and the system switches to other physical groups by determining whether the group switching conditions are met.
[0103] As a fourth aspect of the present invention, an electronic device is provided, wherein, as Figure 11 As shown, the electronic device includes: One or more processors 101; The memory 102 stores one or more computer programs that, when executed by the one or more processors 101, cause the one or more processors 101 to implement the Internet of Things cross-physical group data acquisition method according to the first, second, and third aspects of the present invention.
[0104] The electronic device may also include one or more I / O interfaces 103 connected between the processor 101 and the memory 102, configured to enable information interaction between the processor 101 and the memory 102.
[0105] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the processor and the memory, including but not limited to a data bus (Bus).
[0106] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the electronic device.
[0107] As a fifth aspect of the present invention, such as Figure 12 As shown, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the Internet of Things cross-physical group data acquisition method according to the first, second, and third aspects of the present invention.
[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. Accordingly, the computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can implement the methods of any of the above embodiments. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0109] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes, but is not limited to, the contents described in the accompanying drawings and the specific embodiments above. Any modifications that do not depart from the functional and structural principles of the present invention will be included within the scope of the claims.
Claims
1. A method for cross-physical group data acquisition in the Internet of Things (IoT), used on a server, characterized in that, The IoT cross-physical group data acquisition method includes: The data collection request is parsed to obtain at least one virtual service group information; the virtual service group information is maintained by the server. Query multiple device member sets corresponding to the virtual service group information, and perform union deduplication on the multiple device member sets to determine the target collection device set; Based on the metadata of each target acquisition device in the target acquisition device set, multiple physical group acquisition units are obtained; wherein, the metadata includes the physical group identifier to which the target acquisition device belongs and the device serial number within the group, the physical group identifier of different physical group acquisition units is different, and each physical group acquisition unit includes at least one target acquisition device; A collection mask bitmap corresponding to the serial number of the device within the group is generated for each physical group collection unit, and collection instructions are encapsulated and sent to the corresponding gateway; wherein, the gateway does not parse virtual service group information; Update the corresponding acquisition mask bitmap according to the response status of the target acquisition device forwarded by the gateway. If the updated acquisition mask bitmap meets the preset group switching conditions, determine the physical group acquisition unit corresponding to the next acquisition instruction according to the physical group identifier. Receive the collected data and assign it according to the virtual service group label; when the same target collection device belongs to multiple virtual service group information, assign the collected data obtained in the same collection to the collection results corresponding to the respective virtual service group information.
2. The IoT cross-physical group data acquisition method according to claim 1, characterized in that, The bit indexes in the acquisition mask bitmap correspond to the device serial numbers within the corresponding physical group acquisition units; The step of updating the corresponding acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway, and determining the physical group acquisition unit corresponding to the next acquisition instruction according to the physical group identifier when the updated acquisition mask bitmap meets the preset group switching conditions, includes: Update the bit value of the corresponding bit index in the acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway. In the acquisition mask bitmap, if all the bit values of the bit index corresponding to the serial number of each target acquisition device are in the first acquisition state, or if the bit values of the M consecutive bit indices starting from the highest bit index in the acquisition mask bitmap are in the first acquisition state in the current acquisition round, it is determined that the preset group switching condition is met; where M is greater than 1, and M is determined according to the number of channels and the current maximum serial number of the device to be responded to. The physical group acquisition unit corresponding to the next acquisition command is determined according to the ascending order of the physical group identifiers.
3. The IoT cross-physical group data acquisition method according to claim 2, characterized in that, The step of updating the bit value of the corresponding bit index in the acquisition mask bitmap based on the response status of the target acquisition device forwarded by the gateway includes: If the target acquisition device's response status indicates a successful response, the corresponding bit index value will be switched to the first acquisition status. If the response status of the target acquisition device indicates a failure, the bit value of the corresponding bit index is retained.
4. The IoT cross-physical group data acquisition method according to claim 1, characterized in that, The IoT cross-physical group data acquisition method also includes: Before sending the acquisition command to the corresponding gateway, the target acquisition devices within the physical group acquisition unit are screened. Update the acquisition mask bitmap based on the selected target acquisition devices.
5. The IoT cross-physical group data acquisition method according to claim 4, characterized in that, Before sending the acquisition command to the corresponding gateway, the process of filtering the target acquisition devices within the physical group acquisition unit includes: Obtain the active time from the metadata of the target acquisition device; If the difference between the active time and the current time is less than a preset offline threshold, the target acquisition device is determined to be an online device. If the difference between the active time and the current time is greater than or equal to a preset offline threshold, the target acquisition device is determined to be an offline device. The step of updating the acquisition mask bitmap according to the filtered target acquisition devices includes: In the acquisition mask bitmap, the bit value of the corresponding bit index of the offline device is switched to the first acquisition state; In the acquisition mask bitmap, the bit value of the corresponding bit index of the online device remains unchanged.
6. The IoT cross-physical group data acquisition method according to any one of claims 1 to 5, characterized in that, The process of generating a data acquisition mask bitmap corresponding to the serial number of the device within each physical group and encapsulating the data acquisition instructions includes: The length of the acquisition mask bitmap is obtained by adding one to the maximum device serial number corresponding to the target acquisition device within the same physical group acquisition unit; wherein, the device serial number corresponds one-to-one with the bit index of the acquisition mask bitmap. The acquisition mask bitmap is initialized using the first acquisition state; Set the bit value of the bit index corresponding to the serial number of the target acquisition device to the second acquisition state; wherein, the first acquisition state is zero and the second acquisition state is one; Assign acquisition configuration information to each physical group acquisition unit, and encapsulate the acquisition configuration information and the corresponding acquisition mask bitmap into a corresponding acquisition instruction; the acquisition configuration information includes at least one of the physical group identifier, time slot duration, number of channels, and channel index list. The acquisition command is sent to the gateway that manages the physical group acquisition unit.
7. The IoT cross-physical group data acquisition method according to any one of claims 1 to 5, characterized in that, The IoT cross-physical group data acquisition method further includes: Obtain the collected data forwarded by the gateway; Based on the correspondence between the target acquisition device and the virtual service group information, the acquired data is tagged with virtual service groups and saved to the server.
8. An electronic device, characterized in that, include: One or more processors; A memory having stored one or more computer programs thereon, which, when executed by the one or more processors, cause the one or more processors to implement the Internet of Things cross-physical group data acquisition method according to any one of claims 1 to 7.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the IoT cross-physical group data acquisition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data acquisition method and system for intelligent meter reading equipment
CN116567452A
STA time-sharing reporting method and system based on central beacon bitmap
CN121509458A
