Open source component scoring method and system, and computer storage medium

By obtaining and scoring multiple aspects of data, the comprehensive score of open source components is calculated, which solves the problem of insufficient scoring in the existing technology, improves the credibility of the scoring results, and helps users better choose open source components.

CN118535834APending Publication Date: 2024-08-23STATE GRID ELECTRONIC COMMERCE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410693934.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing open source component scoring methods are not comprehensive enough. They mainly only score from the number of vulnerabilities and fail to fully consider other influencing factors.

Method used

By obtaining the basic information of the open source components to be tested and similar components, including data on frequency of use, method stability, security vulnerabilities, functional vulnerabilities, performance, update frequency and license type, individual scores are made and calculated based on multi-dimensional user evaluation data. The weight of each factor is used to comprehensively score the component to be tested.

Benefits of technology

It achieves a more comprehensive three-dimensional scoring of open source components, improves the credibility of scoring results, and helps users make more informed decisions when choosing open source components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535834A
    Figure CN118535834A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a scoring method for open source components. The scoring method comprises the steps that basic information of any similar open source component with the function similar to that of a to-be-tested open source component is acquired; independently scoring each factor influencing the score of the open source component to be tested through the basic information; obtaining multi-dimensional user evaluation data of each factor, the multi-dimensional user evaluation data comprises a total evaluation number xi < total > = {x1 < total >, x2 < total >, x3 < total >,..., x7 < total > of each factor and a difference evaluation number xi < difference > = {x1 < difference >, x2 < difference >, x3 < difference >,..., x7 < difference > of each factor; calculating a weight ki = {k1, k2, k3,..., k7} corresponding to a score ai = {a1, a2, a3,..., a7} of each factor according to the multi-dimensional user evaluation data, and obtaining a comprehensive score s of the open source component to be tested according to the weight ki of each factor and the score ai of the individual score of each factor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a scoring method and system for open source components, and a computer storage medium. Background Art

[0002] Open source components refer to software that is distributed and used under specified conditions and declared to be available for commercial applications through an open source license, making it a popular choice in commercial and non-commercial software projects.

[0003] However, there are usually many open source components with the same or similar functions in the open source community. This is because there are various technologies and frameworks in software development, and different developers will choose different technologies to implement similar functions, which will produce multiple open source components with similar functions but different implementation methods. The uneven open source components make it extremely difficult for users to choose.

[0004] Currently, the method for users to score similar open source components is to score a certain influencing factor of the open source component to be tested separately, thereby obtaining a score for the open source component to be tested. For example, in the patent application with publication number CN117407885A and patent name "Risk Assessment Method, Device, Electronic Device and Computer Storage Medium", the patent only scores the open source components based on the number of vulnerabilities of the open source components, which is obviously not comprehensive enough. Summary of the invention

[0005] The technical problem to be solved by the present invention is to solve the problem that the current method for scoring open source components is not comprehensive enough.

[0006] In order to solve the above technical problems, the present invention provides a scoring method for open source components, characterized in that the scoring method includes:

[0007] Obtain basic information of any similar open source component with similar functions to the open source component to be tested, the basic information including the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the monthly update number of the open source component to be tested, the average monthly update number of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source component;

[0008] Each factor affecting the score of the open source component to be tested is scored separately using the basic information, and the score of the factor scored separately is a i Including the score a1 for frequency of use, the score a2 for method stability, the score a3 for security vulnerabilities, the score a4 for functional vulnerabilities, the score a5 for performance, the score a6 for update frequency, and the score a7 for license type;

[0009] Obtain multidimensional user evaluation data for each of the factors, wherein the multidimensional user evaluation data includes the total number of evaluations x for each of the factors i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总} and the number of negative reviews x for each of the factors i差 ={x 1差 , x 2差 , x 3差 , ..., x 7差}:

[0010] Calculate the score a of each factor according to the multi-dimensional user evaluation data i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is

[0011]

[0012] According to the weight k of each factor of the open source component to be tested i and the score a of each factor of the open source component to be tested i A comprehensive score s of the open source component to be tested is obtained.

[0013] Furthermore, the scoring formula for the frequency of use score a1 is:

[0014]

[0015] Among them, Q is the network introduction amount of the open source component to be tested; R is the average introduction amount of similar open source components; P is the network score of the open source component to be tested; S is the full score of the network score; M is the introduction amount of the open source component to be tested by a certain company; N is the introduction amount of the similar open source component by a certain company; α+β+θ=100, 20≤α=β≤30.

[0016] Furthermore, the scoring formula for calculating the stability score a2 of the method is:

[0017]

[0018] Wherein, c is the number of times the open source component to be tested is run, and d is the deviation of the open source component to be tested being run c times.

[0019] Furthermore, the score calculation formula of the security vulnerability score a3 is:

[0020]

[0021] Among them, the number of high-risk security vulnerabilities is U1, the number of medium-risk security vulnerabilities is V1, the number of low-risk security vulnerabilities is W1, and the number of warning-level security vulnerabilities is X1.

[0022] Furthermore, the score calculation formula of the functional vulnerability score a4 is:

[0023]

[0024] Among them, the number of high-risk functional vulnerabilities is U2, the number of medium-risk functional vulnerabilities is V2, the number of low-risk functional vulnerabilities is W2, and the number of warning-level functional vulnerabilities is X2.

[0025] Furthermore, the score calculation formula of the performance score a5 is:

[0026]

[0027] Among them, t is the response time under a certain number of concurrent users.

[0028] Furthermore, the score calculation formula of the update frequency score a6 is:

[0029]

[0030] Among them, e is the monthly update number of the open source component to be tested, and f is the average monthly update number of similar open source software.

[0031] Furthermore, the score calculation formula for the score a7 of the license type is:

[0032]

[0033] Wherein, m is the number of license types of the open source component to be tested, and n is the total number of license types of similar open source components.

[0034] According to another aspect of the present invention, there is provided an open source component scoring system, comprising:

[0035] an information acquisition module, for acquiring basic information of any similar open source component with similar functions to the open source component to be tested, wherein the basic information includes the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the monthly update number of the open source component to be tested, the average monthly update number of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source components;

[0036] A component calculation module is used to separately score each factor that affects the score of the open source component to be tested based on the basic information, and the score a of the factor for separate scoring is i Including the score a1 for frequency of use, the score a2 for method stability, the score a3 for security vulnerabilities, the score a4 for functional vulnerabilities, the score a5 for performance, the score a6 for update frequency, and the score a7 for license type;

[0037] A data collection module is used to obtain multi-dimensional user evaluation data of each factor, wherein the multi-dimensional user evaluation data includes the total number of evaluations of each factor x i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总} and the number of negative reviews x for each of the factors i差 ={x 1差 , x 2差 , x 3差 , ..., x 7差}:

