Application program running environment detection method and device, equipment, storage medium and computer program product

By identifying the application's installation source type and obtaining trusted installation sources, and combining application permissions for anomaly detection, the problem of low detection accuracy and efficiency caused by untimely updates of the virus code library in the existing technology is solved, achieving a more efficient Detection of application running environment.

CN118862067APending Publication Date: 2024-10-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410868515.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In the existing technology, the detection accuracy and efficiency of the application running environment are low, mainly because the virus code library is not updated in a timely manner, resulting in frequent missed detections.

Method used

By identifying the application's installation source type, it obtains trusted installation sources, performs abnormal level detection based on application permissions and target application permissions, and outputs detection results, avoiding the need to establish a virus code library.

Benefits of technology

It improves the detection accuracy and efficiency of the application running environment, reduces missed detections, and enhances the security of the application running environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862067A_ABST
    Figure CN118862067A_ABST
Patent Text Reader

Abstract

The invention provides an application program running environment detection method and device, equipment, a storage medium and a computer program product. The method comprises the following steps: executing identification processing of an installation source type on an application program in an application program running environment to obtain the installation source type of the application program; when the installation source type is a first source type, obtaining at least one trusted installation source belonging to the first source type; when the at least one trusted installation source does not include a target installation source of the application program, obtaining a target application permission and an application program permission of the application program; on the basis of the application program permission and the target application permission, abnormal level detection processing is executed on the application program running environment, and a running environment detection result is obtained; and outputting exception prompt information of an exception level indicated by the operation environment detection result. Through the application, the detection accuracy and the detection efficiency of the application program running environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, storage medium and computer program product for detecting an application program running environment. Background Art

[0002] With the popularity of smart phones and mobile devices, the number of applications continues to increase. Applications also face security challenges, such as application vulnerabilities, malicious applications, data leakage, etc. Security testing of applications has become an important measure to maintain user data and business security. Only by regularly performing security testing on applications can potential security vulnerabilities be discovered and fixed in a timely manner, and the security and reliability of applications can be improved. Therefore, security testing of applications is the key to ensuring the security of user data and electronic devices.

[0003] In the related technology, it is first necessary to establish a virus code library, and then detect the application running environment by comparing the binary bytes in the application code with the virus code. However, since the code data in the virus code library cannot be updated in time, missed detections are prone to occur, resulting in low detection accuracy and efficiency of the application running environment. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for detecting an application running environment, which can improve the detection accuracy and efficiency of the application running environment.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application embodiment provides a method for detecting an application program running environment, the method comprising:

[0007] Performing an identification process on the installation source type of the application in the application running environment to obtain the installation source type of the application;

[0008] When the installation source type is a first source type, obtaining at least one trusted installation source belonging to the first source type;

[0009] When the at least one trusted installation source does not include a target installation source of the application, obtaining target application permissions and application permissions of the application;

[0010] Based on the application program permissions and the target application permissions, performing abnormal level detection processing on the application program running environment to obtain a running environment detection result;

[0011] Output abnormal prompt information of the abnormal level indicated by the operating environment detection result.

[0012] The present application embodiment provides a device for detecting an application program running environment, including:

[0013] A source identification module, used to perform an identification process on the installation source type of the application in the application running environment to obtain the installation source type of the application;

[0014] A first acquisition module, configured to, when the installation source type is a first source type, acquire at least one trusted installation source belonging to the first source type;

[0015] a second acquisition module, configured to acquire target application permissions and application permissions of the application when the at least one trusted installation source does not include a target installation source of the application;

[0016] An anomaly detection module, used to perform an abnormal level detection process on the application program running environment based on the application program permissions and the target application permissions, and obtain a running environment detection result;

[0017] The information prompt module is used to output abnormal prompt information of the abnormal level indicated by the operating environment detection result.

[0018] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0019] A memory for storing computer executable instructions or computer programs;

[0020] The processor is used to implement the method for detecting the application running environment provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for implementing a method for detecting an application program running environment provided in an embodiment of the present application when executed by a processor.

[0022] An embodiment of the present application provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the method for detecting the application program running environment provided by the embodiment of the present application is implemented.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] By using the embodiment of the present application, the installation source type identification process is performed on the application in the application running environment to obtain the installation source type of the application, and then when the installation source type is the first source type, at least one trusted installation source belonging to the first source type is obtained, and then when at least one trusted installation source does not include the target installation source of the application, the target application permissions and the application permissions of the application are obtained, and then based on the application permissions and the target application permissions, the abnormal level detection process is performed on the application running environment to obtain the running environment detection result, and the abnormal prompt information of the abnormal level indicated by the running environment detection result is output. In this way, the application running environment can be detected according to the trusted installation source and the target application permissions, and the abnormal prompt information of the abnormal level indicated by the running environment detection result can be output, without the need to establish a virus code library, thereby improving the detection accuracy and efficiency of the application running environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of an application mode of a method for detecting an application program running environment provided in an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0027] Figure 3A It is a first flow chart of a method for detecting an application program running environment provided in an embodiment of the present application;

[0028] Figure 3B It is a second flow chart of the method for detecting the application program running environment provided in an embodiment of the present application;

[0029] Figure 3C 3 is a schematic diagram of a third flow chart of a method for detecting an application program running environment provided in an embodiment of the present application;

[0030] Figure 3D It is a fourth flow chart of the method for detecting the application program running environment provided in an embodiment of the present application;

[0031] Figure 3E It is a fifth flow chart of the method for detecting the application program running environment provided in the embodiment of the present application;

[0032] Figure 4 It is a schematic diagram of the detection process of the application running environment provided in the embodiment of the present application.

[0033] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0036] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0037] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0038] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0039] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0040] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0041] 1) Application (APP): refers to the application that has been installed on the electronic device.

[0042] 2) Abnormal applications: refers to applications with malicious behaviors or logic, such as applications containing viruses, Trojans, or spam ads. These applications may steal users' personal information or pose a threat to users' funds.

[0043] 3) Operating environment security: refers to the security of the operating environment when users use electronic devices. If the operating environment of an electronic device interferes with the normal use of the user or causes user data leakage or financial loss, the environment is unsafe, otherwise it is safe. For example, when a user is using an application, if there is a virus or Trojan horse application on the user's device that steals the user's xx password, it may bring danger to the user's account. In this case, the operating environment of the electronic device is unsafe.

[0044] 4) Application signature: It is a way to verify the integrity of the application and that it has not been tampered with. The signatures of all applications are unique.

[0045] 5) Message Digest Algorithm (MD5): A widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission.

[0046] Embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for detecting an application program running environment, which can improve the detection efficiency of the application program running environment.

[0047] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, a smart speaker, a smart watch, a smart TV, and a vehicle-mounted terminal, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.

