Patch loading method, network element and computer readable storage medium

By obtaining configuration instructions, adjusting patch configuration information, and writing it to the storage medium, the problem of frequent patch loading is solved, the control and applicability of patch functions are realized, and the operating burden of network elements is reduced.

CN113835741BActive Publication Date: 2025-12-30ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010591719.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2025-12-30
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

Frequent patch loading increases the operational burden on network elements, and different operators have different requirements and standards, resulting in patch functions being unsuitable and further increasing the burden on network elements.

Method used

By obtaining configuration instructions, adjusting patch configuration information and writing it to storage media, processes can read and load the adjusted patch configuration information. By utilizing the characteristics of storage media to share and transfer data among multiple processes, control over patch functionality can be achieved.

Benefits of technology

This effectively reduces the frequency of patch replacement, improves the flexibility and applicability of patch configuration, and reduces the operational burden on network elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835741B_ABST
    Figure CN113835741B_ABST
Patent Text Reader

Abstract

The application discloses a patch loading method, a network element and a computer readable storage medium, and the patch loading method comprises the following steps: acquiring a configuration instruction, acquiring patch configuration information according to the configuration instruction; and writing the patch configuration information into a storage medium, so that a process acquires the patch configuration information from the storage medium and loads a patch according to the patch configuration information. According to the scheme provided by the embodiment of the application, the patch configuration information is written into the storage medium after being adjusted by the configuration instruction. Since the data in the storage medium can be shared and transmitted between multiple processes, the process can read the adjusted patch configuration information, adjust the patch configuration through the patch configuration information, realize the adjustment of the patch function, and reduce the replacement frequency of the patch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to, but are not limited to, the field of communications, and particularly to a patch loading method, a network element, and a computer-readable storage medium. Background Technology

[0002] A patch is a program package with a specific function, commonly used to fix system malfunctions in network elements and add new features. Because the sheer number of patches can burden the operation of network elements, manufacturers often combine multiple fault fixes and new features into a single patch. However, each operator has different needs and standards, which can easily lead to patches being inapplicable. Since patches take effect automatically after loading, the current practice is to replace them with appropriate patches based on the operator's requirements, resulting in frequent patch changes and increasing the operational burden on network elements. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] This invention provides a patch loading method, a network element, and a computer-readable storage medium, which can adjust patch configuration and reduce the frequency of patch replacement.

[0005] In a first aspect, embodiments of the present invention provide a patch loading method, applied to a network element, comprising:

[0006] Obtain configuration instructions, and retrieve patch configuration information based on the configuration instructions;

[0007] The patch configuration information is written to the storage medium so that the process can obtain the patch configuration information from the storage medium and load the patch according to the patch configuration information.

[0008] In a second aspect, embodiments of the present invention also provide a network element, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the patch loading method of the first aspect as described above.

[0009] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the patch loading method described above.

[0010] This invention includes: obtaining configuration instructions; obtaining patch configuration information according to the configuration instructions; and writing the patch configuration information to a storage medium, so that a process can obtain the patch configuration information from the storage medium and load a patch according to the patch configuration information. According to the solution provided by this invention, the patch configuration information is adjusted by configuration instructions and then written to the storage medium. Utilizing the characteristic of the storage medium that it can share and transfer data among multiple processes, the process can read the adjusted patch configuration information and adjust the patch configuration accordingly, thereby achieving control over the patch function and effectively reducing the frequency of patch replacement.

[0011] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description

[0012] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0013] Figure 1 This is a schematic diagram of a network element structure for performing a patch loading method according to an embodiment of the present invention;

[0014] Figure 2 This is a flowchart of a patch loading method provided in another embodiment of the present invention;

[0015] Figure 3 This is a flowchart of a delayed patch loading method provided in another embodiment of the present invention;

[0016] Figure 4 This is a flowchart of the application of a function switch in a patch loading method provided in another embodiment of the present invention;

[0017] Figure 5 This is a flowchart of applying patch parameters in a patch loading method provided in another embodiment of the present invention;

[0018] Figure 6 This is a flowchart of applying patch parameters according to scene parameters in a patch loading method provided in another embodiment of the present invention;

[0019] Figure 7 This is a schematic diagram illustrating the application of patch configuration information in a patch loading method provided by another embodiment of the present invention;

[0020] Figure 8This is a flowchart of generating backup files in a patch loading method provided in another embodiment of the present invention;

