Middleware program repair method, device and computer readable storage medium

By obtaining the function name information and patch list information in the middleware program, the repair function is dynamically loaded, which solves the problem in the existing technology that the middleware program repair needs to be replaced as a whole, and realizes the repair of the middleware program without restarting the system. Function that reduces the memory size of patch repair files.

CN111399892BActive Publication Date: 2024-09-17SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010194734.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-18
Publication Date
2024-09-17
Estimated Expiration
2040-03-18

AI Technical Summary

Technical Problem

Existing middleware program repair methods need to be replaced as a whole, causing interruptions and affecting normal operations, and the vulnerability cannot be repaired without restarting.

Method used

By obtaining the function name information and patch list information in the middleware program, the repair operation is detected and executed, the repair function is dynamically loaded, a repair method without overall replacement is implemented, and the memory size of the patch repair file is reduced.

Benefits of technology

It realizes the function of repairing the middleware program without restarting the system, saves the time of querying function name information, reduces the memory size of the patch repair file, and realizes the repair of middleware program vulnerabilities without replacing the whole method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111399892B
    Figure CN111399892B
Patent Text Reader

Abstract

The present invention discloses a method for repairing a middleware program, which includes: obtaining function name information and patch list information of a middleware function in a middleware program; detecting whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, performing a corresponding repair operation on the middleware function according to the function name information and the patch list information. The present invention also discloses a middleware program repair device and a computer-readable storage medium. The present invention can realize the function of reducing the memory size of a patch repair file, the function of repairing a middleware program vulnerability without overall replacement, and the function of repairing a middleware program vulnerability by dynamic loading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a middleware program repair method, device and computer-readable storage medium. Background Art

[0002] Middleware programs are a large category of basic software and belong to the category of reusable software. They are located between the operating system software and the user application software. Middleware programs are software used to call the interface of the operating system software driver layer and enable the application layer of the application program to implement functions.

[0003] At present, the repair method for middleware process programs is to directly replace the middleware program, which requires the entire middleware program to be modified and upgraded; this repair method requires restarting the middleware after the repair is completed to take effect. When it is necessary to repair defects in the middleware program or add functions to the middleware, the operation of the middleware program and the operating system must be interrupted, affecting the normal operation of the middleware program and the application program. Summary of the invention

[0004] The main purpose of the present invention is to provide a middleware program repair method, device and computer-readable storage medium, aiming to repair middleware program vulnerabilities without overall replacement.

[0005] To achieve the above object, the present invention provides a middleware program repair method, the middleware program repair method comprising the following steps:

[0006] Obtain function name information and patch list information of the middleware function in the middleware program;

[0007] Detecting whether the function name information is stored in the patch list information;

[0008] If the function name information is stored in the patch list information, a corresponding repair operation is performed on the middleware function according to the function name information and the patch list information.

[0009] Optionally, if the function name information is stored in the patch list information, the step of performing a corresponding repair operation on the middleware function according to the function name information and the patch list information includes:

[0010] If the function name information is stored in the patch list information, determining the function name information stored in the patch list information as the repair name information;

[0011] Determine the middleware function corresponding to the repair name information as a repair function;

[0012] Acquire patch address information corresponding to the repair name information according to the patch list information;

[0013] When the repair function is executed, the repair function is executed through the patch address information.

[0014] Optionally, after the step of obtaining the function name information and patch list information of all middleware functions in the middleware program, the following steps are included:

[0015] Get the function module information of the middleware function in the middleware program;

[0016] Detecting whether the function module information is stored in the patch list information;

[0017] If the function module information is stored in the patch list information, filtering the patch list information to generate module filtering list information;

[0018] The step of detecting whether the function name information is stored in the patch list information comprises:

[0019] Detecting whether the function name information is stored in the module screening list information;

[0020] If the function name information is stored in the patch list information, the step of determining the function name information stored in the patch list information as the repair name information includes:

[0021] If the function name information is stored in the module filtering list information, the function name information stored in the module filtering list information is determined as the repair name information.

[0022] Optionally, after the step of obtaining the function module information of the middleware function in the middleware program, the following steps are included:

