CN113132157A - Equipment configuration method and device, storage medium and electronic device - Google Patents

Equipment configuration method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113132157A
CN113132157A CN202110363204.1A CN202110363204A CN113132157A CN 113132157 A CN113132157 A CN 113132157A CN 202110363204 A CN202110363204 A CN 202110363204A CN 113132157 A CN113132157 A CN 113132157A
Authority
CN
China
Prior art keywords
multicast
information
target device
configuration
data length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110363204.1A
Other languages
Chinese (zh)
Other versions
CN113132157B (en
Inventor
马聪敏
徐彦伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110363204.1A priority Critical patent/CN113132157B/en
Publication of CN113132157A publication Critical patent/CN113132157A/en
Application granted granted Critical
Publication of CN113132157B publication Critical patent/CN113132157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/18Network planning tools
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a configuration method and a configuration device of equipment, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring a target device list, wherein the target device list comprises: a plurality of devices that have entered sniffer mode; determining a device to be configured from a target device list so as to send a first multicast front packet to the device to be configured, wherein the first multicast front packet is used for indicating a data protocol of a configuration condition of the device to be configured; receiving confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured, thereby solving the problems that different configuration devices cannot be configured and distinguished in the related art.

Description

Equipment configuration method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a device configuration method and apparatus, a storage medium, and an electronic apparatus.
Background
When WIFI equipment enters to be configured in batch, a configuration party sends configuration information to the equipment, and the equipment is configured successfully or is not omitted, so the equipment is configured in sequence, the configuration information contains equipment information (such as MAC (media access control) address), the configuration information received by the configured equipment is compared and matched with the own equipment information, the configuration is successful, after a configured router is connected, configuration confirmation information is sent to the configuration party, and the configuration party starts to configure the next equipment; but the configuration information of the previous device is also received, thus affecting the configuration of the following device.
Aiming at the problems that different configuration devices cannot be configured and distinguished and the like in the related art, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a device configuration method and device, a storage medium and an electronic device, which are used for at least solving the problems that different configuration devices cannot be configured and distinguished in the related art.
According to an aspect of an embodiment of the present invention, there is provided a device configuration method, including: acquiring a target device list, wherein the target device list comprises: a plurality of devices that have entered sniffer mode; determining a device to be configured from the target device list to send a first multicast preamble packet to the device to be configured, wherein the first multicast preamble packet is used for indicating a data protocol of a device configuration condition to be configured; receiving confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured.
In an exemplary embodiment, receiving acknowledgement information of a target device to be configured that has acquired the first multicast preamble packet, to determine a router information configuration result of the target device to be configured according to the acknowledgement information, includes: acquiring a preset data length of a target device to be configured; determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length; and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
In an exemplary embodiment, after determining a device to be configured from the target device list to send a first multicast preamble to the device to be configured, the method further includes: receiving an analysis result of the device to be configured for the first multicast preamble packet, wherein the analysis result is used for indicating the size of the data length of the first multicast preamble packet; and sending a second multicast preamble packet with increased data length to the equipment to be configured under the condition that the first multicast preamble packet corresponding to the analysis result does not meet the requirement of the equipment to be configured.
In an exemplary embodiment, after sending a second multicast preamble packet with an increased data length to the device to be configured when the first multicast preamble packet corresponding to the parsing result does not meet the requirement of the device to be configured, the method further includes: sending a data zero clearing instruction to the device to be configured, wherein the data zero clearing instruction is used for instructing the device to be configured to delete the data of the other multicast preamble packets except the second multicast preamble packet; comparing the analyzed second data length of the second multicast preamble packet with the size of the first data length obtained before; and matching the router information in the configuration information of the equipment to be configured by using the second data length under the condition that the second data length is inconsistent with the first data length.
In an exemplary embodiment, after receiving the confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine the configuration result of the router information of the target device to be configured according to the confirmation information, the method further includes: acquiring successfully configured record information of the equipment to be configured; and indicating the router to broadcast the successfully configured equipment to be configured according to the recording information.
In an exemplary embodiment, before obtaining the target device list, the method further includes: acquiring successfully configured record information stored in a router; and sending a configuration prohibition instruction to the successfully configured target equipment according to the record information, wherein the configuration prohibition instruction is used for indicating that the current equipment to be configured is connected with the router and does not need to be configured.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for configuring a device, including: an obtaining module, configured to obtain a target device list, where the target device list includes: a plurality of devices that have entered sniffer mode; a determining module, configured to determine a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, where the first multicast preamble packet is used to indicate a data protocol of a configuration condition of the device to be configured; a receiving module, configured to receive acknowledgement information of the target device to be configured that has obtained the first multicast preamble packet, so as to determine a configuration result of router information of the target device to be configured according to the acknowledgement information, where the acknowledgement information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured.
In an exemplary embodiment, the receiving module is further configured to obtain a preset data length of the target device to be configured; determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length; and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
In an exemplary embodiment, the apparatus further includes: a sending module, configured to receive an analysis result of the device to be configured for the first multicast preamble packet, where the analysis result is used to indicate a size of a data length of the first multicast preamble packet; and sending a second multicast preamble packet with increased data length to the equipment to be configured under the condition that the first multicast preamble packet corresponding to the analysis result does not meet the requirement of the equipment to be configured.
In an exemplary embodiment, the sending module is further configured to send a data clearing instruction to the device to be configured, where the data clearing instruction is used to instruct the device to be configured to delete data of other multicast preamble packets except the second multicast preamble packet; comparing the analyzed second data length of the second multicast preamble packet with the size of the first data length obtained before; and matching the router information in the configuration information of the equipment to be configured by using the second data length under the condition that the second data length is inconsistent with the first data length.
In an exemplary embodiment, the modules further include a broadcasting module, configured to obtain record information of successful configuration of the device to be configured; and indicating the router to broadcast the successfully configured equipment to be configured according to the recording information.
In an exemplary embodiment, the modules further include an instruction module, further configured to obtain record information of successful configuration stored in the router; and sending a configuration prohibition instruction to the successfully configured target equipment according to the record information, wherein the configuration prohibition instruction is used for indicating that the current equipment to be configured is connected with the router and does not need to be configured.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the configuration method of the above apparatus when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the configuration method of the apparatus through the computer program.
In the embodiment of the present invention, a target device list is obtained, where the target device list includes: a plurality of devices that have entered sniffer mode; determining a device to be configured from a target device list so as to send a first multicast front packet to the device to be configured, wherein the first multicast front packet is used for indicating a data protocol of a configuration condition of the device to be configured; receiving confirmation information of a target device to be configured, which has acquired a first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured, that is, by confirming a relationship between the data length of the multicast preamble packet and the data length in the device information in the device to be configured, devices to be configured, which correspond to multicast preamble packets of different lengths, are distinguished, thereby solving the problem that different devices to be configured cannot be distinguished in the related art, realizing an alternate change in multicast basic length, avoiding interference of previous and subsequent data, and improving configuration efficiency and success rate of batch configuration.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a configuration method of a device according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of configuration of a device according to an embodiment of the invention;
FIG. 3 is a flow diagram of a WIF device configuration according to an alternate embodiment of the present invention;
fig. 4 is a block diagram of a configuration apparatus of a device according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It is noted that the terms first, second and the like in the description and in the claims, and in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a computer terminal, a mobile terminal or a similar operation device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a device configuration method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the configuration method of the device in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for configuring a device is provided, and fig. 2 is a flowchart of the method for configuring a device according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, a target device list is obtained, wherein the target device list comprises: a plurality of devices that have entered sniffer mode;
step S204, determining a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, wherein the first multicast preamble packet is used for indicating a data protocol of a configuration condition of the device to be configured;
step S206, receiving confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine a configuration result of the router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured.
Through the steps, a target device list is obtained, wherein the target device list comprises: a plurality of devices that have entered sniffer mode; determining a device to be configured from a target device list so as to send a first multicast front packet to the device to be configured, wherein the first multicast front packet is used for indicating a data protocol of a configuration condition of the device to be configured; receiving confirmation information of a target device to be configured, which has acquired a first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured, that is, by confirming a relationship between the data length of the multicast preamble packet and the data length in the device information in the device to be configured, devices to be configured, which correspond to multicast preamble packets of different lengths, are distinguished, thereby solving the problem that different devices to be configured cannot be distinguished in the related art, realizing an alternate change in multicast basic length, avoiding interference of previous and subsequent data, and improving configuration efficiency and success rate of batch configuration.
In an exemplary embodiment, receiving acknowledgement information of a target device to be configured that has acquired the first multicast preamble packet, to determine a router information configuration result of the target device to be configured according to the acknowledgement information, includes: acquiring a preset data length of a target device to be configured; determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length; and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
In short, after the device to be configured receives the multicast preamble packet, the data length formed by the datagram protocol with the basic length contained in the multicast preamble packet and the device information of the configurable device is confirmed, and under the condition that the device information of the configurable device is the same as the preset data length of the target device to be configured, the configurable device is proved to be the target device to be configured, the router information in the configuration information of the configurable device can be successfully configured, and when the device information of the configurable device is different from the preset data length of the target device to be configured, the configurable device is proved not to be the target device to be configured, and the router information in the configuration information of the configurable device cannot be successfully configured.
In an exemplary embodiment, after determining a device to be configured from the target device list to send a first multicast preamble to the device to be configured, the method further includes: receiving an analysis result of the device to be configured for the first multicast preamble packet, wherein the analysis result is used for indicating the size of the data length of the first multicast preamble packet; and sending a second multicast preamble packet with increased data length to the equipment to be configured under the condition that the first multicast preamble packet corresponding to the analysis result does not meet the requirement of the equipment to be configured. That is, in order to ensure that each device to be configured can be successfully configured, the device to be configured continuously receives a new second multicast preamble packet until the configuration is successful under the condition that the analysis result of the received first multicast preamble packet does not meet the requirement of the current device to be configured.
In an exemplary embodiment, after sending a second multicast preamble packet with an increased data length to the device to be configured when the first multicast preamble packet corresponding to the parsing result does not meet the requirement of the device to be configured, the method further includes: sending a data zero clearing instruction to the device to be configured, wherein the data zero clearing instruction is used for instructing the device to be configured to delete the data of the other multicast preamble packets except the second multicast preamble packet; comparing the analyzed second data length of the second multicast preamble packet with the size of the first data length obtained before; and matching the router information in the configuration information of the equipment to be configured by using the second data length under the condition that the second data length is inconsistent with the first data length.
It can be understood that, in order to avoid the stacking of data, the length of the preamble packet is different from that of the previous preamble packet, the received data is cleared, and the data is collected again; and matching a second data length different from the unmatched first data length with a preset data length in the equipment to be configured, so as to complete the configuration of the router information in the configuration information.
In an exemplary embodiment, after receiving the confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine the configuration result of the router information of the target device to be configured according to the confirmation information, the method further includes: acquiring successfully configured record information of the equipment to be configured; and indicating the router to broadcast the successfully configured equipment to be configured according to the recording information.
That is, in order to enable the connection situation between the target device and the router to be known quickly, the device to be configured that is configured successfully may also send a UDP packet carrying information of the device to be configured to the router, so that the device to be configured broadcasts information that the device to be configured has completed configuration.
In an exemplary embodiment, before obtaining the target device list, the method further includes: acquiring successfully configured record information stored in a router; and sending a configuration prohibition instruction to the successfully configured target equipment according to the record information, wherein the configuration prohibition instruction is used for indicating that the current equipment to be configured is connected with the router and does not need to be configured. In order to avoid the situation that the same equipment is configured for multiple times, a configuration forbidding instruction is sent to the equipment which is configured successfully, and broadcasting is carried out to indicate that the current equipment to be configured is connected with the router and does not need to be configured again.
For better understanding of the technical solutions of the embodiments and the alternative embodiments of the present invention, the following explains the flow of the configuration method of the above-described device with reference to an example, but is not limited to the technical solutions of the embodiments of the present invention.
The invention provides a method for configuring WIFI equipment access in batches, which adopts UDP (User Datagram Protocol, UDP for short) multicast to send configuration information, and the WIFI equipment collects data in a sniffer mode (messy mode), thereby realizing the configuration of the WIFI equipment; when the WIFI equipment is configured in batches in the mode, strategies of different UDP data basic lengths are adopted to avoid interference of configuration information of the previous equipment on configuration information of the following equipment. And then, the configuration information is sent to the equipment in sequence, the successfully configured sending information of the equipment is configured, so that a configuring party can confirm whether the configuration is successful, and the interference of the data of the configuration information in front on the subsequent configuration is prevented by sequentially configuring and alternately changing the basic length of the sent data, thereby improving the success rate of the batch configuration of the WIF equipment.
As an optional implementation manner, assuming that a WIFI device 1 and a WIFI device 2 are connected to a configuring party (which is equivalent to a router in the embodiment of the present invention), fig. 3 is a schematic flowchart of a WIF device configuration according to an optional embodiment of the present invention, and includes the following steps:
step 1, a configured WIFI device 2 enters a configuration mode;
step 2, the configured WIFI equipment 1 enters a configuration mode;
step 3, the configured WIFI equipment 2 enters a sniffer mode;
step 4, the configured WIFI equipment 1 enters a sniffer mode;
step 5, the configuration party prepares configuration data of the equipment 1;
step 6, the WIFI equipment 2 in the configuration direction sends a UDP packet which is a in length and carries the preamble information;
step 7, configuring the direction WIFI equipment 1 to send a UDP packet which is a in length and carries the preamble information;
step 8, the WIFI equipment 1 in the configuration direction sends configuration data with the information of the WIFI equipment 1, and the length of a data packet is increased progressively on the basis of a;
step 9, the WIFI equipment 2 in the configuration direction sends configuration data with the information of the equipment 1, and the length of a data packet is increased progressively on the basis of a;
step 10, the WIFI equipment 1 analyzes the received data, matches the information of the equipment, succeeds in matching, and exits from a sniffer mode; specifically, the device parses the received data packet, matches the configuration data of the device 1 information carried therein with the information stored in the device, and when matching, proves that the device to be configured corresponding to the data packet is the device 1, and then the device 1 is successfully configured, the sniffer mode is released, and the device cannot be found by other configuring parties.
Step 11, the WIFI equipment 2 analyzes the received data, matches the information of the equipment, and continues to receive the data if the received data is not matched with the information of the equipment; for example, when the data packets do not match, it is proved that the device to be configured corresponding to the data packet is not the device 1, at this time, the device 1 fails to configure, and continues to receive new data packets for configuration authentication.
Step 12, the WIFI equipment 1 accesses a configured router;
step 13, broadcasting the content corresponding to the UDP packet carrying the self information;
step 14, preparing configuration data of the device 2;
step 15, configuring the direction WIFI equipment 2 to send a UDP packet which is b in length and carries the preamble information;
step 16, when the length of the preamble packet is different from the previous length, the received data is clear 0, and the data is collected again;
step 17, the WIFI equipment 2 in the configuration direction sends configuration data with the information of the WIFI equipment 2, and the length of a data packet is increased progressively on the basis of b;
step 18, the WIFI equipment 2 analyzes the received data, matches the information of the equipment, succeeds in matching, and exits from the sniffer mode;
step 19, the WIFI equipment 2 accesses to the configured router;
step 20, broadcasting the content corresponding to the UDP packet carrying the self information by the WIFI equipment 2;
in summary, the overall process is as follows, a) the WIFI device enters configuration first and enters into sniffer mode, and the WIFI device in this mode can be sensed by the configuration party quickly; b) a configuring party firstly prepares configuration data of the equipment 1 and firstly sends a UDP multicast preamble packet with a basic length of a; then, the configuration data carrying the information of the device 1 is sent, and the length of the data packets is sequentially increased on the basis of the basic length a. c) After the WIFI equipment receives the data, matching own equipment information, if the matching is successful, configuring, and exiting from a sniffer mode; d) and the router which is accessed to the configuration broadcasts a UDP packet carrying the information of the router, and declares that the router is successfully configured. e) The configurator receives the above information, stops sending the information of the configuration equipment 1, and starts to configure the next equipment; f) repeating the step b) except that the basic length is changed into b; after receiving the preamble packet with the changed length, the device 2 clears 0 the previously received data and collects the data again. g) And then, the configuration information is changed one time after the configuration is successful, and the basic lengths a and b are changed alternately until all the devices are successfully configured.
It should be noted that the basic length of the UDP multicast preamble packet is not limited to the length a and the length b in the optional embodiment of the present invention, and may be flexibly adjusted according to the actual situation, which is not limited by the present invention.
Through the optional embodiment, when the WIFI equipment is configured in batch by using UDP multicast, the WIFI equipment is configured in sequence, and the configured basic lengths are changed alternately so as to determine the success condition of the configured equipment and avoid the interference of null data.
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 implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, an evener, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device configuration apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a configuration apparatus of a device according to an embodiment of the present invention, as shown in fig. 4, the apparatus including:
an obtaining module 42, configured to obtain a target device list, where the target device list includes: a plurality of devices that have entered sniffer mode;
a determining module 44, configured to determine a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, where the first multicast preamble packet is used to indicate a data protocol of a device configuration condition to be configured;
a receiving module 46, configured to receive confirmation information of the target device to be configured that has obtained the first multicast preamble packet, so as to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured.
By the above apparatus, a target device list is obtained, where the target device list includes: a plurality of devices that have entered sniffer mode; determining a device to be configured from a target device list so as to send a first multicast front packet to the device to be configured, wherein the first multicast front packet is used for indicating a data protocol of a configuration condition of the device to be configured; receiving confirmation information of a target device to be configured, which has acquired a first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured, that is, by confirming a relationship between the data length of the multicast preamble packet and the data length in the device information in the device to be configured, devices to be configured, which correspond to multicast preamble packets of different lengths, are distinguished, thereby solving the problem that different devices to be configured cannot be distinguished in the related art, realizing an alternate change in multicast basic length, avoiding interference of previous and subsequent data, and improving configuration efficiency and success rate of batch configuration.
In an exemplary embodiment, the receiving module is further configured to obtain a preset data length of the target device to be configured; determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length; and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
In short, after the device to be configured receives the multicast preamble packet, the data length formed by the datagram protocol with the basic length contained in the multicast preamble packet and the device information of the configurable device is confirmed, and under the condition that the device information of the configurable device is the same as the preset data length of the target device to be configured, the configurable device is proved to be the target device to be configured, the router information in the configuration information of the configurable device can be successfully configured, and when the device information of the configurable device is different from the preset data length of the target device to be configured, the configurable device is proved not to be the target device to be configured, and the router information in the configuration information of the configurable device cannot be successfully configured.
In an exemplary embodiment, the apparatus further includes: a sending module, configured to receive an analysis result of the device to be configured for the first multicast preamble packet, where the analysis result is used to indicate a size of a data length of the first multicast preamble packet; and sending a second multicast preamble packet with increased data length to the equipment to be configured under the condition that the first multicast preamble packet corresponding to the analysis result does not meet the requirement of the equipment to be configured. That is, in order to ensure that each device to be configured can be successfully configured, the device to be configured continuously receives a new second multicast preamble packet until the configuration is successful under the condition that the analysis result of the received first multicast preamble packet does not meet the requirement of the current device to be configured.
In an exemplary embodiment, the sending module is further configured to send a data clearing instruction to the device to be configured, where the data clearing instruction is used to instruct the device to be configured to delete data of other multicast preamble packets except the second multicast preamble packet; comparing the analyzed second data length of the second multicast preamble packet with the size of the first data length obtained before; and matching the router information in the configuration information of the equipment to be configured by using the second data length under the condition that the second data length is inconsistent with the first data length.
It can be understood that, in order to avoid the stacking of data, the length of the preamble packet is different from that of the previous preamble packet, the received data is cleared, and the data is collected again; and matching a second data length different from the unmatched first data length with a preset data length in the equipment to be configured, so as to complete the configuration of the router information in the configuration information.
In an exemplary embodiment, the modules further include a broadcasting module, configured to obtain record information of successful configuration of the device to be configured; and indicating the router to broadcast the successfully configured equipment to be configured according to the recording information.
That is, in order to enable the connection situation between the target device and the router to be known quickly, the device to be configured that is configured successfully may also send a UDP packet carrying information of the device to be configured to the router, so that the device to be configured broadcasts information that the device to be configured has completed configuration.
In an exemplary embodiment, the modules further include an instruction module, further configured to obtain record information of successful configuration stored in the router; and sending a configuration prohibition instruction to the successfully configured target equipment according to the record information, wherein the configuration prohibition instruction is used for indicating that the current equipment to be configured is connected with the router and does not need to be configured. In order to avoid the situation that the same equipment is configured for multiple times, a configuration forbidding instruction is sent to the equipment which is configured successfully, and broadcasting is carried out to indicate that the current equipment to be configured is connected with the router and does not need to be configured again.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining a target device list, wherein the target device list includes: a plurality of devices that have entered sniffer mode;
s2, determining a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, where the first multicast preamble packet is used to indicate a data protocol of a configuration condition of the device to be configured;
s3, receiving confirmation information of the target device to be configured that has obtained the first multicast preamble packet, so as to determine a configuration result of the router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may 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.
In an exemplary embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining a target device list, wherein the target device list includes: a plurality of devices that have entered sniffer mode;
s2, determining a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, where the first multicast preamble packet is used to indicate a data protocol of a configuration condition of the device to be configured;
s3, receiving confirmation information of the target device to be configured that has obtained the first multicast preamble packet, so as to determine a configuration result of the router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for configuring a device, comprising:
acquiring a target device list, wherein the target device list comprises: a plurality of devices that have entered sniffer mode;
determining a device to be configured from the target device list to send a first multicast preamble packet to the device to be configured, wherein the first multicast preamble packet is used for indicating a data protocol of a device configuration condition to be configured;
receiving confirmation information of the target device to be configured, which has acquired the first multicast preamble packet, to determine a configuration result of router information of the target device to be configured according to the confirmation information, where the confirmation information is used to indicate that the data length of the first multicast preamble packet matches the data length in the device information in the target device to be configured, and the device to be configured includes the target device to be configured.
2. The method of claim 1, wherein receiving acknowledgement information of the target device to be configured that has acquired the first multicast preamble packet to determine a router information configuration result of the target device to be configured according to the acknowledgement information comprises:
acquiring a preset data length of a target device to be configured;
determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length;
and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
3. The method of claim 1, wherein after determining the device to be configured from the target device list to send the first multicast preamble to the device to be configured, the method further comprises:
receiving an analysis result of the device to be configured for the first multicast preamble packet, wherein the analysis result is used for indicating the size of the data length of the first multicast preamble packet;
and sending a second multicast preamble packet with increased data length to the equipment to be configured under the condition that the first multicast preamble packet corresponding to the analysis result does not meet the requirement of the equipment to be configured.
4. The method according to claim 3, wherein after sending a second multicast preamble packet with an increased data length to the device to be configured when the first multicast preamble packet corresponding to the parsing result does not meet the requirement of the device to be configured, the method further comprises:
sending a data zero clearing instruction to the device to be configured, wherein the data zero clearing instruction is used for instructing the device to be configured to delete the data of the other multicast preamble packets except the second multicast preamble packet;
comparing the analyzed second data length of the second multicast preamble packet with the size of the first data length obtained before;
and matching the router information in the configuration information of the equipment to be configured by using the second data length under the condition that the second data length is inconsistent with the first data length.
5. The method according to claim 1, wherein after receiving acknowledgement information of the target device to be configured that has acquired the first multicast preamble packet to determine a configuration result of router information of the target device to be configured according to the acknowledgement information, the method further comprises:
acquiring successfully configured record information of the equipment to be configured;
and indicating the router to broadcast the successfully configured equipment to be configured according to the recording information.
6. The method of claim 1, wherein prior to obtaining the list of target devices, the method further comprises:
acquiring successfully configured record information stored in a router;
and sending a configuration prohibition instruction to the successfully configured target equipment according to the record information, wherein the configuration prohibition instruction is used for indicating that the current equipment to be configured is connected with the router and does not need to be configured.
7. An apparatus for configuring a device, comprising:
an obtaining module, configured to obtain a target device list, where the target device list includes: a plurality of devices that have entered sniffer mode;
a determining module, configured to determine a device to be configured from the target device list, so as to send a first multicast preamble packet to the device to be configured, where the first multicast preamble packet is used to indicate a data protocol of a configuration condition of the device to be configured;
a receiving module, configured to receive acknowledgement information of the target device to be configured that has obtained the first multicast preamble packet, so as to determine a configuration result of router information of the target device to be configured according to the acknowledgement information, where the acknowledgement information is used to indicate that a data length of the first multicast preamble packet matches a data length in device information in the target device to be configured, and the device to be configured includes the target device to be configured.
8. The apparatus according to claim 7, wherein the receiving module is further configured to obtain a preset data length of a target device to be configured; determining that the router information in the configuration information of the target device to be configured is successfully configured under the condition that the first data length corresponding to the first multicast preamble packet is matched with the preset data length; and determining that the router information configuration in the configuration information of the target device to be configured fails when the first data length corresponding to the first multicast preamble packet does not match the preset data length.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202110363204.1A 2021-04-02 2021-04-02 Equipment configuration method and device, storage medium and electronic device Active CN113132157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110363204.1A CN113132157B (en) 2021-04-02 2021-04-02 Equipment configuration method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110363204.1A CN113132157B (en) 2021-04-02 2021-04-02 Equipment configuration method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113132157A true CN113132157A (en) 2021-07-16
CN113132157B CN113132157B (en) 2023-06-20

