CN113282458A - Anti-flash-back method and device for application program, electronic equipment and storage medium - Google Patents

Anti-flash-back method and device for application program, electronic equipment and storage medium Download PDF

Info

Publication number
CN113282458A
CN113282458A CN202110572895.6A CN202110572895A CN113282458A CN 113282458 A CN113282458 A CN 113282458A CN 202110572895 A CN202110572895 A CN 202110572895A CN 113282458 A CN113282458 A CN 113282458A
Authority
CN
China
Prior art keywords
flash
event
data
target
flash back
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
CN202110572895.6A
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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou 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 Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202110572895.6A priority Critical patent/CN113282458A/en
Publication of CN113282458A publication Critical patent/CN113282458A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses an anti-flash method and device for an application program, electronic equipment and a storage medium. The method comprises the following steps: monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state. According to the technical scheme of the embodiment of the invention, the occurrence of the flash quit event can be prevented when the flash quit event is just triggered, and the flash quit rate of the production environment is reduced; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.

Description

Anti-flash-back method and device for application program, electronic equipment and storage medium
Technical Field
The present invention relates to computer technologies, and in particular, to an anti-flash method and apparatus, an electronic device, and a storage medium.
Background
The flash back rate is very important in the quality index and the use experience of an App (application program), and how to effectively reduce the flash back rate of the App is an important link for improving the performance of the App. Currently, code robustness is generally improved by means of code review or code scanning, or the flash back rate of the App in a production environment is reduced by means of improving the coverage rate of test cases.
However, code robustness is improved by code review or code scanning, which still relies on manpower and is not applicable to apps with fast iteration rhythms. And the mode of improving the coverage rate of the test cases is continuously iterated along with the service, so that the maintenance cost is higher and higher. The above two modes cannot avoid problems caused by more complex use environments, for example, unpredictable operation of the user and network environment may cause the App to flash back.
Therefore, it is an urgent problem to provide an effective anti-flash method for application programs.
Disclosure of Invention
The embodiment of the invention provides an anti-flash-back method, an anti-flash-back device, electronic equipment and a storage medium of an application program, so that when a flash-back event is just triggered, the flash-back event is prevented from occurring, and the flash-back rate of a production environment is reduced; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
In a first aspect, an embodiment of the present invention provides an anti-flash method for an application program, which may include:
monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event;
determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data;
and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state.
In a second aspect, an embodiment of the present invention further provides an anti-rollback apparatus for an application program, where the apparatus may include:
the monitoring module is used for monitoring the running condition, and when the situation that a flash back event of an application program is triggered is monitored, target flash back data which cause the flash back event is determined based on the triggered flash back event;
the determining module is used for determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data;
and the replacing module is used for replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state.
In a third aspect, an embodiment of the present invention further provides an electronic device, which may include:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing the application program from being flashed provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for preventing a flash back of an application program provided in any embodiment of the present invention.
The embodiment of the invention provides an anti-flash-back method of an application program, which comprises the steps of monitoring the running condition, and when the flash-back event of the application program is triggered, determining target flash-back data causing the flash-back event based on the triggered flash-back event before the flash-back of the application program; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; target flash back data causing flash back events are replaced by target bottom data, so that the application program is not executed according to the target flash back data any more, but the target bottom data capable of enabling the application program to normally run is executed. Therefore, the embodiment of the invention prevents the occurrence of the flash quit event when the flash quit event is just triggered, and reduces the flash quit rate of the production environment; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
In addition, the anti-flash device, the electronic equipment and the storage medium of the application program provided by the invention correspond to the method, and have the same beneficial effects.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of an anti-flash method for an application according to an embodiment of the present invention;
FIG. 2 is a flowchart of another anti-rollback method for an application according to an embodiment of the present invention;
fig. 3 is a flowchart of an anti-flash method in an application scenario according to an embodiment of the present invention;
fig. 4 is a structural diagram of an anti-flash apparatus for an application according to an embodiment of the present invention;
fig. 5 is a schematic configuration diagram of an anti-flash apparatus according to an embodiment of the present invention;
fig. 6 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The core of the invention is to provide a method, a device, electronic equipment and a storage medium for preventing flash back of an application program, so that when a flash back event is just triggered, the flash back event is prevented from occurring, and the flash back rate of a production environment is reduced; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Example one
Fig. 1 is a flowchart of an anti-flash method for an application according to an embodiment of the present invention. The method can be executed by the anti-flash device of the application program provided by the embodiment of the invention, the device can be realized by software and/or hardware, and the device can be integrated on various user terminals or servers.
As shown in fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s101, monitoring the running condition, and determining target flash back data which cause the flash back event based on the triggered flash back event when the flash back event of the application program is triggered.
In a specific embodiment, after the application program is started, the running condition of the application program is monitored. Specifically, the running condition of the application program may be monitored after the application program is started and the function configuration is completed. When it is monitored that the flash back event of the application program is triggered, the flash back condition is shown to occur after the application program, and at the moment, the flash back information of the flash back event can be determined based on the triggered flash back event. Optionally, the flash-back information may include a flash-back type of the flash-back event, a flash-back identifier, a flash-back event name, and corresponding target flash-back data that causes the flash-back event to occur. And determining target flash quit data which causes the flash quit event based on the flash quit information of the flash quit event.
Specifically, the flash quit types may include a start-up stage continuous flash quit protection, an unknown message flash quit, a collective type operation flash quit, an asynchronous operation UI flash quit, a flash quit caused by a KVO irregular operation, a flash quit not removed by a notification of iOS 8 or less, a flash quit of a wild pointer and a memory leak caused by a timer, a flash quit caused by a string irregular operation, and a wild pointer flash quit of an emulated zombie mode.
Further, the number of the determined target flash back data may be one or several. The method comprises the steps of detecting a triggered flash-back event, determining the quantity of flash-back data causing the flash-back event, and determining each flash-back data as target flash-back data if at least two flash-back data simultaneously cause the flash-back event to be triggered.
S102, determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data;
in implementations, at least one alternative bibliographic data may be pre-stored. The alternative bottom-pocketed data may be repair data used to repair the flash-back data and prevent the flash-back event from continuing. And determining alternative bottom-finding data matched with the target flash backing data as target bottom-finding data in the at least one alternative bottom-finding data. Specifically, the target bottom data may be determined from the at least one alternative bottom data based on the flash quit information of the flash quit event.
Illustratively, the flash quitting information includes flash quitting types of flash quitting events, and the pocket bottom types corresponding to the alternative pocket bottom data are acquired. And determining a pocket bottom type matched with the flash quitting type of the flash quitting event as a target pocket bottom type in each pocket bottom type, and determining alternative pocket bottom data corresponding to the target pocket bottom type as target pocket bottom data.
S103, replacing target flash backing data causing the flash backing event with target bottom data to keep the application program in a normal running state.
Optionally, the embodiment of the present invention further includes monitoring the running condition of the application program based on a pre-configured hook function. After the target bottom-finding function is determined, the replacement operation between the target flash backing data and the target bottom-finding data can be completed based on the pre-configured hook function.
Specifically, after the application program is started, the hook function may be configured in advance for the application program. Further, the type of each flashback event may be preconfigured with at least one hook function corresponding thereto. When it is monitored that the flash back event is triggered, a target hook function is determined in at least one pre-configured hook function based on the flash back type of the triggered flash back event, and the target hook function is executed to complete replacement operation of target flash back data and target bottom data.
The embodiment of the invention provides an anti-flash-back method of an application program, which comprises the steps of monitoring the running condition, and when the flash-back event of the application program is triggered, determining target flash-back data causing the flash-back event based on the triggered flash-back event before the flash-back of the application program; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; target flash back data causing flash back events are replaced by target bottom data, so that the application program is not executed according to the target flash back data any more, but the target bottom data capable of enabling the application program to normally run is executed. Therefore, the embodiment of the invention prevents the occurrence of the flash quit event when the flash quit event is just triggered, and reduces the flash quit rate of the production environment; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
Example two
Fig. 2 is a flowchart of an anti-flash method for an application according to an embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. Optionally, before determining, based on the triggered flashback event, target flashback data that causes the occurrence of a flashback event, the method further includes: determining whether a flash back event needs protection processing; if so, performing the operation of determining target flash back data causing the flash back event based on the triggered flash back event. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 2, the method of the embodiment of the present invention specifically includes the following steps:
s201, monitoring an operation condition, and when it is monitored that a flash back event of an application program is triggered, determining whether the flash back event needs protection processing; if so, the process proceeds to S202.
In an implementation, when it is monitored that a flash back event of an application program is triggered, it may be first determined whether the triggered flash back event needs to be protected. Determining whether a flash back event requires protection processing, comprising: determining whether event information of a flash back event exists in a preset protection cache table; if the event information exists, determining whether the flash quit event is an anti-flash event based on the event information in the protection cache table; and if the event needs to be prevented from flashing, determining that the event needs to be protected during flashing back.
Specifically, a protection cache table may be preset, the protection cache table records at least one flash quit event of a flash quit type, and may check whether each flash quit event has corresponding event information, and determine whether the flash quit event is an anti-flash event according to the event information if the event information exists. Further, the event information includes identification information for marking whether the flash quit event is an anti-flash event, and the event information can be embodied in the forms of characters, characters and the like.
Optionally, if there is no corresponding event information in the flash quit event in the protection cache table, whether the flash quit event needs to be protected or not may be determined based on the flash quit type of the flash quit event. And acquiring the flash back type of the flash back event, and determining whether the flash back type is a preset support anti-flash back type.
Specifically, the type of the current anti-flash-back-supporting flash-back event can be preset, and if the acquired type of the current triggered flash-back event is the preset anti-flash-back-supporting type, it can be determined that the flash-back event needs to be protected; if the acquired flash back type of the currently triggered flash back event is not the preset anti-flash back supporting type, the flash back event can be determined as the anti-flash back not supporting type.
Furthermore, when the flash quit event is determined to be a flash quit event which does not support the anti-flash quit type, the flash quit event and the corresponding event type, the target flash quit data and other contents can be recorded in a system log, so that subsequent maintenance personnel can conveniently check the flash quit event. And can generate notification information for prompting that the current flash back event does not support flash back prevention for feedback.
Optionally, before it is determined that the flash quit event needs to be protected, for the flash quit event determined to support the anti-flash quit type, determining whether a preset protection-free event list contains the flash quit event based on the flash quit event; if the flash quit event exists in the preset protection-free event list, it indicates that no protection measures are needed for the flash quit event, and the flash quit event is allowed to occur. If the protection-free event list does not contain the flash quit event, the flash quit event can be protected.
Optionally, after determining whether the flash back event needs to be protected, the flash back event and a determination result for determining whether the flash back event needs to be protected may be recorded in the protection cache table. Therefore, when the flash back event is triggered later, whether the flash back event needs to be protected or not can be directly determined according to the record in the protection cache table, and judgment is not needed.
Optionally, when determining whether the flash back event needs to be protected, the protection function may be determined by determining whether the protection function is started. When the protection function is not started, the flash back event is directly determined not to need protection. Further, notification information for prompting that the protection function is not started can be generated and fed back.
S202, determining target flash backing data which cause the flash backing event to occur based on the triggered flash backing event;
and S203, replacing target flash backing data causing the flash backing event with target bottom data so as to keep the application program in a normal running state.
Optionally, the embodiment of the present invention further includes monitoring the running condition of the application program based on a pre-configured hook function. After the target bottom-finding function is determined, the replacement operation between the target flash backing data and the target bottom-finding data can be completed based on the pre-configured hook function. Illustratively, the hook function includes a forwardingtargetForSelector function, a removeObserver: name: object: function, an addObserver: selector: name: object: function, and the like.
In the embodiment of the invention, for the flash quitting event without event information in the protection cache table, whether the flash quitting event is protected or not is determined by judging whether the flash quitting type of the flash quitting event is a support anti-flash quitting type or not and whether the flash quitting event exists in a protection-free event list or not, so that the flexibility of the anti-flash quitting operation is improved; and a cache mechanism is set, and the determined result is recorded in a cache table, so that the time for anti-flash back operation is saved.
EXAMPLE III
The embodiment of the method for preventing the flash back of the application program is described in detail above, and in order to make the technical solution of the method further clear to those skilled in the art, a specific application scenario is given below.
Fig. 3 is a flowchart of an anti-flash method in an application scenario according to an embodiment of the present invention; as shown in fig. 3, after the APP triggers a flash event, a class name corresponding to the flash exit event may be used as a key, a value used for reflecting whether the flash exit event is a flash exit event to be protected in a pre-stored protection type cache table is read, whether the triggered flash exit event exists in the protection cache table is determined, and if the triggered flash exit event exists, the flash exit event is a hit. If not, it is a miss.
When the flash back event in the protection type cache table is hit, whether the flash back event needs to be protected or not is determined according to the value of the flash back event in the protection type cache table, and if the flash back event needs to be protected, a protection process is started. And if the protection is not needed, exiting the protection process to enable the App to normally flash back. After the protection process is entered, the abnormal data causing the flash back event can be replaced by the prestored bottom data and then the execution is continued. Meanwhile, the callback is notified to the App using terminal, so that a user can process own logic in the callback, for example, a protection result is reported to a log platform to prompt the user and the like, the App is kept running normally, and the flash back is avoided.
When the flash quit event in the protection type cache table is not hit, firstly judging whether the current protection is started or not, and if the current protection is started, further judging whether the flash quit type of the flash quit event is a supported protection type or not; if the protection is not opened, the flash quit event does not need to be protected, and the class name of the flash quit event which does not need to be protected can be used as a key to store the value of the protection type cache table, wherein the value indicates that the protection is not needed. And quitting the protection process to enable the App to normally flash back.
If the flash quit type of the flash quit event is judged to be the supported protection type, further judging whether the flash quit event is in a protection-free list; and if the flash quit type of the flash quit event is judged not to be the supported protection type, the class name of the flash quit event which does not need protection is used as a key to store the value of the protection type cache table, and the protection process is quitted, so that the App normally flashes quit.
If the flash quit event is judged not to be in the protection-free list, the value of the protection type cache table is stored by taking the class name as a key; and determining whether the flash quit event needs protection according to the value of the flash quit event in the protection type cache table, and if the flash quit event needs protection, determining that the flash quit event is the flash quit event needing protection, and entering a protection process. And if the protection is not needed, exiting the protection process to enable the App to normally flash back. If the flash quit event is judged to be in the protection-free list, the class name of the non-protection-free flash quit event is used as a key to store the value of the protection type cache table. And quitting the protection process to enable the App to normally flash back.
After the protection process is entered, the abnormal data causing the flash back event can be replaced by the prestored bottom data and then the execution is continued. Meanwhile, the callback is notified to the App using terminal, so that a user can process own logic in the callback, for example, a protection result is reported to a log platform to prompt the user and the like, the App is kept running normally, and the flash back is avoided. Specifically, in the protection type cache table, 1 may be used to indicate that the corresponding flash back event needs protection, and 0 may be used to indicate that the corresponding flash back event does not need protection. If the value corresponding to the triggered flash back event is 1, it is a hit.
In the embodiment of the invention, for the flash quitting event without event information in the protection cache table, whether the flash quitting event is protected or not is determined by judging whether the flash quitting type of the flash quitting event is a support anti-flash quitting type or not and whether the flash quitting event exists in a protection-free event list or not, so that the flexibility of the anti-flash quitting operation is improved; and a cache mechanism is set, and the determined result is recorded in a cache table, so that the time for anti-flash back operation is saved.
Example four
Fig. 4 is a structural diagram of an anti-flash apparatus for an application according to an embodiment of the present invention, the apparatus being configured to execute the anti-flash method for an application according to any of the embodiments. The device and the method for preventing the application program from being flashed back belong to the same inventive concept, and details which are not described in detail in the embodiment of the device for preventing the application program from being flashed back can refer to the embodiment of the method for preventing the application program from being flashed back. Referring to fig. 4, the apparatus may specifically include:
the monitoring module 10 is configured to monitor an operating condition, and when it is monitored that a flash back event of an application program is triggered, determine target flash back data that causes the flash back event based on the triggered flash back event;
the determining module 11 is configured to determine target bottom data corresponding to the target flash backing data from at least one pre-stored candidate bottom data;
and the replacing module 12 is used for replacing target flash backing data causing the flash backing event with target bottom-pocketed data so as to keep the application program in a normal running state.
On the basis of any one of the optional embodiments of the embodiment of the present invention, the apparatus further comprises:
the protection determining module is used for determining whether the flash quit event needs protection processing before determining target flash quit data which cause the flash quit event based on the triggered flash quit event; if so, performing an operation of determining target flash back data causing the flash back event based on the triggered flash back event.
On the basis of any optional implementation of the embodiments of the present invention, determining whether a protection module includes:
a first determining unit, configured to determine whether event information of the flash back event exists in a preset protection cache table; if the event information exists, determining whether the flash quit event is an anti-flash event to be prevented based on the event information in the protection cache table; and if the event needs to be prevented from flashing, determining that the flash quit event needs to be protected.
On the basis of any one of the optional embodiments of the embodiment of the present invention, the apparatus further comprises:
the flash quit type obtaining module is used for obtaining the flash quit type of the flash quit event and determining whether the flash quit type is a preset anti-flash quit supporting type if the event information does not exist; and if the type is the type supporting anti-flash back, determining that the flash back event needs to be protected.
On the basis of any one of the optional embodiments of the embodiment of the present invention, the apparatus further comprises:
determining whether a protection-free module is used for determining whether a preset protection-free event list contains the flash quit event or not based on the flash quit event if the type supports the anti-flash quit before the flash quit event is determined to need protection processing; and if not, determining that the flash back event needs protection processing.
On the basis of any one of the optional embodiments of the embodiment of the present invention, the apparatus further comprises:
and the recording module is used for recording the flash back event and a determination result for determining whether the flash back event needs to be subjected to protection processing into the protection cache table.
On the basis of any one of the optional embodiments of the embodiment of the present invention, the apparatus further comprises:
and the configuration hook function module is used for monitoring the running condition of the application program based on a pre-configured hook function.
In one embodiment, the configuration operation of the anti-flash device is required after the App is started. Fig. 5 is a schematic configuration diagram of an anti-flash apparatus according to an embodiment of the present invention; as shown in fig. 5, after the App is started, the apparatus for preventing flash back performs initialization operation, and configures a protectable flash back type in the apparatus for preventing flash back, specifically, the configuration of the protectable flash back type can be completed by storing a protection cache table. The protection storage table records a flash-back event, a flash-back type and corresponding event information. Furthermore, a report callback function is configured for the anti-flash fallback device, and when the anti-flash fallback is finishing the protection work, a callback is notified to a user terminal of the device, so that a user can process operations such as reporting the protection result to a log platform, prompting the user and the like in the callback. Further, starting a protection function of the anti-flash device, and performing a pre-embedded hook function on the configured protection type by using the runtime characteristic of Objective C; illustratively, the hook function includes a forwardingtargetForSelector function, a removeObserver: name: object: function, an addObserver: selector: name: object: function, and the like. And finally ending the configuration operation of anti-flash reverse rotation.
The embodiment of the invention can realize the following method: monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state. Therefore, the embodiment of the invention prevents the occurrence of the flash quit event when the flash quit event is just triggered, and reduces the flash quit rate of the production environment; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
It should be noted that, in the embodiment of the anti-flash device for an application program, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 20 suitable for use in implementing embodiments of the present invention. The illustrated electronic device 20 is merely an example and should not be used to limit the functionality or scope of embodiments of the present invention.
As shown in fig. 6, the electronic device 20 is embodied in the form of a general purpose computing device. The components of the electronic device 20 may include, but are not limited to: one or more processors or processing units 201, a system memory 202, and a bus 203 that couples the various system components (including the system memory 202 and the processing unit 201).
Bus 203 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 20 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 20 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 202 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)204 and/or cache memory 205. The electronic device 20 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, the storage system 206 may be used to read from and write to non-removable, nonvolatile magnetic media. A magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 203 by one or more data media interfaces. Memory 202 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 208 having a set (at least one) of program modules 207 may be stored, for example, in memory 202, such program modules 207 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 207 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The electronic device 20 may also communicate with one or more external devices 209 (e.g., keyboard, pointing device, display 210, etc.), with one or more devices that enable a user to interact with the electronic device 20, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 20 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 211. Also, the electronic device 20 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 212. As shown, the network adapter 212 communicates with other modules of the electronic device 20 over the bus 203. It should be understood that other hardware and/or software modules may be used in conjunction with electronic device 20, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 201 executes various functional applications and data processing by running a program stored in the system memory 202.
The electronic equipment provided by the invention can realize the following method: monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state. Therefore, the embodiment of the invention prevents the occurrence of the flash quit event when the flash quit event is just triggered, and reduces the flash quit rate of the production environment; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
EXAMPLE six
An embodiment of the present invention provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for anti-rollback of an application, the method including: monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event; determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data; and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state. Therefore, the embodiment of the invention prevents the occurrence of the flash quit event when the flash quit event is just triggered, and reduces the flash quit rate of the production environment; in addition, the embodiment of the invention does not need later maintenance, reduces the maintenance cost, is suitable for the flash back problem caused by different use environments, and has strong universality.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the anti-flash-back method for the application program provided by any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An anti-flash method for an application program, comprising:
monitoring the running condition, and when it is monitored that a flash back event of an application program is triggered, determining target flash back data causing the flash back event based on the triggered flash back event;
determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data;
and replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state.
2. The method of claim 1, further comprising, before the determining target flashback data causing the occurrence of the flashback event based on the flashback event being triggered:
determining whether the flash back event needs protection processing;
if so, performing an operation of determining target flash back data causing the flash back event based on the triggered flash back event.
3. The method of claim 2, wherein the determining whether the flashback event requires guard processing comprises:
determining whether event information of the flash back event exists in a preset protection cache table;
if the event information exists, determining whether the flash quit event is an anti-flash event to be prevented based on the event information in the protection cache table;
and if the event needs to be prevented from flashing, determining that the flash quit event needs to be protected.
4. The method of claim 3, further comprising:
if the event information does not exist, acquiring a flash back type of the flash back event, and determining whether the flash back type is a preset anti-flash back supporting type or not;
and if the type is the type supporting anti-flash back, determining that the flash back event needs to be protected.
5. The method of claim 4, prior to the determining that the flashback event requires guard processing, further comprising:
if the type is the type supporting anti-flash back, determining whether a preset protection-free event list contains the flash back event or not based on the flash back event;
and if not, determining that the flash back event needs protection processing.
6. The method of claim 5, further comprising:
and recording the flash back event and a determination result for determining whether the flash back event needs protection processing in the protection cache table.
7. The method of claim 1, further comprising:
and monitoring the running condition of the application program based on a pre-configured hook function.
8. An anti-flash device for an application, comprising:
the monitoring module is used for monitoring the running condition, and when the situation that a flash back event of an application program is triggered is monitored, target flash back data which cause the flash back event is determined based on the triggered flash back event;
the determining module is used for determining target bottom data corresponding to the target flash backing data in at least one pre-stored alternative bottom data;
and the replacing module is used for replacing target flash backing data causing the flash backing event with the target bottom-pocketed data so as to keep the application program in a normal running state.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement an anti-flash method for an application as recited in any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of anti-flash for an application program according to any one of claims 1 to 7.
CN202110572895.6A 2021-05-25 2021-05-25 Anti-flash-back method and device for application program, electronic equipment and storage medium Pending CN113282458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110572895.6A CN113282458A (en) 2021-05-25 2021-05-25 Anti-flash-back method and device for application program, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110572895.6A CN113282458A (en) 2021-05-25 2021-05-25 Anti-flash-back method and device for application program, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113282458A true CN113282458A (en) 2021-08-20