[0023] Get the function process information of the middleware function in the middleware program;

[0024] Detecting whether the function process information is stored in the patch list information;

[0025] If the function process information is stored in the patch list information, filtering the patch list information to generate process filtering list information;

[0026] The step of detecting whether the function module information is stored in the patch list information comprises:

[0027] Detecting whether the function module information is stored in the process screening list information;

[0028] If the function module information is stored in the patch list information, the step of filtering the patch list information to generate module filtering list information includes:

[0029] If the function module information is stored in the process filtering list information, the process filtering list information is filtered to generate module filtering list information.

[0030] Optionally, before the step of obtaining function name information and patch list information of all middleware functions in the middleware program, the step includes:

[0031] Send patch file acquisition instructions to the server;

[0032] Receiving the patch repair file returned by the server according to the patch file acquisition instruction;

[0033] The patch list information is generated according to the patch repair file.

[0034] Optionally, when the repair function is executed, before the step of executing the repair function through the patch address information, the step includes:

[0035] Preloading the repair function through the patch address information to obtain a preloading result;

[0036] Detecting whether the preloaded result is a normal execution result;

[0037] If the preloading result is a normal execution result, the process proceeds to the step of running the repair function through the patch address information when the repair function is run.

[0038] Optionally, after the step of detecting whether the preloading result is a normal execution result, the following steps are included:

[0039] If the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;

[0040] If the patch address information is normal address information, a program repair failure instruction is generated and sent to the server.

[0041] Optionally, if the preloading result is an abnormal execution result, after the step of detecting whether the patch address information is normal address information, the method further comprises:

[0042] If the patch address information is abnormal address information, when the repair function is executed, the repair function is executed based on the function address information corresponding to the function name information.

[0043] In addition, to achieve the above-mentioned purpose, the present invention also provides a middleware program repair device, which includes: a memory, a processor, and a middleware program repair program stored in the memory and executable on the processor, and when the middleware program repair program is executed by the processor, the steps of the middleware program repair method described above are implemented.

[0044] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a middleware program repair program is stored, and when the middleware program repair program is executed by a processor, the steps of the middleware program repair method described above are implemented.

[0045] The present invention provides a middleware program repair method, device and computer-readable storage medium, which obtains function name information and patch list information of a middleware function in a middleware program; detects whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, performs a corresponding repair operation on the middleware function according to the function name information and the patch list information. Through the above-mentioned manner, the present invention can realize the function of reducing the memory size of the patch repair file, realize the function of repairing the middleware program vulnerability without the method of overall replacement, realize the function of repairing the middleware program vulnerability by dynamic loading, and realize the function of repairing the middleware program without restarting. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention;

[0047] Figure 2 It is a flowchart of the first embodiment of the middleware program repair method of the present invention;

[0048] Figure 3 It is a flowchart of a second embodiment of the middleware program repair method of the present invention;

[0049] Figure 4 It is a flowchart of a third embodiment of the middleware program repair method of the present invention;

[0050] Figure 5 A schematic diagram of a flow chart of a fourth embodiment of a middleware program repair method according to the present invention;

[0051] Figure 6 A schematic diagram of a flow chart of a fifth embodiment of a middleware program repair method according to the present invention;

[0052] Figure 7 FIG. 6 is a flow chart of a sixth embodiment of a middleware program repairing method according to the present invention.

[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0055] The main solution of the embodiment of the present invention is: obtaining the function name information and patch list information of the middleware function in the middleware program; detecting whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, performing corresponding repair operations on the middleware function according to the function name information and the patch list information.

[0056] The existing repair methods for middleware process programs are to directly replace the middleware program, which requires the entire middleware program to be modified and upgraded; this repair method requires restarting the middleware after the repair is completed to take effect. When it is necessary to repair defects in the middleware program or add functions to the middleware, the operation of the middleware program and the operating system must be interrupted, affecting the normal operation of the middleware program and the application.

[0057] The present invention aims to repair middleware program vulnerabilities without overall replacement.

[0058] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0059] The terminal in the embodiment of the present invention may be a PC, or may be a mobile terminal device with a display function, such as a smart phone or a tablet computer.

