WO2023124929A1 - Application managment method and apparatus, storage medium and electronic device - Google Patents

Application managment method and apparatus, storage medium and electronic device Download PDF

Info

Publication number
WO2023124929A1
WO2023124929A1 PCT/CN2022/138301 CN2022138301W WO2023124929A1 WO 2023124929 A1 WO2023124929 A1 WO 2023124929A1 CN 2022138301 W CN2022138301 W CN 2022138301W WO 2023124929 A1 WO2023124929 A1 WO 2023124929A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
interface
parasitic
crash
host
Prior art date
Application number
PCT/CN2022/138301
Other languages
French (fr)
Chinese (zh)
Inventor
陈峥
钟炳鑫
金炼城
Original Assignee
北京有竹居网络技术有限公司
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 北京有竹居网络技术有限公司 filed Critical 北京有竹居网络技术有限公司
Publication of WO2023124929A1 publication Critical patent/WO2023124929A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/552Details of game data or player data management for downloading to client devices, e.g. using OS version, hardware or software profile of the client device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the technical field of computers, and in particular, to an application program management method, device, storage medium and electronic equipment.
  • parasitic applications such as applets and installation-free applications that do not need to be downloaded and installed in the system by users should be implemented. Since the parasitic application runs in the operating environment provided by the host application, the running status of the parasitic application is highly dependent on the operating environment provided by the host application. Therefore, in order to improve the operating performance of the parasitic application and the user experience of using the parasitic application, the host application needs to be improved. .
  • the present disclosure provides an application program management method, including:
  • the preset interface is an interface for exiting the process of the application program when called by the application program
  • an application program management device including:
  • a loading module configured to load a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
  • the reporting module is configured to switch the host application corresponding to the parasitic application to the foreground to return to the display of the host application when the hook function captures that the parasitic application calls the preset interface to exit its own process interface.
  • the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
  • Fig. 1 is a schematic flowchart of an application program management method provided according to an exemplary embodiment
  • Fig. 2 is a schematic flowchart of an application management method provided according to another exemplary embodiment
  • Fig. 3 is a schematic flowchart of an application management method provided according to yet another exemplary embodiment
  • Fig. 4 is a schematic diagram of module connections of an application program management device according to an exemplary embodiment
  • Fig. 5 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • the host application can be referred to as the host for short, and can be used to represent the application body that provides the operating environment for the integrated module.
  • the host application running on the client can be referred to as a social application as an example.
  • the social application may have the ability to open and display the applet.
  • the installation-free platform is integrated with a free-installation framework (engine), and the installation-free platform can run other native applications.
  • a parasitic application refers to an application program that is subordinate to the host application and runs depending on the operating environment provided by the host application.
  • Hook function is a program segment for processing messages, and the hook function is hung into the system through system calls. Whenever a specific message is sent, before reaching the destination window, the hook function first captures the message, that is, the hook function first obtains the control right. At this time, the hook function can process (change) the message, or continue to deliver the message without processing it, or forcibly end the message delivery.
  • Fig. 1 is a schematic flowchart of a method for managing application programs according to an exemplary embodiment.
  • the application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device.
  • the application program management method provided by the embodiment of the present disclosure may include the following steps.
  • the preset interface refers to an interface for exiting the process of the application program when called by the application program.
  • the default interface can be the exit (exit) method of the java.lang.System class, the nativeExit JNI method of the java.lang.Runtime class, and the killProcess method of the android.os.Process class , the sendSignal JNI method of the android.os.Process class, and so on.
  • the preset interface may be an exit method, an _exit method, an abort method, a send_signal method, and the like.
  • loading the hook function in the preset interface refers to performing HOOK (hook) processing on the preset interface, so as to obtain a call message that the application program invokes the preset interface to exit its own process. It should be understood that loading the hook function in the preset interface may be HOOKing the preset interface through JVM/ART virtual machine HOOK technology or C/C++ HOOK technology.
  • the parasitic application runs in the environment provided by the host application, for example, the "game box” application (host application) implemented based on the installation-free framework (engine), and the "game” application (parasitic application) runs in an independent process, independent in the task stack.
  • the parasitic application calling a preset interface to exit its own process refers to the parasitic application committing suicide, for example, in the case of insufficient memory resources, the parasitic application calls the preset interface to exit its own process.
  • the hook function will capture the call information of the parasitic application calling the preset interface, so as to perceive the suicide event of the parasitic application .
  • the electronic device switches the host application corresponding to the parasitic application to the foreground to run, so as to return to the display interface of the host application. For example, after the "game” running in the "game box” commits suicide, return to the main interface of the "game box".
  • the android framework startActivity can be called to switch the host application to run in the foreground through the Java layer or the Java/ART reflection mechanism.
  • the host application can be switched to the foreground with the startActivity function through the am command.
  • the android framwork can be called to switch the task stack to the task stack of the host application through the Java layer or the Java reflection mechanism, so as to switch the host application to the foreground to run.
  • the icon of the parasitic application is presented in a preset display manner on the display interface of the host application.
  • the preset display mode may be at least one of magnification, color marking, flashing display and the like.
  • the host application is switched to Run in the foreground to achieve the effect of returning to the display interface of the host application after the parasitic application commits suicide, thereby improving the utilization rate of the host application.
  • the host application is a game box, after the game process kills itself, it returns to the main interface of the game box, thereby improving the retention rate of the game box.
  • Fig. 2 is a schematic flowchart of a method for managing application programs according to another exemplary embodiment.
  • the application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device.
  • the application program management provided by the embodiment of the present disclosure may include the following steps.
  • step S210 for the specific implementation manner of step S210, reference may be made to step S110, which will not be described in detail here.
  • the parasitic application runs in the environment provided by the host application, for example, the "game box” application (host application) implemented based on the installation-free framework (engine), and the "game” application (parasitic application) runs in an independent process, independent in the task stack.
  • the process suicide behavior of the parasitic application when the process suicide of the parasitic application, the buried point information that is not visible on the application interface will not be reported, so that when the actual application crash is counted, the process suicide behavior of the parasitic application is judged as a process crash Behavior.
  • the hook function When the parasitic application calls the above preset interface to exit its own process, the hook function will pre-capture the call information of the parasitic application calling the preset interface due to the HOOK processing of the preset interface, so as to perceive the suicide event of the parasitic application .
  • the electronic device does not report the exit behavior of the parasitic application as a program crash event to the server, thereby excluding the process suicide behavior of the parasitic application from the statistical data of the program crash event, so as to ensure that real parasitic application process crash data can be obtained.
  • Fig. 3 is a schematic flowchart of a method for managing application programs according to yet another exemplary embodiment.
  • the application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device.
  • the application program management provided by the embodiment of the present disclosure may include the following steps.
  • monitoring code may be injected into the process of the parasitic application through the host application, and the monitoring code is used to monitor the running state of each function of the parasitic application.
  • monitoring codes can be used for different functions. For example, if a parasitic application experiences an exception when executing a try statement and causes the process to crash, the injected try catch statement can be used to capture the exception information of the try statement.
  • the monitoring code can monitor the running state information of each function of the parasitic application.
  • the monitoring code obtains the state information of each function and outputs it to the host application.
  • the host application receives the status information of the parasitic application when it crashes, and determines the cause of the crash of the parasitic application according to the status information.
  • the determination of the cause of the crash may be determined according to the abnormal information in the state information of each function. For example, one type of exception information corresponds to one type of crash cause.
  • the state information of each function of the parasitic application when it crashes can be used as an input of the trained classification model to obtain the crash cause of the parasitic application.
  • the classification model is obtained by using the historical crash data marked with the crash cause of the parasitic application to train the machine learning model.
  • the historical crash data of the parasitic application can be collected, and the collected historical crash data can be marked with the cause of the crash to obtain a training sample, and then the training sample can be used to train the machine learning model to obtain the classification model.
  • the historical crash data may be the status information of each function when the parasitic application crashes and is collected during the historical operation of the parasitic application.
  • the machine learning model can be a neural network model, such as a convolutional neural network (Convolutional Neural Networks, CNN).
  • a convolutional neural network Convolutional Neural Networks, CNN
  • the cause of the crash of the parasitic application can be quickly located, and the cause of the crash can be located locally in the host application, without uploading the crash description information of the parasitic application to the server for manual analysis.
  • At least one solution can be matched for each crash cause.
  • the user can understand the cause of the crash of the parasitic application and obtain a corresponding solution to the crash at the first time.
  • the crash cause and/or solution may be displayed in a pop-up window on the display interface of the host application. For example, when the host application is the "Game Box", if the process of the "mini game” running on the "Game Box” crashes, it can return to the display interface of the "Game Box” and display on the display interface of the "Game Box” Crash causes and/or solutions for Mini Games.
  • the solution when the solution is a solution that can be executed automatically by the host application, the solution is executed by the host application to solve the problem of the crash of the parasitic application.
  • the solution when the solution is to identify the need to modify the system parameter configuration, the system parameter configuration can be automatically modified under the condition of obtaining user authorization, so that the host application has an operating environment for normally running the parasitic application.
  • the monitoring code is used to obtain the status information of each function of the parasitic application when it crashes, and according to the status information, the cause of the crash of the parasitic application is determined, and then the display interface of the host application is displayed.
  • the cause of the crash and/or the corresponding solution so that the cause of the crash can be fed back to the user in time and a solution can be provided, which can greatly improve the user experience of the user using the host application.
  • the interface of the parasitic application and the text information entered by the user in the interface are saved, and when the parasitic application is restarted, the saved interface is presented, and the saved text information is loaded on the interface in the corresponding position.
  • the interface of the parasitic application when it crashes and the text information entered by the user in the interface can be saved by the host application.
  • the host application saves the interface of the parasitic application when it crashes and saves the text information entered by the user.
  • the host application When the user restarts the parasitic application, the host application will transfer the saved interface and text information to the parasitic application. According to the saved interface and text information, the parasitic application will directly enter the saved interface after the parasitic application is restarted, and open the Load the saved text information in .
  • the text information entered by the user in real time can be recorded. After restarting the parasitic application, the user does not need to re-enter the text information again, which can greatly improve the user experience of using the application program.
  • the memory objects of the host application and the parasitic application can be serialized, so as to obtain the interface of the parasitic application when it crashes and the text information input by the user.
  • the host application can record the screen of the interface of the parasitic application to obtain the screen recording file; The interface and the text information entered by the user in the interface are saved.
  • determining the crashed interface of the parasitic application in the screen recording file may be to perform image recognition on the image in the screen recording file, so as to locate the crashing interface of the parasitic application according to the recognized interface identifier or key image elements.
  • text recognition can also be performed on the image frame when the parasitic application crashes in the screen recording file, to obtain the text information input by the user in the interface.
  • the host application can save the interface of the parasitic application and the text information entered by the user in the interface only after obtaining the user's authorization. If the user's authorization is not obtained, the host application disables the function of saving the interface of the parasitic application and the text information input by the user in the interface. Moreover, the interface and text information saved by the host application are only used to restore the crashed interface. For example, the saved interface and text information are stored in a file sandbox, which is only accessible by the parasitic application when restoring the interface, and after the restoration of the interface of the parasitic application is completed, the information in the file sandbox is updated. delete.
  • Fig. 4 is a schematic diagram of module connections of an application program management device according to an exemplary embodiment. As shown in FIG. 4 , an embodiment of the present disclosure provides an application management device, and the device 400 may include:
  • the loading module 401 is configured to load a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
  • the switching module 402 is configured to switch the host application corresponding to the parasitic application to the foreground to return to the UI.
  • the device 400 also includes:
  • the reporting module is configured to not report the exit behavior of the parasitic application to the server as a program crash event when the hook function captures that the parasitic application invokes the preset interface to exit its own process.
  • the device 400 also includes:
  • the display module is configured to present the icon of the parasitic application in the display interface of the host application in a preset display manner after returning to the display interface of the host application.
  • the device 400 also includes:
  • the acquiring module is configured to acquire the state information of each function of the parasitic application when the parasitic application crashes through the pre-injected monitoring code when the parasitic application crashes;
  • the determining module is configured to determine the cause of the crash of the parasitic application according to the state information of each function when it crashes;
  • the display module is configured to display the cause of the crash and/or a solution corresponding to the cause of the crash on the display interface of the host application.
  • the determination module is specifically configured to:
  • the classification model is obtained by using historical crash data marked with crash causes of the parasitic application to train a machine learning model.
  • the device 400 also includes:
  • a saving module configured to save the interface of the parasitic application and the text information input by the user in the interface when the parasitic application crashes
  • the recovery module is configured to present the saved interface when restarting the parasitic application, and load the saved text information into a corresponding position of the interface.
  • the preservation module includes:
  • the recording unit is configured to record a screen of the interface of the parasitic application through the host application during the operation of the parasitic application to obtain a screen recording file;
  • the recording unit is configured to save the crashed interface of the parasitic application in the screen recording file and the text information input by the user in the interface when the parasitic application crashes.
  • FIG. 5 it shows a schematic structural diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 5 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may be randomly accessed according to a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608. Various appropriate actions and processes are executed by programs in the memory (RAM) 603 . In the RAM 603, various programs and data necessary for the operation of the electronic device 600 are also stored.
  • the processing device 601, ROM 602, and RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604 .
  • the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 607 such as a computer; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 5 shows electronic device 600 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602.
  • the processing device 601 When the computer program is executed by the processing device 601, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the electronic device can communicate with any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium (for example, communication networks) interconnect.
  • network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol)
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: loads a hook function in a preset interface, wherein the preset interface is in The interface used to exit the process of the application program when called by the application program; when the hook function captures that the parasitic application calls the preset interface to exit its own process, switch the host application corresponding to the parasitic application Run in the foreground to return to the display interface of the host application.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" 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.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure relates to an application management method and apparatus, a storage medium and an electronic device, which relate to the technical field of computers. The method comprises: loading a hook function in a preset interface, the preset interface being used for exiting the process of the application when being called by the application; and when the hook function detects that a parasite application calls the preset interface to exit the process, switching the host application corresponding to the parasite application to run in the foreground, so as to return to the display interface of the host application.

