Network configuration method, electronic device, and computer-readable storage medium
View Patent ↗The present disclosure provides a network configuration method, an electronic device and a computer-readable storage medium. The method includes broadcasting a network configuration data request; monitoring network configuration data broadcasted by a main control device in response to the network configuration data request; and performing network configuration according to the network configuration data and broadcasting first indication information, where the first indication information is configured to indicate the network configuration is completed.
1 . A network configuration method, applied to an image-forming device, comprising:
broadcasting a network configuration data request;
monitoring network configuration data broadcasted by a main control device in response to the network configuration data request, including:
monitoring a network configuration data packet broadcasted by the main control device, wherein the network configuration data packet includes the network configuration data; and
determining that complete network configuration data has been received in response to determining that a data volume of the network configuration data packet is less than a preset transmission threshold; and
performing network configuration according to the network configuration data and broadcasting first indication information, wherein the first indication information is configured to indicate the network configuration is completed.
2 . The method according to claim 1 , wherein broadcasting the network configuration data request includes:
associating a device name of the image-forming device with the network configuration data request.
3 . The method according to claim 2 , wherein monitoring the network configuration data broadcasted by the main control device in response to the network configuration data request includes:
monitoring the network configuration data packet broadcasted by the main control device in response to a search by the main control device according to the device name of the image-forming device.
4 . The method according to claim 1 , further including:
performing data check on the network configuration data included in the network configuration data packet to determine that the network configuration data is received correctly.
5 . The method according to claim 4 , wherein the network configuration data packet further includes check information; and performing the data check on the network configuration data included in the network configuration data packet to determine that the network configuration data is received correctly includes:
calculating a check value of the network configuration data using a cyclic redundancy check rule; and
if the check value is consistent with the check information included in the network configuration data packet, determining that the network configuration data is received correctly; or
if the check value is not consistent with the check information included in the network configuration data packet, determining that the network configuration data is received incorrectly.
6 . The method according to claim 1 , further including:
comparing the network configuration data included in network configuration data packets monitored by all broadcast channels; and
if the network configuration data monitored by all broadcast channels are consistent with each other, determining that the network configuration data is received correctly; or
if the network configuration data monitored by all broadcast channels are not consistent with each other, determining that the network configuration data is received incorrectly.
7 . The method according to claim 6 , after determining that the network configuration data is received incorrectly, further including:
keeping current device name; and
monitoring a network configuration data packet re-broadcasted by the main control device.
8 . The method according to claim 1 , further including:
if the data volume of the network configuration data packet is equal to the preset transmission threshold, determining that the complete network configuration data has not been received.
9 . The method according to claim 1 , wherein broadcasting the first indication information includes:
configuring a device name of the image-forming device according to the first indication information.
10 . The method according to claim 1 , further including:
determining whether the network configuration data packet includes a preset identification;
if the network configuration data packet includes the preset identification, determining that complete network configuration data has been received.
11 . A network configuration method, applied to a main control device, comprising:
in response to a network configuration data request received from an image-forming device, broadcasting network configuration data, including:
broadcasting a network configuration data packet to the image-forming device, wherein the network configuration data packet includes the network configuration data; and
determining that complete network configuration data has been transmitted to the image-forming device in response to determining that a data volume of the network configuration data packet is less than a preset transmission threshold; and
in response to first indication information received from the image-forming device, determining that network configuration of the image-forming device is completed.
12 . The method according to claim 11 , wherein broadcasting the network configuration data includes: determining serial number identification of the network configuration data; and
broadcasting the network configuration data packet according to the serial number identification of the network configuration data.
13 . The method according to claim 11 , further including:
prior to broadcasting the network configuration data, splitting the network configuration data according to a preset transmission threshold to obtain at least one piece of the network configuration data; and
according to a preset numbering rule, respectively assigning corresponding serial number identification to the at least one piece of the network configuration data.
14 . The method according to claim 11 , wherein:
the network configuration data packet further includes check information; and the check information is obtained by checking the network configuration data using a cyclic redundancy check rule.
15 . The method according to claim 13 , further including:
re-searching a device name of the image-forming device; and
if the device name discovered by re-search is still the serial number identification of the network configuration data, re-broadcasting the network configuration data packet; or if the device name discovered by re-search is serial number identification of next network configuration data, broadcasting a next network configuration data packet.
16 . The method according to claim 11 , wherein determining that the network configuration of the image-forming device is completed includes:
determining the first indication information corresponds to the image-forming device in response to a search by a device name of the image-forming device; and
determining that the network configuration of the image-forming device is completed according to the first indication information.
17 . The method according to claim 11 , further including:
adding a network configuration service identification to a packet header of the network configuration data packet.
18 . A non-transitory computer-readable storage medium including computer instructions which, when being executed, causes a image-forming device to execute a network configuration method, the method comprising:
broadcasting a network configuration data request;
monitoring network configuration data broadcasted by a main control device in response to the network configuration data request, including:
monitoring a network configuration data packet broadcasted by the main control device, wherein the network configuration data packet includes the network configuration data; and
determining that complete network configuration data has been received in response to determining that a data volume of the network configuration data packet is less than a preset transmission threshold; and
performing network configuration according to the network configuration data and broadcasting first indication information, wherein the first indication information is configured to indicate the network configuration is completed.
19 . The storage medium according to claim 18 , wherein broadcasting the network configuration data request includes:
associating a device name of the image-forming device with the network configuration data request.
20 . The storage medium according to claim 19 , wherein monitoring the network configuration data broadcasted by the main control device in response to the network configuration data request includes:
monitoring the network configuration data packet broadcasted by the main control device in response to a search by the main control device according to the device name of the image-forming device.