CN115396307A - Method, system, storage medium and electronic device for restarting multi-router - Google Patents

Method, system, storage medium and electronic device for restarting multi-router Download PDF

Info

Publication number
CN115396307A
CN115396307A CN202210827303.5A CN202210827303A CN115396307A CN 115396307 A CN115396307 A CN 115396307A CN 202210827303 A CN202210827303 A CN 202210827303A CN 115396307 A CN115396307 A CN 115396307A
Authority
CN
China
Prior art keywords
router
sub
routers
terminal
main
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
CN202210827303.5A
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.)
Microgrid Union Technology Chengdu Co ltd
Original Assignee
Microgrid Union Technology Chengdu 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 Microgrid Union Technology Chengdu Co ltd filed Critical Microgrid Union Technology Chengdu Co ltd
Priority to CN202210827303.5A priority Critical patent/CN115396307A/en
Publication of CN115396307A publication Critical patent/CN115396307A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Abstract

The invention discloses a method, a system, a storage medium and an electronic device for restarting a multi-router. The method comprises the following steps: acquiring the resource usage of each router in a plurality of routers; taking the router with the least resource usage amount as a main router, and taking other routers in the plurality of routers as sub-routers; a plurality of routers including a main router and a sub-router execute a restart action according to respective restart time periods; taking the router with the least resource usage amount in the sub routers as a second router, and upgrading the second router to a new main router; after the first router is restarted, upgrading the first router again to be a main router, and degrading the second router to be a sub router; the invention solves the technical problem that the router is easy to have network failure after long-time use.

Description

