Method and device for determining subnet number, storage medium and electronic device

CN115767586BActive Publication Date: 2025-12-26HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211349528.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-12-26
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种子网号的确定方法及装置、存储介质及电子装置,以至少解决相关技术中,无法有效地进行子网号协商等问题

Benefits of technology

[0019]在本申请实施例中,向无线根节点组播组中的多个无线根节点设备发送第一征询请求,其中,所述第一征询请求中携带有第一无线根节点设备的第一子网号,其中,所述多个无线根节点设备和所述第一无线根节点设备均为具备创建无线子网能力的设备;接收所述多个无线根节点设备分别响应的第一回应报文,并根据多个所述第一回应报文的状态字段确定多个第二子网号,其中,所述多个第二子网号与所述多个无线根节点设备一一对应;在所述第一子网号与所述多个第二子网号均不一致的情况下,确定所述第一子网号为所述第一无线根节点设备的目标子网号;采用上述技术方案,解决了相关技术中无法有效地进行子网号协商等问题,进而通过上述技术方案可以有效的为第一无线根节点设备分配目标子网号,以使所述第一无线根节点设备根据所述目标子网号创建对应的UMesh子网。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115767586B_ABST
    Figure CN115767586B_ABST
Patent Text Reader

Abstract

The application discloses a subnetwork number determination method and device, a storage medium and an electronic device, relates to the technical field of smart homes, and the subnetwork number determination method comprises the following steps: a first inquiry request is sent to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnetwork number of a first wireless root node device, wherein the plurality of wireless root node devices and the first wireless root node device are both devices with the capability of creating a wireless subnetwork; a first response message respectively responded by the plurality of wireless root node devices is received, and a plurality of second subnetwork numbers are determined according to state fields of the plurality of first response messages, wherein the plurality of second subnetwork numbers correspond to the plurality of wireless root node devices one by one; and in the case that the first subnetwork number and the plurality of second subnetwork numbers are all inconsistent, the first subnetwork number is determined as a target subnetwork number of the first wireless root node device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart home, in particular to a subnet number determination method and device, a storage medium and an electronic device. BACKGROUND

[0002] When a high resource level device decides to access the whole house basic network and starts to create a UMesh subnet, it needs to first negotiate a subnet number, which is used to build the UMesh inter-network unicast address of the node, and is used as the network prefix of the UMesh subnet created by it to form the UMesh inter-network unicast address of the internal node of the created subnet. The process of negotiating the subnet number is necessary, and if it fails, the subsequent process of creating the UMesh subnet cannot continue, and should be changed to try to join an existing UMesh subnet. However, there is no effective technical solution for subnet number negotiation in the prior art.

[0003] For the problems that the subnet number negotiation cannot be effectively performed in the related art, no effective solution has been proposed. SUMMARY

[0004] Embodiments of the present application provide a subnet number determination method and device, a storage medium and an electronic device to at least solve the problem that the subnet number negotiation cannot be effectively performed in the related art.

[0005] According to an embodiment of the present application, a subnet number determination method is provided, applied to a first wireless root node device, including: sending a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are all devices with the ability to create a wireless subnet; receiving a first response message respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to a state field of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one; and in the case that the first subnet number and the plurality of second subnet numbers are all inconsistent, determining the first subnet number as a target subnet number of the first wireless root node device.

[0006] In an example embodiment, after receiving the first response message respectively responded by the plurality of wireless root node devices, the method further comprises: parsing the first response message to obtain a first field and a second field of the first response message, wherein the status field comprises the first field and the second field; determining a second subnet number of the wireless root node device corresponding to the response message according to the first field, and determining whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field.

[0007] In an example embodiment, determining whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message according to the second field comprises: in a case that a value of the second field is a first value, determining that the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message, and recording the second subnet number in a first routing table of the first wireless root node device; in a case that the value of the second field is a second value, determining that the second subnet number is a temporary subnet number of the wireless root node device corresponding to the first response message.

[0008] In an example embodiment, after determining a plurality of second subnet numbers according to a plurality of the first response messages, the method further comprises: determining whether the first subnet number and any second subnet number of the plurality of second subnet numbers are consistent; in a case that the first subnet number and any second subnet number of the plurality of second subnet numbers are consistent, updating the first subnet number as a third subnet number; and sending a second inquiry request to the plurality of wireless root node devices, wherein the third subnet number is carried in the second inquiry request.

[0009] In an example embodiment, after determining that the first subnet number is the target subnet number of the first wireless root node device, the method further comprises: sending a first announcement message to the plurality of wireless root node devices, so that each wireless root node device of the plurality of wireless root node devices updates a second routing table of the each wireless root node device according to the first announcement message, wherein the first announcement message is used to indicate that the first subnet number is the target subnet number of the first wireless root node device.

[0010] In one example embodiment, a third inquiry request sent by a second wireless root node device in the plurality of wireless root node devices is received; in a case that the first subnet number is a target subnet number of the first wireless root node device, a third response message is obtained by writing the first subnet number in a first field of the third response message and writing a first value in a second field of the third response message, and the third response message is sent to the second wireless root node device, where the first value is used to indicate that the first subnet number is the target subnet number of the first wireless root node device; in a case that the first subnet number is a temporary subnet number of the first wireless root node device, a fourth response message is obtained by writing the first subnet number in a first field of the fourth response message and writing a second value in a second field of the fourth response message, and the fourth response message is sent to the second wireless root node device, where the second value is used to indicate that the first subnet number is the temporary subnet number of the first wireless root node device.

[0011] In one example embodiment, after the first subnet number determined by the first wireless root node device in a preset manner is obtained, the method further comprises: receiving a second announcement message sent by a third wireless root node device in the wireless root node multicast group, where the second announcement message carries a fourth subnet number, and the fourth subnet number is a target subnet number of the third wireless root node device; recording the fourth subnet number in a first routing table of the first wireless root node device, and determining whether the fourth subnet number is consistent with the first subnet number; and in a case that the fourth subnet number is consistent with the first subnet number, updating the first subnet number to a fifth subnet number.

