Method, device and electronic device for repairing application abnormal exit

By obtaining the location information in memory and reading the raw data from the disk when the application exits abnormally, the abnormal data is automatically repaired, solving the problem that existing technologies require user intervention and device restart, and achieving efficient application repair.

CN114153638BActive Publication Date: 2026-01-16HUAWEI DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010935534.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-08
Publication Date
2026-01-16
Estimated Expiration
2040-09-08

AI Technical Summary

Technical Problem

In existing technologies, when an application exits abnormally, user intervention and device restart are required, resulting in low repair efficiency and a poor user experience.

Method used

When an abnormal exit of the target application is detected, the location information of the data related to the abnormal exit in memory is obtained, the abnormal data is cleared, and the original data is read from the disk into memory to achieve automatic repair of the application.

Benefits of technology

It achieves efficient repair without user intervention or device restart, improving the repair efficiency and user experience of abnormal application exits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153638B_ABST
    Figure CN114153638B_ABST
Patent Text Reader

Abstract

The application provides a repair method, device and electronic equipment for application abnormal exit, the method comprising: when detecting that a target application program abnormally exits, obtaining first position information of first data related to the target application program abnormal exit in the memory, clearing the first data from the memory according to the first position information of the first data in the memory, and reading original data of the first data from the disk to the memory to realize fast repair of the target application program. The repair method of the application embodiment does not require user participation, does not require restarting the device, when the target application program abnormally exits, only the erroneous data, i.e. the first data, is repaired, without the need to reload all data of the target application program to the memory, the repair is more targeted, the data volume for repair is small, the repair efficiency is high, the target application program can be automatically repaired without the user and the application being aware, and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technical field, and particularly relates to an application abnormal exit repairing method and device and electronic equipment. BACKGROUND

[0002] When an application program runs, information of the application program needs to be read from a disk to a memory, and a processor accesses the information of the application program from the memory. However, when the processor accesses abnormal information of the application program, for example, accesses an abnormal code segment, the application program will abnormally exit. In some cases, the reason why the information of the application program is abnormal may be that, after the information is loaded from the disk to the memory, the information loaded to the memory is abnormal due to a hardware problem of the memory, or the information in the memory is maliciously tampered.

[0003] In order to solve the above technical problem, the currently adopted repairing method is that, when it is detected that the application program abnormally exits for multiple times within a certain time, a prompt box is popped up to prompt a user that the application program is abnormal. The user manually recovers the application program by restarting the device and the like.

[0004] The current repairing method needs the user to participate and needs to restart the device, and the repairing efficiency is low. SUMMARY

[0005] Embodiments of the present application provide an application abnormal exit repairing method, device and electronic equipment, to improve the repairing efficiency of the application abnormal exit.

[0006] In a first aspect, an application abnormal exit repairing method is provided, comprising: when it is detected that a target application program abnormally exits, obtaining first location information of first data in a memory, wherein the first data is read-only data related to the abnormal exit of the target application program; according to the first location information of the first data in the memory, clearing the first data from the memory; reading original data of the first data from a disk to the memory, and the original data of the first data is used for normal running of the target application program.

[0007] The repairing method of the embodiments of the present application does not need the user to participate and does not need to restart the device, and can automatically repair the target application program without the user and the target application program being aware of, and the repairing efficiency is high.

[0008] In some embodiments, the above obtaining the first location information of the first data in the memory comprises:

[0009] obtaining second location information of the original data of the first data in the disk;

[0010] obtaining the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

[0011] In some embodiments, when the first data is an instruction, the second location information of the original data of the first data in the disk comprises:

[0012] The second location information of the original data of the first data in the disk is obtained from a preset file.

[0013] In a possible implementation, before the second location information of the original data of the first data in the disk is obtained from the preset file, the method further comprises: obtaining a type of abnormal exit of the target application program from the preset file.

[0014] At this time, the second location information of the original data of the first data in the disk is obtained from the preset file, comprising: when the type of abnormal exit of the target application program is execution of the first data, the second location information of the original data of the first data in the disk is obtained from the preset file.

[0015] Optionally, the preset file can be generated when the target application program abnormally exits.

[0016] In the embodiments of the present application, the second location information of the original data of the first data in the disk comprises: information of a first file in the disk, and an address offset of the original data of the first data in the first file, and the first file is a file storing the original data of the first data.

[0017] Optionally, the information of the first file can be a storage path of the first file in the disk.

[0018] In some embodiments, the first location information of the first data in the memory is obtained according to the second location information of the original data of the first data in the disk, comprising:

[0019] According to the information of the first file, the first file is accessed in the disk;

[0020] According to the address offset of the original data of the first data in the first file, the third location information of the original data of the first data in the first file is obtained;

[0021] According to the mirror of the third location information in the memory, the first location information of the first data in the memory is obtained.

[0022] In some embodiments, the first data is cleared from the memory according to the first location information of the first data in the memory, comprising: the first data is cleared from the memory according to the first location information of the first data in the memory and a preset length of the first data.

[0023] In some embodiments, the reading the original data of the first data from the disk into the memory comprises: reading the original data of the first data from the disk into the memory when it is detected that the target application program is restarted.