Method, system, storage medium and electronic device for restarting multi-router
Technical Field
The present invention relates to the field of network communications, and in particular, to a method, a system, a storage medium, and an electronic device for restarting a multi-router.
Background
In the prior art, network faults may occur after the router works for a long time. The reason for the network failure is complex, and generally, a user needs to manually restart the router to recover the use of the network.
Disclosure of Invention
The embodiment of the invention provides a method, a system, a storage medium and electronic equipment for restarting a multi-router, which are used for at least solving the technical problem that the router is easy to have network faults after being used for a long time.
According to an aspect of the embodiments of the present invention, there is provided a method for restarting a multiplexer, including: acquiring the resource usage amount of each router in a plurality of routers; taking the router with the least resource usage amount as a main router, and taking other routers in the plurality of routers as sub-routers; the plurality of routers including the master router and the sub router perform a restart action according to respective restart time periods; before the main router is restarted, the main router serves as a first router and records a terminal mark of a first terminal connected with the first router; taking the router with the least resource usage amount in the sub routers as a second router, and upgrading the second router to a new main router; controlling the first terminal to connect the second router according to the terminal mark and restarting the first router; after the first router is restarted, upgrading the first router again to be a main router, and degrading the second router to be a sub-router; controlling the first terminal to reconnect to the first router.
According to another aspect of the embodiments of the present invention, there is provided a restart system of a multiplexer, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the resource usage of each router in a plurality of routers; a first determining module, configured to use the router with the least resource usage as a master router, and use other routers in the plurality of routers as sub-routers; a restart module for controlling the plurality of routers including the main router and the sub-router to execute a restart action according to respective restart time periods; the recording module is used for controlling the main router to serve as a first router before the main router is restarted, and recording a terminal mark of a first terminal connected with the first router; a second determining module, configured to use a router with the least resource usage amount in the sub-routers as a second router, and upgrade the second router to a new main router; the first control module is used for controlling the first terminal to be connected with the second router according to the terminal mark and restarting the first router; the adjusting module is used for upgrading the first router to a main router again and degrading the second router to a sub-router after the first router is restarted; a second control module for controlling the first terminal to reconnect to the first router.
As an optional example, the system further comprises: a third determining module, configured to determine a connection frequency of each router of the multiple routers, where the connection frequency is a number of times that the same or different terminals connect the router in a unit time; setting the shorter the restart time period of the router with higher connection frequency is set, the longer the restart time period of the router with lower connection frequency is set.
As an optional example, the system further comprises: and the updating module is used for updating the restarting time period of each router according to the connection frequency of each router in the latest time period.
As an alternative example, the first control module includes: an obtaining unit, configured to obtain a connection key of the second router; a sending unit, configured to send the connection key to the first terminal; and the connection unit is used for controlling the first terminal to automatically connect the second router according to the connection key.
As an alternative example, the connection unit includes: a first connection subunit, configured to control the first terminal to perform silent automatic connection with the second router when a connection key of the second router is the same as a connection key of the first router; under the condition that the connection key of the second router is different from the connection key of the first router, controlling the first terminal to display the connection key of the second router; or a second connection subunit, configured to control the first terminal to quiesce and automatically connect to the second router when a connection key of the second router is the same as that of the first router; and under the condition that the connection key of the second router is different from the connection key of the first router, controlling the first terminal to be silent and automatically connected with the second router.
As an optional example, the system further comprises: the monitoring module is used for controlling a main router in the plurality of routers to monitor the sub-router; and the distribution module is used for controlling the main router to distribute the second terminal connected in the first sub router to the second sub router when the first sub router in the sub routers restarts.
As an alternative example, the allocation module comprises: the distribution unit is used for controlling the main router to determine the resource score of each un-restarted sub-router in the sub-routers, wherein the resource score is divided into the sum of the remaining resource score and the connection frequency score, the larger the remaining resource is, the higher the remaining resource score is, the larger the connection frequency is, the higher the connection frequency score is, and the sub-router with the largest resource score is taken as the second sub-router.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is executed by a processor to perform the method for restarting the multiplexer.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores therein a computer program, and the processor is configured to execute the method for restarting the multi-router described above by using the computer program.
In the embodiment of the invention, the resource usage amount of each router in a plurality of routers is obtained; taking the router with the least resource usage amount as a main router, and taking other routers in the plurality of routers as sub-routers; the plurality of routers including the main router and the sub-router perform a restart action according to respective restart time periods; before the main router is restarted, the main router serves as a first router and records a terminal mark of a first terminal connected with the first router; taking the router with the least resource usage amount in the sub-routers as a second router, and upgrading the second router to a new main router; controlling the first terminal to connect the second router according to the terminal mark and restarting the first router; after the first router is restarted, upgrading the first router again to be a main router, and degrading the second router to be a sub-router; the method for controlling the first terminal to be connected to the first router again can restart a plurality of routers in the router network according to the own restart time period, and can transfer the terminals connected to the router to other routers when the routers are restarted, thereby avoiding the condition that the router is easy to have network faults after being used for a long time, and further solving the technical problem that the router is easy to have network faults after being used for a long time.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an alternative method of restarting a multi-router in accordance with an embodiment of the present invention;
FIG. 2 is a router diagram illustrating an alternative method for restarting a multiplexer according to an embodiment of the present invention;
fig. 3 is a schematic diagram of terminal switching at the time of router restart according to an alternative method for restarting a multiplexer according to an embodiment of the present invention;
FIG. 4 is a block diagram of an alternative restart system for a multiplexer according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, 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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a method for restarting a multiplexer, optionally, as shown in fig. 1, the method includes:
s102, acquiring the resource usage amount of each router in a plurality of routers;
s104, taking the router with the least resource usage as a main router, and taking other routers in the plurality of routers as sub-routers;
s106, a plurality of routers including the main router and the sub-router execute restarting actions according to respective restarting time periods;
s108, before the main router is restarted, the main router is used as a first router and records a terminal mark of a first terminal connected with the first router;
s110, taking the router with the least resource usage amount in the sub-routers as a second router, and upgrading the second router to a new main router;
s112, controlling the first terminal to connect the second router according to the terminal mark, and restarting the first router;
s114, after the first router is restarted, upgrading the first router again to be a main router and degrading the second router to be a sub-router;
and S116, controlling the first terminal to be connected to the first router again.
In this embodiment, the plurality of routers may be home routers. For example, a single household can introduce multiple in-house network lines of the same operator to meet the network use requirements of different rooms in the household. A router group can be formed among a plurality of routers, wherein a main router is set, and the rest routers are sub routers. The main router can monitor and orchestrate the sub-routers. Each router is normally used in the case of power-on, and a user in a home can connect to any one of the routers through a connection key (password) according to the needs of the user.
The total amount of resources may be different for each of the plurality of routers. And acquiring the resource usage of each router. The router with the least resource usage is used as a main router, and other routers in the plurality of routers are used as sub-routers. A user may set an initial master router and then a plurality of routers periodically update the master router and the sub-routers according to the resource usage. And the main router and the sub-router execute the restarting action according to the own restarting time period. When the master router is restarted, it can be determined which terminals are connected to the master router based on the terminal flags of the first terminals connected to the master router. And determining a second router from the sub-routers according to the resource usage amount, and upgrading the second router to a new main router. And restarting the original main router. The first terminal is connected to the new master router. And after the original main router is restarted, the first terminal is connected back to the original main router, and the second router is degraded into the sub-router.
Optionally, in this embodiment, a connection frequency of each router in the multiple routers may be determined, where the connection frequency is the number of times that the same or different terminals connect the routers in a unit time; the shorter the restart time period of the router to which the higher connection frequency is set, the longer the restart time period of the router to which the lower connection frequency is set.
The higher the connection frequency, the higher the frequency with which the router is used. For the router with higher use frequency, the restart time period is shorter, so that the router is prevented from generating faults due to high-frequency use.
Optionally, in this embodiment, the restart time period of each router may be updated according to the connection frequency of each router in the latest time period.
The latest time period may be a time period of a particular market, such as a day or an hour. And updating the restart time period of each router according to the connection frequency of each router in the period. For example, the restart time period of a router is initially a week, and the restart time period is updated to 4 days after the adjustment of the connection frequency of the latest time period.
Optionally, in this embodiment, when the first terminal is controlled to connect to the second router according to the terminal identifier and the first router is restarted, the connection key of the second router may be obtained; sending the connection key to the first terminal; and automatically connecting the second router by the first terminal according to the connection key. That is, in the present embodiment, when the first router is restarted, the first terminal may be connected to the second router. The connection key may be sent to the first terminal, and the second router may be connected by the first terminal based on the connection key. Therefore, the situation that the terminal connected to the first server is not used by the network when the first router is restarted can be avoided.
Optionally, in this embodiment, the automatically connecting, by the first terminal, the second router according to the connection key includes: under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent and automatically connected with the second router; displaying, by the first terminal, the connection key of the second router when the connection key of the second router is different from the connection key of the first router; or under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent and automatically connected with the second router; and under the condition that the connection key of the second router is different from that of the first router, the first terminal is used for quiescing and automatically connecting the second router.
That is to say, in this embodiment, whether the password contents of the first router and the second router are consistent or not, the first terminal may be silently connected to the second router when the first router is restarted. It should be noted here that, if the first router is not restarted, when the first terminal is connected to the second router from the first router, if the first connection is performed, the connection key needs to be input, the verification of the connection key is performed, and the first terminal can be connected to the second router after the verification is passed. If the first router is restarted, even if the first terminal is connected with the second router for the first time, the first terminal can be automatically connected with the second router through the connection key in a silent mode, and the user does not need to input the connection key for verification. As another example, when the first router is restarted and the first terminal connects to the second router for the first time, the first terminal may automatically quiesce to connect to the second router when the cryptographic contents of the first router and the second router are consistent, and if the connection keys of the first router and the second router are not consistent, display the contents of the connection keys, and manually input and connect the second router.
Optionally, in this embodiment, the sub-router may be monitored by a main router in the multiple routers; when a first one of the sub-routers reboots, the main router allocates a second terminal connected in the first sub-router to the second sub-router. That is, the main router may assign a second terminal connected to the first sub-router to the second sub-router when the first sub-router restarts. In the allocation, the silence of the foreground of the second terminal may refer to the silence of the connection of the first terminal to the second router, which is not described herein again. The second terminal is connected to the second sub-router and the first sub-router is restarted.
Optionally, in this embodiment, when the master router allocates the second terminal connected to the first sub-router to the second sub-router, the resource score of each un-restarted sub-router in the sub-routers may be determined, where the resource score is divided into a sum of a remaining resource score and a connection frequency score, and the larger the remaining resource score is, the higher the connection frequency score is; and taking the sub-router with the largest resource score as a second sub-router. That is, in the present embodiment, when the second terminal connected to the first sub-router is connected to the second sub-router, selection can be made from among the plurality of sub-routers for the second sub-router. The amount of resources remaining and the connection frequency to the sub-router can be compared. The larger the remaining resource amount is, the larger the connection frequency is, and the easier it is to serve as the second sub-router.
Fig. 2 is a schematic diagram of the router of the embodiment. One network cable can be divided into a plurality of networks when entering a home, and each network cable can be connected with one router. Such as router 202, router 204, and router 206, a master router and a slave router can be determined among the 3 routers.
Fig. 3 is a schematic diagram of terminal switching at the restart of a router. When the router 302 is restarted, the terminal 304 is no longer connected to the router 302 and can be connected to another router.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided a restart system of a multiplexer, as shown in fig. 4, including:
an obtaining module 402, configured to obtain a resource usage amount of each of a plurality of routers;
a first determining module 404, configured to use the router with the least resource usage as a master router, and use other routers in the multiple routers as sub-routers;
a restart module 406, configured to control a plurality of routers including the master router and the sub-router to execute a restart action according to respective restart time periods;
a recording module 408, configured to control the main router as a first router before the main router is restarted, and record a terminal identifier of a first terminal connected to the first router;
a second determining module 410, configured to use the router with the least resource usage amount in the sub-routers as a second router, and upgrade the second router to a new main router;
a first control module 412, configured to control the first terminal to connect to the second router and restart the first router according to the terminal identifier;
the adjusting module 414 is configured to upgrade the first router to the main router again and downgrade the second router to the sub-router after the first router is restarted;
a second control module 416 for controlling the first terminal to reconnect to the first router.
In this embodiment, the plurality of routers may be home routers. For example, one household can introduce multiple in-house network lines of the same operator to meet the network use requirements of different rooms in the household. A router group can be formed among a plurality of routers, wherein a main router is set, and the rest routers are sub-routers. The master router can monitor and pool the sub-routers. Each router is normally used in the condition of power-on, and a user in a home can be connected to any one of the routers through a connection key (password) according to the requirement of the user.
The total amount of resources may be different for each of the plurality of routers. And acquiring the resource usage of each router. The router with the least resource usage is used as a main router, and other routers in the plurality of routers are used as sub-routers. A user may set an initial master router and then a plurality of routers periodically update the master router and the sub-routers according to the resource usage. And the main router and the sub-router execute the restarting action according to the own restarting time period. When the master router is restarted, it can be determined which terminals are connected to the master router based on the terminal flags of the first terminals connected to the master router. And determining a second router from the sub-routers according to the resource usage amount, and upgrading the second router to a new main router. And restarting the original main router. The first terminal is connected to the new master router. And after the original main router is restarted, connecting the first terminal back to the original main router, and degrading the second router into the sub router.
Optionally, in this embodiment, a connection frequency of each router in the multiple routers may be determined, where the connection frequency is the number of times that the same or different terminals connect the routers in a unit time; the shorter the restart time period of the router to which the higher connection frequency is set, the longer the restart time period of the router to which the lower connection frequency is set.
The higher the connection frequency, the higher the frequency with which the router is used. For the router with higher use frequency, the restart time period is shorter, so that the router is prevented from generating faults due to high-frequency use.
Optionally, in this embodiment, the restart time period of each router may be updated according to the connection frequency of each router in the latest time period.
The latest time period may be a time period of a particular market, such as a day or an hour. And updating the restart time period of each router according to the connection frequency of each router in the period. For example, the restart time period of a router is initially a week, and the restart time period is updated to 4 days after the adjustment of the connection frequency of the latest time period.
Optionally, in this embodiment, when controlling the first terminal to connect to the second router according to the terminal identifier and restarting the first router, the connection key of the second router may be obtained; sending the connection key to the first terminal; and automatically connecting the second router by the first terminal according to the connection key. That is, in the present embodiment, when the first router is restarted, the first terminal may be connected to the second router. The join key may be sent to the first terminal, and the first terminal joins the second router based on the join key. Therefore, the situation that the terminal connected to the first server is not used by the network when the first router is restarted can be avoided.
Optionally, in this embodiment, the automatically connecting, by the first terminal, the second router according to the connection key includes: under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent and automatically connected with the second router; displaying, by the first terminal, the connection key of the second router when the connection key of the second router is different from the connection key of the first router; or under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent and automatically connected with the second router; and under the condition that the connection key of the second router is different from that of the first router, the first terminal is used for quiescing and automatically connecting the second router.
That is to say, in this embodiment, whether the password contents of the first router and the second router are consistent or not, the first terminal may be silently connected to the second router when the first router is restarted. It should be noted here that, if the first router is not restarted, when the first terminal is connected to the second router from the first router, if the first connection is performed, the connection key needs to be input, the verification of the connection key is performed, and the first terminal can be connected to the second router after the verification is passed. If the first router is restarted, even if the first terminal is connected with the second router for the first time, the first terminal can be automatically connected with the second router through the connection key in a silent mode, and the user does not need to input the connection key for verification. As another example, when the first router restarts and the first terminal connects to the second router for the first time, the first terminal may automatically mute connection to the second router when the password contents of the first router and the second router are consistent, and if the connection keys of the first router and the second router are not consistent, the contents of the connection keys are displayed and the second router is manually input and connected.
Optionally, in this embodiment, the sub-router may be monitored by a main router in the multiple routers; when a first sub-router among the sub-routers restarts, the main router allocates a second terminal connected in the first sub-router to a second sub-router. That is, the main router may assign a second terminal connected to the first sub-router to the second sub-router when the first sub-router restarts. During the allocation, whether the second terminal foreground is silent may refer to whether the first terminal is silent to connect to the second router, which is not described herein again. The second terminal is connected to the second sub-router and the first sub-router is restarted.
Optionally, in this embodiment, when the master router allocates the second terminal connected to the first sub-router to the second sub-router, the resource score of each un-restarted sub-router in the sub-routers may be determined, where the resource score is divided into a sum of a remaining resource score and a connection frequency score, and the larger the remaining resource score is, the higher the connection frequency score is; and taking the sub-router with the maximum resource score as a second sub-router. That is, in the present embodiment, when the second terminal connected to the first sub-router is connected to the second sub-router, selection can be made from among the plurality of sub-routers for the second sub-router. The amount of resources remaining and the connection frequency to the sub-router can be compared. The larger the remaining resource amount is, the larger the connection frequency is, and the easier it is to serve as the second sub-router.
For other examples of this embodiment, please refer to the above examples, which are not described herein.
Fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 5, including a processor 502, a communication interface 504, a memory 506, and a communication bus 508, wherein the processor 502, the communication interface 504, and the memory 506 are communicated with each other via the communication bus 508, and wherein,
a memory 506 for storing a computer program;
the processor 502, when executing the computer program stored in the memory 506, implements the following steps:
acquiring the resource usage of each router in a plurality of routers;
taking the router with the least resource usage amount as a main router, and taking other routers in the plurality of routers as sub-routers;
a plurality of routers including a main router and a sub-router execute a restart action according to respective restart time periods;
before the main router is restarted, the main router serves as a first router and records a terminal mark of a first terminal connected with the first router;
taking the router with the least resource usage amount in the sub routers as a second router, and upgrading the second router to a new main router;
controlling the first terminal to connect the second router according to the terminal mark, and restarting the first router;
after the first router is restarted, upgrading the first router again to be a main router, and degrading the second router to be a sub-router;
the first terminal is controlled to reconnect to the first router.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 506 may include, but is not limited to, an obtaining module 402, a first determining module 404, a restarting module 406, a recording module 408, a second determining module 410, a first control module 412, an adjusting module 414, and a second control module 416 in the restarting system including the multiplexer. In addition, the system may further include, but is not limited to, other module units in the restart system of the multi-router, which is not described in detail in this example.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It should be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the device implementing the method for restarting the multi-router may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, where the computer program is executed by a processor to perform the steps in the restart method of a multiplexer described above.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the various methods in the foregoing embodiments may be implemented by a program instructing hardware related to the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be implemented in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for restarting a multiplexer, comprising:
acquiring the resource usage amount of each router in a plurality of routers;
taking the router with the least resource usage amount as a main router, and taking other routers in the plurality of routers as sub-routers;
the plurality of routers including the main router and the sub-router perform a restart action according to respective restart time periods;
before the main router is restarted, the main router serves as a first router and records a terminal mark of a first terminal connected with the first router;
taking the router with the least resource usage amount in the sub-routers as a second router, and upgrading the second router to a new main router;
controlling the first terminal to be connected with the second router according to the terminal mark, and restarting the first router;
after the first router is restarted, upgrading the first router again to be a main router, and degrading the second router to be a sub router;
controlling the first terminal to reconnect to the first router.
2. The method of claim 1, further comprising:
determining a connection frequency of each router in the plurality of routers, wherein the connection frequency is the number of times that the same or different terminals are connected with the router in a unit time;
setting the restart time period of the router having the higher connection frequency to be shorter, and setting the restart time period of the router having the lower connection frequency to be longer.
3. The method of claim 2, further comprising:
updating the restart time period of each router according to the connection frequency of each router in the latest time period.
4. The method of claim 1, wherein the controlling the first terminal to connect to the second router according to the terminal identifier and restarting the first router comprises:
acquiring a connection key of the second router;
sending the connection key to the first terminal;
and automatically connecting the second router by the first terminal according to the connection key.
5. The method according to claim 4, wherein the automatically connecting, by the first terminal, the second router according to the connection key comprises:
under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent to automatically connect the second router; displaying, by the first terminal, a connection key of the second router in a case where the connection key of the second router is different from the connection key of the first router; or alternatively
Under the condition that the connection key of the second router is the same as that of the first router, the first terminal is silent and automatically connected with the second router; and under the condition that the connection key of the second router is different from the connection key of the first router, the first terminal is silent and automatically connected with the second router.
6. The method of claim 1, further comprising:
the master router in the plurality of routers monitors the sub-routers;
when a first sub-router among the sub-routers restarts, the main router allocates a second terminal connected in the first sub-router to a second sub-router.
7. The method according to claim 6, wherein the main router allocating the second terminal connected in the first sub-router to the second sub-router when the first sub-router among the sub-routers reboots comprises:
the main router determines a resource score of each un-restarted sub-router in the sub-routers, wherein the resource score is divided into the sum of a resource surplus score and a connection frequency score, and the larger the surplus resource is, the higher the remaining resource quantity score is, the larger the connection frequency is, and the higher the connection frequency score is;
and taking the sub-router with the maximum resource score as the second sub-router.
8. A restart system for a multiplexer, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the resource usage of each router in a plurality of routers;
a first determining module, configured to use the router with the least resource usage as a master router, and use other routers in the plurality of routers as sub-routers;
a restart module for controlling the plurality of routers including the main router and the sub-router to execute a restart action according to respective restart time periods;
the recording module is used for controlling the main router to serve as a first router before the main router is restarted, and recording a terminal mark of a first terminal connected with the first router;
a second determining module, configured to take a router with the least resource usage amount in the sub-routers as a second router, and upgrade the second router to a new main router;
the first control module is used for controlling the first terminal to be connected with the second router according to the terminal mark and restarting the first router;
the adjusting module is used for upgrading the first router to be a main router again and degrading the second router to be a sub-router after the first router is restarted;
and the second control module is used for controlling the first terminal to be reconnected to the first router.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210827303.5A 2022-07-13 2022-07-13 Method, system, storage medium and electronic device for restarting multi-router Pending CN115396307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210827303.5A CN115396307A (en) 2022-07-13 2022-07-13 Method, system, storage medium and electronic device for restarting multi-router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210827303.5A CN115396307A (en) 2022-07-13 2022-07-13 Method, system, storage medium and electronic device for restarting multi-router