[0012] In one example embodiment, before the first inquiry request is sent to the plurality of wireless root node devices in the wireless root node multicast group, the method further comprises at least one of the following: in a case that the first wireless root node device has joined the wireless root node multicast group, obtaining a first subnet number determined by the first wireless root node device in a first preset manner; and in a case that the first wireless root node device receives a subnet number consistent with a subnet number of the first wireless root node device, obtaining a first subnet number determined by the first wireless root node device in a second preset manner.

[0013] According to another embodiment of the present application, a sending method of a response message is also provided. The method is applied to a second wireless root node device and includes the following steps. A first inquiry request sent by a first wireless root node device is received. The first inquiry request carries a first subnet number of the first wireless root node device. The first wireless root node device and the second wireless root node device are devices with the capability of creating a wireless subnet. The first inquiry request is responded to, and a first response message is sent to the first wireless root node device.

[0014] In one exemplary embodiment, responding to the first inquiry request includes the following steps. When the second subnet number is a target subnet number of the second wireless root node device, the second subnet number is written in a first field of the first response message, and a first value is written in a second field of the first response message, so as to obtain the first response message. The first value is used to indicate that the second subnet number is the target subnet number of the wireless root node device. When the second subnet number is a temporary subnet number of the second wireless root node device, the first subnet number is written in the first field of the first response message, and a second value is written in the second field of the first response message, so as to obtain the first response message. The second value is used to indicate that the second subnet number is the temporary subnet number of the second wireless root node device.

[0015] According to another embodiment of the present application, a subnet number determining device is also provided. The device includes the following modules. A sending module is configured to send a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group. The first inquiry request carries a first subnet number of a first wireless root node device. The plurality of wireless root node devices and the first wireless root node device are devices with the capability of creating a wireless subnet. A first receiving module is configured to receive first response messages respectively responded by the plurality of wireless root node devices, and determine a plurality of second subnet numbers according to status fields of the first response messages. The plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one. A determining module is configured to determine that the first subnet number is a target subnet number of the first wireless root node device when the first subnet number is inconsistent with the plurality of second subnet numbers.

[0016] According to another embodiment of the present application, a response message sending device is also provided. The device includes the following modules. A second receiving module is configured to receive a first inquiry request sent by a first wireless root node device. The first inquiry request carries a first subnet number of the first wireless root node device. The first wireless root node device and the second wireless root node device are devices with the capability of creating a wireless subnet. A responding module is configured to respond to the first inquiry request, and send a first response message to the first wireless root node device.

[0017] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, in which a computer program is stored, and the computer program is configured to execute the above-mentioned subnetwork number determination method and the response message sending method when running.

[0018] According to still another aspect of the embodiments of the present application, an electronic device is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the above-mentioned subnetwork number determination method and the response message sending method through the computer program.

[0019] In the embodiments of the present application, a first inquiry request is sent to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnetwork number of a first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are both devices with the capability of creating a wireless subnetwork; a first response message respectively responded by the plurality of wireless root node devices is received, and a plurality of second subnetwork numbers are determined according to status fields of the plurality of first response messages, wherein the plurality of second subnetwork numbers correspond to the plurality of wireless root node devices one by one; in the case that the first subnetwork number is inconsistent with the plurality of second subnetwork numbers, the first subnetwork number is determined as a target subnetwork number of the first wireless root node device; by using the above technical solution, the problem that subnetwork number negotiation cannot be effectively performed in the related art is solved, and thus the target subnetwork number can be effectively allocated to the first wireless root node device through the above technical solution, so that the first wireless root node device creates a corresponding UMesh subnetwork according to the target subnetwork number. BRIEF DESCRIPTION OF DRAWINGS

[0020] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles behind the application.

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced here. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0022] Figure 1 is a hardware environment schematic diagram of a subnetwork number determination method according to an embodiment of the present application;

[0023] Figure 2 is a flowchart of a subnetwork number determination method according to an embodiment of the present application;

[0024] Figure 3 is a flow chart of a sending method of a response message according to an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of a UMesh network according to an optional embodiment of the present application;

[0026] Figure 5 is a flow chart of a determination method of a subnet number according to an optional embodiment of the present application (one);

[0027] Figure 6 is a flow chart of a determination method of a subnet number according to an optional embodiment of the present application (two);

[0028] Figure 7 is a structural block diagram of a determination device of a subnet number according to an embodiment of the present application;

[0029] Figure 8 is a structural block diagram of a sending device of a response message according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the art without creative labor should belong to the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0032] According to an aspect of the embodiments of the present application, a subnetwork number determination method and a response message sending method are provided. The subnetwork number determination method and the response message sending method are widely applied in smart home, smart home, smart home device ecology, intelligent house ecology, and whole-house intelligent digital control application scenarios. Optionally, in the embodiments, the subnetwork number determination method and the response message sending method can be applied in the hardware environment composed of a terminal device 102 and a server 104 as shown in the figure. Figure 1 As shown in the figure, the server 104 is connected with the terminal device 102 through a network, can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, can set a database on the server or independently of the server, and can be used to provide data storage services for the server 104. The cloud computing and / or edge computing services can be configured on the server or independently of the server, and can be used to provide data operation services for the server 104. Figure 1

[0033] The network can include but is not limited to at least one of the following: a wired network, a wireless network. The wired network can include but is not limited to at least one of the following: a wide area network, a metropolitan area network, a local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can include but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart oven, a smart refrigerator, a smart oven, a smart oven, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart television, a smart clothesline, a smart curtain, a smart audio and video, a smart socket, a smart sound, a smart sound box, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0034] In the embodiments, a subnetwork number determination method is provided, which is applied to a first wireless root node device, Figure 2 is a flowchart of the subnetwork number determination method according to the embodiments of the present application, which includes the following steps:

[0035] Step S202, a first inquiry request is sent to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnetwork number of a first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are devices with the ability to create a wireless subnetwork.

[0036] ​It should be noted that the first wireless root node device determines the first subnet number according to the first preset mode, including: the first wireless root node device randomly selects a number in the preset subnet number value range as the first subnet number.

[0037] Step S204, receiving the first response message respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to the state fields of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one.

[0038] Step S206, in the case that the first subnet number and the plurality of second subnet numbers are all inconsistent, determining the first subnet number as the target subnet number of the first wireless root node device.