[0038] A weight determination module calculates the score a of each factor based on the multi-dimensional user evaluation data. i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is

[0039]

[0040] A comprehensive calculation module calculates the weight k of each factor of the open source component to be tested. iand the score a of each factor of the open source component to be tested i A comprehensive score s of the open source component to be tested is obtained.

[0041] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any open source component method in the embodiments of the present invention.

[0042] Compared with the prior art, the embodiment of the present invention has the following beneficial effects:

[0043] The embodiment of the present invention scores each factor of the open source component to be tested separately, and then sets different weights according to the importance of the seven factors, and then processes the separate scores of each factor and the weights corresponding to each factor to obtain a comprehensive score of the open source component to be tested. This method scores the open source component to be tested from seven aspects of the open source component to be tested. Compared with the current method of scoring a certain aspect of the open source component to obtain the scoring result of the open source component, this method is more comprehensive and three-dimensional. Since more factors affecting the scoring of the open source component to be tested are considered, the credibility of the scoring result of the open source component to be tested is also higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of a scoring method for open source components provided by an embodiment of the present invention;

[0045] Figure 2 is a schematic diagram of a scoring system for open source components provided by an embodiment of the present invention;

[0046] Figure 3 is a block diagram of an electronic device for implementing an embodiment of the present invention.

[0047] In the figure, 10, information acquisition module; 20, component calculation module; 30, data collection module; 40, weight determination module; 50, comprehensive calculation module; 600, electronic device; 601, calculation unit; 602, ROM; 603, RAM; 604, bus; 605, I / O interface; 606, input unit; 607, output unit; 608, storage unit; 609, communication unit. DETAILED DESCRIPTION