[0024] The application exception exit repairing method provided by the embodiments of the present application comprises: detecting that a target application program abnormally exits; obtaining second location information of original data of first data in a disk; obtaining first location information of the first data in a memory according to the second location information of the original data of the first data in the disk; and clearing the first data from the memory according to the first location information of the first data in the memory, so as to accurately clear the error first data. In addition, when it is detected that the target application program is restarted, the original data of the first data is read from the disk into the memory, so that the processor can implement normal running of the target application program according to the original data of the first data. The whole repairing method does not need user participation, and does not need to restart the device, and can automatically repair the target application program, and has high repairing efficiency.

[0025] In a second aspect, the embodiments of the present application provide a repairing device for application exception exit, comprising:

[0026] The obtaining unit is configured to obtain first location information of first data in a memory when it is detected that a target application program abnormally exits, the first data being read-only data related to the abnormal exit of the target application program.

[0027] The clearing unit is configured to clear the first data from the memory according to the first location information of the first data in the memory.

[0028] The reading unit is configured to read original data of the first data from a disk into the memory, the original data of the first data being used for normal running of the target application program.

[0029] In some embodiments, the obtaining unit is specifically configured to obtain second location information of the original data of the first data in the disk; and obtain the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

[0030] In some embodiments, when the first data is an instruction, the obtaining unit is specifically configured to obtain the second location information of the original data of the first data in the disk from a preset file.

[0031] In some embodiments, the obtaining unit is specifically configured to obtain a type of the abnormal exit of the target application program from a preset file; and obtain the second location information of the original data of the first data in the disk from the preset file when the type of the abnormal exit of the target application program is execution of the first data.

[0032] Optionally, the preset file is generated when the target application program abnormally exits.

[0033] Optionally, the second location information of the original data of the first data in the disk comprises: information of a first file in the disk, and an address offset of the original data of the first data in the first file, the first file being a file storing the original data of the first data.

[0034] Optionally, the information of the first file is a storage path of the first file in the disk.

[0035] In some embodiments, the obtaining unit is specifically configured to: access the first file in the disk according to the information of the first file; obtain third location information of the original data of the first data in the first file according to the address offset of the original data of the first data in the first file; and obtain the first location information of the first data in the memory according to the third location information in the memory image.

[0036] In some embodiments, the clearing unit is specifically configured to: clear the first data from the memory according to the first location information of the first data in the memory and a preset length of the first data.

[0037] In some embodiments, the reading unit is specifically configured to: read the original data of the first data from the disk to the memory when it is detected that the target application program is restarted.

[0038] The application abnormal exit repairing apparatus provided by the second aspect and possible implementation manners of the second aspect has the beneficial effects of the first aspect and possible implementation manners of the first aspect, which will not be repeated here.

[0039] In a third aspect, an application abnormal exit repairing apparatus is provided. The apparatus exists in a product form of a chip. The apparatus includes a processor and a memory. The memory includes a disk and a memory. The memory is configured to be coupled with the processor and save necessary program instructions and data of the apparatus. The processor is configured to execute the program instructions stored in the memory, so that the apparatus executes the method.

[0040] In a fourth aspect, an electronic device is provided. The electronic device includes a memory, a disk and a processor. The memory, the disk and the processor are configured to implement the method in any one of the first aspect.

[0041] In a sixth aspect, a computer storage medium is provided. The storage medium includes computer instructions. When the instructions are executed by a computer, the computer is caused to implement the method in any one of the first aspect.

[0042] In a seventh aspect, an embodiment of the present application provides a computer program product, the program product comprising a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to implement the method of any one of the first aspect.

[0043] The application exception exit repairing method, device and electronic device provided by the embodiment of the present application, when detecting that the target application program abnormally exits, the first position information of the first data related to the target application program abnormal exit in the memory is acquired, the first data in the memory is cleared according to the first position information of the first data in the memory, and the original data of the first data is read from the disk to the memory, so that the processor can normally run the target application program according to the original data of the first data, and the fast repairing of the target application program is realized. The repairing method of the embodiment of the present application does not need the user to participate, does not need to restart the device, when the target application program abnormally exits, only the erroneous data, that is, the first data, is repaired, and the whole data of the target application program does not need to be reloaded to the memory, that is, the repairing method of the embodiment of the present application is more targeted, the data amount of the repairing is small, the repairing efficiency is high, the target application program can be automatically repaired in the case that the user and the application are not perceived, and the user experience can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 A structural schematic diagram of an electronic device to which the present application is applicable;

[0045] Figure 2 A schematic diagram of a computing device related to an embodiment of the present application;

[0046] Figure 3 A flowchart of a repairing method of an application abnormal exit provided by an embodiment of the present application;

[0047] Figure 4 A repairing process schematic diagram related to an embodiment of the present application;

[0048] Figure 5 A first position information schematic diagram of first data related to an embodiment of the present application;

[0049] Figure 6 Another flowchart of a repairing method of an application abnormal exit provided by an embodiment of the present application;

[0050] Figure 7 Another flowchart of a repairing method of an application abnormal exit provided by an embodiment of the present application;

[0051] Figure 8Another flowchart of a method for repairing application abnormal exit provided by an embodiment of the present application is shown in FIG. 6.