[0060] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0061] Preferably, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal may also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.

[0062] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0063] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a middleware program repair program.

[0064] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the middleware program repair program stored in the memory 1005 and perform the following operations:

[0065] Obtain function name information and patch list information of the middleware function in the middleware program;

[0066] Detecting whether the function name information is stored in the patch list information;

[0067] If the function name information is stored in the patch list information, a corresponding repair operation is performed on the middleware function according to the function name information and the patch list information.

[0068] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0069] If the function name information is stored in the patch list information, determining the function name information stored in the patch list information as the repair name information;

[0070] Determine the middleware function corresponding to the repair name information as a repair function;

[0071] Acquire patch address information corresponding to the repair name information according to the patch list information;

[0072] When the repair function is executed, the repair function is executed through the patch address information.

[0073] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0074] Get the function module information of the middleware function in the middleware program;

[0075] Detecting whether the function module information is stored in the patch list information;

[0076] If the function module information is stored in the patch list information, filtering the patch list information to generate module filtering list information;

[0077] The step of detecting whether the function name information is stored in the patch list information comprises:

[0078] Detecting whether the function name information is stored in the module screening list information;

[0079] If the function name information is stored in the patch list information, the step of determining the function name information stored in the patch list information as the repair name information includes:

[0080] If the function name information is stored in the module filtering list information, the function name information stored in the module filtering list information is determined as the repair name information.

[0081] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0082] Get the function process information of the middleware function in the middleware program;

[0083] Detecting whether the function process information is stored in the patch list information;

[0084] If the function process information is stored in the patch list information, filtering the patch list information to generate process filtering list information;

[0085] The step of detecting whether the function module information is stored in the patch list information comprises:

[0086] Detecting whether the function module information is stored in the process screening list information;

[0087] If the function module information is stored in the patch list information, the step of filtering the patch list information to generate module filtering list information includes:

[0088] If the function module information is stored in the process filtering list information, the process filtering list information is filtered to generate module filtering list information.

[0089] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0090] Send patch file acquisition instructions to the server;

[0091] Receiving the patch repair file returned by the server according to the patch file acquisition instruction;

[0092] The patch list information is generated according to the patch repair file.

[0093] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0094] Preloading the repair function through the patch address information to obtain a preloading result;

[0095] Detecting whether the preloaded result is a normal execution result;

[0096] If the preloading result is a normal execution result, the process proceeds to the step of running the repair function through the patch address information when the repair function is run.

[0097] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0098] If the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;

[0099] If the patch address information is normal address information, a program repair failure instruction is generated and sent to the server.

[0100] Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and further perform the following operations:

[0101] If the patch address information is abnormal address information, when the repair function is executed, the repair function is executed based on the function address information corresponding to the function name information.

[0102] Based on the above hardware structure, an embodiment of the middleware program repair method of the present invention is proposed.

[0103] The present invention provides a method for repairing a middleware program.

[0104] Reference Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a middleware program repairing method according to the present invention.

[0105] In an embodiment of the present invention, the middleware program repair method is applied to a middleware program repair device, and the middleware program repair method includes:

[0106] Step S10, obtaining function name information and patch list information of all middleware functions in the middleware program;

[0107] In this embodiment, before repairing the middleware program, when the middleware program is running, the middleware program repair device obtains function name information and function address information of all middleware functions in the middleware program, and the middleware program repair device obtains patch list information on the middleware program interface between the middleware program and the user application; wherein the middleware program is composed of a number of middleware program categories, and the middleware program categories are composed of a number of middleware functions; the patch list information is stored on the middleware program interface between the middleware program and the user application; wherein the function name information is the name of the middleware function; wherein the function address information is information on the address from which the function data is called when the middleware function is executed. The patch list information is that when the middleware program repair device detects that the patch file in the middleware program repair device needs to be updated, the middleware program repair device sends a patch file acquisition instruction to the cloud server, and the cloud server searches for the patch repair file corresponding to the patch file acquisition instruction according to the patch file acquisition instruction; the cloud server sends the found patch repair file to the middleware program repair device, and the middleware program repair device receives the patch repair file returned by the cloud server according to the patch file acquisition instruction. After receiving the patch repair file, the middleware program repair device generates a patch repair file according to the patch repair file.