Description

应用程序管理方法、装置、存储介质以及电子设备Application program management method, device, storage medium and electronic device
本公开要求于2021年12月27日提交的,申请名称为“202111619513.7”的、中国专利申请号为“应用程序管理方法、装置、存储介质以及电子设备”的优先权,该中国专利申请的全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application titled "202111619513.7" filed on December 27, 2021, and the application number is "application program management method, device, storage medium and electronic equipment". The contents are incorporated by reference in this disclosure.
技术领域technical field
本公开涉及计算机技术领域,具体地,涉及一种应用程序管理方法、装置、存储介质以及电子设备。The present disclosure relates to the technical field of computers, and in particular, to an application program management method, device, storage medium and electronic equipment.
背景技术Background technique
相关技术中,为了用户使用应用程序更加便利,小程序和免安装应用等无需用户下载安装在系统中即可运行的寄生应用应运。由于寄生应用运行在宿主应用提供的运行环境中,寄生应用的运行状况高度依赖宿主应用提供的运行环境,因此,为了提高寄生应用的运行性能以及用户使用寄生应用的体验,需要对宿主应用进行改进。In related technologies, in order to make it more convenient for users to use application programs, parasitic applications such as applets and installation-free applications that do not need to be downloaded and installed in the system by users should be implemented. Since the parasitic application runs in the operating environment provided by the host application, the running status of the parasitic application is highly dependent on the operating environment provided by the host application. Therefore, in order to improve the operating performance of the parasitic application and the user experience of using the parasitic application, the host application needs to be improved. .
发明内容Contents of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
第一方面,本公开提供一种应用程序管理方法,包括:In a first aspect, the present disclosure provides an application program management method, including:
在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;Loading a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。When the hook function captures that the parasitic application calls the preset interface to exit its own process, switch the host application corresponding to the parasitic application to the foreground to return to the display interface of the host application.
第二方面,本公开提供一种应用程序管理装置,包括:In a second aspect, the present disclosure provides an application program management device, including:
加载模块,配置为在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;A loading module configured to load a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
上报模块,配置为在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。The reporting module is configured to switch the host application corresponding to the parasitic application to the foreground to return to the display of the host application when the hook function captures that the parasitic application calls the preset interface to exit its own process interface.
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现第一方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.
第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:
存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现第一方面所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
基于上述技术方案,通过在预设接口中加载钩子函数,可以监测寄生应用是否调用该预设接口来完成进程自杀,从而在寄生应用调用该预设接口来退出自身进程的情况下,将宿主应用切换到前台运行,实现在寄生应用自杀之后返回宿主应用的显示界面的效果,从而提高宿主应用的使用率。例如,当宿主应用为游戏盒子时,在游戏进程自杀后,返回游戏盒子的主界面,从而提高游戏盒子的留存率。Based on the above technical solution, by loading the hook function in the preset interface, it is possible to monitor whether the parasitic application calls the preset interface to complete process suicide, so that when the parasitic application calls the preset interface to exit its own process, the host application Switch to the foreground to realize the effect of returning to the display interface of the host application after the parasitic application commits suicide, thereby improving the utilization rate of the host application. For example, when the host application is a game box, after the game process kills itself, it returns to the main interface of the game box, thereby improving the retention rate of the game box.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:
图1是根据一示例性实施例提供的一种应用程序管理方法的流程示意图;Fig. 1 is a schematic flowchart of an application program management method provided according to an exemplary embodiment;
图2是根据另一示例性实施例提供的一种应用程序管理方法的流程示意图;Fig. 2 is a schematic flowchart of an application management method provided according to another exemplary embodiment;
图3是根据又一示例性实施例提供的一种应用程序管理方法的流程示意图;Fig. 3 is a schematic flowchart of an application management method provided according to yet another exemplary embodiment;
图4是根据一示例性实施例提供一种应用程序管理装置的模块连接示意图;Fig. 4 is a schematic diagram of module connections of an application program management device according to an exemplary embodiment;
图5是根据一示例性实施例提供一种电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的, 而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.
为了方便理解,下面对本公开实施例涉及的名词进行介绍。For the convenience of understanding, terms involved in the embodiments of the present disclosure are introduced below.
宿主应用:宿主应用可以简称为宿主,可以用于表示为集成模块提供运行环境的应用主体,例如,以运行在客户端中的宿主应用为社交应用为例,当社交应用中集成了小程序引擎的模块时,该社交应用可以具备打开并展示小程序的能力。又例如,以运行在客户端中的宿主应用为免安装平台为例,免安装平台集成有免安装框架(引擎),该免安装平台可以运行其他原生应用程序。Host application: The host application can be referred to as the host for short, and can be used to represent the application body that provides the operating environment for the integrated module. For example, take the host application running on the client as a social application as an example. When the module is selected, the social application may have the ability to open and display the applet. For another example, taking the host application running on the client as an installation-free platform as an example, the installation-free platform is integrated with a free-installation framework (engine), and the installation-free platform can run other native applications.
寄生应用:寄生应用是指从属于宿主应用,依赖于宿主应用所提供的运行环境而运行的应用程序。Parasitic application: A parasitic application refers to an application program that is subordinate to the host application and runs depending on the operating environment provided by the host application.
钩子函数:钩子函数是一个处理消息的程序段,通过系统调用,将钩子函数挂入系统。每当特定的消息发出,在没有到达目的窗口前,钩子函数就先捕获该消息,即钩子函数先得到控制权。这时,钩子函数可以加工处理(改变)该消息,也可以不作处理而继续传递该消息,还可以强制结束消息的传递。Hook function: The hook function is a program segment for processing messages, and the hook function is hung into the system through system calls. Whenever a specific message is sent, before reaching the destination window, the hook function first captures the message, that is, the hook function first obtains the control right. At this time, the hook function can process (change) the message, or continue to deliver the message without processing it, or forcibly end the message delivery.
图1是根据一示例性实施例提供的一种应用程序管理方法的流程示意图。本实施例公开的应用程序管理方法可以通过电子设备执行,具体可以通过应用程序管理装置来执行,该装置可以有软件和/或硬件的方式实现,配置于电子设备中。请参考图1,本公开实施例提供的应用程序管理方法可以包括以下步骤。Fig. 1 is a schematic flowchart of a method for managing application programs according to an exemplary embodiment. The application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device. Referring to FIG. 1 , the application program management method provided by the embodiment of the present disclosure may include the following steps.
S110,在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口。S110. Load a hook function in a preset interface, where the preset interface is an interface for exiting a process of the application program when called by the application program.
这里,预设接口是指在被应用程序调用时用于退出应用程序的进程的接口。例如,在Android(安卓)的系统层中,预设接口可以是java.lang.System类的exit(退出)方法、java.lang.Runtime类的nativeExit JNI方法、android.os.Process类的killProcess方法、android.os.Process类的sendSignal JNI方法等等。在Linux系统层中,预设接口可以是exit方法、_exit方法、abort方法和send_signal方法等等。Here, the preset interface refers to an interface for exiting the process of the application program when called by the application program. For example, in the Android (Android) system layer, the default interface can be the exit (exit) method of the java.lang.System class, the nativeExit JNI method of the java.lang.Runtime class, and the killProcess method of the android.os.Process class , the sendSignal JNI method of the android.os.Process class, and so on. In the Linux system layer, the preset interface may be an exit method, an _exit method, an abort method, a send_signal method, and the like.
其中,在预设接口中加载钩子函数是指对该预设接口进行HOOK(钩子)处理,以获取应用程序调用该预设接口来退出自身进程的调用消息。应当理解的是,在预设接口中加载钩子函数可以是通过JVM/ART虚拟机HOOK技术或C/C++HOOK技术对该预设接口进行HOOK。Wherein, loading the hook function in the preset interface refers to performing HOOK (hook) processing on the preset interface, so as to obtain a call message that the application program invokes the preset interface to exit its own process. It should be understood that loading the hook function in the preset interface may be HOOKing the preset interface through JVM/ART virtual machine HOOK technology or C/C++ HOOK technology.
S120,在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。S120, when the hook function captures that the parasitic application invokes the preset interface to exit its own process, switch the host application corresponding to the parasitic application to run in the foreground, so as to return to the display interface of the host application.
这里,寄生应用运行在宿主应用提供的环境中,例如,基于免安装框架(引擎)实现的“游戏盒子”应用程序(宿主应用),“游戏”应用程序(寄生应用)运行在独立进程、独 立任务栈之中。其中,寄生应用调用预设接口来退出自身进程是指寄生应用自杀,例如,在内存资源不足的情况下,寄生应用调用该预设接口来退出自身进程。Here, the parasitic application runs in the environment provided by the host application, for example, the "game box" application (host application) implemented based on the installation-free framework (engine), and the "game" application (parasitic application) runs in an independent process, independent in the task stack. Wherein, the parasitic application calling a preset interface to exit its own process refers to the parasitic application committing suicide, for example, in the case of insufficient memory resources, the parasitic application calls the preset interface to exit its own process.
当寄生应用调用上述预设接口来退出自身进程时,由于预先对该预设接口进行了HOOK处理,钩子函数会捕获到寄生应用调用该预设接口的调用信息,从而感知到寄生应用自杀的事件。此时,电子设备将寄生应用对应的宿主应用切换到前台运行,以返回宿主应用的显示界面。例如,在运行在“游戏盒子”中的“游戏”自杀之后,返回“游戏盒子”的主界面。When the parasitic application calls the above preset interface to exit its own process, because the preset interface has been HOOKed in advance, the hook function will capture the call information of the parasitic application calling the preset interface, so as to perceive the suicide event of the parasitic application . At this time, the electronic device switches the host application corresponding to the parasitic application to the foreground to run, so as to return to the display interface of the host application. For example, after the "game" running in the "game box" commits suicide, return to the main interface of the "game box".
在一些实施方式中,可以通过Java层或Java/ART反射机制,调用android framework startActivity将宿主应用切换到前台运行。In some implementation manners, the android framework startActivity can be called to switch the host application to run in the foreground through the Java layer or the Java/ART reflection mechanism.
在一些实施方式中,可以通过am命令的方式,以startActivity函数将宿主应用切换到前台运行。In some implementation manners, the host application can be switched to the foreground with the startActivity function through the am command.
在一些实施方式中,可以通过Java层或Java反射机制,调用android framwork将任务栈切换为宿主应用的任务栈,以将宿主应用切换到前台运行。In some implementation manners, the android framwork can be called to switch the task stack to the task stack of the host application through the Java layer or the Java reflection mechanism, so as to switch the host application to the foreground to run.
应当理解的是,在返回宿主应用的显示界面中之后,在该宿主应用的显示界面中通过预设显示方式呈现寄生应用的图标。其中,预设显示方式可以是放大、颜色标记、闪烁显示等方式中的至少一种。It should be understood that, after returning to the display interface of the host application, the icon of the parasitic application is presented in a preset display manner on the display interface of the host application. Wherein, the preset display mode may be at least one of magnification, color marking, flashing display and the like.
由此,通过在预设接口中加载钩子函数,可以监测寄生应用是否调用该预设接口来完成进程自杀,从而在寄生应用调用该预设接口来退出自身进程的情况下,将宿主应用切换到前台运行,实现在寄生应用自杀之后返回宿主应用的显示界面的效果,从而提高宿主应用的使用率。例如,当宿主应用为游戏盒子时,在游戏进程自杀后,返回游戏盒子的主界面,从而提高游戏盒子的留存率。Thus, by loading the hook function in the preset interface, it can be monitored whether the parasitic application calls the preset interface to complete process suicide, so that when the parasitic application calls the preset interface to exit its own process, the host application is switched to Run in the foreground to achieve the effect of returning to the display interface of the host application after the parasitic application commits suicide, thereby improving the utilization rate of the host application. For example, when the host application is a game box, after the game process kills itself, it returns to the main interface of the game box, thereby improving the retention rate of the game box.
图2是根据另一示例性实施例提供的一种应用程序管理方法的流程示意图。本实施例公开的应用程序管理方法可以通过电子设备执行,具体可以通过应用程序管理装置来执行,该装置可以有软件和/或硬件的方式实现,配置于电子设备中。请参考图2,本公开实施例提供的应用程序管理可以包括以下步骤。Fig. 2 is a schematic flowchart of a method for managing application programs according to another exemplary embodiment. The application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device. Referring to FIG. 2 , the application program management provided by the embodiment of the present disclosure may include the following steps.
S210,在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口。S210. Load a hook function in a preset interface, where the preset interface is an interface for exiting a process of the application program when called by the application program.
这里,步骤S210的具体实施方式可以参考步骤S110,在此不再详细说明。Here, for the specific implementation manner of step S210, reference may be made to step S110, which will not be described in detail here.
S220,在所述钩子函数捕获到所述寄生应用调用所述预设接口来退出自身进程的情况下,不将所述寄生应用的退出行为作为程序崩溃事件上报至服务器。S220. When the hook function captures that the parasitic application invokes the preset interface to exit its own process, do not report the exit behavior of the parasitic application to the server as a program crash event.
这里,寄生应用运行在宿主应用提供的环境中,例如,基于免安装框架(引擎)实现的“游戏盒子”应用程序(宿主应用),“游戏”应用程序(寄生应用)运行在独立进程、独立任务栈之中。针对寄生应用的进程自杀行为,当寄生应用的进程自杀时,并不会上报应用 界面不可见的埋点信息,从而导致在实际统计应用崩溃情况时,将寄生应用的进程自杀行为判定为进程崩溃行为。Here, the parasitic application runs in the environment provided by the host application, for example, the "game box" application (host application) implemented based on the installation-free framework (engine), and the "game" application (parasitic application) runs in an independent process, independent in the task stack. For the process suicide behavior of the parasitic application, when the process suicide of the parasitic application, the buried point information that is not visible on the application interface will not be reported, so that when the actual application crash is counted, the process suicide behavior of the parasitic application is judged as a process crash Behavior.
当寄生应用调用上述预设接口来退出自身进程时,由于对该预设接口进行了HOOK处理,钩子函数会预先捕获到寄生应用调用该预设接口的调用信息,从而感知到寄生应用自杀的事件。此时,电子设备不将寄生应用的退出行为作为程序崩溃事件上报至服务器,从而将寄生应用的进程自杀行为排除出程序崩溃事件的统计数据中,保证能够获得真实的寄生应用进程崩溃数据。When the parasitic application calls the above preset interface to exit its own process, the hook function will pre-capture the call information of the parasitic application calling the preset interface due to the HOOK processing of the preset interface, so as to perceive the suicide event of the parasitic application . At this time, the electronic device does not report the exit behavior of the parasitic application as a program crash event to the server, thereby excluding the process suicide behavior of the parasitic application from the statistical data of the program crash event, so as to ensure that real parasitic application process crash data can be obtained.
图3是根据又一示例性实施例提供的一种应用程序管理方法的流程示意图。本实施例公开的应用程序管理方法可以通过电子设备执行,具体可以通过应用程序管理装置来执行,该装置可以有软件和/或硬件的方式实现,配置于电子设备中。请参考图3,本公开实施例提供的应用程序管理可以包括以下步骤。Fig. 3 is a schematic flowchart of a method for managing application programs according to yet another exemplary embodiment. The application program management method disclosed in this embodiment can be executed by an electronic device, specifically by an application program management device, which can be implemented in the form of software and/or hardware and configured in the electronic device. Referring to FIG. 3 , the application program management provided by the embodiment of the present disclosure may include the following steps.
S310,在所述寄生应用崩溃的情况下,通过预先注入的监控代码获取所述寄生应用的各个函数在所述寄生应用崩溃时的状态信息。S310. In the case that the parasitic application crashes, acquire state information of each function of the parasitic application when the parasitic application crashes through the pre-injected monitoring code.
这里,在寄生应用创建进程时,可以通过宿主应用向寄生应用的进程注入监控代码,该监控代码用于对寄生应用各个函数在运行时的状态进行监控。Here, when the parasitic application creates a process, monitoring code may be injected into the process of the parasitic application through the host application, and the monitoring code is used to monitor the running state of each function of the parasitic application.
应当理解的是,针对不同的函数,可以使用不同的监控代码,例如,寄生应用在执行try语句时发生异常导致进程崩溃,则可以通过注入的try catch语句来捕获try语句的异常信息。It should be understood that different monitoring codes can be used for different functions. For example, if a parasitic application experiences an exception when executing a try statement and causes the process to crash, the injected try catch statement can be used to capture the exception information of the try statement.
S320,根据所述各个函数在崩溃时的状态信息,确定所述寄生应用的崩溃原因。S320. Determine a crash cause of the parasitic application according to state information of each function when it crashes.
这里,监控代码可以对寄生应用每个函数在运行时的状态信息进行监控,当寄生应用的进程发生崩溃时,监控代码获取各个函数的状态信息,并输出给宿主应用。宿主应用接收寄生应用在崩溃时的状态信息,并根据该状态信息来确定寄生应用的崩溃原因。其中,崩溃原因的确定可以是根据各个函数的状态信息中的异常信息来确定。例如,一种异常信息对应一种崩溃原因。Here, the monitoring code can monitor the running state information of each function of the parasitic application. When the process of the parasitic application crashes, the monitoring code obtains the state information of each function and outputs it to the host application. The host application receives the status information of the parasitic application when it crashes, and determines the cause of the crash of the parasitic application according to the status information. Wherein, the determination of the cause of the crash may be determined according to the abnormal information in the state information of each function. For example, one type of exception information corresponds to one type of crash cause.
在一些实施方式中,可以将寄生应用各个函数在崩溃时的状态信息作为训练好的分类模型的输入,获得寄生应用的崩溃原因。In some implementations, the state information of each function of the parasitic application when it crashes can be used as an input of the trained classification model to obtain the crash cause of the parasitic application.
其中,分类模型是利用寄生应用的标记有崩溃原因的历史崩溃数据对机器学习模型进行训练得到的。Among them, the classification model is obtained by using the historical crash data marked with the crash cause of the parasitic application to train the machine learning model.
这里,针对寄生应用,可以采集寄生应用的历史崩溃数据,并对采集到的历史崩溃数据进行崩溃原因标记,获得训练样本,然后利用该训练样本对机器学习模型进行训练,获得分类模型。其中,历史崩溃数据可以是寄生应用在历史运行过程中采集到的寄生应用崩溃时的各个函数的状态信息。Here, for the parasitic application, the historical crash data of the parasitic application can be collected, and the collected historical crash data can be marked with the cause of the crash to obtain a training sample, and then the training sample can be used to train the machine learning model to obtain the classification model. Wherein, the historical crash data may be the status information of each function when the parasitic application crashes and is collected during the historical operation of the parasitic application.
值得说明的是,机器学习模型可以是神经网络模型,如卷积神经网络(Convolutional  Neural Networks,CNN)。It is worth noting that the machine learning model can be a neural network model, such as a convolutional neural network (Convolutional Neural Networks, CNN).
由此,通过训练好的分类模型,可以快速定位出寄生应用的崩溃原因,而且崩溃原因定位可以在宿主应用的本地进行,不需要将寄生应用的崩溃描述信息上传至服务器进行人工分析。Therefore, through the trained classification model, the cause of the crash of the parasitic application can be quickly located, and the cause of the crash can be located locally in the host application, without uploading the crash description information of the parasitic application to the server for manual analysis.
S330,在所述宿主应用的显示界面中展示所述崩溃原因和/或所述崩溃原因对应的解决方案。S330. Display the cause of the crash and/or a solution corresponding to the cause of the crash on the display interface of the host application.
这里,当寄生应用崩溃时,返回宿主应用的显示界面,并在宿主应用的显示界面中展示寄生应用崩溃的崩溃原因和/或该崩溃原因对应的解决方案。Here, when the parasitic application crashes, return to the display interface of the host application, and display the crash cause of the parasitic application crash and/or the solution corresponding to the crash cause on the display interface of the host application.
其中,针对每一崩溃原因可以匹配至少一种解决方案。通过向用户展示崩溃原因和/或解决方案,可以让用户第一时间了解寄生应用的崩溃原因以及获得对应的崩溃解决方案。示例性地,可以在宿主应用的显示界面中以弹窗的方式来展示崩溃原因和/或解决方案。例如,当宿主应用为“游戏盒子”时,若运行在“游戏盒子”上的“小游戏”进程崩溃,则可以返回“游戏盒子”的显示界面,并在“游戏盒子”的显示界面上显示“小游戏”的崩溃原因和/或解决方案。Wherein, at least one solution can be matched for each crash cause. By showing the cause of the crash and/or the solution to the user, the user can understand the cause of the crash of the parasitic application and obtain a corresponding solution to the crash at the first time. Exemplarily, the crash cause and/or solution may be displayed in a pop-up window on the display interface of the host application. For example, when the host application is the "Game Box", if the process of the "mini game" running on the "Game Box" crashes, it can return to the display interface of the "Game Box" and display on the display interface of the "Game Box" Crash causes and/or solutions for Mini Games.
在一些实施方式中,当该解决方案为宿主应用能够自动执行的解决方案时,通过宿主应用执行该解决方案,以解决寄生应用运行崩溃的问题。例如,当解决方案是表征需要修改系统参数配置时,可以在获得用户授权的情况下,自动修改系统参数配置,以使宿主应用具有正常运行寄生应用的运行环境。In some embodiments, when the solution is a solution that can be executed automatically by the host application, the solution is executed by the host application to solve the problem of the crash of the parasitic application. For example, when the solution is to identify the need to modify the system parameter configuration, the system parameter configuration can be automatically modified under the condition of obtaining user authorization, so that the host application has an operating environment for normally running the parasitic application.
由此,通过向寄生应用注入监控代码,利用该监控代码获取寄生应用的各个函数在崩溃时的状态信息,并根据该状态信息确定寄生应用的崩溃原因,然后在宿主应用的显示界面中展示该崩溃原因和/或对应的解决方案,从而能够及时向用户反馈崩溃原因并提供解决方案,能够极大提高用户使用宿主应用的用户体验。Therefore, by injecting the monitoring code into the parasitic application, the monitoring code is used to obtain the status information of each function of the parasitic application when it crashes, and according to the status information, the cause of the crash of the parasitic application is determined, and then the display interface of the host application is displayed. The cause of the crash and/or the corresponding solution, so that the cause of the crash can be fed back to the user in time and a solution can be provided, which can greatly improve the user experience of the user using the host application.
在一些实施方式中,当寄生应用崩溃时,保存寄生应用的界面以及用户在该界面中输入的文本信息,当重启寄生应用时,呈现保存到的界面,并将保存到的文本信息加载在界面的对应位置中。In some implementations, when the parasitic application crashes, the interface of the parasitic application and the text information entered by the user in the interface are saved, and when the parasitic application is restarted, the saved interface is presented, and the saved text information is loaded on the interface in the corresponding position.
这里,在寄生应用崩溃时,可以通过宿主应用保存寄生应用在崩溃时的界面以及用户在该界面中输入的文本信息。例如,当用户正在寄生应用中输入文字信息时,寄生应用崩溃,此时,宿主应用保存寄生应用在崩溃时的界面并保存用户输入的文本信息。Here, when the parasitic application crashes, the interface of the parasitic application when it crashes and the text information entered by the user in the interface can be saved by the host application. For example, when the user is inputting text information in the parasitic application, the parasitic application crashes. At this time, the host application saves the interface of the parasitic application when it crashes and saves the text information entered by the user.
当用户重启寄生应用时,宿主应用将保存到的界面以及文本信息传递至寄生应用,寄生应用根据保存到的界面以及文本信息,在寄生应用重启后,直接进入保存到的界面,并在该界面中加载保存到的文本信息。When the user restarts the parasitic application, the host application will transfer the saved interface and text information to the parasitic application. According to the saved interface and text information, the parasitic application will directly enter the saved interface after the parasitic application is restarted, and open the Load the saved text information in .
由此,即使寄生应用崩溃,也能够记录用户实时输入的文本信息,在重启寄生应用后, 无需用户再次重新输入文本信息,能够极大提供用户使用应用程序的用户体验。Thus, even if the parasitic application crashes, the text information entered by the user in real time can be recorded. After restarting the parasitic application, the user does not need to re-enter the text information again, which can greatly improve the user experience of using the application program.
在一些实施方式中,可以对宿主应用和寄生应用的内存对象进行序列化,从而获得寄生应用在崩溃时的界面以及用户输入文本信息。In some implementations, the memory objects of the host application and the parasitic application can be serialized, so as to obtain the interface of the parasitic application when it crashes and the text information input by the user.
在一些实施方式中,在寄生应用运行的过程中,可以通过宿主应用对寄生应用的界面进行录屏,获得录屏文件;在寄生应用崩溃的情况下,将录屏文件中寄生应用在崩溃时的界面以及用户在界面中输入的文本信息进行保存。In some implementations, during the running of the parasitic application, the host application can record the screen of the interface of the parasitic application to obtain the screen recording file; The interface and the text information entered by the user in the interface are saved.
其中,在录屏文件中确定寄生应用在崩溃时的界面可以是对录屏文件中的图像进行图像识别,从而根据识别出的界面标识或者关键图像元素来定位出寄生应用在崩溃时的界面。当然,也可以对录屏文件中寄生应用崩溃时的图像帧进行文字识别,获得用户在该界面中输入的文本信息。Wherein, determining the crashed interface of the parasitic application in the screen recording file may be to perform image recognition on the image in the screen recording file, so as to locate the crashing interface of the parasitic application according to the recognized interface identifier or key image elements. Of course, text recognition can also be performed on the image frame when the parasitic application crashes in the screen recording file, to obtain the text information input by the user in the interface.
值得说明的是,宿主应用是在获得用户的授权许可的情况下才能够保存寄生应用的界面以及用户在该界面中输入的文本信息。在未获得用户授权许可的情况下,宿主应用禁用保存寄生应用的界面以及用户在该界面中输入的文本信息的功能。而且,宿主应用保存到的界面以及文本信息,仅用于进行崩溃界面恢复。例如,将保存到的界面以及文本信息存放在文件沙箱中,该文件沙箱仅供寄生应用在恢复界面时访问,并且在寄生应用的界面恢复完成后,对该文件沙箱中的信息进行删除。It is worth noting that the host application can save the interface of the parasitic application and the text information entered by the user in the interface only after obtaining the user's authorization. If the user's authorization is not obtained, the host application disables the function of saving the interface of the parasitic application and the text information input by the user in the interface. Moreover, the interface and text information saved by the host application are only used to restore the crashed interface. For example, the saved interface and text information are stored in a file sandbox, which is only accessible by the parasitic application when restoring the interface, and after the restoration of the interface of the parasitic application is completed, the information in the file sandbox is updated. delete.
图4是根据一示例性实施例提供一种应用程序管理装置的模块连接示意图。如图4所示,本公开实施例提供一种应用程序管理装置,该装置400可以包括:Fig. 4 is a schematic diagram of module connections of an application program management device according to an exemplary embodiment. As shown in FIG. 4 , an embodiment of the present disclosure provides an application management device, and the device 400 may include:
加载模块401,配置为在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;The loading module 401 is configured to load a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
切换模块402,配置为在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。The switching module 402 is configured to switch the host application corresponding to the parasitic application to the foreground to return to the UI.
在一些实施例中,所述装置400还包括:In some embodiments, the device 400 also includes:
上报模块,配置为在所述钩子函数捕获到所述寄生应用调用所述预设接口来退出自身进程的情况下,不将所述寄生应用的退出行为作为程序崩溃事件上报至服务器。The reporting module is configured to not report the exit behavior of the parasitic application to the server as a program crash event when the hook function captures that the parasitic application invokes the preset interface to exit its own process.
在一些实施例中,所述装置400还包括:In some embodiments, the device 400 also includes:
显示模块,配置为在返回所述宿主应用的显示界面之后,在所述宿主应用的显示界面中通过预设显示方式呈现所述寄生应用的图标。The display module is configured to present the icon of the parasitic application in the display interface of the host application in a preset display manner after returning to the display interface of the host application.
在一些实施例中,所述装置400还包括:In some embodiments, the device 400 also includes:
获取模块,配置为在所述寄生应用崩溃的情况下,通过预先注入的监控代码获取所述寄生应用的各个函数在所述寄生应用崩溃时的状态信息;The acquiring module is configured to acquire the state information of each function of the parasitic application when the parasitic application crashes through the pre-injected monitoring code when the parasitic application crashes;
确定模块,配置为根据所述各个函数在崩溃时的状态信息,确定所述寄生应用的崩溃原因;The determining module is configured to determine the cause of the crash of the parasitic application according to the state information of each function when it crashes;
展示模块,配置为在所述宿主应用的显示界面中展示所述崩溃原因和/或所述崩溃原因对应的解决方案。The display module is configured to display the cause of the crash and/or a solution corresponding to the cause of the crash on the display interface of the host application.
在一些实施例中,所述确定模块具体配置为:In some embodiments, the determination module is specifically configured to:
将所述各个函数在崩溃时的状态信息作为训练好的分类模型的输入,获得所述寄生应用的崩溃原因;Using the state information of each function when it crashes as the input of the trained classification model to obtain the crash cause of the parasitic application;
其中,所述分类模型是利用所述寄生应用的标记有崩溃原因的历史崩溃数据对机器学习模型进行训练得到的。Wherein, the classification model is obtained by using historical crash data marked with crash causes of the parasitic application to train a machine learning model.
在一些实施例中,所述装置400还包括:In some embodiments, the device 400 also includes:
保存模块,配置为在所述寄生应用崩溃的情况下,保存所述寄生应用的界面以及用户在所述界面中输入的文本信息;A saving module configured to save the interface of the parasitic application and the text information input by the user in the interface when the parasitic application crashes;
恢复模块,配置为在重启所述寄生应用时,呈现保存到的所述界面,并将保存到的所述文本信息加载在所述界面的对应位置中。The recovery module is configured to present the saved interface when restarting the parasitic application, and load the saved text information into a corresponding position of the interface.
在一些实施例中,所述保存模块包括:In some embodiments, the preservation module includes:
录制单元,配置为在所述寄生应用运行的过程中,通过所述宿主应用对所述寄生应用的界面进行录屏,得到录屏文件;The recording unit is configured to record a screen of the interface of the parasitic application through the host application during the operation of the parasitic application to obtain a screen recording file;
记录单元,配置为在所述寄生应用崩溃的情况下,将所述录屏文件中所述寄生应用在崩溃时的界面以及用户在所述界面中输入的文本信息进行保存。The recording unit is configured to save the crashed interface of the parasitic application in the screen recording file and the text information input by the user in the interface when the parasitic application crashes.
关于上述实施例中的装置的各个功能模块的具体实施方式,已在关于方法的部分进行了详细说明,在此不再赘述。The specific implementation of each functional module of the device in the above embodiment has been described in detail in the part about the method, and will not be repeated here.
下面参考图5,其示出了适于用来实现本公开实施例的电子设备600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 5 , it shows a schematic structural diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. The terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 5 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
如图5所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 5, an electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may be randomly accessed according to a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608. Various appropriate actions and processes are executed by programs in the memory (RAM) 603 . In the RAM 603, various programs and data necessary for the operation of the electronic device 600 are also stored. The processing device 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to the bus 604 .
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄 像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 607 such as a computer; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 5 shows electronic device 600 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,电子设备可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the electronic device can communicate with any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium ( For example, communication networks) interconnect. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入 该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: loads a hook function in a preset interface, wherein the preset interface is in The interface used to exit the process of the application program when called by the application program; when the hook function captures that the parasitic application calls the preset interface to exit its own process, switch the host application corresponding to the parasitic application Run in the foreground to return to the display interface of the host application.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" 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 cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁 性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (10)

  1. 一种应用程序管理方法,其包括:A method of application management comprising:
    在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;Loading a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
    在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。When the hook function captures that the parasitic application calls the preset interface to exit its own process, switch the host application corresponding to the parasitic application to the foreground to return to the display interface of the host application.
  2. 根据权利要求1所述的应用程序管理方法,其特征在于,所述方法还包括:The application program management method according to claim 1, further comprising:
    在所述钩子函数捕获到所述寄生应用调用所述预设接口来退出自身进程的情况下,不将所述寄生应用的退出行为作为程序崩溃事件上报至服务器。When the hook function captures that the parasitic application invokes the preset interface to exit its own process, the exit behavior of the parasitic application is not reported to the server as a program crash event.
  3. 根据权利要求1所述的应用程序管理方法,其中,所述方法还包括:The application program management method according to claim 1, wherein the method further comprises:
    在返回所述宿主应用的显示界面之后,在所述宿主应用的显示界面中通过预设显示方式呈现所述寄生应用的图标。After returning to the display interface of the host application, the icon of the parasitic application is presented in a preset display manner on the display interface of the host application.
  4. 根据权利要求1至3中任一项所述的应用程序管理方法,其中,所述方法还包括:The application program management method according to any one of claims 1 to 3, wherein the method further comprises:
    在所述寄生应用崩溃的情况下,通过预先注入的监控代码获取所述寄生应用的各个函数在所述寄生应用崩溃时的状态信息;In the case that the parasitic application crashes, the state information of each function of the parasitic application when the parasitic application crashes is obtained through pre-injected monitoring code;
    根据所述各个函数在崩溃时的状态信息,确定所述寄生应用的崩溃原因;determining the cause of the crash of the parasitic application according to the state information of each function when it crashes;
    在所述宿主应用的显示界面中展示所述崩溃原因和/或所述崩溃原因对应的解决方案。The cause of the crash and/or the solution corresponding to the cause of the crash are displayed on the display interface of the host application.
  5. 根据权利要求4所述的应用程序管理方法,其中,所述根据所述各个函数在崩溃时的状态信息,确定所述寄生应用的崩溃原因,包括:The application program management method according to claim 4, wherein said determining the crash cause of the parasitic application according to the state information of each function when it crashes comprises:
    将所述各个函数在崩溃时的状态信息作为训练好的分类模型的输入,获得所述寄生应用的崩溃原因;Using the state information of each function when it crashes as the input of the trained classification model to obtain the crash cause of the parasitic application;
    其中,所述分类模型是利用所述寄生应用的标记有崩溃原因的历史崩溃数据对机器学习模型进行训练得到的。Wherein, the classification model is obtained by using historical crash data marked with crash causes of the parasitic application to train a machine learning model.
  6. 根据权利要求4所述的应用程序管理方法,其中,所述方法还包括:The application program management method according to claim 4, wherein said method further comprises:
    在所述寄生应用崩溃的情况下,保存所述寄生应用的界面以及用户在所述界面中输入的文本信息;When the parasitic application crashes, save the interface of the parasitic application and the text information input by the user in the interface;
    在重启所述寄生应用时,呈现保存到的所述界面,并将保存到的所述文本信息加载在所述界面的对应位置中。When the parasitic application is restarted, the saved interface is presented, and the saved text information is loaded into a corresponding position of the interface.
  7. 根据权利要求6所述的应用程序管理方法,其中,所述在所述寄生应用崩溃的情况下,保存所述寄生应用的界面以及用户在所述界面中输入的文本信息,包括:The application program management method according to claim 6, wherein in the case of the parasitic application crashing, saving the interface of the parasitic application and the text information input by the user in the interface comprises:
    在所述寄生应用运行的过程中,通过所述宿主应用对所述寄生应用的界面进行录屏,得到录屏文件;During the running process of the parasitic application, the interface of the parasitic application is recorded through the host application to obtain a screen recording file;
    在所述寄生应用崩溃的情况下,将所述录屏文件中所述寄生应用在崩溃时的界面以及用户在所述界面中输入的文本信息进行保存。In the case that the parasitic application crashes, the interface of the parasitic application at the time of crash and the text information input by the user in the interface in the screen recording file are saved.
  8. 一种应用程序管理装置,其包括:An application management device, comprising:
    加载模块,配置为在预设接口中加载钩子函数,其中,所述预设接口是在被应用程序调用时用于退出所述应用程序的进程的接口;A loading module configured to load a hook function in a preset interface, wherein the preset interface is an interface for exiting the process of the application program when called by the application program;
    上报模块,配置为在所述钩子函数捕获到寄生应用调用所述预设接口来退出自身进程的情况下,将所述寄生应用对应的宿主应用切换到前台运行,以返回所述宿主应用的显示界面。The reporting module is configured to switch the host application corresponding to the parasitic application to the foreground to return to the display of the host application when the hook function captures that the parasitic application calls the preset interface to exit its own process interface.
  9. 一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理装置执行时实现权利要求1-7中任一项所述方法的步骤。A computer-readable medium, on which a computer program is stored, wherein, when the program is executed by a processing device, the steps of the method according to any one of claims 1-7 are implemented.
  10. 一种电子设备,其包括:An electronic device comprising:
    存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-7.
