A component stability detection method, device, equipment and storage medium

By combining the merge request data and dependencies, the stability parameters of the component are determined, which solves the problem that component stability detection is not comprehensive enough in the prior art, improves the accuracy of the detection results, and can better identify the stability status of the component. Reduce the occurrence of design problems and bugs.

CN114816977BActive Publication Date: 2024-12-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110129369.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-29
Publication Date
2024-12-24
Estimated Expiration
2041-01-29

AI Technical Summary

Technical Problem

The prior art is too one-sided in component stability detection, and the dependency relationship is not enough to fully reflect the stability of the component, resulting in inaccurate detection results.

Method used

By determining the first stability parameter of the target component based on the merge request data, and determining the second stability parameter in combination with its dependency, the stability detection result of the component is finally determined, and the stability state of the component is judged using ratios and thresholds.

Benefits of technology

It realizes more comprehensive component stability detection, improves the accuracy of detection results, and can more accurately identify the stability status of components, reducing the occurrence of design problems and subsequent bugs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816977B_ABST
    Figure CN114816977B_ABST
Patent Text Reader

Abstract

The present disclosure provides a component stability detection method, apparatus, device and storage medium, the method comprising: first, determining a first stability parameter of a target component based on merge request data, and determining a second stability parameter of the target component based on the dependency relationship corresponding to the target component, and then determining a stability detection result of the target component based on the first stability parameter and the second stability parameter. It can be seen that the embodiment of the present disclosure can not only determine the stability parameter of the target component from the dimension of the merge request, but also statically analyze the stability parameter of the target component from the dimension of the dependency relationship, and finally obtain the stability detection result of the target component. The embodiment of the present disclosure can detect the stability of the component more comprehensively, and improve the accuracy of the stability detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a component stability detection method, device, equipment and storage medium. Background Art

[0002] A component refers to a code module used to implement functional requirements in project development. Usually, component testing refers to testing the stability of the component.

[0003] like Figure 1 As shown in the figure, since component Y depends on three components, once any of the three components is updated, component Y that depends on that component also needs to be retested to ensure the normal operation of component Y. Generally, we believe that component Y that depends on many components and no other components depend on it is relatively unstable. Figure 2 As shown in the figure, since component X is dependent on three components and component X does not depend on other components, we believe that component X is relatively stable.

[0004] However, the above method of determining the stability of components based only on the dependencies between components is relatively one-sided. How to more comprehensively implement stability detection of components and obtain more accurate detection results is a technical problem that urgently needs to be solved. Summary of the invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a component stability detection method, device, equipment and storage medium, which can realize a more comprehensive detection of component stability and improve the accuracy of stability detection results.

[0006] In a first aspect, the present disclosure provides a method for detecting component stability, the method comprising:

[0007] Determining a first stability parameter of a target component based on merge request data; wherein the merge request data includes merge requests corresponding to a plurality of versions of the target software, respectively, and the merge request is a request for processing a component in the target software;

[0008] and, determining a second stability parameter of the target component based on the dependency relationship corresponding to the target component;

[0009] Based on the first stability parameter and the second stability parameter, a stability detection result of the target component is determined.

[0010] Optionally, determining a first stability parameter of a target component based on the merge request data includes:

[0011] By analyzing the merge request data, a ratio of the number of merge requests that include the target component to the total number of merge requests is determined as a first stability parameter of the target component.

[0012] Optionally, determining the stability detection result of the target component based on the first stability parameter and the second stability parameter includes:

[0013] If it is determined that the first stability parameter is greater than a preset first threshold and the second stability parameter is not greater than a preset second threshold, or if it is determined that the first stability parameter is not greater than the preset first threshold and the second stability parameter is greater than the preset second threshold, it is determined that the target component is in an unstable state.

[0014] Optionally, the method further includes:

[0015] By analyzing the merge request data, determining a probability that multiple components including the target component exist in the same merge request;