[0021] Figure 9 This is a flowchart illustrating the application of backup files in a patch loading method provided in another embodiment of the present invention;

[0022] Figure 10 This is a flowchart of the generation of an identifier file in a patch loading method provided in another embodiment of the present invention;

[0023] Figure 11 This is a flowchart of the patch loading method provided in another embodiment of the present invention before the generation of the identifier file;

[0024] Figure 12 This is a schematic diagram illustrating the principle of a patch loading method provided in another embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0026] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0027] This invention provides a patch loading method, a network element, and a computer-readable storage medium. The method involves obtaining configuration instructions, acquiring patch configuration information based on the configuration instructions, and writing the patch configuration information into the storage medium. This allows processes to retrieve the patch configuration information from the storage medium and load patches based on the patch configuration information. According to the solution provided by this invention, by utilizing the characteristic of storage media that allows data sharing and transmission among multiple processes, patch configuration information is adjusted through configuration instructions and written into the storage medium. This enables processes to read the adjusted patch configuration information and adjust the loaded patch configuration, thereby achieving patch function control and effectively reducing the frequency of patch replacement.

[0028] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0029] like Figure 1 As shown, Figure 1 This is a schematic diagram of a network element for performing a patch loading method according to an embodiment of the present invention.

[0030] exist Figure 1 In this example, the network element 100 includes a primary main control board 110, a backup main control board 120, line cards 130, and a storage medium 140. The storage medium 140 can be an independent structure that is communicatively connected to the primary main control board 110, the backup main control board 120, and the line cards 130, or it can be memory located within the primary main control board 110, the backup main control board 120, and the line cards 130. For example, it can be shared memory, reserved memory, or flash memory files used to store global variables. The specific storage medium can be selected according to actual needs, and this embodiment does not impose many limitations. It should be noted that the network element 100 can include multiple line cards 130, which can be communicatively connected to the storage medium 140 and the primary main control board 110, respectively. This embodiment does not impose many limitations. It should also be noted that the primary main control board 110 can be used to interact with external devices, such as computers and servers, to obtain configuration commands and write them into the storage medium 140. It is understood that the backup main control board 120 can be used to back up any data in the primary main control board 110, such as obtaining the patch configuration information in this embodiment through the storage medium 140 and generating a backup file, which is beneficial to improving data security and the consistency of configuration information.

[0031] Those skilled in the art will understand that network element 100 can be any network unit in a communication device that can be used to perform patch loading; this embodiment does not impose any restrictions.

[0032] It will be understood by those skilled in the art that Figure 1 The network elements shown do not constitute a limitation on the embodiments of the present invention. They may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0033] Based on the above network elements, various embodiments of the patch loading method of the present invention are proposed below.

[0034] like Figure 2 As shown, Figure 2 This is a flowchart of a patch loading method provided in an embodiment of the present invention. The patch loading method includes, but is not limited to, steps S100 and S200.

[0035] Step S100: Obtain configuration instructions and obtain patch configuration information based on the configuration instructions.

[0036] In one embodiment, configuration instructions can be input into the network element in any form, such as through a human-machine interaction process. The specific process used can be selected according to actual needs, and this embodiment does not impose any restrictions.

[0037] In one embodiment, patch configuration information can be obtained from configuration instructions in any way, such as the human-computer interaction process inputting configuration instructions to the command parsing process, and the command parsing process parsing the user-defined patch configuration information from the configuration instructions.

[0038] Step S200: Write the patch configuration information to the storage medium so that the process can obtain the patch configuration information from the storage medium and load the patch according to the patch configuration information.

[0039] Based on the above embodiments, the storage medium can be a global storage medium such as shared memory, reserved memory, and flash memory files of various components in the network element. This embodiment uses shared memory as an example to illustrate the principle. It should be noted that since the primary main control board, the backup main control board, and several line cards all have shared memory, in this embodiment, writing the patch configuration to the storage medium can be done by having each line card and the primary and backup main control boards share a process to write the patch configuration information into their respective shared memory, so that the process being patched can use it when loading the patch.

[0040] Those skilled in the art will understand that common patches include hot patches and cold patches. This embodiment does not limit the specific type of patch. That is, the patch loading method of this embodiment can be applied to hot patches or cold patches. The process being patched reads the patch configuration parameters through the storage medium and loads the patch according to the patch configuration parameters.