[0048] See also Figure 1 , Figure 1 This is a schematic diagram of an application mode of a detection method for an application program running environment provided in an embodiment of the present application, for example, Figure 1 The server 200, the network 300 and the terminal 400 are involved. The terminal 400 is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0049] In the process of detecting the application running environment, the terminal 400 responds to the user's running environment detection instruction and sends a running environment detection request to the server 200. The server 200 responds to the running environment detection request and performs an identification process of the installation source type on the application in the application running environment to obtain the installation source type of the application. When the installation source type is the first source type, at least one trusted installation source belonging to the first source type is obtained. When at least one trusted installation source does not include the target installation source of the application, the target application permission and the application permission of the application are obtained. Based on the application permission and the target application permission, the abnormal level detection process is performed on the application running environment to obtain the running environment detection result, the abnormal prompt information of the abnormal level indicated by the running environment detection result is output, and the running environment detection result is returned to the terminal 400. The terminal 400 receives the running environment detection result and displays the abnormal prompt information. In this way, the user can understand the abnormal level of the application running environment through the terminal 400.

[0050] The embodiments of the present application can also be implemented through cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, as well as the promotion of search services, social networks, mobile commerce and open collaboration, each item may have its own hash code identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0051] The embodiments of the present application can also be implemented through machine learning. Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching. The pre-trained model is the latest development in deep learning, which integrates the above technologies.

[0052] The embodiment of the present application can also be implemented by a pre-training model. The pre-training model, also known as a cornerstone model or a large model, refers to a deep neural network (DNN) with a large number of parameters. It is trained on a large amount of unlabeled data, and the function approximation ability of the large-parameter DNN is used to enable the PTM to extract common features on the data. After fine tuning, parameter efficient fine tuning (PEFT), prompt-tuning and other technologies, it is suitable for downstream tasks. Therefore, the pre-training model can achieve ideal results in a few-shot or zero-shot scenario. PTM can be divided into language models (ELMO, BERT, GPT), visual models (swin-transformer, ViT, V-MOE), speech models (VALL-E), multimodal models (ViBERT, CLI P, Flamingo, Gato), etc. according to the data modality processed, wherein the multimodal model refers to a model that establishes two or more data modality feature representations. The pre-trained model is an important tool for outputting artificial intelligence generated content (AIGC), and can also be used as a general interface to connect multiple specific task models. In the method of the embodiment of the present application, the detection method of the application running environment can be combined with the pre-trained model, which can improve the detection efficiency of the application running environment.

[0053] In some embodiments, the server (e.g., server 200) may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0054] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device may be a terminal or a server, Figure 2The electronic device 500 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the electronic device 500 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0055] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0056] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0057] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0058] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0059] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.

[0060] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Authentication (WiFi), and Universal Serial Bus (USB).

[0061] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 A detection device 455 for the application running environment stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, including the following software modules: a source identification module 4551, a first acquisition module 4552, a second acquisition module 4553, an anomaly detection module 4554, and an information prompt module 4555. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.

[0062] In some embodiments, the terminal or server can implement the detection method of the application operating environment provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a cloud computing APP or an instant messaging APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0063] The method for detecting the application program running environment provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server device provided in the embodiment of the present application.

[0064] The following describes the method for detecting the application runtime environment provided by the embodiment of the present application. As mentioned above, the electronic device that implements the method for detecting the application runtime environment of the embodiment of the present application can be a terminal, a server, or a combination of the two. Next, the electronic device is taken as an example of a server to describe the method for detecting the application runtime environment provided by the embodiment of the present application. Figure 3A , Figure 3A is a first flow chart of the detection method of the application running environment provided in the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.

[0065] In step 301, an installation source type identification process is performed on an application in an application running environment to obtain the installation source type of the application.

[0066] Here, the application execution environment refers to the environment in which a user executes an application on an electronic device.

[0067] In some embodiments, see Figure 3B , Figure 3B This is a second flow chart of the method for detecting the application running environment provided in an embodiment of the present application. Figure 3A Step 301 shown may be performed by Figure 3B Steps 3011 to 3012 are implemented as described in detail below.

[0068] In step 3011, application information of the application is obtained.

[0069] Here, the application information of the application refers to the basic information of the application, which may include the application name, application package name, application installer identification value, application installation package path, application version, application installation time, application signature, and application information summary value.

[0070] For example, when the application package name is com.xxbank.hk, the application installer identification value is com.android.vending, the application installation package path is / data / app / xx, the application name is xx client, the application information summary value is cd3ed305076cfcf76457defa, and the application version is 2.12.1.

[0071] In step 3012, detection processing is performed on the target information in the application information to obtain a detection result, and based on the detection result, the installation source type of the application is determined.

[0072] Here, the target information is the designated application information to be detected currently, and the installation source type of the application is determined according to the detection result of the target information.

[0073] In some embodiments, detection processing is performed on the target information in the application information to obtain a detection result, which can be achieved by executing the following steps: performing detection processing on the permission flag information of the application information to obtain a first detection result; performing detection processing on the installation information of the application information to obtain a second detection result, the installation information includes an installation path and an application installer identifier, and the value of the application installer identifier is used to indicate whether the application is installed through the application installer; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not a target path, and the value of the application installer identifier is a target value, the installation source type of the application is determined to be the first source type; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is a target path, and the value of the application installer identifier is not a target value, the installation source type of the application is determined to be the first source type; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not a target path, and the value of the application installer identifier is not a target value, the installation source type of the application is determined to be the first source type.

[0074] Here, the first detection result represents whether the permission flag information includes a system application flag, and the second detection result represents whether the installation path is the target path and whether the value identified by the application installer is the target value. Permission flag information is specific permission information required by an application at runtime in order to perform its functions or access specific devices or data. The value of the system application flag is a flag used to indicate whether the application is a system application. The value of the system application flag is an integer. If the value of the system application flag is 1, it indicates that the application is a system application; if the value of the system application flag is 0, it indicates that the application is not a system application.

[0075] The installation path refers to the path where the application is stored on the electronic device. The application can usually be found in the root directory or a specific folder of the electronic device. The value of the application installer identifier refers to the identifier of the application installation package installed by the application installer (such as the application installer used by the manufacturer or channel supplier to install the application when the electronic device leaves the factory). Each application has a unique application installer identifier, which is used to identify and distinguish different applications on the electronic device. The value of the application installer identifier can be a reversed domain name format, and the domain name is the website address where the application installer is located. For example: the value of the application installer identifier com.android.vending is obtained by reversing the format of the domain name vending.android.com. When the value of the application installer identifier of an application is the identifier of the application installation package, it means that the application is installed through the application installer; when the value of the application installer identifier of an application is null, it means that the application is not installed through the application installer. The target path refers to the path of the application installation path format " / data / app / xx", and the target value is the value of the application installer identifier is null.

[0076] When the permission flag information does not include the system application flag, the installation path is not " / data / app / xx", and the value of the application installer identifier is null, the installation source type of the application is determined to be the first source type; when the permission flag information does not include the system application flag, the installation path is " / data / app / xx", and the value of the application installer identifier is not null, the installation source type of the application is determined to be the first source type; when the permission flag information does not include the system application flag, the installation path is not " / data / app / xx", and the value of the application installer identifier is not null, the installation source type of the application is determined to be the first source type.