[0016] If it is determined that the probability is greater than a preset third threshold, it is determined that the plurality of components are in an unstable state.

[0017] Optionally, determining the second stability parameter of the target component based on the dependency relationship corresponding to the target component includes:

[0018] Based on the dependency relationship corresponding to the target component, determine the number of incoming dependencies and the number of outgoing dependencies of the target component;

[0019] The sum of the number of incoming dependencies and the number of outgoing dependencies is calculated, and a ratio of the number of outgoing dependencies to the sum is determined as a second stability parameter of the target component.

[0020] Optionally, determining the second stability parameter of the target component based on the dependency relationship corresponding to the target component includes:

[0021] Based on the dependency relationship corresponding to the target component, determine the number of incoming dependencies and the number of outgoing dependencies of the target component;

[0022] Determining the number of incoming dependencies and the number of outgoing dependencies as a second stability parameter of the target component;

[0023] Accordingly, determining the detection result of the target component based on the first stability parameter and the second stability parameter includes:

[0024] If it is determined that the number of incoming dependencies of the target component is greater than a preset fourth threshold, the number of outgoing dependencies is greater than a preset fifth threshold, and the first stability parameter is greater than a preset first threshold, it is determined that the target component is in an unstable state.

[0025] In a second aspect, the present disclosure further provides a device for detecting component stability, the device comprising:

[0026] A first determination module is used to determine a first stability parameter of a target component based on merge request data; wherein the merge request data includes merge requests corresponding to multiple versions of the target software, and the merge request is a request for processing a component in the target software;

[0027] A second determination module, configured to determine a second stability parameter of the target component based on the dependency relationship corresponding to the target component;

[0028] The third determination module is used to determine the stability detection result of the target component based on the first stability parameter and the second stability parameter.

[0029] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.

[0030] In a fourth aspect, the present disclosure provides a device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0031] In a fifth aspect, the present disclosure provides a computer program product, characterized in that the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.

[0032] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0033] The disclosed embodiment provides a method for detecting component stability. First, a first stability parameter of a target component is determined based on merge request data, and a second stability parameter of the target component is determined based on the dependency relationship corresponding to the target component. Then, the stability detection result of the target component is determined based on the first stability parameter and the second stability parameter. It can be seen that the disclosed embodiment can not only determine the stability parameter of the target component from the dimension of the merge request, but also statically analyze the stability parameter of the target component from the dimension of the dependency relationship, and finally obtain the stability detection result of the target component. The disclosed embodiment can detect the stability of the component more comprehensively, and improve the accuracy of the detection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

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

[0036] Figure 1 A schematic diagram of component dependency;

[0037] Figure 2 A diagram showing another type of component dependency relationship;

[0038] Figure 3 A flowchart of a component stability detection method provided by an embodiment of the present disclosure;

[0039] Figure 4 A schematic diagram of the structure of a component stability detection device provided in an embodiment of the present disclosure;

[0040] Figure 5 A schematic diagram of the structure of a component stability detection device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0043] The stability of components is one of the quality evaluation indicators of development projects. How to detect the stability of components has become a technical problem that needs to be solved in the field of project development.

[0044] To this end, the disclosed embodiment provides a method for detecting component stability. First, a first stability parameter of a target component is determined based on merge request data, and a second stability parameter of the target component is determined based on the dependency relationship corresponding to the target component. Then, based on the first stability parameter and the second stability parameter, a stability detection result of the target component is determined. It can be seen that the disclosed embodiment can not only determine the stability parameter of the target component from the dimension of the merge request, but also statically analyze the stability parameter of the target component from the dimension of the dependency relationship, and finally obtain the stability detection result of the target component. The disclosed embodiment can detect the stability of the component more comprehensively, and improve the accuracy of the detection result.

[0045] Based on this, the present disclosure provides a method for detecting component stability. Figure 3 , is a flow chart of a component stability detection method provided by an embodiment of the present disclosure, the method comprising:

[0046] S301: Determine a first stability parameter of a target component based on merge request data.