[0041] It should be noted that the patch configuration information in this embodiment can be changed after the patch is loaded via configuration commands. For example, relevant configuration commands can be input through an external device. After receiving the configuration command, the network element executes steps S100 and S200 of this embodiment, causing the patch configuration parameters to change, thereby adjusting the functionality that the process can achieve after loading the patch. It should also be noted that the patched process can reload the patch if it detects a change in the patch configuration parameters to adjust the patch functionality. Furthermore, while maintaining operation, it can jump to the entry point of the patch function or replace the patch file, allowing the patched process to directly apply the updated patch configuration when performing specific operations, thus achieving the adjusted patch functionality. The specific implementation method can be selected according to actual needs.

[0042] In one embodiment, the process can obtain patch configuration information from the storage medium in any way, such as by accessing memory, files, or sending messages through patch functions. The specific method can be selected according to actual needs, and this embodiment does not impose many restrictions.

[0043] In addition, in one embodiment, the patch configuration information includes at least one of the following:

[0044] Delay duration;

[0045] Function switch;

[0046] Patch parameters.

[0047] In one embodiment, the patch configuration information can be a global variable that can be applied by multiple processes. It should be noted that configuration commands typically adjust the parameter values ​​and on / off states of existing variables. Therefore, the patch configuration information in this embodiment can be variables already present in the patch, such as pre-set delay durations, function switches, patch parameters, etc. Preset values ​​can be set in the patch, and during patch execution, configuration commands update the values ​​of specific variables to the storage medium, thereby adjusting the patch functionality.

[0048] It should be noted that, for the sake of configuration uniformity, patch configuration information can be written to a global storage medium, such as the global storage medium of the main control board and the line card. This allows each line card to read the same patch configuration parameters for application. Alternatively, when a new line card is added or the device is restarted, the patch configuration information can be read from the main control board to load the patch, ensuring the stability of the patch and the consistency of the configuration information.

[0049] Additionally, refer to Figure 3 In one embodiment, Figure 2 Step S200 in the embodiment shown may include, but is not limited to, the following steps:

[0050] Step S210: Based on the delay duration, delay the loading of the patch by the process.

[0051] In one embodiment, the delay duration can be any value greater than or equal to 0. If the value is 0, the patch function runs immediately after the process starts. If the value is greater than 0, the delay duration is used to time the process after startup, and the patch function runs after the timer completes. This allows for adjustments to the patch functionality based on the patch's effective time. The specific value and time unit can be selected according to actual needs. It should be noted that the delay duration can be implemented using a timer in the network element. This timer can be an existing timer before the patch loading or a newly added timer based on the delay duration, depending on actual requirements.

[0052] Additionally, refer to Figure 4 In one embodiment, Figure 2 Step S200 in the embodiment shown may include, but is not limited to, the following steps:

[0053] Step S221: With the function switch in the on state, the process is made to run according to the patch function in the patch;

[0054] or,

[0055] Step S222: With the function switch in the off state, the process is made to run according to the original function, which is the running function before the patch is loaded.

[0056] It should be noted that, to enable the function toggle, the original configuration parameters can be retained after the patch is applied to the network element. The function switch allows selection of the patch's function; if the patch's function is not applicable, the switch can be turned off without deactivating the patch, making the operation convenient. The following example illustrates the principle of the function switch:

[0057] For example, if the loaded patch is a hot patch, the storage medium simultaneously stores the patch function and the function entry jump instruction of the original function before the patch is loaded. In step S221, when the function switch is on, the patched process performs subsequent operations according to the patch function in the patch. In step S222, when the function switch is off, even if the patch has taken effect, the patched process can read the function entry jump instruction of the original function from the storage medium and perform subsequent operations according to the original function.

[0058] For example, if the loaded patch is a hot patch, the storage medium contains both the patch's variables, processes, and files, as well as the variables, processes, and files of the process before the patch was applied. The specific variables, processes, and files can be selected according to the state of the function switch. The specific principle is similar to that of the hot patch mentioned above, and will not be elaborated here.

[0059] Additionally, refer to Figure 5 In one embodiment, Figure 2 Step S200 in the embodiment shown may include, but is not limited to, the following steps:

[0060] Step S230: Set the patch parameters to the process's running parameters.