Family

ID=76774775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110363204.1A Active CN113132157B (en) 2021-04-02 2021-04-02 Equipment configuration method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113132157B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157650A (en) * 2021-12-16 2022-03-08 上海市共进通信技术有限公司 Equipment for network package configuration based on HTTP protocol and implementation method thereof

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540732A (en) * 2009-05-06 2009-09-23 华为技术有限公司 Method and device for transmitting link data
CN104581647A (en) * 2015-01-30 2015-04-29 青岛海尔智能家电科技有限公司 Network access method and device of intelligent equipment
CN104618988A (en) * 2015-01-21 2015-05-13 青岛海尔智能家电科技有限公司 Smart device network access method and device
CN105050083A (en) * 2015-05-25 2015-11-11 深圳创维数字技术有限公司 Network configuration method and system for intelligent equipment
CN105873052A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 Network access method and device of wifi device
CN105898831A (en) * 2016-03-29 2016-08-24 海尔优家智能科技(北京)有限公司 Method and apparatus for smart device accessing wifi and smart device
CN106060809A (en) * 2016-05-30 2016-10-26 上海斐讯数据通信技术有限公司 Method for rapidly access wireless network, wireless route device and smart device
CN106130800A (en) * 2016-08-29 2016-11-16 杭州迪普科技有限公司 A kind of processing method and processing device of Frame
US20170094600A1 (en) * 2015-09-25 2017-03-30 Intel Corporation Apparatus, system and method of communicating a wakeup packet
CN106973124A (en) * 2017-03-02 2017-07-21 深圳壹秘科技有限公司 Network connection collocation method and its electronic installation
CN109309964A (en) * 2017-07-28 2019-02-05 华为技术有限公司 A kind of communication means, relevant device and system
CN110034970A (en) * 2019-03-18 2019-07-19 清华大学 The network equipment distinguishes method of discrimination and device
CN111478802A (en) * 2020-03-30 2020-07-31 芯海科技(深圳)股份有限公司 Distribution network processing method and device, computer equipment and storage medium
CN111586691A (en) * 2020-05-20 2020-08-25 青岛海尔科技有限公司 Method and device for configuring wireless connection and wireless connectable equipment
WO2020220756A1 (en) * 2019-04-30 2020-11-05 创新先进技术有限公司 Network configuration method and apparatus
CN112019357A (en) * 2019-05-28 2020-12-01 阿里巴巴集团控股有限公司 Network configuration method, device, equipment and system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540732A (en) * 2009-05-06 2009-09-23 华为技术有限公司 Method and device for transmitting link data
CN104618988A (en) * 2015-01-21 2015-05-13 青岛海尔智能家电科技有限公司 Smart device network access method and device
CN104581647A (en) * 2015-01-30 2015-04-29 青岛海尔智能家电科技有限公司 Network access method and device of intelligent equipment
CN105050083A (en) * 2015-05-25 2015-11-11 深圳创维数字技术有限公司 Network configuration method and system for intelligent equipment
US20170094600A1 (en) * 2015-09-25 2017-03-30 Intel Corporation Apparatus, system and method of communicating a wakeup packet
CN105873052A (en) * 2016-03-29 2016-08-17 海尔优家智能科技(北京)有限公司 Network access method and device of wifi device
CN105898831A (en) * 2016-03-29 2016-08-24 海尔优家智能科技(北京)有限公司 Method and apparatus for smart device accessing wifi and smart device
CN106060809A (en) * 2016-05-30 2016-10-26 上海斐讯数据通信技术有限公司 Method for rapidly access wireless network, wireless route device and smart device
CN106130800A (en) * 2016-08-29 2016-11-16 杭州迪普科技有限公司 A kind of processing method and processing device of Frame
CN106973124A (en) * 2017-03-02 2017-07-21 深圳壹秘科技有限公司 Network connection collocation method and its electronic installation
CN109309964A (en) * 2017-07-28 2019-02-05 华为技术有限公司 A kind of communication means, relevant device and system
CN110034970A (en) * 2019-03-18 2019-07-19 清华大学 The network equipment distinguishes method of discrimination and device
WO2020220756A1 (en) * 2019-04-30 2020-11-05 创新先进技术有限公司 Network configuration method and apparatus
CN112019357A (en) * 2019-05-28 2020-12-01 阿里巴巴集团控股有限公司 Network configuration method, device, equipment and system
CN111478802A (en) * 2020-03-30 2020-07-31 芯海科技(深圳)股份有限公司 Distribution network processing method and device, computer equipment and storage medium
CN111586691A (en) * 2020-05-20 2020-08-25 青岛海尔科技有限公司 Method and device for configuring wireless connection and wireless connectable equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157650A (en) * 2021-12-16 2022-03-08 上海市共进通信技术有限公司 Equipment for network package configuration based on HTTP protocol and implementation method thereof
CN114157650B (en) * 2021-12-16 2023-09-01 上海市共进通信技术有限公司 System for configuring network suit based on HTTP protocol and implementing method thereof

