A method for constructing an APP list, an electronic device, and a readable storage medium

Through APK feature processing and similarity list construction methods, abnormal types of APPs are distinguished, which solves the problem that existing technologies cannot effectively distinguish and avoid negative effects, and improves user safety.

CN114626466BActive Publication Date: 2024-09-27HANGZHOU YUNSHEN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210265104.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-17
Publication Date
2024-09-27
Estimated Expiration
2042-03-17

AI Technical Summary

Technical Problem

Existing technology cannot effectively distinguish and avoid negative effects when installing APPs, such as APPs that leak user information or maliciously spread abnormal information, and cannot classify APPs of the same type.

Method used

Through APK feature processing, the target feature vector and similarity list are determined, and an APP list is constructed to distinguish abnormal types of APPs and improve user safety.

Benefits of technology

Effectively distinguish abnormal types of APPs to avoid negative effects and improve user safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114626466B
    Figure CN114626466B
Patent Text Reader

Abstract

The present invention discloses a method for constructing an APP list, an electronic device and a readable storage medium. The method comprises the following steps: obtaining a feature vector of any APK and when a probability value corresponding to any feature value in the feature vector of the APK satisfies a preset condition, deleting a text feature corresponding to the feature value from the feature vector corresponding to each APK, and then constructing an intermediate feature vector corresponding to the APK to determine an abnormal APK, so that an APP is determined according to the similarity of the abnormal APK and constructed into an APP list. The present invention can easily distinguish abnormal type APPs, thereby avoiding the occurrence of negative effects and improving the user's safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of APK processing, and in particular to a method for constructing an APP list, an electronic device and a readable storage medium. Background Art

[0002] With the popularization of electronic products, most users will install a large number of APPs for use in life or work scenarios. When installing the APP, they will inevitably download the Android installation package (Android Package, APK for short).

[0003] Currently, existing APPs are divided into many types, among which there is a lack of abnormal type APPs that are used to produce negative effects on users, for example, APPs that leak user information or APPs that maliciously spread abnormal information. Most of the existing technologies determine the type of APPs based on the negative effects that occur after users use them. The occurrence of negative effects cannot be avoided, which affects the user's safety. At the same time, it is also impossible to classify APPs of the same type to distinguish abnormal type APPs and avoid the occurrence of negative effects. Summary of the invention

[0004] In order to solve the problems of the prior art, it is determined whether the APK is an abnormal APK through the characteristics of the APK, and the corresponding APP is selected according to the determined abnormal APK for classification, and an APP list is constructed to facilitate the distinction of abnormal type APPs, thereby avoiding the occurrence of negative effects and improving the user's safety; the embodiment of the present invention provides a method for constructing an APP list, an electronic device and a readable storage medium. The technical solution is as follows:

[0005] In one aspect, a method for constructing an APP list comprises the following steps:

[0006] S101, obtain APK list A = (A1, A2, A3, ..., A N ), A i Refers to the i-th APK file, i=2...N, N is the number of APK files;

[0007] S103, based on A i , determine A i The corresponding target feature vector B = (B1, B2, B3, ..., B M ), B j refers to the jth target feature value, j = 4...M, M is the number of target features,

[0008] The method further comprises the following steps to determine B:

[0009] For each A i Perform feature processing to obtain Ai The corresponding eigenvector (A i1 , A i2 , A i3 , ..., A iS ), A ix It refers to the feature value corresponding to the x-th text feature, x = 4...S, S is the number of text features;

[0010] Traverse N A i The corresponding eigenvector and when A ix When the corresponding first probability F ≥ the preset first probability threshold, from each A i Delete A from the corresponding eigenvector ix Corresponding text features, construct each A i The corresponding first intermediate eigenvector It refers to the yth intermediate eigenvalue, y = 4...Z, Z is the number of intermediate features, where F meets the following conditions:

[0011] N i0 It means that in N A i The corresponding eigenvector A ix The number of text features that are Null;

[0012] Traverse N A i The corresponding first intermediate eigenvector and when the target number ≤ the preset feature quantity threshold, It means that in N A i The corresponding first intermediate eigenvector Quantity, from each A i The corresponding first intermediate eigenvector is deleted Corresponding text features, construct each A i The corresponding target feature vector B, where It means that in N A i The corresponding first intermediate eigenvector quantity;

