CN111399892A - Middleware program repairing method and device and computer readable storage medium - Google Patents

Middleware program repairing method and device and computer readable storage medium Download PDF

Info

Publication number
CN111399892A
CN111399892A CN202010194734.3A CN202010194734A CN111399892A CN 111399892 A CN111399892 A CN 111399892A CN 202010194734 A CN202010194734 A CN 202010194734A CN 111399892 A CN111399892 A CN 111399892A
Authority
CN
China
Prior art keywords
information
function
patch
repair
middleware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010194734.3A
Other languages
Chinese (zh)
Inventor
黎明德
林舜大
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN202010194734.3A priority Critical patent/CN111399892A/en
Publication of CN111399892A publication Critical patent/CN111399892A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a middleware program repairing method, which comprises the following steps: acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information. The invention also discloses a middleware program repairing device and a computer readable storage medium. The invention can realize the function of reducing the size of the patch-repaired file memory, the function of repairing the middleware program bug without an integral replacement method and the function of repairing the middleware program bug by dynamic loading.

Description

Middleware program repairing method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a middleware program repairing method, an apparatus and a computer-readable storage medium.
Background
The middleware program is a large class of basic software, belongs to the field of reusable software and is positioned between operating system software and user application software; the middleware program is software for calling an interface of an operating system software driver layer and causing an application layer of the application program to realize a function.
At present, the repair method for the middleware process program directly replaces the middleware program, and the whole middleware program needs to be modified and completely upgraded; this repair approach requires a reboot after the middleware repair is complete to be effective. When the defects of the middleware program need to be repaired or functions need to be added to the middleware, the operation of the middleware program and the operating system needs to be interrupted, and the normal operation of the middleware program and the application program is influenced.
Disclosure of Invention
The invention mainly aims to provide a middleware program repairing method, a device and a computer readable storage medium, aiming at realizing repairing of a middleware program bug without an integral replacement method.
In order to achieve the above object, the present invention provides a middleware program repairing method, including the steps of:
acquiring function name information and patch list information of a middleware function in a middleware program;
detecting whether the patch list information stores the function name information or not;
and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information.
Optionally, if the function name information is stored in the patch list information, executing a corresponding repair operation on the middleware function according to the function name information and the patch list information, including;
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;
determining the middleware function corresponding to the repair name information as a repair function;
acquiring patch address information corresponding to the repair name information according to the patch list information;
and when the repair function runs, running the repair function through the patch address information.
Optionally, after the step of obtaining the function name information and the patch list information of all the middleware functions in the middleware program, the method includes:
acquiring function module information of a middleware function in a middleware program;
detecting whether the patch list information stores the function module information or not;
if the function module information is stored in the patch list information, screening the patch list information to generate module screening list information;
the step of detecting whether the patch list information stores the function name information includes:
detecting whether the module screening list information stores the function name information or not;
the step of determining the function name information stored in the patch list information as repair name information if the function name information is stored in the patch list information includes:
and if the function name information is stored in the module screening list information, determining the function name information stored in the module screening list information as repair name information.
Optionally, after the step of obtaining function module information of a middleware function in the middleware program, the method includes:
acquiring function process information of a middleware function in a 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, screening the patch list information to generate process screening list information;
the step of detecting whether the patch list information stores the function module information includes:
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, screening the patch list information to generate module screening list information, including:
and if the function module information is stored in the process screening list information, screening the process screening list information to generate module screening list information.
Optionally, before the step of obtaining the function name information and the patch list information of all the middleware functions in the middleware program, the method includes:
sending a patch file acquisition instruction to a server;
receiving a patch repair file returned by the server according to the patch file acquisition instruction;
and generating the patch list information according to the patch repair file.
Optionally, before the step of running the repair function through the patch address information when the repair function is running, the method includes:
preloading the repair function through the patch address information to obtain a preloading result;
detecting whether the preloading result is a normal execution result;
and if the preloading result is a normal execution result, the step of running the repair function through the patch address information when the repair function runs is carried out.
Optionally, after the step of detecting whether the preloading result is a normal execution result, the method includes:
if the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;
and if the patch address information is normal address information, generating a program repair failure instruction, and sending the program repair failure instruction to a server.
Optionally, after the step of detecting whether the patch address information is normal address information if the preloading result is an abnormal execution result, the method includes:
and if the patch address information is abnormal address information, when the repair function runs, running the repair function based on the function address information corresponding to the function name information.
Further, to achieve the above object, the present invention provides a middleware program repair apparatus including: the device comprises a memory, a processor and a middleware program repair program which is stored on the memory and can run on the processor, wherein the middleware program repair program realizes the steps of the middleware program repair method when being executed by the processor.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a middleware program repair program which, when executed by a processor, implements the steps of the middleware program repair method as described above.
The invention provides a middleware program repairing method, a device and a computer readable storage medium, which are used for acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information. By the mode, the method can realize the function of reducing the size of the patch repair file memory, the function of repairing the middleware program bug without an integral replacement method, the function of repairing the middleware program bug by dynamic loading and the function of repairing the middleware program without restarting.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a middleware program repairing method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a middleware program repairing method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a middleware program repairing method according to a third embodiment of the present invention;
FIG. 5 is a flowchart illustrating a middleware program repairing method according to a fourth embodiment of the present invention;
FIG. 6 is a flowchart illustrating a fifth embodiment of a middleware process repairing method according to the present invention;
FIG. 7 is a flowchart illustrating a middleware program repairing method according to a sixth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information.
The existing repair method aiming at the middleware process program directly replaces the middleware program, needs to modify the whole middleware program and completely upgrades the whole middleware program; this repair approach requires a reboot after the middleware repair is complete to be effective. When the defects of the middleware program need to be repaired or functions need to be added to the middleware, the operation of the middleware program and the operating system needs to be interrupted, and the normal operation of the middleware program and the application program is influenced.
The invention aims to repair the middleware program bugs without an integral replacement method.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective 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, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Preferably, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a middleware program repair program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the middleware program repair program stored in the memory 1005 and perform the following operations:
acquiring function name information and patch list information of a middleware function in a middleware program;
detecting whether the patch list information stores the function name information or not;
and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
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;
determining the middleware function corresponding to the repair name information as a repair function;
acquiring patch address information corresponding to the repair name information according to the patch list information;
and when the repair function runs, running the repair function through the patch address information.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
acquiring function module information of a middleware function in a middleware program;
detecting whether the patch list information stores the function module information or not;
if the function module information is stored in the patch list information, screening the patch list information to generate module screening list information;
the step of detecting whether the patch list information stores the function name information includes:
detecting whether the module screening list information stores the function name information or not;
the step of determining the function name information stored in the patch list information as repair name information if the function name information is stored in the patch list information includes:
and if the function name information is stored in the module screening list information, determining the function name information stored in the module screening list information as repair name information.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
acquiring function process information of a middleware function in a 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, screening the patch list information to generate process screening list information;
the step of detecting whether the patch list information stores the function module information includes:
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, screening the patch list information to generate module screening list information, including:
and if the function module information is stored in the process screening list information, screening the process screening list information to generate module screening list information.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
sending a patch file acquisition instruction to a server;
receiving a patch repair file returned by the server according to the patch file acquisition instruction;
and generating the patch list information according to the patch repair file.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
preloading the repair function through the patch address information to obtain a preloading result;
detecting whether the preloading result is a normal execution result;
and if the preloading result is a normal execution result, the step of running the repair function through the patch address information when the repair function runs is carried out.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
if the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;
and if the patch address information is normal address information, generating a program repair failure instruction, and sending the program repair failure instruction to a server.
Further, the processor 1001 may call the middleware program repair program stored in the memory 1005, and also perform the following operations:
and if the patch address information is abnormal address information, when the repair function runs, running the repair function based on the function address information corresponding to the function name information.
Based on the hardware structure, the embodiment of the middleware program repairing method is provided.
The invention relates to a middleware program repairing method.
Referring to fig. 2, fig. 2 is a flowchart illustrating a middleware program repairing method according to a first embodiment of the present invention.
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:
step S10, acquiring function name information and patch list information of all middleware functions in the middleware program;
in this embodiment, before repairing the middleware program, when the middleware program runs, the middleware program repairing apparatus acquires function name information and function address information of all middleware functions in the middleware program, and the middleware program repairing apparatus acquires patch list information on a middleware program interface between the middleware program and a user application program; the middleware program consists of a plurality of middleware program categories, and each middleware program category consists of a plurality of middleware functions; the patch list information is stored on a middleware program interface between the middleware program and the user application program; wherein the function name information is the name of the middleware function; the function address information is information from which address the middleware function calls function data when executing. The patch list information is that when the middleware program repairing device detects that a patch file in the middleware program repairing device needs to be updated, the middleware program repairing device sends a patch file obtaining instruction to the cloud server, the middleware program repairing device sends the patch file obtaining instruction to the cloud server, and the cloud server searches for the patch repairing file corresponding to the patch file obtaining instruction according to the patch file obtaining instruction; the cloud server sends the found patch repair file to the middleware program repair device, the middleware program repair device receives the patch repair file returned by the cloud server according to the patch file acquisition instruction, and the middleware program repair device generates the patch repair file according to the patch repair file after receiving the patch repair file.
Step S20, detecting whether the patch list information stores the function name information;
in this embodiment, after acquiring the function name information and the patch list information, the middleware program repairing apparatus reads the patch list information, and detects whether the patch list information stores the function name information, that is, the middleware program repairing apparatus detects whether the patch list information has the patch name information that is the same as the function name information; the patch list information comprises 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, wherein each patch name information, patch module information, patch process information and patch address information are stored on a middleware program interface between a middleware program and a user application program in a table form, and the patch name information, the patch module information, the patch process information and the patch address information have corresponding relations. The patch name information is information of the name of the patch function, the patch module information is information of which running module the patch function is in, the patch process information is information of which running process the patch function is in, and the patch address information is information of an address which needs to be called when the patch function is executed. 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.
After the step S20 detects whether the function name information is stored in the patch list information, the method may include:
a1, if the patch list information does not store the function name information, determining the middleware function corresponding to the function name information as a normal function, and reading function address information corresponding to the function name information according to the middleware function;
step a2, when the normal function is running, running the normal function through the function address information.
In this embodiment, when the middleware program repair device detects that the patch list information does not store function name information, the middleware program repair device determines the middleware function corresponding to the function name information as a normal function, and the middleware program repair device reads function address information corresponding to the function name information according to the middleware function; when the normal function runs, the middleware program repairing device runs the normal function through the function address information.
Step S30, if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information;
in this embodiment, function name information is stored in the middleware program repair device detection patch list information, that is, when the middleware program repair device detection patch list information has patch name information that is the same as the function name information; and the middleware program repairing device executes corresponding repairing operation on the middleware function according to the function name information and the patch list information.
According to the scheme, the method comprises the steps of acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information. Therefore, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without a whole replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a middleware program repairing method according to a second embodiment of the present invention. Based on the above embodiment shown in fig. 2, if the patch list information stores the function name information, the step S30 may include performing a corresponding repair operation on the middleware function according to the function name information and the patch list information, where the repair operation includes:
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;
in this embodiment, function name information is stored in the middleware program repair apparatus detection patch list information; the middleware program repair device determines function name information stored in the patch list information as repair name information.
As an embodiment, in this embodiment, when the middleware program repair apparatus detects that there is patch name information identical to the function name information in the patch list information, the middleware program repair apparatus searches for the patch name information stored in the patch list information, the middleware program repair apparatus searches for the function name information identical to the patch name information, and the function name information searched by the middleware program repair apparatus is determined as the repair name information. The repair name information is function name information corresponding to a function needing to be repaired in the middleware function.
Step S32, determining the middleware function corresponding to the repair name information as a repair function;
in this embodiment, after the middleware program repair apparatus determines the repair name information, the middleware program repair apparatus determines a middleware function corresponding to the repair name information as a repair function; the repair function is a function needing repair in the middleware function.
Step S33, obtaining patch address information corresponding to the repair name information according to the patch list information;
in this embodiment, after the middleware program repair apparatus determines the repair function, the middleware program repair apparatus searches the patch list information for patch address information corresponding to the repair name information.
As an embodiment, in this embodiment, after the middleware program repairing apparatus determines the repairing function, the middleware program repairing apparatus searches the patch list information for the same patch name information as the repairing name information, and further searches the patch address information corresponding to the patch name information according to the patch name information.
And step S34, when the repair function runs, running the repair function through the patch address information.
In this embodiment, after the middleware program repair device acquires the patch address information, the middleware program repair device replaces the function address information to be called by the repair function with the call 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.
According to the scheme, the method comprises the steps of acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; 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; determining the middleware function corresponding to the repair name information as a repair function; acquiring patch address information corresponding to the repair name information according to the patch list information; and when the repair function runs, running the repair function through the patch address information. Therefore, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without a whole replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a middleware program repairing method according to a third embodiment of the present invention. Based on the above embodiment shown in fig. 3, after the step S10 obtains the function name information and the patch list information of all middleware functions in the middleware program, the method may include:
step S41, function module information of the middleware function in the middleware program is obtained;
in this embodiment, after acquiring the function name information and the patch list information, the middleware program repairing apparatus acquires function module information of all middleware functions in the middleware program; the function module information is information of which running module the middleware function is in.
Step S42, detecting whether the patch list information stores the function module information;
in this embodiment, after the middleware program repair device acquires the function module information, the middleware program repair device detects whether the patch list information stores the function module information.
Step S43, if the patch list information stores the function module information, filtering the patch list information to generate module filtering list information;
in this embodiment, when the middleware program repair device detects that the function module information is stored in the patch list information, the middleware program repair device recombines the patch list information including the function module information in a certain row, and screens out the module screening list information including the function module information in a certain row. The module screening list information is a list with function module information in each row.
As an embodiment, in this embodiment, when the middleware program repairing apparatus detects that there is patch module information identical to the function module information in the patch list information, the middleware program repairing apparatus finds the patch module information stored in the patch list information, and filters the patch name information, the patch address information, and the patch module information corresponding to the function module information (part of the patch module information, the filtered patch module information) in the patch list information, and filters the patch name information, the patch address information, and the patch module information to obtain the module filtering list information.
Step S20 detects whether the patch list information stores the function name information, which may include:
step S21, detecting whether the module filter list information stores the function name information;
in this embodiment, after the middleware program repairing apparatus obtains the module filter list information, the middleware program repairing apparatus detects whether the module filter list information stores function name information.
If the function name information is stored in the patch list information, the step S31 may determine the function name information stored in the patch list information as repair name information, and include:
step S311, if the function name information is stored in the module filter list information, determining the function name information stored in the module filter list information as repair name information.
In this embodiment, function name information is stored in the screening list information of the middleware program repair apparatus detection module; the middleware program repair apparatus determines function name information stored in the module filtering list information as repair name information.
As an implementation manner, in this embodiment, when the middleware program repairing apparatus detects that there is patch name information identical to the function name information in the module filter list information, the middleware program repairing apparatus searches for the patch name information stored in the module filter list information, the middleware program repairing apparatus searches for the function name information identical to the patch name information, and the function name information searched by the middleware program repairing apparatus is determined as the repair name information.
According to the scheme, the method comprises the steps of acquiring function name information and patch list information of a middleware function in a middleware program; acquiring function module information of a middleware function in a middleware program; detecting whether the patch list information stores the function module information or not; if the function module information is stored in the patch list information, screening the patch list information to generate module screening list information; detecting whether the module screening list information stores the function name information or not; if the function name information is stored in the module screening list information, determining the function name information stored in the module screening list information as repair name information; determining the middleware function corresponding to the repair name information as a repair function; acquiring patch address information corresponding to the repair name information according to the patch list information; and when the repair function runs, running the repair function through the patch address information. Therefore, the time for inquiring the information of the function name is saved, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without an integral replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
Further, referring to fig. 5, fig. 5 is a flowchart illustrating a middleware program repairing method according to a fourth embodiment of the present invention. Based on the above-mentioned embodiment shown in fig. 4, after the step S40 obtains the function module information of the middleware function in the middleware program, the method may include:
step S51, acquiring function progress information of a middleware function in the middleware program;
in this embodiment, after the middleware program repair device acquires the function module information, the middleware program repair device acquires the function progress information of all the middleware functions in the middleware program; the function process information is information of which running process the middleware function is in.
Step S52, detecting whether the patch list information stores the function process information;
in this embodiment, after the middleware program repair device acquires the function progress information, the middleware program repair device detects whether the patch list information stores the function progress information.
Step S53, if the function process information is stored in the patch list information, screening the patch list information to generate process screening list information;
in this embodiment, when the middleware program repair device detects that the function process information is stored in the patch list information, the middleware program repair device recombines the patch list information of a certain row containing the function process information, and screens out the process screening list information of a certain row containing the function process information. The process screening list information is a list in which each row has function process information.
As an implementation manner, in this embodiment, when the middleware program repairing apparatus detects that there is patch process information identical to the function process information in the patch list information, the middleware program repairing apparatus finds the patch process information stored in the patch list information, and filters the patch name information, the patch module information, the patch address information, and the patch process information corresponding to the function process information (part of the patch process information, the filtered patch process information) in the patch list information, so as to obtain the process filtering list information.
The step S42 of detecting whether the patch list information stores the function module information may include:
step S421, detecting whether the function module information is stored in the process screening list information;
in this embodiment, after the middleware program repairing apparatus obtains the process filter list information, the middleware program repairing apparatus detects whether the function module information is stored in the process filter list information.
Step S43, if the function module information is stored in the patch list information, the step of filtering the patch list information and generating module filtering list information includes:
step S431, if the function module information is stored in the process filtering list information, filtering the process filtering list information, and generating module filtering list information.
In this embodiment, when the middleware program repairing apparatus detects that the function module information is stored in the process screening list information, the middleware program repairing apparatus recombines the process screening list information of a certain row containing the function module information, and screens out the process screening list information of a certain row containing the function module information.
As an implementation manner, in this embodiment, when the middleware program repairing apparatus detects that there is patch module information identical to the function module information in the process screening list information, the middleware program repairing apparatus finds out the patch module information stored in the process screening list information, and screens the patch name information, the patch address information, and the patch module information corresponding to the function module information (part of the patch module information, the screened patch module information) in the process screening list information, and screens the patch name information, the patch address information, and the patch module information to obtain the module screening list information.
According to the scheme, the function process information of the middleware function in the middleware program is obtained; 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, screening the patch list information to generate process screening list information; detecting whether the function module information is stored in the process screening list information; and if the function module information is stored in the process screening list information, screening the process screening list information to generate module screening list information. Therefore, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without a whole replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
Further, referring to fig. 6, fig. 6 is a flowchart illustrating a fifth embodiment of the middleware program repairing method according to the present invention. Based on the above embodiments shown in fig. 2, fig. 3, fig. 4, or fig. 5, before the step S10 takes the function name information and the patch list information of all middleware functions in the middleware program, the method may include:
step S60, sending a patch file acquisition instruction to a server;
in this embodiment, when the middleware program repairing device detects that a patch file in the middleware program repairing device needs to be updated, the middleware program repairing device sends a patch file obtaining instruction to the cloud server.
Step S70, receiving a patch repair file returned by the server according to the patch file acquisition instruction;
in this embodiment, the middleware program repairing device sends a patch file acquiring instruction to the cloud server, and the cloud server searches for a patch repairing file corresponding to the patch file acquiring instruction according to the patch file acquiring instruction; and the cloud server sends the searched 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.
Step S80, generating the patch list information according to the patch repair file.
In this embodiment, after the middleware program repair apparatus receives the patch repair file, the middleware program repair apparatus generates patch list information from the patch repair file.
According to the scheme, the patch file acquisition instruction is sent to the server; receiving a patch repair file returned by the server according to the patch file acquisition instruction; and generating the patch list information according to the patch repair file. Therefore, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without a whole replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
Further, referring to fig. 7, fig. 7 is a flowchart illustrating a middleware program repairing method according to a sixth embodiment of the present invention. Based on the above embodiments shown in fig. 3, fig. 4, or fig. 5, after the step S33 obtains the patch address information corresponding to the repair name information according to the patch list information, the method may include:
step S35, the repair function is preloaded through the patch address information to obtain a preloading result;
in this embodiment, after the middleware program repair device acquires 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 a preloading result of preloading the repair function. The preloading is to try running the repair function in the middleware program repair device.
Step S36, detecting whether the preloading result is a normal execution result;
in this embodiment, after the middleware program repair device obtains the preload result of preloading the repair function, the middleware program repair device detects whether the preload result is a normal execution result; the normal execution result is a result that the middleware program repair device can normally preload the repair function through the patch address information, and no error occurs.
After the step S36 detects whether the preloading result is a normal execution result, the method may include:
step b1, if the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;
and b2, if the patch address information is normal address information, generating a program repair failure instruction, and sending the program repair failure instruction to the server.
In this embodiment, when the middleware program recovery apparatus detects that the preloading result is not the normal execution result, the middleware program recovery apparatus detects whether the patch address information is the normal address information; when the middleware program repairing device detects that the patch address information is normal address information, the reason of the middleware program repairing failure is that the patch address information is wrong, the middleware program repairing device generates a program repairing failure instruction, the middleware program repairing device sends the program repairing failure instruction to the server, the server receives the program repairing failure instruction, the manager receives the message of the middleware program repairing failure through the server, and the manager searches the reason of the middleware program repairing failure.
If the preloading result is an abnormal execution result, the step b2 may include, after detecting whether the patch address information is normal address information:
and c, if the patch address information is abnormal address information, operating the repair function based on the function address information corresponding to the function name information when the repair function operates.
In this embodiment, when the middleware program recovery device detects that the patch address information is not the normal address information, the middleware program recovery device determines that the reason of the failure in the program preloading is that the patch function is abnormal, and at this time, in order to avoid the abnormal operation of the middleware program, when the recovery function operates, the middleware program recovery device operates the recovery function through the function address information corresponding to the function name information; and the middleware program repairing device generates a patch downloading abnormal instruction and sends the patch downloading abnormal instruction to the server.
Step S37, 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 embodiment, when the middleware program repairing apparatus detects that the preloading result is the normal execution result, step S34 is executed.
According to the scheme, the method comprises the steps of acquiring function name information and patch list information of a middleware function in a middleware program; detecting whether the patch list information stores the function name information or not; 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; determining the middleware function corresponding to the repair name information as a repair function; acquiring patch address information corresponding to the repair name information according to the patch list information; preloading the repair function through the patch address information to obtain a preloading result; detecting whether the preloading result is a normal execution result; and if the preloading result is a normal execution result, the step of running the repair function through the patch address information when the repair function runs is carried out. Therefore, the function of reducing the size of the patch repair file memory is realized, the function of repairing the middleware program bug without a whole replacement method is realized, the function of repairing the middleware program bug by dynamic loading is realized, and the function of repairing the middleware program is realized under the condition of not restarting.
The invention also provides a device for restoring the middleware program.
The middleware program repair device comprises: the device comprises a memory, a processor and a middleware program repair program which is stored on the memory and can run on the processor, wherein the middleware program repair program realizes the steps of the middleware program repair method when being executed by the processor.
The method implemented when the middleware program repair program running on the processor is executed may refer to each embodiment of the middleware program repair method of the present invention, and details are not described herein again.
The invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention has stored thereon a middleware program repair program which, when executed by a processor, implements the steps of the middleware program repair method as described above.
The method implemented when the middleware program repair program running on the processor is executed may refer to each embodiment of the middleware program repair method of the present invention, and details are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A middleware program repairing method is characterized by comprising the following steps:
acquiring function name information and patch list information of a middleware function in a middleware program;
detecting whether the patch list information stores the function name information or not;
and if the patch list information stores the function name information, executing corresponding repair operation on the middleware function according to the function name information and the patch list information.
2. The middleware program repairing method according to claim 1, wherein if said patch list information stores said function name information, said step of performing a corresponding repairing operation on said middleware function according to said function name information and said patch list information includes;
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;
determining the middleware function corresponding to the repair name information as a repair function;
acquiring patch address information corresponding to the repair name information according to the patch list information;
and when the repair function runs, running the repair function through the patch address information.
3. The middleware program repairing method according to claim 2, wherein said step of obtaining function name information and patch list information of all middleware functions in said middleware program, after said step, comprises:
acquiring function module information of a middleware function in a middleware program;
detecting whether the patch list information stores the function module information or not;
if the function module information is stored in the patch list information, screening the patch list information to generate module screening list information;
the step of detecting whether the patch list information stores the function name information includes:
detecting whether the module screening list information stores the function name information or not;
the step of determining the function name information stored in the patch list information as repair name information if the function name information is stored in the patch list information includes:
and if the function name information is stored in the module screening list information, determining the function name information stored in the module screening list information as repair name information.
4. The middleware program repairing method according to claim 3, wherein said step of obtaining function module information of a middleware function in the middleware program is followed by:
acquiring function process information of a middleware function in a 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, screening the patch list information to generate process screening list information;
the step of detecting whether the patch list information stores the function module information includes:
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, screening the patch list information to generate module screening list information, including:
and if the function module information is stored in the process screening list information, screening the process screening list information to generate module screening list information.
5. The middleware program repairing method according to any one of claims 1 to 4, wherein the step of obtaining the function name information and the patch list information of all the middleware functions in the middleware program is preceded by:
sending a patch file acquisition instruction to a server;
receiving a patch repair file returned by the server according to the patch file acquisition instruction;
and generating the patch list information according to the patch repair file.
6. The middleware program repairing method according to any one of claims 2 to 4, wherein before the step of running the repairing function by the patch address information when the repairing function is running, comprising:
preloading the repair function through the patch address information to obtain a preloading result;
detecting whether the preloading result is a normal execution result;
and if the preloading result is a normal execution result, the step of running the repair function through the patch address information when the repair function runs is carried out.
7. The middleware program repairing method according to claim 6, wherein said step of detecting whether said preloading result is a normal execution result, is followed by:
if the preloading result is an abnormal execution result, detecting whether the patch address information is normal address information;
and if the patch address information is normal address information, generating a program repair failure instruction, and sending the program repair failure instruction to a server.
8. The middleware program repairing method according to claim 7, wherein after the step of detecting whether the patch address information is normal address information if the preloading result is an abnormal execution result, the method includes:
and if the patch address information is abnormal address information, when the repair function runs, running the repair function based on the function address information corresponding to the function name information.
9. A middleware program repair apparatus, comprising: memory, a processor and a middleware program repair program stored on the memory and running on the processor, the middleware program repair program when executed by the processor implementing the steps of the middleware program repair method according to any one of claims 1 to 8.
10. A computer-readable storage medium, having stored thereon a middleware program repair program which, when executed by a processor, implements the steps of the middleware program repair method according to any one of claims 1 to 8.
CN202010194734.3A 2020-03-18 2020-03-18 Middleware program repairing method and device and computer readable storage medium Pending CN111399892A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010194734.3A CN111399892A (en) 2020-03-18 2020-03-18 Middleware program repairing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010194734.3A CN111399892A (en) 2020-03-18 2020-03-18 Middleware program repairing method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111399892A true CN111399892A (en) 2020-07-10