[0108] Step S20, detecting whether the function name information is stored in the patch list information;

[0109] In this embodiment, after the middleware program repair device obtains the function name information and the patch list information, the middleware program repair device reads the patch list information, and detects whether the function name information is stored in the patch list information, that is, the middleware program repair device detects whether there is patch name information identical to the function name information in the patch list information; wherein the patch list information is composed of a plurality of patch name information, a plurality of patch module information, a plurality of patch process information, and a plurality of patch address information, each patch name information, patch module information, patch process information, and patch address information are stored in the form of a table on the middleware program interface between the middleware program and the user application program, and the patch name information, patch module information, patch process information, and patch address information have a corresponding relationship. wherein the patch name information is information about the name of the patch function, the patch module information is information about which running module the patch function is in, the patch process information is information about which running process the patch function is in, and the patch address information is information about the address that needs to be called when executing the patch function. wherein the patch process information corresponds to a plurality of patch module information, the patch module information corresponds to a plurality of patch name information, and one patch name information corresponds to one patch address information.

[0110] After step S20 detects whether the function name information is stored in the patch list information, it may include:

[0111] Step a1, if the function name information is not stored in the patch list information, determining the middleware function corresponding to the function name information as a normal function, and reading the function address information corresponding to the function name information according to the middleware function;

[0112] Step a2: when the normal function is running, the normal function is run through the function address information.

[0113] In this embodiment, when the middleware program repairing device detects that the function name information is not stored in the patch list information, the middleware program repairing device determines the middleware function corresponding to the function name information as a normal function, and the middleware program repairing device reads the function address information corresponding to the function name information according to the middleware function; when the normal function is running, the middleware program repairing device runs the normal function through the function address information.

[0114] Step S30, if the function name information is stored in the patch list information, performing a corresponding repair operation on the middleware function according to the function name information and the patch list information;

[0115] In this embodiment, when the middleware program repair device detects that function name information is stored in the patch list information, that is, when the middleware program repair device detects that there is patch name information in the patch list information that is the same as the function name information; the middleware program repair device performs corresponding repair operations on the middleware function according to the function name information and the patch list information.

[0116] This embodiment uses the above scheme to obtain the function name information and patch list information of the middleware function in the middleware program; detect whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, perform corresponding repair operations on the middleware function according to the function name information and the patch list information. In this way, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without the method of overall replacement is realized, the function of repairing the middleware program vulnerability by dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0117] Further, refer to Figure 3 , Figure 3 This is a flow chart of the second embodiment of the middleware program repair method of the present invention. Figure 2 In the illustrated embodiment, if the function name information is stored in the patch list information, step S30, performing a corresponding repair operation on the middleware function according to the function name information and the patch list information, may include:

[0118] Step S31, if the function name information is stored in the patch list information, determining the function name information stored in the patch list information as repair name information;

[0119] In this embodiment, when the middleware program repairing device detects that function name information is stored in the patch list information, the middleware program repairing device determines the function name information stored in the patch list information as the repair name information.

[0120] As an implementation mode, in this embodiment, when the middleware program repair device detects that there is patch name information identical to the function name information in the patch list information, the middleware program repair device searches for the patch name information stored in the patch list information, searches for the function name information identical to the patch name information, and determines the function name information found by the middleware program repair device as the repair name information. The repair name information is the function name information corresponding to the function that needs to be repaired in the middleware function.

[0121] Step S32, determining the middleware function corresponding to the repair name information as a repair function;

[0122] In this embodiment, after determining the repair name information, the middleware program repair device determines the middleware function corresponding to the repair name information as the repair function; wherein the repair function is a function in the middleware function that needs to be repaired.

[0123] Step S33, acquiring patch address information corresponding to the repair name information according to the patch list information;

[0124] In this embodiment, after determining the repair function, the middleware program repairing device searches the patch list information for patch address information corresponding to the repair name information.

