CN116390123A - Device control method, electronic device, and computer-readable storage medium - Google Patents

Device control method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN116390123A
CN116390123A CN202310306084.0A CN202310306084A CN116390123A CN 116390123 A CN116390123 A CN 116390123A CN 202310306084 A CN202310306084 A CN 202310306084A CN 116390123 A CN116390123 A CN 116390123A
Authority
CN
China
Prior art keywords
wireless network
upgrading
network
electronic device
upgraded
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.)
Pending
Application number
CN202310306084.0A
Other languages
Chinese (zh)
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.)
Ecoflow Technology Ltd
Original Assignee
Ecoflow Technology 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 Ecoflow Technology Ltd filed Critical Ecoflow Technology Ltd
Priority to CN202310306084.0A priority Critical patent/CN116390123A/en
Publication of CN116390123A publication Critical patent/CN116390123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a device control method, electronic equipment and a storage medium. The method comprises the following steps: after entering a test mode, performing wireless network searching; when a first upgrading wireless network is searched, accessing the first upgrading wireless network, and accessing a first preset address based on the first upgrading wireless network to acquire an equipment upgrading data packet; performing equipment upgrading on the electronic equipment according to the equipment upgrading data packet; storing the equipment upgrading data packet in a storage area corresponding to the first preset address; after the equipment is upgraded, controlling the electronic equipment to establish a second upgrading wireless network; the second upgrade wireless network is used for other electronic equipment to access and acquire the equipment upgrade data packet. Therefore, the manpower consumption can be greatly reduced, the electronic equipment which is successfully upgraded can create an upgrading wireless network, the number of the upgrading wireless networks is increased for the electronic equipment to be upgraded to upgrade the equipment, and the testing efficiency and the upgrading efficiency of the electronic equipment can be effectively improved.

Description