[0052] Figure 9 A structure diagram of a device for repairing application abnormal exit provided by an embodiment of the present application is shown in FIG. 4.

[0053] Figure 10 A structure diagram of a device for repairing application abnormal exit provided by an embodiment of the present application is shown in FIG. 4.

[0054] Figure 11 A structure diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 5. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

[0056] It should be understood that, in the embodiments of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information. The term "multiple" herein refers to two or more. The term "and / or" herein is merely a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects.

[0057] The terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first", "second", and the like do not limit the quantity and execution order, and the terms "first", "second", and the like do not necessarily mean different.

[0058] Figure 1 A structure diagram of an electronic device applicable to the present application is shown in FIG. 5. Figure 1As shown, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. It can be understood that the structure shown in the embodiment does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0059] The processor 110 can include one or more acquisition units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a display process unit (DPU), and / or a neural-network processing unit (NPU), etc. Different acquisition units can be independent devices, or can be integrated in one or more processors. In some embodiments, the electronic device 100 can also include one or more processors 110. The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions. A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the electronic device 100 system.

[0060] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The USB interface 130 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset.

[0061] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods.

[0062] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device 100 through the power management module 141.

[0063] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0064] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like. The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some embodiments, the antennas can be used in combination with a tuning switch.

[0065] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low-noise amplifier, and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor, and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.

[0066] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and can be disposed in the same device as the mobile communication module 150 or other functional modules.

[0067] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0068] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The above-mentioned GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation system (SBAS).

[0069] The electronic device 100 can implement a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute instructions to generate or change display information.

[0070] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 194, N being a positive integer greater than 1.

[0071] The electronic device 100 can implement a photographing function through an ISP, one or more cameras 193, a video codec, a GPU, one or more displays 194, and an application processor, etc.

[0072] The NPU is a neural-network (NN) computing processor. By drawing on the structure of a biological neural network, for example, by drawing on the transmission mode between neurons in the human brain, the NPU can quickly process input information and can also constantly self-learn. Through the NPU, the electronic device 100 can implement intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0073] The DPU is also referred to as a display sub-system (DSS). The DPU is used to adjust the color of the display 194. The DPU can adjust the color of the display 194 through a three-dimensional look-up table (3D look-up table, 3D LUT). The DPU can also perform scaling, noise reduction, contrast enhancement, backlight brightness management, hdr processing, display parameter Gamma adjustment, etc. on a picture.

[0074] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to implement the expansion of the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, music, photo, video, etc. data files are saved in the external memory card.

[0075] The internal memory 121 can be used to store one or more computer programs including instructions. The processor 110 can execute various function applications and data processing, etc. by running the above-mentioned instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, and the program storage area can also store one or more application programs (such as a gallery, contacts, etc.) and the like. The data storage area can store data (such as photos, contacts, etc.) created during use of the electronic device 100 and the like. In addition, the internal memory 121 can include a high-speed random access memory and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute various function applications and data processing by running instructions stored in the internal memory 121 and / or instructions stored in a memory disposed in the processor 110. Optionally, the internal memory can include a memory and a disk.

[0076] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, and an application processor, etc. For example, music play, recording, etc. Among them, the audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the function modules of the audio module 170 are disposed in the processor 110. The speaker 170A, also known as a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A. The receiver 170B, also known as a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the receiver 170B can be held close to the ear to listen to the voice. The microphone 170C, also known as a "microphone", "sound collector", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 170C close to the mouth to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, it can also realize the function of noise reduction. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, it can also identify the source of the sound, realize the function of directional recording, etc. The headset interface 170D is used to connect a wired headset. The headset interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0077] The sensor 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0078] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the force according to the change in capacitance. When a touch operation is applied to the display 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0079] The gyroscope sensor 180B can be configured to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that needs to be compensated by the lens module according to the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation, motion sensing game scenarios, etc.

[0080] The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the acceleration sensor 180E can detect the magnitude and direction of gravity. The acceleration sensor 180E can also be used to identify the posture of the electronic device, and can be applied to landscape / portrait switching, pedometers, etc.

[0081] The distance sensor 180F is configured to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, when a scene is photographed, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0082] The proximity light sensor 180G can include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device 100 emits infrared light outwardly through the light-emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can detect that a user is holding the electronic device 100 close to the ear for a call using the proximity light sensor 180G, so as to automatically turn off the screen for the purpose of power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a case mode or a pocket mode.

[0083] The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the display screen 194 brightness according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking a photo. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.

[0084] The fingerprint sensor 180H (also referred to as a fingerprint identifier) is used to collect a fingerprint. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locking, fingerprint photo shooting, fingerprint call answering, and the like. In addition, other records about the fingerprint sensor can be found in International Patent Application PCT / CN2017 / 082773 entitled "Method of Processing Notification and Electronic Device", the entire contents of which are incorporated herein by reference.

[0085] The touch sensor 180K, which can also be referred to as a touch panel or a touch-sensitive surface, can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 can form a touch screen, which can also be referred to as a touch screen. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.

[0086] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.

