A third-party open source component risk analysis method and system based on software genes

By combining static and dynamic analysis methods and using machine learning models to extract and classify software gene features, the problems of low malicious code detection efficiency and high consumption of computing resources in the existing technology are solved, and the accuracy of risk analysis of third-party open source components is improved. and efficiency.

CN117972699BActive Publication Date: 2024-09-13STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410236971.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-01
Publication Date
2024-09-13
Estimated Expiration
2044-03-01

AI Technical Summary

Technical Problem

Existing technologies are inefficient in malicious code detection and consume large amounts of computing resources. The performance of Markov models depends on the quality and quantity of training data, resulting in insufficient accuracy in software gene extraction.

Method used

Combining static analysis and dynamic analysis methods, deep neural networks and convolutional neural networks are used to extract and classify software gene features. By fusing static and dynamic analysis results, component family traceability methods are used to conduct risk analysis.

Benefits of technology

It improves the accuracy of risk analysis of third-party open source components, reduces computing resource consumption, and enhances the detection capabilities of malicious code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117972699B
    Figure CN117972699B
Patent Text Reader

Abstract

The present invention relates to the technical field of malware detection and processing, and in particular to a third-party open source component risk analysis method and system based on software genes, the method comprising the following steps: obtaining software gene information; performing feature extraction on the software gene information to obtain a feature vector; performing static analysis on the extracted feature vector, and inputting the obtained first analysis result into a first machine algorithm model for training to obtain a first classification model; performing dynamic analysis on the extracted feature vector, and inputting the obtained second analysis result into a second machine algorithm model for training to obtain a second classification model; inputting the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result; fusing the two results, and when the results are consistent, outputting the result as the final classification result; when the results are inconsistent, using a component family tracing method to analyze the open source component code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of malware detection and processing, and in particular to a third-party open source component risk analysis method and system based on software genes. Background Art

[0002] A software gene is a binary fragment that has functions or carries information on the software body. It is the atomic unit for realizing software functions and supports the basic structure of the software. A software gene is relatively short and the functions it represents are generally relatively simple. A complex function of a program needs to be completed by combining multiple software genes. In the development process of modern software, third-party open source components account for an increasingly high proportion. However, when using third-party open source components, their security cannot be guaranteed, so it is necessary to analyze the risks involved.

[0003] In the prior art, for example, a Chinese invention patent application with application publication number CN108171059A disclosed a method and device for detecting and identifying malicious code based on software genes on June 15, 2018, which first constructs a malicious code software gene library, and then detects and identifies the malicious code through the malicious code software gene library; however, the inventors found that when the above scheme is implemented, with the explosive growth of malicious code, the traditional malicious code matching method leads to lower and lower detection efficiency, and also requires a large amount of computer resources for support;

[0004] For another example, the invention patent with application number 201910557072.9 discloses a method for dynamically extracting software genes in memory based on a Markov model, including: step 1: establishing a memory capture system; step 2: performing a virtual machine-related memory dump based on the memory capture system when the shelled malicious code is executed; step 3: constructing a Markov model based on the malicious code software genes extracted from the unshelled malicious code; step 4: constructing a first state transition matrix based on the code fragments extracted from the non-malicious code; step 5: optimizing the Markov model using the first state transition matrix to obtain a shelled software gene detection model; step 6: extracting malicious code software genes from the shelled malicious code through the shelled software gene detection model. However, the inventors found that the performance of the above-mentioned Markov model depends on the quality and quantity of the training data, and the lack of representative data may lead to insufficient accuracy in software gene extraction. Summary of the invention

[0005] The present application provides a third-party open source component risk analysis method and system based on software genes, which combines a static analysis method with a dynamic analysis method, and respectively trains a first analysis result and a second analysis result using a first machine learning algorithm model and a second machine learning algorithm model, thereby fusing the obtained first classification result and the second classification result, and combining the two analysis methods to greatly improve the accuracy of the analysis results.

[0006] According to a first aspect of the present invention, a third-party open source component risk analysis method based on software genes is provided, comprising the following steps:

[0007] Acquire software gene information, the software gene information including a first code feature library and a second code feature library, the first code feature library is a malicious code feature library, and the second code feature library is a legitimate code feature library;

[0008] Extracting features from the software gene information to obtain feature vectors;

[0009] Performing static analysis on the extracted feature vector to obtain a first analysis result, and inputting the first analysis result into a first machine algorithm model for training to obtain a first classification model;

[0010] Dynamically analyzing the extracted feature vector to obtain a second analysis result, and inputting the second analysis result into a second machine algorithm model for training to obtain a second classification model;