[0039] It should be noted that the target subnet number of the wireless root node device is the subnet number of the UMesh subnet established by the wireless root node device, and the wireless root node device cannot use the temporary subnet number as the subnet number of the UMesh subnet established by the wireless root node device.

[0040] It should be noted that considering the vulnerability of the network, after determining that the first subnet number is the target subnet number of the first wireless root node device, the above steps S202-206 are repeatedly executed for a preset number of times; after repeatedly executing the above steps S202-206 for a preset number of times, it is still determined that the first subnet number is the target subnet number of the first wireless root node device, and at this time the first subnet number is determined as the target subnet number of the first wireless root node device.

[0041] Through the above steps, the first wireless root node device sends a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of the first wireless root node device, wherein the plurality of wireless root node devices and the first wireless root node device are both devices with the ability to create a wireless subnet; receiving the first response message respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to the state fields of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one; in the case that the first subnet number and the plurality of second subnet numbers are all inconsistent, determining the first subnet number as the target subnet number of the first wireless root node device; by using the above technical solution, the problem that subnet number negotiation cannot be effectively performed in the related art is solved, and thus the target subnet number can be effectively allocated to the first wireless root node device by using the above technical solution, so that the first wireless root node device creates a corresponding UMesh subnet according to the target subnet number.

[0042] Optionally, in the process of executing the above step S204, the following steps are further executed:

[0043] Step 1: parsing the first response message to obtain a first field and a second field of the first response message, wherein the state field comprises the first field and the second field;

[0044] Step 2: determining a second subnet number of the wireless root node device corresponding to the response message according to the first field, and determining whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field.

[0045] That is, in the case that the wireless root node device receives the first inquiry request, determining a self state of the wireless root node device, and filling the first field and the second field in the first response message according to the self state, wherein the first field is used to indicate a subnet number of the wireless root node device, and the second field is used to indicate the self state of the wireless root node device.

[0046] It should be noted that the self state at least comprises one of the following: a subnet number inquiry state and a subnet number determination state, wherein in the case that the wireless root node device is in the subnet number inquiry state, the second subnet number is a temporary subnet number of the wireless root node device; and in the case that the wireless root node device is in the subnet number negotiation completion state, the second subnet number is a target subnet number of the wireless root node device.

[0047] In an example embodiment, determining whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field comprises: in the case that a value of the second field is a first value, determining that the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message, and recording the second subnet number in a first routing table of the first wireless root node device; and in the case that the value of the second field is a second value, determining that the second subnet number is a temporary subnet number of the wireless root node device corresponding to the first response message.

[0048] For example, in the case that the first wireless root node device receives the first inquiry request, the state of the wireless root node device is determined, in the case that the wireless root node device is in the subnet number inquiry state, the second field is filled with 1 and the first field is filled with the second subnet number; in the case that the wireless root node device is in the subnet number negotiation completion state, the second field is filled with 0 and the first field is filled with the second subnet number (since the second subnet number is the target subnet number of the wireless root node device at this time, the first field can also be filled with the target subnet number of the wireless root node device). Therefore, in the case that the value filled in the second field is 1, it is determined that the second subnet number is the temporary subnet number of the wireless root node device; in the case that the value filled in the second field is 0, it is determined that the second subnet number is the target subnet number of the wireless root node device.

[0049] It should be noted that the specific values of the first value and the second value are not limited in the embodiments of the present application, and can be determined by the person skilled in the art according to the actual situation.

[0050] In one example embodiment, after determining a plurality of second subnet numbers according to a plurality of first response messages, the method further comprises: determining whether the first subnet number and any second subnet number of the plurality of second subnet numbers are consistent; in the case that the first subnet number and any second subnet number of the plurality of second subnet numbers are consistent, updating the first subnet number as a third subnet number; and sending a second inquiry request to the plurality of wireless root node devices, wherein the second inquiry request carries the third subnet number.

[0051] That is, in the case that the first wireless root node device determines that any second subnet number corresponding to any received first response message is consistent with the first subnet number, the first subnet number is updated as a third subnet number, and a second inquiry request carrying the third subnet number is sent. Since the first subnet number is updated in the case that it is determined that there is a consistent subnet number, the time for negotiating the subnet number can be saved, and the rate of negotiating the subnet number can be improved.

[0052] In one example embodiment, after determining that the first subnet number is the target subnet number of the first wireless root node device, the method comprises: sending a first announcement message to the plurality of wireless root node devices, so that each wireless root node device of the plurality of wireless root node devices updates a second routing table of the each wireless root node device according to the first announcement message, wherein the first announcement message is used to indicate that the first subnet number is the target subnet number of the first wireless root node device.

[0053] That is, in a case where it is determined that the first subnet number is the target subnet number of the first wireless root node device, the first announcement message is sent to the plurality of wireless root node devices in the wireless root node multicast group, so that the plurality of wireless root node devices determine that the first subnet number is the target subnet number of the first wireless root node device, and the temporary subnet number of the wireless root node device in the subnet number inquiry state among the plurality of wireless root node devices is updated to a subnet number inconsistent with the target subnet number.

[0054] Through the optional embodiment, the announcement message is actively sent to the plurality of wireless root node devices in the wireless root node multicast group, so that the speed of determining the target subnet number by the wireless root node device in the subnet number inquiry state can be improved.

[0055] In one example embodiment, a third inquiry request sent by a second wireless root node device among the plurality of wireless root node devices is received; in a case where the first subnet number is the target subnet number of the first wireless root node device, the first subnet number is written in a first field of a third response message, a first value is written in a second field of the third response message, so as to obtain the third response message, and the third response message is sent to the second wireless root node device, wherein the first value is used to indicate that the first subnet number is the target subnet number of the first wireless root node device; in a case where the first subnet number is the temporary subnet number of the first wireless root node device, the first subnet number is written in a first field of a fourth response message, a second value is written in a second field of the fourth response message, so as to obtain the fourth response message, and the fourth response message is sent to the second wireless root node device, wherein the second value is used to indicate that the first subnet number is the temporary subnet number of the first wireless root node device.

