Dynamic scoring method and system for open source component, and computer storage medium
By obtaining and calculating the optimal data of similar open source components, the scoring method solves the problem of inaccurate scoring of open source components and improves the accuracy and credibility of the scoring.
Patent Information
- Application Number
- CN202410693936.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology's scoring method for open source components is not accurate enough, making it difficult to accurately compare and score components with similar functions.
By obtaining the information data of several similar open source components with similar functions to the open source component to be tested, the optimal data is selected for scoring, and the scores of frequency of use, method stability, security vulnerabilities, functional vulnerabilities, performance, update frequency and license type are calculated. The weights are determined based on these scores and a comprehensive score is calculated.
It improves the accuracy and transparency of open source component scoring, makes the scoring results more convincing and universal, and enhances the credibility of the scoring process.
Smart Images

Figure CN118535835A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a dynamic 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 technology stacks to implement similar functions, which will result in 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] At present, the method for users to score similar open source components is usually to compare and analyze the performance of the open source component to be tested with the overall performance of similar open source components. This scoring method will cause analysis difficulties due to the large amount of calculation, and because most open source components are developed and cannot be used in practice, the scoring obtained by comparing the overall performance of the open source component to be tested with similar open source components is inaccurate. 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 accurate enough.
[0006] In order to solve the above technical problems, the present invention provides a dynamic scoring method for open source components, the scoring method comprising:
[0007] Obtain information data of several similar open source components with similar functions to the open source component to be tested, select the best information data of the similar open source components as the best data, the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, and the number of high-risk security vulnerabilities of the least open source component among the similar open source components. the number of warning-level security vulnerabilities of the least open source component among the similar open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, the shortest response time of an open source component among the similar open source components, the number of updates of the most updated open source component among the similar open source software, and the number of license types of the open source component with the largest total number of license types among the similar open source components;
[0008] According to the optimal data, the score a1 of the usage frequency, 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 of the open source component to be tested are calculated separately;
[0009] According to the importance of the score a1 of the usage frequency, 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, respectively determine the weight k = {k1, k2, k3, ..., k7} corresponding to each score a = {a1, a2, a3, ..., a7};
[0010] A comprehensive score s of the open source component to be tested is obtained according to the weight k and the score a, and a calculation formula of the comprehensive score s is s=a1*k1+a2*k2+a3*k3+…a7*k7.
[0011] Furthermore, the calculation formula of the usage frequency score a1 is:
[0012]
[0013] Where a1 is the score of the usage frequency, Q is the network introduction amount of the open source component to be tested, and Q 优 is the optimal introduction amount of the similar open source components, P is the network score of the open source component to be tested, and P优 is the optimal score of the similar open source components, M is the amount of open source components introduced by a company, and M 优 is the optimal amount of similar open source components that a company should introduce, α+β+θ=100, 25≤α=β≤30.
[0014] Furthermore, the calculation formula of the stability score a2 of the method is:
[0015]
[0016] Among them, a2 is the score of the frequency of use, d 优 is the optimal deviation of the similar open source component, and d is the number of deviations generated by the open source component to be tested in a certain number of runs.
[0017] Furthermore, the calculation formula of the security vulnerability score a3 is:
[0018]
[0019] Where a3 is the score of the security vulnerability, U1 is the number of high-risk security vulnerabilities of the open source component to be tested, V1 is the number of medium-risk security vulnerabilities of the open source component to be tested, W1 is the number of low-risk security vulnerabilities of the open source component to be tested, X1 is the number of warning-level security vulnerabilities of the open source component to be tested, and U 1优 is the number of high-risk security vulnerabilities of the open source component with the least number among the similar open source components, V 1优 is the number of medium-risk security vulnerabilities of the open source component with the least number of similar open source components, W 1优 is the number of low-risk security vulnerabilities of the open source component with the least number of similar open source components, X 1优 The number of warning-level security vulnerabilities of the open source component with the least number among the similar open source components.
[0020] Furthermore, the calculation formula of the score a4 of the functional vulnerability is:
[0021]
[0022] Where a4 is the score of the functional vulnerability, U2 is the number of high-risk functional vulnerabilities of the open source component to be tested, V2 is the number of medium-risk functional vulnerabilities of the open source component to be tested, W2 is the number of low-risk functional vulnerabilities of the open source component to be tested, X2 is the number of warning-level functional vulnerabilities of the open source component to be tested, and U 2优 is the number of high-risk functional vulnerabilities of the open source component with the least number among the similar open source components, V 2优 is the number of medium-risk functional vulnerabilities of the open source component with the least number of similar open source components, W2优 X is the number of low-risk functional vulnerabilities of the open source component with the least number of similar open source components. 2优 The number of warning-level functional vulnerabilities of the open source component with the least number of similar open source components.
[0023] Furthermore, the calculation formula of the performance score a5 is:
[0024]
[0025] Where a5 is the score of the performance score, t is the response time of the open source component to be tested, and t 优 The shortest response time of an open source component among the similar open source components.
[0026] Furthermore, the calculation formula of the update frequency score a6 is:
[0027]
[0028] Among them, a6 is the score of update frequency, e is the number of updates of the open source component to be tested, and e 优 The update count of the open source component with the most updates in the similar open source software.
[0029] Furthermore, the calculation formula of the score a7 of the license type is:
[0030]
[0031] Where a7 is the score of the license type, m is the number of license types of the open source component to be tested, and m 优 The number of license types of the open source component with the largest total number of license types of the similar open source components.
[0032] According to another aspect of the present invention, the present invention provides a dynamic scoring system for open source components, comprising:
[0033] An information screening module obtains information data of several similar open source components with similar functions to the open source component to be tested, selects the best information data of the similar open source components as the best data, and the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, and the number of high-risk security vulnerabilities of the least open source component among the similar open source components. The number of warning-level security vulnerabilities of the least open source component among the open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, the shortest response time of an open source component among the similar open source components, the number of updates of the most updated open source component among the similar open source software, and the number of license types of the open source component with the largest total number of license types among the similar open source components;
[0034] A component calculation module, which separately calculates the score a1 of the use frequency of the open source component to be tested, 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 according to the optimal data;
[0035] A weight determination module, according to the importance of the usage frequency score a1, the method stability score a2, the security vulnerability score a3, the functional vulnerability score a4, the performance score a5, the update frequency score a6, and the license type score a7, respectively determines the weight k = {k1, k2, k3, ..., k7} corresponding to each score a = {a1, a2, a3, ..., a7};
[0036] A comprehensive calculation module obtains a comprehensive score s of the open source component to be tested according to the weight k and the score a, and a calculation formula of the comprehensive score s is s=a1*k1+a2*k2+a3*k3+...a7*k7.
[0037] 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 dynamic scoring method for similar open source components in an embodiment of the present invention.
[0038] Compared with the prior art, the dynamic scoring method for open source components in the embodiment of the present invention has the following beneficial effects:
[0039] The embodiment of the present invention introduces the best data of similar open source components and uses the best data among similar open source components as reference samples. These data represent the characteristics and quality standards that are widely accepted and recognized in similar open source components. Introducing the best data of similar open source components can enhance the transparency and credibility of the scoring process of the open source components to be tested, make the scoring basis more referenceable and universal, and make the scoring results more convincing, thereby improving the accuracy of the scoring of the open source components to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of a dynamic scoring method for open source components provided by an embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of a dynamic scoring system for open source components provided by an embodiment of the present invention;
[0042] Figure 3 is a block diagram of an electronic device for implementing an embodiment of the present invention.
[0043] In the figure, 10, information screening module; 20, component calculation module; 30, weight determination module; 40, 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
[0044] 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 recognized 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, the description of well-known functions and structures is omitted in the following description.
[0045] like Figure 1 As shown, in an optional embodiment of the present invention, the scoring method includes:
[0046] S1, obtaining information data of several similar open source components with similar functions to the open source component to be tested, selecting the best information data of the similar open source components as the best data, wherein the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, the number of warning-level security vulnerabilities of the least open source component among the similar open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, and the number of warning-level functional vulnerabilities of the least open source component among the similar open source components. The shortest response time of an open source component, the number of updates of the most updated open source component among the similar open source software, and the number of license types of the open source component with the largest total number of license types among the similar open source components; S2, based on the optimal data, the score a1 of the frequency of use of the open source component to be tested, 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 are calculated separately; S3, based on 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 The importance of the stability score a2, the security vulnerability score a3, the functional vulnerability score a4, the performance score a5, the update frequency score a6, and the license type score a7 are determined, and the weight k = {k1, k2, k3, ... k7} corresponding to each score a = {a1, a2, a3, ..., a7} is determined respectively; S4, according to the weight k and the score a, the comprehensive score s of the open source component to be tested is obtained, and the calculation formula of the comprehensive score s is s = a1*k1+a2*k2+a3*k3+ ... a7*k7.
[0047] 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.
[0048] Specifically, in step S2, the screening of optimal data is determined based on its function, purpose, and other characteristics. For example, in the factor of introduction quantity that affects the score of the open source component to be tested, the optimal data included is the maximum introduction quantity of similar open source components; in the factor of security vulnerability that affects the score of the open source component to be tested, the optimal data included is the minimum number of vulnerabilities in similar open source components; in the factor of update count that affects the score of the open source component to be tested, the optimal data included is the maximum number of updates of similar open source components.
[0049] Specifically, in S2, the weights corresponding to the factors are determined according to the importance of the factors, and the importance can be determined by analyzing known data or historical records. For example, the importance of each factor can be estimated by analyzing data such as past problem reports, security vulnerability repair speed, and user feedback, so as to determine the weights; subjective analysis can also be used, that is, the weights are determined through team discussions or expert opinions, and the factors are discussed and voted on, and then the weights are determined based on the voting results.
[0050] The embodiment of the present invention introduces the best data of similar open source components and uses the highest-scoring data among similar open source components as reference samples. These data represent the features and quality standards that are widely accepted and recognized among similar open source components. Introducing the best data of similar open source components can enhance the transparency and credibility of the scoring process of the open source components to be tested, make the scoring basis more referenceable and universal, and make the scoring results more convincing, thereby improving the accuracy of the scoring of the open source components to be tested.
[0051] In an optional embodiment of the present invention, the calculation formula of the usage frequency score a1 is:
[0052]
[0053] Where a1 is the score of the frequency of use, Q is the network introduction amount of the open source component to be tested, and Q 优is the optimal introduction amount of the similar open source components, P is the network score of the open source component to be tested, and P 优 is the optimal score of the similar open source components, M is the amount of open source components introduced by a company, and M 优 is the optimal amount of similar open source components that a company should introduce, α+β+θ=100, 25≤α=β≤30.
[0054] Among them, Q 优 The optimal amount of similar open source components introduced refers to the amount introduced the most times in a series of similar open source components. 优 The ratio of Q to Q can be used to measure the performance of the open source component under test in terms of the amount of introduction. 优 When the ratio is close to 1, the score of a1 is higher. 优 The best score for the similar open source component refers to the open source component with the highest score among a series of similar open source components. 优 The ratio of P to P can be used to measure the performance of the open source component under test in terms of scoring. 优 When the ratio is close to 1, the score of a1 is higher.
[0055] In the embodiment of the present invention, the frequency score a1 scoring calculation formula is calculated by 优 , P 优 、M 优 The size of a1 is determined by the ratio of the citations of the open source component to the similar open source component to be tested. This method introduces the optimal indicators of similar open source components regarding the introduction volume and network score, and uses them as the basis of a1. This method makes the score more objective.
[0056] In an optional embodiment of the present invention, the calculation formula of the method stability score a2 is:
[0057]
[0058] Among them, a2 is the score of the frequency of use, d 优 is the optimal deviation of the similar open source component, and d is the number of deviations generated by the open source component to be tested in a certain number of runs.
[0059] Among them, d 优 The optimal deviation of the similar open source components refers to the number of times that the minimum deviation is generated in a certain number of runs of a series of similar open source components within a certain period of time.
[0060] 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.
[0061] In the embodiment of the present invention, by introducing d 优 As a2 scoring consideration, it can reduce the risk caused by poor performance of components at runtime. This method helps to improve the accuracy of open source component performance evaluation and provide users with a more reliable reference for selecting appropriate open source components.
[0062] In an optional embodiment of the present invention, the calculation formula of the security vulnerability score a3 is:
[0063]
[0064] Where a3 is the score of the security vulnerability, U1 is the number of high-risk security vulnerabilities of the open source component to be tested, V1 is the number of medium-risk security vulnerabilities of the open source component to be tested, W1 is the number of low-risk security vulnerabilities of the open source component to be tested, X1 is the number of warning-level security vulnerabilities of the open source component to be tested, and U 1优 is the number of high-risk security vulnerabilities of the open source component with the least number among the similar open source components, V 1优 is the number of medium-risk security vulnerabilities of the open source component with the least number of similar open source components, W 1优 is the number of low-risk security vulnerabilities of the open source component with the least number of similar open source components, X 1优 The number of warning-level security vulnerabilities of the open source component with the least number among the similar open source components.
[0065] Specifically, security vulnerabilities refer to vulnerabilities or defects in software security that can be exploited by malicious users to obtain 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 cause 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.
[0066] In the embodiment of the present invention, a3 generated by comparing the security vulnerability of the open source component to be tested with the minimum security vulnerability in similar open source components can make the scoring more vivid and accurate.
[0067] In one embodiment of the present invention, the calculation formula of the performance score a5 is:
[0068]
[0069] Where a5 is the score of the performance score, t is the response time of the open source component to be tested, and t 优The shortest response time of an open source component among the similar open source components. The shortest response time of similar open source components refers to selecting a component with the shortest response time among similar open source components as a benchmark for performance evaluation. This means that the component can respond to requests at the fastest speed under certain conditions (such as load, network environment, etc.). By comparing the actual response time of the open source component to be tested with this shortest response time, the performance of the open source component to be tested can be better evaluated.
[0070] In the embodiment of the present invention, by considering the optimal performance indicators of similar open source components and the actual performance of the open source component to be tested, the performance of the open source component to be tested can be more comprehensively evaluated. This method can help users more accurately select open source components that meet their needs and improve the accuracy of scoring.
[0071] In an optional embodiment of the present invention, the calculation formula of the update frequency score a6 is:
[0072]
[0073] Among them, a6 is the score of update frequency, e is the number of updates of the open source component to be tested, and e 优 The update count of the open source component with the most updates in the similar open source software.
[0074] Specifically, this method uses objective data to evaluate update frequency, avoiding the influence of subjective factors; this method compares the update frequency of the open source component to be tested with the update frequency of similar open source software, which can better evaluate the relative level of its update frequency. This method can be dynamically adjusted according to the update status of the open source component to ensure that the scoring results are always up-to-date and accurate.
[0075] In an embodiment of the present invention, the update times of the most updated open source components in similar open source software are introduced. This method can better measure the update frequency of the component to be tested relative to the update of similar components, thereby providing a more accurate scoring result.
[0076] In an optional embodiment of the invention, the calculation formula of the score a7 of the license type is:
[0077]
[0078] Where a7 is the score of the license type, m is the number of license types of the open source component to be tested, and m 优 The number of license types of the open source component with the largest total number of license types of the similar open source components.
[0079] In an embodiment of the present invention, the number of license types of the open source component to be tested is compared with the number of license types of the open source component with the largest number of license types among similar open source components, and a corresponding scoring score is given according to the size of the ratio. This method provides a comparison benchmark for the scoring of the license type and increases the objectivity of the scoring.
[0080] like Figure 2 As shown, in one embodiment of the present invention, a dynamic scoring system for open source components is provided, including:
[0081] 10. An information screening module, obtaining information data of several similar open source components with similar functions to the open source component to be tested, selecting the best information data of the similar open source components as the best data, wherein the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, the number of warning-level security vulnerabilities of the least open source component among the similar open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, and the number of the most 20. The component calculation module calculates the score a1 of the use frequency of the open source component to be tested, 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 according to the optimal data; 30. The weight determination module calculates the score a1 of the use frequency, 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 according to the optimal data; 31. The weight determination module calculates the score a1 of the use frequency, 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 according to the optimal data; The importance of the qualitative score a2, the security vulnerability score a3, the functional vulnerability score a4, the performance score a5, the update frequency score a6, and the license type score a7 are determined, and the weight k = {k1, k2, k3, ... k7} corresponding to each score a = {a1, a2, a3, ..., a7} is determined respectively; 40 a comprehensive calculation module is used to obtain the comprehensive score s of the open source component to be tested according to the weight k and the score a, and the calculation formula of the comprehensive score s is s = a1*k1+a2*k2+a3*k3+ ... a7*k7.
[0082] In an embodiment of the present invention, the best data of similar open source components is introduced, and the data with the highest scores among similar open source components is used as a reference sample. These data represent the characteristics and quality standards that are widely accepted and recognized in similar open source components. The introduction of the best data of similar open source components can enhance the transparency and credibility of the scoring process of the open source components to be tested, make the scoring basis more referenceable and universal, and make the scoring results more convincing, thereby improving the accuracy of the scoring of the open source components to be tested.
[0083] 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.
[0084] The figure shows a schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, 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.
[0085] 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.
[0086] 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.
[0087] 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).
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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).
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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 dynamic scoring method for open source components, characterized in that: The scoring method includes: Obtain information data of several similar open source components with similar functions to the open source component to be tested, select the best information data of the similar open source components as the best data, the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, and the number of high-risk security vulnerabilities of the least open source component among the similar open source components. the number of warning-level security vulnerabilities of the least open source component among the similar open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, the shortest response time of an open source component among the similar open source components, the number of updates of the most updated open source component among the similar open source software, and the number of license types of the open source component with the largest total number of license types among the similar open source components; According to the optimal data, the score a1 of the usage frequency, 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 of the open source component to be tested are calculated separately; According to the importance of the score a1 of the usage frequency, 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, respectively determine the weight k = {k1, k2, k3, ..., k7} corresponding to each score a = {a1, a2, a3, ..., a7}; A comprehensive score s of the open source component to be tested is obtained according to the weight k and the score a, and a calculation formula of the comprehensive score s is s=a1*k1+a2*k2+a3*k3+…a7*k7.
2. The scoring method according to claim 1, characterized in that: The calculation formula of the frequency of use score a1 is: Where a1 is the score of the frequency of use, Q is the network introduction amount of the open source component to be tested, and Q 优 is the optimal introduction amount of the similar open source components, P is the network score of the open source component to be tested, and P 优 is the optimal score of the similar open source components, M is the amount of open source components introduced by a company, and M 优 is the optimal amount of similar open source components that a company should introduce, α+β+θ=100, 25≤α=β≤30.
3. The scoring method according to claim 1, characterized in that: The calculation formula for the stability score a2 of the method is: Among them, a2 is the score of the frequency of use, d 优 is the optimal deviation of the similar open source component, and d is the number of deviations generated by the open source component to be tested in a certain number of runs.
4. The scoring method according to claim 1, characterized in that: The calculation formula of the security vulnerability score a3 is: Where a3 is the score of the security vulnerability, U1 is the number of high-risk security vulnerabilities of the open source component to be tested, V1 is the number of medium-risk security vulnerabilities of the open source component to be tested, W1 is the number of low-risk security vulnerabilities of the open source component to be tested, X1 is the number of warning-level security vulnerabilities of the open source component to be tested, and U 1优 is the number of high-risk security vulnerabilities of the open source component with the least number among the similar open source components, V 1优 is the number of medium-risk security vulnerabilities of the open source component with the least number of similar open source components, W 1优 is the number of low-risk security vulnerabilities of the open source component with the least number of similar open source components, X 1优 The number of warning-level security vulnerabilities of the open source component with the least number among the similar open source components.
5. The scoring method according to claim 1, characterized in that: The calculation formula of the score a4 of the functional vulnerability is: Where a4 is the score of the functional vulnerability, U2 is the number of high-risk functional vulnerabilities of the open source component to be tested, V2 is the number of medium-risk functional vulnerabilities of the open source component to be tested, W2 is the number of low-risk functional vulnerabilities of the open source component to be tested, X2 is the number of warning-level functional vulnerabilities of the open source component to be tested, and U 2优 is the number of high-risk functional vulnerabilities of the open source component with the least number among the similar open source components, V 2优 is the number of medium-risk functional vulnerabilities of the open source component with the least number of similar open source components, W 2优 X is the number of low-risk functional vulnerabilities of the open source component with the least number of similar open source components. 2优 The number of warning-level functional vulnerabilities of the open source component with the least number of similar open source components.
6. The scoring method according to claim 1, characterized in that: The calculation formula of the performance score a5 is: Where a5 is the score of the performance score, t is the response time of the open source component to be tested, and t 优 The shortest response time of an open source component among the similar open source components.
7. The scoring method according to claim 1, characterized in that: The calculation formula of the score a6 of the update frequency is: Among them, a6 is the score of update frequency, e is the number of updates of the open source component to be tested, and e 优 The update count of the open source component with the most updates in the similar open source software.
8. The scoring method according to claim 1, characterized in that: The calculation formula of the score a7 of the license type is: Where a7 is the score of the license type, m is the number of license types of the open source component to be tested, and m 优 The number of license types of the open source component with the largest total number of license types of the similar open source components.
9. A dynamic scoring system for open source components, characterized in that: include: An information screening module obtains information data of several similar open source components with similar functions to the open source component to be tested, selects the best information data of the similar open source components as the best data, and the best data includes the best introduction amount of the similar open source components, the best score of the similar open source components, the best introduction amount of the similar open source components by a certain company, the best deviation of the similar open source components, the number of high-risk security vulnerabilities of the least open source component among the similar open source components, the number of medium-risk security vulnerabilities of the least open source component among the similar open source components, the number of low-risk security vulnerabilities of the least open source component among the similar open source components, and the number of high-risk security vulnerabilities of the least open source component among the similar open source components. The number of warning-level security vulnerabilities of the least open source component among the open source components, the number of high-risk functional vulnerabilities of the least open source component among the similar open source components, the number of medium-risk functional vulnerabilities of the least open source component among the similar open source components, the number of low-risk functional vulnerabilities of the least open source component among the similar open source components, the number of warning-level functional vulnerabilities of the least open source component among the similar open source components, the shortest response time of an open source component among the similar open source components, the number of updates of the most updated open source component among the similar open source software, and the number of license types of the open source component with the largest total number of license types among the similar open source components; A component calculation module, which separately calculates the score a1 of the use frequency of the open source component to be tested, 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 according to the optimal data; A weight determination module, according to the importance of the usage frequency score a1, the method stability score a2, the security vulnerability score a3, the functional vulnerability score a4, the performance score a5, the update frequency score a6, and the license type score a7, respectively determines the weight k = {k1, k2, k3, ..., k7} corresponding to each score a = {a1, a2, a3, ..., a7}; A comprehensive calculation module is used to obtain a comprehensive score s of the open source component to be tested according to the weight k and the score a, and the calculation formula of the comprehensive score s is s=a1*k1+a2*k2+a3*k3+...a7*k7.
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
Open source component selection method and system based on post-maintenance support
CN119829017A
