A collector-based networking communication method, device, equipment and medium
Patent Information
- Application Number
- CN202611251988.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]本发明实施例提供一种基于采集器的组网通信方法、装置、设备及介质,以解决现有蓝牙组网方案中因物理层与应用层信息割裂导致的设备归属冲突及通信不稳定的问题
[0011]上述基于采集器的组网通信方法、装置、计算机设备及存储介质的技术方案中,采集器包括主控单元和主蓝牙单元,组网通信方法适用于主控单元,包括步骤:接收主蓝牙单元发送的参数请求帧,参数请求帧用于请求主控单元返回采集器的主机地址;向主蓝牙单元返回针对参数请求帧的参数应答帧,参数应答帧携带有主机地址;向主蓝牙单元发送组网模式开启指令,组网模式开启指令用于指示主蓝牙单元进行电表从节点扫描,获取节点扫描结果;接收主蓝牙单元针对组网模式开启指令返回的节点扫描结果,并根据节点扫描结果和预设入网策略,确定目标电表从节点并控制目标电表从节点入网,节点扫描结果包括当前电表从节点的唯一标识和信号强度;向主蓝牙单元发送业务通信指令,以建立主蓝牙单元与目标电表从节点之间的数据传输通道。该方法通过将入网决策权集中于主控单元,有效降低了主蓝牙单元的运算负担与功耗,提升了组网效率及通信稳定性。
Smart Images