[0077] For example, the first source type can be an official market application installation source. Official market applications are applications installed from the official application market of electronic device manufacturers and can be uninstalled by users. The first source type can be a third-party market application installation source. Third-party market applications are applications installed from unofficial application markets of electronic device manufacturers and can be uninstalled by users. The first source type can be a non-market application installation source. Non-market applications are applications installed from other channels outside the application market, such as applications downloaded and installed from a browser web page, or applications received from a communication tool as an application package and installed in the application file management partition. Non-market applications are applications that can be uninstalled by users. The first source type can be a command line application installation source. Command line applications are applications installed using command line tools and can be uninstalled by users.

[0078] In some embodiments, when the first detection result represents that the permission flag information includes a system application flag, the installation source type of the application is determined to be the second source type; when the first detection result represents that the permission flag information does not include a system application flag, the second detection result represents that the installation path is the target path, and the value identified by the application installer is the target value, the installation source type of the application is determined to be the third source type.

[0079] Here, the second source type refers to that the installation source type of the application is a system application installation source, and the third source type refers to that the installation source type of the application is a promotion application installation source.

[0080] For example, the application information (ApplicationInfo) is obtained, and then the permission flag information (Flag) of the application information is used to determine whether the application is a system application. If the permission flag information includes the system application flag (ApplicationInfo.FLAG_SYSTEM), the installation source type of the application is determined to be the second source type. When the permission flag information of the application does not include the system application flag, the installation path of the application is " / data / app / xx," and the value of the application installer identifier is null, the installation source type of the application is determined to be the third source type.

[0081] In some embodiments, when the installation source type is the second source type, the application is determined to be a normal application; when the installation source type is the third source type, the application is determined to be a normal application.

[0082] Here, normal applications refer to applications that run as expected, follow the rules and standards of the electronic device operating system, do not violate any security policies or system restrictions, and can start normally, perform functions, respond to user input, and terminate normally when they are not needed. Normal applications will not cause unnecessary impact or risk to the system, nor will they attempt to perform malicious operations. Abnormal applications refer to applications that do not meet expectations or specifications. Applications may behave abnormally due to software defects, configuration problems, abuse of permissions, or intentionally designed malware. Abnormal applications may cause system crashes, data loss, performance degradation, or even security vulnerabilities. In some cases, abnormal applications may be viruses, Trojans, or other forms of malware that attempt to undermine system integrity, steal data, or access system resources without authorization.

[0083] When the installation source type is the second source type, that is, the application installation source type is the system application installation source, the system application is the system application built-in when the electronic device leaves the factory, the system application is installed in the system directory (System) partition, there are many system applications, and they are applications that cannot be uninstalled by users. System applications are normal applications. When the installation source type is the third source type, that is, the application installation source type is the promotion application installation source, the application from the promotion application installation source is the promotion application installed by the manufacturer or channel supplier when the electronic device leaves the factory, the promotion application is usually installed in the data directory (Data) partition, and it is an application that can be uninstalled by users. The promotion application is a normal application.

[0084] In an embodiment of the present application, when the installation source type is the second source type and the third source type, the application is determined to be a normal application. It is possible to identify whether the application is a normal application through the installation source type, without the need to establish a virus code library, thereby improving the accuracy and efficiency of identifying abnormal applications.

[0085] Continue to refer Figure 3A In step 302, when the installation source type is a first source type, at least one trusted installation source belonging to the first source type is obtained.

[0086] Here, the first source type is a source type different from the second source type and the third source type, and at least one trusted installation source exists in the trusted installation source whitelist corresponding to the first source type.

[0087] In some embodiments, after obtaining at least one trusted installation source belonging to the first source type, the following steps can be performed: query the target installation source of the application from at least one trusted installation source to obtain a first query result; when the first query result represents that at least one trusted installation source includes the target installation source of the application, determine that the application is a normal application.

[0088] Here, the target installation source is the actual installation source of the application. The first query result is used to characterize whether the trusted installation source includes the actual installation source of the application. When the first query result characterizes that the trusted installation source includes the target installation source of the application, it means that the actual installation source of the application is in the trusted installation source whitelist, and the application under the installation source in the trusted installation source whitelist is a normal application.

[0089] In an embodiment of the present application, the target installation source of an application is queried from at least one trusted installation source. When at least one trusted installation source includes the target installation source of the application, the application is determined to be a normal application. Whether the application is a normal application can be identified through the trusted installation source, and there is no need to establish a virus code library, thereby improving the accuracy and efficiency of identifying abnormal applications.

[0090] Continue to refer Figure 3A In step 303, when at least one trusted installation source does not include a target installation source of the application, the target application permissions and the application permissions of the application are obtained.

[0091] Here, the target application permissions are the application permissions in the application permissions blacklist, and the target application permissions of the application permissions blacklist can be pre-set according to the actual detection needs. Application permissions refer to the capabilities granted by the operating system to applications so that applications have the ability to access devices, data, and other applications. When the trusted installation source does not include the target installation source of the application, the target installation source of the application is considered to be an untrusted installation source. At this time, it is necessary to further analyze whether the application is an abnormal application. Therefore, the target application permissions and the application permissions of the application are obtained, and subsequent application permissions analysis is performed.

[0092] Continue to refer Figure 3A In step 304, based on the application program permissions and the target application permissions, an abnormal level detection process is performed on the application program running environment to obtain a running environment detection result.

[0093] In some embodiments, when the target application permission belongs to the permission type, see Figure 3C , Figure 3C This is a third flow chart of the method for detecting the application running environment provided in an embodiment of the present application. Figure 3A Step 304 shown may be performed by Figure 3C Steps 3041A to 3043A are implemented as described in detail below.

[0094] In step 3041A, the target application permissions are queried from the application program permissions to obtain a second query result.

[0095] Here, the second query result is used to indicate whether the application permissions include the target application permissions. When the target application permissions belong to the permission type, the target application permissions are queried from the application permissions to determine whether the application permissions include the target application permissions, and the number of the application permissions is at least one.

[0096] For example, the target application permission of the permission type may be the permission to send SMS (android.permission.SEND_SMS). An application with the permission to send SMS can send SMS without the user's permission. Get the application package information flag (PackageInfo), get the application permission list containing all application permissions of the application according to the application package information flag, traverse the application permission list, and query whether there is the permission to send SMS in the application permission list. If the permission to send SMS is found in the application permission list, the application permissions include the permission to send SMS of the target application.

[0097] In step 3042A, when the second query result indicates that the application program permissions include the target application permissions, it is determined that the first operating environment detection result is obtained.