[0048] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present invention. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0049] like Figure 1 As shown, in an optional embodiment of the present invention, the scoring method includes:

[0050] S100, obtaining basic information of any similar open source component with similar functions to the open source component to be tested, the basic information including the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the number of monthly updates of the open source component to be tested, the average number of monthly updates of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source component; S200, scoring each factor affecting the score of the open source component to be tested separately through the basic information, and the score of the factor scored separately is a i Including the score a1 of the frequency of use, the score a2 of the method stability, the score a3 of the security vulnerability, the score a4 of the functional vulnerability, the score a5 of the performance, the score a6 of the update frequency, and the score a7 of the license type; S300, obtaining the multidimensional user evaluation data of each of the factors, the multidimensional user evaluation data including the total number of evaluations of each of the factors x i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总} and the number of negative reviews x for each of the factors i差 ={x 1差 , x 2差 , x 3差 , ..., x 7差}: S400, calculating the score a of each factor according to the multi-dimensional user evaluation data i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is

[0051]

[0052] S500: according to the weight k of each factor of the open source component to be tested i and the score a of each factor of the open source component to be testedi A comprehensive score s of the open source component to be tested is obtained.

[0053] Among them, the frequency of use score a1 refers to the frequency with which the open source component is used by users or adopted by other software projects, which reflects the popularity of the component in actual applications or the degree to which it is widely adopted. The method stability score refers to the stability of the methods or functions provided in the open source component. This includes the reliability, stability and fault tolerance of the method, which reflects the extent to which developers can rely on the functions provided by the component without unexpected behavior or crashes when using the component. The security vulnerability score refers to the extent to which the open source component has security vulnerabilities. This includes the number of known vulnerabilities, the severity of the vulnerabilities, and the degree to which these vulnerabilities are repaired in a timely manner. Security vulnerabilities refer to software defects or loopholes that can be exploited by hackers or cause damage to the system.

[0054] Specifically, in S300, multi-dimensional user evaluation data of each of the factors is obtained, which can be obtained through user feedback, community discussions, online forums, etc. For example, user feedback: set up a user feedback channel to collect user evaluation information on each factor of the open source component to be tested. These evaluation information include user evaluations on frequency of use, security vulnerabilities, performance, etc. The user evaluation information collected through the above channels is used to count the total number of evaluations and the number of negative reviews for each factor, which is used as an important reference for evaluation data. These data are used to calculate the weight of each factor, and then derive the comprehensive score of the open source component to be tested.

[0055] In S500, the score corresponding to each factor is multiplied by the corresponding weight and then summed up to obtain the result of the comprehensive score. When calculating the comprehensive score of the open source component to be tested, the comprehensive score calculated based on the weight of each factor and the score of the individual score can reflect the overall quality level of the open source component to be tested, which can help users make decisions when selecting open source components and make a preliminary estimate of their beneficial effects.

[0056] In an embodiment of the present invention, each factor of the open source component to be tested is scored separately, and then different weights are set according to the importance of each factor, and then the separate scores of each factor and the weights corresponding to each factor are processed to obtain a comprehensive score of the open source component to be tested. This method scores the open source component to be tested from seven aspects of the open source component to be tested. Compared with the current method of scoring a certain aspect of the open source component to obtain the scoring result of the open source component, this method is more comprehensive and three-dimensional. Since more factors that affect the scoring of the open source component to be tested are considered, the credibility of the scoring result of the open source component to be tested is also higher.

[0057] In an optional embodiment of the present invention, the scoring calculation formula of the usage frequency score a1 is:

[0058]

[0059] Among them, Q is the network introduction amount of the open source component to be tested; R is the average introduction amount of similar open source components; P is the network score of the open source component to be tested; S is the full score of the network score; M is the introduction amount of the open source component to be tested by a certain company; N is the introduction amount of the similar open source component by a certain company; α+β+θ=100, 20≤α=β≤30.