[0125] As an implementation mode, in this embodiment, after determining the repair function, the middleware program repair device searches for patch name information identical to the repair name information in the patch list information, and then searches for patch address information corresponding to the patch name information based on the patch name information.

[0126] Step S34: when the repair function is executed, the repair function is executed through the patch address information.

[0127] In this embodiment, after the middleware program repair device obtains the patch address information, the middleware program repair device replaces the function address information that the repair function needs to call with the calling patch address information; when the middleware program repair device detects that the repair function is running, the middleware program repair device runs the repair function by calling the patch address information.

[0128] This embodiment uses the above scheme to obtain the function name information and patch list information of the middleware function in the middleware program; detect whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, determine the function name information stored in the patch list information as the repair name information; determine the middleware function corresponding to the repair name information as the repair function; obtain the patch address information corresponding to the repair name information according to the patch list information; when the repair function is running, run the repair function through the patch address information. In this way, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without overall replacement is realized, the function of repairing the middleware program vulnerability through dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0129] Further, refer to Figure 4 , Figure 4 This is a flow chart of the third embodiment of the middleware program repair method of the present invention. Figure 3 In the embodiment shown, after step S10 obtains the function name information and patch list information of all middleware functions in the middleware program, it may include:

[0130] Step S41, obtaining function module information of the middleware function in the middleware program;

[0131] In this embodiment, after obtaining the function name information and the patch list information, the middleware program repairing device obtains the function module information of all the middleware functions in the middleware program; wherein the function module information is the information of which running module the middleware function is in.

[0132] Step S42, detecting whether the function module information is stored in the patch list information;

[0133] In this embodiment, after acquiring the function module information, the middleware program repairing device detects whether the function module information is stored in the patch list information.

[0134] Step S43, if the function module information is stored in the patch list information, filter the patch list information to generate module filter list information;

[0135] In this embodiment, when the middleware program repairing device detects that function module information is stored in the patch list information, the middleware program repairing device reassembles a row of patch list information containing function module information, and filters out a row of module filter list information containing function module information. The module filter list information is a list with function module information in each row.

[0136] As an implementation mode, in this embodiment, when the middleware program repair device detects that there is patch module information in the patch list information that is the same as the function module information, the middleware program repair device finds the patch module information stored in the patch list information, and filters the patch name information, patch address information and patch module information corresponding to the function module information (partial patch module information, patch module information after filtering) in the patch list information to obtain the module filtering list information.

[0137] Step S20 detects whether the function name information is stored in the patch list information, which may include:

[0138] Step S21, detecting whether the function name information is stored in the module screening list information;

[0139] In this embodiment, after obtaining the module filtering list information, the middleware program repairing device detects whether the module filtering list information stores function name information.

[0140] Step S31, if the function name information is stored in the patch list information, determining the function name information stored in the patch list information as the repair name information, may include:

[0141] Step S311: If the function name information is stored in the module filtering list information, the function name information stored in the module filtering list information is determined as the repair name information.

[0142] In this embodiment, when the middleware program repairing device detects that function name information is stored in the module filtering list information, the middleware program repairing device determines the function name information stored in the module filtering list information as the repair name information.

[0143] As an implementation mode, in this embodiment, when the middleware program repair device detects that there is patch name information in the module filtering list information that is identical to the function name information, the middleware program repair device searches out the patch name information stored in the module filtering list information, and the middleware program repair device searches for the function name information that is identical to the patch name information, and the function name information found by the middleware program repair device is determined as the repair name information.

[0144] This embodiment uses the above scheme to obtain the function name information and patch list information of the middleware function in the middleware program; obtain the function module information of the middleware function in the middleware program; detect whether the function module information is stored in the patch list information; if the function module information is stored in the patch list information, filter the patch list information to generate module filter list information; detect whether the function name information is stored in the module filter list information; if the function name information is stored in the module filter list information, determine the function name information stored in the module filter list information as the repair name information; determine the middleware function corresponding to the repair name information as the repair function; obtain the patch address information corresponding to the repair name information according to the patch list information; when the repair function is running, run the repair function through the patch address information. In this way, the time for querying the function name information is saved, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without the overall replacement method is realized, the function of repairing the middleware program vulnerability by dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0145] Further, refer to Figure 5 , Figure 5 This is a flow chart of the fourth embodiment of the middleware program repair method of the present invention. Figure 4In the illustrated embodiment, after step S40 obtains the function module information of the middleware function in the middleware program, the following may be included:

[0146] Step S51, obtaining function process information of a middleware function in a middleware program;

[0147] In this embodiment, after obtaining the function module information, the middleware program repairing device obtains the function process information of all the middleware functions in the middleware program; wherein the function process information is the information of which running process the middleware function is in.

[0148] Step S52, detecting whether the function process information is stored in the patch list information;

[0149] In this embodiment, after acquiring the function process information, the middleware program repairing device detects whether the function process information is stored in the patch list information.

[0150] Step S53, if the function process information is stored in the patch list information, filter the patch list information to generate process filter list information;

[0151] In this embodiment, when the middleware program repairing device detects that the patch list information contains function process information, the middleware program repairing device reassembles a row of patch list information containing function process information, and filters out a row of process filter list information containing function process information. The process filter list information is a list with function process information in each row.

[0152] As an implementation method, in this embodiment, when the middleware program repair device detects that there is patch process information in the patch list information that is the same as the function process information, the middleware program repair device finds the patch process information stored in the patch list information, and filters the patch name information, patch module information, patch address information and patch process information corresponding to the function process information (partial patch process information, patch process information after filtering) in the patch list information to obtain the process filtering list information.

[0153] The step S42 of detecting whether the patch list information stores the function module information may include:

[0154] Step S421, detecting whether the function module information is stored in the process screening list information;

[0155] In this embodiment, after obtaining the process filter list information, the middleware program repairing device detects whether the process filter list information stores the function module information.

[0156] Step S43, if the function module information is stored in the patch list information, the step of filtering the patch list information to generate module filtering list information includes:

[0157] Step S431: If the function module information is stored in the process filter list information, the process filter list information is filtered to generate module filter list information.

[0158] In this embodiment, when the middleware program repairing device detects that function module information is stored in the process filter list information, the middleware program repairing device reassembles a row of process filter list information containing function module information and filters out a row of process filter list information containing function module information.

[0159] As an implementation method, in this embodiment, when the middleware program repair device detects that there is patch module information that is the same as the function module information in the process filtering list information, the middleware program repair device finds the patch module information stored in the process filtering list information, and filters the patch name information, patch address information and patch module information corresponding to the function module information (partial patch module information, patch module information after filtering) in the process filtering list information to obtain the module filtering list information.

[0160] This embodiment uses the above scheme to obtain the function process information of the middleware function in the middleware program; detect whether the function process information is stored in the patch list information; if the function process information is stored in the patch list information, filter the patch list information to generate process filter list information; detect whether the function module information is stored in the process filter list information; if the function module information is stored in the process filter list information, filter the process filter list information to generate module filter list information. Thus, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without overall replacement is realized, the function of repairing the middleware program vulnerability by dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0161] Further, refer to Figure 6 , Figure 6 This is a flow chart of the fifth embodiment of the middleware program repair method of the present invention. Figure 2 , Figure 3 , Figure 4 ,or Figure 5 In the embodiment shown, before step S10 obtains the function name information and patch list information of all middleware functions in the middleware program, it may include:

[0162] Step S60, sending a patch file acquisition instruction to the server;

[0163] In this embodiment, when the middleware program repairing device detects that the patch file in the middleware program repairing device needs to be updated, the middleware program repairing device sends a patch file acquisition instruction to the cloud server.

[0164] Step S70, receiving the patch repair file returned by the server according to the patch file acquisition instruction;

[0165] In this embodiment, the middleware program repair device sends a patch file acquisition instruction to the cloud server, and the cloud server searches for the patch repair file corresponding to the patch file acquisition instruction according to the patch file acquisition instruction; the cloud server sends the found patch repair file to the middleware program repair device, and the middleware program repair device receives the patch repair file returned by the cloud server according to the patch file acquisition instruction.

[0166] Step S80: Generate the patch list information according to the patch repair file.