[0056] That is, in a process of determining whether the first subnet number is the target subnet number of the first wireless root node device, or after it is determined that the first subnet number is the target subnet number of the first wireless root node device, the first wireless root node device also receives a third inquiry request sent by a second wireless root node device; in the process of determining whether the first subnet number is the target subnet number of the first wireless root node device, the first subnet number is written in a first field of a fourth response message, and a second value is written in a second field of the fourth response message, so as to obtain the fourth response message; after it is determined that the first subnet number is the target subnet number of the first wireless root node device, the first subnet number is written in a first field of a third response message, and a first value is written in a second field of the third response message.

[0057] For example, in the process of determining whether the first subnet number is the target subnet number of the first wireless root node device, the first wireless root node device is determined to be in the subnet number inquiry state, and thus the second field in the fourth response message is filled with 1 and the first field is filled with the first subnet number; after the first wireless root node device determines that the first subnet number is the target subnet number of the first wireless root node device, the wireless root node device is determined to be in the subnet number negotiation completion state, and thus the second field in the third response message is filled with 0 and the first field is filled with the first subnet number (since the first subnet number is the target subnet number of the first wireless root node device at this time, the first field can also be filled with the target subnet number of the first wireless root node device).

[0058] In an example embodiment, after the first subnet number determined by the first wireless root node device in a preset manner is acquired, the method further includes: receiving a second announcement message sent by a third wireless root node device of the wireless root node multicast group, wherein the second announcement message carries a fourth subnet number, and the fourth subnet number is a target subnet number of the third wireless root node device; recording the fourth subnet number in the first routing table of the first wireless root node device, and determining whether the fourth subnet number is consistent with the first subnet number; and in the case where the fourth subnet number is consistent with the first subnet number, updating the first subnet number to a fifth subnet number.

[0059] That is, in the case where the first wireless root node device is in the subnet number inquiry state and receives the second announcement message sent by the third wireless root node device, it is determined whether the fourth subnet number in the second announcement message is consistent with the first subnet number, and in the case of consistency, the first subnet number is updated; in the case of inconsistency, the first subnet number is not updated.

[0060] It should be noted that in the case where the announcement message sent by the wireless root node device in the wireless root node multicast group is received, the subnet number of the announcement message is recorded in the first routing table of the first wireless root node device; in the case where the second subnet number is the target subnet number of the wireless root node device, the second subnet number is recorded in the first routing table of the first wireless root node device.

[0061] In an example embodiment, before sending the first inquiry request to the plurality of wireless root node devices in the wireless root node multicast group, the method further comprises at least one of: obtaining a first subnet number determined by the first wireless root node device in a first preset manner, in a case that the first wireless root node device has joined the wireless root node multicast group; obtaining a first subnet number determined by the first wireless root node device in a second preset manner, in a case that the first wireless root node device receives a subnet number consistent with the subnet number of the first wireless root node device.

[0062] It should be noted that the first preset manner can be understood as that the first wireless root node device randomly selects a number in a preset subnet number value range as the first subnet number; the second preset manner can be understood as that, in a case that the first wireless root node device receives a subnet number consistent with the subnet number of the first wireless root node device, the subnet number of the first wireless root node device is updated to the first subnet number.

[0063] In the embodiment, a sending method of a response message is provided, applied to a second wireless root node device, Figure 3 is a flowchart of the sending method of the response message according to the embodiment of the application, and the flowchart comprises the following steps:

[0064] Step S302: receiving a first inquiry request sent by a first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with a capability of creating a wireless subnet;

[0065] Step S304: responding to the first inquiry request and sending a first response message to the first wireless root node device.

[0066] The first inquiry request sent by the first wireless root node device is received, the first inquiry request carries the first subnet number of the first wireless root node device, the first wireless root node device and the second wireless root node device are devices with the capability of creating a wireless subnet; a first response message is sent to the first wireless root node device in response to the first inquiry request; according to the technical solution, the first wireless root node device determines the second subnet number of the wireless root node device according to the state field of the first response message; and in the case that the first subnet number and the plurality of second subnet numbers are all inconsistent, the first wireless root node device determines that the first subnet number is the target subnet number of the first wireless root node device; the technical solution solves the problem that subnet number negotiation cannot be effectively performed in the related art, and further, the technical solution can effectively allocate a target subnet number to the first wireless root node device, so that the first wireless root node device creates a corresponding UMesh subnet according to the target subnet number.

[0067] In one example embodiment, responding to the first inquiry request includes: in the case that the second subnet number is the target subnet number of the second wireless root node device, writing the second subnet number in a first field of the first response message and writing a first value in a second field of the first response message to obtain the first response message, wherein the first value is used to indicate that the second subnet number is the target subnet number of the wireless root node device; and in the case that the second subnet number is a temporary subnet number of the second wireless root node device, writing the first subnet number in the first field of the first response message and writing a second value in the second field of the first response message to obtain the first response message, wherein the second value is used to indicate that the second subnet number is the temporary subnet number of the second wireless root node device.

[0068] For example, in the case that the second wireless root node device receives the first inquiry request, the state of the second wireless root node device is determined, in the case that the second wireless root node device is in a subnet number inquiry state, the second field is filled with 1 and the first field is filled with the second subnet number; in the case that the second wireless root node device is in a subnet number negotiation completion state, the second field is filled with 0 and the first field is filled with the second subnet number (since the second subnet number is the target subnet number of the wireless root node device at this time, the first field can also be filled with the target subnet number of the wireless root node device). Therefore, in the case that the value filled in the second field is 1, it is determined that the second subnet number is the temporary subnet number of the wireless root node device; and in the case that the value filled in the second field is 0, it is determined that the second subnet number is the target subnet number of the wireless root node device.

[0069] For better understanding of the embodiments of the present application, the following explains the terms in the embodiments of the present application:

[0070] UMesh subnet: In a user's home, UMesh nodes are aggregated together based on relative positions within the range of link signal reachability, forming a UMesh subnet. Nodes in a UMesh subnet can be based on heterogeneous networks and connected together through a border router. In a UMesh subnet, intelligent home appliances supporting TCP / IP protocol form a destination-oriented directed acyclic graph (DODAG) based on IPv6 and RPL protocol. UMesh nodes (Zigbee, BLE, etc.) that do not support TCP / IP protocol communicate with other nodes in the subnet based on their respective transmission protocols and some necessary proxy mechanisms. Each UMesh subnet has a unique root node. If there is a home foundation network and the root node can access the home foundation network, the root node is connected to the home foundation network (here, connection refers to a link layer connection between the root node and a routing device in the home foundation network, such as an AP-Station connection of Wi-Fi).

[0071] UMesh network: In a user's home, there can be multiple UMesh subnets, whose root nodes are connected to each other through a home foundation network or other mechanisms. These UMesh subnets are combined to form a UMesh network. From the perspective of RPL protocol, a UMesh network is a RPL instance composed of multiple DODAGs, which have the same RPLInstanceID and OF. The UMesh network connects all UMesh devices in the user's home that can be connected to any UMesh subnet, providing interconnection and intercommunication capabilities among them. The UMesh network is a two-level IPv6 network (i.e., a RPL instance) that is divided into multiple UMesh subnets (DODAGs) based on the distance between UMesh nodes. The root nodes of each subnet are either connected to the home foundation network for collaboration or connected through other mechanisms for collaboration. As shown in Figure 4 .

[0072] UMesh root node (equivalent to any wireless root node device in the wireless root node multicast group in the above embodiment): the root node of a UMesh subnet is called a UMesh root node. If a UMesh device has a higher resource level and can be continuously powered (non-battery powered), it should be able to play the role of a UMesh root node. The UMesh device requires at least to support IPv6 & IPv4 dual stack, and can store data locally and persistently. When preparing to start the UMesh device, it can determine whether to join an existing UMesh subnet or create a UMesh subnet according to its own conditions (for example, the quality of connection with the whole house basic network) and the surrounding environment (the number and load status of the surrounding UMesh subnet). The whole house basic network is a network based on Wi-Fi or Ethernet technology, and the UMesh subnet is a network based on Wi-Fi Mesh technology. The whole house basic network and the UMesh subnet are heterogeneous networks, so the UMesh root node connected to the whole house basic network is also a UMesh border router.

[0073] In order to better understand the process of the above-mentioned subnet number determination method, the implementation method flow of the above-mentioned subnet number determination will be described in combination with the optional embodiment below, but not used to limit the technical solutions of the embodiments of the present application.

[0074] In the embodiment, a subnet number determination method is provided, Figure 5 is a flowchart of the subnet number determination method according to the optional embodiment of the present application, as Figure 5 shown, the specific steps are as follows:

[0075] Step S401: start;

[0076] Step S402: the UMesh device (equivalent to the first wireless root node device in the above embodiment) joins the UMesh root node multicast group;

[0077] Step S403: the UMesh device randomly selects a number in the subnet number value range (101-65565) as a temporary subnet number (equivalent to the first subnet number in the above embodiment), and sends a subnet number solicitation request (equivalent to the first solicitation request in the above embodiment);

[0078] It should be noted that due to the vulnerability of the network, the subnet number solicitation request can be retransmitted for a predetermined number of times, for example, three times.

[0079] It should be noted that each UMesh device in the UMesh root node multicast group needs to respond to the subnet number solicitation request, and carries the subnet number and the link layer address corresponding to the UMesh device in the response message, and fills in the response message according to its own state:

[0080] 1) If the UMesh device is in the subnet number inquiry stage, fill 1 in the State field of the response message, and fill the temporary subnet number in the Subnet ID field of the response message;

[0081] 2) If the UMesh device has completed the subnet number negotiation, fill 0 in the State field of the response message, and fill the subnet number being used in the Subnet ID field of the response message.

[0082] Step S404: start the timer;

[0083] Step S405: the device receives the subnet number response message (equivalent to the first response message in the above embodiment);

[0084] Step S406: determine whether the value of the State field in the subnet number response message is 0, in the case where the value of the State field in the subnet number response message is 0, execute steps S407-S410; in the case where the value of the State field in the subnet number response message is 1 and 0, execute steps S408-S410;

[0085] Step S407: record the subnet number and link address information of the UMesh device corresponding to the subnet number response message in the local inter-network routing table of the UMesh device;

[0086] Step S408: determine whether the subnet number in the subnet number response message is the same as the temporary subnet number; in the case where the subnet number in the subnet number response message is the same as the temporary subnet number, execute step S409; in the case where the subnet number in the subnet number response message is not the same as the temporary subnet number, execute step S410;

[0087] Step S409: replace the temporary subnet number;

[0088] It should be noted that a random subnet number which is different from the previous temporary subnet number and is also different from any subnet number recorded in the local inter-network routing table is calculated.

[0089] Step S410: wait for the timer;

[0090] Step S411: the UMesh device receives the subnet number inquiry request (equivalent to the second inquiry request in the above embodiment);

[0091] Step S412: fill 1 in the State field of the response message, fill the temporary subnet number in the Subnet ID field of the response message, and then execute step S410;

[0092] Step S413: the UMesh device receives the subnet number announcement message;

[0093] Step S414: record the subnet number and link address information of the UMesh device corresponding to the subnet number announcement message in the local inter-network routing table of the UMesh device, and then execute step S410;

[0094] It should be noted that the adding process of the inter-network routing table should be repeated, and the same information should not be filled in the inter-network routing table.

[0095] Step S415: after the UMesh device timer expires, configure the temporary subnet number as the subnet number of the UMesh device, and send a subnet number announcement to fill in the subnet number of the UMesh device.

[0096] It should be noted that if the UMesh device is restarted due to any reason after successfully completing the subnet number negotiation, the subnet number negotiation process must be performed again to obtain a new subnet number, and the subnet number negotiated before the shutdown cannot be used.

[0097] Optionally, in the embodiment, a subnet number determination method is also provided, taking the UMesh device that has completed the subnet number negotiation as an example, Figure 6 is a flowchart of the subnet number determination method according to the optional embodiment of the application, as shown in Figure 6 The specific steps are as follows:

[0098] Step S501: start;

[0099] Step S502: the device receives a subnet number response message;