[0060] The amount of open source components introduced can be obtained through open source software packages, such as npm (Node.js package manager), PyPI (Python package index) and Maven (Java build tool), which provide statistics on the amount of software package downloads or installations. The network rating of open source components can obtain the scores of technical websites or professional blogs that evaluate open source components.

[0061] In the embodiment of the present invention, the scoring calculation formula for the frequency of use score a1 takes into account the actual introduction amount of the component to be tested in the network and the network score by considering the network introduction amount and the network score, which can better reflect the popularity and popularity of the open source component to be tested in actual applications. The embodiment of the present invention also compares the introduction amount and network score of the open source component to be tested with similar components, which can better evaluate the performance of the open source component to be tested in similar functional areas. The scoring calculation formula of the embodiment of the invention can more comprehensively evaluate the score of the frequency of use performance of the open source component, provide more reference information for developers or enterprises when selecting and adopting open source components, and enhance the objectivity and accuracy of the frequency of use score a1.

[0062] In an optional embodiment of the present invention, the scoring calculation formula of the method stability score a2 is:

[0063]

[0064] Wherein, c is the number of times the open source component to be tested is run, and d is the deviation of the open source component to be tested being run c times.

[0065] Specifically, the number of runs of the open source component under test usually refers to the number of times the component is executed or called in the actual usage environment. The number of deviations in the runs refers to the differences in performance or behavior of the open source component under test during multiple runs. This difference may be caused by changes in the environment, different input data, or other factors. By quantifying this difference, the stability and reliability of the open source component can be evaluated.

[0066] In the embodiment of the present invention, the scoring calculation formula objectively evaluates the stability of the open source component to be tested by calculating the number of runs and the deviation of a certain number of runs, and provides a basis for scoring the stability of the open source component to be tested.

[0067] In an optional embodiment of the present invention, the scoring calculation formula of the security vulnerability score a3 is:

[0068]

[0069] Among them, the number of high-risk security vulnerabilities is U1, the number of medium-risk security vulnerabilities is V1, the number of low-risk security vulnerabilities is W1, and the number of warning-level security vulnerabilities is X1.

[0070] Specifically, security vulnerabilities refer to vulnerabilities or defects in software security that can be exploited by malicious users to gain unauthorized access or perform unauthorized operations, thereby threatening the security of the system. Security vulnerabilities may lead to security issues such as data leakage, denial of service attacks, and remote code execution. Therefore, scoring security vulnerabilities is crucial for evaluating open source components. High-risk security vulnerabilities refer to serious vulnerabilities or defects in software that may lead to serious security issues, such as remote code execution, unauthorized access to sensitive information, and denial of service attacks. These vulnerabilities may be exploited by malicious users to cause serious damage or intrusion to the system. Medium-risk security vulnerabilities refer to some vulnerabilities or defects in software that, although not as serious as high-risk vulnerabilities, may still pose a certain degree of threat to the security of the system. These vulnerabilities may lead to security risks such as data leakage, unauthorized access, and authentication issues. Low-risk security vulnerabilities refer to some vulnerabilities or defects in software that have a relatively mild impact and will not pose a serious threat to the security of the system. These vulnerabilities may include some interface problems, imperfect functions, low-priority errors, etc. Although low-risk vulnerabilities do not lead to serious security issues, they still need to be recorded, tracked, and fixed to ensure the integrity and stability of the software. Warning-level security vulnerabilities refer to some relatively minor problems or suggestions in the software, which usually do not cause actual security threats, but may affect the usability, performance or other aspects of the system. These vulnerabilities may include some suggestive warnings or suggestions, such as irregular code style, incomplete documentation, optimization suggestions, etc. Among them, the scoring coefficient of the security vulnerability reflects the severity and impact of the vulnerability. High-risk vulnerabilities have higher weight coefficients, while warning-level vulnerabilities have the lowest weight coefficient. This scoring calculation formula can help decision makers better understand the security risks of open source components and take appropriate measures to reduce these risks.

[0071] In the embodiment of the present invention, the scoring calculation formula makes the security assessment of open source components more comprehensive by considering different levels of security vulnerabilities. This method not only focuses on serious vulnerabilities, but also considers medium, minor and warning level vulnerabilities, thereby providing a more comprehensive assessment of the overall security situation. This security vulnerability scoring calculation formula can also help decision makers better understand the security risks of open source components and take appropriate measures to reduce these risks.