Figure CN122802888A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a network communication method, apparatus, device and medium based on a data collector. Background Technology
[0002] With the deepening of smart grid construction, power data acquisition systems have placed higher demands on the stability and real-time performance of communication.
[0003] In the local communication network of a smart grid, communication between data collectors and electricity meters typically employs Bluetooth Low Energy (BLE) technology. However, existing Bluetooth networking solutions rely heavily on the autonomous control of the Bluetooth module's internal protocol stack, lacking deep collaboration with upper-layer application logic. Because physical layer signal information and application layer identity information are separated, when multiple data collectors exist in the same physical area, a meter's broadcast signal may be simultaneously received by the Bluetooth modules of multiple collectors, causing simultaneous responses from multiple collectors. This leads to device attribution conflicts and communication interference, resulting in network failure or communication instability. Summary of the Invention
[0004] This invention provides a network communication method, apparatus, device, and medium based on a data collector to solve the problems of device ownership conflicts and communication instability caused by the separation of physical layer and application layer information in existing Bluetooth networking schemes.
[0005] In a first aspect, this application provides a network communication method based on a data collector, wherein the data collector includes a main control unit and a main Bluetooth unit. The network communication method is applicable to the main control unit and includes the following steps: receiving a parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; returning a parameter response frame to the main Bluetooth unit in response to the parameter request frame, the parameter response frame carrying the host address; sending a network mode activation command to the main Bluetooth unit, the network mode activation command being used to instruct the main Bluetooth unit to perform a scan of the electricity meter slave node and obtain the node scan result; receiving the node scan result returned by the main Bluetooth unit in response to the network mode activation command, and determining a target electricity meter slave node and controlling the target electricity meter slave node to enter the network according to the node scan result and a preset network access strategy, the node scan result including the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node; and sending a service communication command to the main Bluetooth unit to establish a data transmission channel between the main Bluetooth unit and the target electricity meter slave node.
[0006] Secondly, this application provides a network communication method based on a data collector. The data collector includes a main control unit and a main Bluetooth unit. The network communication method is applicable to the main Bluetooth unit and includes the following steps: sending a parameter request frame to the main control unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; if a parameter response frame is received from the main control unit in response to the parameter request frame, then receiving a network mode activation command sent by the main control unit, the parameter response frame carrying the host address, the network mode activation command being used to instruct the main Bluetooth unit to perform meter slave node scanning. The system scans and obtains node scanning results; in response to the network mode activation command, it scans the electricity meter slave nodes, obtains the node scanning results, and returns the node scanning results to the main control unit. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. The node scanning results are used by the main control unit to determine the target electricity meter slave node and control the target electricity meter slave node to join the network based on the node scanning results and the preset network access strategy; it receives the service communication command sent by the main control unit to establish a data transmission channel between the main Bluetooth unit and the target electricity meter slave node.
[0007] Thirdly, this application provides a network communication device based on a data collector. The data collector includes a main control unit and a main Bluetooth unit. The network communication device is adapted to the main control unit and includes: a request receiving module for receiving a parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; a request response module for returning a parameter response frame to the main Bluetooth unit in response to the parameter request frame, the parameter response frame carrying the host address; and a first network startup module for sending a network mode start command to the main Bluetooth unit, the network mode being started. The instruction is used to instruct the master Bluetooth unit to scan the slave nodes of the electricity meter and obtain the node scanning results; the node network entry module is used to receive the node scanning results returned by the master Bluetooth unit for the network mode activation instruction, and determine the target electricity meter slave node and control the target electricity meter slave node to enter the network according to the node scanning results and the preset network entry strategy. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node; the first communication start module is used to send a service communication instruction to the master Bluetooth unit to establish a data transmission channel between the master Bluetooth unit and the target electricity meter slave node.
[0008] Fourthly, this application provides a network communication device based on a data collector. The data collector includes a main control unit and a main Bluetooth unit. The network communication device is adapted to the main Bluetooth unit and includes: a parameter request module, used to send a parameter request frame to the main control unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; and a second network activation module, used to receive a network mode activation command sent by the main control unit if a parameter response frame returned by the main control unit in response to the parameter request frame is received, the parameter response frame carrying the host address, and the network mode activation command being used to instruct the main Bluetooth unit to perform meter slave node scanning. The system includes a node scanning module, which, in response to the network mode activation command, performs a node scanning of the meter slave nodes, obtains the node scanning results, and returns the node scanning results to the main control unit. The node scanning results include the current unique identifier of the current meter slave node and the current meter signal strength. The node scanning results are used by the main control unit to determine the target meter slave node and control the target meter slave node to join the network based on the node scanning results and a preset network access strategy. The second communication activation module is used to receive the service communication command sent by the main control unit to establish a data transmission channel between the main Bluetooth unit and the target meter slave node.
[0009] Fifthly, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer device is configured as a main control unit, the processor executes the computer program to implement the networking communication method provided in the first aspect; or, when the computer device is configured as a main Bluetooth unit, the processor executes the computer program to implement the networking communication method provided in the second aspect.
[0010] Sixthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described networking communication method.
[0011] In the aforementioned technical solution for network communication based on a data collector, including a data collector comprising a main control unit and a main Bluetooth unit, the network communication method is applicable to the main control unit and includes the following steps: receiving a parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; returning a parameter response frame to the main Bluetooth unit in response to the parameter request frame, the parameter response frame carrying the host address; sending a network mode activation command to the main Bluetooth unit, the network mode activation command being used to instruct the main Bluetooth unit to perform a scan of the meter slave nodes and obtain the node scan results; receiving the node scan results returned by the main Bluetooth unit in response to the network mode activation command, and determining the target meter slave node and controlling the target meter slave node to join the network based on the node scan results and a preset network access strategy, the node scan results including the unique identifier and signal strength of the current meter slave node; and sending a service communication command to the main Bluetooth unit to establish a data transmission channel between the main Bluetooth unit and the target meter slave node. This method, by centralizing the network access decision-making power in the main control unit, effectively reduces the computational burden and power consumption of the main Bluetooth unit, and improves network efficiency and communication stability. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is an interactive principle diagram of the main control unit and the main Bluetooth unit in a network communication method based on a data collector according to an embodiment of the present invention; Figure 2 This is a flowchart of the main control unit side in a network communication method based on a data collector according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a specific step in determining the target meter slave node in a network communication method based on a data collector, according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating a specific step in determining the target meter slave node in a network communication method based on a data collector, as described in another embodiment of the present invention. Figure 5 This is a flowchart illustrating a specific step in determining the target meter slave node in a network communication method based on a data collector, as described in another embodiment of the present invention. Figure 6 This is a flowchart illustrating the process of a target meter entering the network from a node in a network communication method based on a data collector, as described in one embodiment of the present invention. Figure 7This is a flowchart of the main Bluetooth unit side in a network communication method based on a data collector according to an embodiment of the present invention; Figure 8 This is a flowchart illustrating the process of a target meter entering the network from a node in a network communication method based on a data collector, as described in one embodiment of the present invention. Figure 9 This is a flowchart illustrating the establishment of a point-to-point transmission channel on the main Bluetooth unit side in a network communication method based on a data collector, according to one embodiment of the present invention. Figure 10 This is another specific flowchart of the point-to-point transmission channel established on the main Bluetooth unit side in a network communication method based on a collector in one embodiment of the present invention; Figure 11 This is a flowchart illustrating a specific step in the network communication method based on a data collector in one embodiment of the present invention, where the main Bluetooth unit notifies the node of its disconnection from the network based on the node's connection status. Figure 12 This is a flowchart illustrating a specific process in a network communication method based on a data collector in one embodiment of the present invention, where the main Bluetooth unit re-networks according to the voltage status. Figure 13 This is a schematic diagram of a network communication device based on a data collector according to an embodiment of the present invention; Figure 14 This is another schematic diagram of a network communication device based on a data collector according to an embodiment of the present invention; Figure 15 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] It should be noted first that the data acquisition unit includes a main control unit and a main Bluetooth unit. In this application, the "main control unit" typically refers to the microcontroller unit (MCU) in the data acquisition unit, which is the core decision-making and control component, responsible for network-wide decision-making, policy judgment, command scheduling, data operation and maintenance management, and coordinating all network and communication business logic. The "main Bluetooth unit" refers to the Bluetooth module in the data acquisition unit responsible for wireless communication, which only undertakes the low-level execution functions of wireless signal scanning, data transmission and reception, and command pass-through, and has no autonomous network access decision-making authority. The two interact via serial port to collaboratively complete network and communication tasks. The electricity meter corresponds to the electricity meter slave node, which includes a slave Bluetooth unit and a slave control unit. The slave Bluetooth unit is responsible for wireless signal transmission and reception, realizing wireless connection and data interaction between the main Bluetooth unit and the electricity meter slave node. The slave control unit is responsible for electricity meter data acquisition, hardware status monitoring, pin level control, and data processing, supporting meter-side self-healing and data reporting functions.
[0016] In one embodiment, such as Figure 1 and Figure 2 As shown, a network communication method based on a data collector is provided, applicable to the main control unit, including the following steps: Step S1: Receive the parameter request frame sent by the main Bluetooth unit. The parameter request frame is used to request the main control unit to return the host address of the collector.
[0017] It should be noted that the parameter request frame is a serial port command frame initiated by the main Bluetooth unit to the main control unit after power-on initialization. It serves as a pre-interaction command for device network initialization, and its core function is to request the unique host address of the current collector from the main control unit. This provides an identity basis for subsequent network identity binding and network affiliation determination. The command frame adopts the unified frame format of this application, including a fixed preamble, control code, data field, and checksum. The host address is the unique network identifier of the collector, used to distinguish the dedicated Mesh networks of different collectors. It is a core identifier that avoids cross-networking issues in multi-collector scenarios; furthermore, the host address is a key parameter for the main Bluetooth unit to perform identity identification and data addressing during subsequent network formation and communication.
[0018] Combination Figure 1 After the data acquisition unit powers on and completes its initialization, the main Bluetooth unit automatically starts its underlying initialization program. Lacking a locally stored valid host address, it cannot autonomously enter network mode. At this time, the main Bluetooth unit assembles a parameter request frame according to a preset frame format and actively sends it to the main control unit via the serial port. The main control unit continuously listens for serial port commands, captures the parameter request frames uploaded by the main Bluetooth unit in real time, performs CRC verification, format verification, and function parsing of the command frame, confirms that the current command is a host address request, and waits to execute a response operation.
[0019] In this embodiment, the parameter request frame is FE FE 68 00 04 83 01 00 00 00 [CRC8] 16, where the control code 83H indicates that the main Bluetooth unit initiates a parameter request to the main control unit, and the data field 01 00 00 00 is a reserved padding bit.
[0020] It should be noted that all functions in this embodiment adopt the same frame format: preamble FE FE + start character 68 + reserved 00 + data field length L + control code C + data field + CRC8 checksum + end character 16. The control codes include 01H and 02H sent from the master control unit to the master Bluetooth unit, and 81H, 82H, and 83H sent from the master Bluetooth unit to the master control unit. 01H indicates that the master control unit sends a setting command to the master Bluetooth unit; 02H indicates that the master control unit sends a read response command to the master Bluetooth unit; 81H indicates that the master Bluetooth unit returns a setting response to the master control unit; 82H indicates that the master Bluetooth unit returns a read response to the master control unit; and 83H indicates that the master Bluetooth unit initiates a parameter request command to the master control unit. The binary bits of the control code are used to distinguish the direction of instruction interaction and the function type. The highest bit is the instruction interaction direction identifier; a highest bit of 0 indicates that the instruction is sent from the master control unit to the master Bluetooth unit, and a highest bit of 1 indicates that the instruction is sent from the master Bluetooth unit to the master control unit. The lower 7 bits specifically define the function type, such as 0000001 corresponding to a setting function, 0000010 corresponding to a getting function, and 0000011 corresponding to a request function. For example, the binary representation of control code 83H in the parameter request frame is 1000 0011, with its highest bit being 1, clearly indicating that the instruction is sent from the master Bluetooth unit to the master control unit; the lower 7 bits, 000 0011, correspond to the request function, used by the master Bluetooth unit to request the host address from the master control unit.
[0021] In this application, the initialization interaction mode of active request by the main Bluetooth unit and passive response by the main control unit completely abandons the traditional mode of Bluetooth module autonomously fixing network parameters. The configuration authority of the collector network identity is centralized to the main control unit, breaking the technical bias of independent decision-making by the Bluetooth module from the source of initialization. This lays the hardware and software interaction foundation for the subsequent centralized network management mechanism of "decision moving upward", effectively avoiding the problem of network identity confusion in multi-collector scenarios.
[0022] Step S2: Return a parameter response frame to the master Bluetooth unit in response to the parameter request frame. The parameter response frame carries the host address.
[0023] It should be noted that the parameter response frame is the response instruction frame of the main control unit to the parameter request frame of the main Bluetooth unit. It is a pairing response instruction for network initialization. Its core function is to send the collector's dedicated host address to the main Bluetooth unit to complete the network identity binding of the main Bluetooth unit. The instruction frame and the parameter request frame adopt a symmetrical and unified format to ensure the standardization and reliability of serial port interaction.
[0024] Combination Figure 1 After verifying the parameter request frame, the main control unit retrieves the unique host address of the collector from its local storage, encapsulates the host address into the data field of the parameter response frame, and assembles the preamble, control code, and CRC checksum according to a unified frame format. This data is then sent to the main Bluetooth unit via serial port. The main Bluetooth unit receives the parameter response frame, completes the verification and parsing, extracts and solidifies the corresponding collector host address, and initializes its own network identity, thus possessing the basic conditions for subsequent network scanning. The corresponding parameter response frame is FE FE 68 00 04 02 [address field] [CRC8]16, where the control code 02H indicates that this frame is a read response instruction from the main control unit to the main Bluetooth unit in response to the parameter request frame. This address field is 4 bytes long and is used to uniquely identify the logical identity of the current collector in the network, ensuring the accuracy of routing for subsequent data interactions.
[0025] In this application, a unique binding between the main Bluetooth unit and the collector host is achieved through precise parameter response interaction. This ensures that all subsequent network scanning, node joining, and data interaction behaviors of the main Bluetooth unit belong to the current collector network. This distinguishes the network boundaries of different collectors from the device initialization stage, reduces the risk of cross-collector network interference from the source, and ensures the standardization and controllability of network parameter configuration.
[0026] Step S3: Send a network mode enable command to the main Bluetooth unit. The network mode enable command is used to instruct the main Bluetooth unit to perform a scan of the electricity meter slave nodes and obtain the node scan results.
[0027] It should be noted that the network mode activation command is a network function trigger command issued by the main control unit. It is used to control the main Bluetooth unit to disable the regular communication function and start the full network scanning network function. It is the core control command for the device to switch from standby mode to network mode. The node scan results are the basic information of the surrounding electricity meters slave nodes obtained by the main Bluetooth unit through wireless scanning, which is the core data basis for subsequent network access decisions.
[0028] Combination Figure 1After the main Bluetooth unit completes the host address binding initialization, it enters a standby ready state. The main control unit assembles a network mode activation command (identifier code 0x000000A0) according to the on-site networking requirements and sends it to the main Bluetooth unit. Upon receiving the network mode activation command, the main Bluetooth unit closes the original silent standby mode and the regular data communication channel, starts the 2.4G Bluetooth wireless scanning function, performs a full-area scan of all powered-on meter slave nodes within the physical coverage area, captures the wireless broadcast signals of surrounding meter slave nodes in real time, continuously collects the identity identifiers and signal parameters of each meter, generates complete node scan results, and caches them for reporting. The frame format of the network mode activation command is FE FE 68 00 04 01 A000 00 00 [CRC8] 16, where the identifier code A0H identifies the frame as a network mode activation command. Once the network mode activation command is issued, the main Bluetooth unit enters active scanning mode, providing real-time and full-volume underlying data support for subsequent refined network entry screening based on signal strength or unique identifiers.
[0029] In this application, the main control unit uniformly manages the start and stop of the networking mode, realizing centralized control of networking behavior. This completely changes the rigid mode of traditional Bluetooth modules starting networking autonomously, allowing the timing and range of networking to be flexibly controlled manually or by the system. At the same time, it provides comprehensive and real-time original node data support for the subsequent centralized network access decision of the main control unit, ensuring the orderliness and controllability of the networking process.
[0030] Step S4: Receive the node scanning results returned by the main Bluetooth unit for the network mode activation command, and determine the target meter slave node according to the node scanning results and the preset network access strategy, and control the target meter slave node to access the network.
[0031] It should be noted that the node scan results include the unique identifier of the current electricity meter slave node and the current electricity meter signal strength. The current electricity meter slave node is the surrounding electricity meter device captured by the master Bluetooth unit during the scan. Its identity characteristics and communication quality directly determine the accuracy and reliability of subsequent network access screening. The unique identifier of the current electricity meter is the device ID (MAC address or serial number) in the broadcast frame of the current electricity meter slave node captured by the master Bluetooth unit during the scan. It is the unique hardware identity code of the current electricity meter slave node, used to accurately distinguish different electricity meter devices at the physical layer. The current electricity meter signal strength is the wireless broadcast signal power value (RSSI) received by the master Bluetooth unit. It is used to quantitatively evaluate the link quality between the current electricity meter slave node and the master Bluetooth unit and is a key physical indicator for judging communication stability and coverage. The preset network access strategy is the network access judgment rule stored internally by the master control unit, covering modes such as whitelist verification, RSSI threshold filtering, and dual composite verification. It is the core logic for screening legitimate target nodes, eliminating illegal access, and locking the optimal communication link. The target electricity meter is a device that has been screened by the main control unit according to the preset network access policy and confirmed to be a legitimate device with qualified communication quality.
[0032] Combination Figure 1 After completing the full-domain node scan, the main Bluetooth unit reports the node scan results, including the unique identifier and signal strength of the current meter, to the main control unit in real time via serial port. The main control unit summarizes all scan data, calls the local preset network access policy library, matches the corresponding discrimination rules according to different networking scenarios, filters out the current meter slave nodes that belong to this collector and have qualified communication quality, determines them as target meter slave nodes, and issues instructions to complete network access control.
[0033] Among them, the main control unit coordinates identity information and physical signal information to complete the network access decision, breaking the technical barrier of the traditional Bluetooth module relying only on a single RSSI signal for decision-making and the separation of physical layer and application layer information. It solves the persistent problem of random network access of electricity meters and chaotic device affiliation in scenarios where multiple collectors coexist. At the same time, multiple strategies can flexibly adapt to different deployment scenarios, taking into account both network accuracy and deployment efficiency.
[0034] like Figure 3 As shown, in one embodiment, when the node scan result includes the unique identifier of the current meter slave node, the preset network access strategy includes a first network access strategy. Based on the node scan result and the preset network access strategy, the target meter slave node is determined, including: Step S401: Based on the first network access strategy, compare the current unique identifier of the electricity meter with the preset whitelist to obtain the identifier comparison result.
[0035] It should be noted that the first network access strategy is a pure whitelist identity verification strategy, suitable for precise control and fixed device networking scenarios. The preset whitelist stores the unique identifiers of target meters that are allowed to access the collector's slave nodes. In other words, the preset whitelist is a list of legitimate meter devices stored locally by the main control unit, including all unique identifiers of meters authorized to access the current collector's network, and is the core basis for identity access. The identifier comparison result is a Boolean value or status indicator used to represent whether the current meter's unique identifier matches the preset whitelist. If the identifier comparison result is true, the current meter slave node is deemed legitimate and allowed to access the current collector's Mesh network; if the identifier comparison result is false, the meter slave node is deemed illegitimate and its network access request is rejected.
[0036] The main control unit extracts the unique identifier of the electricity meter from the node scanning results, traverses and matches the local preset whitelist database, verifies the legality of the device identity one by one, generates the identifier comparison result, and clarifies whether the identifier matches the authorized list.
[0037] In this application, the first network access strategy uses a pure identity whitelist verification to enable accurate authorization of devices to enter the network, prevent unknown and illegal devices from accessing the Mesh network, greatly improve network security and device attribution accuracy, and is suitable for power grid scenarios with fixed devices and high security requirements.
[0038] Step S402: If the identifier comparison result indicates that the unique identifier of the current meter is the unique identifier of the target meter that exists in the preset whitelist, then the current meter slave node is determined as the target meter slave node.
[0039] If the identification comparison result is true, that is, if the current meter's unique identifier is the target meter's unique identifier that exists in the preset whitelist, the main control unit directly locks the current meter slave node as the target meter slave node, completes the identity legality confirmation, and allows it to access the network.
[0040] Furthermore, if the identification comparison result is false, that is, the current meter's unique identifier does not match the preset whitelist, the current meter's slave node identity is determined to be illegal. The main control unit will directly reject its network access request and discard the relevant scanning data to prevent illegal devices from interfering with network order.
[0041] In this application, the list of legitimate devices stored in the preset whitelist of the first network access strategy is static and authoritative, ensuring absolute reliability of identity verification and avoiding the risk of misjudgment due to signal fluctuations. At the same time, the extremely simple identity verification logic can quickly complete the network access screening of a large number of electricity meters, with high network identification efficiency, no signal threshold misjudgment problem, and is suitable for normalized networking scenarios with fixed distribution areas and fixed electricity meter deployments.
[0042] like Figure 4As shown, in another embodiment, when the node scan result includes the current meter signal strength of the current meter slave node, the preset network access strategy includes a second network access strategy. The target meter slave node is determined based on the node scan result and the preset network access strategy, including: Step S411: Based on the second network access strategy, compare the current meter signal strength with the preset critical threshold to obtain the signal comparison result.
[0043] It should be noted that the second network access strategy is a pure RSSI signal strength verification strategy, suitable for rapid deployment and plug-and-play networking scenarios, without relying on device identity pre-registration information. This network access strategy uses physical layer signal quality as the sole admission criterion, with a preset critical threshold serving as the baseline for determining the effectiveness of the communication link. This threshold filters out weak signal nodes caused by excessive distance or obstruction. The preset critical threshold is the minimum effective communication signal strength; below this threshold, the wireless communication quality is considered poor, and stable network communication is impossible. The signal comparison result is a Boolean value or status indicator used to characterize whether the current meter signal strength meets the preset critical threshold. If the signal comparison result is true, the current meter slave node is deemed to have qualified communication quality and is allowed to access the network; if it is false, the communication quality is deemed substandard, and network access is rejected.
[0044] The main control unit extracts the RSSI signal strength of the electricity meter from the node scanning results, compares the real-time signal value with the locally preset RSSI critical threshold, generates a signal comparison result, and clearly indicates whether the current signal quality meets the network access communication requirements.
[0045] In this application, signal strength screening can quickly filter out electricity meter devices that are too far away, have blocked signals, or have extremely poor communication quality, thus avoiding problems such as communication lag, disconnection, and data packet loss after network access and ensuring the overall communication stability after network setup.
[0046] Step S412: If the signal comparison result indicates that the current meter signal strength is greater than the preset critical threshold, then the current meter slave node is determined as the target meter slave node.
[0047] If the signal comparison result is true, that is, the signal comparison result indicates that the current meter signal strength is greater than the preset critical threshold, the main control unit determines that the current meter slave node has qualified communication quality, allows it to access the network, and identifies it as the target meter slave node.
[0048] Furthermore, if the signal comparison result is false, that is, if the signal comparison result indicates that the current meter signal strength is lower than the preset critical threshold, then it is determined that the current meter slave node communication environment is poor, and the master control unit will reject its network access request to ensure the stability of the overall network link.
[0049] In this application, a second network access strategy is used to automatically select network access devices based on signal quality, retaining the plug-and-play advantage of Bluetooth technology, greatly improving the efficiency of batch deployment on site, and adapting to engineering scenarios of temporary networking and rapid expansion.
[0050] like Figure 5 As shown, in another embodiment, when the node scan result includes the current meter's unique identifier and the current meter signal strength of the current meter slave node, the preset network access strategy includes a third network access strategy. Based on the node scan result and the preset network access strategy, the target meter slave node is determined, including: Step S421: Based on the third network access strategy, compare the current meter's unique identifier with the preset whitelist to obtain the identifier comparison result, and compare the current meter's signal strength with the preset critical threshold to obtain the signal comparison result.
[0051] It should be noted that the third network access strategy is a dual verification strategy of "whitelist + RSSI", which is suitable for secure networking scenarios with strict requirements for both device identity legitimacy and communication quality. This strategy requires nodes to meet both identity authentication and signal strength conditions simultaneously; failure to meet either condition will result in network access rejection. The identifier comparison result is similar to the signal comparison result, using Boolean values or status indicators to indicate whether the current meter's unique identifier exists in the preset whitelist. The signal comparison result is similar to the signal comparison result, using Boolean values or status indicators to indicate whether the current meter's signal strength meets the preset critical threshold. If both the identifier comparison result and the signal comparison result are true, the current meter slave node is determined to meet both the identity legitimacy and signal strength requirements, allowing it to access the network and designating it as the target meter slave node. If the identifier comparison result or the signal comparison result is false, meaning the current meter's unique identifier is not in the whitelist or the signal strength is below the critical threshold, the current meter slave node is determined to not meet the network access conditions, and the main control unit will reject its network access request. This effectively prevents unauthorized devices from accessing the network while ensuring communication quality.
[0052] The main control unit synchronously executes dual verification logic. On the one hand, it compares the unique identifier of the current meter with the identity of the preset whitelist and generates the identifier comparison result. On the other hand, it compares the RSSI signal strength with the preset critical threshold value and generates the signal comparison result, thus achieving dual-dimensional synchronous discrimination.
[0053] In this application, the composite verification mode of the third network access strategy avoids the shortcomings of low deployment efficiency of pure whitelist and easy network interference of pure RSSI verification. It ensures that all network access devices are authorized and legitimate devices, and also ensures that the communication quality of the devices meets the standards, thus achieving the optimal balance between network security, stability and deployment efficiency.
[0054] Step S422: If the identifier comparison result indicates that the unique identifier of the current meter is the unique identifier of the target meter that exists in the preset whitelist, and the signal comparison result indicates that the signal strength of the current meter is greater than the preset critical threshold, then the current meter slave node is determined as the target meter slave node.
[0055] Specifically, the current meter slave node is only identified as the target meter slave node when both the identifier comparison result and the signal comparison result are true—that is, the unique identifier of the current meter exists in the preset whitelist, and the signal strength of the current meter is greater than the preset critical threshold. This logic ensures that only devices with both legitimate identity and a high-quality communication link can access the network, guaranteeing the reliability of the network from the source.
[0056] Furthermore, if the identifier comparison result is false or the signal comparison result is false, that is, the current meter's unique identifier is not in the preset whitelist or the current meter's signal strength is lower than the preset critical threshold, then it is determined that the current meter slave node does not meet the network access conditions, and the master control unit will reject its network access request, thereby ensuring communication quality while effectively preventing unauthorized devices from accessing the network.
[0057] In this application, the third network access strategy can fundamentally eliminate the cross-network problem in scenarios with dense deployment of multiple data collectors, prevent illegal devices and weak signal devices from entering the network, and build a precise, stable and secure dedicated Mesh network that perfectly adapts to the standardized networking requirements of smart grid distribution areas.
[0058] In some embodiments, a preset whitelist can be set via identifier code 0x00000007, supporting multi-node loading in a single frame. The number of nodes is dynamically calculated using (data field length - 4) / 6, thus flexibly adapting to different network scale requirements. A preset critical threshold is set via identifier code 0x0000000E; for example, if the threshold is -80dBm, the parameter value is B0, i.e., the hexadecimal parameter value is set to 0xB0. This parameter configuration mechanism provides the system with high flexibility and scalability, enabling network administrators to dynamically adjust the network access threshold based on the actual electromagnetic environment and security management level, thereby achieving fine-grained control of security and connectivity in complex and ever-changing deployment scenarios. Through the above parameter configuration and dynamic verification mechanism, the system can achieve fine-grained control of the network access threshold in complex electromagnetic environments, laying a solid foundation for the subsequent construction of a highly reliable, low-interference dedicated mesh network.
[0059] In this application, in a multi-collector coexistence environment, the above-mentioned network access strategy design effectively isolates signal interference between different distribution stations, ensuring that the electricity meters in each distribution station can establish a stable connection with their respective collectors, eliminating the "interference" phenomenon at the source, while supporting flexible switching of multiple strategies, taking into account both control accuracy and deployment efficiency.
[0060] like Figure 6As shown, controlling the target meter to enter the network from the node includes: Step S431: Send a network access permission instruction to the master Bluetooth unit. The network access permission instruction is used to instruct the master Bluetooth unit to send a network access request to the target meter slave node and receive the network access confirmation information returned by the target meter slave node in response to the network access request.
[0061] It should be noted that the network access permission command is the network access execution authorization command issued by the main control unit, and it is the core command for implementing network configuration decisions. The network access request is a network access execution message issued by the main Bluetooth unit to the meter, used to request the target meter slave node to perform the network access operation. The network access confirmation message is a feedback message after the meter has completed the network access, used to indicate that the target meter slave node has successfully performed the network access operation, and to instruct the main Bluetooth unit to send the node network access information to the main control unit.
[0062] In this embodiment, after the master control unit identifies the target meter slave node, it generates and sends a network access permission command to the master Bluetooth unit. Then, upon receiving the network access permission command, the master Bluetooth unit accurately sends a network access request message to the corresponding target meter slave node, triggering the meter to perform network binding and registration operations. Simultaneously, it continuously monitors the meter's feedback signals, waiting to receive network access confirmation information. Once the master Bluetooth unit confirms successful network access, it sends the node's network access information, carrying the target meter's unique identifier, back to the master control unit, completing the closed-loop control from decision-making to execution to feedback. This closed-loop mechanism not only ensures the atomicity and traceability of the network access operation but also lays a reliable foundation for the establishment of subsequent business channels.
[0063] In this application, the above-mentioned interaction process uses a collaborative architecture with the main control unit as the decision-making center, the Bluetooth unit as the execution touch, and the electricity meter slave node as the feedback terminal. This achieves clear definition and efficient collaboration of responsibilities at each level, thoroughly implements the core innovation of decision-making at the top level, and ensures that all network access behaviors are controlled by the main control unit, with no autonomous random network access behaviors, thus completely eliminating the risk of cross-networking.
[0064] Step S432: Receive the node network entry information returned by the main Bluetooth unit. The node network entry information carries the unique identifier of the target electricity meter slave node, which is used to indicate that the target electricity meter slave node has successfully connected to the collector.
[0065] It should be noted that node network entry information is the encapsulation and reporting carrier of the network entry result by the main Bluetooth unit. Its core function is to transform the underlying physical connection status into a logical network entry credential that can be recognized by the upper layer, ensuring that upper-layer applications can accurately identify and associate specific physical devices, and complete the logical binding between device identity and network topology. Specifically, node network entry information typically includes key parameters such as the target meter's MAC address, network entry timestamp, and signal strength, so that the main control unit can update the network topology accordingly, confirm the mapping relationship between device identity and physical location, and serve as the identity basis for subsequent business interactions.
[0066] In this embodiment, after the target meter slave node successfully completes network registration and joins the network, it returns network entry confirmation information to the main Bluetooth unit. The main Bluetooth unit parses and confirms the successful network entry, assembles the node network entry information carrying the meter's unique identifier, and reports it to the main control unit, thereby completing the reporting of the network entry result and ensuring that the main control unit can promptly obtain and process the device's access status. After receiving the message, the main control unit parses the unique identifier in the message, verifies the device's legality, and confirms that the network entry process is compliant, then marks the target meter slave node's access status as successful. Subsequently, the main control unit updates the local network topology list based on the parsing result, marking the target meter slave node's access status as online, thereby completing the final binding of the device identity and logical channel.
[0067] In this application, node network entry information is used as the final credential for network entry completion. This not only signifies the establishment of the physical link but also the formal establishment of logical identity, providing an identity anchor for the reliable transmission of subsequent business data. Simultaneously, it enables real-time closed-loop feedback of network entry results, allowing the main control unit to accurately grasp the network entry status of all network devices. This provides precise device ledger data support for subsequent network operation and maintenance, data communication, and topology management, ensuring the network construction process is traceable and controllable.
[0068] Step S5: Send a service communication command to the master Bluetooth unit to establish a data transmission channel between the master Bluetooth unit and the target meter slave node.
[0069] It should be noted that the service communication command is a network mode switching command, used to control the master Bluetooth unit to end the network scanning mode, exit the network state, and switch to the normal service communication state. It is the core switching command for time-division multiplexing of networking and communication. The data transmission channel is the wireless channel used for data interaction between the master and slave nodes after the network is established, and includes multiple types of transmission modes.
[0070] Combination Figure 1 Once all target meter slave nodes have completed their network registration, the master control unit sends a business communication command to the master Bluetooth unit. Upon receiving the command, the master Bluetooth unit disables the full-network scanning function, terminates the network interaction process, switches to the regular business communication mode, and opens data interaction channels with all registered target meter slave nodes to support subsequent data transmission of various business data. In this business communication mode, stable transmission of meter reading data, status information, and other business data is achieved primarily through data interaction between the master Bluetooth unit and the target meter slave nodes. In this mode, the master Bluetooth unit no longer performs broadcast or scanning operations but focuses on maintaining a stable connection with the registered slave nodes, ensuring the real-time performance and integrity of meter reading command issuance and data feedback. The specific business communication mode will be detailed in the subsequent network communication steps on the master Bluetooth unit side, and will not be elaborated upon here.
[0071] The service communication command can use the identifier code 0x000000A1, which uniquely identifies the switching action from network mode to service communication mode. Upon parsing this specific command code, the master Bluetooth unit immediately triggers an internal state machine transition, stopping the current broadcast or scanning behavior and activating the data link layer connection with the already joined slave nodes, thus ensuring a smooth transition of channel resources from the discovery phase to the data transmission phase. This mechanism effectively isolates channel contention between the network discovery and service transmission phases, achieving time-division multiplexing and non-interference between network and communication, ensuring system stability and continuous data interaction during state switching.
[0072] Furthermore, the timing of issuing service communication commands is typically set after the network setup process is completely completed and the status of all slave nodes is confirmed to be correct, to ensure the atomicity of mode switching and the purity of the service channel. Through this strict timing control and state isolation, the system can maximize network efficiency and communication quality with limited wireless resources, laying a solid foundation for subsequent long-term stable data acquisition services.
[0073] In this embodiment, the above-mentioned mode switching mechanism enables time-division multiplexing of the networking mode and the service communication mode without interference, avoiding network scanning from occupying communication channels and affecting service data transmission. At the same time, it marks the formal closure of the entire network networking process, and the system enters a normalized data communication operation and maintenance state, ensuring the orderly and efficient operation of the network.
[0074] In one embodiment, such as Figure 1 and Figure 7 As shown, a network communication method based on a data collector is provided, applicable to the main Bluetooth unit, including the following steps: Step S6: Send a parameter request frame to the main control unit. The parameter request frame is used to request the main control unit to return the host address of the data collector.
[0075] It should be noted that step S6 aims to enable the main Bluetooth unit to obtain the necessary main control unit identity information, providing an address basis for establishing a stable communication link and receiving networking commands.
[0076] Specifically, after initialization or reset, the master Bluetooth unit actively requests and obtains the host address by sending a parameter request frame to the master control unit. This allows the master Bluetooth unit to establish a valid mapping relationship with the master control unit, ensuring the accuracy of subsequent command interactions and the reliability of link establishment. The interaction process between the master control unit and the master Bluetooth unit has been detailed in step S1 and will not be repeated here.
[0077] Step S7: If a parameter response frame is received from the main control unit in response to the parameter request frame, then the network mode start command sent by the main control unit is received. The parameter response frame carries the host address.
[0078] It should be noted that the network mode activation command is used to instruct the master Bluetooth unit to scan the meter slave nodes and obtain the node scan results. The interaction logic between the master Bluetooth unit and the master control unit in step S7 has been detailed in step S2 and will not be repeated here.
[0079] Step S8: In response to the network mode activation command, perform a scan of the electricity meter slave node, obtain the node scan results, and return the node scan results to the main control unit. The node scan results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. The node scan results are used by the main control unit to determine the target electricity meter slave node and control the target electricity meter slave node to join the network based on the node scan results and the preset network access strategy.
[0080] It should be noted that the core of step S8 lies in the main Bluetooth unit accurately capturing the signal characteristics and identity information of the surrounding electricity meter slave nodes, providing key data support for the main control unit to select the optimal network access target.
[0081] In this embodiment, during the capture of broadcast signals from the slave nodes of the electricity meter in networking mode, the master Bluetooth module records the unique identifier and signal strength of each current slave node it discovers, forming a corresponding node scan result. This node scan result is then reported to the master control unit via a serial port. For example, the slave node with an RSSI value of -80dBm (0xB0) carries the B0 field in its reporting frame. At this time, the master control unit obtains both the physical address and real-time signal strength of each node to be added to the network, breaking down the information barrier between the physical layer and the application layer.
[0082] Then, based on the specific description of step S4, the main control unit determines the target meter slave node and controls the target meter slave node to enter the network according to the preset network access strategy and node scanning results.
[0083] like Figure 8 As shown, on the main Bluetooth module side, the process of the target meter joining the network from the node includes: Step S81: Receive the network access permission instruction sent by the master control unit. The network access permission instruction is used to instruct the master Bluetooth unit to send a network access request to the target meter slave node.
[0084] It should be noted that the network access permission command is the authorization execution command of the main control unit. The main Bluetooth unit must receive the command before it can perform network access interaction. It does not have the authority to initiate network access on its own.
[0085] In this embodiment, after the master Bluetooth unit reports the scan results, it continues to wait for the network access authorization instruction from the master control unit until it receives the network access permission instruction from the specified target meter slave node. Then, it locks the corresponding target meter slave node and prepares to initiate the network access request interaction.
[0086] In this application, by strictly limiting the execution permissions of the main Bluetooth unit, the determinism and security of network access behavior are ensured, avoiding network conflicts caused by blind connections. At the same time, this mechanism further strengthens the core decision-making position of the main control unit; network access interactions must be authorized by the main control unit, preventing the main Bluetooth unit from randomly triggering network access operations and eliminating the risk of cross-networking from the execution end.
[0087] Step S82: In response to the network access permission instruction, send a network access request to the target meter slave node.
[0088] It should be noted that the network access request is a wireless interaction execution message used to request the target meter slave node to perform the network access operation, that is, to trigger the target meter slave node to complete network registration, home binding and other network access operations.
[0089] In this embodiment, the main Bluetooth unit strictly follows the target meter slave node specified by the network access license instruction, accurately sends the network access request wireless message, and triggers the corresponding target meter slave node to execute the network access process in a targeted manner, without sending any network access interaction signals to non-target devices.
[0090] In this application, this "point-to-point" directional interaction mechanism isolates interference from non-target nodes at the physical link level, achieves precise orientation of network access interaction, avoids the problem of multiple devices mistakenly entering the network or randomly entering the network caused by broadcast network access requests, accurately matches the decision results of the main control unit, and ensures the accuracy of network configuration.
[0091] Step S83: Receive the network access confirmation information returned by the target meter slave node in response to the network access request.
[0092] It should be noted that the network access confirmation message is a response message sent by the target meter slave node to the master Bluetooth unit after successfully completing network registration and identity binding. It is used to indicate that the target meter slave node has successfully performed the network access operation, proving that the network access process has been closed.
[0093] In this embodiment, after receiving the network access request from the node, the target meter completes network registration, home binding, and other operations, and then returns network access confirmation information to the main Bluetooth unit. Upon successfully receiving the message, the main Bluetooth unit confirms that the network access interaction has been completed.
[0094] In this application, the receipt of network access confirmation information signifies the dual establishment of the underlying physical link and logical binding. This not only verifies the legitimacy of the target meter slave node's identity but also lays a reliable foundation for the stable transmission of subsequent business data. This closed-loop feedback mechanism transforms the establishment of the underlying physical connection into a precise state that can be recognized by the upper-layer logic, thereby providing a solid state basis for the issuance of subsequent business communication commands and the establishment of data channels.
[0095] Step S84: Send node network access information to the main control unit. The node network access information carries the unique identifier of the target meter slave node.
[0096] It should be noted that the node network entry information is a network entry result reporting message, which is used to synchronize the underlying network entry execution result to the main control unit to complete the closed loop of the entire network status.
[0097] In this embodiment, after the main Bluetooth unit obtains the meter's network access confirmation information, it assembles node network access information carrying the unique identifier of the target meter and reports it to the main control unit via serial port to synchronize the device's network access status. The identifier code for the node network access information is 0x0D, used to identify that the message is a node network access result reporting type.
[0098] In this application, the reporting of node network access information realizes the synchronization and unification of the underlying execution status and the upper-level decision-making status, enabling the main control unit to grasp the network construction progress and equipment online status in real time, thereby ensuring the complete closed loop and traceability of the network construction process.
[0099] Step S9: Receive the business communication command sent by the master control unit to establish a data transmission channel between the master Bluetooth unit and the target meter slave node.
[0100] It should be noted that the specific definition of the business communication command has been explained in detail in step S5, and will not be repeated here. After receiving the business communication command, the main Bluetooth unit disables the full network scanning networking function, terminates the networking interaction process, switches to the normal business communication working mode, and opens the data transmission channel with all network-connected target meter slave nodes to support subsequent data transmission of various business data.
[0101] Furthermore, the data transmission channels include network broadcast channels, point-to-point transmission channels, and one-way broadcast channels, each adapted to the data transmission needs of different business scenarios.
[0102] It should be noted that the network broadcast channel, also known as the Mesh broadcast channel, is a shared multi-hop routing transmission channel for the entire network, suitable for low-power, short-data, and routine communication between batches of devices. The point-to-point transmission channel, also known as the BLE on-demand connection channel, is a temporary, dedicated, high-speed transmission channel suitable for large-capacity, high-throughput data transmission. The one-way broadcast channel, also known as the pure broadcast channel, is a connectionless, non-acknowledgment, extremely simple one-way transmission channel, suitable for instantaneous alarms and brief public notifications.
[0103] In this application, by flexibly switching and coordinating the three channels mentioned above, the optimal transmission strategy can be dynamically matched according to data characteristics. This ensures real-time communication while maximizing the utilization efficiency of spectrum resources and the overall energy efficiency of the system, thereby extending device lifespan and improving overall network throughput. This intelligent routing mechanism based on data characteristics not only achieves refined configuration of communication resources but also achieves a dynamic balance between system stability and energy efficiency, providing a solid guarantee for reliable data transmission in complex scenarios.
[0104] In some embodiments, such as Figure 9 As shown, the process of establishing a point-to-point transmission channel is as follows: Step S901: Receive the point-to-point connection command sent by the master control unit. The point-to-point connection command carries the unique identifier of the target meter slave node.
[0105] It should be noted that the point-to-point connection command is a BLE link establishment command initiated by the main control unit of the data collector, which is used by the main control unit to initiate large-capacity data transmission on demand.
[0106] In this embodiment, when large-capacity data transmission services such as firmware upgrades and historical frozen data reading are required, the main control unit generates and sends a point-to-point connection command carrying the unique identifier of the target meter. After the main Bluetooth unit receives the command, it locks the target meter device and prepares to initiate a point-to-point connection establishment interaction.
[0107] In this application, the main Bluetooth unit accurately locates the target meter slave node to be communicated by receiving a point-to-point connection command carrying the unique identifier of the target meter, thus preparing for the subsequent establishment of a dedicated high-speed transmission link.
[0108] Step S902: In response to the point-to-point connection command, establish a point-to-point transmission channel with the target meter slave node.
[0109] In this embodiment, the master Bluetooth unit parses the point-to-point connection command, locates the target meter slave node, initiates a BLE point-to-point connection handshake interaction, completes link binding and channel adaptation, and successfully establishes a dedicated high-speed point-to-point transmission channel to support high-speed transmission of large-capacity data. The identifier code of the point-to-point connection command is 0x000000B0, specifying the unique identifier (i.e., the 6-byte meter number) of the target meter slave node. The master Bluetooth unit searches for the corresponding slave node in the list of networked devices based on this identifier and initiates a BLE connection request. If the search is successful, the master Bluetooth unit sends a connection request to the target slave node; if the search fails or the connection times out, an error code is returned, terminating the connection establishment process. After the connection is established, the master Bluetooth unit reports the connection status to the master control unit: a status code of 01 for successful connection establishment and 00 for failure, to confirm the connection establishment result.
[0110] Furthermore, after the corresponding data transmission task is completed, the master Bluetooth unit releases the established point-to-point transmission channel by sending a disconnect command to the target meter slave node, allowing the target meter slave node to return to low-power broadcast mode, thereby saving system resources and maintaining overall network energy efficiency. The identifier code for the disconnect command is 0x000000B1. After the master Bluetooth unit sends this disconnect command, the target meter slave node confirms the disconnection and switches back to broadcast mode. The master Bluetooth unit then releases the link resources and reports the disconnection completion status to the master control unit, ensuring the system quickly returns to low-power listening mode.
[0111] In this application, a temporary dedicated BLE link is actively established by the main control unit to transmit big data. Compared with the traditional pure Mesh packet transmission, the transmission efficiency is improved by tens of times, which completely solves the problems of long transmission time and channel congestion of big data. After the transmission is completed, resources can be released quickly without affecting the low-power operation of the device.
[0112] In other embodiments, such as Figure 10 As shown, the process of establishing a point-to-point transmission channel can also be as follows: Step S911: Receive a long data transmission request frame sent by the target meter slave node. The long data transmission request frame is used to instruct the target meter slave node to request the establishment of a point-to-point transmission channel with the master Bluetooth unit.
[0113] It should be noted that the long data transmission request frame is a link establishment application signal initiated by the target meter slave node to the main Bluetooth unit when it detects that there is a large amount of data (such as firmware upgrade packages, historical frozen data, etc.) that needs to be uploaded locally. It is used to trigger the master control side to establish a dedicated high-speed transmission link as needed.
[0114] In this embodiment, when the target meter slave node detects a fault event and a large amount of historical data awaits reporting, it actively assembles a long data transmission request frame and sends it to the main Bluetooth unit. Then, the main Bluetooth unit listens for wireless request signals in real time and captures the long data transmission request sent by the target meter slave node.
[0115] In this application, the target electricity meter actively initiates a chain establishment request from the node, realizing the transformation of the target electricity meter from a passive response node to an active push node. It can report anomalies and massive amounts of data in real time without waiting for the collector to poll, which greatly improves the fault response speed and the real-time performance of data reporting.
[0116] Step S912: Send a long data transmission response frame to the target meter slave node. The long data transmission response frame is used to confirm the establishment of a point-to-point transmission channel and instruct the target meter slave node to send the data to be transmitted through the point-to-point transmission channel.
[0117] It should be noted that the long data transmission response frame is the master Bluetooth unit's formal confirmation of the connection establishment application. It is used to inform the target meter that the dedicated channel for the slave node is ready and authorize it to start the big data transmission process.
[0118] In this embodiment, after receiving a long data transmission request frame, the master Bluetooth unit verifies the device's legitimacy, returns a long data transmission response frame, completes a two-way handshake with the target meter slave node, successfully establishes a point-to-point high-speed transmission channel, and notifies the target meter slave node to initiate large data transmission. The identifier code for the long data transmission request is 0xB0. The master Bluetooth unit parses this request and verifies the device's legitimacy, then sends a long data transmission response frame to the target meter slave node, confirming the establishment of the point-to-point transmission channel.
[0119] In this application, a two-way confirmation mechanism is used to ensure the reliability of link establishment, adapt to the needs of big data transmission in all scenarios where the collector actively sends data and the meter actively reports data, avoid invalid connection attempts, and provide a clear triggering basis for subsequent differentiated channel selection.
[0120] Furthermore, after establishing a data transmission channel between the master Bluetooth unit and the target meter slave node, the following steps are also included: If the number of bytes of data to be transmitted is less than the preset byte threshold and the transmission frequency is lower than the preset frequency threshold, the data to be transmitted will be received through the network broadcast channel.
[0121] If the amount of data to be transmitted is greater than the preset data threshold, or the transmission frequency is higher than the preset frequency threshold, and bidirectional interaction is required, the data to be transmitted will be received through the point-to-point transmission channel.
[0122] If the data to be transmitted is a general, brief public notice, it will be received via a one-way broadcast channel.
[0123] It should be noted that data attributes refer to characteristics such as the byte size, transmission frequency, and interaction requirements of the data to be transmitted. These characteristics are used to quantify data features and serve as the basis for channel selection. The preset byte threshold and preset frequency threshold are transmission mode discrimination thresholds preset by the main control unit. These are used to distinguish between short data, long data, and public notification data types, thereby intelligently matching the optimal transmission path. General short public notifications refer to standardized instructions or status announcements that are sent synchronously across the entire network without requiring confirmation from the recipient, such as network disbandment broadcast notifications and global simple alarms.
[0124] Furthermore, the preset byte threshold and preset frequency threshold are dynamically configured by the main control unit according to network load and service requirements, aiming to balance transmission real-time performance and channel resource usage. Through dynamic threshold adjustment, the system can flexibly cope with communication pressure under different service scenarios, ensuring channel resource conservation under low load and prioritizing the transmission of critical data under high load.
[0125] In this embodiment, under business communication mode, the main control unit analyzes data attributes such as the byte size and transmission frequency of the data to be transmitted in real time, and intelligently matches the optimal transmission channel. For heartbeat packets, regular status words, and short data from small meter readings, which correspond to ≤32 bytes and have a low transmission frequency, a network broadcast channel is used for low-power, high-efficiency periodic reporting. For large-volume scenarios such as firmware upgrades and historical data backtracking, or high-frequency interactive services requiring real-time two-way confirmation, the system switches to a point-to-point transmission channel to ensure high bandwidth and low latency. For low-interaction scenarios such as short, universally applicable announcements and instantaneous alarm notifications, a one-way broadcast channel is directly reused to minimize channel overhead and achieve rapid information delivery. The above differentiated scheduling strategy not only achieves fine-grained allocation of communication resources but also significantly reduces the risk of network congestion and extends the battery life of terminal devices.
[0126] In this application, through the aforementioned three-channel adaptive scheduling mechanism, the system can dynamically select the optimal transmission path based on data characteristics, thereby achieving an optimal balance between communication efficiency and energy consumption in complex network environments. Specifically, this mechanism automatically and seamlessly switches between Mesh networking, BLE point-to-point, and one-way broadcast modes based on three dimensions: the length, frequency, and interaction characteristics of the data to be transmitted, ensuring that all types of service data can be transmitted efficiently and reliably using the most suitable link. Furthermore, this mechanism effectively avoids the limitations of a single transmission mode in handling mixed services, significantly improving the overall communication robustness and resource utilization in complex heterogeneous network environments.
[0127] Furthermore, such as Figure 11 As shown, this network communication method also includes: Step S101: Detect the node connection status of the target meter slave node.
[0128] It should be noted that the node connection status is a real-time status indicator representing the connectivity of the wireless link between the meter's slave node and the main Bluetooth module. It reflects the integrity of the current network topology and the reliability of the communication link. This node connection status directly determines whether data can be sent and received normally and is a prerequisite for triggering node off-network alarms and network topology reconfiguration.
[0129] In this embodiment, during service communication, the main Bluetooth unit continuously monitors the wireless connection status and data interaction status of each target meter slave node that has been connected to the network, determines whether the node is online or offline in real time, and monitors network topology changes around the clock.
[0130] In this application, the real-time monitoring of node connection status is not a simple periodic polling, but an event-driven proactive sensing mechanism that breaks the lag of traditional timed polling detection, realizes real-time sensing of node status, can detect device disconnection faults at the first time, and provides status basis for rapid self-healing and accurate operation and maintenance.
[0131] Step S102: If the node connection status changes from connected to offline, a node disconnection notification is sent to the main control unit. The node disconnection notification carries the unique identifier of the target meter slave node and the node disconnection reason code.
[0132] It should be noted that the node disconnection notification is a fault-reporting message; the disconnection reason code is a preset fault code used to accurately distinguish different root causes of disconnection such as signal obstruction, device restart, and power failure, and is the core basis for fault diagnosis.
[0133] In this embodiment, when the meter is detected to switch from an online state to an offline state, the main Bluetooth unit immediately assembles a node offline notification message, carrying the meter's unique identifier and the corresponding offline reason code, and reports it to the main control unit in real time, which then synchronizes it to the background management system.
[0134] It should be noted that the main Bluetooth unit has an event-driven active reporting function, which can trigger the reporting logic instantly when the node status changes abnormally, without waiting for the next detection cycle, thus ensuring the real-time and accuracy of the offline information. The node offline notification corresponds to the identifier code 0x0C, used to identify this specific event type in the communication protocol. The node offline notification message is sent immediately after the corresponding node goes offline. The node offline notification message carries the unique identifier of the target meter and a 1-byte node offline reason code, ensuring a compact message format and efficient parsing. For example, when the node offline reason code is 0x01, it indicates signal loss (heartbeat message timed out and not received); when the node offline reason code is 0x02, it indicates that the device actively reports offline; when the node offline reason code is 0x03, it indicates that the network has been completely disbanded; when the node offline reason code is 0x04, it indicates that the device link RSSI quality is lower than a preset critical threshold.
[0135] In this application, an active reporting mechanism carrying the cause code of disconnection is used to achieve active fault reporting and accurate source tracing. This upgrades the backend system from passively polling to find faults to actively receiving diagnostic information, solving the problems of delayed fault discovery and unclear fault causes in traditional operation and maintenance. It supports predictive maintenance and accurate dispatching, and significantly reduces operation and maintenance costs.
[0136] Furthermore, such as Figure 12 As shown, this network communication method also includes: Step S111: Detect the voltage status of the preset GPIO pin of the target meter slave node.
[0137] It should be noted that the preset GPIO pin is a dedicated hardware self-healing detection pin configured for the meter slave control unit. This is a hardware-level fault perception channel that distinguishes this application from traditional software heartbeat detection. It is independent of the Bluetooth wireless communication link and serial communication link, and is unaffected by software program freezes, wireless signal fluctuations, or communication disconnections. The preset GPIO pin is specifically used to monitor the network connection status and overall operating status of the meter slave node in real time. By observing the high and low voltage changes of the pin level, it intuitively and accurately characterizes abnormal operating conditions such as meter disconnection from the network, network anomalies, and device restarts.
[0138] In this embodiment, the target meter slave node's Bluetooth unit incorporates three preset GPIO pins: a first input pin, a first output pin, and a second input pin. The first input pin receives a level mode switching signal from the slave control unit; a high level indicates the device is in transparent transmission mode, and a low level indicates the device is in command mode. The first output pin outputs a network connection status indication signal to the slave control unit; a low level indicates the device is in online network status, and a high level indicates the device is offline. The second input pin receives a network reset signal from the slave control unit and is normally low. When it outputs a high-level pulse lasting 2 seconds, it triggers the slave Bluetooth unit to restart the network initialization and network access process.
[0139] Furthermore, the slave control unit continuously monitors the voltage status of the first output pin in real time, determines the node's offline status through hardware level changes, and sets the level of the second input pin to high level and maintains it for a preset duration when an abnormal level jump is detected, thereby triggering the slave Bluetooth unit to perform a network reset operation. This enables the slave node to autonomously restart and quickly reconnect when the communication link fails, ensuring rapid restoration of connection in the event of communication abnormalities.
[0140] In this application, a dual-redundancy fault detection mechanism, combining hardware and software, is constructed. Even if the serial port software communication is abnormal, the offline fault can still be accurately identified through hardware pins, improving the reliability and stability of fault detection. The hardware GPIO pins directly determine the device status from the underlying hardware operating level, avoiding misjudgments and missed judgments caused by software heartbeat packet loss and signal interference. This significantly improves the real-time performance and accuracy of offline fault identification, providing a reliable hardware triggering basis for subsequent automatic self-healing and network reconfiguration.
[0141] Step S112: If the voltage status meets the preset networking conditions, return to the step of sending a parameter request frame to the main control unit.
[0142] It should be noted that the networking conditions are hardware level threshold conditions that are locally fixed in the slave control unit. These are the core criteria for determining whether the meter is disconnected from the network and needs to be restarted for repair. They correspond to fault states such as abnormal GPIO pin voltage and level jumps.
[0143] In this embodiment, the slave control unit continuously monitors the level of the first output pin. When a high level is detected, it determines that the target meter slave node is offline. The second input pin is set to a high level and held for 2 seconds before being pulled low, so that the slave Bluetooth unit detects a falling edge pulse. This triggers the slave Bluetooth unit to restart the initialization process, automatically executes the step of sending a parameter request frame to the master control unit, restarts the network initialization and network access process, completes the automatic re-entry process of the target meter slave node, and restores the low level of the first output pin after successful re-entry to indicate that the device has returned to the network online state, thus completing the entire automatic re-entry closed loop.
[0144] In this application, a hardware-triggered automatic re-entry mechanism is used to achieve second-level self-healing of offline nodes, eliminating the need for manual on-site troubleshooting or reset operations. This upgrades the traditional minute-level manual fault recovery to second-level automatic recovery, significantly reducing on-site maintenance workload and truly achieving maintenance-free self-healing operation of the equipment.
[0145] Furthermore, this hardware self-healing mechanism forms a closed loop with the aforementioned event-driven reporting: first, it captures off-network events with millisecond-level responses and accurately attributes the causes; then, it triggers second-level reconnection with physical layer pulses, leaping from "passive alarm" to "active repair," completely completing the final step of fault diagnosis and recovery. This closed-loop design of "diagnosis-attribution-repair" significantly improves the robustness and long-term operational stability of the corresponding network in complex electromagnetic environments.
[0146] In summary, this application discloses a network communication method based on a data collector. The data collector includes a main control unit and a main Bluetooth unit. When applied to the main control unit, the method includes the following steps: receiving a parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the data collector; returning a parameter response frame to the main Bluetooth unit in response to the parameter request frame, the parameter response frame carrying the host address; sending a network mode activation command to the main Bluetooth unit, the network mode activation command being used to instruct the main Bluetooth unit to perform a scan of the electricity meter slave nodes and obtain the node scan results; receiving the node scan results returned by the main Bluetooth unit in response to the network mode activation command, and determining the target electricity meter slave node and controlling the target electricity meter slave node to join the network based on the node scan results and a preset network access strategy, the node scan results including the unique identifier and signal strength of the current electricity meter slave node; and sending a service communication command to the main Bluetooth unit to establish a data transmission channel between the main Bluetooth unit and the target electricity meter slave node. This method effectively reduces the computational burden and power consumption of the main Bluetooth unit by centralizing the network access decision-making power to the main control unit, thereby improving network efficiency and communication stability. This method overcomes the technical bias of traditional Bluetooth modules making independent network access decisions by centralizing network access decision-making power to the main control unit, breaking down the information silo between the physical layer and the application layer, and achieving precise control of physical connections by the application layer. Simultaneously, it constructs a collaborative system featuring hybrid transmission, hardware self-healing, and proactive reporting, forming a closed-loop solution covering the entire lifecycle from networking, communication, maintenance to diagnostics.
[0147] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0148] In one embodiment, a network communication device based on a data collector is provided. The data collector includes a main control unit and a main Bluetooth unit. This network communication device is applicable to the main control unit, and it corresponds one-to-one with the network communication methods applicable to the main control unit in the above embodiments. Figure 13 As shown, the network communication device includes a request receiving module 101, a request response module 102, a first network initiation module 103, a node network entry module 104, and a first communication initiation module 105. Detailed descriptions of each functional module are as follows: The request receiving module 101 is used to receive parameter request frames sent by the main Bluetooth unit. The parameter request frames are used to request the main control unit to return the host address of the collector.
[0149] The request and response module 102 is used to return a parameter response frame to the main Bluetooth unit in response to the parameter request frame. The parameter response frame carries the host address.
[0150] The first network startup module 103 is used to send a network mode start command to the main Bluetooth unit. The network mode start command is used to instruct the main Bluetooth unit to perform a meter slave node scan and obtain the node scan results.
[0151] The node network entry module 104 is used to receive the node scanning results returned by the master Bluetooth unit for the network mode opening command, and determine the target electricity meter slave node and control the target electricity meter slave node to enter the network according to the node scanning results and the preset network entry strategy. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node.
[0152] The first communication startup module 105 is used to send a service communication command to the master Bluetooth unit to establish a data transmission channel between the master Bluetooth unit and the target meter slave node.
[0153] In another embodiment, a network communication device based on a data collector is provided. The data collector includes a main control unit and a main Bluetooth unit. This network communication device is applicable to the main Bluetooth unit, and it corresponds one-to-one with the network communication methods applicable to the main Bluetooth unit in the above embodiments. Figure 14 As shown, the network communication device includes a parameter request module 106, a second network startup module 107, a node scanning module 108, and a second communication startup module 109. Detailed descriptions of each functional module are as follows: The parameter request module 106 is used to send a parameter request frame to the main control unit. The parameter request frame is used to request the main control unit to return the host address of the data collector.
[0154] The second network startup module 107 is used to receive a network mode start command sent by the main control unit if it receives a parameter response frame returned by the main control unit in response to the parameter request frame. The parameter response frame carries the host address, and the network mode start command is used to instruct the main Bluetooth unit to perform meter slave node scanning and obtain node scanning results.
[0155] The node scanning module 108 is used to scan the electricity meter slave nodes in response to the network mode start command, obtain the node scanning results, and return the node scanning results to the main control unit. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. The node scanning results are used by the main control unit to determine the target electricity meter slave node and control the target electricity meter slave node to enter the network based on the node scanning results and the preset network access strategy.
[0156] The second communication startup module 109 is used to receive business communication instructions sent by the main control unit in order to establish a data transmission channel between the main Bluetooth unit and the target meter slave node.
[0157] Specific limitations regarding the network communication device can be found in the limitations of the network communication method described above, and will not be repeated here. Each module in the aforementioned network communication device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0158] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 15 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a network communication method.
[0159] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer device is configured as a main control unit, the processor executes the computer program to implement the networking communication method applicable to the main control unit described in the above embodiments, for example... Figure 2 S1-S5, as shown, will not be repeated here to avoid repetition. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in this embodiment of the network communication device suitable for the main control unit, for example... Figure 13 The functions of the request receiving module 101, request response module 102, first network startup module 103, node network entry module 104, and first communication startup module 105 shown are not described again here to avoid repetition.
[0160] In another embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer device is configured as a main Bluetooth unit, the processor executes the computer program to implement the networking communication method applicable to the main Bluetooth unit described in the above embodiments, for example... Figure 7 S6-S9, as shown, will not be repeated here to avoid repetition. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in this embodiment of the networking communication device suitable for the main Bluetooth unit, for example... Figure 14The functions of the parameter request module 106, the second network startup module 107, the node scanning module 108, and the second communication startup module 109 shown are not described again here to avoid repetition.
[0161] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the network communication method based on a data collector as described in the above embodiments, for example... Figure 2 As shown in S1-S5, or Figure 7 S6-S9, as shown, will not be repeated here to avoid repetition. Alternatively, when this computer program is executed by the processor, it implements the functions of each module / unit in this embodiment of the network communication device based on the data collector, for example... Figure 13 The functions of the request receiving module 101, request response module 102, first network startup module 103, node network entry module 104, and first communication startup module 105 shown are as follows: Figure 14 The functions of the parameter request module 106, the second network startup module 107, the node scanning module 108, and the second communication startup module 109 shown are not described again here to avoid repetition. The computer-readable storage medium can be non-volatile or volatile.
[0162] 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. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application 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), etc.
[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0164] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0165] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A network communication method based on a data collector, characterized in that, The data collector includes a main control unit and a main Bluetooth unit. The networking communication method is applicable to the main control unit and includes the following steps: The system receives a parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the collector; Return a parameter response frame to the main Bluetooth unit in response to the parameter request frame, the parameter response frame carrying the host address; Send a network mode enable command to the master Bluetooth unit. The network mode enable command is used to instruct the master Bluetooth unit to perform a meter slave node scan and obtain the node scan results. The system receives the node scanning results returned by the main Bluetooth unit in response to the network mode activation command, and determines the target electricity meter slave node and controls the target electricity meter slave node to join the network based on the node scanning results and the preset network access strategy. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. Send a service communication command to the master Bluetooth unit to establish a data transmission channel between the master Bluetooth unit and the target meter slave node.
2. The networking communication method according to claim 1, characterized in that, When the node scan result includes the unique identifier of the current electricity meter, the preset network access strategy includes a first network access strategy. The step of determining the target electricity meter slave node based on the node scan result and the preset network access strategy includes: Based on the first network access strategy, the current unique identifier of the electricity meter is compared with the preset whitelist to obtain the identifier comparison result; the preset whitelist stores the unique identifiers of target electricity meter slave nodes that are allowed to access the collector. If the identification comparison result indicates that the unique identifier of the current electricity meter is the unique identifier of the target electricity meter that exists in the preset whitelist, then the current electricity meter slave node is determined as the target electricity meter slave node.
3. The networking communication method according to claim 1, characterized in that, When the node scan result includes the current meter signal strength, the preset network access strategy includes a second network access strategy. The step of determining the target meter slave node based on the node scan result and the preset network access strategy includes: Based on the second network access strategy, the current meter signal strength is compared with a preset critical threshold to obtain the signal comparison result; If the signal comparison result indicates that the current meter signal strength is greater than the preset critical threshold, then the current meter slave node is determined as the target meter slave node.
4. The networking communication method according to claim 1, characterized in that, When the node scan result includes the unique identifier of the current electricity meter and the signal strength of the current electricity meter, the preset network access strategy includes a third network access strategy. The step of determining the target electricity meter slave node based on the node scan result and the preset network access strategy includes: Based on the third network access strategy, the unique identifier of the current electricity meter is compared with a preset whitelist to obtain the identifier comparison result, and the signal strength of the current electricity meter is compared with a preset critical threshold to obtain the signal comparison result; the preset whitelist stores the unique identifiers of target electricity meters that are allowed to access the collector slave nodes; If the identifier comparison result indicates that the unique identifier of the current meter exists in the preset whitelist, and the signal comparison result indicates that the signal strength of the current meter is greater than the preset critical threshold, then the current meter slave node is determined as the target meter slave node.
5. The networking communication method according to claim 1, characterized in that, The control of the target meter to enter the network from the node includes: The master Bluetooth unit sends a network access permission command to the master Bluetooth unit. The network access permission command is used to instruct the master Bluetooth unit to send a network access request to the target meter slave node, and to receive network access confirmation information returned by the target meter slave node in response to the network access request. The network access request is used to request the target meter slave node to perform a network access operation. The network access confirmation information is used to indicate that the target meter slave node has successfully performed the network access operation, and to instruct the master Bluetooth unit to send node network access information to the master control unit. The node network entry information returned by the master Bluetooth unit is received. The node network entry information carries the unique identifier of the target meter slave node.
6. A network communication method based on a data collector, characterized in that, The data collector includes a main control unit and a main Bluetooth unit. The networking communication method is applicable to the main Bluetooth unit and includes the following steps: Send a parameter request frame to the main control unit, the parameter request frame being used to request the main control unit to return the host address of the collector; If a parameter response frame is received from the main control unit in response to the parameter request frame, a network mode enable command sent by the main control unit is received. The parameter response frame carries the host address. The network mode enable command is used to instruct the main Bluetooth unit to perform a meter slave node scan and obtain the node scan results. In response to the network mode activation command, the meter slave node is scanned to obtain the node scan results, and the node scan results are returned to the main control unit. The node scan results include the current unique identifier of the current meter slave node and the current meter signal strength. The node scan results are used by the main control unit to determine the target meter slave node and control the target meter slave node to enter the network based on the node scan results and the preset network access strategy. The system receives business communication instructions sent by the main control unit to establish a data transmission channel between the main Bluetooth unit and the target meter slave node.
7. The networking communication method according to claim 6, characterized in that, The data transmission channel includes a network broadcast channel, a point-to-point transmission channel, and a one-way broadcast channel. After establishing the data transmission channel between the master Bluetooth unit and the target meter slave node, it further includes: If the number of bytes of the data to be transmitted is less than a preset byte threshold and the transmission frequency is lower than a preset frequency threshold, then the data to be transmitted is received through the network broadcast channel. If the amount of data to be transmitted is greater than a preset data threshold, or the transmission frequency is higher than a preset frequency threshold, and bidirectional interaction is required, then the data to be transmitted will be received through the point-to-point transmission channel. If the data to be transmitted is a general, brief public notification, then the data to be transmitted is received through the one-way broadcast channel.
8. The networking communication method according to claim 7, characterized in that, The networking communication method further includes: Receive the point-to-point connection command sent by the main control unit, wherein the point-to-point connection command carries the unique identifier of the target meter slave node; In response to the point-to-point connection command, a point-to-point transmission channel is established with the target meter slave node.
9. The networking communication method according to claim 7, characterized in that, The networking communication method further includes: Receive a long data transmission request frame sent by the target meter slave node, the long data transmission request frame being used to instruct the target meter slave node to request the establishment of the point-to-point transmission channel with the master Bluetooth unit; A long data transmission response frame is sent to the target meter slave node. The long data transmission response frame is used to confirm the establishment of the point-to-point transmission channel and instruct the target meter slave node to send the data to be transmitted through the point-to-point transmission channel.
10. The networking communication method according to claim 6, characterized in that, The target electricity meter's connection to the network from the node includes: The system receives a network access permission instruction sent by the main control unit. The network access permission instruction is used to instruct the main Bluetooth unit to send a network access request to the target meter slave node. In response to the network access permission instruction, a network access request is sent to the target meter slave node, the network access request being used to request the target meter slave node to perform a network access operation; Receive network access confirmation information returned by the target meter slave node in response to the network access request. The network access confirmation information is used to indicate that the target meter slave node has successfully performed the network access operation. The node network entry information is sent to the main control unit. The node network entry information carries the unique identifier of the target meter slave node.
11. The networking communication method according to claim 6, characterized in that, The networking communication method further includes: Detect the node connection status of the target meter from the node; If the node connection status changes from connected to offline, a node disconnection notification is sent to the master control unit. The node disconnection notification carries the unique identifier of the target meter slave node and the node disconnection reason code.
12. The networking communication method according to claim 6, characterized in that, The networking communication method further includes: Detect the voltage state of the preset GPIO pin of the target meter slave node; If the voltage state meets the preset networking conditions, then return to the step of sending a parameter request frame to the main control unit.
13. A network communication device based on a data collector, characterized in that, The data collector includes a main control unit and a main Bluetooth unit. The networking communication device is adapted to the main control unit and includes: The request receiving module is used to receive the parameter request frame sent by the main Bluetooth unit, the parameter request frame being used to request the main control unit to return the host address of the collector; The request and response module is used to return a parameter response frame to the main Bluetooth unit in response to the parameter request frame, wherein the parameter response frame carries the host address; The first network startup module is used to send a network mode start command to the main Bluetooth unit. The network mode start command is used to instruct the main Bluetooth unit to perform a meter slave node scan and obtain the node scan results. The node network entry module is used to receive the node scanning results returned by the master Bluetooth unit for the network mode activation command, and determine the target electricity meter slave node and control the target electricity meter slave node to enter the network according to the node scanning results and the preset network entry strategy. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. The first communication initiation module is used to send a service communication command to the master Bluetooth unit to establish a data transmission channel between the master Bluetooth unit and the target meter slave node.
14. A network communication device based on a data collector, characterized in that, The data collector includes a main control unit and a main Bluetooth unit. The networking communication device is adapted to the main Bluetooth unit and includes: The parameter request module is used to send a parameter request frame to the main control unit, and the parameter request frame is used to request the main control unit to return the host address of the collector; The second network startup module is used to receive a network mode start command sent by the main control unit if it receives a parameter response frame returned by the main control unit in response to the parameter request frame. The parameter response frame carries the host address, and the network mode start command is used to instruct the main Bluetooth unit to perform meter slave node scanning and obtain node scanning results. The node scanning module is used to scan the electricity meter slave nodes in response to the network mode activation command, obtain the node scanning results, and return the node scanning results to the main control unit. The node scanning results include the current electricity meter unique identifier and the current electricity meter signal strength of the current electricity meter slave node. The node scanning results are used by the main control unit to determine the target electricity meter slave node and control the target electricity meter slave node to enter the network based on the node scanning results and the preset network access strategy. The second communication startup module is used to receive the business communication command sent by the main control unit to establish a data transmission channel between the main Bluetooth unit and the target meter slave node.
15. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer device is configured as the main control unit, the processor executes a computer program to implement the networking communication method as described in any one of claims 1 to 5; or, when the computer device is configured as the main Bluetooth unit, the processor executes a computer program to implement the networking communication method as described in any one of claims 6 to 12.
16. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the networking communication method as described in any one of claims 1 to 12.