[0011] Inputting the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result;

[0012] The first classification result and the second classification result are integrated, and when the first classification result and the second classification result are consistent, the first classification result and the second classification result are output as the final classification result; when the first classification result and the second classification result are inconsistent, the open source component code is analyzed using a component family tracing method;

[0013] When analyzing the open source component code using the component family tracing method, the following steps are included:

[0014] According to the component list of the open source component code, by comparing the CPE involved in the vulnerability in the CVE vulnerability feature library, the CVE vulnerability list contained in the open source component code is identified, and based on the intermediate language expression after the open source component code is reversed, the CWE defect list contained in the open source component code is identified through similarity matching of the CWE defect model. In some embodiments of the present invention, when performing static analysis on the extracted feature vector, the following steps are included:

[0015] Obtaining a disassembled jump block, and processing the disassembled jump block to obtain instruction sequence data;

[0016] Acquire a control flow graph, and process the control flow graph to obtain an API call graph, wherein the API call graph includes loop starting point information of the API, loop type information, and character string information linking the API name;

[0017] Processing the API call graph by executing the instruction sequence data to generate a feature vector call relationship of the API;

[0018] The feature vector call relationship of the API is analyzed to obtain the first analysis result.

[0019] In some embodiments of the present invention, when dynamically analyzing the extracted feature vector, the following steps are included:

[0020] Importing the target program file into the sandbox for execution, and obtaining the behavior characteristics and network characteristic data generated during the execution of the target program file;

[0021] Acquire characteristic data of the PE file, the characteristic data including byte frequency, binary character frequency, import table and metadata;

[0022] Preprocessing the characteristic data of the PE file to generate a characteristic vector of the PE file;

[0023] The behavior characteristics, network characteristic data, and the characteristic vector calling relationship of the PE file are analyzed to obtain the second analysis result.

[0024] In some embodiments of the present invention, the first machine algorithm model is a deep neural network, and the first classification model is trained by the following method:

[0025] The expected value of the first classification model is obtained and a first threshold is set, and the first difference is calculated by the following formula:

[0026]

[0027] Among them, G A represents the first difference, k1 represents the first coefficient, N represents the number of the feature vectors in the first analysis result, i represents the i-th feature vector, g i represents the i-th output value of the first classification model obtained in real time, t i represents the i-th expected value of the first classification model;

[0028] When the first difference is greater than the first threshold, correction is performed using the following formula:

[0029]

[0030] Among them, G B represents the adjustment value of the first difference, k2 represents the second coefficient, N represents the number of the feature vectors in the first analysis result, M represents the number of expected values ​​of the first classification model, i represents the i-th feature vector, j represents the j-th expected value of the first classification model, and f ij represents the value of the jth element of the expected value of the i-th first classification model, n1 represents the first reference value, and n2 represents the second reference value.

[0031] In some embodiments of the present invention, the second machine algorithm model is a convolutional neural network, and the second classification model is trained by the following method:

[0032] The convolutional neural network receives the feature vector and creates a feature abstraction pool according to the feature vector;

[0033] The feature abstraction pool includes defects in the first code feature library.

[0034] In some embodiments of the present invention, when the first classification result and the second classification result are inconsistent, it also includes collecting new information from the first classification result and the second classification result, and inputting the new information into the first machine learning algorithm model or the second machine learning algorithm model for training.

[0035] According to a second aspect of the present invention, a third-party open source component risk analysis system based on software genes is provided, comprising:

[0036] A software gene information acquisition module, used to acquire software gene information, wherein the software gene information includes a first code feature library and a second code feature library, wherein the first code feature library is a malicious code feature library and the second code feature library is a legitimate code feature library;

[0037] A feature vector extraction module, used for extracting features from the software gene information to obtain a feature vector;

[0038] A static analysis module, used for performing static analysis on the extracted feature vector to obtain a first analysis result, and inputting the first analysis result into a first machine algorithm model for training to obtain a first classification model;

[0039] A dynamic analysis module, used for dynamically analyzing the extracted feature vector to obtain a second analysis result, and the second analysis result is input into a second machine algorithm model for training to obtain a second classification model;

[0040] A classification result acquisition module, used to input the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result;

[0041] A classification result fusion module is used to fuse the first classification result and the second classification result. When the first classification result and the second classification result are consistent, the first classification result and the second classification result are output as the final classification result; when the first classification result and the second classification result are inconsistent, the open source component code is analyzed using a component family tracing method.

[0042] According to a third aspect of the present invention, there is also provided an electronic device, comprising:

[0043] processor; and,

[0044] A memory, configured to store executable instructions of the processor;