[0047] The merge request data includes merge requests corresponding to multiple versions of the target software, respectively. The merge request is a request for processing a component in the target software.

[0048] In the disclosed embodiments, the same software usually includes multiple versions, each of which has a corresponding merge request (English: Merge request, abbreviated: MR). The merge request is used to request updates and adjustments to components.

[0049] In the disclosed embodiment, merge request data is formed by using merge requests corresponding to multiple versions of the target software, which is used to determine the first stability parameter of the target component, wherein the target component belongs to the target software.

[0050] In actual applications, if the number of component changes is high, it means that the split granularity of the component may be too large, or the dependency relationship corresponding to the component may be unreasonable. For this reason, the embodiment of the present disclosure can determine the first stable relationship of the target component based on the merge request data, which is used to determine the stability of the target component from the component change situation.

[0051] In an optional implementation, by analyzing the merge request data, a ratio of the number of merge requests that include the target component to the total number of merge requests is determined as a first stability parameter of the target component.

[0052] Among them, the number of merge requests that include the target component can indicate the number of changes to the target component, and the ratio of the number of merge requests that include the target component to the total number of merge requests can indicate the probability of change of the target component, which can reflect the stability of the target component to a certain extent. To this end, the embodiment of the present disclosure can use the ratio of the number of merge requests that include the target component to the total number of merge requests as the first stability parameter of the target component.

[0053] S302: Determine a second stability parameter of the target component based on the dependency relationship corresponding to the target component.

[0054] In the disclosed embodiment, the dependency relationships corresponding to the target component are predetermined, wherein the dependency relationships corresponding to the target component include the dependency relationships of other components on the target component and the dependency relationships of the target component on other components.

[0055] In the disclosed embodiment, the stability of the target component may be statically analyzed based on the dependency relationship corresponding to the target component to obtain a second stability parameter of the target component.

[0056] In an optional implementation, first, based on the dependency relationship corresponding to the target component, the number of incoming dependencies and the number of outgoing dependencies of the target component are determined; then, the sum of the number of incoming dependencies and the number of outgoing dependencies is calculated, and the ratio of the number of outgoing dependencies to the sum is determined as the second stability parameter of the target component.

[0057] Among them, Fan-in is used to indicate the inbound dependency of the target component, that is, how many components depend on the target component, and Fan-out is used to indicate the outbound dependency of the target component, that is, how many other components the target component depends on. I is used to indicate the second stability parameter of the target component, and I belongs to the range of [0, 1]. I = 0 indicates that the target component has the highest stability, and I = 1 indicates that the target component has the lowest stability.

[0058] Specifically, the second stability parameter of the target component may be calculated using the formula: I=Fan-out / (Fan-out+Fan-in).

[0059] In addition, the number of inbound dependencies and outbound dependencies of the target component can also reflect the stability of the target component. For example, the larger the number of outbound dependencies of the target component, the more other components the target component depends on, and thus the lower the stability of the target component.

[0060] In another optional implementation, first, based on the dependency relationship corresponding to the target component, the number of incoming dependencies and the number of outgoing dependencies of the target component are determined; then, the number of incoming dependencies and the number of outgoing dependencies are determined as the second stability parameter of the target component.

[0061] The embodiment of the present disclosure does not limit the execution order of S301 and S302.

[0062] S303: Determine a stability detection result of the target component based on the first stability parameter and the second stability parameter.

[0063] In the embodiment of the present disclosure, the stability detection result of the target component can be determined based on the first stability parameter and the second stability parameter.

[0064] In practical applications, the smaller the first stability parameter of the target component is, the higher the stability of the target component is. In theory, the smaller the second stability parameter of the target component is. In other words, the first stability parameter and the second stability parameter of the target component are proportional. In other words, if the first stability parameter and the second stability parameter of the target component are proportional, it means that the target component may be in a stable state. If the first stability parameter and the second stability parameter of the target component are inversely proportional, it means that there may be problems in the design of the target component, which needs to be dealt with.