[0098] Here, when the application permissions include target application permissions, the currently detected application is an abnormal application, and then it is determined that the first operating environment detection result is obtained; the first operating environment detection result characterizes that the abnormal level of the application operating environment is the first abnormal level, and the first abnormal level means that the application operating environment includes abnormal applications from untrusted installation sources, which can also be understood as the application operating environment is at high risk.

[0099] In step 3043A, when the second query result indicates that the application program permissions do not include the target application permissions, it is determined that a second operating environment detection result is obtained.

[0100] Here, when the application permissions do not include the target application permissions, it is determined that the second operating environment detection result is obtained; the second operating environment detection result characterizes that the abnormality level of the application operating environment is the second abnormality level, and the second abnormality level means that the application operating environment includes applications from untrusted installation sources and does not include abnormal applications. It can also be understood that the application operating environment is at low risk.

[0101] In some embodiments, when the target application permission belongs to a specific function type, see Figure 3D , Figure 3D This is a fourth flow chart of the method for detecting the application running environment provided in an embodiment of the present application. Figure 3A Step 304 shown may be performed by Figure 3D Steps 3041B to 3044B are implemented as described in detail below.

[0102] In step 3041B, at least one first application that calls a specific function of a specific function type is obtained.

[0103] Here, the specific function type refers to a function type that allows an application to access specific system resources or data. The first application refers to an application that calls a specific function of the specific function type.

[0104] In step 3042B, the application is queried from at least one first application to obtain a third query result.

[0105] Here, the third query result is used to indicate whether the first application includes the currently detected application. From the first application that calls a specific function of a specific function type, it is queried whether the currently detected application is included.

[0106] For example, the target application permission belonging to a specific function type may be an accessibility permission (ACCESSIBILITY_SERVICE). The application's service manager (AccessibilityManager) is used to manage accessibility functions of electronic devices. By calling the application's service manager, an application list including at least one first application that currently enables accessibility functions is obtained. The application list records the application package name of each first application. The application list is traversed to query whether the application list contains the application package name of the currently detected application. If the application package name of the currently detected application is queried in the application list, the currently detected application has called the accessibility permission.

[0107] In step 3043B, when the third query result indicates that at least one first application includes an application, it is determined that a first operating environment detection result is obtained.

[0108] Here, when at least one first application includes an application, the currently detected application is an abnormal application, and then a first operating environment detection result is determined; the first operating environment detection result characterizes that the abnormality level of the application operating environment is the first abnormality level, and the first abnormality level means that the application operating environment includes abnormal applications from untrusted installation sources, which can also be understood as a high risk in the application operating environment.

[0109] In step 3044B, when the third query result indicates that at least one first application does not include an application, it is determined that a second operating environment detection result is obtained.

[0110] Here, when at least one first application does not include the currently detected application, then it is determined that a second operating environment detection result is obtained; the second operating environment detection result characterizes that the abnormality level of the application operating environment is the second abnormality level, and the second abnormality level means that the application operating environment includes applications from untrusted installation sources and does not include abnormal applications, which can also be understood as a low risk in the application operating environment.

[0111] In some embodiments, when the target application permission belongs to a specific function type, see Figure 3E , Figure 3E This is the fifth flow chart of the method for detecting the application running environment provided in the embodiment of the present application. Figure 3A Step 304 shown may be performed by Figure 3E Steps 3041C to 3043C are implemented as described in detail below.

[0112] In step 3041C, the application program permissions are queried from the target application permissions to obtain a fourth query result.

[0113] Here, the fourth query result is used to indicate whether the target application permission includes application program permissions, and the number of the target application permissions may be at least one.

[0114] In step 3042C, when the fourth query result indicates that the target application permissions include application program permissions, it is determined that the first operating environment detection result is obtained.

[0115] Here, when the target application permissions include application program permissions, the currently detected application is an abnormal application, and then it is determined that the first operating environment detection result is obtained; the first operating environment detection result characterizes that the abnormal level of the application operating environment is the first abnormal level, and the first abnormal level means that the application operating environment includes abnormal applications from untrusted installation sources, which can also be understood as the application operating environment is at high risk.

[0116] In step 3043C, when the fourth query result indicates that the target application permissions do not include application program permissions, it is determined that a second operating environment detection result is obtained.

[0117] Here, when the target application permissions do not include application program permissions, then it is determined that a second operating environment detection result is obtained; the second operating environment detection result characterizes that the abnormality level of the application operating environment is the second abnormality level, and the second abnormality level means that the application operating environment includes applications from untrusted installation sources and does not include abnormal applications, which can also be understood as a low risk in the application operating environment.

[0118] In an embodiment of the present application, based on the application permissions and the target application permissions, an abnormal level detection process is performed on the application running environment to obtain an running environment detection result, and then based on the running environment detection result, the abnormal level of the application running environment is obtained, thereby improving the detection accuracy and efficiency of the application running environment.

[0119] In some embodiments, when the operating environment detection result is the second operating environment detection result, and the installation source of the second application in the application operating environment does not belong to a trusted installation source, the following steps can also be performed: obtaining the processing behavior characteristics of the target object for the second application; based on the processing behavior characteristics, calling the neural network model to perform prediction processing of the trusted source to obtain a prediction result, and the prediction result represents whether the installation source of the second application is a trusted installation source; when the prediction result represents that the installation source of the second application is a trusted installation source, adding the installation source of the second application to at least one trusted installation source.

[0120] Here, the second application refers to an application in the application running environment of the second running environment detection result, and the installation source does not belong to the trusted installation source. The target object refers to the user group that implements the processing behavior on the second application, and the processing behavior characteristics refer to the behavior characteristics of the target object uninstalling the second application, or the behavior characteristics of the target object marking the second application as a trusted installation source application, etc. Based on the processing behavior characteristics, the neural network model is called to predict the installation source of the second application. When the installation source of the second application is a trusted installation source, the installation source of the second application is added to at least one trusted installation source, and the trusted installation source whitelist is updated.

[0121] For example, the neural network model can be a convolutional neural network (CNN), a recurrent neural network (RNN), etc. The neural network model structure usually includes an input layer, a hidden layer, and an output layer. The samples and sample labels of the processed behavioral features are used as training data. The training data goes from the input layer through the hidden layer to the output layer in the neural network model. Each layer of neurons processes the training data. The training data is repeatedly input into the neural network model until the performance of the neural network model reaches the expected target or reaches the preset number of iterations, and a trained neural network model is obtained to improve the accuracy of the neural network model in predicting the installation source of the second application.

[0122] Continue to refer Figure 3A In step 305, abnormal prompt information of the abnormal level indicated by the running environment detection result is output.

[0123] Here, the operating environment detection result includes a first operating environment detection result and a second operating environment detection result. According to the operating environment detection result, abnormal prompt information indicating the abnormal level of the application operating environment can be output. When the operating environment detection result is the first operating environment detection result, the first abnormal prompt information indicating the abnormal level of the application operating environment is output, and the first abnormal prompt information can be "the current environment is high risk, and the use of the application is prohibited." When the operating environment detection result is the second operating environment detection result, the second abnormal prompt information indicating the abnormal level of the application operating environment is output, and the second abnormal prompt information can be "the current environment may be risky, continue to use the application."