Family

ID=71432624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010194734.3A Pending CN111399892A (en) 2020-03-18 2020-03-18 Middleware program repairing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111399892A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885808A (en) * 2014-04-08 2014-06-25 北京奇虎科技有限公司 Hotfix processing method and device
US20150007156A1 (en) * 2013-06-26 2015-01-01 Sap Ag Injecting patch code at runtime
CN105786537A (en) * 2014-12-24 2016-07-20 中兴通讯股份有限公司 Hot patch realization method and device
CN106775671A (en) * 2016-11-30 2017-05-31 武汉虹信通信技术有限责任公司 A kind of hot patch restorative procedure in the linux environment for communication system
CN107329781A (en) * 2017-06-21 2017-11-07 努比亚技术有限公司 The hot restorative procedure of software, terminal, system and computer-readable recording medium
WO2019047142A1 (en) * 2017-09-08 2019-03-14 深圳市汇顶科技股份有限公司 Method for program patching, device, micro control unit, and terminal device
CN110795128A (en) * 2019-10-30 2020-02-14 上海米哈游天命科技有限公司 Program bug fixing method and device, storage medium and server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150007156A1 (en) * 2013-06-26 2015-01-01 Sap Ag Injecting patch code at runtime
CN103885808A (en) * 2014-04-08 2014-06-25 北京奇虎科技有限公司 Hotfix processing method and device
CN105786537A (en) * 2014-12-24 2016-07-20 中兴通讯股份有限公司 Hot patch realization method and device
CN106775671A (en) * 2016-11-30 2017-05-31 武汉虹信通信技术有限责任公司 A kind of hot patch restorative procedure in the linux environment for communication system
CN107329781A (en) * 2017-06-21 2017-11-07 努比亚技术有限公司 The hot restorative procedure of software, terminal, system and computer-readable recording medium
WO2019047142A1 (en) * 2017-09-08 2019-03-14 深圳市汇顶科技股份有限公司 Method for program patching, device, micro control unit, and terminal device
CN110192178A (en) * 2017-09-08 2019-08-30 深圳市汇顶科技股份有限公司 Method, apparatus, micro-control unit and the terminal device of program patch installing
CN110795128A (en) * 2019-10-30 2020-02-14 上海米哈游天命科技有限公司 Program bug fixing method and device, storage medium and server