[0045] The processor is configured to perform the method according to any one of the first aspects by executing the executable instructions.

[0046] According to a fourth aspect of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.

[0047] The beneficial effect of the present invention is as follows: the present invention combines the static analysis method and the dynamic analysis method, and respectively trains the first analysis result and the second analysis result using the first machine learning algorithm model and the second machine learning algorithm model, thereby fusing the obtained first classification result and the second classification result, and combining the two analysis methods to greatly improve the accuracy of the analysis results. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 A flowchart of the steps of a third-party open source component risk analysis method based on software genes in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of the structure of a third-party open source component risk analysis system based on software genes according to an embodiment of the present invention;

[0051] Figure 3 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0053] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation method.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0055] Figure 1 FIG. 1 is a flow chart of a third-party open source component risk analysis method based on software genes according to an exemplary embodiment of the present application. Figure 1 As shown, the method provided in this embodiment includes the following steps:

[0056] Step S101: Acquire software gene information, the software gene information includes a first code feature library and a second code feature library, the first code feature library is a malicious code feature library, and the second code feature library is a legitimate code feature library;

[0057] Step S102: extracting features from the software gene information to obtain feature vectors;

[0058] Step S103: statically analyzing the extracted feature vector to obtain a first analysis result, and inputting the first analysis result into a first machine algorithm model for training to obtain a first classification model;

[0059] Step S104: dynamically analyzing the extracted feature vector to obtain a second analysis result, and inputting the second analysis result into a second machine algorithm model for training to obtain a second classification model;

[0060] Step S105: inputting the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result;

[0061] Step S106: fusing the first and second classification results, and when the first classification result and the second classification result are consistent, outputting the first classification result and the second classification result as final classification results; when the first classification result and the second classification result are inconsistent, using a component family tracing method to analyze the open source component code;

[0062] Step S107: When the open source component code is analyzed using the component family tracing method, the following steps are included: according to the component list of the open source component code, by comparing the CPE involved in the vulnerability in the CVE vulnerability feature library, the CVE vulnerability list contained in the open source component code is identified; based on the intermediate language expression after the open source component code is reversed, the CWE defect list contained in the open source component code is identified through similarity matching of the CWE defect model.

[0063] In a specific implementation, when performing static analysis on the extracted feature vector, it includes:

[0064] Obtaining a disassembled jump block, and processing the disassembled jump block to obtain instruction sequence data;

[0065] Obtain a control flow graph, and process the control flow graph to obtain an API (Application Programming Interface) call graph, wherein the API call graph includes API loop starting point information, loop type information, and string information linking the API name;

[0066] Processing the API call graph by executing the instruction sequence data to generate a feature vector call relationship of the API;

[0067] The feature vector call relationship of the API is analyzed to obtain the first analysis result.

[0068] In a specific implementation, when dynamically analyzing the extracted feature vector, the following steps are included:

[0069] Importing the target program file into the sandbox for execution, and obtaining the behavior characteristics and network characteristic data generated during the execution of the target program file;

[0070] Acquiring characteristic data of a PE (Portable Executable) file, wherein the characteristic data includes byte frequency, binary character frequency, import table, and metadata;

[0071] Preprocessing the characteristic data of the PE file to generate a characteristic vector of the PE file;

[0072] The behavior characteristics, network characteristic data, and the characteristic vector calling relationship of the PE file are analyzed to obtain the second analysis result.

[0073] In a specific implementation, the first machine algorithm model is a deep neural network, and the first classification model is trained by the following method:

[0074] The expected value of the first classification model is obtained and a first threshold is set, and the first difference is calculated by the following formula:

[0075]

[0076] Among them, G A represents the first difference, k1 represents the first coefficient, N represents the number of the feature vectors in the first analysis result, i represents the i-th feature vector, g i represents the i-th output value of the first classification model obtained in real time, t i represents the i-th expected value of the first classification model;

[0077] When the first difference is greater than the first threshold, correction is performed using the following formula:

[0078]

[0079] Among them, G B represents the adjustment value of the first difference, k2 represents the second coefficient, N represents the number of the feature vectors in the first analysis result, M represents the number of expected values ​​of the first classification model, i represents the i-th feature vector, j represents the j-th expected value of the first classification model, and f ij represents the value of the jth element of the expected value of the i-th first classification model, n1 represents the first reference value, and n2 represents the second reference value.

[0080] In a specific implementation, the second machine algorithm model is a convolutional neural network, and the second classification face model is trained by the following method:

[0081] The convolutional neural network receives the feature vector and creates a feature abstraction pool according to the feature vector;

[0082] The feature abstraction pool includes defects in the first code feature library.