[0124] In some embodiments, before outputting the abnormal prompt information of the abnormal level indicated by the operating environment detection result, the following steps can also be performed: obtaining an abnormal prompt template, the abnormal prompt template indicating the arrangement structure of the prompt content of the abnormal prompt information; based on the operating environment detection result, calling the neural network model to perform prompt content generation processing to obtain the prompt content; according to the arrangement structure, filling the prompt content into the abnormal prompt template to obtain the abnormal prompt information.

[0125] Here, based on the first operating environment detection result, the neural network model is called to generate the prompt content to obtain the first prompt content, and the first prompt content is filled into the abnormal prompt template to obtain the first abnormal prompt information. Based on the second operating environment detection result, the neural network model is called to generate the prompt content to obtain the second prompt content, and the second prompt content is filled into the abnormal prompt template to obtain the second abnormal prompt information. For example, the first abnormal prompt information can be "The current environment is high-risk, and the use of the application is prohibited", and the second abnormal prompt information can be "The current environment may be risky, continue to use the application." It is also possible to prompt to install the application from the official application market based on the trusted installation source of the application.

[0126] For example, the neural network model can be a text processing model, which is called to generate prompt content. The text processing model can be a BERT model, and the operating environment detection result is input into the BERT model. The bidirectional encoder and transformer are used to model the text, and the order of the text can be considered at the same time, so as to better understand the meaning of the text. The text processing model can also be a transformer model (Transformer), which takes the operating environment detection result as input and generates a text sequence as output.

[0127] For example, when the installation sources of all applications in the application running environment are trusted installation sources, the application running environment is determined to be a safe running environment, and a security prompt message can also be output. The security prompt message can be "The current environment is very safe and you can continue to use the application."

[0128] In an embodiment of the present application, based on the operating environment detection results, a neural network model is called to execute prompt content generation processing, the prompt content is filled into an abnormal prompt template, and abnormal prompt information of the abnormal level is output, which can provide risk warnings for the application operating environment based on different abnormal prompt information.

[0129] In some embodiments, the detection method of the application running environment provided by the embodiment of the present application can be applied in the field of smart payment. In the smart payment device terminal, for the application in the application running environment, the installation source type is identified and processed to obtain the installation source type of the application, and then when the installation source type is the first source type, at least one trusted installation source belonging to the first source type is obtained, and then when at least one trusted installation source does not include the target installation source of the application, the target application permissions and the application permissions of the application are obtained, and then based on the application permissions and the target application permissions, the abnormal level detection processing is performed on the application running environment to obtain the running environment detection result, and the abnormal prompt information of the abnormal level indicated by the running environment detection result is output. In this way, the application running environment can be detected on the smart payment device according to the trusted installation source and the target application permissions, and the abnormal prompt information of the abnormal level indicated by the running environment detection result is output, without the need to establish a virus code library, thereby improving the detection accuracy and efficiency of the application running environment in the smart payment device.

[0130] Applying the above-mentioned embodiment of the present application, for an application in an application running environment, an identification process of the installation source type is performed on the application to obtain the installation source type of the application, and then when the installation source type is a first source type, at least one trusted installation source belonging to the first source type is obtained, and then when at least one trusted installation source does not include the target installation source of the application, the target application permissions and the application permissions of the application are obtained, and then based on the application permissions and the target application permissions, an abnormal level detection process is performed on the application running environment to obtain a running environment detection result, and an abnormal prompt information of the abnormal level indicated by the running environment detection result is output. In this way, the application running environment can be detected according to the trusted installation source and the target application permissions, and the abnormal prompt information of the abnormal level indicated by the running environment detection result can be output, without the need to establish a virus code library, thereby improving the detection accuracy and efficiency of the application running environment.

[0131] The following describes an exemplary application of the method for detecting the application running environment provided by an embodiment of the present application in an actual abnormal application detection scenario.

[0132] At present, antivirus software is usually used to perform security detection of the application running environment. The method is to determine whether the application is abnormal by comparing the binary bytes in the application code with the feature code in the virus code library to see if they are the same, so as to determine whether each application is an abnormal application, so as to achieve the purpose of security detection of the application running environment. In the related art, the code data in the established virus code library is incomplete, and the speed of generating new virus codes is fast. The data in the virus code library cannot be updated in time, which will cause the missed judgment of the abnormal application, resulting in inaccurate results of identifying abnormal applications.

[0133] In view of the problems existing in the related art, the embodiment of the present application proposes a method for detecting the application running environment, which includes the following improvements compared with the related art:

[0134] By identifying the installation sources of applications, we can rate the security and trustworthiness of each installation source based on the application market to which it belongs. We can evaluate whether the permissions used by applications are safe and trustworthy, determine whether each application is an abnormal application, and judge whether the application's operating environment is safe. There is no need to establish a virus code library, and there is no problem of incomplete data in the virus code library and untimely updates, which may lead to the inability to accurately identify abnormal applications.

[0135] The method for detecting the security of the application running environment proposed in the embodiment of the present application determines whether the environment is safe by analyzing the installation source and sensitive permissions of the application, thereby protecting the personal data and financial security of the user when using the electronic device. Specifically, the embodiment of the present application adopts the identification of the installation source of all applications on the device, classifies and evaluates the security and trustworthiness level of different installation sources, and evaluates whether the permissions used by the application are safe and trustworthy, so as to determine whether there are any abnormalities in each application and determine whether the running environment of the electronic device is safe.

[0136] Example, reference Figure 4 , Figure 4 Schematic diagram of the detection process of the application program running environment provided in the embodiment of the present application. Figure 4 The steps are used to explain the security detection process of the application running environment provided in the embodiment of the present application.

[0137] In step 401, environmental safety detection begins.

[0138] When the application is running, the environment security detection starts. The environment security detection operation can be triggered when the application is started, when a page is opened in the application, or at other times.

[0139] In step 402, the permission of the first application list is applied for.

[0140] Before reading the first application list, you need to apply for the permission of the first application list. If you have already obtained the permission, you do not need to apply for the permission again.

[0141] In step 403, a first application list is read.

[0142] Read the installed applications in the first application list, obtain all installed applications and basic information of the applications (the above-mentioned application information), refer to Figure 4 Area 419 displays a list including basic information of the application: 1. Application name; 2. Application package name; 3. Application installer identifier; 4. Installation path; 5. Version; 6. Installation time; 7. Application signature; 8. Information summary value.

[0143] For example, the data format of the basic information of the application is shown in Table 1:

[0144] Table 1

[0145]

[0146] For example, the application programs are classified according to the installation source. In the embodiment of the present application, the types of installation sources of the application programs on the user's electronic device are classified into the following types:

[0147] 1. System application type (second source type): This type of application is a system application built into the electronic device when it leaves the factory. These applications are installed in the system directory (System) partition. There are a large number of system applications and they cannot be uninstalled by users.

[0148] 2. Promotional application type (third source type): This type of application is installed by the electronic device manufacturer (or channel supplier) when the electronic device leaves the factory. These applications are usually installed in the data directory (Data) partition and can be uninstalled by the user.

[0149] 3. Official market application type (first source type): This type of application is installed from the official application market of the electronic device manufacturer. For example, the official application market of xx mobile phone is xx application market, which can be uninstalled by users.

[0150] 4. Third-party market application type (first source type): This type of application is installed from the official application market of the electronic device manufacturer and can be uninstalled by the user.

[0151] 5. Non-market application type (first source type): This type of application is installed from other channels outside the application market, such as when a user opens a web page from a browser, downloads and installs the application, or receives the application package from a communication tool and installs it in the file management partition. It is an application that can be uninstalled by the user.

[0152] 6. Command line application type (first source type): This type of application is installed by special users such as developers using the command line tool adb install, and can be uninstalled by users.

[0153] For example, the identification method and credibility judgment rules of the application installation source type are shown in Table 2:

[0154] Table 2

[0155]

[0156]

[0157] Continue to refer Figure 4 , in step 404, it is determined that the installation source type is a system application type.

[0158] You can handle applications from different installation sources differently. First, handle system application types. Figure 4 , area 426 shows that this step obtains the permission flag and system application flag of the application, and determines whether it is a system application type by comparing the relationship between the permission flag (Flag) of the application and the system application flag (ApplicationInfo.FLAG_SYSTEM). The system application type belongs to the second source type. For example, by obtaining application information (ApplicationInfo), and then judging whether the installation source type of the application is a system application type through the permission flag information in the application information, if the permission flag information of the application contains the system application flag, the installation source type of the application is a system application type. If the judgment result is that the installation source type of the application is a system application type, then the application is a system application, and the system application is deleted from the first application list. Because the embodiment of the present application considers that the system application is a normal application that can be trusted, the system application does not need to undergo subsequent trusted judgment.

[0159] In step 405, it is determined that the installation source type is a promotional application type.

[0160] Perform detection processing on the application installation information, refer to Figure 4 Area 421 shows that the method for determining the type of the promoted application in this step is: the value of the application installer identifier is null, and the installation path is / data / app / xx. According to whether the value of the "application installer identifier" column in the basic information of the application in Table 1 is "null" and whether the value of the "installation path" column is " / data / app / xx", it is determined whether the application installation source type is a promoted application type, and the promoted application type belongs to the third source type. If the application installation source type is a promoted application type, the application is a promoted application, and the promoted application is deleted from the first application list. Because the embodiment of the present application believes that the promoted application is a normal application that can be trusted, the promoted application does not need to undergo subsequent trust judgment.

[0161] In step 406, the system applications and the promotional applications are deleted from the first application list to obtain a second application list, and the second application list is transmitted to the server.

[0162] After deleting the system applications and promotion applications in the first application list, a second application list is obtained, and the second application list is sent to the server, and the server continues to make subsequent trustworthy judgments on the applications in the second application list. In order to reduce the amount of data transmitted to the server, steps 404 and 405 are both executed on the client, and steps 404 and 405 can also be executed on the server.

[0163] In step 407, a trusted installation source is obtained.

[0164] Get the trusted installation source of the application in the second application list. The trusted installation source can be a trusted application market whitelist. Maintain a trusted application market whitelist on the server and add the credit market names of major smartphone device manufacturers to the trusted application market whitelist, such as xx application market. Applications downloaded and installed from the credit markets of these major smartphone device manufacturers are trustworthy. Figure 4 Area 422 shows that the method that can be executed in this step is: comparing whether the installation program is in the trusted application market whitelist. Area 423 shows that the trusted application market whitelist includes: gxxx, hxxx, sx xx... For example, the trusted application market whitelist data format is shown in Table 3:

[0165] Table 3

[0166] Manufacturer Name Package Name gxxx com.android.vending hxxx com.huawei.appmarket sxxx com.sec.android.app.samsungapps

[0167] In step 408, normal applications are determined based on the trusted installation source.

[0168] Based on the trusted installation source, determine whether the application in the second application list is a normal application. Determine whether the application is a normal application based on whether the value of the "Installer" column in Table 1 is in the "Package Name" column in Table 3 of the trusted application market whitelist, and delete the normal application from the second application list. Because the applications installed from the trusted application market whitelist are normal applications that can be trusted, the applications in the trusted application market whitelist do not need to undergo subsequent trusted judgments. This step can also be performed on the client. If it is performed on the client, the trusted application market whitelist needs to be sent to the client.

[0169] In step 409, the target application permissions are obtained.

[0170] The target application permission can be a high-risk permission in the blacklist of high-risk application permissions. A blacklist of high-risk application permissions is maintained on the server, and high-risk permissions are added to the blacklist. For example, in the embodiment of the present application, accessibility (ACCESSIBILITY_SERVICE) and sending text messages (android.permi ssion.SEND_SMS) are both high-risk permissions. Applications with this permission can send text messages without the user's permission. High-risk permissions in the blacklist can be added dynamically. Figure 4 , area 424 displays the blacklist of high-risk application permissions including: sending SMS, auxiliary functions, etc. For example, the data format of the blacklist of high-risk application permissions is shown in Table 4:

[0171] Table 4

[0172]

[0173] In step 425, normal applications are deleted from the second application list to obtain a third application list, and the third application list and target application permissions are transmitted to the client.

[0174] After deleting the normal applications in the second application list, a third application list is obtained, and the third application list is sent to the client, and the client performs subsequent processing according to the target application permissions and the application permissions of the applications in the third application list.

[0175] In step 411, it is determined whether the third application list is empty.

[0176] If the third application list is empty, it means that there are no abnormal applications, and a risk-free prompt is given to the user, and the process goes to step 412. The risk-free prompt "the current environment is very safe" is given, and the process goes to step 413. The detection is completed, and the application can continue to be used.

[0177] In step 414, it is determined whether the application program permissions include the target application permissions.

[0178] If the third application list is not empty, the application running environment is detected and processed at an abnormal level according to the application permissions of the application in the third application list and the high-risk permissions in the blacklist of the high-risk application permission list in Table 4. If the target application permission type is "permission", the application package information flag (PackageInfo) is used to determine whether the application contains the high-risk permissions in the blacklist of the high-risk application permission list. The package information flag of the current application is obtained, and all permission lists contained in the application are obtained through the package information flag. The permission list is traversed to find whether the permission to send text messages (android.permission.SEND_SMS) is included. If the permission is found in the permission list, the application permission includes the permission to send text messages. The application is determined to be an abnormal application. At this time, the first running environment detection result is obtained. The first running environment detection result indicates that the abnormal level of the application running environment is the first abnormal level. A high-risk prompt is given to the user, and the process goes to step 415. The high-risk prompt "Current environment is high risk" is transferred to step 416. The detection is completed, the use of the application is prohibited, and the user can also be prompted to uninstall the abnormal application.