[0013] S105. According to A i The corresponding target feature vector B and the target feature vectors corresponding to N-1 intermediate files are obtained i The corresponding target similarity list C i =(C i1 , C i2 , C i3 , ..., C iN-1 ), C ir It refers to the similarity value corresponding to the rth intermediate file, r = 1...N-1, so that traversing C i And when Cir ≥ the preset similarity threshold, construct A i Corresponding APP list.

[0014] On the other hand, an electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for constructing an APP list as described in any of the above items.

[0015] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method for constructing an APP list as described in any one of the above items.

[0016] The present invention provides an APP list construction method, electronic device and readable storage medium, which have the following technical effects:

[0017] The present invention obtains an APK list and determines a target feature vector corresponding to the APK based on any APK in the APK list, wherein the method further comprises the following steps to determine the target feature vector: feature processing is performed on each APK to obtain a feature vector corresponding to the APK, the feature vectors corresponding to N APKs are traversed and when a first probability corresponding to any feature value in the feature vector corresponding to the APK is not less than a preset first probability threshold, the text feature corresponding to the feature value is deleted from the feature vector corresponding to each APK, and a first intermediate feature vector corresponding to each APK is constructed, and a target similarity list corresponding to the APK is obtained according to the target feature vector corresponding to the APK and the target feature vectors corresponding to N-1 intermediate files, so that when the target similarity list is traversed and any target similarity is not less than a preset similarity threshold, an APP list corresponding to the APK is constructed, which can be helpful in distinguishing abnormal type APPs, thereby avoiding the occurrence of negative effects and improving user safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 It is a flowchart of a method for constructing an APP list provided in the first embodiment of the present invention;

[0020] Figure 2It is a flowchart of a method for determining an application software group provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0023] Embodiment 1

[0024] like Figure 1 As shown, this embodiment provides a method for constructing an APP list, and the method includes the following steps:

[0025] S101, obtain APK list A = (A1, A2, A3, ..., A N ), A i It refers to the i-th APK file, i=2...N, N is the number of APK files.

[0026] Specifically, the APK file refers to a text generated after parsing the APK. In this embodiment, any existing parsing method is adopted, which will not be repeated here.

[0027] S103, based on A i , determine A i The corresponding target feature vector B = (B1, B2, B3, ..., B M ), B j It refers to the jth target feature value, j=4…M, where M is the number of target features.

[0028] Specifically, the method further comprises the following steps to determine B:

[0029] For each A i Perform feature processing to obtain A i The corresponding eigenvector (A i1 , A i2 , A i3 , ..., A iS ), A ix It refers to the feature value corresponding to the xth text feature, x=4...S, S is the number of text features, in this embodiment, A i The feature processing is any method in the prior art, which will not be described in detail here;

[0030] Traverse N A i The corresponding eigenvector and when A ix When the corresponding first probability F ≥ the preset first probability threshold, from each A i Delete A from the corresponding eigenvector ix Corresponding text features, construct each A i The corresponding first intermediate eigenvector It refers to the yth intermediate eigenvalue, y = 4...Z, Z is the number of intermediate features, where F meets the following conditions:

[0031] N i0 It means that in N A i The corresponding eigenvector A ix The number of text features that are Null;

[0032] Traverse N A i The corresponding first intermediate eigenvector and when the target number ≤ the preset feature quantity threshold, It means that in N A i The corresponding first intermediate eigenvector Quantity, from each A i The corresponding first intermediate eigenvector is deleted Corresponding text features, construct each A i The corresponding target feature vector B, where It means that in N A i The corresponding first intermediate eigenvector quantity.

[0033] Furthermore, the types of the text features include at least: permission features, APP name features, APK package name features and certificate features.

[0034] In a specific embodiment, the method further comprises the following steps: i The corresponding eigenvector is:

[0035] Determine the type of any of the text features;

[0036] When the type of the text feature meets the preset feature type, the feature value corresponding to the text feature is determined to be the first feature value. The first feature value refers to the feature value that needs to be normalized. Preferably, the first feature value can adopt any normalization process in the prior art, which will not be repeated here.

