Equipment configuration method and related equipment thereof
By determining the target virtual slot in the central device and obtaining satellite device configuration information, the problem of inefficient equipment configuration management is solved, and fast and efficient equipment configuration management is achieved.
Patent Information
- Application Number
- CN202311635992.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the configuration management of the equipment is inefficient, and multiple configuration and writing of equipment in the empty distribution state requires excessive processing time.
By determining the target virtual slot in the central device and establishing a chain of construction with the target device, satellite device configuration information is obtained and sent to the target device, so that configuration information is directly loaded after soft restart.
Avoid multiple configuration flushing, reduce configuration processing time, and improve configuration management efficiency.
Smart Images

Figure CN120074622A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication computers, and in particular, to a device configuration method and related devices thereof. Background Art
[0002] In the process of a central device processing services, usually a network device serves as a satellite device of the central device (the network device can be regarded as a peripheral processing device of the central device). That is to say, this makes the configuration of the satellite device particularly important when the central device expands its service functions.
[0003] In the related art, after the slots of the central device's board cards are full, the network device can be used as a service board card of the central device to expand the service functions of the central device. However, during the process of an ordinary device becoming a satellite device and the satellite device becoming an ordinary device after being decommissioned, it is necessary to perform configuration writing on the device in the empty configuration state multiple times, and the processing duration of the configuration is too long, resulting in low configuration management efficiency.
[0004] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a device configuration method, aiming to solve the technical problem of low configuration management efficiency of devices in the related art.
[0006] To achieve the above purpose, this application provides a device configuration method, which is applied to a central device. The device configuration method includes:
[0007] In response to the expansion requirement of service processing capabilities, determine a target virtual slot for accessing a target device, and establish a connection with the target device. The target device is a satellite device used to cooperate with the central device to process services;
[0008] In response to the completion of the connection with the target device, obtain satellite device configuration information corresponding to the target virtual slot in the central device;
[0009] Send the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart.
[0010] In addition, to achieve the above purpose, this application also provides a device configuration method, which is applied to a network device. The device configuration method includes:
[0011] In response to the establishment of a connection with a central device, access the target virtual slot of the central device, and save the current configuration file of the network device to the network device;
[0012] Receive the satellite device configuration information sent by the central device, and erase the entries of relevant chips, so as to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0013] To achieve the above object, the present application provides a device configuration apparatus, which is applied to a central device. The device configuration apparatus includes:
[0014] A first response module, configured to determine a target virtual slot for accessing a target device in response to an expansion requirement of service processing capabilities, and establish a connection with the target device, where the target device is a satellite device for cooperating with the central device to process services;
[0015] A second response module, configured to obtain satellite device configuration information corresponding to the target virtual slot in the central device in response to the completion of the connection establishment with the target device;
[0016] A sending module, configured to send the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart.
[0017] In addition, to achieve the above object, the present application further provides a device configuration apparatus, which is applied to a network device. The device configuration apparatus includes:
[0018] A third response module, configured to access the target virtual slot of the central device in response to the establishment of a connection with the central device, and save the current configuration file of the network device to the network device;
[0019] A receiving module, configured to receive the satellite device configuration information sent by the central device, and erase the entries of relevant chips, so as to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0020] In addition, to achieve the above object, the present application further provides a device configuration system, which includes a central device and a network device. Among them,
[0021] The central device is configured to determine a target virtual slot for accessing a target device in response to an expansion requirement of service processing capabilities, and establish a connection with the target device; and is further configured to obtain satellite device configuration information corresponding to the target virtual slot in the central device in response to the completion of the connection establishment with the target device, and send the satellite device configuration information to the target device;
[0022] The network device is used to respond to the establishment of a link with the central device, access the target virtual slot of the central device, and save the current configuration file of the network device into the network device; it is also used to receive the satellite device configuration information sent by the central device, and perform table item erasure on relevant chips, so as to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0023] In addition, to achieve the above object, the present application also provides a device configuration device, which includes: a memory, a processor, and the above device configuration program stored on the memory and executable on the processor, and the device configuration program is configured to implement the steps of the device configuration method as described above.
[0024] In addition, to achieve the above object, the present application also provides a storage medium, on which a device configuration program is stored, and when the device configuration program is executed by a processor, it implements the steps of the device configuration method as described above.
[0025] In the related art, during the process of configuring a target device, it is necessary to repeatedly brush the configuration of the device multiple times, resulting in low configuration management efficiency. It can be understood that in the embodiments of the present application, when the business processing capacity needs to be expanded, first determine the target virtual slot for accessing the target device (the satellite device that cooperates with the central device to process business), then establish a link with the target device, and then obtain the satellite device configuration information corresponding to the target virtual slot in the central device (determine the corresponding satellite device configuration information through the target virtual slot instead of obtaining the satellite device configuration information in the target device), and send the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart instead of a full device restart. That is, in the embodiments of the present application, when accessing the central device, the satellite device can be configured accordingly according to the configuration of the central device through the target virtual slot, so that there is no need to locally save the relevant configuration information in the satellite device. Therefore, it is avoided to repeatedly brush the configuration of the satellite device multiple times, and in the present application, the target device is soft restarted, which avoids the long processing time of the configuration and improves the configuration management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic flowchart of the first embodiment of the device configuration method of the present application;
[0027] Figure 2 It is a schematic flowchart in the second embodiment of the device configuration method of the present application;
[0028] Figure 3It is a schematic flowchart of the third embodiment of the device configuration method of the present application;
[0029] Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application;
[0030] Figure 5 It is the overall framework diagram of the device configuration system involved in the present application;
[0031] Figure 6 It is a schematic diagram of the scenario of the link between the central device and the target device of the present application;
[0032] Figure 7 It is a schematic diagram of the scenario of the disconnection between the central device and the target device of the present application;
[0033] Figure 8 It is a structural block diagram involved in the present application. Specific embodiments
[0034] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] The embodiment of the present application provides a device configuration method. In an embodiment of the device configuration method of the present application, with reference to Figure 1 , the method includes:
[0036] Step S10: In response to the expansion requirement of the service processing capacity, determine the target virtual slot for accessing the target device, and establish a link with the target device, where the target device is a satellite device used to cooperate with the central device to process services;
[0037] It should be noted that the execution subject of the method in this embodiment is the central device.
[0038] It can be understood that the central device can process various types of services. During the process of the central device processing services, if it is necessary to expand the service processing capacity (after the slots of the central device's board cards are full, and at this time, if it is still necessary to expand the service processing capacity), a network device can be used as a service board card of the central device to expand the service function or service processing capacity of the central device. Among them, multiple network devices can be used as the service board cards of the central device to expand the service function or service processing capacity of the central device.
[0039] When using one or more network devices as a service board card of the central device to expand the service function or service processing capacity of the central device, usually the network device acts as the role of a satellite device of the central device.
[0040] Specifically, when the central device receives the expansion requirement or request for the service processing capacity sent by the user terminal, if the slots of the boards of the central device are already full, at this time, when the central device determines that the service processing capacity still needs to be expanded, it responds to the expansion requirement for the service processing capacity.
[0041] It should be noted that virtual slots are set in the central device. The virtual slots can be one or more. It can be understood that after the central device responds to the expansion requirement for the service processing capacity, it is necessary to determine the target virtual slots (which can be multiple, determined according to the expansion requirement) for accessing the target device. For example, after the central device responds to the expansion requirement for the service processing capacity, it determines that the target virtual slot for accessing the target device from 5 virtual slots is the 3rd slot, or after the central device responds to the expansion requirement for the service processing capacity, it determines that the target virtual slots for accessing the target device from 5 virtual slots are the 3rd slot and the 4th slot.
[0042] In this application, after determining the target virtual slots for accessing the target device, a link is established with the target device. It can be understood that the central device needs to determine the target virtual slots before it can establish a link with the target device.
[0043] Among them, establishing a link with the target device includes:
[0044] Sending a link establishment request to the target device, and completing the link establishment with the target device when receiving the link establishment information fed back by the target device.
[0045] That is to say, in this embodiment, the central device first selects the target device that needs to become a satellite device, and then initiates a link establishment connection for the satellite device to the target device that needs to become a satellite device (sending a link establishment request to the target device). The target device receives the link establishment connection initiated by the central device and feeds back the link establishment request (such as feeding back receipt or agreeing to the link establishment request). If the central device receives the link establishment information fed back by the target device, it completes the link establishment or successfully establishes a link with the target device.
[0046] It should be noted that the target device is a satellite device used to cooperate with the central device to process services. Among them, the target device can specifically be a router or a switch.
[0047] In this embodiment, establishing a link with the target device includes:
[0048] Determining the device in the redundant state as the target device, and establishing a link with the target device; among them, the device in the redundant state includes the device in the redundant network, the device that is redundant itself, or the device with redundant ports.
[0049] In this embodiment, it should be noted that the device in the redundant state (including the devices in the redundant network, the devices with built-in redundancy, or the devices with redundant ports) is determined as the target device instead of randomly selecting a device as the target device, and a link is established with the target device. This can facilitate network maintenance. Moreover, since the device in the redundant state is determined as the target device instead of a busy device, the impact on network traffic is also small.
[0050] As an example, the process of determining the device in the redundant state as the target device can be as follows: The central device first searches for the redundant network on the existing network. If there is no redundant network, then it determines whether there are devices with built-in redundancy that are not in the working state on the existing network. If all devices are in the working state, it continues to search for whether there are devices with ports that are not in the working state, and looks for devices with redundant ports.
[0051] As an example, in this embodiment, the central device preferentially uses the devices in the redundant state in the redundant network to reduce the impact on the network traffic and the processing capabilities of other devices in the existing network.
[0052] Step S20, in response to completing the link establishment with the target device, obtain the satellite device configuration information corresponding to the target virtual slot in the central device;
[0053] In this embodiment, it should be noted that after the central device establishes a link with the target device, if the link establishment between the target device and the central device is completed or the link establishment is successful (in the case of receiving the link establishment information feedback from the target device), then obtain the satellite device configuration information corresponding to the target virtual slot in the central device.
[0054] It can be understood that in this embodiment, the satellite device configuration information corresponding to the target virtual slot is pre-stored in the central device. Therefore, it can be directly obtained. Or if the satellite device configuration information corresponding to the target virtual slot is not pre-stored in the central device, then generate the corresponding satellite device configuration information first, and then obtain it.
[0055] It can be understood that the target device obtains the satellite device configuration information corresponding to the target virtual slot in the central device, rather than the target device such as a router or a switch locally storing the satellite device configuration information. That is, when the target device accesses the central device, it can perform corresponding configurations according to the configuration of the satellite device by the central device. Therefore, it avoids multiple configuration rewrites of the satellite device (no need to save, so there is no need for multiple repeated configuration rewrites), and in this application, the target device is soft restarted, which avoids too long processing time for configuration and improves the management efficiency of configuration.
[0056] In this embodiment, it should be noted that the target device directly loads the satellite device configuration information after a soft restart. Here, a soft restart means that the device does not perform a full restart, but only restarts the software part of the CPU and erases the entries on the chip (or restarts the chip). The soft restart speed is much faster than a direct device restart, thereby improving the device configuration efficiency.
[0057] Among them, obtaining the satellite device configuration information corresponding to the target virtual slot in the central device includes:
[0058] Based on the target virtual slot and a preset correspondence, obtain the satellite device configuration information corresponding to the target virtual slot. The preset correspondence is stored in the central device and is used to represent the correspondence between each virtual slot and the satellite device configuration information.
[0059] It can be understood that in this embodiment, the central device pre-stores the correspondence representing the relationship between each virtual slot and the satellite device configuration information. Therefore, after determining the target virtual slot, based on the target virtual slot and the preset correspondence, obtain the satellite device configuration information corresponding to the target virtual slot.
[0060] For example, as Figure 6 shown, there are existing central device 1, virtual slot 1, satellite device configuration information 1, and target device 1.
[0061] After target device 1 is connected to virtual slot 1 of central device 1, central device 1 searches for the satellite device configuration information 1 corresponding to virtual slot 1 based on virtual slot 1 and the correspondence.
[0062] It should be noted that the central device has already saved and will save the correspondence between the virtual slot number and the corresponding satellite device configuration information.
[0063] For example, the central device saves the satellite device configuration information 1 corresponding to virtual slot 1 and saves the satellite device configuration information 2 corresponding to virtual slot 2. If a certain target device starts to establish a link with the central device through virtual slot 1, the configuration information corresponding to this target device is satellite device configuration information 1. If the same target device establishes a link with the central device through virtual slot 2, the configuration information corresponding to this target device is satellite device configuration information 2.
[0064] Among them, in this embodiment, the central device can save the above correspondence in a configuration file.
[0065] Among them, after obtaining the satellite device configuration information corresponding to the target virtual slot in the central device, the method further includes:
[0066] In the case that the satellite device configuration information corresponding to the target virtual slot cannot be successfully obtained in the central device, configure the target device, and generate the satellite device configuration information after the configuration is completed;
[0067] Save the correspondence between the satellite device configuration information and the target virtual slot in the central device, so that other devices accessing the target virtual slot can obtain the satellite device configuration information corresponding to the target virtual slot based on the correspondence.
[0068] In this embodiment, in the case that the satellite device configuration information corresponding to the target virtual slot cannot be successfully obtained in the central device, at this time, the satellite device configuration information has not been saved (the satellite device corresponding to the target virtual slot of the central device goes online for the first time or for the first instance), thus, the central device needs to configure the target device. After the configuration is completed, generate and save the satellite device configuration information (automatically save or save based on the user's instruction). It should be noted that when saving, not only the satellite device configuration information is saved, but also the correspondence (satellite device configuration information and corresponding virtual slot) is saved, so as to directly obtain the satellite device configuration information during the subsequent use of the satellite device by the central device.
[0069] Step S30: Send the satellite device configuration information to the target device, so that the target device can directly load the satellite device configuration information after a soft restart.
[0070] In this embodiment, the central device sends the satellite device configuration information to the target device, so that the target device can directly load the satellite device configuration information after a soft restart. Specifically, after the central device obtains the satellite device configuration information 1, it then transmits the satellite device configuration information 1 to the target device 1, so that the target device 1 can perform corresponding configurations based on the satellite device configuration information 1.
[0071] In this embodiment, the central device can directly configure the target device through a network management station, a software-defined network (SDN) controller, or the central device itself.
[0072] In this embodiment, the target device pulls its own configuration information from the central device, and then directly performs a soft restart on the device to quickly erase the entries on the original device, achieving the effect of quickly switching the device role.
[0073] The following provides an overall embodiment:
[0074] 1. In response to the expansion requirement of the service processing capacity, the central device determines the target virtual slot for accessing the target device, and initiates a link establishment connection to a target device that needs to become a satellite device;
[0075] 2. The target device responds to the link establishment request from the central device and completes the link establishment with the central device.
[0076] 4. The central device finds the corresponding satellite device configuration information according to the virtual slot number accessed by the target device and pushes it to the target device.
[0077] 5. The target device obtains the satellite device configuration information, performs a soft restart on its CPU, and erases the chip table entries. After the CPU soft restart and chip restart or chip table entry erasure are completed, the configuration of the target device is completed.
[0078] In the related art, during the process of configuring the target device, the device configuration needs to be rewritten multiple times, resulting in low configuration management efficiency. It can be understood that in this application, when the business processing capacity needs to be expanded, first determine the target virtual slot for accessing the target device (the satellite device that cooperates with the central device to process business), then establish a link with the target device, and then obtain the satellite device configuration information corresponding to the target virtual slot in the central device (instead of obtaining this satellite device configuration information in the target device), and send the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart instead of a full device restart. That is, in this application, when accessing the central device, the satellite device can be configured according to the configuration of the central device through the target virtual slot, so there is no need to locally store the relevant configuration information in the satellite device. Therefore, it is possible to avoid multiple rewrites of the satellite device configuration, and in this application, the target device performs a soft restart, which avoids too long processing time for the configuration and improves the configuration management efficiency.
[0079] An embodiment of the present application provides a device configuration method. In an embodiment of the device configuration method of the present application, refer to Figure 2 , after sending the satellite device configuration information to the target device, it includes:
[0080] Step S40, in response to a target event, obtain the current target satellite device configuration information of the target device, where the target event includes one of the following:
[0081] Disconnect from the target device;
[0082] At every predetermined time interval;
[0083] Receive a target instruction;
[0084] Step S50, update the satellite device configuration information corresponding to the target virtual slot according to the target satellite device configuration information.
[0085] In this embodiment, in response to a target event, the current target satellite device configuration information of the target device is obtained, where the target event includes any one of disconnecting from the target device, receiving a target instruction at every predetermined time interval; specifically, if the central device disconnects from the target device (including passive disconnection and active disconnection), the current target satellite device configuration information of the target device is obtained and saved, that is, the satellite device configuration information corresponding to the target virtual slot is updated according to the target satellite device configuration information; the purpose of updating the satellite device configuration information corresponding to the target virtual slot or saving is: in case the central device forms a satellite device relationship with this target device or other devices next time, the satellite device configuration information can be directly used instead of reconfiguring the corresponding device again. Among them, active disconnection means that the central device initiates the disconnection of the link with the target satellite device, and passive disconnection means an abnormal situation of link interruption. When the central device actively disconnects, the target device is restored from the state of a satellite device to the state of an ordinary device. In case of an abnormal situation of link interruption, the target device still maintains the state of a satellite device).
[0086] In this embodiment, the current target satellite device configuration information of the target device is also obtained and saved at every predetermined time interval (such as every 10S or 1 minute), and the satellite device configuration information corresponding to the target virtual slot is updated according to the target satellite device configuration information.
[0087] It can be understood that in this embodiment, the current target satellite device configuration information of the target device is also obtained according to a target instruction such as a user's update instruction (to meet the update requirements in actual application scenarios or special application scenarios), and the satellite device configuration information corresponding to the target virtual slot is updated according to the target satellite device configuration information.
[0088] Among them, in the case where the target event is disconnecting from the target device, before obtaining the current target satellite device configuration information of the target device in response to the target event, it includes:
[0089] In the case where the cooperation of the target device in business processing is not required, a disconnection message is sent to the target device to disconnect from the target device.
[0090] In this embodiment, when the central device receives a request that does not require the cooperation of the target device in business processing, and the central device is in a situation where the cooperation of the target device in business processing is not required, at this time, a disconnection message is sent to the target device to disconnect from the target device.
[0091] The following provides a specific embodiment:
[0092] 1. The central device initiates the disconnection of the link with the target satellite device.
[0093] 2. The central device obtains the current target satellite device configuration information of the target device; and updates the satellite device configuration information corresponding to the target virtual slot according to the target satellite device configuration information.
[0094] 3. The target device no longer serves as a satellite device of the central device, and its CPU is controlled to perform a soft restart, a chip restart, or a chip entry erasure, etc.
[0095] 4. After the target device is soft restarted, it loads the originally saved configuration information of the target device and resumes the role state of an ordinary device.
[0096] For example, as Figure 7 shown, there are an existing central device 2, satellite device configuration information 2, virtual slot 2, target device 2, and the configuration information locally stored in the target device.
[0097] Specifically, the central device initiates the disconnection of the link with the target satellite device. The central device 2 saves the satellite device configuration information 2 currently used by the target device 2 in the corresponding relationship associated with the virtual slot 2 (representing the association relationship between the virtual slot 2 and the satellite device configuration information 2). The target device 2 no longer serves as a satellite device of the central device, and its CPU is controlled to perform a soft restart, a chip restart, or a chip entry erasure, etc. After the target device is soft restarted, it loads the originally saved configuration information of the target device and resumes the role state of an ordinary device.
[0098] In this embodiment, in response to a target event, the current target satellite device configuration information of the target device is obtained, where the target event includes one of the following: disconnection from the target device; at every predetermined time interval; receiving a target instruction; and updating the satellite device configuration information corresponding to the target virtual slot according to the target satellite device configuration information. In this application, when the target event occurs, the satellite device configuration information corresponding to the target virtual slot is updated according to the target satellite device configuration information for the direct configuration of subsequent other satellite devices, improving the configuration speed.
[0099] An embodiment of the present application provides a device configuration method. In an embodiment of the device configuration method of this application, referring to Figure 3 , it is applied to a network device, and the device configuration method includes:
[0100] Step A1, in response to establishing a link with a central device, access the target virtual slot of the central device, and save the current configuration file of the network device to the network device.
[0101] Step A2: Receive the satellite device configuration information sent by the central device, and erase the entries of the relevant chips, so as to load the satellite device configuration information after a soft restart. The satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0102] It should be noted that the execution subject of the method in this embodiment is a network device, and the network device is a device in a redundant state, specifically, it can be a device in a redundant network, a device with its own redundancy, or a device with redundant ports.
[0103] If the network device receives a link establishment request sent by the central device, in response to establishing a link with the central device, it accesses the target virtual slot of the central device and saves the current configuration file of the network device to the memory of the network device.
[0104] In this embodiment, after the network device saves its current configuration file to the memory of the network device, it receives the satellite device configuration information sent by the network management station, SDN controller or directly by the central device, and erases the entries of the relevant chips, so as to load the satellite device configuration information after a soft restart. The satellite device configuration information corresponds to the target virtual slot and is stored on the central device (the same as the above-mentioned first and second embodiments, not elaborated here).
[0105] After loading the satellite device configuration information after a soft restart, it further includes:
[0106] In response to the disconnection information sent by the central device, and erase the entries of the relevant chips, so as to load the current configuration file saved in the memory after a soft restart.
[0107] In this embodiment, if the network device receives the disconnection information sent by the central device, it erases the entries of the relevant chips, so as to load the current configuration file saved in the memory after a soft restart.
[0108] The following provides a specific embodiment:
[0109] 1. The central device 2 sends a satellite device disconnection message to the network device 2.
[0110] 2. The network device 2 receives the satellite device disconnection message from the central device, and the device role needs to become a normal device.
[0111] 3. The network device 2 performs a soft restart operation (including CPU restart and clearing the chip entries).
[0112] 4. After the soft restart is completed, the network device 2 acts as a normal device and is configured using the current configuration file saved on the network device 2 itself, completing all configuration operations for the normal device.
[0113] In this application, the network device responds to the establishment of a link with the central device, accesses the target virtual slot of the central device, and saves the current configuration file of the network device to the network device; receives the satellite device configuration information sent by the central device, and erases the entries of the relevant chips to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device, responds to the disconnection information sent by the central device, and erases the entries of the relevant chips to load the current configuration file saved in the memory after a soft restart.
[0114] It can be understood that in this application, when accessing the central device, corresponding configurations can be made according to the satellite device configuration information of the central device, and when removed from the central device, it reverts to loading the current configuration file saved in its own memory. That is, in this application, when a router or switch device acts as a satellite device of the central device, it can quickly obtain the relevant configurations of the satellite device, and can restore the original configuration when removed, avoiding multiple configuration rewrites of the device. At the same time, since it is a soft restart during configuration, the processing duration of the configuration can be reduced, effectively improving the network management efficiency.
[0115] In this embodiment, an overall embodiment is also provided: as Figure 5 shown: There is a central device, and virtual slot 1 of this central device is connected to network device 1, and virtual slot 2 is connected to network device 2;
[0116] The steps for network device 1 to become a satellite device can be:
[0117] 1. The central device initiates a satellite device connection establishment request to network device 1;
[0118] 2. Network device 1 receives the connection establishment request from the central device, starts to establish a link with the central device, and saves the existing configuration of network device 1 to the configuration file (memory) of device 1;
[0119] 3. The central device and network device 1 complete the satellite device connection establishment, and network device 1 is connected as a satellite device to virtual slot 1 of the central device;
[0120] 4. The central device finds the satellite device configuration information 1 through virtual slot 1 and pushes it to network device 1.
[0121] 5. The network device 1 receives the satellite device configuration information 1 and performs a soft restart operation (restart the CPU, clear the chip entries, or restart the chip).
[0122] 6. The network device 1 becomes a satellite device and uses the satellite device configuration information 1 to perform device configuration, completing all configuration operations of the satellite device.
[0123] Steps for the network device 2 to disconnect from the satellite device:
[0124] 1. The central device saves the current configuration information of the network device 2 (saved corresponding to the virtual slot 2 of the network device 2).
[0125] 2. The central device sends a satellite device link release message to the network device 2;
[0126] 3. When the network device 2 receives the satellite device release message from the central device, its device role becomes a normal device;
[0127] 4. The network device 2 performs a soft restart operation (restart the CPU, clear the chip entries, or restart the chip);
[0128] 5. After the network device 2 completes the soft restart, the role of the network device 2 is a normal device, and it uses the configuration file saved on the device 2 itself for configuration, completing all configuration operations of the normal device.
[0129] Refer to Figure 4 , Figure 4 which is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
[0130] As Figure 4 shown, the device configuration device may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement the connection and communication between the processor 1001 and the memory 1005.
[0131] Optionally, the device configuration device may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, sensors, a WiFi module, etc. The user interface may include a display screen (Display), an input sub-module such as a keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. The network interface may include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0132] Those skilled in the art can understand that Figure 4 the device configuration device structure shown in
[0133] As shown Figure 4 in FIG. 1, the memory 1005 as a storage medium may include an operating system, a network communication module, and a device configuration program. The operating system is a program for managing and controlling the hardware and software resources of the device configuration device, and supports the operation of the device configuration program and other software and / or programs. The network communication module is used to implement the communication between each camera inside the memory 1005, and the communication between other hardware and software in the device.
[0134] In Figure 4 the device configuration device shown in FIG. 2, the processor 1001 is used to execute the device configuration program stored in the memory 1005 to implement the steps of the device configuration method described in any one of the above.
[0135] The specific implementation manner of the device configuration device of the present application is basically the same as that of each embodiment of the above device configuration method, and will not be described in detail here.
[0136] The present application also provides a device configuration device applied to a central device. Referring to Figure 8 FIG. 3, the device configuration device includes:
[0137] A first response module 10, configured to determine a target virtual slot for accessing a target device in response to an expansion requirement of service processing capabilities, and establish a link with the target device, where the target device is a satellite device for cooperating with the central device to process services;
[0138] A second response module 20, configured to obtain satellite device configuration information corresponding to the target virtual slot in the central device in response to the completion of the link establishment with the target device;
[0139] A distribution module 30, configured to distribute the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart.
[0140] In a possible implementation manner of the present application, the second response module is configured to implement:
[0141] Based on the target virtual slot and a preset correspondence relationship, obtain satellite device configuration information corresponding to the target virtual slot, where the preset correspondence relationship is stored in the central device and is used to represent the correspondence relationship between each virtual slot and the satellite device configuration information.
[0142] In a possible implementation manner of the present application, the device is configured to implement:
[0143] In the case where the satellite device configuration information corresponding to the target virtual slot cannot be successfully obtained in the central device, configure the target device, and generate the satellite device configuration information after the configuration is completed;
[0144] Save the correspondence between the satellite device configuration information and the target virtual slot in the central device, so that other devices accessing the target virtual slot can obtain the satellite device configuration information corresponding to the target virtual slot based on the correspondence.
[0145] In a possible implementation manner of the present application, the device is used to implement:
[0146] In response to a target event, obtain the current target satellite device configuration information of the target device, where the target event includes one of the following:
[0147] Disconnect from the target device;
[0148] At every predetermined time interval;
[0149] Receive a target instruction;
[0150] Update the satellite device configuration information corresponding to the target virtual slot according to the target satellite device configuration information.
[0151] In a possible implementation manner of the present application, the device is used to implement:
[0152] In the case where the cooperation of the target device in business processing is not required, send a disconnection message to the target device to disconnect from the target device.
[0153] In a possible implementation manner of the present application, the first response module is used to implement:
[0154] Determine the device in the redundant state as the target device, and establish a link with the target device; where the devices in the redundant state include devices in the redundant network, devices with their own redundancy, or devices with redundant ports.
[0155] In a possible implementation manner of the present application, when the target event is to disconnect from the target device, the first response module is used to implement:
[0156] Send a link establishment request to the target device, and complete the link establishment with the target device when the link establishment information feedback by the target device is received.
[0157] The specific implementation manners of the device configuration device in the present application are basically the same as those of the above-mentioned device configuration method embodiments, and will not be elaborated here.
[0158] The present application also provides a device configuration apparatus, which is applied to a network device. The device configuration apparatus includes:
[0159] A third response module, configured to respond to the establishment of a link with a central device, access a target virtual slot of the central device, and save the current configuration file of the network device into the network device;
[0160] A receiving module, configured to receive satellite device configuration information sent by the central device, and perform entry erasure on relevant chips, so as to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0161] In a possible implementation manner of the present application, the device configuration apparatus is further configured to implement:
[0162] Respond to disconnection information sent by the central device, and perform entry erasure on relevant chips, so as to load the current configuration file saved in the memory after a soft restart.
[0163] The embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to be used to implement the steps of the device configuration method described in any one of the above.
[0164] The specific implementation manner of the storage medium of the present application is basically the same as that of each embodiment of the above device configuration method, and will not be described in detail here.
[0165] The embodiment of the present application provides a device configuration system. The device configuration system includes:
[0166] The device configuration system includes a central device and a network device, where
[0167] The central device is configured to respond to the expansion requirement of service processing capability, determine a target virtual slot for accessing a target device, and establish a link with the target device; and is further configured to respond to the completion of the link establishment with the target device, obtain satellite device configuration information corresponding to the target virtual slot in the central device, and send the satellite device configuration information to the target device;
[0168] The network device is used to access the target virtual slot of the central device in response to establishing a link with the central device, and save the current configuration file of the network device into the network device; it is also used to receive the satellite device configuration information sent by the central device, and erase the entries of relevant chips, so as to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
[0169] The specific implementation manner of the device configuration system in this application is basically the same as that of each embodiment of the above device configuration method, and will not be repeated here.
[0170] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above device configuration method are implemented.
[0171] The specific implementation manner of the computer program product in this application is basically the same as that of each embodiment of the above device configuration method, and will not be repeated here.
[0172] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.
[0173] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0174] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of a software plus hardware platform, or can be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes contributions to the related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0175] The above are only the preferred embodiments of the present invention, and do not limit the scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, is equally included in the protection scope of the present invention.
Claims
1. A device configuration method, applied to a central device, the device configuration method comprises: In response to the expansion requirement of service processing capabilities, determining a target virtual slot for accessing a target device, and establishing a link with the target device, where the target device is a satellite device for cooperating with the central device to process services; In response to completing the link establishment with the target device, obtaining satellite device configuration information corresponding to the target virtual slot in the central device; Sending the satellite device configuration information to the target device for the target device to directly load the satellite device configuration information after a soft restart.
2. The device configuration method according to claim 1, wherein, the obtaining satellite device configuration information corresponding to the target virtual slot in the central device includes: Based on the target virtual slot and a preset correspondence, obtaining satellite device configuration information corresponding to the target virtual slot, where the preset correspondence is stored in the central device and is used to represent the correspondence between each virtual slot and satellite device configuration information.
3. The device configuration method according to claim 1, wherein, after obtaining satellite device configuration information corresponding to the target virtual slot in the central device, the method further includes: In the case where satellite device configuration information corresponding to the target virtual slot cannot be successfully obtained in the central device, configuring the target device and generating the satellite device configuration information after the configuration is completed; Saving the correspondence between the satellite device configuration information and the target virtual slot in the central device for other devices accessing the target virtual slot to obtain satellite device configuration information corresponding to the target virtual slot based on the correspondence.
4. The device configuration method according to claim 1, wherein, after sending the satellite device configuration information to the target device, it includes: In response to a target event, obtaining current target satellite device configuration information of the target device, where the target event includes one of the following: Disconnecting from the target device; Every predetermined time interval; Receiving a target instruction; Updating the satellite device configuration information corresponding to the target virtual slot according to the target satellite device configuration information.
5. The device configuration method according to claim 4, wherein, in the case where the target event is disconnecting from the target device, before the obtaining current target satellite device configuration information of the target device in response to the target event, it includes: In the case where the target device is not required to cooperate with service processing, sending a disconnection message to the target device to disconnect from the target device.
6. The device configuration method according to claim 1, wherein, the establishing a link with the target device includes: Determining a device in a redundant state as the target device and establishing a link with the target device; where the devices in a redundant state include devices in a redundant network, devices with built-in redundancy, or devices with redundant ports.
7. The device configuration method according to claim 1, wherein, Establishing a link with the target device includes: Sending a link establishment request to the target device, and completing the link establishment with the target device when receiving the link establishment information fed back by the target device.
8. A device configuration method applied to a network device, the device configuration method includes: In response to establishing a link with a central device, accessing a target virtual slot of the central device, and saving the current configuration file of the network device into the network device; Receiving satellite device configuration information sent by the central device, and erasing table entries of relevant chips to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
9. The device configuration method according to claim 8, characterized in that, after loading the satellite device configuration information after the soft restart, it further includes: In response to the disconnection information sent by the central device, and erasing table entries of relevant chips to load the current configuration file saved in the memory after a soft restart.
10. A device configuration system, characterized in that, the device configuration system includes a central device and a network device, where the central device is configured to, in response to the expansion requirement of service processing capacity, determine a target virtual slot for accessing a target device, and establish a link with the target device; and is further configured to, in response to completing the link establishment with the target device, obtain satellite device configuration information corresponding to the target virtual slot in the central device, and send the satellite device configuration information to the target device; the network device is configured to, in response to establishing a link with the central device, access the target virtual slot of the central device, and save the current configuration file of the network device into the network device; and is further configured to receive the satellite device configuration information sent by the central device, and erase table entries of relevant chips to load the satellite device configuration information after a soft restart, where the satellite device configuration information corresponds to the target virtual slot and is stored on the central device.
11. A network device, characterized in that, the device includes: a memory, a processor, and a device configuration program stored on the memory and executable on the processor, the device configuration program is configured to implement the steps of the device configuration method according to any one of claims 1 to 7, or the device configuration program is configured to implement the steps of the device configuration method according to any one of claims 8 to 9.
12. A storage medium, characterized in that, a device configuration program is stored on the storage medium, and when the device configuration program is executed by a processor, it implements the steps of the device configuration method according to any one of claims 1 to 7, or when the device configuration program is executed by a processor, it implements the steps of the device configuration method according to any one of claims 8 to 9.