Publications (1)

Publication Number Publication Date
CN115396307A true CN115396307A (en) 2022-11-25

Family

ID=84116044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210827303.5A Pending CN115396307A (en) 2022-07-13 2022-07-13 Method, system, storage medium and electronic device for restarting multi-router

Country Status (1)

Country Link
CN (1) CN115396307A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035080A (en) * 2007-04-16 2007-09-12 杭州华为三康技术有限公司 Elegant restart method, appointed middle system, neighbor router and broadcast network
CN101702681A (en) * 2009-11-26 2010-05-05 福建星网锐捷网络有限公司 Switching method and device of main/standby router in virtual route redundancy protocol
CN104486216A (en) * 2014-12-08 2015-04-01 迈普通信技术股份有限公司 State switching method and router
CN105119822A (en) * 2015-09-08 2015-12-02 烽火通信科技股份有限公司 Backup group management method and system based on VRRP (Virtual Router Redundancy Protocol)
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN108449192A (en) * 2018-04-28 2018-08-24 成都欧远信电子科技有限公司 A kind of long-distance remote control realizes that router restarts system automatically

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035080A (en) * 2007-04-16 2007-09-12 杭州华为三康技术有限公司 Elegant restart method, appointed middle system, neighbor router and broadcast network
CN101702681A (en) * 2009-11-26 2010-05-05 福建星网锐捷网络有限公司 Switching method and device of main/standby router in virtual route redundancy protocol
CN104486216A (en) * 2014-12-08 2015-04-01 迈普通信技术股份有限公司 State switching method and router
CN105119822A (en) * 2015-09-08 2015-12-02 烽火通信科技股份有限公司 Backup group management method and system based on VRRP (Virtual Router Redundancy Protocol)
CN107911291A (en) * 2017-11-28 2018-04-13 中国移动通信集团湖北有限公司 VRRP routers switching method, router, VRRP active-standby switch system and storage medium
CN108449192A (en) * 2018-04-28 2018-08-24 成都欧远信电子科技有限公司 A kind of long-distance remote control realizes that router restarts system automatically