[0100] Step S503: determine whether the value of the State field in the subnet number response message is 0, and in the case where the value of the State field in the subnet number response message is 0, execute steps S504-S506; in the case where the value of the State field in the subnet number response message is 1 and 0, execute steps S505-S506;

[0101] Step S504: record the subnet number and link address information of the UMesh device corresponding to the subnet number response message in the local inter-network routing table of the UMesh device;

[0102] Step S505: determine whether the subnet number in the subnet number response message is the same as the temporary subnet number; in the case where the subnet number in the subnet number response message is the same as the temporary subnet number, execute step S506;

[0103] Step S506: report an error and start a subnet number update process;

[0104] Step S507: the UMesh device receives a subnet number inquiry request;

[0105] Step S508: filling 0 in the State field of the response message, and filling the subnet number being used in the Subnet ID field of the response message;

[0106] Step S509: the UMesh device receives the subnet number announcement message.

[0107] Step S510: recording the subnet number and link address information of the UMesh device corresponding to the subnet number announcement message in the inter-local network routing table of the UMesh device, and then executing steps S505-S506.

[0108] In the above embodiment, in the case that the UMesh device has joined the wireless root node multicast group, the first subnet number determined by the UMesh device in a preset manner is obtained, wherein the wireless root node multicast group comprises a plurality of UMesh devices, and the plurality of UMesh devices are devices with the capability of creating a wireless subnet; an inquiry request is sent to the plurality of UMesh devices, wherein the first subnet number is carried in the inquiry request; the response messages respectively responded by the plurality of UMesh devices are received, and a plurality of second subnet numbers are determined according to the plurality of response messages, wherein the plurality of second subnet numbers correspond to the plurality of UMesh devices one by one; in the case that the first subnet number is inconsistent with the plurality of second subnet numbers, the first subnet number is determined as the target subnet number of the UMesh device, thereby solving the problem that subnet number negotiation cannot be effectively performed in the related art, and further, the target subnet number can be effectively allocated to the UMesh device by the technical solution, so that the UMesh device creates a corresponding UMesh subnet according to the target subnet number.

[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a general hardware platform, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the present application.

[0110] Figure 7 is a structural block diagram of a subnet number determination device according to an embodiment of the present application; as shown in Figure 7 , it comprises:

[0111] The sending module 72 is configured to send a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of a first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are both devices with a capability of creating a wireless subnet.

[0112] The first receiving module 74 is configured to receive a first response message respectively responded by the plurality of wireless root node devices, and determine a plurality of second subnet numbers according to a state field of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one.

[0113] The determining module 76 is configured to determine the first subnet number as a target subnet number of the first wireless root node device in a case where the first subnet number and the plurality of second subnet numbers are all inconsistent.

[0114] Through the above device, the sending module sends a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of a first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are both devices with a capability of creating a wireless subnet; the receiving module receives a first response message respectively responded by the plurality of wireless root node devices, and determines a plurality of second subnet numbers according to a state field of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one; and the determining module determines the first subnet number as a target subnet number of the first wireless root node device in a case where the first subnet number and the plurality of second subnet numbers are all inconsistent. The above device solves the problem in the related art that subnet number negotiation cannot be effectively performed, and further, through the above technical solution, the first wireless root node device can be effectively allocated with a target subnet number, so that the first wireless root node device creates a corresponding UMesh subnet according to the target subnet number.

[0115] In one exemplary embodiment, the determining module 76 is configured to, for each of the plurality of first response messages, parse each of the first response messages to obtain a first field and a second field of each of the first response messages; determine a second subnet number of each of the wireless root node devices according to the first field, and determine whether the second subnet number is a target subnet number of each of the wireless root node devices according to the second field.

[0116] In one example embodiment, the determining module 76 is configured to parse the first response message to obtain a first field and a second field of the first response message, wherein the status field comprises the first field and the second field; determine a second subnet number of the wireless root node device corresponding to the response message according to the first field, and determine whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field.

[0117] In one example embodiment, the determining module 76 is configured to determine that the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message and record the second subnet number in the first routing table of the first wireless root node device, if the value of the second field is a first value; and determine that the second subnet number is a temporary subnet number of the wireless root node device corresponding to the first response message, if the value of the second field is a second value.

[0118] In one example embodiment, the determining module 76 is configured to determine whether the first subnet number is consistent with any of the second subnet numbers; update the first subnet number as a third subnet number, if the first subnet number is consistent with any of the second subnet numbers; and send a second inquiry request to the plurality of wireless root node devices, wherein the second inquiry request carries the third subnet number.

[0119] In one example embodiment, the determining module 76 is configured to send a first announcement message to the plurality of wireless root node devices, so that each of the plurality of wireless root node devices updates a second routing table of the each wireless root node device according to the first announcement message, wherein the first announcement message is used to indicate that the first subnet number is a target subnet number of the first wireless root node device.

[0120] In an example embodiment, the determining module 76 is configured to receive a third inquiry request sent by a second wireless root node device in the plurality of wireless root node devices; write the first subnet number in a first field of a third response message and write a first value in a second field of the third response message to obtain the third response message and send the third response message to the second wireless root node device, in a case where the first subnet number is a target subnet number of the first wireless root node device, wherein the first value is used to indicate that the first subnet number is the target subnet number of the first wireless root node device; write the first subnet number in a first field of a fourth response message and write a second value in a second field of the fourth response message to obtain the fourth response message and send the fourth response message to the second wireless root node device, in a case where the first subnet number is a temporary subnet number of the first wireless root node device, wherein the second value is used to indicate that the first subnet number is the temporary subnet number of the first wireless root node device.

[0121] In an example embodiment, the first receiving module is further configured to receive a second announcement message sent by a third wireless root node device in the wireless root node multicast group, wherein the second announcement message carries a fourth subnet number, and the fourth subnet number is a target subnet number of the third wireless root node device; record the fourth subnet number in the first routing table of the first wireless root node device, and determine whether the fourth subnet number is consistent with the first subnet number; and update the first subnet number to a fifth subnet number, in a case where the fourth subnet number is consistent with the first subnet number.

[0122] In an example embodiment, the determining module is further configured to, before sending the first inquiry request to the plurality of wireless root node devices in the wireless root node multicast group, perform at least one of the following: in a case where the first wireless root node device has joined the wireless root node multicast group, acquire a first subnet number determined by the first wireless root node device in a first preset manner; and in a case where the first wireless root node device receives a subnet number consistent with a subnet number of the first wireless root node device, acquire a first subnet number determined by the first wireless root node device in a second preset manner.

[0123] Figure 8 is a structural block diagram of a response message sending device according to an embodiment of the present application; as shown in Figure 8 , comprising:

[0124] The second receiving module 82 is configured to receive a first inquiry request sent by the first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with the capability of creating a wireless subnet.

[0125] The responding module 84 is configured to respond to the first inquiry request and send a first response message to the first wireless root node device.

[0126] The above device receives a first inquiry request sent by a first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with the capability of creating a wireless subnet; responds to the first inquiry request and sends a first response message to the first wireless root node device; determines, according to a state field of the first response message, a second subnet number of the wireless root node device; and determines, in a case where the first subnet number and the plurality of second subnet numbers are all inconsistent, the first subnet number as a target subnet number of the first wireless root node device; solves the problem that subnet number negotiation cannot be effectively performed in the related art, and further allocates a target subnet number to the first wireless root node device to enable the first wireless root node device to create a corresponding UMesh subnet according to the target subnet number.

[0127] In one example embodiment, the responding module 84 is further configured to, in a case where the second subnet number is a target subnet number of the second wireless root node device, write the second subnet number in a first field of the first response message and write a first numerical value in a second field of the first response message to obtain the first response message, wherein the first numerical value is used to indicate that the second subnet number is the target subnet number of the wireless root node device; and in a case where the second subnet number is a temporary subnet number of the second wireless root node device, write the first subnet number in the first field of the first response message and write a second numerical value in the second field of the first response message to obtain the first response message, wherein the second numerical value is used to indicate that the second subnet number is the temporary subnet number of the second wireless root node device.

[0128] Embodiments of the present application also provide a storage medium including a stored program, wherein the above-mentioned program performs any of the above-mentioned methods when executed.

[0129] Optionally, in the present embodiment, the above-mentioned storage medium can be configured to store program code for performing the following steps:

[0130] S11, sending a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of a first wireless root node device, and wherein the plurality of wireless root node devices and the first wireless root node device are both devices capable of creating a wireless subnet;

[0131] S12, receiving first response messages respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to status fields of the first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one;

[0132] S13, determining the first subnet number as a target subnet number of the first wireless root node device in a case where the first subnet number is inconsistent with the plurality of second subnet numbers.

[0133] Optionally, in the embodiment, the storage medium can be configured to store program codes for executing the following steps:

[0134] S21, receiving a first inquiry request sent by a first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and wherein the first wireless root node device and a second wireless root node device are both devices capable of creating a wireless subnet;

[0135] S22, responding to the first inquiry request and sending a first response message to the first wireless root node device.

[0136] Embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.

[0137] Optionally, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0138] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program:

[0139] S11, sending a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of a first wireless root node device, and wherein the plurality of wireless root node devices and the first wireless root node device are both devices capable of creating a wireless subnet;

[0140] S12, receiving first response messages respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to status fields of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one.

[0141] S13, in a case where the first subnet number is inconsistent with the plurality of second subnet numbers, determining the first subnet number as a target subnet number of the first wireless root node device.

[0142] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program:

[0143] S21, receiving a first inquiry request sent by a first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with a capability of creating a wireless subnet.

[0144] S22, responding to the first inquiry request and sending a first response message to the first wireless root node device.

[0145] Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0146] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.

[0147] Obviously, those skilled in the art should understand that each module or each step of the present application described above can be realized by using a general computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and optionally, each module or each step can be realized by using program codes executable by a computing device, so that each module or each step can be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described can be executed in a different order, or each module or each step can be manufactured into an individual integrated circuit module, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0148] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method for determining a subnet number, characterized by, The method is applied to a first wireless root node device, and comprises the following steps of: sending a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are devices with a capability of creating a wireless subnet; receiving first response messages respectively responded by the plurality of wireless root node devices, and determining a plurality of second subnet numbers according to a state field of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one; in a case where the first subnet number is inconsistent with the plurality of second subnet numbers, determining that the first subnet number is a target subnet number of the first wireless root node device. After receiving the first response messages respectively responded by the plurality of wireless root node devices, the method further comprises the following steps of: parsing the first response messages to obtain a first field and a second field of the first response messages, wherein the state field comprises the first field and the second field; determining a second subnet number of a wireless root node device corresponding to the response message according to the first field, and determining whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field.

2. The method of claim 1, wherein, Determining whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field comprises the following steps of: in a case where a value of the second field is a first value, determining that the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message, and recording the second subnet number in a first routing table of the first wireless root node device; in a case where the value of the second field is a second value, determining that the second subnet number is a temporary subnet number of the wireless root node device corresponding to the first response message.

3. The method of claim 1, wherein, After determining the plurality of second subnet numbers according to the plurality of first response messages, the method further comprises the following steps of: determining whether the first subnet number is consistent with any second subnet number in the plurality of second subnet numbers; in a case where the first subnet number is consistent with any second subnet number in the plurality of second subnet numbers, updating the first subnet number to a third subnet number; sending a second inquiry request to the plurality of wireless root node devices, wherein the second inquiry request carries the third subnet number.

4. The method of claim 1, wherein, After determining that the first subnet number is the target subnet number of the first wireless root node device, the method further comprises the following steps of: sending a first announcement message to the plurality of wireless root node devices, so that each wireless root node device in the plurality of wireless root node devices updates a second routing table of the each wireless root node device according to the first announcement message, wherein the first announcement message is used to indicate that the first subnet number is the target subnet number of the first wireless root node device.