[0072] In an optional embodiment of the present invention, the scoring calculation formula of the score a4 of the functional vulnerability is:

[0073]

[0074] Among them, the number of high-risk functional vulnerabilities is U2, the number of medium-risk functional vulnerabilities is V2, the number of low-risk functional vulnerabilities is W2, and the number of warning-level functional vulnerabilities is X2.

[0075] Specifically, functional vulnerabilities refer to defects or problems related to functions in software or systems. These problems may cause the software to fail to perform its designed functions as expected, or to behave inconsistently or incorrectly in specific situations. Functional vulnerabilities may include, but are not limited to, the following situations: Functional failure: a function does not work properly or cannot be performed in the designed way. Functional imperfection: a function is defective or incomplete, resulting in it not meeting the needs or expectations of users. Functional misoperation: a function may cause users to misoperate or misunderstand due to design or implementation problems. Functional conflict: there may be conflicts between different functions, resulting in some functions not working properly at the same time. Functional consistency: the consistency problem of functions in different environments or platforms leads to poor user experience or the inability to use functions properly. The working process of this functional scoring is as follows: first, a comprehensive review of open source components is required to identify all functional vulnerabilities in them. This includes high-risk, medium-risk, low-risk, and prompt-level functional vulnerabilities. This step usually involves code review, automated scanning tools, and possible manual testing; then, the identified functional vulnerabilities are classified and rated. According to the degree of harm of the vulnerability, each vulnerability is assigned a harm level (high, medium, low, prompt); finally, a score calculation is performed to obtain a separate score for the functional vulnerability.

[0076] In an embodiment of the present invention, the functional vulnerability scoring calculation formula obtains the functional vulnerability score a4 by introducing functional vulnerabilities of different levels. The functional vulnerability scoring calculation formula grades the functional characteristics of the open source components, thereby increasing the reliability of the functional vulnerability score a4.

[0077] In an optional embodiment of the present invention, the scoring calculation formula of the performance score a5 is:

[0078]

[0079] Among them, t is the response time under a certain number of concurrent users.

[0080] Specifically, the response time under a certain amount of user concurrency refers to the time it takes for the system to process a certain number of user requests at the same time. This number is usually defined based on the system design and expected load. In concurrent requests, the system needs to handle the situation where multiple requests arrive at the same time and ensure that a response is provided to each request within a reasonable time. Therefore, the response time under a certain amount of user concurrency is one of the important indicators for measuring system performance.

[0081] In an embodiment of the present invention, the scoring calculation formula for the performance score a5 introduces the response time under a certain amount of user concurrency. The scoring calculation formula takes into account the concurrent requests that may occur in actual application scenarios, and can more accurately evaluate the performance of open source components in real environments, thereby improving the accuracy of performance scoring of open source components.

[0082] In an optional embodiment of the present invention, the score calculation formula of the update frequency score a6 is:

[0083]

[0084] Among them, e is the monthly update number of the open source component to be tested, and f is the average monthly update number of similar open source software.

[0085] Specifically, the scoring calculation formula performs a ratio analysis through the monthly update frequency e of the open source component to be tested and the average monthly update frequency f of similar open source software. This analysis can reflect the update frequency of the open source component to be tested in the update frequency of open source components with similar functions. By calculating the ratio of e and f, it can be concluded whether the update frequency of the open source component to be tested is higher, equal to, or lower than the average level relative to that of similar components.

[0086] In the embodiment of the present invention, the scoring calculation formula objectively evaluates the update activity of the open source component to be tested.

[0087] In an optional embodiment of the present invention, the score calculation formula of the license type score a7 is:

[0088]

[0089] Wherein, m is the number of license types of the open source component to be tested, and n is the total number of license types of similar open source components.

[0090] Specifically, the number of license types of the open source component to be tested refers to the number of different license types adopted by the open source component to be tested, and the total number of license types of similar open source components refers to the total number of license types covered in other open source components that have similar functions or characteristics to the open source component to be tested.