[0061] In one embodiment, the patch parameters can be any parameter related to process execution. This embodiment does not impose many restrictions, as long as the specific values ​​can be adjusted through configuration commands. It should be noted that this embodiment can adjust the specific values ​​of existing parameter types, or it can add parameters based on existing running parameters; this embodiment does not impose many restrictions. It should also be noted that after setting the patch parameters through configuration commands, existing parameters can be replaced. If the patch parameters do not meet the requirements, they can be set again using configuration commands to meet the requirements; this will not be elaborated further here.

[0062] Additionally, refer to Figure 6 In one embodiment, the patch configuration information also includes at least two scenario parameters. Figure 2 Step S200 in the embodiment shown may include, but is not limited to, the following steps:

[0063] Step S241: Obtain the process configuration parameters;

[0064] Step S242: If the configuration parameters match the scene parameters, set the patch parameters as the process's running parameters.

[0065] In one embodiment, the number of scenario parameters can be arbitrary, allowing patch parameters to be applied in different scenarios. Different scenario parameters and corresponding patch parameters can be set in the patch configuration information. For example, when repairing the same fault, each operator has different fault judgment criteria and repair requirements. A first scenario parameter and a first patch parameter can be set to meet the needs of one operator, while a second scenario parameter and a second patch parameter can be set to meet the needs of another operator. Different patch parameters can be selected through scenario parameters.

[0066] In one embodiment, any parameter can be matched with the scenario parameter. For example, different operators can be distinguished by the configuration parameters of the process, line card, or network element. Alternatively, the current running parameters of the process can be used as the scenario parameter, such as the current network transmission speed or processing speed. The specific matching method can be selected according to the actual needs, and will not be elaborated here.

[0067] It should be noted that using scenario parameters allows for the use of the same or different patch parameters in different scenarios. For example, for the same fault and new feature, different operators' equipment configurations can be used as scenario parameters. Different operators can be identified based on these scenario parameters, and then patch parameters can be formulated according to each operator's needs. After the patch is loaded, devices from different operators can load their corresponding patch parameters, significantly reducing the frequency of patch package releases by manufacturers. Only a single universal patch package needs to be released, and the patch requirements of different operators can be met through scenario parameters and patch parameters. Alternatively, other parameters can also be used for scenario parameter matching, as long as the matching of the operating scenario is achieved. This embodiment does not impose many limitations.

[0068] Reference Figure 7 The following example illustrates the technical solution of applying patch configuration information in this application:

[0069] like Figure 7 As shown, the patch configuration information includes the patch delay duration, patch function on / off, and patch parameters. The original delay duration, original function, and original parameters are also stored in the storage medium. It should be noted that this example only considers the patch being active. If the patch is deactivated, the process can execute according to the original delay duration, original function, and original parameters, which will not be elaborated upon here.

[0070] If the patch delay duration is greater than 0, the patch function switch and patch parameters are read after a delay based on the patch delay duration. If the patch function switch is on and patch parameters are set, the process runs according to the patch function and patch parameters; if the patch function switch is off and patch parameters are set, the process runs according to the original function and patch parameters; if the patch function switch is on and no patch parameters are set, the process runs according to the patch function and original parameters; if the patch function switch is off and no patch parameters are set, the process runs according to the original function and original parameters.

[0071] If the patch delay duration is equal to 0, then the patch function switch and patch parameters should be read immediately. The execution method when the patch function switch and patch parameters are in different states is the same as the execution method when the patch delay duration value is greater than 0, and will not be repeated here.

[0072] Additionally, refer to Figure 8 In one embodiment, execution Figure 2 Following step S200 as shown in the embodiment, the following steps are also included, but are not limited to:

[0073] Step S310: Generate a backup file based on the patch configuration information in the storage medium.

[0074] In one embodiment, since the storage medium is typically memory and flash memory, the data in the storage medium is usually erased if the device restarts. To maintain the consistency of the patch configuration information, a backup can be performed after the patch configuration information is written to the storage medium, generating a backup file that records the patch configuration information. It should be noted that the backup file can be of any file type, such as a common text document, as long as it can record the patch configuration information. It should also be noted that since the storage medium is erased after a power outage, the backup file can be saved to the primary and / or backup main control boards of the network element, ensuring that it can be read after a power outage or network element restart.

[0075] Additionally, refer to Figure 9 In one embodiment, the steps include, but are not limited to, the following:

[0076] Step S410: If the network element restarts, read the patch configuration information from the backup file and write the patch configuration information to the storage medium.

