CN112988198A - mesh equipment multi-machine upgrading method and device and mesh equipment - Google Patents

mesh equipment multi-machine upgrading method and device and mesh equipment Download PDF

Info

Publication number
CN112988198A
CN112988198A CN202110406067.5A CN202110406067A CN112988198A CN 112988198 A CN112988198 A CN 112988198A CN 202110406067 A CN202110406067 A CN 202110406067A CN 112988198 A CN112988198 A CN 112988198A
Authority
CN
China
Prior art keywords
equipment
slave
request message
progress
downloading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110406067.5A
Other languages
Chinese (zh)
Other versions
CN112988198B (en
Inventor
徐金源
吴明星
曾庆晃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN202110406067.5A priority Critical patent/CN112988198B/en
Publication of CN112988198A publication Critical patent/CN112988198A/en
Application granted granted Critical
Publication of CN112988198B publication Critical patent/CN112988198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a mesh equipment multi-machine upgrading method, a mesh equipment multi-machine upgrading device and mesh equipment, wherein the mesh equipment multi-machine upgrading method comprises the following steps: receiving a query instruction, querying version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to obtain corresponding version information of the slave device; providing a download option when determining that at least one device needs software update; receiving a downloading instruction, executing downloading operation, generating a downloading request message and sending the downloading request message to the slave equipment; inquiring a first progress of the current downloading operation and inquiring a second progress of the downloading operation of the slave equipment; and after the first progress and the second progress are determined to be completed, executing verification updating operation, generating a verification request message and sending the verification request message to the slave equipment. The multi-machine upgrading method of the mesh equipment can realize the online updating of multiple machines in the mesh network, improve the updating efficiency of the mesh network equipment and further improve the experience degree of users.

Description

mesh equipment multi-machine upgrading method and device and mesh equipment
Technical Field
The invention relates to the technical field of networks, in particular to a mesh device multi-machine upgrading method and device, a mesh device and a readable storage medium.
Background
In the current mesh network, only a single mesh network device can be upgraded when upgrading is performed, so that the efficiency of updating the mesh network device is low, the maintenance workload of the mesh network device of a user is high, and the experience of the user is seriously influenced.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for upgrading multiple machines of a mesh device, and a readable storage medium, so as to implement online update of multiple machines in a mesh network, improve the update efficiency of the mesh network device, and thereby improve the experience of a user.
In order to achieve the purpose, the invention adopts the following technical scheme:
a mesh equipment multi-machine upgrading method is applied to a mesh network composed of a main device and a plurality of slave devices, and comprises the following steps:
receiving a query instruction, querying version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to obtain corresponding version information of the slave device;
when determining that at least one device in the mesh network needs software updating according to the device version information, providing a downloading option;
receiving a downloading instruction, controlling to execute downloading operation of corresponding software, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software;
inquiring a first progress of a current downloading operation, and inquiring a second progress of the downloading operation of the slave equipment through the preset monitoring process;
and after the first progress and the second progress are determined to be completed, controlling to execute the verification updating operation of the corresponding software, generating a verification request message through the preset monitoring process and sending the verification request message to the slave equipment so as to enable the slave equipment to execute the verification updating operation of the corresponding software.
Preferably, in the multi-machine upgrading method for the mesh device, the preset monitoring process is operated on the master device and the slave device, the preset monitoring process is communicated with each other through a private protocol, and the preset monitoring process is an inotify file monitoring process of Linux.
Preferably, in the multi-machine upgrading method for the mesh device, the receiving a query instruction, querying version information of the master device, generating a query request message through a preset monitoring process, and sending the query request message to the slave device to obtain corresponding version information of the slave device includes:
judging whether the slave equipment is connected or not after receiving the query instruction, and creating a master equipment query file after determining that the slave equipment is connected;
inquiring the version information of the main equipment, and writing the version information of the main equipment into an inquiry file of the main equipment;
when the state change of the main equipment query file is monitored, the preset monitoring process generates a query request message and sends the query request message to the slave equipment;
and after receiving the slave equipment version information sent by the slave equipment, the preset monitoring process generates a slave equipment query result file according to the slave equipment version information and the mac address of the slave equipment.
Preferably, in the multi-machine upgrading method for the mesh device, the receiving a download instruction, controlling to execute a download operation of corresponding software, and generating a download request packet through the preset monitoring process and sending the download request packet to the slave device, so that the slave device executes the download operation of corresponding software includes:
judging whether the slave equipment is connected or not after receiving a downloading instruction, and creating a master equipment downloading folder after determining that the slave equipment is connected;
executing corresponding software downloading operation, and downloading corresponding software to the main equipment downloading folder;
and when the state change of the main equipment download folder is monitored, the preset monitoring process generates a download request message and sends the download request message to the slave equipment.
Preferably, in the multi-machine upgrading method for the mesh device, the querying a first progress of a current downloading operation and the querying a second progress of a downloading operation of the slave device through the preset monitoring process include:
judging whether the slave equipment is connected or not, and creating a master equipment progress file after the slave equipment is determined to be connected;
inquiring the first progress, and writing the first progress into the main equipment progress file;
when the state change of the progress file of the master equipment is monitored, the preset monitoring process generates a progress request message and sends the progress request message to the slave equipment;
and after receiving the second progress sent by the slave equipment, the preset monitoring process generates a slave equipment progress file according to the second progress and the mac address of the slave equipment.
Preferably, in the multi-machine upgrading method for the mesh device, the controlling to execute the verification updating operation of the corresponding software, and generating a verification request message through the preset monitoring process and sending the verification request message to the slave device, so that the slave device executes the verification updating operation of the corresponding software includes:
judging whether the slave equipment is connected or not, and creating a master equipment verification file after the slave equipment is determined to be connected;
executing updating verification operation of corresponding software, and writing corresponding software verification information into the main equipment verification file;
when the state change of the master equipment verification file is monitored, the preset monitoring process generates a verification request message and sends the verification request message to the slave equipment;
and after receiving the software verification information sent by the slave equipment, the preset monitoring process generates a slave equipment verification result file according to the software verification information and the mac address of the slave equipment.
Preferably, the mesh device multi-machine upgrading method further includes:
and generating the query instruction according to a preset time interval to query the version information of the equipment, and generating the download instruction after determining that at least one piece of equipment in the mesh network needs software updating.
The invention also provides a multi-machine upgrading device of the mesh equipment, which is applied to a mesh network consisting of the main equipment and a plurality of slave equipments and comprises the following components:
the version information query module is used for receiving a query instruction, querying the version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to acquire the corresponding version information of the slave device;
the download option providing module is used for providing download options when determining that at least one device in the mesh network needs software update according to the device version information;
the downloading operation execution module is used for receiving a downloading instruction, controlling the downloading operation of corresponding software to be executed, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software;
the downloading progress query module is used for querying a first progress of the current downloading operation and querying a second progress of the downloading operation of the slave equipment through the preset monitoring process;
and the software checking and updating module is used for controlling to execute the checking and updating operation of the corresponding software after the first progress and the second progress are determined to be completed, and generating a checking request message through the preset monitoring process and sending the checking request message to the slave equipment so that the slave equipment executes the checking and updating operation of the corresponding software.
The invention also provides a mesh device, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program executes the multi-machine upgrading method of the mesh device when running on the processor.
The invention also provides a readable storage medium which stores a computer program, and the computer program executes the multi-machine upgrading method of the mesh equipment when running on the processor.
The invention provides a multi-machine upgrading method for mesh equipment, which comprises the following steps: receiving a query instruction, querying version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to obtain corresponding version information of the slave device; when determining that at least one device in the mesh network needs software updating according to the device version information, providing a downloading option; receiving a downloading instruction, controlling to execute downloading operation of corresponding software, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software; inquiring a first progress of a current downloading operation, and inquiring a second progress of the downloading operation of the slave equipment through the preset monitoring process; and after the first progress and the second progress are determined to be completed, controlling to execute the verification updating operation of the corresponding software, generating a verification request message through the preset monitoring process and sending the verification request message to the slave equipment so as to enable the slave equipment to execute the verification updating operation of the corresponding software. According to the multi-machine upgrading method of the mesh equipment, a user can inquire, download and update the software version by operating the main equipment in the mesh network, and meanwhile can inquire, download and update the corresponding software for the main equipment in the mesh network, so that the online updating of the plurality of machines in the mesh network is realized, the updating efficiency of the mesh network equipment is improved, and the experience degree of the user is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 is a flowchart of a multi-machine upgrade method for a mesh device according to embodiment 1 of the present invention;
fig. 2 is a flowchart of querying version information of a device according to embodiment 2 of the present invention;
fig. 3 is a flowchart of a device software downloading operation provided in embodiment 3 of the present invention;
fig. 4 is a flowchart of querying software download progress according to embodiment 4 of the present invention;
fig. 5 is a flowchart of a device software verification update according to embodiment 5 of the present invention;
fig. 6 is a flowchart of a method for automatically upgrading multiple machines of a mesh device according to embodiment 6 of the present invention;
fig. 7 is a schematic structural diagram of a multi-machine upgrading apparatus for mesh devices, provided in embodiment 7 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
Example 1
Fig. 1 is a flowchart of a mesh device multi-machine upgrading method provided in embodiment 1 of the present invention, which is applied to a mesh network composed of a master device and a plurality of slave devices, and the method includes the following steps:
step S11: and receiving a query instruction, querying the version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to acquire the corresponding version information of the slave device.
In the embodiment of the invention, the mesh network (wireless mesh network) has the advantages of simple deployment, strong stability, flexible structure and the like, so more and more users select mesh routing equipment to obtain better internet experience, and various mesh equipment is more and more popular, such as mesh routing, mesh gateways and the like.
In the embodiment of the invention, the master device and the slave device can be defined in a plurality of devices forming the mesh network, so that the master device is convenient to control the software update of the whole mesh network device. The main device can provide a web operation interface, and a user can access the web operation interface through a terminal connected with the main device and perform updating operation on the web operation interface, such as device software version query, software downloading, downloading progress query, verification updating and other operations. And an independent software server can be arranged in the main equipment and is used for processing instructions input by a user on the web operation interface and communicating through a private protocol, so that the influence on mesh network communication in the updating process is reduced.
In the embodiment of the invention, the master device and the slave device comprise a mesh router, a mesh gateway and the like, after receiving a query instruction sent by a user, the master device queries the version information of the master device according to the query instruction, generates a query request message through a preset monitoring process and sends the query request message to the slave device connected with the query request message so as to acquire the version information of the slave device. The preset monitoring processes are operated on the master device and the slave device, communication is carried out between the preset monitoring processes through a private protocol, and the preset monitoring processes are inotify file monitoring processes of Linux. That is, the multi-machine software upgrade Control between the master device and the slave device is performed through the preset monitoring process, and in the communication process, the master device may further create a TCP server (TCP), and the slave device correspondingly creates a TCP client, and performs the multi-machine software upgrade Control through the two ends, including the above query operation.
In the embodiment of the invention, after receiving a query request message, the slave device analyzes the query message to extract a corresponding query instruction, executes the query operation of the current software version, after obtaining the version information of the current slave device through query, generates the version information message of the slave device through the preset monitoring process, returns the version information message of the slave device to the master device, and finally analyzes the version information message of the slave device by the preset monitoring process of the master device to obtain the version information of the corresponding slave device.
Step S12: and providing a downloading option when at least one device in the mesh network needs software updating according to the device version information.
In the embodiment of the invention, after the master device sends the query request message, a time limit for receiving the version information of the slave device can be set, and if the version information of the slave device is not received after the time limit, the corresponding slave device software does not need to be updated. And after receiving the version information of the slave equipment, the master equipment judges whether at least one piece of equipment in the mesh network needs to be updated according to the version information of the master equipment and the version information of the slave equipment. If at least one set of equipment needs to be updated, a downloading option can be provided in the web operation interface, so that a user can select corresponding software to download and perform updating operation. The downloading options include a master device software downloading option and a slave device software downloading option, which is not limited herein.
Step S13: receiving a downloading instruction, controlling to execute the downloading operation of the corresponding software, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software.
In the embodiment of the invention, after receiving a downloading command input by a user through a downloading option from a web operation interface, the master device executes downloading of corresponding software, generates a downloading request message of the slave device through a preset monitoring program and sends the downloading request message to the slave device.
In the embodiment of the invention, after receiving the download request message, the slave device analyzes the download request message through the preset monitoring process to obtain the corresponding software download instruction and the link, thereby executing the corresponding software download operation.
Step S14: and inquiring the first progress of the current downloading operation, and inquiring the second progress of the downloading operation of the slave equipment through the preset monitoring process.
In the embodiment of the invention, the main device and the slave device can query the current progress through the preset monitoring process in the downloading process. The main device directly utilizes the preset monitoring to inquire the first progress of the current downloading operation, and the main device can directly display the first progress in the web operation interface after obtaining the first progress. Meanwhile, the master device generates a slave device progress query message and sends the slave device progress query message to the slave device.
In the embodiment of the invention, after receiving the progress query message, the slave device analyzes the progress query message through the preset monitoring process, executes the query operation of the second progress, and reports the second progress to the preset monitoring process of the master device through the preset monitoring process, so that the master device can display the second progress through the web operation interface. When the master device is connected with a plurality of slave devices at the same time, the second schedules of the plurality of slave devices can be obtained through the steps and displayed in the web operation interface, which is not limited herein.
Step S15: and after the first progress and the second progress are determined to be completed, controlling to execute the verification updating operation of the corresponding software, generating a verification request message through the preset monitoring process and sending the verification request message to the slave equipment so as to enable the slave equipment to execute the verification updating operation of the corresponding software.
In the embodiment of the invention, a web operation interface of the main device or a software server of the main device can be provided with a monitoring program of the downloading progress to monitor the first progress and the second progress, and after the first progress and the second progress are determined to be completed, the main device can be informed to verify and update the downloaded software. And the master device generates a verification request message through a preset monitoring process and sends the verification request message to the slave device while verifying and updating the downloaded software, so that the slave device executes the verification and updating operation of the downloaded software.
In the embodiment of the invention, after receiving the verification request message, the slave device analyzes the verification request message through a preset monitoring program to obtain the verification instruction therein, and verifies and updates the currently downloaded software according to the verification instruction. And after the updating is finished, the slave equipment can also generate corresponding updating information through a preset monitoring process and return the corresponding updating information to the master equipment so as to prompt the master equipment that the updating is finished and display the updating information on the web operation interface.
In the embodiment of the invention, the user can inquire, download and update the software version by operating the main equipment in the mesh network, and simultaneously can inquire, download and update the corresponding software for the main equipment in the mesh network, thereby realizing the online update of multiple machines in the mesh network, improving the update efficiency of the equipment in the mesh network and improving the experience degree of the user.
Example 2
Fig. 2 is a flowchart of querying device version information according to embodiment 2 of the present invention, which includes the following steps:
step S21: and judging whether the slave equipment is connected or not after receiving the query instruction, and creating a master equipment query file after determining that the slave equipment is connected.
In the embodiment of the present invention, before querying version information, the master device may perform a slave device querying operation to query whether a slave device is currently connected to the master device, and query information of the slave device. When the slave device is not inquired to be connected with the slave device, the operation of inquiring the version information of the master device can be immediately entered.
Step S22: and inquiring the version information of the main equipment, and writing the version information of the main equipment into the inquiry file of the main equipment.
In the embodiment of the present invention, before the version information is queried, the master device may create a corresponding master device query file for recording the corresponding master device version information, for example, a/tmp/query file may be created first as the master device query file, and after the current master device version information is queried, the master device query file may be written into for storage, so as to facilitate subsequent user query of the version.
Step S23: and when the state change of the main equipment query file is monitored, the preset monitoring process generates a query request message and sends the query request message to the slave equipment.
In the embodiment of the invention, the preset monitoring process monitors the change of the query file of the master device, namely the query file of the master device is changed due to the writing of the version information of the master device, and then the query file is assembled to generate the query request message which is sent to the slave device through the TCP connection by utilizing the private protocol. After receiving the query request message, the preset monitoring process of the slave device analyzes the query request message to obtain a query instruction which can be executed by the slave device, so that the corresponding version information query operation is executed, and a query result is returned to the preset monitoring process of the master device in a message mode.
Step S24: and after receiving the slave equipment version information sent by the slave equipment, the preset monitoring process generates a slave equipment query result file according to the slave equipment version information and the mac address of the slave equipment.
In the embodiment of the invention, after receiving the message returned by the slave device, the preset monitoring process of the master device analyzes the message to obtain the corresponding slave device version information and the mac address, and can generate the corresponding slave device query result file according to the slave device version information and the mac address so as to store and record. For example, a file name/tmp/query _ rsp _ xx: xx: xx: xx: xx, wherein "xx: xx: xx: xx: xx" is a corresponding mac address of the slave device can be created. The master device can query the stored slave device query result file to obtain the state of the whole mesh network, and the state is displayed in a web operation interface of the master device, so that the experience degree of a user is improved.
Example 3
Fig. 3 is a flowchart of a device software downloading operation provided in embodiment 3 of the present invention, including the following steps:
step S31: and judging whether the slave equipment is connected or not after receiving the downloading instruction, and creating a master equipment downloading folder after determining that the slave equipment is connected.
In the embodiment of the invention, before the downloading operation is carried out by the master device, the slave device inquiring operation can be executed to inquire whether the slave device is connected with the master device or not at present and inquire the information of the slave device. When the slave device is not inquired to be connected with the slave device, the corresponding downloading operation can be immediately entered.
Step S32: and executing corresponding software downloading operation, and downloading corresponding software to the main equipment downloading folder.
In the embodiment of the invention, the main device can create a corresponding main device download folder before downloading corresponding software, and the main device download folder is used for storing downloaded software, for example, a/tmp/downlaod file can be created first as the main device download folder, and the main device download folder can be stored after downloading corresponding software, so that a subsequent user can conveniently inquire the software.
Step S33: and when the state change of the main equipment download folder is monitored, the preset monitoring process generates a download request message and sends the download request message to the slave equipment.
In the embodiment of the invention, the preset monitoring process monitors the change of the downloading folder of the master device, namely the change of the downloading folder of the master device when the master device inquires the software which is stored and downloaded by the file and starts to assemble to generate the downloading request message, and the downloading request message is sent to the slave device by utilizing the private protocol through the TCP connection. And after the preset monitoring process of the slave equipment receives the downloading request message, the downloading request message is analyzed to obtain a downloading instruction which can be executed by the slave equipment, so that the corresponding software downloading operation is executed.
Example 4
Fig. 4 is a flowchart of querying software download progress provided in embodiment 4 of the present invention, including the following steps:
step S41: and judging whether the slave equipment is connected or not, and creating a master equipment progress file after the slave equipment is determined to be connected.
In the embodiment of the invention, the master device can execute the inquiry operation of the slave device before inquiring the software downloading progress so as to inquire whether the slave device is connected with the master device or not at present and inquire the information of the slave device. When the slave device is not inquired to be connected with the slave device, the operation of inquiring the downloading progress of the software can be immediately carried out.
Step S42: and inquiring the first progress, and writing the first progress into the main equipment progress file.
In the embodiment of the invention, before the main device inquires the software downloading progress, a corresponding main device progress file can be created for recording corresponding first downloading progress information, for example, a/tmp/process file can be created first as the main device progress file, after the first progress of the current software downloading is inquired, the main device progress file can be written in for storage, and the web operation interface strip displays the first progress by using the main device progress file.
Step S43: and when the state change of the progress file of the master equipment is monitored, the preset monitoring process generates a progress request message and sends the progress request message to the slave equipment.
In the embodiment of the invention, the preset monitoring process monitors the change of the progress file of the master equipment, namely the change of the progress file of the master equipment due to the writing of the first downloading progress information, then the progress file of the master equipment is assembled to generate the progress request message, and the progress request message is sent to the slave equipment through TCP connection by utilizing a private protocol. And after the preset monitoring process of the slave equipment receives the progress request message, analyzing the progress request message to obtain a progress query instruction which can be executed by the slave equipment, so as to execute corresponding second progress query operation, and returning the second progress to the preset monitoring process of the master equipment in a message mode.
Step S44: and after receiving the second progress sent by the slave equipment, the preset monitoring process generates a slave equipment progress file according to the second progress and the mac address of the slave equipment.
In the embodiment of the invention, after receiving the second progress message returned by the slave device, the preset monitoring process of the master device analyzes the second progress message to obtain corresponding second progress information and a mac address, and a corresponding slave device progress file can be generated according to the second progress and the mac address to perform storage recording. For example, a file name/tmp/process _ rsp _ xx: xx: xx: xx: xx: xx can be created, wherein "xx: xx: xx: xx: xx" is a corresponding mac address of the slave device. And the web operation interface of the main equipment can display the second progress of the software downloaded from the equipment by using the progress file of the slave equipment, so that the experience degree of a user is improved.
Example 5
Fig. 5 is a flowchart of device software verification update provided in embodiment 5 of the present invention, including the following steps:
step S51: and judging whether the slave equipment is connected or not, and creating a master equipment verification file after the slave equipment is determined to be connected.
In the embodiment of the invention, the master device can execute the inquiry operation of the slave device before checking and updating by using the downloaded software so as to inquire whether the slave device is connected with the master device or not at present and inquire the information of the slave device. When the slave device is not inquired to be connected with the slave device, the operation of checking the update by the master device can be immediately entered.
Step S52: and executing the updating verification operation of the corresponding software, and writing the corresponding software verification information into the main equipment verification file.
In the embodiment of the present invention, before the master device queries the version information, a corresponding master device verification file may be created for recording verification information of currently downloaded software of the corresponding master device, for example, a/tmp/upgrade file may be created first as the master device verification file, and corresponding software verification information is written into the master device query file for storage, so as to facilitate subsequent user query of software information.
Step S53: and when the state change of the master equipment verification file is monitored, the preset monitoring process generates a verification request message and sends the verification request message to the slave equipment.
In the embodiment of the invention, the preset monitoring process monitors the change of the master equipment verification file, namely the master equipment verification file is changed due to the fact that the master equipment verification file is written into the master equipment software verification information, then the master equipment verification file is assembled to generate the verification request message, and the verification request message is sent to the slave equipment through TCP connection by utilizing a private protocol. And after the preset monitoring process of the slave equipment receives the verification request message, the verification request message is analyzed to obtain a verification instruction which can be executed by the slave equipment, so that corresponding software verification updating operation is executed, and a verification result is returned to the preset monitoring process of the master equipment in a message mode.
Step S54: and after receiving the software verification information sent by the slave equipment, the preset monitoring process generates a slave equipment verification result file according to the software verification information and the mac address of the slave equipment.
In the embodiment of the invention, after receiving the message returned by the slave device, the preset monitoring process of the master device analyzes the message to obtain the corresponding slave device software verification information and the mac address, and can generate the corresponding slave device verification result file according to the slave device software verification information and the mac address so as to perform storage and recording. For example, a file name/tmp/upprode _ rsp _ xx: xx: xx: xx: xx: xx "may be created, wherein" xx: xx: xx: xx: xx "is a corresponding mac address of the slave device. The master device can query the stored slave device verification result file to acquire the software updating information of each slave device, and can display the software updating information on a web operation interface, so that the user experience is improved.
Example 6
Fig. 6 is a flowchart of a method for automatically upgrading multiple machines of a mesh device according to embodiment 6 of the present invention, where the method includes the following steps:
step S61: and generating the query instruction according to a preset time interval to query the version information of the equipment, and generating the download instruction after determining that at least one piece of equipment in the mesh network needs software updating.
In the embodiment of the invention, a process for automatically updating the mesh network can be further arranged in the main equipment, the process generates a query instruction at a preset time interval to query the equipment version information of the main equipment and the slave equipment, and generates a download instruction after knowing that at least one piece of equipment in the mesh network needs software updating according to the equipment version information so as to control the main equipment to download the software.
Step S62: receiving a downloading instruction, controlling to execute the downloading operation of the corresponding software, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software.
This step is identical to step S13 described above, and will not be described herein again.
Step S63: and inquiring the first progress of the current downloading operation, and inquiring the second progress of the downloading operation of the slave equipment through the preset monitoring process.
This step is identical to step S14 described above, and will not be described herein again.
Step S64: and after the first progress and the second progress are determined to be completed, controlling to execute the verification updating operation of the corresponding software, generating a verification request message through the preset monitoring process and sending the verification request message to the slave equipment so as to enable the slave equipment to execute the verification updating operation of the corresponding software.
This step is identical to step S15 described above, and will not be described herein again.
Example 7
Fig. 7 is a schematic structural diagram of a multi-machine upgrading apparatus for mesh devices, provided in embodiment 7 of the present invention.
The mesh device multi-machine upgrading apparatus 700 includes:
the version information query module 710 is configured to receive a query instruction, query version information of the master device, generate a query request message through a preset monitoring process, and send the query request message to the slave device to obtain version information of the corresponding slave device;
a download option providing module 720, configured to provide a download option when it is determined that at least one device in the mesh network needs software update according to the device version information;
the downloading operation executing module 730 is configured to receive a downloading instruction, control to execute a downloading operation of corresponding software, generate a downloading request message through the preset monitoring process, and send the downloading request message to the slave device, so that the slave device executes the downloading operation of the corresponding software;
the download progress query module 740 is configured to query a first progress of a current download operation, and query a second progress of the download operation of the slave device through the preset monitoring process;
and a software checking and updating module 750, configured to control to execute a checking and updating operation of the corresponding software after the first schedule and the second schedule are determined to be completed, and generate a checking request message through the preset monitoring process and send the checking request message to the slave device, so that the slave device executes the checking and updating operation of the corresponding software.
In the embodiment of the present invention, for more detailed description of functions of the modules, reference may be made to the contents in the foregoing embodiment, which is not described herein again.
In addition, the invention also provides a mesh device, which comprises a memory and a processor, wherein the memory can be used for storing a computer program, and the processor enables the mesh device to execute the method or the functions of each module in the multi-machine upgrading device of the mesh device by operating the computer program.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the stored data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mesh device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The embodiment also provides a computer storage medium for storing a computer program used in the mesh device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, 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 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A mesh equipment multi-machine upgrading method is characterized in that the method is applied to a mesh network composed of a main device and a plurality of slave devices, and comprises the following steps:
receiving a query instruction, querying version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to obtain corresponding version information of the slave device;
when determining that at least one device in the mesh network needs software updating according to the device version information, providing a downloading option;
receiving a downloading instruction, controlling to execute downloading operation of corresponding software, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software;
inquiring a first progress of a current downloading operation, and inquiring a second progress of the downloading operation of the slave equipment through the preset monitoring process;
and after the first progress and the second progress are determined to be completed, controlling to execute the verification updating operation of the corresponding software, generating a verification request message through the preset monitoring process and sending the verification request message to the slave equipment so as to enable the slave equipment to execute the verification updating operation of the corresponding software.
2. The mesh device multi-machine upgrading method according to claim 1, wherein the preset monitoring processes are operated on the master device and the slave device, the preset monitoring processes are communicated with each other through a private protocol, and the preset monitoring processes are inotify file monitoring processes of Linux.
3. The mesh device multi-machine upgrading method according to claim 1, wherein the receiving of the query instruction, querying of the version information of the master device, and generating of the query request message through a preset monitoring process and sending of the query request message to the slave device to obtain the corresponding version information of the slave device comprises:
judging whether the slave equipment is connected or not after receiving the query instruction, and creating a master equipment query file after determining that the slave equipment is connected;
inquiring the version information of the main equipment, and writing the version information of the main equipment into an inquiry file of the main equipment;
when the state change of the main equipment query file is monitored, the preset monitoring process generates a query request message and sends the query request message to the slave equipment;
and after receiving the slave equipment version information sent by the slave equipment, the preset monitoring process generates a slave equipment query result file according to the slave equipment version information and the mac address of the slave equipment.
4. The mesh device multi-machine upgrading method according to claim 1, wherein the receiving a download instruction, controlling execution of a download operation of corresponding software, and generating a download request message through the preset monitoring process and sending the download request message to the slave device, so that the slave device executes the download operation of the corresponding software comprises:
judging whether the slave equipment is connected or not after receiving a downloading instruction, and creating a master equipment downloading folder after determining that the slave equipment is connected;
executing corresponding software downloading operation, and downloading corresponding software to the main equipment downloading folder;
and when the state change of the main equipment download folder is monitored, the preset monitoring process generates a download request message and sends the download request message to the slave equipment.
5. The mesh device multi-machine upgrading method according to claim 1, wherein the querying a first progress of a current downloading operation, and the querying a second progress of the slave device downloading operation through the preset monitoring process comprises:
judging whether the slave equipment is connected or not, and creating a master equipment progress file after the slave equipment is determined to be connected;
inquiring the first progress, and writing the first progress into the main equipment progress file;
when the state change of the progress file of the master equipment is monitored, the preset monitoring process generates a progress request message and sends the progress request message to the slave equipment;
and after receiving the second progress sent by the slave equipment, the preset monitoring process generates a slave equipment progress file according to the second progress and the mac address of the slave equipment.
6. The multi-machine upgrading method for the mesh device according to claim 1, wherein the controlling executing the verification updating operation of the corresponding software, and generating a verification request message through the preset monitoring process and sending the verification request message to the slave device, so that the slave device executes the verification updating operation of the corresponding software comprises:
judging whether the slave equipment is connected or not, and creating a master equipment verification file after the slave equipment is determined to be connected;
executing updating verification operation of corresponding software, and writing corresponding software verification information into the main equipment verification file;
when the state change of the master equipment verification file is monitored, the preset monitoring process generates a verification request message and sends the verification request message to the slave equipment;
and after receiving the software verification information sent by the slave equipment, the preset monitoring process generates a slave equipment verification result file according to the software verification information and the mac address of the slave equipment.
7. The multi-machine upgrading method of the mesh device according to claim 1, further comprising:
and generating the query instruction according to a preset time interval to query the version information of the equipment, and generating the download instruction after determining that at least one piece of equipment in the mesh network needs software updating.
8. A mesh equipment multi-machine upgrading device is characterized in that the device is applied to a mesh network composed of a main device and a plurality of slave devices, and comprises:
the version information query module is used for receiving a query instruction, querying the version information of the master device, generating a query request message through a preset monitoring process and sending the query request message to the slave device so as to acquire the corresponding version information of the slave device;
the download option providing module is used for providing download options when determining that at least one device in the mesh network needs software update according to the device version information;
the downloading operation execution module is used for receiving a downloading instruction, controlling the downloading operation of corresponding software to be executed, generating a downloading request message through the preset monitoring process and sending the downloading request message to the slave equipment so as to enable the slave equipment to execute the downloading operation of the corresponding software;
the downloading progress query module is used for querying a first progress of the current downloading operation and querying a second progress of the downloading operation of the slave equipment through the preset monitoring process;
and the software checking and updating module is used for controlling to execute the checking and updating operation of the corresponding software after the first progress and the second progress are determined to be completed, and generating a checking request message through the preset monitoring process and sending the checking request message to the slave equipment so that the slave equipment executes the checking and updating operation of the corresponding software.
9. A mesh device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program executes the mesh device multi-computer upgrading method according to any one of claims 1 to 7 when running on the processor.
10. A readable storage medium, which is characterized by storing a computer program, wherein the computer program, when executed on a processor, executes the multi-machine upgrade method for a mesh device according to any one of claims 1 to 7.
CN202110406067.5A 2021-04-15 2021-04-15 Multi-machine upgrading method and device for mesh equipment and mesh equipment Active CN112988198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110406067.5A CN112988198B (en) 2021-04-15 2021-04-15 Multi-machine upgrading method and device for mesh equipment and mesh equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110406067.5A CN112988198B (en) 2021-04-15 2021-04-15 Multi-machine upgrading method and device for mesh equipment and mesh equipment

Publications (2)

Publication Number Publication Date
CN112988198A true CN112988198A (en) 2021-06-18
CN112988198B CN112988198B (en) 2023-12-08

Family

ID=76340606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110406067.5A Active CN112988198B (en) 2021-04-15 2021-04-15 Multi-machine upgrading method and device for mesh equipment and mesh equipment

Country Status (1)

Country Link
CN (1) CN112988198B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452782A (en) * 2021-06-28 2021-09-28 烽火通信科技股份有限公司 Upgrading method and device under mesh networking
CN114666217A (en) * 2022-03-18 2022-06-24 深圳市天贝物联科技有限公司 One-key upgrading method and system based on easy mesh
CN116455748A (en) * 2023-06-16 2023-07-18 深圳市友恺通信技术有限公司 Artificial intelligent monitoring system and method applied to operation and maintenance of network equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286907A (en) * 2008-06-02 2008-10-15 南京航空航天大学 Structure strength test system based on intelligent wireless sensing network and method of visualization
FR2926426A1 (en) * 2008-01-14 2009-07-17 Canon Kk Data transmitting method for mesh type wireless synchronous communication network, involves selecting current emission mode from set of emission modes and emission mode from another set of emission modes, according to correction
WO2012025011A1 (en) * 2010-08-27 2012-03-01 腾讯科技(深圳)有限公司 Software update system, method and computer storage medium
US9652568B1 (en) * 2011-11-14 2017-05-16 EMC IP Holding Company LLC Method, apparatus, and computer program product for design and selection of an I/O subsystem of a supercomputer
CN111541564A (en) * 2020-04-16 2020-08-14 网经科技(苏州)有限公司 Method for upgrading equipment firmware in Mesh network
CN111930396A (en) * 2020-06-29 2020-11-13 广西东信易联科技有限公司 Upgrading method of communication module in 4G router based on notify mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2926426A1 (en) * 2008-01-14 2009-07-17 Canon Kk Data transmitting method for mesh type wireless synchronous communication network, involves selecting current emission mode from set of emission modes and emission mode from another set of emission modes, according to correction
CN101286907A (en) * 2008-06-02 2008-10-15 南京航空航天大学 Structure strength test system based on intelligent wireless sensing network and method of visualization
WO2012025011A1 (en) * 2010-08-27 2012-03-01 腾讯科技(深圳)有限公司 Software update system, method and computer storage medium
US9652568B1 (en) * 2011-11-14 2017-05-16 EMC IP Holding Company LLC Method, apparatus, and computer program product for design and selection of an I/O subsystem of a supercomputer
CN111541564A (en) * 2020-04-16 2020-08-14 网经科技(苏州)有限公司 Method for upgrading equipment firmware in Mesh network
CN111930396A (en) * 2020-06-29 2020-11-13 广西东信易联科技有限公司 Upgrading method of communication module in 4G router based on notify mechanism

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
MOHAMED ABDELKRIM SENOUCI等: "Flow/Interface Association for multi-connectivity in heterogeneous wireless networks: e-Health case", AD HOC NETWORKS, vol. 94, pages 1 - 13 *
仲海梅 等: "双机热备环境下数据同步的研究", 电子技术, vol. 42, no. 7, pages 37 - 39 *
边俊峰: "基于Docker的资源调度及应用容器集群管理***设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 9, pages 138 - 112 *
邱爽: "多元存储平台与多设备间数据备份与同步的研究", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 7, pages 138 - 71 *
高聚银: "基于云平台的智能家居***设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 3, pages 139 - 194 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452782A (en) * 2021-06-28 2021-09-28 烽火通信科技股份有限公司 Upgrading method and device under mesh networking
WO2023273719A1 (en) * 2021-06-28 2023-01-05 烽火通信科技股份有限公司 Upgrade method and apparatus under mesh networking
CN114666217A (en) * 2022-03-18 2022-06-24 深圳市天贝物联科技有限公司 One-key upgrading method and system based on easy mesh
CN114666217B (en) * 2022-03-18 2023-10-20 深圳市天贝物联科技有限公司 One-key upgrading method and system based on easy mesh
CN116455748A (en) * 2023-06-16 2023-07-18 深圳市友恺通信技术有限公司 Artificial intelligent monitoring system and method applied to operation and maintenance of network equipment
CN116455748B (en) * 2023-06-16 2023-08-25 深圳市友恺通信技术有限公司 Artificial intelligent monitoring system and method applied to operation and maintenance of network equipment

Also Published As

Publication number Publication date
CN112988198B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN112988198A (en) mesh equipment multi-machine upgrading method and device and mesh equipment
US9197500B2 (en) Role based server installation and configuration
CN103841134B (en) Based on API transmission, the method for receive information, apparatus and system
CN110765023A (en) Distributed system testing method and system based on chaos experiment
CN111708557B (en) Method, device and storage medium for updating configuration file
CN107947954B (en) System, method and server for dynamically adjusting log level
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN109495874B (en) Profile downloading method and device
CN110543428B (en) Application system testing method and device
CN105245382A (en) Router configuration information modifying method and device
CN112130877A (en) Router firmware upgrading method and device, router and readable storage medium
JP2017534205A (en) Electronic device configuration for wireless communication
CN109918096A (en) A kind of installation method of server operating system, system and associated component
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN109831779A (en) A kind of upgrade package method for down loading, device, server, terminal and system
CN113282248A (en) Block chain-based personal information processing method and device
CN105119944A (en) Application starting method and related device
CN110677443A (en) Data transmitting and receiving method, transmitting end, receiving end, system and storage medium
CN112035129A (en) Method and device for driver installation and upgrade and computer equipment
JP2009217395A (en) Virtual server software update system, virtual server software update method, server and program for server
CN116627654A (en) Control method and electronic equipment
CN105074661B (en) Electronic equipment and script generation device
US10979287B2 (en) Method and apparatus for receiving a solution when configuration function verification fails in a terminal
CN110175057A (en) A kind of data processing method, electronic equipment and server
KR100456978B1 (en) Method for File Downloading in Agent

Legal Events

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