[0091] In an embodiment of the present invention, the scoring calculation formula takes into account the number of license types of the open source component to be tested and the total number of license types of similar components, which can provide a comparison benchmark for measuring the relative diversity of license types adopted by the component to be tested. The scoring calculation formula objectively evaluates the score a7 of the license type of the open source component to be tested.

[0092] like Figure 2 As shown, in another aspect of the present invention, an open source component scoring system is provided, comprising:

[0093] The information acquisition module 10 is used to obtain basic information of any similar open source component with similar functions to the open source component to be tested, wherein the basic information includes the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the monthly update number of the open source component to be tested, the average monthly update number of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source components;

[0094] The component calculation module 20 is used to separately score each factor that affects the score of the open source component to be tested based on the basic information, and the score a of the factor that is scored separately is i Including the score a1 for frequency of use, the score a2 for method stability, the score a3 for security vulnerabilities, the score a4 for functional vulnerabilities, the score a5 for performance, the score a6 for update frequency, and the score a7 for license type;

[0095] The data collection module 30 is used to obtain multi-dimensional user evaluation data of each factor, wherein the multi-dimensional user evaluation data includes the total number of evaluations of each factor x i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总} and the number of negative reviews x for each of the factors i差={x 1差 , x 2差 , x 3差 , ..., x 7差}:

[0096] The weight determination module 40 calculates the score a of each factor according to the multi-dimensional user evaluation data. i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is

[0097]

[0098] The comprehensive calculation module 50 calculates the weight k of each factor of the open source component to be tested. i and the score a of each factor of the open source component to be tested i A comprehensive score s of the open source component to be tested is obtained.

[0099] Among them, the frequency of use score a1 refers to the frequency with which the open source component is used by users or adopted by other software projects, which reflects the popularity of the component in actual applications or the degree to which it is widely adopted. The method stability score refers to the stability of the methods or functions provided in the open source component. This includes the reliability, stability and fault tolerance of the method, which reflects the extent to which developers can rely on the functions provided by the component without unexpected behavior or crashes when using the component. The security vulnerability score refers to the extent to which the open source component has security vulnerabilities. This includes the number of known vulnerabilities, the severity of the vulnerabilities, and the degree to which these vulnerabilities are repaired in a timely manner. Security vulnerabilities refer to software defects or loopholes that can be exploited by hackers or cause damage to the system.

[0100] like Figure 2 As shown, in an embodiment of the present invention, the embodiment of the present invention scores each factor of the open source component to be tested separately, and then sets different weights according to the importance of each factor, and then processes the separate scores of each factor and the weights corresponding to each factor to obtain a comprehensive score of the open source component to be tested. This scoring system scores the open source component to be tested from seven aspects of the open source component to be tested. Compared with the current scoring system that scores a certain aspect of the open source component to obtain the scoring result of the open source component, this scoring system is more comprehensive and three-dimensional. Since more factors that affect the scoring of the open source component to be tested are considered, the credibility of the scoring result of the open source component to be tested is also higher.

[0101] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0102] Figure 3 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0103] like Figure 3 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0104] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0105] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a power generation prediction method. For example, in some embodiments, a power generation prediction method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of a power generation prediction method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a power generation prediction method in any other appropriate manner (e.g., by means of firmware).

[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0107] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0108] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0110] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0111] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A scoring method for open source components, characterized in that: The scoring method includes: Obtain basic information of any similar open source component with similar functions to the open source component to be tested, the basic information including the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the monthly update number of the open source component to be tested, the average monthly update number of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source component; Each factor affecting the score of the open source component to be tested is scored separately using the basic information, and the score of the factor scored separately is a i Including the score a1 for usage frequency, the score a2 for method stability, the score a3 for security vulnerability, the score a4 for functional vulnerability, the score a5 for performance, the score a6 for update frequency, and the score a7 for license type; Obtain multidimensional user evaluation data for each of the factors, wherein the multidimensional user evaluation data includes the total number of evaluations x for each of the factors i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总 } and the number of negative reviews x for each of the factors i差 ={x 1差 , x 2差 , x 3差 , ..., x 7差 }: Calculate the score a of each factor according to the multi-dimensional user evaluation data i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is According to the weight k of each factor of the open source component to be tested i and the score a of each factor of the open source component to be tested i A comprehensive score s of the open source component to be tested is obtained.