5. The method of claim 1, wherein, The method further comprises the following steps of: receiving a third inquiry request sent by a second wireless root node device in the plurality of wireless root node devices; In a case that the first subnet number is a target subnet number of the first wireless root node device, the first subnet number is written in a first field of a third response message, a first value is written in a second field of the third response message, so as to obtain the third response message, and the third response message is sent to the second wireless root node device, where the first value is used to indicate that the first subnet number is the target subnet number of the first wireless root node device. In a case that the first subnet number is a temporary subnet number of the first wireless root node device, the first subnet number is written in a first field of a fourth response message, a second value is written in a second field of the fourth response message, so as to obtain the fourth response message, and the fourth response message is sent to the second wireless root node device, where the second value is used to indicate that the first subnet number is the temporary subnet number of the first wireless root node device.

6. The method of claim 1, wherein, After the first subnet number determined by the first wireless root node device in a preset manner is obtained, the method further comprises: receiving a second announcement message sent by a third wireless root node device of the wireless root node multicast group, where the second announcement message carries a fourth subnet number, and the fourth subnet number is a target subnet number of the third wireless root node device; recording the fourth subnet number in a first routing table of the first wireless root node device, and determining whether the fourth subnet number is consistent with the first subnet number; in a case that the fourth subnet number is consistent with the first subnet number, updating the first subnet number to a fifth subnet number.

7. The method of claim 1, wherein, Before the first inquiry request is sent to the plurality of wireless root node devices in the wireless root node multicast group, the method further comprises at least one of the following: in a case that the first wireless root node device has joined the wireless root node multicast group, obtaining a first subnet number determined by the first wireless root node device in a first preset manner; in a case that the first wireless root node device receives a subnet number consistent with a subnet number of the first wireless root node device, obtaining a first subnet number determined by the first wireless root node device in a second preset manner.

8. A method of sending a response message, characterized by, applied to a second wireless root node device, comprising: receiving a first inquiry request sent by a first wireless root node device, where the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with a capability of creating a wireless subnet; In response to the first inquiry request, a first response message is sent to the first wireless root node device, so that the first wireless root node analyzes the first response message to obtain a first field and a second field of the first response message after receiving the first response message; the second subnet number of the wireless root node device corresponding to the response message is determined according to the first field, and whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message is determined according to the second field, so that the first subnet number is determined as the target subnet number of the first wireless root node device in the case that the first subnet number and the plurality of second subnet numbers are inconsistent.

9. The method of claim 8, wherein the response message is a TCP SYN-ACK message. In response to the first inquiry request, a first response message is sent to the first wireless root node device, so that the first wireless root node analyzes the first response message to obtain a first field and a second field of the first response message after receiving the first response message; the second subnet number of the wireless root node device corresponding to the response message is determined according to the first field, and whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message is determined according to the second field, so that the first subnet number is determined as the target subnet number of the first wireless root node device in the case that the first subnet number and the plurality of second subnet numbers are inconsistent. In the case that the second subnet number is the target subnet number of the second wireless root node device, the first subnet number is written in the first field of the first response message, and a first value is written in the second field of the first response message to obtain the first response message, wherein the first value is used to indicate that the second subnet number is the target subnet number of the wireless root node device. In the case that the second subnet number is the temporary subnet number of the second wireless root node device, the first subnet number is written in the first field of the first response message, and a second value is written in the second field of the first response message to obtain the first response message, wherein the second value is used to indicate that the second subnet number is the temporary subnet number of the second wireless root node device.

10. A device for determining a subnet number, characterized by In response to the first inquiry request, a first response message is sent to the first wireless root node device, so that the first wireless root node analyzes the first response message to obtain a first field and a second field of the first response message after receiving the first response message; the second subnet number of the wireless root node device corresponding to the response message is determined according to the first field, and whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message is determined according to the second field, so that the first subnet number is determined as the target subnet number of the first wireless root node device in the case that the first subnet number and the plurality of second subnet numbers are inconsistent. The sending module is configured to send a first inquiry request to a plurality of wireless root node devices in a wireless root node multicast group, wherein the first inquiry request carries a first subnet number of a first wireless root node device, and the plurality of wireless root node devices and the first wireless root node device are devices with the capability of creating a wireless subnet. The first receiving module is configured to receive first response messages respectively responded by the plurality of wireless root node devices, and determine a plurality of second subnet numbers according to a status field of the plurality of first response messages, wherein the plurality of second subnet numbers correspond to the plurality of wireless root node devices one by one. The determining module is configured to determine the first subnet number as the target subnet number of the first wireless root node device in the case that the first subnet number and the plurality of second subnet numbers are inconsistent. The determining module is configured to analyze the first response message to obtain a first field and a second field of the first response message, wherein the status field includes the first field and the second field; the second subnet number of the wireless root node device corresponding to the response message is determined according to the first field, and whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message is determined according to the second field.

11. A response message sending apparatus, characterized by comprising: In response to the first inquiry request, a first response message is sent to the first wireless root node device, so that the first wireless root node analyzes the first response message to obtain a first field and a second field of the first response message after receiving the first response message; the second subnet number of the wireless root node device corresponding to the response message is determined according to the first field, and whether the second subnet number is the target subnet number of the wireless root node device corresponding to the first response message is determined according to the second field, so that the first subnet number is determined as the target subnet number of the first wireless root node device in the case that the first subnet number and the plurality of second subnet numbers are inconsistent. a second receiving module, configured to receive a first inquiry request sent by a first wireless root node device, wherein the first inquiry request carries a first subnet number of the first wireless root node device, and the first wireless root node device and the second wireless root node device are devices with a capability of creating a wireless subnet; a responding module, configured to respond to the first inquiry request and send a first response message to the first wireless root node device, so that the first wireless root node analyzes the first response message to obtain a first field and a second field of the first response message after receiving the first response message, determines a second subnet number of a wireless root node device corresponding to the response message according to the first field, and determines whether the second subnet number is a target subnet number of the wireless root node device corresponding to the first response message according to the second field, so as to determine that the first subnet number is the target subnet number of the first wireless root node device in a case where the first subnet number and a plurality of second subnet numbers are all inconsistent.

12. A computer readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 7 or the method of any one of claims 8 to 9 when executed. 13.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 or the method of any one of claims 8 to 9 by using the computer program.

Citation Information

Patent Citations

  • Method and device for transmitting data packet based on IPv6 (Internet Protocol Version 6) low-power wireless personal area network

    CN102457900A

  • System for automatically determining a network address

    US6532217B1