[0087] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0088] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0089] Figure 2 This is a schematic diagram of a computing device according to an embodiment of this application. Figure 2 As shown, the computing device 200 includes a processor 202, memory 201, and disk 203. The processor 202, memory 201, and disk 203 are communicatively connected to each other. For example, the processor 202, memory 201, and disk 203 can be connected via a network. Alternatively, the computing device 200 may also include a bus 204. The processor 202, memory 201, and disk 203 are communicatively connected to each other via the bus 204. Figure 2 The computing device 200 is a computer device in which the processor 202, memory 201 and disk 203 are connected to each other via bus 204.

[0090] Memory, also known as internal memory, main memory, or main storage, is a storage space that can be directly addressed by a processor, and is a bridge between external storage and the processor. All programs in a computer are run in the memory, which is made of semiconductor devices and has the characteristic of fast access speed.

[0091] The memory 201 in the embodiments of the present application is a random access memory (RAM), which includes a fast page mode (FPM) memory, an extended data out (EDO) memory, a memory bank, a synchronous dynamic RAM (SDRAM), a Rambus dynamic RAM (RDRAM), a double data rate SDRAM (DDR), and the like. The DDR can include DDR2, DDR3, DDR4, and the like.

[0092] The memory 201 is used to temporarily store data or programs that are currently executed by the processor. Once the power is turned off or power failure occurs, the information in the memory will be lost.

[0093] The disk 203 can be understood as an external storage device, for example, a magnetic medium or an optical disk, such as a hard disk, a floppy disk, a magnetic tape, a CD, and the like, which is used to store information for a long time and does not rely on electricity to store information. When the computing device is powered off, the information in the disk will not be lost.

[0094] The processor 202 can be a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.

[0095] The processor 202 can also be an integrated circuit chip having a processing capability of signals. In implementation, the functions of the AI model generation system 100 of the present application can be completed by integrated logic circuits of hardware or instructions in the form of software in the processor 202. The processor 202 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 201, and the processor 202 reads the information in the memory 201 and combines the hardware to complete the functions of the AI model generation system 100 of the embodiments of the present application.

[0096] When the above computing device 200 includes a bus 204, the bus 204 can include a path for transmitting information between various components of the computing device 200 (for example, between the processor 202, the memory 201 and the disk 203).

[0097] It can be understood that the processor used by the terminal device in the present application can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure. The processor can also be a combination of computing functions, such as one or more microprocessor combinations, DSP and microprocessor combinations, etc.

[0098] The bus described in the present application can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0099] In actual use, when the processor executes an application program, information of the application program needs to be read from the disk to the memory, and the processor accesses the information of the application program from the memory. However, when the processor accesses abnormal data of the application program, for example, accesses an abnormal code segment, the application program will be abnormally exited. In some cases, the reason why the information of the application program is abnormal can be that, after the information is loaded from the disk to the memory, due to a hardware problem of the memory, the information loaded to the memory is abnormal, or the information in the memory is maliciously tampered.

[0100] The current repair method is to pop up a prompt box to prompt the user that the application program is abnormal when it is detected that the application program is abnormally exited for multiple times within a certain time. The user manually recovers the application program by restarting the device and the like. However, the repair method needs the user to participate, and needs to restart the device to load all data of the application program to the memory, which has low repair efficiency and poor user experience.

[0101] In order to solve the above technical problems, the embodiments of the present application provide a repair method of application program abnormal exit, which comprises the following steps: detecting that a target application program is abnormally exited; obtaining position information of first data related to the abnormal exit of the target application program in the memory; clearing the first data in the memory according to the position information of the first data in the memory; and reading original data of the first data from the disk to the memory. In this way, the processor can normally run the target application program according to the original data of the first data, and the repair of the target application program is realized. The repair method of the embodiments of the present application does not need the user to participate, and does not need to restart the device. Only the erroneous data needs to be repaired, and the entire data of the target application program does not need to be loaded to the memory. Therefore, the repair efficiency is high, the target application program can be automatically repaired without the user and the target application program being aware of (that is, without disturbing the user and suspending the target application program), and the user experience is good.

[0102] The repair process of the application program abnormal exit related by the embodiments of the present application will be introduced below through specific examples.

[0103] Figure 3A flowchart of a method for repairing application abnormal exit provided by an embodiment of the present application, Figure 4 A flowchart of a repairing process related to an embodiment of the present application. As shown in Figure 3 and Figure 4 , the method of the embodiment of the present application comprises:

[0104] S101, obtaining first location information of first data in memory when detecting that a target application program abnormally exits.

[0105] The method for repairing application abnormal exit provided by the embodiment of the present application can be applied to the electronic device described above Figure 1 or the computing device shown in Figure 2 .

[0106] The execution subject of the embodiment of the present application can be the processor in Figure 1 or Figure 2 .

[0107] Specifically, the processor obtains first location information of first data in memory when detecting that a target application program abnormally exits (crash), and the first location information can be understood as storage location information or storage address of the first data in memory.

[0108] It should be noted that the first data is data related to abnormal exit of the target application program, such as parameters or program instructions related to the target application program. That is, due to some reasons, such as hardware problems of memory, or information in memory is maliciously tampered with, resulting in abnormal first data stored in memory, when the processor reads the abnormal first data, the target application program will abnormally exit. Optionally, the first data is read-only data.