[0065] In an optional implementation, if it is determined that the first stability parameter is greater than a preset first threshold and the second stability parameter is not greater than a preset second threshold, or if it is determined that the first stability parameter is not greater than the preset first threshold and the second stability parameter is greater than the preset second threshold, then it is determined that the target component is in an unstable state; otherwise, it is determined that the target component is in a stable state and no processing is required.

[0066] In addition, in the embodiment of the present disclosure, the stability detection result of the target component can be determined based only on the first stability parameter or the second stability parameter.

[0067] In an optional implementation, the merge request data is analyzed to determine the ratio of the number of merge requests that include the target component to the total number of merge requests, which is used as the first stability parameter of the target component. If it is determined that the first stability parameter is greater than a preset first threshold, it means that the stability of the target component is insufficient, and the target component is determined to be in a stable state. Subsequently, the stability of the target component can be processed.

[0068] In another optional implementation, based on the dependency relationship corresponding to the target component, the number of incoming dependencies and the number of outgoing dependencies of the target component are determined; then, the sum of the number of incoming dependencies and the number of outgoing dependencies is calculated, and the ratio of the number of outgoing dependencies to the sum is determined as the second stability parameter of the target component. If it is determined that the second stability parameter is greater than the preset second threshold, it means that the stability of the target component is insufficient, and the target component is determined to be in an unstable state, so that the stability of the target component can be processed subsequently.

[0069] In another optional implementation, based on the dependency relationship corresponding to the target component, the number of incoming dependencies and the number of outgoing dependencies of the target component are determined; then, after the number of incoming dependencies and the number of outgoing dependencies are determined as the second stability parameter of the target component, if it is determined that the number of incoming dependencies of the target component is greater than a preset fourth threshold, and the number of outgoing dependencies is greater than a preset fifth threshold, then it means that the stability of the target component is insufficient, and it can be determined that the target component is in an unstable state.

[0070] It is worth noting that the preset first threshold, the preset second threshold, the preset third threshold, the preset fourth threshold and the preset fifth threshold in the embodiment of the present disclosure can all be set based on stability requirements.

[0071] In the component stability detection method provided by the embodiment of the present disclosure, first, the first stability parameter of the target component is determined based on the merge request data, and the second stability parameter of the target component is determined based on the dependency relationship corresponding to the target component. Then, based on the first stability parameter and the second stability parameter, the stability detection result of the target component is determined. It can be seen that the embodiment of the present disclosure can not only determine the stability parameter of the target component from the dimension of the merge request, but also statically analyze the stability parameter of the target component from the dimension of the dependency relationship, and finally obtain the stability detection result of the target component. The embodiment of the present disclosure can detect the stability of the component more comprehensively, and improve the accuracy of the detection result.

[0072] In actual applications, the higher the probability that two components appear in the same merge request, the more it indicates that there may be unreasonable problems in the design of the two components. For example, the two components can be designed as one component, that is, the components are disassembled too finely.

[0073] To this end, based on the above-mentioned embodiments, the embodiments of the present disclosure can also determine components in an unstable state based on merge request data, maximize the discovery of components with problems, so as to promptly resolve component design problems and reduce the number of bugs caused by design problems of component dependencies after subsequent products are launched.

[0074] Specifically, the embodiment of the present disclosure can also determine the probability that multiple components including the target component exist in the same merge request by analyzing the merge request data. If it is determined that the probability is greater than a preset third threshold, it is determined that the multiple components are in an unstable state.

[0075] Specifically, first determine the number of merge requests in which multiple components containing the target component exist simultaneously, and the total number of merge requests, and then calculate the ratio of the two as the above-mentioned probability. If it is determined that the calculated probability is greater than the preset third threshold, it means that the probability that the above-mentioned multiple components exist simultaneously in one merge request is too large, that is, the splitting granularity of the above-mentioned multiple components is too fine. Therefore, it can be determined that the multiple components are in an unstable state, and the designs of the above-mentioned multiple components can be adjusted subsequently.