[0083] In a specific implementation, when the component family tracing method is used to analyze the open source component code, the following steps are included: according to the component list of the open source component code, by comparing the CPE (Common Platform Enumeration) involved in the vulnerability in the CVE (Common Vulnerabilities & Exposure) vulnerability feature library, the CVE vulnerability list contained in the open source component code is identified; based on the intermediate language expression after the open source component code is reversed, the CWE (Common Weakness Enumeration) defect model is matched through similarity, and the CWE defect list contained in the open source component code is identified.

[0084] In a specific implementation, when the first classification result and the second classification result are inconsistent, it also includes collecting new information from the first classification result and the second classification result, and inputting the new information into the first machine learning algorithm model or the second machine learning algorithm model for training.

[0085] Figure 2 FIG. 1 is a schematic diagram of a third-party open source component risk analysis system based on software genes according to an exemplary embodiment of the present application. Figure 2 As shown, the third-party open source component risk analysis system based on software genes provided in this embodiment includes:

[0086] The software gene information acquisition module 31 is used to acquire software gene information, wherein the software gene information includes a first code feature library and a second code feature library, wherein the first code feature library is a malicious code feature library and the second code feature library is a legitimate code feature library;

[0087] A feature vector extraction module 32 is used to extract features from the software gene information to obtain a feature vector;

[0088] The static analysis module 33 is used to perform static analysis on the extracted feature vector to obtain a first analysis result, and input the first analysis result into a first machine algorithm model for training to obtain a first classification model;

[0089] A dynamic analysis module 34 is used to dynamically analyze the extracted feature vector to obtain a second analysis result, and input the second analysis result into a second machine algorithm model for training to obtain a second classification model;

[0090] A classification result acquisition module 35, used to input the open source component code into the first classification result and the second classification model respectively to obtain the first classification result and the second classification result;

[0091] The classification result fusion module 36 is used to fuse the first classification result and the second classification result. When the first classification result and the second classification result are consistent, the first classification result and the second classification result are output as the final classification result. When the first classification result and the second classification result are inconsistent, the open source component code is analyzed using a component family tracing method.

[0092] Figure 3 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. Figure 3 As shown, an electronic device 400 provided in this embodiment includes: a processor 401 and a memory 402; wherein:

[0093] The memory 402 is used to store computer programs, and the memory may also be a flash memory.

[0094] The processor 401 is used to execute the execution instructions stored in the memory to implement each step in the above method. For details, please refer to the relevant description in the above method embodiment.

[0095] Optionally, the memory 402 may be independent or integrated with the processor 401 .

[0096] When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include:

[0097] The bus 403 is used to connect the memory 402 and the processor 401 .

[0098] This embodiment further provides a readable storage medium, in which a computer program is stored. When at least one processor of an electronic device executes the computer program, the electronic device executes the methods provided in the above-mentioned various implementation modes.

[0099] This embodiment also provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device implements the methods provided in the above various embodiments.

[0100] The software gene-based third-party open source component risk analysis method and system provided in the embodiment of the present application combine the static analysis method and the dynamic analysis method, and respectively train the first analysis result and the second analysis result using the first machine learning algorithm model and the second machine learning algorithm model, thereby fusing the obtained first classification result and the second classification result, and combining the two analysis methods to greatly improve the accuracy of the classification results.

[0101] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0102] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD ROM, or any other form of storage medium known in the art.

[0103] Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A third-party open source component risk analysis method based on software genes, characterized in that: The following steps are involved: Acquire software gene information, the software gene information including a first code feature library and a second code feature library, the first code feature library is a malicious code feature library, and the second code feature library is a legitimate code feature library; Extracting features from the software gene information to obtain feature vectors; Performing static analysis on the extracted feature vector to obtain a first analysis result, and inputting the first analysis result into a first machine algorithm model for training to obtain a first classification model; Dynamically analyzing the extracted feature vector to obtain a second analysis result, and inputting the second analysis result into a second machine algorithm model for training to obtain a second classification model; Inputting the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result; The first classification result and the second classification result are combined, and when the first classification result and the second classification result are consistent, the first classification result and the second classification result are output as the final classification result; When the first classification result and the second classification result are inconsistent, using a component family tracing method to analyze the open source component code; When analyzing the open source component code using the component family tracing method, the following steps are included: According to the component list of the open source component code, by comparing the CPE involved in the vulnerability in the CVE vulnerability signature library, the CVE vulnerability list contained in the open source component code is identified; based on the intermediate language expression after the open source component code is reversed, the CWE defect list contained in the open source component code is identified through similarity matching of the CWE defect model; The first machine algorithm model is a deep neural network, and the first classification model is trained by the following method: The expected value of the first classification model is obtained and a first threshold is set, and the first difference is calculated by the following formula: Among them, G A represents the first difference, k1 represents the first coefficient, N represents the number of the feature vectors in the first analysis result, i represents the i-th feature vector, g i represents the i-th output value of the first classification model obtained in real time, t i represents the i-th expected value of the first classification model; When the first difference is greater than the first threshold, correction is performed using the following formula: Among them, G B represents the adjustment value of the first difference, k2 represents the second coefficient, N represents the number of the feature vectors in the first analysis result, M represents the number of expected values ​​of the first classification model, i represents the i-th feature vector, j represents the j-th expected value of the first classification model, and f ij represents the value of the jth element of the expected value of the i-th first classification model, n1 represents the first reference value, and n2 represents the second reference value.