[0109] S102, clearing the first data from the memory according to the first location information of the first data in the memory.

[0110] Specifically, after the processor obtains the first location information of the first data in memory that causes the target application program to abnormally exit, the processor clears the first data from the memory according to the first location information, so as to read correct information.

[0111] In some embodiments, the step B can be included in the step S102 of clearing the first data from the memory according to the first location information of the first data in the memory.

[0112] Step B, clearing the first data from the memory according to the first location information of the first data in the memory and a preset length of the first data.

[0113] Specifically, as shown in Figure 5As shown, the first position information can be understood as a start position a1 of the storage position of the first data in the memory, and the preset length of the first data is b. In this way, the processor can query the start storage position a1 of the first data in the memory according to the first position information of the first data in the memory, and obtain the end storage position a2 of the first data in the memory by offsetting the length b from the position a1. The first data in the memory from the position a1 to the position a2 is deleted.

[0114] It should be noted that the preset length of the first data is set according to actual conditions, and the embodiments of the present application do not limit this.

[0115] In some examples, the preset length of the first data is 8 bytes, that is, 64 bits.

[0116] S103, reading the original data of the first data from the disk to the memory.

[0117] The original data of the first data is unaltered data, which can be used for normal operation of the target application program.

[0118] Specifically, the processor reads the original data of the first data from the second device and stores the read original data of the first data in the memory after clearing the first data from the memory according to the step of S102. In this way, the processor can read the original unaltered data of the first data from the memory to realize the normal operation of the target application program.

[0119] In the embodiments of the present application, the processor reads the original data of the first data from the disk to the memory in the following cases.

[0120] Case 1: The processor reads the original data of the first data from the disk to the memory immediately after clearing the first data from the memory. That is, the trigger condition for the processor to read the original data of the first data from the disk to the memory is to detect that the first data in the memory is cleared.

[0121] Case 2: The original data of the first data is read from the disk to the memory when it is detected that the target application program is restarted. That is, after the processor clears the first data from the memory, it does not immediately read the original data of the first data from the disk to the memory, but when it is detected that the target application program is restarted and the first data in the memory cannot be read, the original data of the first data is read from the disk to the memory.

[0122] From the above, it can be seen that the embodiments of the present application

[0123] The application embodiment provided in the application provides a repairing method for application abnormal exit. When detecting that a target application program abnormally exits, first position information of first data related to the target application program abnormal exit in the memory is acquired. The first data in the memory is cleared according to the first position information of the first data in the memory, and the original data of the first data is read from the disk to the memory. Thus, the processor can normally run the target application program according to the original data of the first data, and the target application program is quickly repaired. The repairing method of the application embodiment does not need user participation, does not need to restart the device, and only repairs the erroneous data, that is, the first data, when the target application program abnormally exits, without the need to reload all data of the target application program to the memory. That is, the repairing method of the application embodiment is more targeted, the data amount to be repaired is small, the repairing efficiency is high, the target application program can be automatically repaired without the user and the application being aware, and the user experience can be improved.

[0124] On the basis of the above embodiment, the application embodiment describes in detail the specific process of acquiring the first position information of the first data in the memory in S101.

[0125] Figure 6 Another flowchart of the repairing method for application abnormal exit provided in the application embodiment is shown in FIG. 2. The method of the application embodiment includes the following steps. Figure 6

[0126] S201, when detecting that a target application program abnormally exits, acquiring second position information of original data of the first data in the disk.

[0127] Since the first data in the memory is the mirror image of the original data of the first data in the disk, the storage position of the first data in the memory can be obtained by obtaining the storage position of the original data of the first data in the disk.

[0128] Specifically, when detecting that a target application program abnormally exits, the processor obtains the second position information of the original data of the first data in the disk. Then, the first position information of the first data in the memory is obtained according to the second position information of the original data of the first data in the disk.

[0129] In some examples, the original data of the first data is stored in a first file in the disk. At this time, the second position information of the original data of the first data in the disk can include information of the first file in the disk and an address offset of the original data of the first data in the first file.

[0130] Optionally, the information of the first file can be identification information of the first file, and the identification information of the first file can include a file name of the first file.

[0131] ​Optionally, the information for the first file can be its storage path on the disk, for example, the storage path for the first file on the disk could be:

[0132] / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex.

[0133] In some embodiments, when the first data is an instruction related to the abnormal exit of a target application, obtaining the second location information of the original data of the first data on the disk in S201 above includes step S2011:

[0134] Step S2011: Obtain the second location information of the original data of the first data on the disk from the preset file.

[0135] The aforementioned preset file can be a pre-set file used to store the second location information of the original data of the first data on the disk.

[0136] In some examples, the aforementioned preset file can be a tombstone, which records the location information of the original data of the first data on the disk.

[0137] In some examples, when the embodiments of this application are applied to the Android operating system, the aforementioned preset file may be: the Android native maintenance log, which can record some information when the application crashes, such as: information of the first file, the address offset of the original data of the first data in the first file.

[0138] Optionally, the aforementioned preset file may be generated when the processor first reads the raw data of the first data from the disk into memory.

[0139] Optionally, the aforementioned preset file is generated when the target application exits abnormally. That is, when the processor accesses the first data, the target application exits abnormally, and at this time, the preset file is generated, which stores the second location information of the original data of the first data on the disk.