[0037] When the type of the text feature does not meet the preset feature type, determining that the feature value corresponding to the text feature is a second feature value, where the second feature value refers to a feature value that does not need to be normalized;

[0038] After normalizing the first eigenvalue, the third eigenvalue is obtained and based on the third eigenvalue and the second eigenvalue, A is constructed. i The corresponding feature vector.

[0039] In a specific embodiment, the method further comprises the following steps: i The corresponding target feature vector B:

[0040] Traverse N A i The corresponding first intermediate eigenvector and when The corresponding second probability ≥ the preset second probability threshold, from each A i The corresponding first intermediate eigenvector is deleted Corresponding text features, construct each A i The corresponding second intermediate eigenvector;

[0041] Traverse N A i When the IV value corresponding to any second intermediate eigenvalue in the second intermediate eigenvector is ≥ the preset IV threshold, i Delete the text feature corresponding to the second intermediate eigenvalue from the corresponding second intermediate eigenvector, and construct each A i The corresponding target feature vector B.

[0042] Specifically, the first probability threshold and the second probability threshold range from 90% to 100%. Preferably, the first probability threshold and the second probability threshold are 90%.

[0043] S105. According to A i The corresponding target feature vector B and the target feature vectors corresponding to N-1 intermediate files are obtained i The corresponding target similarity list C i =(C i1 , C i2 , C i3 , ..., CiN-1 ), C ir It refers to the similarity value corresponding to the rth intermediate file, r = 1...N-1, so that traversing C i And when C ir ≥ the preset similarity threshold, construct A i Corresponding APP list.

[0044] Specifically, the intermediate file refers to the files in A except A i Any APK file other than .

[0045] Specifically, the method further comprises the following steps of determining C ir :

[0046] Get the target feature vector D corresponding to the rth intermediate file r =(D r1 , D r2 , D r3 , ..., D rM ), D rj refers to the jth target feature value in the intermediate file and D rj The corresponding target features and B j The corresponding target features are consistent;

[0047] Based on each B j and the corresponding D rj , get B j The corresponding similarity H rj And the rth intermediate file constructs the similarity list H corresponding to the rth intermediate file r =(H r1 , H r2 , H r3 , ..., H rM );

[0048] According to H r and H r The corresponding weight list W r =(W r1 , W r2 , W r3 , ..., W rM ), and get C ir , where C ir Meet the following conditions:

[0049] Among them, W rj It means H rj The corresponding weight value.

[0050] Specifically, the method also includes a method for determining the similarity corresponding to the permission feature:

[0051] Get every A i The vector correction value list corresponding to the authority feature Vi=(V i1 , V i2 , ..., V is ), where V it A i The t-th level in the permission feature of Ai corresponds to a vector correction value, t = 1...s, s is the number of correction value levels of the permission feature of Ai;

[0052] According to V i , get A i The corresponding similarity list K i =(K i1 , K i2 , ..., K iN-1 ), from V i The maximum similarity value in the corresponding similarity list is used as A i The corresponding target similarity.

[0053] Among them, K ix Meet the following conditions:

[0054] It can be understood as: K ix A i The vector correction value list corresponding to the permission characteristics of A x The similarity between the vector correction value lists corresponding to the permission features of V xt A x The tth level in the permission feature corresponds to a vector correction value, x=1...N-1.

[0055] Furthermore, A i The types of other text features in can also be determined in the same way as the permission features, or A i Any B j The corresponding similarity is determined according to the type of text features. The corresponding similarity calculation method can be selected according to the corresponding features to ensure the accuracy of the similarity calculation, which is conducive to distinguishing abnormal types of APPs, thereby avoiding the occurrence of negative effects and improving user safety.

[0056] The present invention obtains an APK list and determines a target feature vector corresponding to the APK based on any APK in the APK list, wherein the method further comprises the following steps to determine the target feature vector: feature processing is performed on each APK to obtain a feature vector corresponding to the APK, the feature vectors corresponding to N APKs are traversed and when a first probability corresponding to any feature value in the feature vector corresponding to the APK is not less than a preset first probability threshold, the text feature corresponding to the feature value is deleted from the feature vector corresponding to each APK, and a first intermediate feature vector corresponding to each APK is constructed, and a target similarity list corresponding to the APK is obtained according to the target feature vector corresponding to the APK and the target feature vectors corresponding to N-1 intermediate files, so that when the target similarity list is traversed and any target similarity is not less than a preset similarity threshold, an APP list corresponding to the APK is constructed, which can be helpful in distinguishing abnormal type APPs, thereby avoiding the occurrence of negative effects and improving user safety.

[0057] Embodiment 2

[0058] like Figure 2 As shown, embodiment 2 also provides a method for determining an application software group, the method comprising the following steps:

[0059] S201, establish a similarity list of target relationship pairs and determine a first quantity list E corresponding to a threshold interval based on the similarity list of the target relationship pairs = (E1, E2, E3, ..., E m ), E g It refers to the number of target relationship pairs whose similarity is within the threshold interval described in the gth paragraph, g = 1...m, m meets the following conditions: K is a preset similarity threshold.

[0060] Specifically, the method further comprises the following steps of establishing a similarity list of target relationship pairs:

[0061] According to N APK files, determine target relationship pairs and construct them into a target relationship pair list;

[0062] According to the target relationship pair list, the similarity value of each target relationship pair is determined from the target similarity lists corresponding to the N APK files, and a similarity list of the target relationship pairs is constructed.

[0063] Specifically, the target relationship pair refers to a relationship pair established between different APK files.

[0064] Specifically,

[0065] S203: Randomly select the similarities of N / 2 target relationship pairs from the similarity list of the target relationship pairs, and determine a second quantity list corresponding to the threshold interval. It refers to the number of target relationship pairs among the N / 2 target relationship pairs whose similarity is within the g-th threshold interval.

[0066] Specifically, the threshold intervals are intervals generated by dividing the threshold range, wherein the intervals between each of the threshold intervals are equal.

[0067] S205, based on E g and Generate target probability T g And based on each T g Construct a target probability list;

[0068] T g Meet the following conditions:

[0069]

[0070] S207, when T g ≥ preset probability threshold T0, determine T g The corresponding threshold interval is the target threshold interval.

[0071] S209, traverse the similarity list of the target relationship pairs and when the similarity of any target relationship pair in the similarity list of the target relationship pairs is ≥ the target maximum endpoint value in the target threshold interval, construct the application software corresponding to the APK of the target relationship pair into an application software group, wherein the target maximum endpoint value refers to the target maximum endpoint value between the two endpoints of the target threshold interval.

[0072] Specifically, in step S201, the target similarity list corresponding to the APK file can be obtained by taking steps S101-S105 in the first embodiment, which will not be repeated here.

[0073] The second embodiment of the present invention provides a method for determining an application software group, which can establish a similarity list of target relationship pairs and based on the similarity list of the target relationship pairs, select a target threshold interval from the similarity list of the target relationship pairs, traverse the similarity list of the target relationship pairs and when any target relationship pair in the similarity list of the target relationship pairs has a similarity, construct the application software corresponding to the APK of the target relationship pair into an application software group, and can determine abnormal APPs based on APKs, facilitate the classification of APPs, and thereby avoid the occurrence of negative effects and improve user safety.

[0074] An embodiment of the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for constructing an APP list as described above.

[0075] The computer device of the embodiment of the present invention exists in various forms, including but not limited to:

[0076] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as tPhone), multimedia phones, functional phones, and low-end phones.

[0077] (2) Ultra-mobile personal computer devices: These devices belong to the category of personal computers, have computing and processing functions, and generally also have mobile Internet access features. These terminals include: PDA, MtD and UMPC devices, such as tPad.

[0078] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as tPod), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0079] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0080] (5) Other electronic devices with data interaction functions.

[0081] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a method for constructing an APP list in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method for constructing an APP list provided in the above method embodiment.

[0082] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for constructing an APP list, characterized in that: The method comprises the following steps: S101, obtain APK list A = (A1, A2, A3, ..., A N ), A i Refers to the i-th APK file, i=2...N, N is the number of APK files; S103, based on A i , determine A i The corresponding target feature vector B = (B1, B2, B3, ..., B M ), B j refers to the jth target feature value, j = 4...M, M is the number of target features, The method further comprises the following steps to determine B: For each A i Perform feature processing to obtain A i The corresponding eigenvector (A i1 , A i2 , A i3 , ..., A iS ), A ix It refers to the feature value corresponding to the x-th text feature, x = 4...S, S is the number of text features; Traverse N A i The corresponding eigenvector and when A ix When the corresponding first probability F ≥ the preset first probability threshold, from each A i Delete A from the corresponding eigenvector ix Corresponding text features, construct each A i The corresponding first intermediate eigenvector It refers to the yth intermediate eigenvalue, y = 4...Z, Z is the number of intermediate features, where F meets the following conditions: N i0 It means that in N A i The corresponding eigenvector A ix The number of text features that are Null; Traverse N A i The corresponding first intermediate eigenvector and when It means that in N A i The corresponding first intermediate eigenvector Quantity, from each A i The corresponding first intermediate eigenvector is deleted Corresponding text features, construct each A i The corresponding target feature vector B, where It means that in N A i The corresponding first intermediate eigenvector quantity; S105. According to A i The corresponding target feature vector B and the target feature vectors corresponding to N-1 intermediate files are obtained i The corresponding target similarity list C i =(C i1 , C i2 , C i3 , ..., C iN-1 ), C ir It refers to the similarity value corresponding to the rth intermediate file, r = 1...N-1, so that traversing C i And when C ir ≥ the preset similarity threshold, construct A i Corresponding APP list.

2. A method for constructing an APP list according to claim 1, characterized in that: The APK file refers to the text generated after parsing the APK.

3. A method for constructing an APP list according to claim 1, characterized in that: The method further comprises the following steps: i The corresponding eigenvector is: Determining the type of any of the text features; When the type of the text feature meets the preset feature type, determining that the feature value corresponding to the text feature is a first feature value, where the first feature value refers to a feature value that needs to be normalized; When the type of the text feature does not meet the preset feature type, determining that the feature value corresponding to the text feature is a second feature value, where the second feature value refers to a feature value that does not need to be normalized; After normalizing the first eigenvalue, the third eigenvalue is obtained and based on the third eigenvalue and the second eigenvalue, A is constructed. i The corresponding feature vector.

4. The method for constructing an APP list according to claim 3, characterized in that: The types of the text features include at least: permission features, APP name features, APK package name features and certificate features.

5. The method for constructing an APP list according to claim 4, characterized in that: The corresponding text feature threshold refers to a threshold determined based on the text and feature type.

6. The method for constructing an APP list according to claim 1, characterized in that: The method further comprises the following steps: constructing each A i The corresponding target feature vector B: Traverse N A i The corresponding first intermediate eigenvector and when From each A i The corresponding first intermediate eigenvector is deleted Corresponding text features, construct each A i The corresponding second intermediate eigenvector; Traverse N A i When the IV value corresponding to any second intermediate eigenvalue in the second intermediate eigenvector is ≥ the preset IV threshold, i Delete the text feature corresponding to the second intermediate eigenvalue from the corresponding second intermediate eigenvector, and construct each A i The corresponding target feature vector B.

7. The method for identifying abnormal APK according to claim 1, characterized in that: The intermediate file refers to any APK file other than Ai in A.

8. The method for constructing an APP list according to claim 1, characterized in that: The method further comprises the following steps of determining C ir : Get the target feature vector D corresponding to the rth intermediate file r =(D r1 , D r2 , D r3 , ..., D rM ), D rj refers to the jth target feature value in the intermediate file and D rj The corresponding target features and B j The corresponding target features are consistent; Based on each B j and the corresponding D rj , get B j The corresponding similarity H rj And the rth intermediate file constructs the similarity list H corresponding to the rth intermediate file r =(H r1 , H r2 , H r3 , ..., H rM ); According to H r and H r The corresponding weight list W r =(W r1 , W r2 , W r3 , ..., W rM ), and get C ir , where C ir Meet the following conditions: Among them, W rj It means H rj The corresponding weight value.

9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for constructing an APP list as described in any one of claims 1 to 8.

10. A computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method for constructing an APP list as described in any one of claims 1 to 8.