Family

ID=77281454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110572895.6A Pending CN113282458A (en) 2021-05-25 2021-05-25 Anti-flash-back method and device for application program, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282458A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088955A (en) * 2022-06-17 2023-05-09 荣耀终端有限公司 Process processing method and terminal equipment
CN116701134A (en) * 2022-10-14 2023-09-05 荣耀终端有限公司 Data processing method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263773A (en) * 2010-05-25 2011-11-30 腾讯科技(深圳)有限公司 Real-time protection method and apparatus thereof
CN109284217A (en) * 2018-09-28 2019-01-29 平安科技(深圳)有限公司 Application exception processing method, device, electronic equipment and storage medium
CN111367698A (en) * 2018-12-26 2020-07-03 北京微播视界科技有限公司 Application program flash back detection and processing method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263773A (en) * 2010-05-25 2011-11-30 腾讯科技(深圳)有限公司 Real-time protection method and apparatus thereof
CN109284217A (en) * 2018-09-28 2019-01-29 平安科技(深圳)有限公司 Application exception processing method, device, electronic equipment and storage medium
CN111367698A (en) * 2018-12-26 2020-07-03 北京微播视界科技有限公司 Application program flash back detection and processing method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088955A (en) * 2022-06-17 2023-05-09 荣耀终端有限公司 Process processing method and terminal equipment
CN116088955B (en) * 2022-06-17 2024-04-02 荣耀终端有限公司 Process processing method and terminal equipment
CN116701134A (en) * 2022-10-14 2023-09-05 荣耀终端有限公司 Data processing method and electronic equipment
CN116701134B (en) * 2022-10-14 2024-05-17 荣耀终端有限公司 Data processing method and electronic equipment