[0140] In some embodiments, such as Figure 7 As shown, the above-mentioned S2011, which obtains the second location information of the original data of the first data on the disk from the preset file, may include S2011a to S2011b:

[0141] S2011a. Obtain the type of abnormal exit of the target application from the preset file.

[0142] S2011b, obtaining, from the preset file, second location information of the original data of the first data in the disk when the type of the abnormal exit of the target application program is executing the first data.

[0143] The preset file of the embodiment of the application comprises: the type of the abnormal exit of the target application program and the second location information of the original data of the first data in the disk.

[0144] The type of the abnormal exit of the target application program can include two types, the first type is: the abnormal exit caused by executing the first data, and the second type is: the abnormal exit not caused by executing the first data.

[0145] Accordingly, when detecting the abnormal exit of the target application program, the processor obtains the type of the abnormal exit of the target application program from the preset file, and judges whether the type of the abnormal exit of the target application program is the abnormal exit caused by executing the first data. If yes, it indicates that the first data in the memory is tampered. At this time, the processor obtains the second location information of the original data of the first data in the disk from the preset file, and obtains the first location information of the first data in the memory according to the second location information. Then, the processor can clear the first data from the memory according to the first location information of the first data in the memory, and read the original data of the first data from the disk to the memory according to the second location information of the original data of the first data in the disk, so as to ensure that the original data of the first data stored in the memory is normal data without tampering.

[0146] For example, taking the Android system as an example, when the processor detects that the target application program sends an abnormal exit (crash), the Android system generates a corresponding preset file (for example, a tombstone file) in a specific directory, as follows.

[0147]

[0148] The tombstone file contains: the type of the abnormal exit of the target application program (i.e. code1 (ILL_ILLOPC)), and the second location information of the original data of the first data in the disk (i.e. 00 pc00000000007858e0 / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex) and other information. The processor can obtain the type of the crash of the target application program as ILL_ILLOPC and the second location information of the original data of the first data in the disk by monitoring the generation of the tombstone file and analyzing the content of the tombstone file.

[0149] The ILL_ILLOPC indicates that the type of the exception of the target application is an exception caused by executing the first data.

[0150] Optionally, the first data is a PC instruction.

[0151] S202, obtaining the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

[0152] Continuing to refer to the above example, it is assumed that the second location information of the original data of the first data in the disk is: 00pc00000000007858e0 / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex. The / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex is the storage path of the first file in the disk. The 0x7858e0 indicates the offset of the original data of the first data in the first file.

[0153] In this way, the processor can obtain the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

[0154] In some embodiments, as shown in FIG. 2, the processor obtains the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk, and the method can include S2021-S2023. Figure 8

[0155] S2021, accessing the first file in the disk according to the information of the first file.

[0156] Continuing to refer to the above example, it is assumed that the second location information of the original data of the first data in the disk is: 00pc00000000007858e0 / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex.

[0157] The information of the first file can be the storage path of the first file in the disk, that is:

[0158] / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex.

[0159] ​The processor accesses the first file in the disk according to information of the first file.

[0160] In an example, the processor can access the first file in the disk according to information of the first file in the following manner: open the first file of the original data of the first data stored in the disk by using an open function, and obtain a file handle fd:

[0161] int fd = open( / data / dalvik-cache / arm64 / system@app@iConnect@iConnect.apk@classes.dex, O_RDONLY).

[0162] S2022, obtain third position information of the original data of the first data in the first file according to an address offset of the original data of the first data in the first file.

[0163] Continuing to refer to the above example, the address offset of the original data of the first data in the first file can be 0x7858e0.

[0164] In this way, the processor can open the first file in the disk by using the open function according to information of the first file, and obtain position information of the original data of the first data in the first file according to the address offset of the original data of the first data in the first file (for example, 0x7858e0), and record the position information as third position information. Specifically, the storage position of the original data of the first data in the first file is obtained by offsetting 0x7858e0 from an initial address of the first file, and the storage position is recorded as the third position information of the original data of the first data in the first file.

[0165] S2023, obtain first position information of the first data in the memory according to the mirror of the third position information in the memory.

[0166] Specifically, the processor can obtain the first position information of the first data in the memory according to the mirror of the third position information of the original data of the first data in the first file in the memory.

[0167] In this way, the processor can clear the first data in the memory according to the first position information of the first data in the memory and a preset length of the first data.

[0168] In a possible implementation, the processor can clear the first data in the memory by using a posix_fadvise function.

[0169] posix_fadvise(fd, 0x7858e0, 8, POSIX_FADV_DONTNEED)

[0170] wherein fd represents a storage path of the first file in the disk, 0x7858e0 represents an address offset of the original data of the first data in the first file, 8 is a length of the first data, and POSIX_FADV_DONTNEED represents clearing the first data from the memory.

[0171] The application exception exit repairing method provided by the embodiments of the present application can obtain the second location information of the original data of the first data in the disk when detecting that the target application program abnormally exits, accurately obtain the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk, and clear the first data from the memory according to the accurately obtained first location information of the first data in the memory, thereby realizing accurate clearing of the error first data.

