Equipment network distribution method and device, electronic equipment, storage medium and computer product
By simplifying the open system interconnection model at different levels and developing a private data message format, the problem of high power consumption during device network configuration is solved, achieving a low-power and efficient device network configuration process.
Patent Information
- Application Number
- CN202510004743.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-12-16
AI Technical Summary
The current equipment consumes a lot of power during network configuration, especially due to the need to perform multiple scans and connect to hotspots, as well as to start services such as CoAP, MQTT, and HTTP.
By simplifying the open systems interconnection model at different levels, a private data message format is developed, and the data message is broadcast on the target channel. The target protocol is used to determine the device address of the target network management device for network configuration, thereby reducing the dependence on services such as CoAP, MQTT, and HTTP.
It reduces the power consumption of the equipment in the distribution network, reduces the amount of data transmitted, improves the efficiency and reliability of the distribution network process, and shortens the distribution network time.
Smart Images

Figure CN121151996A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a device network distribution method, apparatus, electronic device, storage medium and computer product. Background Technology
[0002] With the rapid development of communication technology and the widespread adoption of home Internet of Things (IoT) devices, connecting smart devices to the network has become the foundation of whole-house intelligence. Currently, smart devices can be configured for network access via a bootstrap hotspot, a process known as seamless configuration. A bootstrap hotspot is a hidden hotspot emitted by a home Wireless Fidelity (Wi-Fi) router or gateway after power-on initialization. Users bind this router or gateway using an application (APP). Once the device is powered on, it scans for and connects to this bootstrap hotspot to initiate a network access request. After verifying the device's legitimacy, the platform sends Wi-Fi hotspot information to the device. Upon receiving the Service Set Identifier (SSID) and password, the device connects to this hotspot to complete the device binding and network connection.
[0003] However, the method of configuring the network by guiding hotspot channels requires one scan and two hotspot connections during the entire configuration process. Furthermore, the devices access the network as STA nodes using a complete 7-layer Open Systems Interconnection (OSI) model. The configuration process requires starting services such as CoAP, MQTT, and HTTP, resulting in high power consumption during current device configuration. Here, STA (Station) refers to a terminal device connected to a wireless network in a wireless LAN. CoAP (Constrained Application Protocol) is a World Wide Web-like protocol in the Internet of Things (IoT) world. MQTT (Message Queuing Telemetry Transport) is a standards-based message passing protocol. HTTP (HyperText Transfer Protocol) is a protocol used for distributed, collaborative, hypermedia information systems. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the related art. To this end, this application proposes a device network configuration method, apparatus, electronic device, storage medium, and computer product to solve the problem of high power consumption during current device network configuration and achieve a reduction in device network configuration power consumption.
[0005] The device network configuration method according to the first aspect of this application includes: Determine the target channel where the network management device with the highest received signal strength indication within a preset range is located; Broadcast data packets are constructed using a proprietary data packet format and broadcast on the target channel. The proprietary data packet format is based on a target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection (OSI) model. The target network management device is determined from the network management devices that return response messages based on the broadcast data messages; Network configuration is performed based on the target protocol and the device address of the target network management device.
[0006] According to one embodiment of this application, determining the target channel where the network management device with the highest received signal strength indication within a preset range is located includes: Scan for hotspot information emitted by network management devices within a preset range; The receiving signal strength indicator with the largest value among the receiving signal strength indicators corresponding to each hotspot information is determined as the target receiving signal strength indicator; The channel where the network management device corresponding to the target received signal strength indication is located is determined as the target channel.
[0007] According to one embodiment of this application, determining the target network management device from the network management devices that return response messages based on the broadcast data packets includes: Candidate network management devices are determined from the network management devices that return response messages based on the broadcast data packets, according to the received signal strength indication of each network management device that returns response messages based on the broadcast data packets. Obtain the transmit power of each candidate network management device from its response message; Based on the information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device, the distance to the corresponding candidate network management device is determined. The target network management device is determined from among the candidate network management devices based on the distance between them.
[0008] According to one embodiment of this application, when determining the distance to a corresponding candidate network management device based on information receiving sensitivity and the corresponding transmit power and received signal strength indications for each candidate network management device, the following operations are performed for each candidate network management device: Add the transmit power of the current candidate network management device to the first constant to obtain the first result; Subtracting the first result from the information receiving sensitivity yields the second result; Subtract the second result from the received signal strength indication of the current candidate network management device to obtain the third result; The third result is compared with the fourth result to obtain the fifth result; the fourth result is the product of a preset threshold and a second constant. The preset power value of the fifth result is determined as the distance to the current candidate network management device.
[0009] According to one embodiment of this application, determining the target network management device from among the candidate network management devices based on the distance between each candidate network management device includes: The distance with the smallest value among the distances to each candidate network management device is determined as the target distance; The candidate network management device corresponding to the target distance is determined as the target network management device.
[0010] According to one embodiment of this application, the network configuration based on the target protocol and the device address of the target network management device includes: Based on the target protocol, a network access request is initiated to the target network management device using the device address of the target network management device; Receive the network access notification returned by the target network management device based on the network access request.
[0011] According to an embodiment of the second aspect of this application, the device for network distribution includes: The first determining module is used to determine the target channel where the network management device with the highest received signal strength indication within a preset range is located; The broadcast module is used to construct broadcast data packets using a proprietary data packet format and broadcast the broadcast data packets on the target channel; the proprietary data packet format is based on a target protocol; the target protocol is obtained by hierarchical multiplexing after hierarchical simplification of the Open Systems Interconnection model; The second determining module is used to determine the target network management device from network management devices that return response messages based on the broadcast data message; The network distribution module is used to perform network distribution based on the target protocol and the device address of the target network management device.
[0012] An electronic device according to a third aspect of this application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described device network configuration methods.
[0013] According to a fourth aspect of this application, the storage medium is a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the device network configuration method as described above.
[0014] A computer product according to a fifth aspect of this application includes a computer program that, when executed by a processor, implements a device network configuration method as described above.
[0015] The above-described one or more technical solutions in the embodiments of this application have at least the following technical effects: By simplifying and reusing the Open Systems Interconnection (OSI) model hierarchically, a target protocol is obtained. A proprietary data packet format is then developed based on this protocol. This allows for the construction of broadcast data packets using the proprietary format, once the target channel of the network management device with the strongest received signal strength within a preset range is identified, and broadcast on the target channel. The target network management device can then be identified from the network management devices that respond to the broadcast data packet. Network configuration can then be performed based on the target protocol and the device address of the target network management device. This simplification of the OSI model eliminates the need to initiate services such as CoAP, MQTT, and HTTP during network configuration, reducing service power consumption. Furthermore, the proprietary data packet format enables link-layer management frame-based communication, allowing devices to communicate based on their device addresses, significantly reducing the amount of data transmitted and lowering power consumption. Therefore, network configuration power consumption can be reduced.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of the device network configuration method provided in the embodiments of this application.
[0019] Figure 2 This is a schematic diagram of the privatized data packet format in the device network configuration method provided in the embodiments of this application.
[0020] Figure 3This is a schematic diagram of the overall process of the device network distribution method provided in the embodiments of this application.
[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0022] The embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but should not be used to limit the scope of this application.
[0023] In the description of the embodiments of this application, it should be noted that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application. In addition, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0024] In the description of the embodiments of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this application based on the specific circumstances.
[0025] In the embodiments of this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0026] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the embodiments of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0027] This application discloses a device for network distribution, an electronic device, a storage medium, and a computer product.
[0028] Figure 1 This is a schematic flowchart of the device network configuration method provided in the embodiments of this application, such as... Figure 1 As shown, the network distribution method for this device includes: Step 110: Determine the target channel where the network management device with the highest received signal strength indication within the preset range is located.
[0029] Step 120: Construct a broadcast data packet using a privatized data packet format and broadcast the broadcast data packet on the target channel; the privatized data packet format is based on the target protocol; the target protocol is obtained by hierarchical simplification and reuse of the Open Systems Interconnection model.
[0030] Step 130: Determine the target network management device from the network management devices that return response messages based on broadcast data packets.
[0031] Step 140: Configure the network based on the target protocol and the device address of the target network management device.
[0032] It should be noted that the device network configuration method provided in this application embodiment can be executed by a smart device, which may include, but is not limited to, IoT smart devices such as cameras, robot vacuums, speakers, body fat scales, etc.
[0033] The smart device of this application can be equipped with or connected to a device distribution network device, thereby controlling the device distribution network device to execute the device distribution network method of this application.
[0034] In this application, the 7-layer OSI model can be simplified beforehand. Specifically, the network layer, transport layer, session layer, and presentation layer can be removed from the 7-layer OSI model, retaining the physical layer, data link layer, and application layer. Furthermore, the retained physical layer, data link layer, and application layer are reused to obtain a simplified 802.11 Wi-Fi protocol (which can also be referred to as a minimalist protocol in this application) as the target protocol.
[0035] The physical layer defines physical characteristics, such as 0 and 1 electrical signals; the data link layer includes device drivers in the operating system and corresponding network interfaces, and has functions such as establishing, maintaining, tearing down, frame packaging, transmission, synchronization and error recovery of data links; the application layer is responsible for establishing and managing the network topology, maintaining communication paths between devices, security management, control and reporting functions.
[0036] Furthermore, the data link layer of the simplified protocol in this application reuses the data link layer in the OSI model, but adjusts the data packet format according to the specific requirements of the simplified protocol to formulate a private data packet format, so that the application layer can receive and send private data through Wi-Fi management frames.
[0037] Figure 2 This is a schematic diagram of the privatized data packet format in the device network configuration method provided in this application embodiment, such as... Figure 2 As shown, the format of the link layer frame data in this application is as follows: 2-bit (Byte) Frame Control field, 2-bit Duration field, 6-bit Destination MAC (Media Access Control) address, 6-bit Source MAC address, 6-bit Basic Service Set Identifier (BSSID), 2-bit Sequence Number (Seq), n-bit Frame Body, and 4-bit Frame Check Sequence (FCS).
[0038] The message element in the frame body contains the following: ID (1 Byte): Identifier used to indicate the type of message element.
[0039] Len (1 Byte): Length, indicating the length of the Value field in this message element, i.e. how many bytes of data the Value field contains.
[0040] OUI (3 Bytes): Organizationally Unique Identifier, used to identify a manufacturer or organization.
[0041] Value (n Byte): This is the actual data carried in the message element, and its content and format depend on the type specified by the ID field.
[0042] Furthermore, in the management frame message body, the Value field of message element ID 221 is filled with communication data of the simplified protocol, and the Magic Num field in the data format is fixed. In this way, communication data can be sent and received through the link layer management frame.
[0043] Specifically, the Value can include: Magic Num (4 Bytes): a magic number used to identify the start and format of the datagram.
[0044] Source (6 Bytes): The source MAC address, which is the same as the source address in the link layer frame format.
[0045] Destination (6 Bytes): Destination MAC address, which is the same as the destination address in the link layer frame format.
[0046] Type (1 Byte): Type or service number, which may be used to distinguish different services or protocols.
[0047] Seq (1 Byte): Sequence number, used for frame order control.
[0048] Num (1 Byte): Represents the number of elements in an array or list.
[0049] Count (1 Byte): Used to limit or specify the maximum number of data items in a field.
[0050] Timestamp (4 Byte): A timestamp that records the time the datagram was created.
[0051] Command (1 Byte): Used to indicate the specific operation or type of the message. Encrypt (1 Byte): Indicates that the message data is encrypted during transmission.
[0052] PowerTx (1 Byte): Transmit power, used to indicate transmit power in wireless networks.
[0053] Length (2 Byte): Length, indicating the length of the data portion.
[0054] Data (n Byte): Data, the actual data content transmitted.
[0055] The content of data in a Data application can include: Type (2 Bytes): Type, indicating the type or protocol of the data.
[0056] Len (1 Byte): Length, indicating the length of the data in this field.
[0057] Value (n Byte): The value, the actual data content.
[0058] Furthermore, the aforementioned simplified protocol and the established proprietary data packet format can be configured into smart devices, enabling all data interactions between smart devices and network management devices such as routers / gateways to be transmitted using Probe Request frames throughout the entire network configuration and management process. A Probe Request frame is a management frame in Wi-Fi networks, primarily used by devices during active scanning to broadcast the SSID of the wireless network they wish to connect to.
[0059] Understandably, the smart devices that require network distribution in this application can be referred to as devices to be distributed.
[0060] Therefore, after the device is powered on and initialized for the first time, it can enable STA mode. STA mode, short for Station mode, is the working mode in a Wi-Fi network where the device acts as a client connecting to an existing wireless network. In STA mode, the device can receive wireless signals from other devices or routers and access the network or other network resources through that wireless network.
[0061] Furthermore, the device to be configured on the network can scan for hotspot information emitted by network management devices such as routers or gateways within a preset range (specifically, a range where signals can be received). Based on the received signal strength indication in each hotspot information, the channel where the network management device with the highest received signal strength indication is located is determined as the target channel.
[0062] Furthermore, disable STA mode and enable Monitor promiscuous mode. Monitor mode is a special operating mode that allows the device to listen to all data packets passing through its wireless interface, regardless of whether these packets are intended for the device. This mode is typically used for network analysis and troubleshooting because it captures all traffic on the network, including non-broadcast and non-multicast packets. Promiscuous mode is a network monitoring mode that allows the device to capture and analyze all data packets passing through the wireless network, regardless of whether these packets are intended for the device. In promiscuous mode, the device can receive all data packets sent by other devices, including broadcast and multicast packets.
[0063] Disabling STA mode and enabling Monitor promiscuous mode means that the device will no longer connect to the wireless network as a client, but will instead become a listener that can capture all data packets passing through its wireless interface.
[0064] Furthermore, the device to be distributed can construct broadcast data packets using a proprietary data packet format and broadcast them single-channel in the target channel via a data link layer management frame, with a preset broadcast period. After the broadcast ends, obtain the Received Signal Strength Indication (RSSI) values from all broadcast responses within the threshold range. Response messages from candidate network management devices within the scope.
[0065] Furthermore, the device to be distributed can determine its distance from each candidate network management device based on its information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device.
[0066] The target network management device is further determined from among the candidate network management devices based on the distance between them.
[0067] Furthermore, the device to be configured can initiate a network access request to the target network management device through a simplified protocol based on the device address of the target network management device, and complete the network configuration after the target network management device determines that the device to be configured has passed the verification based on the network access request.
[0068] According to the device network configuration method of this application embodiment, a target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection (OSI) model. A private data packet format is then formulated based on the target protocol. After determining the target channel where the network management device with the highest received signal strength indication within a preset range is located, a broadcast data packet can be constructed using the private data packet format and broadcast on the target channel. This allows the target network management device to be identified from network management devices that return response packets based on the broadcast data packet. Therefore, network configuration can be performed based on the target protocol and the device address of the target network management device. By simplifying the OSI model, the network configuration process does not require the initiation of services such as CoAP, MQTT, and HTTP, thus reducing service power consumption. Furthermore, the private data packet format formulated based on the target protocol enables communication technology based on link-layer management frames, allowing devices to communicate based on device addresses, significantly reducing the amount of data transmitted and lowering transmission power consumption. Therefore, device network configuration power consumption can be reduced.
[0069] In addition, this application adopts a three-layer simplified Wi-Fi protocol for communication, which has the security of data transmission. Besides reducing the power consumption of communication transmission, it also shortens the network configuration time and improves the success rate and reliability of correct device binding.
[0070] Based on the above embodiments, determining the target channel where the network management device with the highest received signal strength indication within a preset range is located includes: Scan for hotspot information emitted by network management devices within a preset range; The receiving signal strength indicator with the largest value among the receiving signal strength indicators corresponding to each hotspot information is determined as the target receiving signal strength indicator; The channel where the network management device corresponding to the target received signal strength indicator is located is determined as the target channel.
[0071] Specifically, in this application, the device to be configured on the network can scan for hotspot information with the service set identifier "CMCC-GUIDE-LINK" issued by network management devices such as routers / gateways within a preset range of the surrounding environment, with a preset scanning period. After the scan is completed, the receiver signal strength indicator with the highest RSSI value (i.e., the strongest signal) in each hotspot information is identified as the target receiver signal strength indicator. The channel of the router / mesh corresponding to the target receiver signal strength indicator is then determined as the target channel, i.e., the optimal channel. Simultaneously record the optimal RSSI value. .
[0072] This application selects the optimal channel based on the received signal strength indication, which can reduce interference with other wireless devices. It can then construct broadcast data packets using a proprietary data packet format and broadcast the broadcast data packets on the target channel. This allows the target network management device to be identified from the network management devices that return response packets based on the broadcast data packets. As a result, network allocation can be performed based on the target protocol and the device address of the target network management device, which helps to improve the accuracy of network allocation.
[0073] Based on the above embodiments, determining the target network management device from network management devices that return response messages based on broadcast data packets includes: Based on the received signal strength indication of each network management device that returns response messages based on broadcast data packets, candidate network management devices are determined from the network management devices that return response messages based on broadcast data packets; Obtain the transmit power of each candidate network management device from its response message; Based on the information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device, the distance to the corresponding candidate network management device is determined. The target network management device is determined from among the candidate network management devices based on the distance between them.
[0074] Specifically, in this application, the device to be configured in the network can obtain the received signal strength indication when each network management device returns a response message based on a broadcast data message, and set the received signal strength indication at a threshold. Network management devices within the specified range are identified as candidate network management devices. Here, R is a value set according to actual needs, for example, it could be -10.
[0075] Meanwhile, the device to be distributed can obtain its sensitivity to receiving information, which is known after the device is initialized.
[0076] In this application, the device to be configured on the network can parse the received response message, extract the value of the PowerTx field of the private data packet format from the response message, and obtain the transmission power of the corresponding network management device, which is the transmission power of the transmission source (router / gateway).
[0077] Furthermore, based on the information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device, combined with the location estimation algorithm, the distance to the corresponding candidate network management device can be determined.
[0078] Furthermore, based on the distance, one device can be selected from the candidate network management devices as the target network management device.
[0079] This application uses information such as the true RSSI value, transmit power, and receive sensitivity of different routers / gateways under optimal channel conditions, and employs an RSSI model-based location estimation algorithm to calculate the distance of the scanned router / gateway devices within a single period, thereby determining the target network management device. It fully considers the impact of spatial environment and multipath effects of wireless signal transmission, accurately obtains the distance between the device to be configured and the router / gateway, improves the reliability of the scanning and connection phases, and reduces the probability of the device to be configured being mistakenly bound to a neighbor's device.
[0080] Based on the above embodiments, when determining the distance to the corresponding candidate network management device based on the information receiving sensitivity and the corresponding transmit power and received signal strength indication of each candidate network management device, the following operations are performed for each candidate network management device: Add the transmit power of the current candidate network management device to the first constant to obtain the first result; Subtracting the first result from the information receiving sensitivity yields the second result; Subtract the second result from the received signal strength indication of the current candidate network management device to obtain the third result; The third result is compared with the fourth result to obtain the fifth result; the fourth result is the product of the preset threshold and the second constant. The preset power value of the fifth result is determined as the distance to the current candidate network management device.
[0081] Specifically, when determining the distance to a candidate network management device based on information receiving sensitivity and the corresponding transmit power and received signal strength indication for each candidate network management device, this application calculates the distance for each candidate network management device using the following expression based on the RSSI model position estimation algorithm: ; in, The known quantity is the received packet. , refers to the actual value of the signal strength indicator of the broadcast response received by the device in the distribution network after it sends a message via broadcast; To determine the transmission power of the transmitter, the register value of the PowerTx field in the data format is extracted after parsing the broadcast response message; The receiving sensitivity of the device to be distributed to the network is known after the device is initialized; is the distance between the device to be networked and the router / gateway; n is a constant, the path attenuation factor for wireless signal transmission, whose value varies due to multipath effects, temperature, humidity, light, etc., and is usually taken as . In the experiment, 2.5 was used; It is an environmental impact factor and is a constant.
[0082] Based on this, the distance to each candidate network management device can be determined separately.
[0083] This application uses information such as the true RSSI value, transmit power, and receive sensitivity of different routers / gateways under optimal channel conditions, and employs an RSSI model-based location estimation algorithm to calculate the distance of the scanned router / gateway devices within a single period, thereby determining the target network management device. It fully considers the impact of spatial environment and multipath effects of wireless signal transmission, accurately obtains the distance between the device to be configured and the router / gateway, improves the reliability of the scanning and connection phases, and reduces the probability of the device to be configured being mistakenly bound to a neighbor's device.
[0084] Based on the above embodiments, determining the target network management device from among the candidate network management devices based on the distance to each candidate network management device includes: The distance with the smallest value among the distances to each candidate network management device is determined as the target distance; The candidate network management device corresponding to the target distance is identified as the target network management device.
[0085] Specifically, in this application, the device to be configured in the network can determine the minimum distance among the distances between itself and each candidate network management device as the target distance, i.e., the shortest distance. Furthermore, the candidate network management device corresponding to the target distance is determined as the target network management device (i.e., the locally optimal router / gateway).
[0086] This application identifies the candidate network management device with the shortest distance as the target network management device. Since the closer the distance, the stronger the signal strength is usually, it helps to improve the stability of the network connection and the reliability of data transmission. In addition, close-range connection can reduce interference from other wireless devices or obstacles to the signal, thereby reducing the error rate in the data transmission process and improving the success rate of network distribution. Furthermore, for wireless devices, close-range communication can reduce transmission power, thereby reducing energy consumption.
[0087] Based on the above embodiments, network configuration is performed based on the target protocol and the device address of the target network management device, including: Based on the target protocol, a network access request is initiated to the target network management device using the device address of the target network management device; Receive the network access notification returned by the target network management device based on the network access request.
[0088] Specifically, the device to be configured in this application can obtain the device address (e.g., MAC address) corresponding to the target network management device, i.e., the optimal router / gateway.
[0089] Furthermore, a network access request can be initiated to the target network management device using the obtained device address via the target protocol (i.e., the simplified protocol).
[0090] Specifically, the device address of the target network management device can be filled into the message body of the simplified protocol, thereby initiating a network access request to the target network management device and receiving a network access notification returned by the target network management device based on the network access request.
[0091] After receiving a network access request, the target network management device verifies the legality of the device based on the information in the request. Once it confirms that the device to be configured has passed the legality verification, it notifies the device to complete the network access. At the same time, as the parent device of the device to be configured, it reports the attribute information of the device to the server platform for registration. After registration is completed, a data connection link is established, thereby completing the device configuration and going online. This enables the device to be configured to be identified and managed on the server platform, and realizes functions such as remote control.
[0092] In this application, communication between devices is based on MAC addressing, which greatly reduces the amount of data transmitted and lowers the power consumption. Furthermore, communication between devices based on MAC addressing also improves the efficiency and speed of data transmission, thereby shortening the network distribution time.
[0093] Figure 3 This is a schematic diagram of the overall process of the device network configuration method provided in the embodiments of this application, such as... Figure 3 As shown, after the process begins and the device to be configured is powered on and initialized, this application can determine whether it has been configured before. If so, it enters the simplified protocol data interaction process; otherwise, it enables STA mode and scans for hotspot information with the first service set identifier "CMCC-GUIDE-LINK" issued by the router / gateway, with a preset scanning cycle. After the scan is completed, the channel where the router with the strongest RSSI in the environment is located is determined, i.e., the optimal channel. Simultaneously record the optimal RSSI value. .
[0094] Furthermore, disable STA mode and enable Monitor promiscuous mode.
[0095] Furthermore, a broadcast data message is constructed and transmitted via a data link layer management frame (i.e., a Probe Request frame) on the optimal channel. Perform single-channel broadcasting with a preset broadcast period. After the broadcast ends, obtain the RSSI values of all broadcast responses within the threshold. Broadcast response messages within range (in the experiment) The received broadcast response message is parsed, and the value of the PowerTx field in the data format is extracted, which is the transmission power of the transmitting source (router / gateway).
[0096] Furthermore, based on the RSSI model, the location estimation algorithm is used to solve for the wireless signal transmission distance (i.e., the distance between the device to be configured and the router / gateway) obtained from the broadcast response.
[0097] Obtain the MAC address information of the router / gateway corresponding to the shortest distance as the optimal router / gateway information under the optimal channel.
[0098] Furthermore, the optimal router / gateway information is filled into the simplified protocol message body of the Probe Request frame to initiate a network access request.
[0099] Receive network access request notification information, connect to the server, complete network configuration and binding, and end the process.
[0100] This application requires no additional hardware. Building upon existing smart device network configuration solutions, it only requires modification of the Wi-Fi protocol driver layer, making it more compatible with low-power, resource-constrained devices. Furthermore, by employing a location estimation algorithm based on the RSSI model, it simplifies the user's network configuration process while improving the success rate of correctly associating devices with users in complex network environments, reducing the mis-binding rate. Compared to ordinary network configuration solutions, it offers greater reliability and stability, while also shortening configuration time and enhancing the user experience, thus contributing to the development of whole-house smart home solutions.
[0101] The equipment distribution device provided in this application is described below. The equipment distribution device described below and the equipment distribution method described above can be referred to in correspondence.
[0102] Furthermore, this application also provides a device for network distribution.
[0103] The equipment distribution network device includes: The first determining module is used to determine the target channel where the network management device with the highest received signal strength indication within a preset range is located; The broadcast module is used to construct broadcast data packets using a proprietary data packet format and broadcast the broadcast data packets on the target channel; the proprietary data packet format is based on a target protocol; the target protocol is obtained by hierarchical multiplexing after hierarchical simplification of the Open Systems Interconnection model; The second determining module is used to determine the target network management device from network management devices that return response messages based on the broadcast data message; The network distribution module is used to perform network distribution based on the target protocol and the device address of the target network management device.
[0104] The device network distribution apparatus of this application simplifies the Open Systems Interconnection (OSI) model hierarchically and then reuses it to obtain the target protocol. Based on the target protocol, a proprietary data message format is formulated. This allows the network management device, after determining the target channel where the network management device with the highest received signal strength within a preset range is located, to construct a broadcast data message using the proprietary data message format and broadcast it on the target channel. The target network management device can then be identified from the network management devices that return response messages based on the broadcast data message. Thus, network distribution can be performed based on the target protocol and the device address of the target network management device. By simplifying the OSI model, the network distribution process does not require the initiation of services such as CoAP, MQTT, and HTTP, reducing service power consumption. Furthermore, the proprietary data message format based on the target protocol enables communication technology based on link-layer management frames, allowing devices to communicate based on device addresses, significantly reducing the amount of data transmitted and lowering transmission power consumption. Therefore, the device network distribution power consumption can be reduced.
[0105] In one embodiment, the first determining module is specifically used for: Scan for hotspot information emitted by network management devices within a preset range; The receiving signal strength indicator with the largest value among the receiving signal strength indicators corresponding to each hotspot information is determined as the target receiving signal strength indicator; The channel where the network management device corresponding to the target received signal strength indication is located is determined as the target channel.
[0106] In one embodiment, the second determining module is specifically used for: Candidate network management devices are determined from the network management devices that return response messages based on the broadcast data packets, according to the received signal strength indication of each network management device that returns response messages based on the broadcast data packets. Obtain the transmit power of each candidate network management device from its response message; Based on the information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device, the distance to the corresponding candidate network management device is determined. The target network management device is determined from among the candidate network management devices based on the distance between them.
[0107] In one embodiment, the second determining module includes a first determining unit, which is configured to perform the following operations for each candidate network management device when determining the distance to the corresponding candidate network management device based on information receiving sensitivity and the corresponding transmit power and received signal strength indications of each candidate network management device: Add the transmit power of the current candidate network management device to the first constant to obtain the first result; Subtracting the first result from the information receiving sensitivity yields the second result; Subtract the second result from the received signal strength indication of the current candidate network management device to obtain the third result; The third result is compared with the fourth result to obtain the fifth result; the fourth result is the product of a preset threshold and a second constant. The preset power value of the fifth result is determined as the distance to the current candidate network management device.
[0108] In one embodiment, the second determining module includes a second determining unit, the second determining unit being used for: The distance with the smallest value among the distances to each candidate network management device is determined as the target distance; The candidate network management device corresponding to the target distance is determined as the target network management device.
[0109] In one embodiment, the distribution network module is specifically used for: Based on the target protocol, a network access request is initiated to the target network management device using the device address of the target network management device; Receive the network access notification returned by the target network management device based on the network access request.
[0110] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute the following method: determining the target channel where the network management device with the highest received signal strength indication within a preset range is located; Broadcast data packets are constructed using a proprietary data packet format and broadcast on the target channel. The proprietary data packet format is based on a target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection (OSI) model. The target network management device is determined from the network management devices that return response messages based on the broadcast data messages; Network configuration is performed based on the target protocol and the device address of the target network management device.
[0111] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0112] In another aspect, embodiments of this application also provide a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program is implemented to perform the methods provided in the above embodiments, such as: determining the target channel where the network management device with the largest received signal strength indication within a preset range is located; Broadcast data packets are constructed using a proprietary data packet format and broadcast on the target channel. The proprietary data packet format is based on a target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection (OSI) model. The target network management device is determined from the network management devices that return response messages based on the broadcast data messages; Network configuration is performed based on the target protocol and the device address of the target network management device.
[0113] In another aspect, embodiments of this application also provide a computer product having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to perform the methods provided in the above embodiments, such as: determining the target channel where the network management device with the largest received signal strength indication within a preset range is located; Broadcast data packets are constructed using a proprietary data packet format and broadcast on the target channel. The proprietary data packet format is based on a target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection (OSI) model. The target network management device is determined from the network management devices that return response messages based on the broadcast data messages; Network configuration is performed based on the target protocol and the device address of the target network management device.
[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate this application and are not intended to limit this application. Although this application has been described in detail with reference to the embodiments, those skilled in the art should understand that various combinations, modifications, or equivalent substitutions of the technical solutions of this application do not depart from the spirit and scope of the technical solutions of this application.
Claims
1. A method for equipment network distribution, characterized in that, include: Determine the target channel where the network management device with the highest received signal strength indication within a preset range is located; A broadcast data message is constructed using a proprietary data message format and broadcast on the target channel; the proprietary data message format is based on the target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection model. The target network management device is determined from the network management devices that return response messages based on the broadcast data messages; Network configuration is performed based on the target protocol and the device address of the target network management device.
2. The equipment distribution network method according to claim 1, characterized in that, The determination of the target channel where the network management device with the highest received signal strength indication within a preset range is located includes: Scan for hotspot information emitted by network management devices within a preset range; The receiving signal strength indicator with the largest value among the receiving signal strength indicators corresponding to each hotspot information is determined as the target receiving signal strength indicator; The channel where the network management device corresponding to the target received signal strength indication is located is determined as the target channel.
3. The equipment distribution network method according to claim 1, characterized in that, The step of determining the target network management device from network management devices that return response messages based on the broadcast data packets includes: Candidate network management devices are determined from the network management devices that return response messages based on the broadcast data packets, according to the received signal strength indication of each network management device that returns response messages based on the broadcast data packets. Obtain the transmit power of each candidate network management device from its response message; Based on the information receiving sensitivity and the corresponding transmit power and receive signal strength indications of each candidate network management device, the distance to the corresponding candidate network management device is determined. The target network management device is determined from among the candidate network management devices based on the distance between them.
4. The equipment distribution network method according to claim 3, characterized in that, When determining the distance to each candidate network management device based on information reception sensitivity and the corresponding transmit power and receive signal strength indications, the following operations are performed for each candidate network management device: Add the transmit power of the current candidate network management device to the first constant to obtain the first result; Subtracting the first result from the information receiving sensitivity yields the second result; Subtract the second result from the received signal strength indication of the current candidate network management device to obtain the third result; The third result is compared with the fourth result to obtain the fifth result; the fourth result is the product of a preset threshold and a second constant. The preset power value of the fifth result is determined as the distance to the current candidate network management device.
5. The equipment distribution network method according to claim 3, characterized in that, The step of determining the target network management device from among the candidate network management devices based on the distance between each candidate network management device includes: The distance with the smallest value among the distances to each candidate network management device is determined as the target distance; The candidate network management device corresponding to the target distance is determined as the target network management device.
6. The equipment distribution network method according to claim 1, characterized in that, The network configuration based on the target protocol and the device address of the target network management device includes: Based on the target protocol, a network access request is initiated to the target network management device using the device address of the target network management device; Receive the network access notification returned by the target network management device based on the network access request.
7. A device for power distribution, characterized in that, include: The first determining module is used to determine the target channel where the network management device with the highest received signal strength indication within a preset range is located; A broadcast module is used to construct broadcast data packets using a proprietary data packet format and broadcast the broadcast data packets on the target channel; the proprietary data packet format is based on the target protocol. The target protocol is obtained by hierarchically simplifying and reusing the Open Systems Interconnection model. The second determining module is used to determine the target network management device from network management devices that return response messages based on the broadcast data message; The network distribution module is used to perform network distribution based on the target protocol and the device address of the target network management device.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the device network configuration method as described in any one of claims 1-6.
9. A storage medium, said storage medium being a non-transitory computer-readable storage medium, wherein a computer program is stored thereon, characterized in that, When the computer program is executed by the processor, it implements the device network configuration method as described in any one of claims 1-6.
10. A computer product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the device network configuration method according to any one of claims 1-6.