[0179] If the target application permission type is "specific function", a special judgment is made according to the function type, and the application service manager (AccessibilityManager) is used to determine whether the application contains the accessibility permission (ACCESSIBILITY_SERVICE). The application service manager (AccessibilityManager) is a manager provided by the Android system for managing the accessibility function of the device. First, the system service manager is called, and then the getEnabledAccessibilityServiceList function is used to obtain the list of applications that currently enable accessibility functions (at least one first application that calls the specific function of the specific function type mentioned above), and the list is traversed to check whether it contains the application package name currently detected. If the application package name containing the current detection is found, it means that the application permission contains the accessibility permission, and the application is judged to be an abnormal application. At this time, the first operating environment detection result is obtained. The first operating environment detection result indicates that the abnormal level of the application operating environment is the first abnormal level, and a high-risk prompt is given to the user, and the process goes to step 415. The high-risk prompt "Current environment high risk" is turned to step 416, and the detection is completed. The use of the application is prohibited, and the user can also be prompted to uninstall the abnormal application.

[0180] If it is not detected that the application permissions include any high-risk permissions, it is determined that the security level of the current environment is questionable because there are applications installed from untrusted application markets in the list. At this time, the second operating environment detection result is obtained, and the second operating environment detection result indicates that the abnormality level of the application operating environment is the second abnormality level. A weak risk prompt is given to the user, and the process goes to step 417. The weak risk prompt "The current environment may be risky" goes to step 418, the detection is completed, and the user continues to use the application. The user can also be prompted to install the application from the official application market.

[0181] In the above application scenario of detecting abnormal applications, by classifying the sources of installed applications on the device, analyzing whether the application uses sensitive permissions, and judging whether there are abnormal applications, it is determined whether the device operating environment is safe. There is no need to establish a virus code library, which improves the accuracy and efficiency of identifying abnormal applications. By processing the application list on the client, the amount of data transmitted to the server is reduced, saving the server's computing resources. Reminding users according to the different abnormal levels of the application's operating environment can improve the user's awareness of prevention, so that when using electronic devices, the user's information, data and assets will not be maliciously stolen.

[0182] The following further describes an exemplary structure of the application program running environment detection device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example, Figure 2 As shown, the software modules in the detection device 455 of the application running environment stored in the memory 450 may include: a source identification module 4551, which is used to perform an identification process of the installation source type on the application in the application running environment to obtain the installation source type of the application; a first acquisition module 4552, which is used to obtain at least one trusted installation source belonging to the first source type when the installation source type is a first source type; a second acquisition module 4553, which is used to obtain target application permissions and application permissions of the application when at least one trusted installation source does not include the target installation source of the application; an anomaly detection module 4554, which is used to perform an abnormal level detection process on the application running environment based on the application permissions and the target application permissions to obtain an running environment detection result; an information prompt module 4555, which is used to output abnormal prompt information of the abnormal level indicated by the running environment detection result.

[0183] In some embodiments, the source identification module 4551 is also used to obtain application information of the application; perform detection processing on the target information in the application information to obtain the detection result, and determine the installation source type of the application based on the detection result.

[0184] In some embodiments, the source identification module 4551 is also used to perform detection processing on the permission flag information of the application information to obtain a first detection result; perform detection processing on the installation information of the application information to obtain a second detection result, the installation information includes an installation path and an application installer identifier, and the value of the application installer identifier is used to indicate whether the application is installed through the application installer; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not a target path, and the value of the application installer identifier is a target value, the installation source type of the application is determined to be the first source type; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is a target path, and the value of the application installer identifier is not a target value, the installation source type of the application is determined to be the first source type; when the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not a target path, and the value of the application installer identifier is not a target value, the installation source type of the application is determined to be the first source type.

[0185] In some embodiments, the source identification module 4551 is also used to determine that the installation source type of the application is the second source type when the first detection result indicates that the permission flag information includes a system application flag; and to determine that the installation source type of the application is the third source type when the first detection result indicates that the permission flag information does not include a system application flag, the second detection result indicates that the installation path is the target path, and the value identified by the application installer is the target value.

[0186] In some embodiments, the source identification module 4551 is further used to determine that the application is a normal application when the installation source type is the second source type; and to determine that the application is a normal application when the installation source type is the third source type.

[0187] In some embodiments, the first acquisition module 4552 is also used to obtain at least one trusted installation source belonging to the first source type, and then query the target installation source of the application from the at least one trusted installation source to obtain a first query result; when the first query result represents that at least one trusted installation source includes the target installation source of the application, the application is determined to be a normal application.

[0188] In some embodiments, when the target application permission belongs to a permission type, the anomaly detection module 4554 is also used to query the target application permission from the application program permissions to obtain a second query result; when the second query result indicates that the application program permissions include the target application permission, it is determined that a first operating environment detection result is obtained, and the first operating environment detection result indicates that the anomaly level of the application program operating environment is a first anomaly level; when the second query result indicates that the application program permissions do not include the target application permission, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result indicates that the anomaly level of the application program operating environment is a second anomaly level.

[0189] In some embodiments, when the target application permission belongs to a specific function type, the anomaly detection module 4554 is also used to obtain at least one first application that calls a specific function of the specific function type; query the application from at least one first application to obtain a third query result; when the third query result represents that at least one first application includes the application, it is determined that a first operating environment detection result is obtained, and the first operating environment detection result represents that the abnormality level of the application operating environment is a first abnormality level; when the third query result represents that at least one first application does not include the application, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result represents that the abnormality level of the application operating environment is a second abnormality level.

[0190] In some embodiments, the anomaly detection module 4554 is also used to query application permissions from the target application permissions to obtain a fourth query result; when the fourth query result indicates that the target application permissions include application permissions, it is determined that a first operating environment detection result is obtained, and the first operating environment detection result indicates that the anomaly level of the application operating environment is a first anomaly level; when the fourth query result indicates that the target application permissions do not include application permissions, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result indicates that the anomaly level of the application operating environment is a second anomaly level.

[0191] In some embodiments, the anomaly detection module 4554 is also used to obtain the processing behavior characteristics of the target object for the second application when the operating environment detection result is the second operating environment detection result, and the installation source of the second application in the application operating environment does not belong to a trusted installation source; based on the processing behavior characteristics, call the neural network model to perform prediction processing of the trusted source to obtain a prediction result, and the prediction result represents whether the installation source of the second application is a trusted installation source; when the prediction result represents that the installation source of the second application is a trusted installation source, add the installation source of the second application to at least one trusted installation source.