[0172] Figure 9 A structure diagram of an application exception exit repairing device provided by the embodiments of the present application is shown in FIG. 3. The repairing device can be an electronic device or a component (for example, an integrated circuit, a chip, etc.) of an electronic device. Figure 9 As shown in FIG. 3, the repairing device 300 can include an obtaining unit 310, a clearing unit 320, and a reading unit 330.

[0173] The obtaining unit 310 is configured to obtain first location information of first data in a memory when detecting that a target application program abnormally exits, the first data being read-only data related to the abnormal exit of the target application program.

[0174] The clearing unit 320 is configured to clear the first data from the memory according to the first location information of the first data in the memory.

[0175] The reading unit 330 is configured to read original data of the first data from a disk to the memory, the original data of the first data being used for normal running of the target application program.

[0176] In a possible implementation, the obtaining unit 310 is specifically configured to obtain second location information of the original data of the first data in the disk, and obtain the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

[0177] In a possible implementation, the first data is an instruction, and the obtaining unit 310 is specifically configured to obtain the second location information of the original data of the first data in the disk from a preset file.

[0178] In a possible implementation, the obtaining unit 310 is specifically configured to obtain the type of the abnormal exit of the target application program from the preset file; and when the type of the abnormal exit of the target application program is that the first data is executed, the obtaining unit 310 is specifically configured to obtain the second location information of the original data of the first data in the disk from the preset file.

[0179] Optionally, the preset file is generated when the target application program abnormally exits.

[0180] In a possible implementation, the second location information of the original data of the first data in the disk includes information of a first file in the disk and an address offset of the original data of the first data in the first file, and the first file is a file storing the original data of the first data.

[0181] Optionally, the information of the first file is a storage path of the first file in the disk.

[0182] In a possible implementation, the obtaining unit 310 is specifically configured to access the first file in the disk according to the information of the first file; obtain third location information of the original data of the first data in the first file according to the address offset of the original data of the first data in the first file; and obtain the first location information of the first data in the memory according to the third location information in the mirror in the memory.

[0183] In a possible implementation, the obtaining unit 310 is specifically configured to clear the first data from the memory according to the first location information of the first data in the memory and a preset length of the first data.

[0184] In a possible implementation, the reading unit 330 is specifically configured to read the original data of the first data from the disk to the memory when it is detected that the target application program is restarted.

[0185] The application abnormal exit repairing apparatus of the embodiments of the present application can be used for the technical solution of the processor in each method embodiment, and has similar implementation principles and technical effects, which will not be described herein.

[0186] Figure 10A structural schematic diagram of an application exception exit repairing device is provided in the embodiments of the present application. The device 800 exists in the form of a chip product. The device includes a processor 801 and a memory 802. Optionally, the memory 802 includes an internal memory and a disk. The memory 802 is configured to be coupled with the processor 801. The memory 802 stores necessary program instructions and data of the device. The processor 801 is configured to execute the program instructions stored in the memory 802, so that the device performs the method embodiments.

[0187] The application exception exit repairing device provided in the embodiments of the present application can be used to perform the method embodiments, and the implementation principle and technical effects are similar, which will not be repeated here.

[0188] Figure 11 A structural schematic diagram of an electronic device is provided in the embodiments of the present application. As shown in the figure, Figure 11 The electronic device 500 can be a computing device (or a component of the computing device) mentioned in the method embodiments. The electronic device can be used to implement the method embodiments, and details can be referred to the description in the method embodiments.

[0189] The electronic device 500 can include one or more processors 501, which can also be referred to as processing units, and can implement certain control or processing functions. The processor 501 can be a general-purpose processor or a special-purpose processor. For example, the processor 501 can be a baseband processor or a central processing unit. The baseband processor can be used to process communication protocols and communication data. The central processing unit can be used to control the electronic device, execute software programs, and process data of the software programs.

[0190] In a possible design, the processor 501 can also store instructions 503 or data (for example, intermediate data). The instructions 503 can be executed by the processor, so that the electronic device 500 performs the method embodiments.

[0191] In another possible design, the electronic device 500 can include a circuit, which can implement the functions of sending, receiving or communicating in the method embodiments.

[0192] Optionally, the electronic device 500 can include a memory 502, which can also store instructions 504 or data (for example, intermediate data). The instructions 504 can be executed on the processor 501, so that the electronic device 500 performs the method described in the method embodiments.

[0193] In a possible design, the memory 502 can include an internal memory 5021 and a disk 5022. The instructions 504 can be stored in the internal memory 5021 or the disk 5022.

[0194] In a possible design, the memory 502 can include other storage devices in addition to the memory 5021 and the disk 5022, and the instructions 504 can be stored on the other storage devices.

[0195] Optionally, the electronic device 500 can further include a transceiver 505 and / or an antenna 506. The processor 501 can be referred to as a processing unit, and used to control the electronic device. The transceiver 505 can be referred to as a transceiving unit, a transceiver, a transceiving circuit, or a transceiver, and used to implement the transceiving function of the electronic device.

[0196] The processor 501 and the transceiver 505 described in this application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit (RFIC), a mixed-signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, or the like. The processor 501 and the transceiver 505 can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), positive channel metal oxide semiconductor (PMOS), Bipolar Junction Transistor (BJT), BiCMOS, silicon germanium (SiGe), gallium arsenide (GaAs), or the like.