Also Published As

Publication number Publication date
CN113132157B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN111885115B (en) Device binding changing method and device
CN111885594B (en) Equipment binding method and device
CN111865736B (en) Equipment control method and device
CN109219075B (en) Wireless channel scanning method, device, terminal and storage medium
CN113423105A (en) Network connection method and device
CN112737816B (en) Equipment binding method and device
CN113422814A (en) Method and system for sending device control command, storage medium and electronic device
CN112737847B (en) Node upgrading method and device, storage medium and electronic device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN113132157A (en) Equipment configuration method and device, storage medium and electronic device
CN113613251B (en) Information synchronization method and system, storage medium and electronic device
CN112737849B (en) Equipment information processing method and device
CN112738785B (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN112637221B (en) Equipment control method and device
CN110213021B (en) Serial communication data transmission method and device
CN114205378B (en) Network distribution method and device of Internet of things equipment, storage medium and electronic device
CN111757275B (en) Device connection method and device, storage medium and electronic device
CN110460464B (en) Control method and device for equipment communication and data converter
CN112925713A (en) Service testing method, device, system, storage medium and computer equipment
CN113132986B (en) Method and device for realizing mesh network of WiFi based on DPP protocol, and storage medium
CN107784006B (en) Data processing method and device
CN111294314A (en) Message processing method, device and system
CN111294414A (en) Message processing method, device and system
CN113395744B (en) Networking method and device of equipment, storage medium and electronic device
CN113453207B (en) Identity type determining method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant