CN108897583B - Switch starting method, switch and storage medium - Google Patents
Switch starting method, switch and storage medium Download PDFInfo
- Publication number
- CN108897583B CN108897583B CN201810681548.5A CN201810681548A CN108897583B CN 108897583 B CN108897583 B CN 108897583B CN 201810681548 A CN201810681548 A CN 201810681548A CN 108897583 B CN108897583 B CN 108897583B
- Authority
- CN
- China
- Prior art keywords
- switch
- application software
- processing unit
- central processing
- indication information
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses a switch starting method, a switch and a storage medium. The method comprises the following steps: when the switch is started, a central processing unit in the switch acquires application software indication information provided by an operable device; the central processing unit searches target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software; and the central processing unit loads the target application software. The embodiment of the invention can quickly and accurately load the application software of the switch when the switch is started.
Description
Technical Field
The present invention relates to communications technologies, and in particular, to a method for starting a switch, and a storage medium.
Background
The switch can load various functional software when being started so as to realize various functions. For example, if the switch is started and the switch application software is loaded, the switch function is realized after the switch is started, and if the gateway application software is loaded, the gateway function is realized after the switch is started.
Currently, the mode of switching application software running on a switch is as follows: the switch is connected with the upper computer, and the configuration parameters of the bootstrap program are manually changed through an operation interface of the upper computer, so that the application software required to be operated is determined to be started next time. For example, if the gateway function needs to be implemented after the switch is started next time, the configuration parameters of the bootstrap program need to be changed into gateway parameters by the upper computer before the switch is started next time, and the bootstrap program automatically loads gateway application software according to the gateway parameters when the switch is started next time.
The manual configuration parameter modification method has the following defects: if the changed parameters are not stored in time after the configuration parameters of the bootstrap program are changed, the bootstrap program can not load corresponding software according to the changed parameters when the switch is started next time, and the loaded software is the original software. Moreover, manual modifications are prone to errors. The configuration mode through the operation interface of the upper computer is complex to operate.
Disclosure of Invention
The embodiment of the invention provides a switch starting method, a switch and a storage medium, which are used for quickly and accurately switching application software of the switch when the switch is started.
In a first aspect, an embodiment of the present invention provides a method for starting a switch, including:
when the switch is started, a central processing unit in the switch acquires application software indication information provided by an operable device;
the central processing unit searches target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software;
and the central processing unit loads the target application software.
In a second aspect, an embodiment of the present invention further provides a switch, including: a central processing unit, an operable device and a memory;
the operable device and the memory are respectively connected with the central processing unit;
the memory is used for storing an information software comparison table and one or more programs;
when the one or more programs are executed by the central processing unit, the central processing unit is enabled to implement the switch application switching method according to any embodiment.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a central processing unit or a microcontroller, implements the switch starting method according to any embodiment.
In the embodiment of the invention, when the switch is started, the central processing unit acquires the application software indication information provided by the operable device; the method comprises the steps of searching target application software corresponding to application software indication information in a pre-established information software comparison table, and loading the target application software, so that the application software needing to be loaded by the switch can be determined according to the application software indication information provided by an operable device.
Drawings
Fig. 1 is a flowchart of a method for starting a switch according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for starting a switch according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for starting a switch according to a third embodiment of the present invention;
fig. 4a is a schematic structural diagram of a switch according to a fourth embodiment of the present invention;
fig. 4b is a schematic structural diagram of another switch according to the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for starting a switch according to an embodiment of the present invention, where this embodiment is applicable to a case where switched application software is loaded when the switch is started, and the method may be executed by a central processing unit in the switch, and specifically includes the following steps:
s110, when the switch is started, the central processing unit in the switch acquires the application software indication information provided by the operable device.
In this embodiment, the switch includes an operational device. Alternatively, the operable device may be mounted on the chassis of the switch or may be independent of the chassis of the switch. The operable device may be wired or wirelessly connected to the central processor.
Optionally, the operable device comprises at least one of a touch screen, a camera, a voice recognition device. The operable device can provide application software indication information according to the operation of the user, and the application software indication information can be state information of the operable device or information generated by the operable device and used for indicating the application software which needs to be loaded after the switch is started next time.
For example, the operable device is a touch screen, the touch screen receives a touch operation of a user and generates corresponding application software indication information according to the touch operation, and the touch operation may be a touch in a preset touch area, a touch for a preset duration, a touch trajectory, or a touch type, such as a double click or a single click.
For another example, the operable device is a camera, the camera captures a gesture of the user, and generates corresponding application software indication information according to the user gesture, and the user gesture may be a clockwise swing, a counterclockwise swing, a top-to-bottom, a bottom-to-top, or the like.
For another example, the operable device is a voice recognition device that recognizes voice input by a user and generates corresponding application software instruction information from the recognized voice, and the voice of the user may be gateway application software, switch application software, or the like.
When the operable device comprises at least two devices, setting the priority of the device and preferentially acquiring the application software indication information provided by the device with higher priority; and if the application software indication information provided by the device with higher priority is not acquired, acquiring the application software indication information provided by the device with the second priority.
S120, the central processing unit searches for target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software.
In this embodiment, the information software look-up table is established before the central processing unit obtains the application software instruction information provided by the operable device, and the information software look-up table is stored in the memory associated with the central processing unit. The application software indication information corresponds to the application software one by one. Optionally, the application software herein includes information of the application software and/or the application software itself, and the information of the application software includes a name, a version, a storage path, a number, and the like of the application software.
After the central processing unit obtains the application software indication information, application software corresponding to the application software indication information is searched in an information software comparison table stored in the storage. For convenience of description and distinction, the searched application software is referred to as target application software.
S130, the central processing unit loads target application software.
Optionally, the central processing unit starts the boot program after powering on, the boot program continues to acquire the application software instruction information provided by the operable device after loading the operating system, and searches for the target application software corresponding to the application software instruction information in the pre-established information software comparison table, and loads the target application software.
After the central processing unit loads the target application software, the function of the target application software can be realized. For example, the central processing unit loads gateway application software to implement the gateway function, and the central processing unit loads switch application software to implement the switch function.
In this embodiment, when the switch is started, the central processing unit obtains the application software indication information provided by the operable device; the method comprises the steps of searching target application software corresponding to application software indication information in a pre-established information software comparison table, and loading the target application software, so that the application software needing to be loaded by the switch can be determined according to the application software indication information provided by an operable device.
Example two
This embodiment is further optimized by defining the operable device as a switching device having at least one electrical contact, the "closed" of the contact indicating that the electrical contact is conductive, allowing current to flow; an "open" of the switch indicates that the electrical contact is non-conductive, creating an open circuit, not allowing current to flow. Each electronic contact is closed corresponding to one gear, for example, the first electronic contact is closed corresponding to the switch device in the "1 gear", the second electronic contact is closed corresponding to the switch device in the "2 gear", the third electronic contact is closed corresponding to the switch device in the "3 gear", if all the electronic contacts are not closed corresponding to the switch device in the reset gear.
Fig. 2 is a flowchart of a switch startup method according to a second embodiment of the present invention, including the following steps:
s210, when the switch is started, the central processing unit acquires the current gear of the switch device.
And S220, the central processing unit searches target application software corresponding to the current gear in a pre-established information software comparison table.
And S230, loading the target application software by the central processing unit.
For example, the central processor acquires the closed electrical contact and thus the current gear of the switching device.
The information software comparison table stores a correspondence between a gear and application software, for example, the 1 gear corresponds to gateway application software, and the 2 gear corresponds to Packet Transport Network (PTN) application software.
In some embodiments, the reset gear corresponds to a default application software, such as a switch application software.
In other embodiments, if the reset gear is acquired and the user is not considered to select the application software, the control prompting device prompts the user to operate the switch device and/or prompts the user to the application software corresponding to the indication information of each application software. Based on this, when the switch starts, central processing unit in the switch acquires switching device's gear, includes: when the switch is started, if the gear of the switch device is reset, the central processing unit controls the prompting device to prompt a user to operate the switch device and/or prompt the user to the application software corresponding to the indication information of each application software; the central processor reacquires the shift position of the switching device in response to the user's operation of the switching device. And if the non-reset gear of the switching device still cannot be acquired after the preset time, directly loading default application software.
Optionally, the prompting device may be a display screen or a speaker, and is connected to the central processing unit for prompting the user to operate the switch device under the control of the central processing unit.
In one application scenario, the switching device has a reset gear, a 1-gear and a 2-gear. In order to facilitate user operation and improve the friendliness of the switching device, the 'switch application software' is marked around the reset gear, the 'gateway application software' is marked around the 1 st gear, and the 'PTN application software' is marked around the 2 nd gear; alternatively, the prompting device prompts the user for the application software corresponding to each application software indication information (in this embodiment, the gear position of the switch device), for example, the prompting device is triggered, and the prompting device automatically plays the application software corresponding to each gear position. When the switch is powered off or in the normal operation process, a user can toggle the switch device to 1 gear, and then gateway application software is loaded when the switch is started next time; the user can also toggle the switch device to the 2 nd gear, and then the PTN application software is loaded when the switch is started next time; the user can also toggle the switching device to a reset gear, and the 'switch application software' will be loaded the next time the switch is started.
In another application scenario, the user toggles the switching device to the reset gear. When the switch is started next time, the prompting device can prompt a user to select application software, ask for dialing the switch device and/or the application software corresponding to each gear, and if the user dials the switch device to 1 gear or 2 gears within a preset time, the switch can load the corresponding application software; and if the user does not toggle the switching device to the 1 gear or the 2 gear within the preset time, the switch automatically loads the application software of the switch.
In the embodiment, when the switch is started, the central processing unit acquires the current gear of the switching device, searches the target application software corresponding to the current gear in the pre-established information software comparison table, and loads the target application software corresponding to the target application software, so that the switch can switch the application software according to the gear state of the switching device, but not configure parameters; for a user, the application software of the switch can be switched by shifting the switch device, configuration parameters of an upper computer do not need to be connected, and the configuration parameters do not need to be stored, so that the technical effect of conveniently and accurately switching the application software of the switch is achieved.
EXAMPLE III
The foregoing embodiments mainly focus on the process of the central processing unit loading the application software when the switch is started. Currently, after the central processing unit loads the application software, all forwarding parameters required by the application software are configured to the switch chip through the application software. And after all the forwarding parameters are configured, the switch is started. The existing switch starting method is slow, and on the basis of the above embodiments, in order to increase the speed of starting the switch, the embodiment provides a switch starting method, which can realize quick starting of the switch while switching application software conveniently and accurately. As shown in fig. 3, the method specifically includes the following steps:
and S300, powering on the switch and starting. Execution continues with S310 and S350.
And S310, when the switch is started, initializing and acquiring the access right of the switch chip by the microcontroller in the switch. Execution continues with S320.
In this embodiment, the microcontroller may be an STM32 chip, similar to a single chip microcomputer, and has a characteristic of fast initialization relative to a Central Processing Unit (CPU). Based on this, compared with the configuration operation of the switch chip executed by the central processing unit in the prior art, in the embodiment, the configuration operation of the switch chip is executed by the microcontroller with a faster initialization process, so as to save the starting time.
First, the microcontroller powers up and initializes its own clock, bus connector, etc., completing the initialization operation. Wherein, the exchange chip is respectively connected with the microcontroller and the central processing unit. After the microcontroller is initialized, acquiring the access right to the exchange chip, namely realizing the connection of the exchange chip and the microcontroller; meanwhile, the connection between the exchange chip and the central processing unit is disconnected.
And S320, the microcontroller acquires the basic forwarding parameters which are prestored and are required by the application software. Execution continues with S330.
The basic forwarding parameters that are common to the application software are, for example, basic forwarding parameters common to devices such as a switch, a gateway, and a PTN: rate duplexing of ports, forwarding state of ports, Virtual Local Area Network (VLAN) attributes of ports.
S330, the microcontroller configures the basic forwarding parameters into the switching chip. Execution continues with S340.
The basic forwarding parameters may be stored in a memory within the microcontroller or in a memory connected to the microcontroller. The memory can be nonvolatile memory such as ROM, FLASH, optical disk, floppy disk, mechanical hard disk, etc.
The basic forwarding parameters can be directly configured in the switching chip without the processes of state judgment and the like. Optionally, the microcontroller directly configures the acquired basic forwarding parameters into the switch chip via a bus between the microcontroller and the switch chip. At this point, the microcontroller completes the configuration operation of the switching chip.
And S340, releasing the access authority of the exchange chip by the microcontroller. And finishing the operation.
After the microcontroller completes the configuration operation of the exchange chip, the exchange chip is not configured any more, but the access authority of the exchange chip is transferred to the central processing unit, and the central processing unit accesses the exchange chip. Based on this, the microcontroller disconnects the connection with the exchange chip and connects the exchange chip with the central processing unit. The central processor is a main processor of the switch and is used for processing all the functional items of the switch.
In the embodiment of the invention, as soon as the switch is powered on, the microcontroller starts to configure the basic forwarding parameters to the switching chip, the microcontroller and the central processing unit of the switch are mutually independent, the microcontroller does not need to participate in the central processing unit of the switch for any operation of the switching chip, the basic forwarding parameter configuration of the switching chip is not needed to be obtained by running the SDK, and the basic forwarding parameters of the switching chip can be configured without waiting for a series of processes such as state judgment in the SDK, so that the quick start of the switching chip is realized.
And S350, when the switch is started, the central processing unit in the switch acquires the application software indication information provided by the operable device. Execution continues with S360.
And S360, the central processing unit searches the target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software. Execution continues with S370.
And S370, the central processing unit loads the target application software. Execution continues with S380.
Specifically, when the switch is started, the central processing unit is powered on first and completes initialization. Then, the central processor obtains the application software indication information provided by the operable device through the bootstrap program, and searches and loads the target application software.
It is noted that S310-S340 are performed sequentially, and S350-S370 are performed sequentially. S310-S340 and S350-S370 are performed independently without interference. Generally, because the initialization process of the microcontroller is faster than that of the central processing unit and the operating system and the application software do not need to be loaded, the microcontroller already releases the access right to the switching chip before the central processing unit loads the target application software. Then, the central processing unit continues to execute S380.
S380, the central processing unit obtains the access authority of the exchange chip and configures other parameters, except the basic forwarding parameters, required by the target application software into the exchange chip. And finishing the operation.
Optionally, after the central processing unit loads the application software, the application software configures other parameters except the basic forwarding parameter into the switch chip according to the configuration parameter requirement of the application software, that is, the switch chip is configured perfectly by the target application software.
Since the basic forwarding parameters are already configured in the switch chip, if the application software continues to configure the basic forwarding parameters in the switch chip, the configuration will be repeated, and network interruption will be caused. In order to solve the above problems, the configuration parameter requirements of the application software are changed, specifically, the basic forwarding parameter requirements are deleted or skipped in all the configuration parameter requirements, so that the application software does not configure the basic forwarding parameters any more, and only configures other parameters, thereby avoiding network interruption.
Optionally, if the central processing unit loads PTN application software, other parameters of the PTN application software include configuration parameters related to Multi-Protocol Label Switching (MPLS) service, and the like; if the central processing unit loads gateway application software, other parameters of the gateway application software comprise forwarding strategy configuration parameters and the like; if the central processor loads the switch application software, other parameters of the switch application software comprise routing configuration parameters, multicast configuration parameters and the like.
In the embodiment, a microcontroller with fast initialization is newly added into the switch, and after the microcontroller is initialized, the access authority of the switch chip is acquired, so that the switch chip is configured by the microcontroller with fast initialization; obtaining a basic forwarding parameter which is saved in advance; configuring the basic forwarding parameters into the exchange chip, releasing the access authority to the exchange chip, and thereby directly configuring the pre-stored forwarding parameters into the exchange chip without application software configuration, and without waiting for table lookup and application software loading processes; in addition, in the process of configuring the exchange chip by the microcontroller, the participation of the central processing unit is not needed, and the process of loading the application software by the central processing unit and the process of configuring the exchange chip by the microcontroller are simultaneously carried out, so that the rapid starting of the switch is further realized.
In some embodiments, the switch further comprises a bus connector, the bus connector connecting the microcontroller, the switch chip and the central processor, respectively. The microcontroller acquires and releases the bus control right by issuing bus control parameters to the bus connector.
Optionally, the microcontroller acquires an access right to the switch chip, including: the microcontroller issues a first bus control parameter to a bus connector connected with the microcontroller, wherein the first bus control parameter is used for controlling the bus connector to be connected with the microcontroller and the switching chip and disconnecting the central processing unit and the switching chip.
Correspondingly, the bus connector is used for connecting the microcontroller and the switching chip and disconnecting the central processor and the switching chip according to the first bus control parameter.
Optionally, the microcontroller releases the access right to the switch chip, including: and the microcontroller issues a second bus control parameter to the bus connector, wherein the second bus control parameter is used for controlling the bus connector to be connected with the central processing unit and the switching chip and disconnecting the microcontroller from the switching chip, so that the central processing unit acquires the access right to the switching chip.
It should be noted that the present embodiment implements access right control through the hardware of the configurable bus connector, but is not limited thereto. Any software and/or hardware method capable of implementing bus control is within the scope of the present embodiments.
It should be noted that, when the microcontroller configures the switch chip, the bus between the central processing unit and the switch chip is cut off, and at this time, the central processing unit is executing the reading, table look-up and application loading operations of the application indication information, and does not access the switch chip in the above process. The microcontroller takes approximately 2-3 seconds to complete the configuration of the switch chip. In most cases, the above process of the central processing unit is longer than the configuration process of the switch chip, and after 2-3 seconds, the central processing unit completes the loading operation of the application software, is connected with the switch chip through the bus connector, accesses the switch chip, and then continues to configure other parameters. Based on the above analysis, the central processor will not sense the operation of the bus connector and will not sense the connection or disconnection with the switch chip.
In the embodiment, a bus connector is added in the switch, and the microcontroller acquires and releases the access right by issuing bus control parameters to the bus connector, so that a bus basis is provided for the configuration of the switching chip by the microcontroller and the access of the central processing unit to the switching chip after the configuration is completed; meanwhile, the microcontroller and the central processing unit can independently operate the exchange chip in different time periods through the acquisition and the release of the access authority; further, the connection or disconnection of the central processing unit to or from the switch chip is not sensed, and therefore, the connection or disconnection to or from the switch chip has little effect on the central processing unit.
Example four
Fig. 4a is a schematic structural diagram of a switch according to a fourth embodiment of the present invention. As shown in fig. 4a, the switch comprises a central processor 41, an operational device 42 and a memory 43. The operation device 42 and the memory 43 are connected to the central processor 41, respectively.
The central processor 41 and memory may be mounted within the switch chassis 40. The manipulatable device 42 may be mounted on the chassis 40 of the switch or may be independent of the chassis 40 of the switch. The operable device 42 includes at least one of a switch device, a touch screen, a camera, and a voice recognition device for providing application indication information.
The memory 43 may mainly 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; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 43 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 non-volatile solid state storage device. In some examples, the memory 43 may further include memory located remotely from the central processor 41, which may be connected to the switch over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
A memory 43 for storing the software look-up table and one or more programs. The memory 43 is a computer-readable storage medium for storing software programs, computer-executable programs, and modules, and the central processing unit 41 executes various functional applications and data processing of the switch by executing the software programs, instructions, and modules stored in the memory 43, so as to implement the switch starting method.
Specifically, the central processor 41 is configured to obtain the application indication information provided by the operable device 42 when the switch is started; searching target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software; and loading the target application software.
In this embodiment, when the switch is started, the central processing unit 41 obtains the application software indication information provided by the operable device 42; in the pre-established information software comparison table, the target application software corresponding to the application software indication information is searched and the target application software is loaded, so that the application software needing to be loaded by the switch can be determined according to the application software indication information provided by the operable device 42.
Optionally, the operable means 42 comprises a switch arrangement comprising at least one gear position, fig. 4a showing 3 gear positions. When the central processor 41 obtains the application indication information provided by the operable device 42 at the time of starting the switch, the central processor is specifically configured to: when the switch is started, acquiring the current gear of the switching device; and searching target application software corresponding to the current gear in a pre-established information software comparison table.
Further, the switch further comprises: a prompting device 44, wherein the prompting device 44 is connected with the central processing unit 41 and is used for prompting the user to operate the switch device under the control of the central processing unit 41; and/or prompting the application software corresponding to the indication information of each application software to the user. Based on this, when the switch is started, the central processing unit 41 obtains the current gear of the switching device, and is specifically configured to: when the switch is started, if the gear of the switch device is reset, the central processing unit 41 controls the prompting device 44 to prompt the user to operate the switch device and/or prompt the user to the application software corresponding to the indication information of each application software; the shift position of the switching device is acquired again in response to the user's operation of the switching device.
Optionally, as shown in fig. 4b, the switch further includes a microcontroller 45 and a switch chip 46, and the switch chip 46 is connected to the microcontroller 45 and the central processor 41 respectively.
Optionally, a memory 49 is also connected to the microcontroller 45, and the memory 49 is used for storing basic forwarding parameters and one or more programs that are common to the respective application software. The memory 49 is a computer readable storage medium for storing software programs, computer executable programs and modules, and the microcontroller 45 executes various functional applications and data processing of the switch by running the software programs, instructions and modules stored in the memory 49, so as to implement the switch starting method.
The microcontroller 45 is used for initializing and acquiring the access right to the switching chip 46 when the switch is started; acquiring prestored basic forwarding parameters required by all application software; and configuring basic forwarding parameters into the switch chip 46; releasing access to the switch chip 46.
The central processor 41 is further configured to obtain access rights to the switch chip 46, and configure other parameters required by the target application software, except for the basic forwarding parameter, into the switch chip 46.
Optionally, as shown in fig. 4b, the switch further comprises a bus connector 47. The bus connector 47 is connected to the switching chip 46, the microcontroller 45 and the central processor 41, respectively.
The switch includes a switch board 50 and a base board 60, the switch board 50 being snapped onto the base board 60 by a connector 70. The switch board 50 is provided with a switch chip 46, a bus connector 47 and a microcontroller 45, and the bottom board 60 is provided with a central processing unit 41. For convenience of description and distinction, in fig. 4b, a bus between the microcontroller 45 and the central processor 41 is referred to as a bus 1, and a bus between the microcontroller 45 and the central processor 41 and the switch chip 46 is referred to as a bus 2.
Optionally, a network card interface 48 is further disposed on the bottom board 60, and the switching chip 46 is connected to the network card interface 48 through the bus 3.
The microcontroller 45 is configured to issue the first bus control parameter or the second bus control parameter to the bus connector 47.
A bus connector 47 for connecting the microcontroller 45 and the switch chip 46 and disconnecting the central processor 41 and the switch chip 46 according to a first bus control parameter; alternatively, the central processor 41 and the switch chip 46 are connected and the microcontroller 45 and the switch chip 46 are disconnected according to the second bus control parameter.
EXAMPLE five
Fifth, an embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program, which when executed by a central processing unit or a microcontroller, is configured to perform a switch startup method,
in particular, the computer program is configured to perform the methods provided in the first and second embodiments when executed by the central processing unit. The method comprises the following steps:
when the switch is started, acquiring application software indication information provided by an operable device;
searching target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software;
and loading the target application software.
Of course, the computer program provided by the embodiment of the present invention is not limited to the above method operations, and may also perform related operations in the switch starting method provided by any embodiment of the present invention. The computer program is used for executing the method provided by the fourth embodiment when being respectively executed by the central processing unit and the microcontroller. For details, it is not repeated here in the above embodiments.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (9)
1. A switch activation method, comprising:
when the switch is started, a central processing unit in the switch acquires application software indication information provided by an operable device;
the central processing unit searches target application software corresponding to the application software indication information in a pre-established information software comparison table, wherein the information software comparison table stores the corresponding relation between the application software indication information and the application software;
the central processing unit loads the target application software;
the operable device at least comprises one of a switch device, a touch screen, a camera and a voice recognition device;
when the operable device comprises at least two devices of a switch device, a touch screen, a camera and a voice recognition device, setting the priority of the device and preferentially acquiring the indication information of the application software provided by the device with higher priority; and if the application software indication information provided by the device with higher priority is not acquired, acquiring the application software indication information provided by the device with the second priority.
2. The method of claim 1, wherein the operable device comprises a switching device comprising at least one gear;
when the switch is started, the central processing unit in the switch acquires the application software indication information provided by the operable device, and the method comprises the following steps:
when the switch is started, the central processing unit acquires the current gear of the switching device;
correspondingly, the step of searching the target application software corresponding to the application software indication information in a pre-established information software comparison table by the central processor comprises the following steps:
and the central processor searches the target application software corresponding to the current gear in a pre-established information software comparison table.
3. The method of claim 2, wherein upon startup of the switch, a central processor in the switch obtains the gear of the switching device, comprising:
when the switch is started, if the gear of the switch device is reset, the central processing unit controls a prompting device to prompt a user to operate the switch device and/or prompt the user with application software corresponding to each application software indication information;
the central processor reacquires the shift position of the switching device in response to the user's operation of the switching device.
4. The method of claim 1, further comprising:
when the switch is started, a microcontroller in the switch initializes and acquires access authority to the switch chip;
the microcontroller acquires prestored basic forwarding parameters required by all application software; and
configuring the basic forwarding parameters into the switching chip;
the microcontroller releases the access right to the exchange chip.
5. The method of claim 4, after the central processor loads the target application software, further comprising:
and the central processing unit acquires the access right to the switching chip and configures other parameters except the basic forwarding parameter required by the target application software into the switching chip.
6. A switch, comprising: a central processing unit, an operable device and a memory;
the operable device and the memory are respectively connected with the central processing unit;
the memory is used for storing an information software comparison table and one or more programs;
when the one or more programs are executed by the central processor, causing the central processor to implement the switch application switching method of any of claims 1-3;
the operable device at least comprises one of a switch device, a touch screen, a camera and a voice recognition device; when the operable device comprises at least two devices of a switch device, a touch screen, a camera and a voice recognition device, setting the priority of the device and preferentially acquiring the indication information of the application software provided by the device with higher priority; and if the application software indication information provided by the device with higher priority is not acquired, acquiring the application software indication information provided by the device with the second priority.
7. The switch of claim 6, further comprising: the switching chip is respectively connected with the microcontroller and the central processing unit;
the microcontroller is used for initializing and acquiring the access authority of the exchange chip when the exchanger is started; acquiring prestored basic forwarding parameters required by all application software; and configuring the basic forwarding parameters into the switch chip; releasing access rights to the switch chip;
the central processing unit is further configured to obtain an access right to the switch chip, and configure other parameters, except the basic forwarding parameter, required by the target application software into the switch chip.
8. The switch according to claim 6, characterized in that it further comprises prompting means;
the prompting device is connected with the central processing unit and used for prompting a user to operate the switch device under the control of the central processing unit and/or prompting the user of the application software corresponding to the indication information of each application software.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a central processing unit or a microcontroller, implements the switch activation method according to any one of claims 1 to 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810681548.5A CN108897583B (en) | 2018-06-27 | 2018-06-27 | Switch starting method, switch and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810681548.5A CN108897583B (en) | 2018-06-27 | 2018-06-27 | Switch starting method, switch and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108897583A CN108897583A (en) | 2018-11-27 |
| CN108897583B true CN108897583B (en) | 2022-03-25 |
Family
ID=64346684
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810681548.5A Active CN108897583B (en) | 2018-06-27 | 2018-06-27 | Switch starting method, switch and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108897583B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109683968B (en) * | 2018-12-18 | 2022-03-29 | 北京东土军悦科技有限公司 | Switch quick start method, switch and storage medium |
| CN112532541B (en) * | 2019-09-19 | 2023-04-07 | 恒为科技(上海)股份有限公司 | Method and device for starting switch |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101123507A (en) * | 2007-10-08 | 2008-02-13 | 杭州华三通信技术有限公司 | Method for protecting data information on storage device and storage device |
| US20120143990A1 (en) * | 2004-12-30 | 2012-06-07 | Nimrod Diamant | Virtual serial port and protocol for use in serial-over-lan communication |
| CN102968351A (en) * | 2012-12-13 | 2013-03-13 | 中国航空无线电电子研究所 | External control method for BIT parameters |
| CN103631591A (en) * | 2013-11-29 | 2014-03-12 | 中国航空无线电电子研究所 | Software operation control system and method meeting civil-aircraft different software grade requirements |
| CN105337749A (en) * | 2014-06-24 | 2016-02-17 | 华为技术有限公司 | Method for configuring network device, optical module, and network device system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102279828A (en) * | 2011-07-25 | 2011-12-14 | 中兴通讯股份有限公司 | Control device and method for converting PCI (programmable communication interface) to Flash interface |
| US20160364231A1 (en) * | 2015-06-10 | 2016-12-15 | Telefonaktiebolaget L M Ericsson (Publ) | Method for minimal service impact during software upgrade in network elements (nes) |
-
2018
- 2018-06-27 CN CN201810681548.5A patent/CN108897583B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120143990A1 (en) * | 2004-12-30 | 2012-06-07 | Nimrod Diamant | Virtual serial port and protocol for use in serial-over-lan communication |
| CN101123507A (en) * | 2007-10-08 | 2008-02-13 | 杭州华三通信技术有限公司 | Method for protecting data information on storage device and storage device |
| CN102968351A (en) * | 2012-12-13 | 2013-03-13 | 中国航空无线电电子研究所 | External control method for BIT parameters |
| CN103631591A (en) * | 2013-11-29 | 2014-03-12 | 中国航空无线电电子研究所 | Software operation control system and method meeting civil-aircraft different software grade requirements |
| CN105337749A (en) * | 2014-06-24 | 2016-02-17 | 华为技术有限公司 | Method for configuring network device, optical module, and network device system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108897583A (en) | 2018-11-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10831470B2 (en) | Simulating a topology of network elements | |
| CN108897583B (en) | Switch starting method, switch and storage medium | |
| US10454817B2 (en) | Method and device for processing GR of openflow switch, and openflow controller | |
| CN101867468B (en) | Hot reboot processing method for power over Ethernet switch and power over Ethernet switch | |
| CN111277505B (en) | Multi-terminal joint control method, device, equipment and storage medium based on local area network | |
| CN108924064B (en) | Switch quick start method, switch and medium | |
| CN103702158A (en) | Integrated control method for display system and display device | |
| CN111163469A (en) | Network distribution method of intelligent household appliance, wireless module and intelligent household appliance | |
| WO2019237227A1 (en) | Control method, host, slave, mobile terminal, and control system | |
| CN112187303B (en) | SIM card expansion equipment, SIM card switching method and device | |
| CN110459260B (en) | Automatic test switching device, method and system | |
| CN104158709B (en) | A kind of optical module knows method for distinguishing and ports-Extending equipment | |
| CN114816692B (en) | Screen projection display method, device, mobile terminal and storage medium | |
| CN106211251A (en) | Method and device for adjusting terminal access mode | |
| CN110086676B (en) | Configuration method of distributed router and related equipment | |
| WO2025081805A1 (en) | Network configuration method and apparatus for intelligent device, device, and medium | |
| CN114867056B (en) | Data processing method, device and computer equipment | |
| US20170134225A1 (en) | Network apparatus for temporarily accessing network setting and method using thereof | |
| CN117201296A (en) | Multi-network card management method and device, intelligent gateway and storage medium | |
| US10374874B2 (en) | Reducing data plane disruption in a virtual switch | |
| CN106406109B (en) | Household electrical appliance and its match network method and network distribution device | |
| CN112532541B (en) | Method and device for starting switch | |
| JP2013222397A (en) | Microcomputer, and terminal sharing method for reset terminal | |
| CN110489169B (en) | Quick starting method for memory of system on chip | |
| WO2016062065A1 (en) | Switching method and device for customer premises equipment (cpe) operating manner |
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 |