Dynamic networking method, apparatus, and electronic device
Abstract
A dynamic networking method applied to a first device includes obtaining first networking feature data, broadcasting a first election message and receiving a second election message broadcast by a second device, receiving an enrollment message broadcast by a determined master device, and sending an enrollment response message to the master device according to the access identification to access the networking access point. The first networking feature data represents a networking capability of the first device. The first election message includes the first networking feature data. The second election message includes second networking feature data of the corresponding second device. The master device is determined according to the first networking feature data and the second networking feature data. The enrollment message includes an access identification of a networking access point created by the master device.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A dynamic networking method applied to a first device comprising:
obtaining first networking feature data, the first networking feature data representing a networking capability of the first device; broadcasting a first election message and receiving a second election message broadcast by a second device, the first election message including the first networking feature data, and the second election message including second networking feature data of the corresponding second device; receiving an enrollment message broadcast by a determined master device, the master device being determined according to the first networking feature data and the second networking feature data, and the enrollment message including an access identification of a networking access point created by the master device; and sending an enrollment response message to the master device according to the access identification to access the networking access point.
2 . The method according to claim 1 , wherein obtaining the first networking feature data includes:
obtaining first configuration parameters of the first device in different capability dimensions; obtaining a first networking score for the networking capability of the first device according to the first configuration parameters and networking weights corresponding to the capability dimensions; and obtaining the first networking feature data using the first configuration parameters and the first networking score.
3 . The method according to claim 2 , wherein obtaining the first networking feature data using the first configuration parameters and the first networking score includes:
performing hard encryption processing on the first configuration parameters and the first networking score using a predetermined hardware encryption feature to obtain a first networking capability encrypted text; and performing serialization on the first networking capability encrypted text to obtain the first networking feature data.
4 . The method according to claim 2 , further comprising:
according to a comparison result of the first networking feature data and the second networking feature data, determining that the first device satisfies a networking abandonment condition, determining the first device as a secondary device, and stopping broadcasting the first election message.
5 . The method according to claim 4 , wherein determining that the first device satisfies the networking abandonment condition according to the comparison result of the first networking feature data and the second networking feature data includes:
parsing the second networking feature data to obtain a second networking score and a plurality of second configuration parameters of the corresponding second device; comparing the second networking score with the first networking score of the first device; and in response to the second networking score being greater than the first networking score, determining that the first device satisfies the networking abandonment condition.
6 . The method according to claim 5 , wherein determining that the first device satisfies the networking abandonment condition according to the comparison result of the first networking feature data and the second networking feature data further includes:
determining that the second networking score is equal to the first networking score, obtaining a second configuration parameter and a first configuration parameter of a corresponding capability dimension according to an order of networking weights of different capability dimensions from large to small; and in response to the second configuration parameter being greater than the first configuration parameter, determining that the first device satisfies the networking abandonment condition and stopping obtaining the second configuration parameter and the first configuration parameter of the capability dimension corresponding to a next networking weight.
7 . The method according to claim 6 , wherein determining that the first device satisfies the networking abandonment condition according to the comparison result of the first networking feature data and the first second networking feature data further includes:
determining that the second configuration parameters under different capability dimensions are equal to the first configuration parameters, and obtaining first broadcasting time included in the first election message and second broadcasting time included in the second election message; and in response to the first broadcasting time being later than the second broadcasting time, determining that the first device satisfies the networking abandonment condition.
8 . The method according to claim 4 , further comprising:
according to the comparison result of the first networking feature data and the second networking feature data, determining that the first device satisfies a networking election condition and returning to broadcasting the first election message; determining that the second election message broadcast by the second device is not received within a predetermined time length, triggering to determine the first device as the master device; creating a networking access point and obtaining an access identification of the networking access point; and broadcasting an enrollment message including the access identification.
9 . The method according to claim 1 , wherein broadcasting the first election message includes:
obtaining corresponding to-be-broadcast information of the first device according to a predetermined frame structure of a BLE broadcasting method, the to-be-broadcast information including the first networking feature data and device information of the first device; forming a first election message having the predetermined frame structure using the to-be-broadcast information; and broadcasting the first election message in the BLE broadcasting method.
10 . A dynamic networking apparatus applied to a first device comprising:
a first networking feature data acquisition module configured to obtain first networking feature data, the first networking feature data representing a networking capability of the first device; a first election message broadcasting module configured to broadcast a first election message, the first election message including the first networking feature data; a second election message reception module configured to receive a second election message broadcast by a second device, the second election message including second networking feature data of the corresponding second device; an enrollment message reception module configured to receive an enrollment message broadcast by a determined master device, the master device being determined according to the first networking feature data and the second networking feature data, and the enrollment message including an access identification of a networking access point created by the master device; and an enrollment module configured to send an enrollment response message to the master device according to the access identification to access the networking access point.
11 . The apparatus according to claim 10 , wherein the first networking feature data acquisition module further includes:
a first configuration parameter acquisition unit configured to obtain first configuration parameters of the first device in different capability dimensions; a first networking score acquisition unit configured to obtain a first networking score for the networking capability of the first device according to the first configuration parameters and networking weights corresponding to the capability dimensions; and a first networking feature data acquisition unit configured to obtain the first networking feature data using the first configuration parameters and the first networking score.
12 . An electronic device comprising:
a communication interface; and a processing apparatus including:
a processor; and
a memory storing a computer program that, when executed by the processor, causes the processor to:
obtain first networking feature data, the first networking feature data representing a networking capability of the first device;
broadcast a first election message and receive a second election message broadcast by a second device, the first election message including the first networking feature data, and the second election message including second networking feature data of the corresponding second device;
receive an enrollment message broadcast by a determined master device, the master device being determined according to the first networking feature data and the second networking feature data, and the enrollment message including an access identification of a networking access point created by the master device; and
send an enrollment response message to the master device according to the access identification to access the networking access point.
13 . The device according to claim 12 , wherein the processor is further configured to:
obtain first configuration parameters of the first device in different capability dimensions; obtain a first networking score for the networking capability of the first device according to the first configuration parameters and networking weights corresponding to the capability dimensions; and obtain the first networking feature data using the first configuration parameters and the first networking score.
14 . The device according to claim 13 , wherein the processor is further configured to:
perform hard encryption processing on the first configuration parameters and the first networking score using a predetermined hardware encryption feature to obtain a first networking capability encrypted text; and perform serialization on the first networking capability encrypted text to obtain the first networking feature data.
15 . The device according to claim 13 , wherein the processor is further configured to:
according to a comparison result of the first networking feature data and the second networking feature data, determine that the first device satisfies a networking abandonment condition, determining the first device as a secondary device, and stopping broadcasting the first election message.
16 . The device according to claim 15 , wherein the processor is further configured to:
parse the second networking feature data to obtain a second networking score and a plurality of second configuration parameters of the corresponding second device; compare the second networking score with the first networking score of the first device; and in response to the second networking score being greater than the first networking score, determine that the first device satisfies the networking abandonment condition.
17 . The device according to claim 16 , wherein the processor is further configured to:
determine that the second networking score is equal to the first networking score, and obtain a second configuration parameter and a first configuration parameter of a corresponding capability dimension according to an order of networking weights of different capability dimensions from large to small; and in response to the second configuration parameter being greater than the first configuration parameter, determine that the first device satisfies the networking abandonment condition and stopping obtaining the second configuration parameter and the first configuration parameter of the capability dimension corresponding to a next networking weight.
18 . The device according to claim 17 , wherein the processor is further configured to:
determine that the second configuration parameters under different capability dimensions are equal to the first configuration parameters, and obtain first broadcasting time included in the first election message and second broadcasting time included in the second election message; and in response to the first broadcasting time being later than the second broadcasting time, determine that the first device satisfies the networking abandonment condition.
19 . The device according to claim 15 , wherein the processor is further configured to:
according to the comparison result of the first networking feature data and the second networking feature data, determine that the first device satisfies a networking election condition and returning to broadcasting the first election message; determine that the second election message broadcast by the second device is not received within a predetermined time length, and trigger to determine the first device as the master device; create a networking access point and obtain an access identification of the networking access point; and broadcast an enrollment message including the access identification.
20 . The device according to claim 12 , wherein the processor is further configured to:
obtain corresponding to-be-broadcast information of the first device according to a predetermined frame structure of a BLE broadcasting method, the to-be-broadcast information including the first networking feature data and device information of the first device; form a first election message having the predetermined frame structure using the to-be-broadcast information; and broadcast the first election message in the BLE broadcasting method.Join the waitlist — get patent alerts
Track US2024224157A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.