Application starting detection method and device, computer equipment and storage medium
Through multi-dimensional detection methods, including manifest files, external libraries and startup log detection, the problem of low application startup detection efficiency in the existing technology is solved, and more efficient and accurate application startup detection is achieved to prevent self-start and associated startup to the device Effects of performance and user privacy.
Patent Information
- Application Number
- CN202411190797.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-24
AI Technical Summary
The existing application startup detection technology is inefficient and cannot effectively prevent the impact of application self-starting and associated startup between applications on device performance and user privacy.
Multi-dimensional detection methods are adopted, including manifest file detection, external library detection and startup log detection. By obtaining the basic information of the application, the detection dimension is determined, and the pre-oriented application startup detection is realized, improving the comprehensiveness and accuracy of the detection.
It improves the efficiency and accuracy of application startup detection, and can more effectively prevent the impact of application self-starting and associated startup on device performance and user privacy, saving system resources.
Smart Images

Figure CN119179527A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of information security and financial technology, and in particular to an application startup detection method, device, computer equipment and storage medium. Background Art
[0002] With the continuous development of the Internet, various applications in terminals emerge in an endless stream, and their functions become increasingly complex. The self-starting of applications and the associated startup of applications are becoming more and more common. The original intention of these behaviors is to provide users with a better user experience to a certain extent, such as realizing functions such as instant message notification and background update. However, the self-starting of applications and the associated startup of applications may cause applications to occupy more background resources, affect device performance and user experience, consume too much system resources and power, and even generate malicious behaviors such as mobile phone user privacy information. For example, in the field of financial technology, an application related to financial insurance may be frequently started and recommend products to users; some applications may also cause the application to start and generate the risk of user data leakage due to the irregular reference of third-party libraries. Therefore, it is necessary to prevent the self-starting of applications and the associated startup of applications. However, the current application startup detection technology usually records the startup of applications and then reports it to users, and users check the startup status of applications and set the startup of applications by themselves. This post-processing method makes the detection efficiency of application startup low. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an application startup detection method, apparatus, computer equipment and storage medium to improve the efficiency of application startup detection.
[0004] In order to solve the above technical problems, the present application embodiment provides an application startup detection method, which adopts the following technical solution:
[0005] Get the application to be tested;
[0006] Obtaining basic information of the application, and determining detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection;
[0007] Performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension;
[0008] A startup condition detection result is generated based on each primary detection result.
[0009] In order to solve the above technical problems, the embodiment of the present application further provides an application startup detection device, which adopts the following technical solution:
[0010] An application acquisition module, used to acquire the application to be detected;
[0011] An information acquisition module, used to acquire basic information of the application, and determine detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection;
[0012] A startup detection module, used to perform startup detection on the application according to the determined detection dimension, and obtain a primary detection result of each detection dimension;
[0013] The result generation module is used to generate a startup status detection result according to each primary detection result.
[0014] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0015] Get the application to be tested;
[0016] Obtaining basic information of the application, and determining detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection;
[0017] Performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension;
[0018] A startup condition detection result is generated based on each primary detection result.
[0019] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0020] Get the application to be tested;
[0021] Obtaining basic information of the application, and determining detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection;
[0022] Performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension;
[0023] A startup condition detection result is generated based on each primary detection result.
[0024] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: obtaining the application to be detected; obtaining the basic information of the application, the basic information reflects the basic situation of the application, and is used to determine the detection dimension of the application; the detection dimension includes manifest file detection, external library detection and startup log detection, among which the manifest file detection is to detect the manifest file of the application, and the manifest file plays a configuration role for the application; the external library detection is to detect the external third-party library used by the application; the startup log detection is to detect the startup log of the application; the manifest file detection and the external library detection can realize the pre-detection, and the startup log can detect the self-startup of the application and the associated startup between applications, and the multi-dimensional detection improves the comprehensiveness and accuracy of the application startup detection; the primary detection results of each detection dimension generate the startup situation detection results, which improves the accuracy of the startup situation detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0027] Figure 2 is a flow chart of an embodiment of an application startup detection method according to the present application;
[0028] Figure 3 is a structural schematic diagram of an embodiment of an application startup detection device according to the present application;
[0029] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0033] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0034] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0035] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc.
[0036] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0037] It should be noted that the application startup detection method provided in the embodiment of the present application is generally executed by a server, and accordingly, the application startup detection device is generally set in the server. It should be noted that the application startup detection method in the present application can also be implemented by a terminal device, or by a server and a terminal together.
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0039] Continue to refer Figure 2 , shows a flow chart of an embodiment of an application startup detection method according to the present application. The application startup detection method comprises the following steps:
[0040] Step S201, obtaining an application to be detected.
[0041] In this embodiment, the electronic device (eg, Figure 1 The server shown in the figure) can communicate with the terminal device through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0042] Specifically, an application to be detected is obtained. The application may be an application in a terminal device. The present application is to perform self-startup detection and associated startup detection between applications on the application in the terminal device.
[0043] Step S202, obtaining basic information of the application, and determining detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection.
[0044] Specifically, the basic information of the application is obtained. The basic information is used to understand some basic information of the application, so as to determine the detection dimension of the application. For example, the basic information may include whether the application uses an external third-party library. If so, it is necessary to perform external library detection on the external third-party library; the basic information also includes whether the application has a startup log. If so, it is necessary to perform startup log detection.
[0045] The detection dimensions include manifest file detection, external library detection, and startup log detection. Among them, manifest file detection is to detect the manifest file of the application; Android applications have a manifest file, usually named AndroidManifest.xml. This manifest file contains important information about the application, such as the components of the application (such as activities, services, and broadcast receivers), permissions, the name of the application, version information, etc.; it is the configuration file of the Android application, which tells the Android system how the various parts of the application work together and interact with the system and other applications.
[0046] External library detection is used to detect whether the external third-party libraries used by the application will cause the application to start automatically. Startup log detection is used to detect the application's self-startup and the associated startup between applications through the startup log.
[0047] Manifest file detection and external library detection are pre-emptive detections, rather than waiting for the application to start automatically or after the associated startup between applications occurs, making application startup detection more comprehensive and accurate. Startup log detection can detect the associated startup between applications, not limited to the self-start detection of applications, which also improves the comprehensiveness and accuracy of application startup detection.
[0048] Step S203: Start the application for detection according to the determined detection dimension to obtain a primary detection result for each detection dimension.
[0049] Specifically, after determining the detection dimension, the application is started for each detection dimension. The startup detection here includes the self-startup detection of the application and the associated startup detection between applications. After each detection dimension is detected, the primary detection result of the dimension will be generated.
[0050] Step S204, generating a startup status detection result according to each primary detection result.
[0051] Specifically, based on each primary detection result, an overall startup status detection result of the application is generated, which includes detection results under multiple detection dimensions and is more comprehensive and rich.
[0052] In this embodiment, an application to be detected is obtained; basic information of the application is obtained, and the basic information reflects the basic situation of the application and is used to determine the detection dimension of the application; the detection dimensions include manifest file detection, external library detection and startup log detection, among which, manifest file detection is to detect the manifest file of the application, and the manifest file plays a configuration role for the application; external library detection is to detect the external third-party library used by the application; startup log detection is to detect the startup log of the application; manifest file detection and external library detection can realize pre-detection, and the startup log can detect the self-startup of the application and the associated startup between applications, and the multi-dimensional detection improves the comprehensiveness and accuracy of the application startup detection; the primary detection results of each detection dimension generate the startup situation detection result, which improves the accuracy of the startup situation detection result.
[0053] Furthermore, when the detection dimension is manifest file detection, the above-mentioned steps of starting detection on the application according to the determined detection dimension and obtaining the primary detection result of each detection dimension may include: obtaining the manifest file of the application; parsing the manifest file to obtain the system broadcast listening declaration of the application; obtaining the broadcast listening event of the application according to the system broadcast listening declaration; and generating the primary detection result of the application in the manifest file detection dimension according to the broadcast listening event.
[0054] Specifically, when performing manifest file detection, obtain the manifest file of the application; parse the manifest file to obtain the system broadcast monitoring declaration of the application; the system broadcast monitoring declaration refers to the component declared in the manifest file for receiving system broadcasts. System broadcasts are notifications issued by the Android system to identify system events, such as device startup, network status changes, battery status changes, etc. Applications can register components that monitor system broadcasts so that they can receive notifications and perform corresponding operations when specific events occur.
[0055] According to the system broadcast monitoring declaration, you can get the application's broadcast monitoring events; for example, the broadcast monitoring declaration includes "android.intent.action.BOOT_COMPLETED" and "android.intent.action.QUICKBOOT_POWERON", which declares that the application will monitor two system broadcast events: BOOT_COMPLETED (device boot completed) and QUICKBOOT_POWERON (quick boot). Then the application will automatically start to obtain the broadcast events BOOT_COMPLETED and QUICKBOOT_POWERON.
[0056] Generates a primary detection result of the application in the manifest file detection dimension based on the broadcast monitoring event. The primary detection result can show under which system broadcast events the application will be started / woken up.
[0057] Furthermore, the above-mentioned step of generating primary detection results of the application in the manifest file detection dimension based on the broadcast listening event may include: directly generating the primary detection results of the application in the manifest file detection dimension based on the broadcast listening event; or, obtaining business requirement information of the application; generating the primary detection results of the application in the manifest file detection dimension based on the business requirement information and the broadcast listening event.
[0058] Specifically, the primary detection result of the application in the manifest file detection dimension can be generated directly according to the broadcast monitoring event, for example, showing under which system broadcast events the application will be started / woken up.
[0059] Alternatively, obtain the business requirement information of the application; the business requirement information reflects the actual business functions of the application. Although the broadcast monitoring event is the system broadcast that the application declares to be monitored, the actual business functions of the application may not require monitoring of these system broadcasts, and unnecessary monitoring behavior will lead to unnecessary startup and wake-up of the application.
[0060] Based on the business demand information and broadcast listening events, it can be determined which broadcast listening events are unnecessary for the business needs of the application. The primary detection results generated at this time can display these unnecessary broadcast listening events so that these system broadcast listening declarations can be considered to be removed to reduce unnecessary startup behavior of the application.
[0061] In this embodiment, the primary detection results of the application in the manifest file detection dimension can be generated directly based on the broadcast monitoring events; or, based on the business demand information and the broadcast monitoring events, it is determined which broadcast monitoring events are unnecessary, and then the primary detection results of the manifest file detection dimension are generated to facilitate subsequent application startup control.
[0062] In this embodiment, the manifest file of the application is obtained and parsed. The manifest file is equivalent to the configuration file of the application. The system broadcast listening declaration of the application can be obtained through it, and then the broadcast listening event of the application can be obtained. The broadcast listening event is the system broadcast that the application needs to listen to, and the occurrence of the broadcast listening event will trigger the startup of the application. According to the broadcast listening event, the influencing factor of the application startup can be obtained in the manifest file detection dimension.
[0063] Furthermore, when the detection dimension is external library detection, the application is started for detection according to the determined detection dimension, and the steps of obtaining the primary detection result of each detection dimension may include: obtaining the description document of the external library associated with the application; extracting information from the description document through regular expressions or language models to obtain startup key information in the description document; and generating the primary detection result of the application in the external library detection dimension according to the startup key information.
[0064] Specifically, an application may use an external library, that is, an external third-party library. For example, for an application in the field of finance and insurance, an external library may be used to display product information that needs to be recommended. At this time, the external library may start waking up the application, and an external library detection is required.
[0065] Obtain the description document of the external library associated with the application. In one embodiment, the description document may be a privacy policy document of the external library. The description document generally includes information on how the external library handles user data, as well as details on data collection and use related to the external library's functions.
[0066] The information of the description document can be extracted by regular expressions to obtain the key startup information in the description document. Alternatively, the description document can be understood by a language model (for example, a pre-trained language model such as BERT, RoBERTa, etc.) to extract the key startup information in the description document.
[0067] The key startup information may be information related to the application startup. For example, the search description document may contain the following key startup information:
[0068] "Autostart": may mention the autostart behavior of the application triggered by an external library;
[0069] "Associated startup": may mention external libraries associated with launching other applications;
[0070] "Wake up": may mention external libraries to wake up the device or application;
[0071] "Pull up": may mention external libraries to pull up other activities or services;
[0072] "Keep alive": may mention external libraries to keep the app alive;
[0073] "Push": may mention that external libraries send push notifications to users.
[0074] Based on the key startup information, generate the primary detection results of the application in the external library detection dimension. The primary detection results can show where the external library may start or wake up the application.
[0075] In one embodiment, the language model can also perform semantic recognition on the description document to directly obtain a conclusion on whether the external library will start or wake up the application, or will be associated with starting the application, and serve as a primary detection result of the external library detection dimension.
[0076] In this embodiment, the description document of the external library associated with the application is obtained, and information is extracted from the description document through regular expressions or language models to obtain key startup information in the description document; the key startup information can show where the external library may start the application, thereby obtaining the influencing factor of the application startup in the external library detection dimension.
[0077] Furthermore, when the detection dimension is startup log detection, the application is started up for detection according to the determined detection dimension, and the steps for obtaining the primary detection result of each detection dimension may include: obtaining the startup log of the application; obtaining the preset type information in the startup activity method and the startup service method from the startup log; and generating the primary detection result of the application in the startup log detection dimension according to the package name and class name in the preset type information.
[0078] Specifically, the application has a startup log, and the startup log is analyzed to detect whether the application has executed an activity (Activity) or service (Service) startup operation of itself or other applications.
[0079] startActivity() (start activity method) and startService() (start service method) are two important methods in the Android operating system, which are used to start activities and services in applications. In the Android operating system, startActivity() is used to start a new user interface activity, while startService() is used to start a background service.
[0080] The startActivity() and startService() methods in the startup log record the activity startup and service startup operations performed when the application is started, and record the detailed information of each startup operation with preset type information. The preset type information can be an intent parameter, which usually includes a detailed description of the operation, such as the package name and class name of the application, which indicate the component to be started by the application. If the intent parameter contains the registration and class name of other applications, it means that the application has performed an associated startup operation, that is, it has started the activities or services of other applications. In this case, analysis and inspection are required to ensure compliance with the design and privacy policy of the application.
[0081] According to the package name and class name in the preset type information, the primary detection result of the application in the startup log detection dimension can be generated.
[0082] In this embodiment, the startup log of the application is obtained, and the preset type information in the startup activity method and the startup service method is obtained therefrom. The preset type information may include package names and class names, which are the activities or services of the started application / other applications, and can accurately display the self-startup and associated startup status of the application.
[0083] Furthermore, after the above step S204, the method may further include: generating application startup control information based on the application startup status detection result; and performing startup control on the application according to the startup control information.
[0084] Specifically, the startup status detection results can display the possible startup reasons of the application in different dimensions. Based on the startup status detection results of the application, the startup control information of the application can be generated; the startup control information can be automatically generated according to a rule engine or an artificial intelligence-based model, or it can be generated by manual configuration.
[0085] The startup control information is generated according to the reason for the application startup, and the startup control of the application can be performed accurately and effectively.
[0086] In this embodiment, the application startup detection result shows the reason for the application startup, and the application startup control information is generated according to the startup detection result; the application startup can be effectively controlled and system resources can be saved.
[0087] Furthermore, the above-mentioned step of generating application startup control information based on the application startup status detection result may include: obtaining user behavior data on the application; inputting the behavior data into a prediction model that has been pre-reinforced learned to obtain startup prediction information; and generating application startup control information based on the startup prediction information and the startup status detection result.
[0088] Specifically, an AI-based prediction model can be pre-established, and the startup behavior of the application and the user's behavior data on the application can be analyzed through reinforcement learning. The model can predict when it is appropriate to wake up the application based on historical data. For example, the model can learn the user's usage habits of an application in a specific time period to determine the best time to wake up, which can not only provide users with a better user experience, but also reduce the resource consumption of terminal devices.
[0089] When using the application, the user's behavior data on the application is obtained; the behavior data is input into the prediction model to obtain the startup prediction information; the startup prediction information gives the best wake-up time for the application. Based on the startup prediction information and the startup situation detection results, the startup control information of the application can be generated.
[0090] In this embodiment, the user's behavior data on the application is obtained; the behavior data is input into a prediction model that has been previously subjected to reinforcement learning to obtain startup prediction information, which shows when it is most appropriate to wake up the application; and the startup control information of the application is generated based on the startup prediction information and the startup status detection results, thereby ensuring the accuracy of subsequent application startup control.
[0091] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned startup status detection results, the above-mentioned startup status detection results can also be stored in a blockchain node.
[0092] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0093] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0094] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0096] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0097] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an application startup detection device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0098] like Figure 3As shown, the application startup detection device 300 described in this embodiment includes: an application acquisition module 301, an information acquisition module 302, a startup detection module 303 and a result generation module 304, wherein:
[0099] The application acquisition module 301 is used to acquire the application to be detected.
[0100] The information acquisition module 302 is used to acquire basic information of the application and determine the detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection and startup log detection.
[0101] The startup detection module 303 is used to perform startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension.
[0102] The result generating module 304 is used to generate a startup status detection result according to each primary detection result.
[0103] In this embodiment, an application to be detected is obtained; basic information of the application is obtained, and the basic information reflects the basic situation of the application and is used to determine the detection dimension of the application; the detection dimensions include manifest file detection, external library detection and startup log detection, among which, manifest file detection is to detect the manifest file of the application, and the manifest file plays a configuration role for the application; external library detection is to detect the external third-party library used by the application; startup log detection is to detect the startup log of the application; manifest file detection and external library detection can realize pre-detection, and the startup log can detect the self-startup of the application and the associated startup between applications, and the multi-dimensional detection improves the comprehensiveness and accuracy of the application startup detection; the primary detection results of each detection dimension generate the startup situation detection result, which improves the accuracy of the startup situation detection result.
[0104] In some optional implementations of this embodiment, when the detection dimension is manifest file detection, the startup detection module 303 may include: a manifest acquisition submodule, a declaration acquisition submodule, an event acquisition submodule, and a first generation submodule, wherein:
[0105] The manifest acquisition submodule is used to obtain the manifest file of the application.
[0106] The declaration acquisition submodule is used to parse the manifest file to obtain the system broadcast listening declaration of the application.
[0107] The event acquisition submodule is used to obtain the application's broadcast monitoring events according to the system broadcast monitoring declaration.
[0108] The first generating submodule is used to generate a primary detection result of the application in the manifest file detection dimension according to the broadcast monitoring event.
[0109] In this embodiment, the manifest file of the application is obtained and parsed. The manifest file is equivalent to the configuration file of the application. The system broadcast listening declaration of the application can be obtained through it, and then the broadcast listening event of the application can be obtained. The broadcast listening event is the system broadcast that the application needs to listen to, and the occurrence of the broadcast listening event will trigger the startup of the application. According to the broadcast listening event, the influencing factor of the application startup can be obtained in the manifest file detection dimension.
[0110] In some optional implementations of this embodiment, the first generation submodule may include: a direct generation unit, a demand acquisition unit, and a primary generation unit, wherein:
[0111] The direct generation unit is used to directly generate the primary detection result of the application in the manifest file detection dimension according to the broadcast monitoring event.
[0112] The demand acquisition unit is used to obtain the business demand information of the application.
[0113] The primary generation unit is used to generate the primary detection result of the application in the manifest file detection dimension according to the business demand information and the broadcast monitoring event.
[0114] In this embodiment, the primary detection results of the application in the manifest file detection dimension can be generated directly based on the broadcast monitoring events; or, based on the business demand information and the broadcast monitoring events, it is determined which broadcast monitoring events are unnecessary, and then the primary detection results of the manifest file detection dimension are generated to facilitate subsequent application startup control.
[0115] In some other optional implementations of this embodiment, when the detection dimension is external library detection, the startup detection module 303 may include: a document acquisition submodule, an information extraction submodule and a second generation submodule, wherein:
[0116] The document acquisition submodule is used to obtain the description documents of the external libraries associated with the application.
[0117] The information extraction submodule is used to extract information from the description document through regular expressions or language models to obtain key startup information in the description document.
[0118] The second generation submodule is used to generate a primary detection result of the application in the external library detection dimension according to the startup key information.
[0119] In this embodiment, the description document of the external library associated with the application is obtained, and information is extracted from the description document through regular expressions or language models to obtain key startup information in the description document; the key startup information can show where the external library may start the application, thereby obtaining the influencing factor of the application startup in the external library detection dimension.
[0120] In some other optional implementations of this embodiment, the startup detection module 303 may include: a log acquisition submodule, an information acquisition submodule and a third generation submodule, wherein:
[0121] The log acquisition submodule is used to obtain the application startup log.
[0122] The information acquisition submodule is used to obtain preset type information in the startup activity method and the startup service method from the startup log.
[0123] The third generation submodule is used to generate a primary detection result of the application in the startup log detection dimension according to the package name and class name in the preset type information.
[0124] In this embodiment, the startup log of the application is obtained, and the preset type information in the startup activity method and the startup service method is obtained therefrom. The preset type information may include package names and class names, which are the activities or services of the started application / other applications, and can accurately display the self-startup and associated startup status of the application.
[0125] In some optional implementations of this embodiment, the application startup detection device 300 may further include: a control generation module and a startup control module, wherein:
[0126] The control generation module is used to generate application startup control information based on the application startup status detection result.
[0127] The startup control module is used to control the startup of the application according to the startup control information.
[0128] In this embodiment, the application startup detection result shows the reason for the application startup, and the application startup control information is generated according to the startup detection result; the application startup can be effectively controlled and system resources can be saved.
[0129] In some optional implementations of this embodiment, the control generation module may include: a behavior acquisition submodule, a prediction acquisition submodule and a control generation submodule, wherein:
[0130] The behavior acquisition submodule is used to obtain the user's behavior data on the application.
[0131] The prediction acquisition submodule is used to input the behavior data into the prediction model that has been previously reinforced learned to obtain the startup prediction information.
[0132] The control generation submodule is used to generate application startup control information based on the startup prediction information and the startup status detection result.
[0133] In this embodiment, the user's behavior data on the application is obtained; the behavior data is input into a prediction model that has been previously subjected to reinforcement learning to obtain startup prediction information, which shows when it is most appropriate to wake up the application; and the startup control information of the application is generated based on the startup prediction information and the startup status detection results, thereby ensuring the accuracy of subsequent application startup control.
[0134] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0135] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Fiel-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0136] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0137] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the application startup detection method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0138] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the application startup detection method.
[0139] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0140] The computer device provided in this embodiment can execute the above-mentioned application startup detection method. Here, the application startup detection method can be the application startup detection method of each of the above-mentioned embodiments.
[0141] In this embodiment, an application to be detected is obtained; basic information of the application is obtained, and the basic information reflects the basic situation of the application and is used to determine the detection dimension of the application; the detection dimensions include manifest file detection, external library detection and startup log detection, among which, manifest file detection is to detect the manifest file of the application, and the manifest file plays a configuration role for the application; external library detection is to detect the external third-party library used by the application; startup log detection is to detect the startup log of the application; manifest file detection and external library detection can realize pre-detection, and the startup log can detect the self-startup of the application and the associated startup between applications, and the multi-dimensional detection improves the comprehensiveness and accuracy of the application startup detection; the primary detection results of each detection dimension generate the startup situation detection result, which improves the accuracy of the startup situation detection result.
[0142] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the application startup detection method as described above.
[0143] In this embodiment, an application to be detected is obtained; basic information of the application is obtained, and the basic information reflects the basic situation of the application and is used to determine the detection dimension of the application; the detection dimensions include manifest file detection, external library detection and startup log detection, among which, manifest file detection is to detect the manifest file of the application, and the manifest file plays a configuration role for the application; external library detection is to detect the external third-party library used by the application; startup log detection is to detect the startup log of the application; manifest file detection and external library detection can realize pre-detection, and the startup log can detect the self-startup of the application and the associated startup between applications, and the multi-dimensional detection improves the comprehensiveness and accuracy of the application startup detection; the primary detection results of each detection dimension generate the startup situation detection result, which improves the accuracy of the startup situation detection result.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0145] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. An application startup detection method, characterized in that: The steps include: Get the application to be tested; Obtaining basic information of the application, and determining detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection; Performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension; A startup condition detection result is generated based on each primary detection result.
2. The application startup detection method according to claim 1, characterized in that: When the detection dimension is the manifest file detection, the step of performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension includes: Obtaining a manifest file of the application; Parsing the manifest file to obtain a system broadcast monitoring declaration of the application; Acquire the broadcast monitoring event of the application according to the system broadcast monitoring declaration; A primary detection result of the application in the manifest file detection dimension is generated according to the broadcast monitoring event.
3. The application startup detection method according to claim 2, characterized in that: The step of generating the primary detection result of the application in the manifest file detection dimension according to the broadcast monitoring event includes: directly generating a primary detection result of the application in the manifest file detection dimension according to the broadcast monitoring event; or, Obtaining business requirement information of the application; A primary detection result of the application in the manifest file detection dimension is generated according to the business demand information and the broadcast monitoring event.
4. The application startup detection method according to claim 1, characterized in that: When the detection dimension is the external library detection, the step of starting the detection on the application according to the determined detection dimension to obtain the primary detection result of each detection dimension includes: Obtaining the description document of the external library associated with the application; Extracting information from the description document using a regular expression or a language model to obtain key startup information in the description document; A primary detection result of the application in the external library detection dimension is generated according to the startup key information.
5. The application startup detection method according to claim 1, characterized in that: When the detection dimension is the startup log detection, the step of performing startup detection on the application according to the determined detection dimension to obtain a primary detection result of each detection dimension includes: Obtaining a startup log of the application; Acquire preset type information in the startup activity method and the startup service method from the startup log; A primary detection result of the application in the startup log detection dimension is generated according to the package name and the class name in the preset type information.
6. The application startup detection method according to claim 1, characterized in that: After the step of generating a startup condition detection result according to each primary detection result, the method further includes: Based on the detection result of the startup status of the application, generating startup control information of the application; The application is started and controlled according to the start control information.
7. The application startup detection method according to claim 6, characterized in that: The step of generating the startup control information of the application based on the startup status detection result of the application includes: Obtaining user behavior data on the application; Inputting the behavior data into a prediction model that has been previously subjected to reinforcement learning to obtain startup prediction information; The startup control information of the application is generated according to the startup prediction information and the startup situation detection result.
8. An application startup detection device, characterized in that: include: An application acquisition module, used to acquire the application to be detected; An information acquisition module, used to acquire basic information of the application, and determine detection dimensions for the application according to the basic information, wherein the detection dimensions include manifest file detection, external library detection, and startup log detection; A startup detection module, used to perform startup detection on the application according to the determined detection dimension, and obtain a primary detection result of each detection dimension; The result generation module is used to generate a startup status detection result according to each primary detection result.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the application startup detection method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the application startup detection method according to any one of claims 1 to 7 are implemented.