Similar Documents

Publication Publication Date Title
US11687653B2 (en) Methods and apparatus for identifying and removing malicious applications
CN109831420B (en) Method and device for determining kernel process permission
US10003606B2 (en) Systems and methods for detecting security threats
US10911447B2 (en) Application error fingerprinting
CN113282458A (en) Anti-flash-back method and device for application program, electronic equipment and storage medium
CN108920690B (en) Visual network security audit method and system
US8788230B2 (en) Methods, system, and computer-readable media for facility integrity testing
CN112035354B (en) Positioning method, device and equipment of risk codes and storage medium
CN111258850A (en) Method and device for updating software information based on Linux system
CN102271054A (en) Bookmarks and performance history for network software deployment evaluation
CN112988534A (en) Abnormal data processing method, device, equipment and storage medium
US9069951B2 (en) Inferring security decisions from trusted users
CN115102838B (en) Emergency processing method and device for server downtime risk and electronic equipment
CN116980186A (en) Abnormality determination method and device, electronic equipment and storage medium
CN116071152A (en) Data processing method and device, electronic equipment and storage medium
CN112464176B (en) Authority management method and device, electronic equipment and storage medium
WO2021144978A1 (en) Attack estimation device, attack estimation method, and attack estimation program
CN113986295A (en) Data processing method and device, electronic equipment and storage medium
CN117220980A (en) Data security management system
CN115878456A (en) Open source software model selection-evaluation platform and method
CN114780347A (en) Monitoring method, monitoring device, computer equipment and storage medium
US20210049216A1 (en) Replacing components of a data processing system
CN117828617A (en) Vulnerability detection method and device for application code
CN113515400A (en) Abnormity monitoring method and device for key information infrastructure
CN113608755A (en) Operating system deployment method, device and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210820