[0077] In one embodiment, if a network element restarts, the storage media on the primary control board and line cards can be created and initialized by the first started process. This process could be a version management process, and the specific process can be selected according to actual needs. After the storage media is initialized, a backup file is read from the primary or backup control board, and the patch configuration information from the backup file is written to the storage media. This allows the patched process to obtain the patch configuration information, thereby achieving consistency of the patch configuration information.

[0078] Additionally, refer to Figure 10 In one embodiment, execution Figure 2 Following step S200 as shown in the embodiment, the following steps are also included, but are not limited to:

[0079] Step S320: Generate an identification file in the storage medium.

[0080] In one embodiment, after the patch configuration information is written to the storage medium, an identifier file can be generated in the storage medium to prevent the patched process from reading the information before it has been completely written, thus preventing the patch from being loaded correctly. For example, in the case of a network element restart, if the patched process reads the identifier file from the storage medium during the startup phase, the patch configuration information in the storage medium has been completely written, enabling the patched process to read the complete patch configuration information and load the patch. As another example, when a new line card is added to the network element, patch configuration information is obtained from the main control board and written to the line card's storage medium. After the initial writing is complete, an identifier file is created, and the patched process loads the patch after recognizing the identifier file.

[0081] Additionally, refer to Figure 11 In one embodiment, Figure 10 Step S320 shown in the embodiment also includes, but is not limited to, the following steps:

[0082] Step S330: Before the identifier file is generated, the preset waiting time is read and the process is controlled to start with a delay based on the waiting time.

[0083] Based on the above embodiments, when no identifier file is detected, the process startup can be delayed by controlling the waiting time, allowing the patch configuration information to be written during the delay. The specific waiting time can be selected according to actual needs, and this embodiment does not impose many restrictions. It should be noted that, in order to avoid the process delay time affecting the normal operation of network elements, if no identifier file is detected after the process has completed the timing according to the waiting time, it can either run according to the original function and parameters before patching, or delay startup again according to the waiting time. The specific method can be selected according to actual needs.

[0084] Reference Figure 12 , Figure 12 This is a schematic diagram illustrating the principle of the network element patch loading method according to an embodiment of this application. The specific principles of this embodiment are illustrated below with several specific examples:

[0085] In one embodiment, the network element includes a primary main control board 1220, a backup main control board 1230, and line cards 1240. The primary main control board 1220 is communicatively connected to an external device 1210. The external device 1210 can be a computer, server, mobile phone, or other terminal that can send configuration commands to the network element; this embodiment does not impose many limitations. The number of line cards 1240 can be increased or decreased according to actual needs. For ease of description, this embodiment uses one line card 1240 for principle explanation. For ease of description, shared memory is used as an example storage medium in this example.

[0086] Example 1:

[0087] In this example, each device has a fixed configuration. External device 1210 sends configuration commands to the network element. The network element obtains patch configuration information from the configuration commands through a first process, which can be the network element's human-machine interaction process. The first process sends the patch configuration information to a second process on the primary control board 1220, which can be a command parsing process. The second process parses the patch configuration information and obtains configuration information such as delay duration, patch parameters, and function switches, which is then sent to a third process. This third process exists on the primary control board 1220, the backup control board 1230, and the line card 1240. The third process writes the obtained patch configuration information into the shared memory of this board. The patched process on the line card 1240 reads the specific values ​​of the patch configuration information from the shared memory and loads the patch. In addition, the primary control board saves the patch configuration information in the shared memory as a backup file. To ensure data security, a backup file is also generated simultaneously on the backup control board 1230.

[0088] After the patched process starts, it loads the patch configuration information, while preserving the original configuration information or original files, and executes a wait based on the specified delay. After the wait is complete, if the function switch is on, it runs according to the patch function; if the function switch is off, it runs according to the original function. Additionally, if patch parameters and scene parameters are set in the patch configuration information, it selects the corresponding patch parameters based on the scene parameters; otherwise, it runs according to the original parameters.

[0089] Example 2:

[0090] This example illustrates the use case of adding a new line card. For simplicity, the acquisition of patch configuration information in the network element can be referred to Example 1, and will not be elaborated upon here. When a new line card is added to the network element, the new line card obtains the patch configuration information by sending a message to the main control board through the line card management process, and writes it to the shared memory of this board. After the initial write is completed, an identification file is created. If the patched process fails to detect the identification file when it starts, the startup is delayed according to the waiting time, for example, a delay of 3 seconds; if the identification file is detected within 3 seconds, the patched process starts and loads the patch; if the identification file is still not detected after 3 seconds, the patched process starts and loads the original configuration information.