[0167] In this embodiment, after receiving the patch repair file, the middleware program repair device generates patch list information according to the patch repair file.

[0168] This embodiment uses the above solution to send a patch file acquisition instruction to the server; receive the patch repair file returned by the server according to the patch file acquisition instruction; and generate the patch list information according to the patch repair file. As a result, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without the method of overall replacement is realized, the function of repairing the middleware program vulnerability by dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0169] Further, refer to Figure 7 , Figure 7 This is a flow chart of the sixth embodiment of the middleware program repair method of the present invention. Figure 3 , Figure 4 ,or Figure 5 In the embodiment shown, after obtaining the patch address information corresponding to the repair name information according to the patch list information, step S33 may include:

[0170] Step S35, preloading the repair function according to the patch address information to obtain a preloading result;

[0171] In this embodiment, after the middleware program repair device obtains the patch address information corresponding to the repair name information, the middleware program repair device preloads the repair function through the patch address information, and the middleware program repair device obtains the preloading result of the repair function. Preloading is to test run the repair function in the middleware program repair device.

[0172] Step S36, detecting whether the preload result is a normal execution result;

[0173] In this embodiment, after the middleware program repair device obtains the preloading result of preloading the repair function, the middleware program repair device detects whether the preloading result is a normal execution result; wherein, the normal execution result is that the middleware program repair device can preload the repair function normally through the patch address information without any erroneous result.

[0174] After step S36 detects whether the preload result is a normal execution result, it may include:

[0175] Step b1, if the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;

[0176] Step b2: If the patch address information is normal address information, a program repair failure instruction is generated and sent to the server.

[0177] In this embodiment, when the middleware program repair device detects that the preloading result is not a normal execution result, the middleware program repair device detects whether the patch address information is normal address information; when the middleware program repair device detects that the patch address information is normal address information, the reason for the failure of the middleware program repair is that the patch address information is incorrect, the middleware program repair device generates a program repair failure instruction, the middleware program repair device sends the program repair failure instruction to the server, the server receives the program repair failure instruction, the administrator receives the message of the middleware program repair failure through the server, and the administrator searches for the reason for the failure of the middleware program repair.

[0178] Step b2: if the preloading result is an abnormal execution result, after detecting whether the patch address information is normal address information, the following may be included:

[0179] Step c: if the patch address information is abnormal address information, when the repair function is executed, the repair function is executed based on the function address information corresponding to the function name information.

[0180] In this embodiment, when the middleware program repairing device detects that the patch address information is not normal address information, the middleware program repairing device determines that the reason for the failure of program preloading is the abnormal patch function. At this time, in order to avoid the abnormal operation of the middleware program, when the repair function is running, the middleware program repairing device runs the repair function through the function address information corresponding to the function name information; the middleware program repairing device generates a patch download abnormal instruction and sends the patch download abnormal instruction to the server.

[0181] Step S37: If the preloading result is a normal execution result, the process proceeds to the step of running the repair function through the patch address information when the repair function is running.

[0182] In this embodiment, when the middleware program repairing device detects that the preloading result is a normal execution result, step S34 is executed.

[0183] This embodiment uses the above scheme to obtain the function name information and patch list information of the middleware function in the middleware program; detect whether the function name information is stored in the patch list information; if the function name information is stored in the patch list information, determine the function name information stored in the patch list information as the repair name information; determine the middleware function corresponding to the repair name information as the repair function; obtain the patch address information corresponding to the repair name information according to the patch list information; preload the repair function through the patch address information to obtain the preloading result; detect whether the preloading result is a normal execution result; if the preloading result is a normal execution result, go to the step of running the repair function through the patch address information when the repair function is running. In this way, the function of reducing the memory size of the patch repair file is realized, the function of repairing the middleware program vulnerability without overall replacement is realized, the function of repairing the middleware program vulnerability through dynamic loading is realized, and the function of repairing the middleware program without restarting is realized.

[0184] The invention also provides a middleware program repairing device.

[0185] The middleware program repairing device of the present invention comprises: a memory, a processor and a middleware program repairing program stored in the memory and executable on the processor. When the middleware program repairing program is executed by the processor, the steps of the middleware program repairing method described above are implemented.