Device control method, electronic device, and computer-readable storage medium
Technical Field
The application relates to the technical field of internet of things, in particular to a device control method, electronic equipment and a computer readable storage medium.
Background
With the development of technology, more and more electronic devices have networking functions. In order to ensure the product quality of the electronic device and update and optimize the software of the device, it is generally required to test the networking function of the electronic device and upgrade the software of the electronic device before the device leaves the factory.
In a general equipment testing and upgrading process, operators are required to manually allocate networks to electronic equipment to be upgraded, and whether the electronic equipment can be accessed to a network is checked. Then, the operator operates the electronic equipment to be upgraded to access the server to upgrade the equipment. The mode is complex in operation and low in efficiency.
Disclosure of Invention
To solve the above technical problems, embodiments of the present application provide an apparatus control method and apparatus, an electronic device, a computer readable storage medium, and a computer program product.
According to an aspect of the embodiments of the present application, there is provided a device control method applied to an electronic device, where the electronic device includes a wireless module, the method including: after entering a test mode, performing wireless network searching; when a first upgrading wireless network is searched, accessing the first upgrading wireless network, and accessing a first preset address based on the first upgrading wireless network to acquire an equipment upgrading data packet; the name of the first upgrading wireless network carries a target identifier; performing equipment upgrading on the electronic equipment according to the equipment upgrading data packet; storing the equipment upgrading data packet in a storage area corresponding to the first preset address; after the equipment is upgraded, controlling the electronic equipment to establish a second upgrading wireless network; the name of the second upgrading wireless network carries the target identifier, and the second upgrading wireless network is used for other electronic equipment to access and acquire the equipment upgrading data packet.
In one embodiment of the present application, the destination identification includes a first version number; when the first upgrading wireless network is searched, accessing the first upgrading wireless network, which comprises the following steps: when a first upgrading wireless network is searched, acquiring the first version number from the name of the first upgrading wireless network; comparing the second version number stored in the electronic equipment with the first version number; and if the first version number is higher than the second version number, accessing the first upgrading wireless network.
According to an aspect of the embodiments of the present application, the method further comprises: the target identifier comprises a network number and a first version number; when the first upgrading wireless network is searched, accessing the first upgrading wireless network, which comprises the following steps: when a plurality of upgrading wireless networks are searched, network numbers corresponding to the upgrading wireless networks are obtained from names of the upgrading wireless networks; determining an upgrade wireless network corresponding to the largest network number as the first upgrade wireless network; acquiring the first version number from the name of the first upgrading wireless network; comparing the second version number stored in the electronic equipment with the first version number; and if the first version number is higher than the second version number, accessing the first upgrading wireless network.
According to one aspect of the embodiments of the present application, the controlling the electronic device to create a second upgraded wireless network includes: determining a target network number according to the network number corresponding to the first upgrading wireless network; the target network number is greater than the network number of the first upgraded wireless network; generating a name of the second upgrading wireless network according to the target network number and the first version number; and creating the second upgrading wireless network according to the name of the second upgrading wireless network.
According to an aspect of the embodiments of the present application, after the creating the second upgraded wireless network according to the name of the second upgraded wireless network, the method further includes: if the fact that other electronic equipment is connected to the second upgrading wireless network is not detected within a continuous preset time period, closing the second upgrading wireless network; searching wireless network, and determining the maximum network number from the scanned names of the upgraded wireless network; determining a new target network number according to the maximum network number; the new target network number is greater than the maximum network number; and generating a new name according to the new target network number and the first version number, and creating a new second upgrading wireless network according to the new name.
According to an aspect of the embodiments of the present application, when a first upgraded wireless network is searched, accessing the first upgraded wireless network includes: when a first upgrading wireless network is searched, searching a wireless password corresponding to the first upgrading wireless network from a memory; accessing the first upgraded wireless network based on the wireless password.
According to an aspect of the embodiments of the present application, the method further comprises: when a first upgrading wireless network is searched, accessing the first upgrading wireless network, accessing a first preset address based on the first upgrading wireless network, and acquiring an equipment upgrading data packet, wherein the method comprises the following steps: when the first upgrading wireless network is searched, searching a wireless password and a first preset address corresponding to the first upgrading wireless network from a memory; accessing the first upgraded wireless network based on the wireless password; and acquiring the equipment upgrading data packet based on the first preset address.
According to an aspect of the embodiments of the present application, the method further comprises: and after the equipment upgrading is finished, executing a first prompting operation, wherein the first prompting operation is used for prompting that the equipment upgrading is finished.
According to one aspect of an embodiment of the present application, there is provided an electronic device including a wireless module, a processor, and a storage device; the storage means is for storing one or more programs that, when executed by the processor, cause the electronic device to implement a device control method as in any of the preceding claims.
According to an aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon computer-readable instructions, which when executed by a processor of a computer, cause the computer to perform the apparatus control method as described above.
According to an aspect of the embodiments of the present application, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the device control method as described above.
In the technical scheme provided by the embodiment of the application, after the electronic equipment to be detected enters the test mode, the wireless network search of the equipment is started, when the first upgrading wireless network is searched, the first upgrading wireless network is accessed, the equipment upgrading data packet is obtained based on the first upgrading wireless network access first preset address, the electronic equipment is upgraded according to the equipment upgrading packet, and the equipment upgrading data packet is stored in the storage area corresponding to the first preset address. And after the upgrading is finished, controlling the electronic equipment to create a second upgrading wireless network so as to enable other electronic equipment to access and acquire the equipment upgrading data packet.
Therefore, the electronic equipment entering the test mode automatically searches the wireless network, and accesses the first upgrading wireless network after searching the first upgrading wireless network, so as to test the networking function of the electronic equipment. And then, the electronic equipment can automatically access a preset first preset address through the first upgrading wireless network, and acquire an equipment upgrading data packet from the first preset address to upgrade. And then, storing the equipment upgrading data packet in a storage area corresponding to the first preset address, and switching the electronic equipment which is successfully upgraded to a wireless network mode to become a second upgrading wireless network so as to enable other electronic equipment to be upgraded to access and acquire the equipment upgrading data packet. Therefore, in the technical scheme provided by the application, operators are not required to manually allocate the network to the electronic equipment and control the electronic equipment to access the preset address, so that the manpower consumption can be greatly reduced. And the electronic equipment which is successfully upgraded is switched to a wireless access point mode for other electronic equipment to be upgraded to upgrade the equipment, so that the test efficiency and the upgrade efficiency of the electronic equipment can be effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a schematic diagram of an implementation environment of a device control method according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a device control method shown in an exemplary embodiment of the present application;
FIG. 3 is a flow chart of step S220 in the embodiment of FIG. 2 in an exemplary embodiment;
FIG. 4 is a flow chart of the step S220 obtained in the embodiment shown in FIG. 2 in another exemplary embodiment;
FIG. 5 is a flow chart illustrating a device control method according to an exemplary embodiment of the present application;
FIG. 6 is a flow chart illustrating a device control method according to an exemplary embodiment of the present application;
FIG. 7 is a flow chart of the step S220 obtained in the embodiment shown in FIG. 2 in another exemplary embodiment;
FIG. 8 is a flowchart of the get step S220 in the embodiment shown in FIG. 2 in another exemplary embodiment;
FIG. 9 is a diagram illustrating an interface for obtaining a device upgrade data package according to an exemplary embodiment of the present application;
fig. 10 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
Reference to "a plurality" in this application means two or more than two. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
First, it should be noted that the electronic device according to the embodiments of the present application is an electronic device including a wireless module.
In the application, the wireless module belongs to an internet of things transmission layer, and is mainly used for converting a serial port or transistor-transistor logic (Transistor Transistor Logic, TTL) interface level into an embedded module of a signal conforming to a Wi-Fi wireless network communication standard, and a wireless network protocol IEEE802.11b.g.n protocol stack, a TCP/IP protocol stack and other types of protocol stacks are built in the embedded module. The conventional hardware device embedded Wi-Fi module can directly use Wi-Fi to connect to the Internet, is an important component for realizing wireless intelligent home, terminal-to-terminal (Machine to Machine, M2M) and other Internet of things applications, and belongs to an important intelligent hardware component.
The electronic device may include one or more of a mobile power supply, an air conditioner, a refrigerator, a mobile phone, a tablet computer, a notebook computer, an intelligent voice interaction device, an intelligent home device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), a home energy storage device, a mobile energy storage device, a self-mobile device, and the like.
In some possible approaches, an operator detects networking functionality of the electronic device and controls the electronic device upgrade through manual operation.
In an exemplary embodiment, before the electronic device leaves the factory, if the electronic device needs to be upgraded, an operator may perform network configuration on the electronic device that needs to be upgraded before leaving the factory through a mobile phone, so that after the electronic device is connected to a wireless network, the electronic device accesses a server through the wireless network to perform device upgrade.
Specifically, an operator can operate the electronic device to open a distribution network hotspot, and then operate the mobile phone to access the distribution network hotspot, so that the mobile phone and the electronic device are connected. And then, the operator sends the local area network name and the local area network password created by the in-factory router to the electronic equipment through the mobile phone. Subsequently, the electronic equipment is disconnected with the mobile phone, then the local area network name and the local area network password sent by the mobile phone are connected to the local area network created by the router, and equipment upgrading is performed based on the local area network access server.
In order to solve the above problems, embodiments of the present application propose a device control method, a system, an electronic device, a computer readable storage medium and a computer program product, and these embodiments will be described in detail below.
Referring to fig. 1, fig. 1 is a schematic diagram of an implementation environment according to an embodiment of the present application. The implementation environment includes an electronic device 110 and a terminal device 120. Wherein the electronic device 110 and the server 120 communicate wirelessly.
As described above, the electronic device 110 may be a mobile power supply, an air conditioner, a refrigerator, a self-mobile device, an intelligent home device, or the like, and the electronic device 110 includes a wireless module.
The terminal device 120 may be any device having a storage function, a wireless module, capable of wireless communication with the electronic device 110 through the wireless module, and a memory capable of storing an upgrade package for upgrading the electronic device 110. The terminal device 120 may be a computer, a tablet, or the like, or may be a device of the same type as the electronic device 110 to be accessed, which is only required to provide the basic functions described above.
In an embodiment, the terminal device 120 may also be a server. The server may be, for example, an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like, which is not limited herein.
In addition, the terminal device 120 may be other electronic devices (such as a desktop computer, a notebook computer, a tablet computer, etc. connected to a lan), and the electronic device 110 may directly access the terminal device 120 based on the lan. In one embodiment, the terminal device 120 may also be a server located in a wide area network (Internet ), and the electronic device 110 may access the wide area network based on a local area network, where the server is accessed.
Fig. 2 is a flow chart illustrating a device control method according to an exemplary embodiment of the present application. The method is applicable to the implementation environment shown in fig. 1 and is specifically performed by the electronic device 110 in the implementation environment shown in fig. 1. The method may also be applied to other implementation environments, and may be performed by devices in other implementation environments that may implement the solution in this embodiment, which is not limited by this embodiment.
Step S210, after entering the test mode, performing a wireless network search.
In the test mode, the electronic device can detect whether the wireless function is normal or not, and can also perform operations such as software upgrading. The electronic equipment can be Internet of things equipment with wireless functions, such as an air conditioner, an electric cooker, a sweeping robot and the like.
The mode of triggering the electronic device to enter the test mode can be set according to actual requirements. For example, the operator may control the other device to send a test instruction to the electronic device, and the electronic device may enter the test mode after receiving the test instruction sent by the other device. In one embodiment, the operator may also cause the electronic device to enter the test mode by triggering a touch button on the electronic device. In one embodiment, the operator may trigger the electronic device to enter the test mode in other ways as well.
After the electronic device enters the test mode, a wireless module of the electronic device can be started, and wireless network searching is performed. It will be appreciated that the wireless module may be turned on by default, and the wireless network search may be performed only after the test mode is entered.
Step S220, when a first upgrading wireless network is searched, accessing the first upgrading wireless network, accessing a first preset address based on the first upgrading wireless network, and acquiring an equipment upgrading data packet; the name of the first upgraded wireless network carries the target identifier.
Specifically, access information (such as a network name, a wireless password, etc.) corresponding to the first upgrade wireless network and a first preset address for acquiring the device upgrade data packet are predefined in the electronic device. After the electronic device starts the wireless network search, the electronic device may search for wireless networks existing around.
When the electronic equipment searches the network name of the first upgrading wireless network, the electronic equipment can access the first upgrading wireless network through the access information, so that the electronic equipment can access a first preset address based on the first upgrading wireless network, and acquire a corresponding equipment upgrading data packet according to the first preset address. That is, after the electronic device accesses the storage area corresponding to the first preset address based on the first upgrade wireless network, the electronic device may download the corresponding device upgrade data packet in the storage area.
Illustratively, assume that the network name of the predefined first upgraded wireless network includes a target identification "-ota". When the electronic device performs wireless network searching, the network name of the searched wireless network can be obtained, and whether the obtained network name contains a target identifier "-ota" is detected.
When the electronic device searches for a wireless network including a "-ota" target identifier in the network name, the electronic device may determine the wireless network as a first upgraded wireless network, and access the first upgraded wireless network according to a pre-configured wireless password. Subsequently, the electronic device may access a first preset address for obtaining the device upgrade data packet based on the first upgrade wireless network, so that the electronic device may download the corresponding device upgrade data packet from a location pointed to by the first preset address of the terminal device 120. It will be appreciated that the electronic device will access the first upgraded wireless network and download the corresponding upgrade data packet only if the first upgraded wireless network has the target identification therein.
Step S230, the electronic equipment is updated according to the equipment updating data packet.
After the electronic device acquires the device upgrading data packet, the electronic device can be upgraded according to the device upgrading data packet.
For example, the electronic device may receive OTA (Over the Air Technology, over-the-air technology) software upgrade information based on the first upgrade wireless network after accessing the first preset address. In some possible embodiments, the OTA software upgrade information may include a device upgrade data packet and OTA upgrade indication information, where the OTA upgrade indication information is used to instruct the electronic device to perform a device upgrade according to the device upgrade data packet. After the electronic device obtains the OTA software upgrading information, the electronic device can use the device upgrading data packet to upgrade the device according to the OTA upgrading indication information, and the electronic device with the upgraded device can be obtained.
Step S240, the device upgrade data packet is stored in a storage area corresponding to the first preset address.
Specifically, the upgrade data packet of the device is stored in a storage area corresponding to the first preset address. After the electronic device accesses the first preset address through the first upgrade wireless network to obtain the device upgrade data packet and upgrades the device, the device upgrade data packet is stored in a storage area corresponding to the first preset address inside the electronic device, so that other electronic devices can be conveniently obtained when needed.
Step S250, after the equipment upgrade is completed, controlling the electronic equipment to establish a second upgrade wireless network; the name of the second upgrading wireless network carries a target identifier, and the second upgrading wireless network is used for other electronic equipment to access and acquire the equipment upgrading data packet.
Specifically, as described above, when the electronic device obtains the device upgrade data packet at the first preset address, the electronic device performs device upgrade according to the indication of the upgrade data packet, so as to obtain the electronic device that has been successfully upgraded. And controlling the electronic device to switch to the wireless network mode so that the upgraded electronic device becomes a wireless device providing a second upgraded wireless network. And the generated hotspot name corresponding to the second upgrading wireless network carries a target identifier, and the target identifier can be used for distinguishing the upgrading wireless network from other types of wireless networks and is used as an identity identifier corresponding to the upgrading wireless network. Therefore, when other electronic equipment to be upgraded, which needs to be upgraded or needs to be tested, performs wireless network searching, the second upgrading wireless network provided by the electronic equipment which is successfully upgraded can be searched. And accessing the first preset address by other electronic equipment to be upgraded through the second upgrading wireless network or directly acquiring an equipment upgrading data packet from the first preset address, thereby finishing equipment upgrading.
In this embodiment, after the electronic device enters the test mode, the wireless network search may be automatically performed. Subsequently, after the electronic equipment detects the first upgrading wireless network, the electronic equipment can automatically access the first upgrading wireless network to complete the test of wireless functions, and the equipment upgrading data packet of the electronic equipment is acquired based on the first upgrading wireless network accessing the first preset address, so that the upgrading of the electronic equipment is completed, operators are not required to manually allocate the electronic equipment one by one and control the electronic equipment to access a server, the manpower consumption is greatly reduced, the batch detection and upgrading of the electronic equipment can be realized, and the testing efficiency and upgrading efficiency of the electronic equipment are greatly improved. And the electronic equipment which is successfully upgraded stores the upgrade data packet in the corresponding storage area, a second upgrade wireless network is created, after the second upgrade wireless network is created, more upgrade wireless networks are provided for batch detection and upgrade of the electronic equipment to be upgraded, the load pressure of other upgrade wireless networks is shared, and the upgrade efficiency is improved.
Further, based on the above embodiment, referring to fig. 3, in one exemplary embodiment provided in the present application, the target identifier includes a first version number; the specific implementation process of accessing the first upgraded wireless network when the first upgraded wireless network is searched may further specifically include steps S310 to S330, which are described in detail below:
Step S310, when the first upgraded wireless network is searched, a first version number is obtained from the name of the first upgraded wireless network.
Specifically, when the electronic device enters a test mode and starts a wireless function, a wireless module of the electronic device searches surrounding wireless networks, and when a first upgrading wireless network is searched, a first version number is obtained from a network name corresponding to the first upgrading wireless network, wherein the first version number is used for indicating a version corresponding to the first upgrading network.
In this embodiment, after the electronic device that opens the wireless function searches for the wireless network, it may be determined whether the network name corresponding to the searched wireless network is the same as the network name of the first wireless network stored in advance by the electronic device. The network names may be partially identical, or may be completely identical. For example, assume that the network name of the first wireless network stored in advance in the electronic device is "1.0-ota". In an example, if there is one wireless network with a network name of "1.0-ota" in the wireless networks searched by the electronic device, this indicates that the wireless network is the first upgraded wireless network; in another example, if there is one wireless network named "2.1.0-ota" among the wireless networks searched by the electronic device, the wireless network may also be the first upgraded wireless network. That is, the network name corresponding to the first upgraded wireless network determined by the electronic device may be partially or completely the same as the network name of the first upgraded wireless network stored in advance by the electronic device. The method comprises the steps that a target identifier carried by an upgrade wireless network comprises a version number corresponding to a corresponding equipment upgrade data packet; for example, "2.1.0-ota" corresponds to the version number of the device upgrade data packet of "2.1.0".
When the electronic device searches for the wireless network, the electronic device can acquire the corresponding version number through the network name when the wireless network searched for by the electronic device comprises the first upgrading wireless network. For example, when the network name of the first upgrade wireless network predefined by the electronic device is "xx1-ota", and when a wireless network with the network name of "xx1-ota.xxz" appears in the wireless networks searched by the electronic device, because the hotspot name of the wireless network is partially the same as the hotspot name of the first upgrade wireless network, the electronic device may determine that the wireless network of "xx1-ota.xxz" is the first upgrade wireless network, and further, the electronic device extracts a corresponding first version number "xxz" from the "xxn-ota.xxz". In other scenarios, the electronic device may also obtain the version number from other components of the network name, which is not limited in this embodiment.
In addition, in order to ensure that the electronic devices on the production line or in the warehouse can search for the first upgrade wireless network, a plurality of devices which are arranged at different positions and provide the first upgrade wireless network can be arranged according to actual needs. The wireless network may also be provided by a pre-configured routing device or may be provided directly by the terminal device, such as by the terminal device providing a hotspot.
In addition, it should be noted that the scheme of the electronic device to be upgraded accessing the second upgrade wireless network is consistent with the scheme of the electronic device accessing the first upgrade wireless network, and will not be described herein.
Step S320, comparing the second version number stored in the electronic device with the first version number.
As described above, by turning on the wireless function module of the electronic device entering the test mode, the electronic device may extract a corresponding first version number from the network name of the first upgrade wireless network after searching and determining the predefined first upgrade wireless network, and compare the first version number with the second version number stored in the electronic device.
For example, after the electronic device performs a wireless network search and determines a predefined first upgraded wireless network, the electronic device may obtain a first version number included in the network name of the first upgraded wireless network. For example, after the electronic device searches for the predefined first upgrade wireless network, the electronic device may obtain a corresponding first version number "xxz" from the determined network name "xxn-ota.xxz" of the first upgrade wireless network, and then the electronic device compares the first version number "xxz" with a second version number currently corresponding to the electronic device.
Step S330, if the first version number is higher than the second version number, the first upgrade wireless network is accessed.
As described above, the electronic device may obtain the first version number included in the network name of the first upgraded wireless network, and compare the first version number with the second version number currently corresponding to the electronic device. If the first version number is higher than the second version number, the electronic device may send a network connection request to the first upgraded wireless network to access the first upgraded wireless network.
It should be noted that, the network name corresponding to the first upgraded wireless network may be set by an operator according to an actual detection requirement, and a corresponding first version number is set in the network name.
Specifically, a bit-by-bit comparison method may be used when comparing the first version number with the second version number. For example, if the first version number and the second version number include multiple bits, the highest of the first version number and the second version number may be compared first, if the highest of the first version number is found to be higher than the highest of the second version number, the first version number is determined to be higher than the second version number, if the highest of the first version number and the second version number is the same, the next highest comparison is performed, and so on.
For example, if the electronic device determines that the network name of the first upgraded wireless network is "xxn-ota.xx3", the electronic device may obtain a corresponding first version number "xx3" from the extraction of the network name, and obtain a current version number of the electronic device as "xx2". Thus, comparing the first version number with the second version number indicates that the electronic device needs to be upgraded. Thus, the electronic device may access the first upgraded wireless network.
Correspondingly, if the electronic device determines that the first version number is lower than or equal to the second version number by comparing the first version number with the second version number, the electronic device is indicated to be successfully upgraded or does not need to be upgraded. At this time, the electronic device may not access the first upgrade wireless network to obtain the device upgrade data packet. Therefore, by the scheme of the embodiment, the electronic equipment can be prevented from being repeatedly upgraded, the resource waste caused by repeated upgrading is reduced, the upgrading efficiency of the electronic equipment is improved, and after the version numbers are judged to be the same, the operation of not accessing the first upgrading wireless network is executed, so that the occupation of wireless network resources is avoided, and the effective utilization rate of the wireless network resources is improved.
For example, if the first version number is determined to be greater than or equal to the second version number by comparing the first version number with the second version number, the electronic device is indicated to need to be upgraded, and thus the electronic device can access the first upgraded wireless network. For example, each electronic device on the production line or in the warehouse may find out the wireless password corresponding to the first upgrade wireless network according to the network name of the first upgrade wireless network, and access the first upgrade wireless network according to the wireless password. Specifically, each electronic device on the production line or in the warehouse may send a management frame (Probe request frame) on each channel, requesting an Access Point (AP) response corresponding to the first advanced wireless network. When the AP corresponding to the first upgrading wireless network receives the Probe request, the AP responds to the Probe response and sends the Probe response to the electronic equipment, and the electronic equipment sends a network connection request message carrying the wireless password to the AP corresponding to the first wireless network so as to realize the access of the electronic equipment to the first upgrading wireless network.
In this embodiment, when the electronic device searches for a preset first upgrade wireless network, the electronic device obtains a first version number included in the first upgrade wireless network name, and compares the first version number with a second version number currently recorded by the electronic device, and then decides whether to access the first upgrade wireless network. And when the first version number is higher than the second version number, the electronic equipment accesses the first upgrading wireless network. When the first version number is lower than or equal to the second version number, the electronic equipment is not connected to the first upgrading wireless network, so that the problem that the electronic equipment which is successfully upgraded or is not required to be upgraded is connected to the first upgrading wireless network again, and resources of the first upgrading wireless network are occupied is avoided, and further the upgrading efficiency of the electronic equipment and the utilization rate of wireless network resources are improved.
Further, based on the above embodiment, referring to fig. 4, in one exemplary embodiment provided in the present application, the destination identifier includes a network number and a first version number; when the first upgrade wireless network is searched, the specific implementation process of accessing the first upgrade wireless network may further include steps S410 to S450, which are described in detail as follows:
step S410, when searching a plurality of upgrading wireless networks, obtaining the network numbers corresponding to the upgrading wireless networks from the names of the upgrading wireless networks.
Specifically, as the upgraded electronic devices create the second upgraded wireless network, the number of second upgraded wireless networks in the current scenario increases with the increase in the number of upgraded electronic devices. It can be understood that when the electronic device to be upgraded enters the test mode, the wireless module is started to perform wireless network search, a plurality of upgrading wireless networks are searched, wherein the plurality of upgrading wireless networks comprise a first upgrading wireless network and a second upgrading wireless network. And then, the electronic equipment to be upgraded can acquire the network numbers corresponding to the upgrading wireless networks from the hot spot names corresponding to the upgrading wireless networks.
Step S420, the upgrade wireless network corresponding to the largest network number is determined as the first upgrade wireless network.
Specifically, the electronic device selects the network number with the largest network number among a plurality of upgrading wireless networks in the surrounding environment as the first upgrading wireless network. After the electronic device to be upgraded enters the test mode, the wireless function is started to search the wireless network in the current scene. If the searched wireless networks are "xxx-ota-02, xxx-ota-03 and xxx-ota-05 … xxx-ota-06", respectively, the electronic device to be upgraded directly selects the wireless network "xxx-ota-06" with the largest network number as the first upgrading wireless network access.
Step S430, obtaining the first version number from the name of the first upgraded wireless network.
Specifically, when the electronic device enters a test mode and starts a wireless function, a wireless module of the electronic device searches surrounding wireless networks, and when a first upgrading wireless network is searched, a first version number is obtained from a network name corresponding to the first upgrading wireless network.
It should be noted that, in this embodiment, after the electronic device that opens the wireless function searches for the wireless network, it may be determined whether the network name corresponding to the searched wireless network is the same as the network name of the first upgraded wireless network stored in advance by the electronic device. The network names may be partially the same, or may be completely the same. For example, assume that the network name of the first upgraded wireless network stored in advance in the electronic device is "1.0-ota". In one example, if there is one of the wireless networks searched by the electronic device with a network name of "1.0-ota", this indicates that the wireless network is the first upgraded wireless network.
In another example, if there is one wireless network named "2.1.0-ota" among the wireless networks searched by the electronic device, the wireless network may also be the first upgraded wireless network. That is, the network name corresponding to the first upgraded wireless network determined by the electronic device may be partially or completely the same as the network name of the first upgraded wireless network stored in advance by the electronic device.
When the electronic device searches for the wireless network, the electronic device can acquire the corresponding version number through the network name when the wireless network searched for by the electronic device comprises the first upgrading wireless network. For example, when the network name of the first upgrade wireless network predefined by the electronic device is "xx1-ota", and when a wireless network with the network name of "xx1-ota.xxz" appears in the wireless networks searched by the electronic device, because the hotspot name of the wireless network is partially the same as the hotspot name of the first upgrade wireless network, the electronic device may determine that the wireless network of "xx1-ota.xxz" is the first upgrade wireless network, and further, the electronic device extracts a corresponding first version number "xxz" from the "xxn-ota.xxz". In other scenarios, the electronic device may also obtain the version number from other components of the network name, which is not limited in this embodiment.
In addition, in order to ensure that the electronic devices on the production line or in the warehouse can search for the first upgrade wireless network, a plurality of devices which are arranged at different positions and provide the first upgrade wireless network can be arranged according to actual needs. The upgraded wireless network may also be provided by a pre-configured routing device or may be provided directly by an electronic device.
Step S440, comparing the second version number stored in the electronic device with the first version number.
As described above, by turning on the wireless function module of the electronic device entering the test mode, the electronic device may extract a corresponding first version number from the network name of the first upgrade wireless network after searching and determining the predefined first upgrade wireless network, and compare the first version number with the current second version number of the electronic device.
For example, after the electronic device performs a wireless network search and determines a predefined first upgraded wireless network, the electronic device may obtain a first version number included in the network name of the first upgraded wireless network. For example, after the electronic device searches for the predefined first upgrade wireless network, the electronic device may obtain a corresponding first version number "xxn" from the determined network name "xxn-ota.xxz" of the first upgrade wireless network, and then the electronic device compares the first version number "xxn" with a second version number currently corresponding to the electronic device.
Step S450, if the first version number is higher than the second version number, the first upgrade wireless network is accessed.
As described above, the electronic device may obtain the first version number included in the network name of the first upgraded wireless network, and compare the first version number with the second version number currently corresponding to the electronic device. If the first version number is higher than the second version number, the electronic device may send a network connection request to the first upgraded wireless network to access the first upgraded wireless network.
It should be noted that, the network name corresponding to the first upgraded wireless network may be set by an operator according to an actual detection requirement, and a corresponding first version number is set in the network name.
For example, if the electronic device determines that the network name of the first upgraded wireless network is "xxn-ota.xx3", the electronic device may extract the corresponding first version number "xxn" from the network name, specifically "xx9", and obtain the current version number of the electronic device as "xx8". Thus, comparing the first version number with the second version number indicates that the electronic device needs to be upgraded. Thus, the electronic device may access the first upgraded wireless network.
Correspondingly, if the electronic device determines that the first version number is lower than or equal to the second version number by comparing the first version number with the second version number, the electronic device is indicated to be successfully upgraded or does not need to be upgraded. At this time, the electronic device may not access the first upgrade wireless network to obtain the device upgrade data packet. Therefore, by the scheme of the embodiment, the electronic equipment can be prevented from being repeatedly upgraded, the resource waste caused by repeated upgrading is reduced, the upgrading efficiency of the electronic equipment is improved, and after the version numbers are judged to be the same, the operation of not accessing the first upgrading wireless network is executed, so that the occupation of wireless network resources is avoided, and the effective utilization rate of the wireless network resources is improved.
For example, if the first version number is determined to be greater than or equal to the second version number by comparing the first version number with the second version number, the electronic device is indicated to need to be upgraded, and thus the electronic device can access the first upgraded wireless network. For example, each electronic device on the production line or in the warehouse may find out the wireless password corresponding to the first upgrade wireless network according to the network name of the first upgrade wireless network, and access the first upgrade wireless network according to the wireless password. Specifically, each electronic device on the production line or in the warehouse may send a management frame (Probe request frame) on each channel, requesting an Access Point (AP) response corresponding to the first advanced wireless network. When the AP corresponding to the first upgrading wireless network receives the Probe request, the AP responds to the Probe response and sends the Probe response to the electronic equipment, and the electronic equipment sends a network connection request message carrying the wireless password to the AP corresponding to the first wireless network so as to realize the access of the electronic equipment to the first upgrading wireless network.
In this embodiment, when the electronic device searches for a preset first upgrade wireless network, the electronic device obtains a first version number included in the first upgrade wireless network name, and compares the first version number with a second version number currently recorded by the electronic device, and then decides whether to access the first upgrade wireless network. And when the first version number is higher than the second version number, the electronic equipment accesses the first upgrading wireless network. When the first version number is lower than or equal to the second version number, the electronic equipment is not connected to the first upgrading wireless network, so that the electronic equipment which is successfully upgraded or is not required to be connected to the first upgrading wireless network again is avoided, and the upgrading efficiency of the electronic equipment and the utilization rate of wireless network resources are improved.
Further, based on the foregoing embodiment, referring to fig. 5, in one exemplary embodiment provided in the present application, a specific implementation process of creating the second upgraded wireless network by the control electronic device may further include step S510 and step S530, which are described in detail below:
step S510, determining a target network number according to the network number corresponding to the first upgrading wireless network; the target network number is greater than the network number of the first upgraded wireless network.
Step S520, generating a name of the second upgraded wireless network according to the target network number and the first version number.
Step S530, creating the second upgraded wireless network according to the name of the second upgraded wireless network.
First, it should be noted that, in some possible embodiments, if the hot spot name corresponding to the first upgraded wireless network in the current environment is "xxx-ota-001", the second hot spot name obtained according to the naming rule of the first hot spot name should be "xxx-ota-002". That is, when the electronic device entering the test mode accesses the first preset address through the first upgrade wireless network to obtain the device upgrade data packet, after the device upgrade is completed, the electronic device is switched to the wireless hotspot mode, so as to create a second upgrade network of the electronic device upgrade test to be upgraded, and the naming rule of the newly created second upgrade wireless network may be one added on the basis of the maximum network number in the names of the surrounding upgrade wireless networks. Thus, it can be understood that the network number corresponding to the second upgrade network created later is larger than the network number corresponding to the first upgrade network. Thus, network numbers of a plurality of upgrading wireless networks around the electronic equipment to be upgraded are different.
In addition, in some implementations, after the electronic device to be upgraded is successfully upgraded, the electronic device becomes an electronic device with complete upgrade, and before switching to the wireless network mode, the search for the wireless network in the current scenario is continued. And when the electronic equipment after the upgrading is switched to the wireless network mode, adding one to the hot spot name corresponding to the generated wireless network on the basis of the number of the hot spot name with the largest number in the surrounding wireless network. In this way, device hotspots with serial numbers of-0, -1, -2, -3 … -n are sequentially generated, so that the wireless network can be quickly searched when the electronic device needs to be tested. Moreover, as can be seen from the above method, the creation time of the upgraded wireless network with a larger network number is shorter, and the load of the access of the upgraded wireless network is possibly smaller than that of other upgraded wireless networks. Therefore, the electronic equipment to be upgraded can be accessed to the upgrading wireless network with the largest network number for upgrading after searching the network number of each upgrading wireless network, so that the load pressure of each upgrading wireless network is effectively shared, network blocking caused by that a large number of electronic equipment is accessed to the same upgrading wireless network is avoided, and the efficiency of upgrading test is improved.
In this embodiment, the wireless network provided by the electronic device is named by switching the electronic device that is successfully upgraded to the wireless network mode and according to the naming rule of the first hotspot name corresponding to the first upgraded wireless network. The method not only provides more wireless network numbers for the equipment to be upgraded, but also enables the equipment to be upgraded to easily distinguish wireless networks with less access equipment numbers, and improves the efficiency of equipment upgrade test.
Further, based on the above embodiment, referring to fig. 6, in one exemplary embodiment provided in the present application, after the second upgraded wireless network is created according to the name of the second upgraded wireless network, the specific implementation process of the device control method may further include steps S610 to S640, which are described in detail below:
step S610, if the other electronic devices are not detected to be connected to the second upgrade wireless network within the continuous preset time period, the second upgrade wireless network is closed.
Specifically, if the device providing the second upgraded wireless network does not detect that other electronic devices are connected to the upgraded wireless network provided by the device within a continuous preset time period, the network number of the second upgraded wireless network may lag behind the network numbers of other upgraded wireless networks, so that the second upgraded wireless network has no other electronic devices connected to the network, and the wireless network mode may be directly turned off. For example, if the second upgraded wireless network created by the upgraded electronic device is "xxx-ota-02", and no electronic device to be upgraded accesses the upgraded wireless network "xxx-ota-02" for a continuous preset period of time, for example, for continuous 1 minute, the upgraded electronic device is controlled to turn off the wireless network mode.
Step S620, performing wireless network searching, and determining the maximum network number from the scanned names of the upgraded wireless networks.
Specifically, when the electronic equipment is successfully upgraded and no other electronic equipment to be upgraded is accessed to the upgrading wireless network provided by the electronic equipment within a continuous preset time, the electronic equipment is controlled to close the wireless network function. And then, the electronic equipment starts a wireless module to search wireless networks, and determines the network number with the largest number in the plurality of upgrading wireless networks from the searched plurality of upgrading wireless networks.
For example, after the wireless module is turned on, the electronic device with the wireless network function turned off performs wireless network searching in the current scenario. If the plurality of updated wireless networks it searches for are "xxx-ota-02, xxx-ota-03, xxx-ota-04 … xxx-ota-07", then the largest network number in the current scenario may be determined to be "xxx-ota-07".
Step S630, determining a new target network number according to the maximum network number; the new target network number is greater than the largest network number.
Based on the above, a new target network number is determined according to the largest network number among the network numbers corresponding to the plurality of upgraded wireless networks in the current scenario, and the newly determined target network number is larger than the largest obtained network number. For example, if the largest network number corresponding to the plurality of upgraded wireless networks in the current scenario is "xxx-ota-07", a new target network number is determined based on "xxx-ota-07", where the target network number is greater than "xxx-ota-n", where "n" is greater than "7", for example, the new target network number is determined to be "xxx-ota-08", so that the network numbers may be updated in real time, so that each network number is different.
Step S640, generating a new name according to the new target network number and the first version number, and creating a new second upgraded wireless network according to the new name.
Specifically, a new name is generated according to the newly determined target network number and the first version number, and the electronic equipment which is successfully upgraded is controlled to switch to a wireless network mode, so that a second upgraded wireless network which is newly named by the newly determined hot spot name is created. Illustratively, along with the above embodiment, if the first version number corresponding to the first upgraded wireless network in the current environment is "xxx", and the determined target number is "-n", then it may be determined that the network name of the second upgraded wireless network that is recreated according to the new name is "xxx-ota-n".
In some implementations, when the electronic device that is successfully upgraded switches to the wireless network mode, the number of the hotspot name corresponding to the wireless network provided by the electronic device is incremented. When the electronic device is in the wireless network mode, the electronic device is not connected by the electronic device to be upgraded, or the electronic device to be upgraded is connected with the electronic device to be upgraded, after the electronic device to be upgraded is disconnected, the wireless network around the scanning is started, if the number of the hot spot name corresponding to the hot spot provided by the electronic device is found to be behind the highest number of the hot spot name around the hot spot name which is greater than a preset value, for example, greater than 5, the electronic device is controlled to restart the wireless network function, and the number of the hot spot name is updated. For example, the largest network number is "xxx-ota-09", the two own network numbers are "xxx-ota-02", and if the surrounding hot spot names are more than 5 numbers above the highest number, a new target network number is determined to be "xxx-ota-10", so that the network numbers can be updated in real time, and each network number is different. This in turn allows a new electronic device to be upgraded to connect to a second upgraded wireless network provided by the electronic device.
In this embodiment, by closing the upgrade wireless network that is not connected to the device for a long time, and after determining a new network name, re-creating a new second upgrade wireless network, not only can the upgrade wireless network in the current scene be normalized and managed, but also the load capacity of each upgrade wireless network in the current scene can be balanced, and the upgrade wireless network that is not connected to the device for a long time is changed to the first upgrade wireless network with the largest network number, so that the test efficiency and upgrade efficiency of the electronic device can be effectively improved.
Further, based on the above embodiment, referring to fig. 7, in one exemplary embodiment provided in the present application, when the first upgraded wireless network is searched, the specific implementation process of accessing the first upgraded wireless network may further include step S710 and step S720, which are described in detail below:
step S710, when the first upgrade wireless network is searched, the wireless password corresponding to the first upgrade wireless network is searched from the memory.
Step S720, accessing the first advanced wireless network based on the wireless password.
Specifically, after the electronic device entering the test mode starts the wireless function, the surrounding wireless network can be searched. When the electronic equipment searches the first upgrading wireless network, the electronic equipment can search a wireless password corresponding to the first upgrading wireless network in the memory and access the first upgrading wireless network based on the wireless password.
The network name of the first upgrade wireless network and the wireless password corresponding to the first upgrade wireless network are stored in the electronic device in advance. When the electronic equipment searches the first upgrading wireless network, the electronic equipment can search a wireless password corresponding to the first upgrading wireless network according to the network name of the first upgrading wireless network, and send a network connection request carrying the wireless password to the first upgrading wireless network, so that the electronic equipment can access the first upgrading wireless network through the wireless password.
In this embodiment, the wireless password corresponding to the first upgrade wireless network is obtained from the memory by the electronic device, and the wireless password is accessed to the first upgrade wireless network, so that the network distribution of the electronic device is realized, and the manual one-to-one network distribution is avoided.
In addition, in some possible embodiments, the first upgrade wireless network may not be set with a wireless password, and the electronic device may directly access the first upgrade wireless network after searching for the first upgrade wireless network, without searching for a wireless password corresponding to the first upgrade wireless network in the memory.
Further, based on the above embodiments, referring to fig. 8, in one of the exemplary embodiments provided in the present application,
When the first upgrade wireless network is searched, the specific implementation process of accessing the first upgrade wireless network and accessing the first preset address based on the first upgrade wireless network to obtain the device upgrade data packet may further include steps S810 to S830, which are described in detail below:
step S810, when the first upgrading wireless network is searched, a wireless password and a first preset address corresponding to the first upgrading wireless network are searched from a memory.
Step S820, accessing the first advanced wireless network based on the wireless password.
In step S830, a device upgrade data packet is acquired based on the first upgrade address.
As described above, the electronic device may have a network name of the first upgrade wireless network, a wireless password corresponding to the first upgrade wireless network, and a first preset address for acquiring the device upgrade data packet stored in advance. After the electronic equipment entering the test mode starts the wireless module, the electronic equipment can scan surrounding wireless networks, searches a wireless password corresponding to a first upgrading wireless network from a memory after searching a first predefined upgrading wireless network, and sends a network connection request carrying the wireless password to the first upgrading wireless network so as to access the first upgrading wireless network. Then, the electronic device accesses the first preset address based on the first upgrading wireless network to acquire a device upgrading data packet.
In some possible embodiments, as shown in fig. 9, the first preset address for acquiring the device upgrade data packet may be a local area network IP address pointing to a storage area of a device in a local area network, or may be a wide area network IP address pointing to a server in a wide area network (internet), or may be a storage area pointing to a wireless access point creating an upgrade wireless network. Illustratively, the first preset address is a local area network IP address, for example, 192.168.1.1. After the electronic device successfully accesses the first upgrade wireless network, the electronic device accesses a first preset address "192.168.1.1" based on the first upgrade wireless network, where the first preset address points to a fixed storage area in the local area network, and a device upgrade data packet, for example, "esp8266-ota-bin" in fig. 9, is stored in the fixed storage area. Then, the electronic device may select a corresponding device upgrade data packet in the fixed storage area for downloading.
In this embodiment, the first preset address for acquiring the device upgrade data packet may be a local area network IP address, where the local area network IP address points to a fixed storage area in the local area network. After the electronic equipment is accessed to the first upgrading wireless network, accessing the local area network IP address based on the first upgrading wireless network, jumping to a fixed storage area corresponding to the local area network IP address, downloading a corresponding equipment upgrading data packet from the fixed storage area by the electronic equipment, and upgrading the equipment based on the equipment upgrading data packet. Therefore, the first preset address for acquiring the equipment upgrading data packet is set as the local area network IP address, so that the equipment upgrading data packet is stored in a fixed storage area in the local area network, and compared with the downloading of the equipment upgrading data packet from the wide area network by the electronic equipment, the downloading speed of the equipment upgrading data packet from the fixed storage area of the local area network IP address is faster, the equipment upgrading efficiency of the electronic equipment is not influenced by the uplink and downlink network speeds of the wide area network.
Further, based on the foregoing embodiment, in one exemplary embodiment provided in the present application, a specific implementation process of the apparatus control method may further include the following steps, which are described in detail below:
after the equipment upgrade is completed, a first prompting operation is executed, wherein the first prompting operation is used for prompting that the equipment upgrade is completed.
That is, after the wireless function of the electronic device is turned on, the electronic device may output some indication information for reflecting whether the wireless module is detected or whether the device upgrade is successful, where the indication information may be displayed by means of an LED indicator, a buzzer, or an LED display screen. When the electronic device searches the first upgrading wireless network, if the wireless module of the electronic device is determined to be normal in function, the wireless module of the electronic device can reflect that the wireless module of the electronic device searches the upgrading wireless network through the LED indicator lamp. Of course, the wireless module of the electronic device may also be reflected by the LED indicator light as functional failure, or the wireless module may not search for a predefined upgraded wireless network. Similarly, whether the electronic device is successfully upgraded can be reflected based on the same prompt principle. When the prompting device is a buzzer, when the wireless module of the electronic equipment fails to detect or the electronic equipment fails to upgrade, the buzzer sounds to prompt the detection personnel that the wireless module of the electronic equipment fails to detect, so that the detection personnel can conveniently and rapidly find out the electronic equipment which fails to detect from a large number of electronic equipment. When the indicating device is an LED display screen, whether the electronic equipment passes detection or not can be displayed through the LED display screen carried by the electronic equipment, or the electronic equipment which is not searched for upgrading the wireless network can be displayed through the LED screen in a warehouse or a production workshop.
In addition, the prompting operation can be performed by sending prompting information to the detection personnel. For example, after the electronic device is successfully upgraded, the electronic device may send a corresponding prompt message to the terminal device of the inspector, and carry the identity of the electronic device after the upgrade is completed in the prompt message, so as to prompt the inspector that the electronic device has been successfully upgraded.
In addition, in some embodiments of the present application, the electronic device may define the upgrade wireless network and the corresponding access information in advance. After the wireless function of the electronic device is turned on, the electronic device may perform a wireless network search. Specifically, the electronic device may send a management frame (Probe request frame) on each channel (channel), request a corresponding AP response, and send a response frame (Probe response) to the electronic device as a response when the AP receives the Probe request. In addition, in the Probe request frame, a broadcast service set identifier (Service Set Identifier, SSID) may be used. Each wireless AP should have an SSID for identification. That is, the network name corresponding to the wireless network can be determined through the SSID, so that all APs receiving the Probe request frame sent by the electronic device can reply to the Probe request frame and return to the electronic device. Subsequently, the SSID of the AP to which the electronic device can respond is determined as the network name corresponding to each AP, so that the electronic device can determine whether to search for the upgraded wireless network according to the network name corresponding to each AP.
Specifically, if the SSID contained in all Probe request frames received by the electronic device does not contain the SSID of the upgrade wireless network within the preset duration, it may be determined that the electronic device does not search for the upgrade wireless network within the preset duration, and the electronic device fails to detect.
After the electronic equipment determines that the detection fails, the detection personnel can be prompted to detect the failure by outputting corresponding second prompt operation. For example, the detection failure can be indicated through an LED lamp on the electronic equipment, and the information of 'detection failure' can be displayed through an LED screen carried by the electronic equipment, or a buzzer sounds to prompt a detection person that the wireless module of the electronic equipment fails to upgrade/the wireless module fails, so that the detection person can conveniently and rapidly find the electronic equipment which fails to be detected or fails to upgrade from a large number of electronic equipment. Of course, the second prompting operation for prompting the failure of detection of the electronic device may adopt one or more prompting methods of the above-mentioned LED lamp prompting, buzzer prompting, LED screen prompting or sending information prompting to the detection personnel.
In addition, in some implementation manners of the application, the electronic device performs wireless network searching, and when the searched wireless network includes a predefined preset test wireless network, corresponding prompt information is output to inform a inspector that the wireless module of the electronic device functions normally, and equipment upgrading is not needed. The electronic device can identify the preset test wireless network through network name matching and other modes. Illustratively, it is assumed that the network name of the preset test wireless network includes an identifier "-test". When the electronic device searches for a wireless network with a "-test" identifier in the network name, the electronic device may determine the wireless network as a preset test wireless network.
In addition, it should be noted that, in this embodiment, when the electronic device searches for the preset test wireless network, the third prompting operation may be directly executed without establishing a connection with the preset test wireless network, and the inspector may be notified that the device is not required to be upgraded through the third prompting operation. The second prompting operation for prompting the electronic device without upgrading can adopt one or more prompting methods of the LED lamp prompting, the buzzer prompting, the LED screen prompting or the information prompting sent to the detection personnel.
The embodiment of the application also provides electronic equipment, which comprises: the wireless module, the processor, and the storage device, the storage device is configured to store one or more programs, which when executed by the one or more processors, cause the electronic device to implement the device control method provided in the foregoing embodiments.
Fig. 10 shows a schematic diagram of a computer system suitable for use in implementing the electronic device of the embodiments of the present application. It should be noted that, the computer system 1000 of the electronic device shown in fig. 10 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a central processing unit (Central Processing Unit, CPU) 1001 which can perform various appropriate actions and processes, such as performing the method in the above-described embodiment, according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a random access Memory (Random Access Memory, RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other by a bus 1004. An Input/Output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 1010 as needed, so that a computer program read out therefrom is installed into the storage section 1008 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. When executed by a Central Processing Unit (CPU) 1001, the computer program performs various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by means of software, or may be implemented by means of hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a device control method as before. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the device control methods provided in the respective embodiments described above.
The foregoing is merely a preferred exemplary embodiment of the present application and is not intended to limit the embodiments of the present application, and those skilled in the art may make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A device control method, applied to an electronic device, the electronic device including a wireless module, the method comprising:
after entering a test mode, performing wireless network searching;
when a first upgrading wireless network is searched, accessing the first upgrading wireless network, and accessing a first preset address based on the first upgrading wireless network to acquire an equipment upgrading data packet; the name of the first upgrading wireless network carries a target identifier;
performing equipment upgrading on the electronic equipment according to the equipment upgrading data packet;
storing the equipment upgrading data packet in a storage area corresponding to the first preset address;
after the equipment is upgraded, controlling the electronic equipment to establish a second upgrading wireless network; the name of the second upgrading wireless network carries the target identifier, and the second upgrading wireless network is used for other electronic equipment to access and acquire the equipment upgrading data packet.
2. The method of claim 1, wherein the destination identification comprises a first version number; when the first upgrading wireless network is searched, accessing the first upgrading wireless network, which comprises the following steps:
When a first upgrading wireless network is searched, acquiring the first version number from the name of the first upgrading wireless network;
comparing the second version number stored in the electronic equipment with the first version number;
and if the first version number is higher than the second version number, accessing the first upgrading wireless network.
3. The method of claim 1, wherein the destination identification comprises a network number and a first version number; when the first upgrading wireless network is searched, accessing the first upgrading wireless network, which comprises the following steps:
when a plurality of upgrading wireless networks are searched, network numbers corresponding to the upgrading wireless networks are obtained from names of the upgrading wireless networks;
determining an upgrade wireless network corresponding to the largest network number as the first upgrade wireless network;
acquiring the first version number from the name of the first upgrading wireless network;
comparing the second version number stored in the electronic equipment with the first version number;
and if the first version number is higher than the second version number, accessing the first upgrading wireless network.
4. The method of claim 3, wherein the controlling the electronic device to create the second upgraded wireless network comprises:
Determining a target network number according to the network number corresponding to the first upgrading wireless network; the target network number is greater than the network number of the first upgraded wireless network;
generating a name of the second upgrading wireless network according to the target network number and the first version number;
and creating the second upgrading wireless network according to the name of the second upgrading wireless network.
5. The method of claim 4, wherein after the creating the second upgraded wireless network from the name of the second upgraded wireless network, the method further comprises:
if the fact that other electronic equipment is connected to the second upgrading wireless network is not detected within a continuous preset time period, closing the second upgrading wireless network;
searching wireless network, and determining the maximum network number from the scanned names of the upgraded wireless network;
determining a new target network number according to the maximum network number; the new target network number is greater than the maximum network number;
and generating a new name according to the new target network number and the first version number, and creating a new second upgrading wireless network according to the new name.
6. The method of claim 1, wherein accessing the first upgraded wireless network when the first upgraded wireless network is searched comprises:
when a first upgrading wireless network is searched, searching a wireless password corresponding to the first upgrading wireless network from a memory;
accessing the first upgraded wireless network based on the wireless password.
7. The method of claim 1, wherein accessing the first upgraded wireless network when the first upgraded wireless network is searched, and accessing a first preset address based on the first upgraded wireless network, obtaining the device upgrade data packet, comprises:
when the first upgrading wireless network is searched, searching a wireless password and a first preset address corresponding to the first upgrading wireless network from a memory;
accessing the first upgraded wireless network based on the wireless password;
and acquiring the equipment upgrading data packet based on the first preset address.
8. The method of claim 1, wherein the method further comprises:
and after the equipment upgrading is finished, executing a first prompting operation, wherein the first prompting operation is used for prompting that the equipment upgrading is finished.
9. An electronic device comprising a wireless module, a processor, and a memory device;
the storage means is for storing one or more programs, which when executed by the processor, cause the electronic device to implement the device control method of any of claims 1-8.
10. A computer-readable storage medium, having stored thereon computer-readable instructions which, when executed by a processor, implement the device control method of any one of claims 1 to 8.
CN202310306084.0A 2023-03-17 2023-03-17 Device control method, electronic device, and computer-readable storage medium Pending CN116390123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310306084.0A CN116390123A (en) 2023-03-17 2023-03-17 Device control method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310306084.0A CN116390123A (en) 2023-03-17 2023-03-17 Device control method, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN116390123A true CN116390123A (en) 2023-07-04

Family

ID=86976223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310306084.0A Pending CN116390123A (en) 2023-03-17 2023-03-17 Device control method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN116390123A (en)

Similar Documents

Publication Publication Date Title
EP3684010B1 (en) Network slice management method, and device for same
US11019512B2 (en) Providing easy access to radio networks
CN107241679B (en) Connection establishing method, information sending method, message sending method and device
EP3151628A1 (en) Method, device and system for accessing a wireless network
US12004264B2 (en) Session management method, device, and system
US20230040580A1 (en) Binding method and system for device network configuration, and mobile terminal and storage medium
US10630551B2 (en) Method and apparatus for automatic networking of gateway device
US10887745B2 (en) Method and device for sharing file between different terminals
US11233817B2 (en) Methods and apparatus for end device discovering another end device
US10681596B2 (en) Neighbor list management and connection control in a network environment
CN106686752B (en) It is a kind of that the method and apparatus being wirelessly connected is established by the first application on user equipment
CN112152853A (en) Equipment network distribution method and device, computer-readable storage medium and electronic device
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
JP2023500329A (en) Communication method and system, base station and terminal
CN106453370B (en) Method and device for registering IPC (inter-programmable logic controller) to NVR (network video recorder)
CN112346751B (en) Application program installation method and device, electronic equipment and storage medium
CN113727325B (en) Session processing method and related equipment
CN113596792A (en) Binding method and device of electronic equipment, storage medium and electronic device
AU2020470364A1 (en) Method and apparatus for establishing secure communication
CN109548411B (en) Method and device for controlling controllable equipment to access network
CN116390123A (en) Device control method, electronic device, and computer-readable storage medium
CN114007276A (en) Network access processing method, device, equipment and system of ZigBee network
CN111385371B (en) MAC address acquisition method, device and equipment
KR101127764B1 (en) Portable terminal and method for access controlling
CN106034344B (en) Data transmission method and 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