[0091] Example 3:

[0092] This example illustrates the scenario of a device reboot. For simplicity, the acquisition of patch configuration information in the network element can be referenced in Example 1, and will not be elaborated upon here. When a device reboots, the first version management process to start creates and initializes the shared memory of the primary main control board 1220, the backup main control board 1230, and the line card 1240. The primary main control board 1220 reads the patch configuration information from the backup file and writes it into the shared memory. The backup main control board 1230 and the line card 1240 obtain the patch configuration information from the primary main control board 1220 and write it into their respective shared memory, thus loading the patch. Simultaneously, an identifier file is generated after the initial writing of the patch configuration information, the principle of which is similar to that in Example 2 and will not be repeated here.

[0093] In addition, one embodiment of the present invention provides a network element, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0094] The processor and memory can be connected via a bus or other means.

[0095] The non-transitory software program and instructions required to implement the patch loading method of the above embodiments are stored in memory. When executed by the processor, the patch loading method applied to the network element in the above embodiments is executed, for example, the method described above is executed. Figure 2 Method steps S100 to S200, Figure 3 Method step S210, Figure 4 Method steps S221 to S222, Figure 5 Method step S230, Figure 6 Method steps S241 to S242, Figure 8 Method step S310, Figure 9 Method step S410, Figure 10 Method step S320, Figure 11 The method step S330 in the text.

[0096] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0097] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described network element embodiment, causing the processor to execute the patch loading method applied to the network element in the above-described embodiment, for example, executing the above-described... Figure 2 Method steps S100 to S200, Figure 3 Method step S210, Figure 4 Method steps S221 to S222, Figure 5 Method step S230, Figure 6 Method steps S241 to S242, Figure 8 Method step S310, Figure 9 Method step S410, Figure 10 Method step S320, Figure 11 Method step S330.

[0098] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0099] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A patch loading method applied to a network element, comprising: obtaining a configuration instruction, and obtaining patch configuration information according to the configuration instruction, wherein the patch configuration information comprises a function switch; writing the patch configuration information into a storage medium, so that a process obtains the patch configuration information from the storage medium and loads a patch according to the patch configuration information; wherein after the process loads the patch according to the patch configuration information, the method further comprises: when the function switch is in an open state, causing the process to run according to a patch function in the patch; or when the function switch is in a closed state, causing the process to run according to an original function, wherein the original function is a running function before the patch is loaded. The patch configuration information at least comprises one of the following:

2. The patch loading method of claim 1, wherein, a time delay duration; a patch parameter. The process loads the patch according to the patch configuration information, specifically comprising:

3. The patch loading method of claim 2, wherein, causing the process to delay loading the patch according to the time delay duration. After the process delays loading the patch, the method further comprises:

4. The patch loading method of claim 3, wherein, setting the patch parameter as a running parameter of the process. The patch configuration information further comprises at least two scene parameters, and the process sets the patch parameter as the running parameter of the process, specifically comprising:

5. The patch loading method of claim 4, wherein: obtaining a configuration parameter of the process; if the configuration parameter matches the scene parameter, setting the patch parameter as the running parameter of the process. After the patch configuration information is written into the storage medium, the method further comprises:

6. The patch loading method of claim 1, wherein, generating a backup file according to the patch configuration information in the storage medium. The method further comprises:

7. The patch loading method of claim 6, wherein, if the network element is restarted, reading the patch configuration information from the backup file and writing the patch configuration information into the storage medium. The method further comprises, after the patch configuration information is written into the storage medium:

8. The patch loading method of claim 1, wherein, generating an identification file in the storage medium. The process obtains the patch configuration information from the storage medium, specifically comprising:

9. The patch loading method of claim 8, wherein, before the identification file is generated, reading a pre-set waiting duration and controlling the process to start up according to the waiting duration. A memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the patch loading method according to any one of claims 1 to 9 when executing the computer program.

10. A network element comprising: 11.A computer readable storage medium storing computer executable instructions for executing the patch loading method according to any one of claims 1 to 9. ​

Citation Information

Patent Citations

  • Method and device for realizing system hot patching

    CN103942073A

  • Refined vulnerability repair management method and device and electronic equipment

    CN110413305A