2. The software gene-based third-party open source component risk analysis method according to claim 1, characterized in that: When performing static analysis on the extracted feature vector, the following steps are included: Obtaining a disassembled jump block, and processing the disassembled jump block to obtain instruction sequence data; Acquire a control flow graph, and process the control flow graph to obtain an API call graph, wherein the API call graph includes loop starting point information of the API, loop type information, and character string information linking the API name; Processing the API call graph by executing the instruction sequence data to generate a feature vector call relationship of the API; The feature vector call relationship of the API is analyzed to obtain the first analysis result.

3. The software gene-based third-party open source component risk analysis method according to claim 1, characterized in that: When dynamically analyzing the extracted feature vector, the following steps are included: Importing the target program file into the sandbox for execution, and obtaining the behavior characteristics and network characteristic data generated during the execution of the target program file; Acquire characteristic data of the PE file, the characteristic data including byte frequency, binary character frequency, import table and metadata; Preprocessing the characteristic data of the PE file to generate a characteristic vector of the PE file; The behavior characteristics, network characteristic data, and the characteristic vector calling relationship of the PE file are analyzed to obtain the second analysis result.

4. The software gene-based third-party open source component risk analysis method according to claim 1, characterized in that: The second machine algorithm model is a convolutional neural network, and the second classification model is trained by the following method: The convolutional neural network receives the feature vector and creates a feature abstraction pool according to the feature vector; The feature abstraction pool includes defects in the first code feature library.

5. The software gene-based third-party open source component risk analysis method according to claim 1, characterized in that: When the first classification result and the second classification result are inconsistent, it also includes collecting new information from the first classification result and the second classification result, and inputting the new information into the first machine learning algorithm model or the second machine learning algorithm model for training.

6. A third-party open source component risk analysis system based on software genes, characterized in that: include: A software gene information acquisition module, used to acquire software gene information, wherein the software gene information includes a first code feature library and a second code feature library, wherein the first code feature library is a malicious code feature library and the second code feature library is a legitimate code feature library; A feature vector extraction module, used for extracting features from the software gene information to obtain a feature vector; A static analysis module, used for performing static analysis on the extracted feature vector to obtain a first analysis result, and inputting the first analysis result into a first machine algorithm model for training to obtain a first classification model; A dynamic analysis module, used for dynamically analyzing the extracted feature vector to obtain a second analysis result, and the second analysis result is input into a second machine algorithm model for training to obtain a second classification model; A classification result acquisition module, used to input the open source component code into the first classification model and the second classification model respectively to obtain a first classification result and a second classification result; A classification result fusion module, used to fuse the first classification result and the second classification result, and when the first classification result and the second classification result are consistent, output the first classification result and the second classification result as the final classification result; When the first classification result and the second classification result are inconsistent, using a component family tracing method to analyze the open source component code; The first machine algorithm model is a deep neural network, and the first classification model is trained by the following method: The expected value of the first classification model is obtained and a first threshold is set, and the first difference is calculated by the following formula: Among them, G A represents the first difference, k1 represents the first coefficient, N represents the number of the feature vectors in the first analysis result, i represents the i-th feature vector, g i represents the i-th output value of the first classification model obtained in real time, t i represents the i-th expected value of the first classification model; When the first difference is greater than the first threshold, correction is performed using the following formula: Among them, G B represents the adjustment value of the first difference, k2 represents the second coefficient, N represents the number of the feature vectors in the first analysis result, M represents the number of expected values ​​of the first classification model, i represents the i-th feature vector, j represents the j-th expected value of the first classification model, and f ij represents the value of the jth element of the expected value of the i-th first classification model, n1 represents the first reference value, and n2 represents the second reference value.

7. An electronic device, characterized in that: include: processor; as well as, A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.