Similar Documents

Publication Publication Date Title
CN108768875B (en) Application gray level publishing method and device and computer readable storage medium
US11010227B2 (en) Exception stack information acquisition method and device and computer-readable storage medium
CN109683967B (en) Firmware support method, device, mobile terminal and readable storage medium
CN107679058B (en) Data synchronization method, device and computer readable storage medium
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN108196968B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108052430B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN111538523A (en) Differential upgrading method, device and storage medium
CN110502263B (en) Upgrade package manufacturing method, system and computer readable storage medium
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
CN108235101B (en) Smart television initialization method, smart television and computer readable storage medium
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN110321172B (en) Partition identification method, device, equipment and storage medium for network block equipment
CN111131861B (en) Upgrading method, terminal and storage medium for recovering partitions
CN111324491A (en) Program bug fixing method and device and computer readable storage medium
CN111399892A (en) Middleware program repairing method and device and computer readable storage medium
CN116719670B (en) Data processing method, electronic device and readable storage medium
CN108076200B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN108228423B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
US20160103687A1 (en) Display control device, and display control method
CN109032651B (en) Application updating method, intelligent terminal and computer readable storage medium
CN110321251B (en) Data backup method, device, equipment and storage medium based on network block equipment
CN109918340B (en) File processing method and terminal equipment
CN113656063A (en) System version replacing method, device, equipment and computer readable medium
CN111522564A (en) Method and device for identifying system upgrading state and computer readable storage medium

Legal Events

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