2. The scoring method according to claim 1, characterized in that: The scoring calculation formula for the frequency of use score a1 is: Among them, Q is the network introduction amount of the open source component to be tested; R is the average introduction amount of similar open source components; P is the network score of the open source component to be tested; S is the full score of the network score; M is the introduction amount of the open source component to be tested by a certain company; N is the introduction amount of the similar open source component by a certain company; α+β+θ=100, 20≤α=β≤30.

3. The scoring method according to claim 1, characterized in that: The scoring formula for the stability score a2 of the method is: Wherein, c is the number of times the open source component to be tested is run, and d is the deviation of the open source component to be tested being run c times.

4. The scoring method according to claim 1, characterized in that: The scoring calculation formula for the security vulnerability score a3 is: Among them, the number of high-risk security vulnerabilities is U1, the number of medium-risk security vulnerabilities is V1, the number of low-risk security vulnerabilities is W1, and the number of warning-level security vulnerabilities is X1.

5. The scoring method according to claim 1, characterized in that: The score calculation formula for the functional vulnerability score a4 is: Among them, the number of high-risk functional vulnerabilities is U2, the number of medium-risk functional vulnerabilities is V2, the number of low-risk functional vulnerabilities is W2, and the number of warning-level functional vulnerabilities is X2.

6. The scoring method according to claim 1, characterized in that: The score calculation formula of the performance score a5 is: Among them, t is the response time under a certain number of concurrent users.

7. The scoring method according to claim 1, characterized in that: The score calculation formula of the update frequency score a6 is: Among them, e is the monthly update number of the open source component to be tested, and f is the average monthly update number of similar open source software.

8. The scoring method according to claim 1, characterized in that: The score calculation formula for the license type score a7 is: Wherein, m is the number of license types of the open source component to be tested, and n is the total number of license types of similar open source components.

9. An open source component rating system, characterized in that: The system comprises: an information acquisition module, for acquiring basic information of any similar open source component with similar functions to the open source component to be tested, wherein the basic information includes the average introduction amount of the similar open source component, the network introduction amount of the open source component to be tested, the network score of the open source component to be tested, the full score of the network score, the network score of the open source component to be tested, the introduction amount of the open source component to be tested by a certain company, the introduction amount of the similar open source component by a certain company, the number of operations of the open source component to be tested, the deviation of the operation of the open source component to be tested, the number of high-risk security vulnerabilities, the number of medium-risk security vulnerabilities, the number of low-risk security vulnerabilities, the number of warning-level security vulnerabilities, the number of high-risk functional vulnerabilities, the number of medium-risk functional vulnerabilities, the number of low-risk functional vulnerabilities, the number of warning-level functional vulnerabilities, the response time under a certain number of concurrent users, the monthly update number of the open source component to be tested, the average monthly update number of similar open source software, the number of license types of the open source component to be tested, and the total number of license types of the similar open source components; A component calculation module is used to separately score each factor that affects the score of the open source component to be tested based on the basic information, and the score a of the factor for separate scoring is i Including the score a1 for usage frequency, the score a2 for method stability, the score a3 for security vulnerability, the score a4 for functional vulnerability, the score a5 for performance, the score a6 for update frequency, and the score a7 for license type; A data collection module is used to obtain multi-dimensional user evaluation data of each factor, wherein the multi-dimensional user evaluation data includes the total number of evaluations of each factor x i总 ={x 1总 , x 2总 , x 3总 , ..., x 7总 } and the number of negative reviews x for each of the factors i差 ={x 1差 , x 2差 , x 3差 , ..., x 7差 }: A weight determination module calculates the score a of each factor based on the multi-dimensional user evaluation data. i = weight k corresponding to {a1, a2, a3, ..., a7} i ={k1, k2, k3, ..., k7}, the weight k i The formula is A comprehensive calculation module calculates the weight k of each factor of the open source component to be tested. i and the score a of each factor of the open source component to be tested i A comprehensive score s of the open source component to be tested is obtained.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

Citation Information

Cited By

  • Component scheduling method and device, electronic equipment and storage medium

    CN119622711A

  • Component scheduling method and apparatus, electronic device, and storage medium

    CN119622711B