[0076] The component stability detection method provided in the embodiment of the present disclosure can detect the stability of the component more comprehensively, further improving the accuracy of the stability detection result.

[0077] Based on the above method embodiment, the present disclosure also provides a component stability detection device, referring to Figure 4 , is a schematic diagram of the structure of a component stability detection device provided by an embodiment of the present disclosure, the device comprising:

[0078] A first determination module 401 is used to determine a first stability parameter of a target component based on merge request data; wherein the merge request data includes merge requests corresponding to multiple versions of the target software, and the merge request is a request for processing a component in the target software;

[0079] A second determination module 402, configured to determine a second stability parameter of the target component based on the dependency relationship corresponding to the target component;

[0080] The third determination module 403 is used to determine the stability detection result of the target component based on the first stability parameter and the second stability parameter.

[0081] In an optional implementation manner, the first determining module is specifically configured to:

[0082] By analyzing the merge request data, a ratio of the number of merge requests that include the target component to the total number of merge requests is determined as a first stability parameter of the target component.

[0083] In an optional implementation manner, the third determining module is specifically configured to:

[0084] If it is determined that the first stability parameter is greater than a preset first threshold and the second stability parameter is not greater than a preset second threshold, or if it is determined that the first stability parameter is not greater than the preset first threshold and the second stability parameter is greater than the preset second threshold, it is determined that the target component is in an unstable state.

[0085] In an optional implementation, the device further includes:

[0086] A fourth determination module, configured to determine a probability that multiple components including the target component exist in the same merge request by analyzing the merge request data;

[0087] The fifth determination module is used to determine that the multiple components are in an unstable state when it is determined that the probability is greater than a preset third threshold.

[0088] In an optional implementation manner, the second determining module includes:

[0089] A first determination submodule, configured to determine the number of incoming dependencies and the number of outgoing dependencies of the target component based on the dependency relationship corresponding to the target component;

[0090] The second determination submodule is used to calculate the sum of the number of incoming dependencies and the number of outgoing dependencies, and determine the ratio of the number of outgoing dependencies to the sum as the second stability parameter of the target component.

[0091] In an optional implementation manner, the second determining module includes:

[0092] A third determination submodule, configured to determine the number of incoming dependencies and the number of outgoing dependencies of the target component based on the dependency relationship corresponding to the target component;

[0093] a fourth determination submodule, configured to determine the number of incoming dependencies and the number of outgoing dependencies as a second stability parameter of the target component;

[0094] Accordingly, the third determination module is specifically configured to:

[0095] If it is determined that the number of incoming dependencies of the target component is greater than a preset fourth threshold, the number of outgoing dependencies is greater than a preset fifth threshold, and the first stability parameter is greater than a preset first threshold, it is determined that the target component is in an unstable state.

[0096] In the detection device for component stability provided by the embodiment of the present disclosure, first, a first stability parameter of the target component is determined based on the merge request data, and a second stability parameter of the target component is determined based on the dependency relationship corresponding to the target component. Then, based on the first stability parameter and the second stability parameter, a stability detection result of the target component is determined. It can be seen that the embodiment of the present disclosure can not only determine the stability parameter of the target component from the dimension of the merge request, but also statically analyze the stability parameter of the target component from the dimension of the dependency relationship, and finally obtain the stability detection result of the target component. The embodiment of the present disclosure can detect the stability of the component more comprehensively, and improve the accuracy of the stability detection result.

[0097] In addition to the above-mentioned methods and apparatus, the embodiments of the present disclosure also provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the component stability detection method described in the embodiments of the present disclosure.

[0098] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the component stability detection method described in the embodiments of the present disclosure is implemented.

[0099] In addition, the present disclosure also provides a component stability detection device, see Figure 5 As shown, this may include:

[0100] Processor 501, memory 502, input device 503 and output device 504. The number of processors 501 in the component stability detection device can be one or more. Figure 5 In some embodiments of the present disclosure, the processor 501, the memory 502, the input device 503 and the output device 504 may be connected via a bus or other means, wherein: Figure 5 The example of connecting through bus is taken in the following.

[0101] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the component stability detection device by running the software programs and modules stored in the memory 502. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 503 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the component stability detection device.

[0102] Specifically in this embodiment, the processor 501 will load the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 will run the applications stored in the memory 502, thereby realizing the various functions of the above-mentioned component stability detection device.

[0103] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0104] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting component stability, characterized in that: The method comprises: Determining a first stability parameter of a target component based on merge request data; wherein the merge request data includes merge requests corresponding to a plurality of versions of the target software, respectively, and the merge request is a request for processing a component in the target software; and, determining a second stability parameter of the target component based on dependencies corresponding to the target component, wherein the dependencies corresponding to the target component include dependencies of other components on the target component and dependencies of the target component on the other components; Determining a stability detection result of the target component based on the first stability parameter and the second stability parameter; The determining a first stability parameter of the target component based on the merge request data includes: By analyzing the merge request data, a ratio of the number of merge requests that include the target component to the total number of merge requests is determined as a first stability parameter of the target component.

2. The method according to claim 1, characterized in that The determining, based on the first stability parameter and the second stability parameter, a stability detection result of the target component includes: If it is determined that the first stability parameter is greater than a preset first threshold and the second stability parameter is not greater than a preset second threshold, or if it is determined that the first stability parameter is not greater than the preset first threshold and the second stability parameter is greater than the preset second threshold, it is determined that the target component is in an unstable state.

3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: By analyzing the merge request data, determining a probability that multiple components including the target component exist in the same merge request; If it is determined that the probability is greater than a preset third threshold, it is determined that the plurality of components are in an unstable state.

4. The method according to claim 1, characterized in that: The determining, based on the dependency relationship corresponding to the target component, a second stability parameter of the target component includes: Based on the dependency relationship corresponding to the target component, determine the number of incoming dependencies and the number of outgoing dependencies of the target component; The sum of the number of incoming dependencies and the number of outgoing dependencies is calculated, and a ratio of the number of outgoing dependencies to the sum is determined as a second stability parameter of the target component.

5. The method according to claim 1, characterized in that The determining, based on the dependency relationship corresponding to the target component, a second stability parameter of the target component includes: Based on the dependency relationship corresponding to the target component, determine the number of incoming dependencies and the number of outgoing dependencies of the target component; Determining the number of incoming dependencies and the number of outgoing dependencies as a second stability parameter of the target component; Accordingly, determining the detection result of the target component based on the first stability parameter and the second stability parameter includes: If it is determined that the number of incoming dependencies of the target component is greater than a preset fourth threshold, the number of outgoing dependencies is greater than a preset fifth threshold, and the first stability parameter is greater than a preset first threshold, it is determined that the target component is in an unstable state.

6. A component stability detection device, characterized in that: The device comprises: A first determination module is used to determine a first stability parameter of a target component based on merge request data; wherein the merge request data includes merge requests corresponding to multiple versions of the target software, and the merge request is a request for processing a component in the target software; a second determination module, configured to determine a second stability parameter of the target component based on dependencies corresponding to the target component, wherein the dependencies corresponding to the target component include dependencies of other components on the target component and dependencies of the target component on the other components; A third determination module, configured to determine a stability detection result of the target component based on the first stability parameter and the second stability parameter; The first determining module is specifically used for: By analyzing the merge request data, a ratio of the number of merge requests that include the target component to the total number of merge requests is determined as a first stability parameter of the target component.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 5.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

9. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for quantifying code quality of developers

    CN107203370A

  • Dependence relation generation method and device, terminal equipment and storage medium

    CN111967017A

  • Dependency conflict detection method and device, electronic equipment and computer readable medium

    CN112214408A