[0197] The electronic device of the embodiments of this application can be used to execute the above-mentioned method embodiments, and has similar implementation principles and technical effects, which will not be described here again.

[0198] In the above embodiments, the system, device and unit can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the system, device and unit can be implemented in the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein. In addition, the various method embodiments and the various device embodiments can also be mutually referred to, and the same or corresponding contents in different embodiments can be mutually referred to, which will not be described herein.

Claims

1. A method of repairing an application exception exit, the method comprising: The method comprises the following steps: When detecting that a target application program abnormally exits, obtaining first position information of first data in a memory, the first data being read-only data related to the abnormal exit of the target application program, the first position information being determined according to second position information of original data of the first data in a disk, the second position information being obtained from a preset file, the preset file being generated when the target application program abnormally exits; According to the first position information of the first data in the memory and a preset length of the first data, the first data is cleared from the memory; Original data of the first data is read from the disk to the memory, the original data of the first data being used for normal running of the target application program.

2. The method of claim 1, wherein, The method for obtaining the first position information of the first data in the memory comprises the following steps: Obtaining the second position information of the original data of the first data in the disk; According to the second position information of the original data of the first data in the disk, the first position information of the first data in the memory is obtained.

3. The method of claim 2, wherein, The first data is an instruction, and the method for obtaining the second position information of the original data of the first data in the disk comprises the following steps: The second position information of the original data of the first data in the disk is obtained from the preset file.

4. The method of claim 3, wherein, Before the second position information of the original data of the first data in the disk is obtained from the preset file, the method further comprises the following steps: The type of the abnormal exit of the target application program is obtained from the preset file; The second position information of the original data of the first data in the disk is obtained from the preset file, comprising the following steps: When the type of the abnormal exit of the target application program is to execute the first data, the second position information of the original data of the first data in the disk is obtained from the preset file.

5. The method according to any one of claims 1 to 4, characterized in that, The second position information of the original data of the first data in the disk comprises information of a first file in the disk and an address offset of the original data of the first data in the first file, the first file being a file for storing the original data of the first data.

6. The method of claim 5, wherein, The information of the first file is a storage path of the first file in the disk.

7. The method of claim 5, wherein, The first position information of the first data in the memory is obtained according to the second position information of the original data of the first data in the disk, comprising the following steps: The first file is accessed in the disk according to the information of the first file; According to the address offset of the original data of the first data in the first file, third position information of the original data of the first data in the first file is obtained; According to the mirror of the third position information in the memory, the first position information of the first data in the memory is obtained.

8. The method according to any one of claims 1 to 4, characterized in that, The original data of the first data is read from the disk to the memory when the target application program is restarted. The method comprises the following steps:

9. An abnormality exit application recovery apparatus characterized by comprising: ​ The acquisition unit is configured to acquire first location information of first data in the memory when it is detected that the target application program abnormally exits, the first data being read-only data related to the abnormal exit of the target application program, and the first location information being determined according to second location information of original data of the first data in the disk, which is acquired from a preset file generated when the target application program abnormally exits. The clearing unit is configured to clear the first data from the memory according to the first location information of the first data in the memory and a preset length of the first data. The reading unit is configured to read the original data of the first data from the disk to the memory, the original data of the first data being used for normal running of the target application program.

10. The apparatus of claim 9, wherein The acquisition unit is specifically configured to acquire the second location information of the original data of the first data in the disk, and obtain the first location information of the first data in the memory according to the second location information of the original data of the first data in the disk.

11. The apparatus of claim 10, wherein, The first data is an instruction, and the acquisition unit is specifically configured to acquire the second location information of the original data of the first data in the disk from a preset file.

12. The apparatus of claim 11, wherein The acquisition unit is specifically configured to obtain a type of the abnormal exit of the target application program from the preset file, and acquire the second location information of the original data of the first data in the disk from the preset file when the type of the abnormal exit of the target application program is executing the first data.

13. The device of any of claims 9-12, wherein, The second location information of the original data of the first data in the disk includes information of a first file in the disk and an address offset of the original data of the first data in the first file, and the first file is a file storing the original data of the first data.

14. The apparatus of claim 13, wherein, The information of the first file is a storage path of the first file in the disk.

15. The apparatus of claim 13, wherein The acquisition unit is specifically configured to access the first file in the disk according to the information of the first file, obtain third location information of the original data of the first data in the first file according to the address offset of the original data of the first data in the first file, and obtain the first location information of the first data in the memory according to a mirror of the third location information in the memory.

16. The apparatus of any one of claims 9-12, wherein The reading unit is specifically configured to read the original data of the first data from the disk to the memory when it is detected that the target application program is restarted.

17. An electronic device, comprising: The apparatus comprises: a memory, a disk and a processor, and the memory, the disk and the processor are configured to execute the method of any one of claims 1-7.

18. A computer storage medium, characterized in that A computer readable program is stored, which, when read and executed, causes the information transmission device to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Processing method and processor for critical data in shared memory

    CN102163164A

  • Memory bug application of application program

    CN102308285A