[0192] In some embodiments, the information prompt module 4555 is also used to obtain an abnormal prompt template before outputting abnormal prompt information of the abnormal level indicated by the operating environment detection result, and the abnormal prompt template indicates the arrangement structure of the prompt content of the abnormal prompt information; based on the operating environment detection result, call the neural network model to execute the generation processing of the prompt content to obtain the prompt content; according to the arrangement structure, fill the prompt content into the abnormal prompt template to obtain the abnormal prompt information.

[0193] The embodiment of the present application provides a computer program product, which includes computer executable instructions or computer programs, and the computer executable instructions or computer programs are stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instructions or computer programs from the computer-readable storage medium, and the processor executes the computer executable instructions or computer programs, so that the electronic device executes the detection method of the application program running environment described in the embodiment of the present application.

[0194] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the detection method of the application program running environment provided by the embodiment of the present application, for example, Figure 3A A method for detecting an application running environment is shown.

[0195] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0196] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0197] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0198] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0199] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for detecting an application program running environment, characterized in that: The method comprises: Performing an identification process on the installation source type of the application in the application running environment to obtain the installation source type of the application; When the installation source type is a first source type, obtaining at least one trusted installation source belonging to the first source type; When the at least one trusted installation source does not include a target installation source of the application, obtaining target application permissions and application permissions of the application; Based on the application program permissions and the target application permissions, performing abnormal level detection processing on the application program running environment to obtain a running environment detection result; Output abnormal prompt information of the abnormal level indicated by the operating environment detection result.

2. The method according to claim 1, characterized in that The performing of the identification process of the installation source type on the application in the application running environment to obtain the installation source type of the application includes: Get application information of the application; Detection processing is performed on the target information in the application information to obtain a detection result, and based on the detection result, the installation source type of the application is determined.

3. The method according to claim 2, characterized in that The performing detection processing on the target information in the application information to obtain the detection result includes: Performing detection processing on the permission flag information of the application information to obtain a first detection result; Performing detection processing on installation information of the application information to obtain a second detection result, the installation information including an installation path and an application installation program identifier, the value of the application installation program identifier being used to indicate whether the application program is installed through the application installation program; The step of determining the installation source type of the application based on the detection result includes: When the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not a target path and the value of the application installation program identifier is a target value, determining that the installation source type of the application is the first source type; When the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is a target path and the value of the application installation program identifier is not a target value, determining that the installation source type of the application is the first source type; When the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is not the target path and the value of the application installer identifier is not the target value, it is determined that the installation source type of the application is the first source type.

4. The method according to claim 3, characterized in that The method further comprises: When the first detection result indicates that the permission flag information includes a system application flag, determining that the installation source type of the application is a second source type; When the first detection result indicates that the permission flag information does not include a system application flag, and the second detection result indicates that the installation path is a target path and the value of the application installation program identifier is a target value, it is determined that the installation source type of the application is a third source type.

5. The method according to claim 4, characterized in that The method further comprises: When the installation source type is the second source type, determining that the application is a normal application; When the installation source type is the third source type, the application is determined to be a normal application.

6. The method according to claim 1, characterized in that After acquiring at least one trusted installation source belonging to the first source type, the method further includes: querying a target installation source of the application from the at least one trusted installation source to obtain a first query result; When the first query result represents that the at least one trusted installation source includes the target installation source of the application, the application is determined to be a normal application.

7. The method according to claim 1, characterized in that When the target application permission belongs to the permission type, performing abnormal level detection processing on the application running environment based on the application permission and the target application permission to obtain the running environment detection result includes: Query the target application permissions from the application program permissions to obtain a second query result; When the second query result indicates that the application program permissions include the target application permissions, determining that a first operating environment detection result is obtained, the first operating environment detection result indicates that the abnormality level of the application program operating environment is a first abnormality level; When the second query result indicates that the application program permissions do not include target application permissions, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result indicates that the abnormality level of the application program operating environment is a second abnormality level.

8. The method according to claim 1, characterized in that When the target application permission belongs to a specific function type, the abnormal level detection processing is performed on the application running environment based on the application permission and the target application permission to obtain the running environment detection result, including: Acquire at least one first application program that calls a specific function of the specific function type; querying the application from the at least one first application to obtain a third query result; When the third query result indicates that the at least one first application includes the application, determining that a first operating environment detection result is obtained, the first operating environment detection result indicates that the abnormality level of the application operating environment is a first abnormality level; When the third query result indicates that the at least one first application does not include the application, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result indicates that the abnormality level of the application operating environment is a second abnormality level.

9. The method according to claim 1, characterized in that: The performing abnormal level detection processing on the application program running environment based on the application program permission and the target application permission to obtain the running environment detection result includes: Querying the application program permissions from the target application permissions to obtain a fourth query result; When the fourth query result indicates that the target application permission includes the application program permission, it is determined that a first operating environment detection result is obtained, and the first operating environment detection result indicates that the abnormality level of the application program operating environment is a first abnormality level; When the fourth query result indicates that the target application permission does not include the application program permission, it is determined that a second operating environment detection result is obtained, and the second operating environment detection result indicates that the abnormality level of the application program operating environment is a second abnormality level.

10. The method according to any one of claims 7 to 9, characterized in that: When the running environment detection result is the second running environment detection result, and the installation source of the second application in the application running environment does not belong to the trusted installation source, the method further includes: Acquire processing behavior characteristics of the target object with respect to the second application program; Based on the processing behavior characteristics, calling a neural network model to perform a prediction process of a trusted source to obtain a prediction result, wherein the prediction result indicates whether the installation source of the second application is a trusted installation source; When the prediction result indicates that the installation source of the second application is a trusted installation source, the installation source of the second application is added to the at least one trusted installation source.

11. The method according to claim 1, characterized in that: Before outputting the abnormal prompt information of the abnormal level indicated by the operating environment detection result, the method further includes: Acquire an abnormal prompt template, where the abnormal prompt template indicates an arrangement structure of prompt content of the abnormal prompt information; Based on the operating environment detection result, calling the neural network model to execute prompt content generation processing to obtain the prompt content; According to the arrangement structure, the prompt content is filled into the abnormal prompt template to obtain the abnormal prompt information.

12. A device for detecting an application program running environment, characterized in that: The device comprises: A source identification module, used to perform an identification process on the installation source type of the application in the application running environment to obtain the installation source type of the application; A first acquisition module, configured to, when the installation source type is a first source type, acquire at least one trusted installation source belonging to the first source type; a second acquisition module, configured to acquire target application permissions and application permissions of the application when the at least one trusted installation source does not include a target installation source of the application; An anomaly detection module, used to perform an abnormal level detection process on the application program running environment based on the application program permissions and the target application permissions, and obtain a running environment detection result; The information prompt module is used to output abnormal prompt information of the abnormal level indicated by the operating environment detection result.

13. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, configured to implement the method for detecting the application running environment as described in any one of claims 1 to 11 when executing the computer executable instructions or computer programs stored in the memory.

14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the method for detecting the application running environment according to any one of claims 1 to 11 is implemented.

15. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the method for detecting the application running environment according to any one of claims 1 to 11 is implemented.