Detecting unwanted software using a machine learning operation
Systems, methods, and software can be used to determine whether a software code is unwanted. In some aspects, a method includes: obtaining, by an electronic device, a set of software features of a software code; obtaining, by the electronic device, a set of user features of a user of the electronic device; and determining, by the electronic device, a classification score of the software code based on the set of software features and the set of the user features, wherein the classification score indicates whether the software code is potentially unwanted for the user.
1 . A method, comprising:
obtaining, by an electronic device, a set of software features of a software code;
obtaining, by the electronic device, a set of user features of a user of the electronic device; and
determining, by the electronic device, a classification score of the software code based on the set of software features and the set of the user features, wherein the classification score indicates whether the software code is potentially unwanted for the user, wherein the determining the classification score comprises:
obtaining a software output vector by using a first machine learning model to process a software feature vector representing the set of software features of the software code;
obtaining a user output vector by using a second machine learning model to process a user feature vector representing the set of user features of the user, wherein the software feature vector and the user feature vector have different lengths, and the user output vector and the software output vector have a same length; and
determining the classification score of the software code based on the software output vector and the user output vector; and
outputting an indication indicating whether the software code is potentially unwanted for the user.
2 . The method of claim 1 , wherein the determining the classification score comprises:
determining the software feature vector based on the set of software features; and
determining the user feature vector based on the set of user features.
3 . The method of claim 1 , wherein the determining the classification score comprises:
sending the set of software features and the set of user features to a server; and
in response to the sending of the set of software features and the set of user features, receiving the software feature vector and the user feature vector from the server.
4 . The method of claim 1 , further comprising:
comparing the classification score with a threshold score; and
in response to determining that the classification score meets the threshold score, allowing access to the software code.
5 . The method of claim 1 , wherein the set of user features comprises a name of the user, a geographic location of the user, and an employer of the user.
6 . The method of claim 1 , wherein the set of user features comprises information of a browsing history, an access history, an application installation history, and an application usage history of the user.
7 . The method of claim 1 , wherein the set of user features comprises information of a hardware configuration of the electronic device and a software configuration of the electronic device.
8 . The method of claim 1 , wherein the set of software features comprises a file size of the software code, a file format of the software code, and a second indication indicating whether the software code is binary code or source code.
9 . The method of claim 1 , wherein the set of software features comprises at least a part of the software code.
10 . A non-transitory computer-readable medium containing instructions which, when executed, cause an electronic device to perform operations comprising:
obtaining a set of software features of a software code;
obtaining a set of user features of a user of the electronic device; and
determining a classification score of the software code based on the set of software features and the set of the user features, wherein the classification score indicates whether the software code is potentially unwanted for the user, wherein the determining the classification score comprises:
obtaining a software output vector by using a first machine learning model to process a software feature vector representing the set of software features of the software code;
obtaining a user output vector by using a second machine learning model to process a user feature vector representing the set of user features of the user, wherein the software feature vector and the user feature vector have different lengths, and the user output vector and the software output vector have a same length; and
determining the classification score of the software code based on the software output vector and the user output vector; and
outputting an indication indicating whether the software code is potentially unwanted for the user.
11 . The computer-readable medium of claim 10 , wherein the determining the classification score comprises:
determining the software feature vector based on the set of software features; and
determining the user feature vector based on the set of user features.
12 . The computer-readable medium of claim 10 , wherein the determining the classification score comprises: sending the set of software features and the set of user features to a server; and
in response to the sending of the set of software features and the set of user features, receiving the software feature vector and the user feature vector from the server.
13 . The computer-readable medium of claim 10 , the operations further comprising:
comparing the classification score with a threshold score; and
in response to determining that the classification score meets the threshold score, allowing access to the software code.
14 . A computer-implemented system, comprising:
one or more computers; and
one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
obtaining a set of software features of a software code;
obtaining a set of user features of a user of an electronic device; and
determining a classification score of the software code based on the set of software features and the set of the user features, wherein the classification score indicates whether the software code is potentially unwanted for the user, wherein the determining the classification score comprises:
obtaining a software output vector by using a first machine learning model to process a software feature vector representing the set of software features of the software code;
obtaining a user output vector by using a second machine learning model to process a user feature vector representing the set of user features of the user, wherein the software feature vector and the user feature vector have different lengths, and the user output vector and the software output vector have a same length; and
determining the classification score of the software code based on the software output vector and the user output vector; and
outputting an indication indicating whether the software code is potentially unwanted for the user.
15 . The computer-implemented system of claim 14 , wherein the determining the classification score comprises:
determining the software feature vector based on the set of software features; and
determining the user feature vector based on the set of user features.
16 . The computer-implemented system of claim 14 , wherein the determining the classification score comprises: sending the set of software features and the set of user features to a server; and
in response to the sending of the set of software features and the set of user features, receiving the software feature vector and the user feature vector from the server.
17 . The computer-implemented system of claim 14 , the operations further comprising:
comparing the classification score with a threshold score; and
in response to determining that the classification score meets the threshold score, allowing access to the software code.