PCT/CN2022/138301 2021-12-27 2022-12-12 Application managment method and apparatus, storage medium and electronic device WO2023124929A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111619513.7A CN116360877A (en) 2021-12-27 2021-12-27 Application management method and device, storage medium and electronic equipment
CN202111619513.7 2021-12-27

Publications (1)

Publication Number Publication Date
WO2023124929A1 true WO2023124929A1 (en) 2023-07-06

Family

ID=86924735

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138301 WO2023124929A1 (en) 2021-12-27 2022-12-12 Application managment method and apparatus, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN116360877A (en)
WO (1) WO2023124929A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628673A (en) * 2018-05-07 2018-10-09 上海掌门科技有限公司 Data processing method, electronic equipment and computer-readable medium
CN109408261A (en) * 2018-09-26 2019-03-01 中国平安财产保险股份有限公司 Application crash processing method, device, computer equipment and storage medium
CN109739770A (en) * 2019-01-04 2019-05-10 百度在线网络技术(北京)有限公司 The adjustment method and device of small routine
US10331471B1 (en) * 2017-03-29 2019-06-25 Parallels International Gmbh Browser credential management for virtual execution environments
CN110531910A (en) * 2018-05-24 2019-12-03 上海掌门科技有限公司 A kind of interface display method and equipment
CN112925586A (en) * 2021-03-10 2021-06-08 深圳市活力天汇科技股份有限公司 Applet routing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10331471B1 (en) * 2017-03-29 2019-06-25 Parallels International Gmbh Browser credential management for virtual execution environments
CN108628673A (en) * 2018-05-07 2018-10-09 上海掌门科技有限公司 Data processing method, electronic equipment and computer-readable medium
CN110531910A (en) * 2018-05-24 2019-12-03 上海掌门科技有限公司 A kind of interface display method and equipment
CN109408261A (en) * 2018-09-26 2019-03-01 中国平安财产保险股份有限公司 Application crash processing method, device, computer equipment and storage medium
CN109739770A (en) * 2019-01-04 2019-05-10 百度在线网络技术(北京)有限公司 The adjustment method and device of small routine
CN112925586A (en) * 2021-03-10 2021-06-08 深圳市活力天汇科技股份有限公司 Applet routing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116360877A (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
CN110825456B (en) Loading time calculation method, loading time calculation device, computer equipment and storage medium
CN107807861B (en) Screen freezing solution method, mobile terminal and computer readable storage medium
CN111367698B (en) Application program flash back detection and processing method and device and electronic equipment
CN111858112B (en) Method, client and server for detecting memory leakage
CN111274503B (en) Data processing method, device, electronic equipment and computer readable medium
CN110399576B (en) Page switching method and device, readable medium and electronic equipment
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN107818036B (en) Black screen detection method, mobile terminal and computer readable storage medium
JP2023536365A (en) Video processing method and apparatus
CN112256372B (en) Information processing method and device and electronic equipment
WO2023124929A1 (en) Application managment method and apparatus, storage medium and electronic device
CN112116826A (en) Method and device for generating information
WO2023124944A1 (en) Video call method and apparatus, electronic device, and storage medium
CN110377362B (en) Method, device, terminal and storage medium for cleaning application program
CN115033469A (en) Website system performance test method and device, equipment and storage medium
WO2023116167A1 (en) Lifecycle event management method and apparatus, storage medium and electronic device
CN113467656A (en) Screen touch event notification method and vehicle machine
CN107888411B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN110471714B (en) Method, device, terminal and storage medium for controlling application starting
CN114385096B (en) Display control method, device, terminal and storage medium
CN113438419B (en) Camera starting method and device and electronic equipment
CN111324888B (en) Verification method and device for application program starting, electronic equipment and storage medium
WO2023116522A1 (en) Process management method and apparatus, and storage medium and electronic device
WO2023109310A1 (en) Process management method and apparatus, and storage medium and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914184

Country of ref document: EP

Kind code of ref document: A1