Similar Documents

Publication Publication Date Title
US9904561B2 (en) Computer system and method for setting BIOS
CN109618174B (en) Live broadcast data transmission method, device, system and storage medium
CN107832100A (en) A kind of loading method and its terminal of APK plug-in units
CN110532077B (en) Task processing method and device and storage medium
CN110855772B (en) Cross-device data storage method, system, device, server and medium
CN112416969B (en) Parallel task scheduling system in distributed database
CN114257551A (en) Distributed current limiting method and system and storage medium
CN112527397A (en) Method and device for modifying basic input output system options and computer equipment
CN114691390A (en) User mode program processing method and device, storage medium and processor
CN112748961A (en) Method and device for executing starting task
CN113885971A (en) State management method and device based on self-adaptive platform system
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN110912725A (en) Configuration method and configuration device of OpenFlow virtual switch
CN110035132B (en) Data synchronization method, computer device and storage medium
CN115396307A (en) Method, system, storage medium and electronic device for restarting multi-router
CN115102999B (en) DevOps system, service providing method, storage medium and electronic device
CN115469964A (en) Method and device for determining mapping relation between block device and virtual machine disk character
CN109361554A (en) The method and apparatus of the customized management page and default configuration
CN113504981A (en) Task scheduling method and device, storage medium and electronic equipment
CN115268951A (en) Installation method, device, equipment and storage medium of operating system
CN110858201B (en) Data processing method and system, processor and storage medium
CN108848182B (en) Updating method of BMC firmware, related equipment and system
CN110427336B (en) CPU link rate configuration method, system, equipment and computer medium
CN108733607B (en) Connection communication method and device
CN112712299B (en) Resource management method, system, storage medium and electronic device

Legal Events

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