[0186] The method implemented when the middleware program repair program running on the processor is executed can refer to various embodiments of the middleware program repair method of the present invention, and will not be described in detail here.

[0187] The present invention also provides a computer-readable storage medium.

[0188] The computer-readable storage medium of the present invention stores a middleware program repair program, and when the middleware program repair program is executed by a processor, the steps of the middleware program repair method described above are implemented.

[0189] The method implemented when the middleware program repair program running on the processor is executed can refer to various embodiments of the middleware program repair method of the present invention, and will not be described in detail here.

[0190] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0191] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0192] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course 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 is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0193] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A middleware program repair method, characterized in that: The middleware program repair method comprises the following steps: Obtain function name information and patch list information of the middleware function in the middleware program; Detecting whether the function name information is stored in the patch list information; If the function name information is stored in the patch list information, performing a corresponding repair operation on the middleware function according to the function name information and the patch list information; If the function name information is stored in the patch list information, the step of performing a corresponding repair operation on the middleware function according to the function name information and the patch list information comprises: If the function name information is stored in the patch list information, determining the function name information stored in the patch list information as the repair name information; Determine the middleware function corresponding to the repair name information as a repair function; Acquire patch address information corresponding to the repair name information according to the patch list information; When the repair function is running, running the repair function through the patch address information; After the step of obtaining the function name information and patch list information of all middleware functions in the middleware program, the method further includes: Get the function module information of the middleware function in the middleware program; Detecting whether the function module information is stored in the patch list information; If the function module information is stored in the patch list information, filtering the patch list information to generate module filtering list information; The step of detecting whether the function name information is stored in the patch list information comprises: Detecting whether the function name information is stored in the module screening list information; If the function name information is stored in the patch list information, the step of determining the function name information stored in the patch list information as the repair name information includes: If the function name information is stored in the module filtering list information, determining the function name information stored in the module filtering list information as the repair name information; After the step of obtaining the function module information of the middleware function in the middleware program, the method further comprises: Get the function process information of the middleware function in the middleware program; Detecting whether the function process information is stored in the patch list information; If the function process information is stored in the patch list information, filtering the patch list information to generate process filtering list information; The step of detecting whether the function module information is stored in the patch list information comprises: Detecting whether the function module information is stored in the process screening list information; If the function module information is stored in the patch list information, the step of filtering the patch list information to generate module filtering list information includes: If the function module information is stored in the process filtering list information, the process filtering list information is filtered to generate module filtering list information.

2. The middleware program repair method according to claim 1, characterized in that: Before the step of obtaining the function name information and patch list information of all middleware functions in the middleware program, the method includes: Send patch file acquisition instructions to the server; Receiving the patch repair file returned by the server according to the patch file acquisition instruction; The patch list information is generated according to the patch repair file.

3. The middleware program repair method according to claim 1, characterized in that: When the repair function is executed, before the step of executing the repair function through the patch address information, the method includes: Preloading the repair function through the patch address information to obtain a preloading result; Detecting whether the preloaded result is a normal execution result; If the preloading result is a normal execution result, the process proceeds to the step of running the repair function through the patch address information when the repair function is run.

4. The middleware program repair method according to claim 3, characterized in that: After the step of detecting whether the preloading result is a normal execution result, the method further comprises: If the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information; If the patch address information is normal address information, a program repair failure instruction is generated and sent to the server.

5. The middleware program repair method according to claim 4, characterized in that: If the preloading result is an abnormal execution result, after the step of detecting whether the patch address information is normal address information, the method further comprises: If the patch address information is abnormal address information, when the repair function is executed, the repair function is executed based on the function address information corresponding to the function name information.

6. A middleware program repair device, characterized in that: The middleware program repairing device comprises: a memory, a processor, and a middleware program repairing program stored in the memory and running on the processor. When the middleware program repairing program is executed by the processor, the steps of the middleware program repairing method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a middleware program repair program, which implements the steps of the middleware program repair method according to any one of claims 1 to 5 when executed by a processor.