A method, device and equipment for detecting inter-component dependency relationship

By detecting dependencies between components and updating embedded components using version overlap, the problem of closed-loop detection between components is solved, ensuring version consistency and functional stability among components.

CN116069352BActive Publication Date: 2026-03-24CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to form a closed-loop dependency detection between components, which leads to increased version differences and makes it difficult to guarantee the functional consistency and stability between components.

Method used

By determining whether the embedded components in the component to be developed include the same sub-components, obtaining their respective version ranges, determining the intersection, and using the version numbers in the intersection to update the corresponding components, the consistency of dependencies between components is ensured.

Benefits of technology

It implements closed-loop dependency detection between components, ensuring that differences in component versions meet requirements and avoiding the problem of functional inapplicability after component updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069352B_ABST
    Figure CN116069352B_ABST
Patent Text Reader

Abstract

The present application relates to computer technology field, especially to a kind of detection method, device and equipment of inter-component dependency, including judging whether multiple embedded components in the component to be developed include the same subcomponent;If there is the same subcomponent, then the version range of the subcomponent corresponding to each of the multiple embedded components is obtained;Determine the intersection between multiple version ranges;From the intersection, the component corresponding to a version number is selected as the subcomponent to be updated, and the subcomponent to be updated is used to update the subcomponent stored in the component to be developed, which corresponds to the multiple embedded components with the same subcomponent.Through the method of the present application, the subcomponent after the update of the component to be developed is avoided to be not applicable to the corresponding embedded component, the closed-loop dependency detection between components is realized, and the problem that it is difficult to form the closed-loop dependency detection between components in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and device for detecting inter-component dependencies. Background Technology

[0002] In current component development, all components are stored on a server for easy access by the development team. During development, component A might embed the functionality of another component B, creating a one-way dependency between them. When component B is updated, it may affect the functionality of component A, requiring component A to be updated as well. The server will notify the development team of component A to update component A. However, after retrieving or receiving the updated component B from the server, the development team of component A may not immediately update component A, leaving the old version of component A still in use. If the updated component B fixes many issues or modifies certain functions, and the old version of component A is not updated, the differences between versions will gradually increase. If the component reference relationships are complex, it becomes difficult to establish a closed-loop dependency detection system between components, a common problem in component development. Currently, there is no good method for detecting inter-component dependencies.

[0003] There is an urgent need for a method to detect dependencies between components, so as to solve the problem that it is difficult to form a closed loop of dependencies between components in the existing technology. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of the present invention provide a method, apparatus, and device for detecting inter-component dependencies, which realizes closed-loop dependency detection between components, thereby ensuring that the version differences of each component meet the requirements.

[0005] To solve the above-mentioned technical problems, the specific technical solution of the present invention is as follows:

[0006] On one hand, embodiments of the present invention provide a method for detecting inter-component dependencies, including,

[0007] Determine whether multiple embedded components in the component to be developed contain the same child components;

[0008] If identical sub-components exist, then obtain the version range of the sub-components corresponding to each of the multiple embedded components;

[0009] Determine the intersection between the multiple version ranges;

[0010] Select any component with a version number from the intersection as the sub-component to be updated, and use the sub-component to be updated to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components.

[0011] Furthermore, before selecting any sub-component corresponding to a version number from the intersection, the method further includes,

[0012] Determine whether the version number of the sub-component already stored in the component to be developed belongs to the intersection;

[0013] If not, then select one component with version number from the intersection to update the sub-component to be updated, which is used to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components.

[0014] Furthermore, the method also includes,

[0015] If the version number of the sub-component already stored in the component to be developed belongs to the intersection, then the sub-components corresponding to multiple embedded components that have the same sub-components stored in the component to be developed will no longer be updated.

[0016] Furthermore, if multiple embedded components in the component to be developed do not include the same sub-components, the method further includes,

[0017] Get the version range of the child components corresponding to each embedded component;

[0018] Select any component with a version number from the version range of the sub-components corresponding to the embedded component as the sub-component to be updated corresponding to the embedded component, and use the sub-component to be updated corresponding to the embedded component to update the sub-components corresponding to the embedded component already stored in the component to be developed.

[0019] Furthermore, after updating the sub-component corresponding to the embedded component already stored in the component to be developed using the sub-component to be updated corresponding to the embedded component, the method further includes,

[0020] Obtain the version range of the embedded component corresponding to the version number of the sub-component to be updated;

[0021] Select any component from the version range of the embedded components as the embedded component to be updated;

[0022] The embedded component in the component to be developed is updated using the embedded component to be updated, which corresponds to the sub-component updated by the sub-component to be updated.

[0023] Furthermore, the method also includes obtaining the version range of the embedded component corresponding to the version number of the sub-component to be updated;

[0024] Select any one of the embedded components from the version range as the embedded component to be updated, and use the embedded component to be updated to update the embedded component in the component to be developed that corresponds to the sub-component to be updated.

[0025] Furthermore, before determining whether multiple embedded components in the component to be developed include the same sub-component, the method further includes,

[0026] The embedded component that does not include sub-components is identified in the component to be developed;

[0027] Determine whether the embedded component that does not include sub-components is the same as the sub-components included in other embedded components in the component to be developed;

[0028] If so, then after selecting any sub-component with a version number corresponding to the intersection as the sub-component to be updated, the method further includes,

[0029] The embedded component that does not include the subcomponent is updated in the component to be developed using the subcomponent to be updated.

[0030] Furthermore, if the embedded component that does not include sub-components is not the same as the sub-components included in other embedded components in the component to be developed, the method further includes,

[0031] Get the latest version number of the embedded component and use it as the embedded component to be updated;

[0032] The embedded component that does not include child components in the component to be developed is updated using the embedded component to be updated.

[0033] Furthermore, the method also includes,

[0034] If the component to be developed does not include an embedded component, then the component to be developed will be developed directly according to business requirements.

[0035] Furthermore, the embedded component includes multiple layers of sub-components;

[0036] Further determining whether multiple embedded components in the component to be developed include the same sub-components includes,

[0037] Determine whether each layer of a subcomponent of an embedded component is identical to all layers of subcomponents of other embedded components.

[0038] Furthermore, the step of determining whether multiple embedded components in the component to be developed include the same sub-component is initiated when updating any of the embedded components of the component to be developed.

[0039] Furthermore, obtaining the version range of the sub-component corresponding to each of the plurality of embedded components further includes,

[0040] The version range of the subcomponents corresponding to the embedded component is determined based on the updated component information of the embedded component.

[0041] On the other hand, embodiments of the present invention also provide a device for detecting inter-component dependencies, including,

[0042] The same sub-component determination unit is used to determine whether multiple embedded components in the component to be developed include the same sub-component;

[0043] The sub-component version range acquisition unit is used to acquire the version range of the sub-component corresponding to each of the multiple embedded components when there are identical sub-components.

[0044] An intersection determination unit is used to determine the intersection between multiple version ranges;

[0045] The subcomponent update unit is used to select a component with a version number from the intersection as the subcomponent to be updated, and use the subcomponent to be updated to update the subcomponents that are stored in the component to be developed and correspond to the multiple embedded components that have the same subcomponent.

[0046] On the other hand, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-described method.

[0047] On the other hand, embodiments of the present invention also provide a computer storage medium storing a computer program thereon, which executes the above-described method when run by the processor of a computer device.

[0048] Finally, the present invention also provides a computer program product that, when run by a processor of a computer device, executes instructions according to the method described above.

[0049] In this embodiment of the invention, a component to be developed can embed multiple embedded components, and each embedded component can also embed other components. The components embedded in an embedded component are sub-components. After a sub-component is updated, the embedded component may also need to be updated to adapt to the version range of the updated sub-component. The version ranges of the sub-components in each embedded component may be different. The component to be developed needs to store the embedded components and sub-components. Therefore, during component development, to avoid the updated sub-components not being applicable to all embedded components that include that sub-component, this embodiment of the invention determines whether multiple embedded components in the component to be developed include the same sub-component. If the same sub-component exists, the version ranges of the sub-components corresponding to each of the multiple embedded components are obtained, and then the process is further determined. The intersection of multiple version ranges, i.e., the sub-component corresponding to any version number in the version range corresponding to the intersection is applicable to these embedded components, so a component corresponding to any version number in the intersection is selected as the sub-component to be updated. The sub-component to be updated is used to update the sub-components corresponding to multiple embedded components that have the same sub-components stored in the component to be developed. This allows the embedded components to use the functions of the updated sub-components to perform their own functions, and the component to be developed can use the functions of the embedded components to complete the development of its own business functions. This avoids the situation where the updated sub-components of the component to be developed are not applicable to the corresponding embedded components, realizes closed-loop dependency detection between components, and solves the problem that it is difficult to form closed-loop dependency detection between components in the existing technology. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 The figure shown is a schematic diagram of an implementation system for a method for detecting inter-component dependencies according to an embodiment of the present invention;

[0052] Figure 2 The diagram shown is a flowchart of a method for detecting inter-component dependencies according to an embodiment of the present invention;

[0053] Figure 3 The diagram illustrates the processing procedure in an embodiment of the present invention when multiple embedded components in a component to be developed do not include the same sub-components.

[0054] Figure 4 The diagram illustrates the process of updating an embedded component in an embodiment of the present invention when the same sub-component is not included among multiple embedded components of the component to be developed.

[0055] Figure 5The diagram illustrates the process of updating an embedded component that does not include sub-components in a component to be developed during an implementation of this invention.

[0056] Figure 6 The diagram shown is a structural schematic of a component dependency detection device according to an embodiment of the present invention.

[0057] Figure 7 The diagram shown is a structural schematic of a computer device according to an embodiment of the present invention.

[0058] [Explanation of Figure Markers]:

[0059] 101. First Development Stage;

[0060] 102. Second Development Terminal;

[0061] 103. Third-party development platform;

[0062] 104. Fourth Development Terminal;

[0063] 105. Fifth Development Terminal;

[0064] 106. Component storage server;

[0065] 601. Identification Unit for Same Sub-components;

[0066] 602. Sub-component version range acquisition unit;

[0067] 603. Intersection determines the unit;

[0068] 604. Sub-component update unit;

[0069] 702. Computer equipment;

[0070] 704. Processing equipment;

[0071] 706. Storage resources;

[0072] 708. Drive mechanism;

[0073] 710. Input / Output Module;

[0074] 712. Input devices;

[0075] 714. Output devices;

[0076] 716. Presentation equipment;

[0077] 718. Graphical User Interface;

[0078] 720. Network interface;

[0079] 722. Communication link;

[0080] 724. Communication bus. Detailed Implementation

[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0082] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0083] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0084] like Figure 1 The diagram illustrates a system implementation method for detecting inter-component dependencies according to an embodiment of the present invention. The system may include a first development terminal 101, a second development terminal 102, a third development terminal 103, a fourth development terminal 104, a fifth development terminal 105, and a component storage server 106. Each of the first development terminal 101, second development terminal 102, third development terminal 103, fourth development terminal 104, and fifth development terminal 105 can establish a communication connection with the component storage server 106 to achieve data interaction.

[0085] Each development team develops its own component and uploads it to the component storage server 106 for storage, so that other development teams can use their developed components. A component developed by one development team may also embed components from multiple development teams.

[0086] For example, the second development terminal 102 is used to develop a second component. After updating the second component, the second development terminal 102 uploads the second component to the component storage server 106, whereby the component storage server 106 stores the second component. The first development terminal 101 is used to develop a first component, in which the second component developed by the second development terminal 102 is embedded. After the second component is updated, the first development terminal can update the embedded second component according to its own business needs or a forced update command from the second development terminal 102. For example:

[0087] Version 1.0 of the second component can implement the basic business functions a, b, and c. The second component with version 1.0 is uploaded to the component storage server 106 for storage. However, the second component with version 1.0 has many problems. In order to fix the problems in the second component, the second development end 102 updates the second component, generates the second component with version 1.1, and uploads it to the component storage server 106 for storage. The second development end 102 adds a new business function d to the second component, generates the second component with version 1.2, and uploads the second component with version 1.2 to the component storage server 10 for storage. At this time, the component storage server 106 stores the second components with versions 1.0-1.2.

[0088] The first component developed by the first development end 101 needs to utilize the business functions a and b of the second component. Therefore, the first development end 101 initially embeds the second component (version 1.0) into its own first component, resulting in a first component (version 2.0), and uploads the first component (version 2.0) to the component storage server 106 for storage. After the second component is updated (versions 1.1 and 1.2), because the second component (version 1.1) fixes many issues, the second development end 102 can force all development ends that embed the second component to update the second component embedded in their developed components. Therefore, the first development end needs to update the second component embedded in its first component, generating a first component (version 2.1) and uploading it to the component storage server 106 for storage. Because the business function d of the second component is not needed in the business function of the first component developed by the first development end 101, the first development end 101 does not need to update the second component (version 1.1) embedded in the first component (version 2.1) to the second component (version 1.2).

[0089] The fourth development end 104 develops the fourth component. The business function of the fourth component needs to utilize the business function d of the second component. Therefore, the fourth development end 104 initially embeds the second component with version number 1.2 into its own fourth component to obtain the fourth component with version number 4.0, and uploads the fourth component with version number 4.0 to the component storage server 106 for storage.

[0090] The third development end 103 develops the third component. The business functions of the third component require the business functions of the first and fourth components. According to the component development requirements, the third development end 103 needs to store the first, second, and fourth components locally. The third development end 103 can undoubtedly obtain the first component with version number 2.1 and the fourth component with version number 4.0 from the component storage server 106. However, because it also needs to obtain the second component, which is stored in the component storage server 106 with versions 1.0-1.2, the third development end 103 does not know which version of the second component to obtain. It is possible that the obtained second component is not applicable to the first and fourth components.

[0091] When the third development terminal 103 obtains the first component from the component storage server 106, it can also provide the application scenario of the component. The component storage server 106 determines whether the application scenario provided by the third development terminal 103 meets the application requirements of the first component to be obtained. If it does not meet the requirements, the first component will not be provided to the third development terminal 103. The component storage server 106 can also determine the components that meet the requirements based on the application scenario provided by the third development terminal 103 and send the components to the third development terminal 103 for use.

[0092] After the third development end 103 obtains the first component, it can further determine whether the third component developed by the third development end 103 truly embeds the first component, that is, whether the third component truly uses the functionality of the first component. If so, the dependency relationship between the third component and the first component will be recorded. If the third component does not truly embed the first component, for example, the code of the third component only declares the interface function of the first component, but does not call it, the dependency relationship between the third component and the first component will not be recorded. In this case, if the third component is obtained by the fifth development end 105, and the fifth component developed by the fifth development end 105 needs to embed the third component, when the fifth development end 105 obtains the third component, it is not necessary to determine the version number of the first component embedded by the third component.

[0093] It should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included, which are not limited in the embodiments of this invention.

[0094] The root cause of the above problems is the difficulty in forming a closed-loop dependency detection between components in existing technologies. To solve this problem, embodiments of the present invention provide a method for detecting dependencies between components, which realizes closed-loop dependency detection between components, thereby ensuring that the version differences of each component meet the requirements. Figure 2The diagram shows a flowchart of a method for detecting inter-component dependencies according to an embodiment of the present invention. This diagram describes the process of detecting inter-component dependencies, but based on conventional or non-creative work, it may include more or fewer operational steps. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the method can be executed sequentially or in parallel according to the embodiment or the accompanying drawings. Specifically, as shown... Figure 2 As shown, the method may include:

[0095] Step 201: Determine whether multiple embedded components in the component to be developed include the same child components;

[0096] Step 202: If there are identical sub-components, obtain the version range of the sub-components corresponding to each of the multiple embedded components;

[0097] Step 203: Determine the intersection between the multiple version ranges;

[0098] Step 204: Select one component with a version number from the intersection as the sub-component to be updated, and use the sub-component to be updated to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components.

[0099] In this embodiment of the invention, a component to be developed can embed multiple embedded components, and each embedded component can also embed other components. The components embedded in an embedded component are sub-components. After a sub-component is updated, the embedded component may also need to be updated to adapt to the version range of the updated sub-component. The version ranges of the sub-components in each embedded component may be different. The component to be developed needs to store the embedded components and sub-components. Therefore, during component development, to avoid the updated sub-components not being applicable to all embedded components that include that sub-component, this embodiment of the invention determines whether multiple embedded components in the component to be developed include the same sub-component. If the same sub-component exists, the version ranges of the sub-components corresponding to each of the multiple embedded components are obtained, and then the process is further determined. The intersection of multiple version ranges, i.e., the sub-component corresponding to any version number in the version range corresponding to the intersection is applicable to these embedded components, so a component corresponding to any version number in the intersection is selected as the sub-component to be updated. The sub-component to be updated is used to update the sub-components corresponding to multiple embedded components that have the same sub-components stored in the component to be developed. This allows the embedded components to use the functions of the updated sub-components to perform their own functions, and the component to be developed can use the functions of the embedded components to complete the development of its own business functions. This avoids the situation where the updated sub-components of the component to be developed are not applicable to the corresponding embedded components, realizes closed-loop dependency detection between components, and solves the problem that it is difficult to form closed-loop dependency detection between components in the existing technology.

[0100] This can be understood as the correspondence between the scope of the embedded component and the version scope of the child component being the dependency relationship between the embedded component and the child component. The dependency relationship is written into the dependency relationship file of the embedded component. After the component to be developed obtains a certain version of the embedded component, it can determine which version of the child component needs to be obtained based on the dependency relationship file of the embedded component.

[0101] According to one embodiment of the invention, the step of determining whether multiple embedded components in a component to be developed include the same sub-component is initiated when updating any of the embedded components of the component to be developed.

[0102] This can be understood as follows: when developing a component to be developed, it is necessary to obtain one or more embedded components embedded in the component to be developed, and also to obtain the sub-components embedded in the embedded components. Only after storing both the embedded components and sub-components locally can the business functions of the embedded components be used to develop the business functions of the component to be developed, and can also ensure that the embedded components can utilize the business functions of the sub-components when executing business functions. Therefore, in this embodiment of the invention, when obtaining the embedded components, it is determined whether multiple embedded components in the component to be developed (including the embedded components obtained this time and the embedded components already stored locally) include the same sub-components. If the same sub-components exist, the dependency relationship files corresponding to each of the multiple embedded components are obtained, and the version range of the sub-components is determined according to the dependency relationship files. Then, the intersection between the multiple version ranges is determined, and a component corresponding to the version number of the intersection is selected as the sub-component to be updated. The sub-component to be updated is used to update the sub-components already stored in the component to be developed.

[0103] In some other embodiments of the present invention, the development end of the component to be developed may be notified to update the embedded component after the embedded component is updated. In this process, the present specification is executed. Figure 2 The method.

[0104] It should be noted that the component to be developed can be a component that has not yet been developed, or a component that needs to be updated based on the original component. If the component to be developed is a component that needs to be updated, those skilled in the art can also directly derive the process of updating the embedded component and sub-components based on the method described in the embodiments of this specification, which will not be elaborated here.

[0105] Furthermore, obtaining the version range of the sub-component corresponding to each of the plurality of embedded components further includes,

[0106] The version range of the subcomponents corresponding to the embedded component is determined based on the updated component information of the embedded component.

[0107] In this embodiment of the invention, the dependency file of the embedded component can be stored in the component information of the embedded component. Therefore, the version range of the sub-components corresponding to the embedded component can be determined according to the dependency file in the component information of the embedded component.

[0108] In this embodiment of the invention, the version numbers of sub-components stored locally by the component to be developed may already belong to a defined intersection. In this case, the component to be developed does not need to update the sub-component. Therefore, according to one embodiment of the invention, before selecting a sub-component corresponding to a version number from the intersection, the method further includes,

[0109] Determine whether the version number of the sub-component already stored in the component to be developed belongs to the intersection;

[0110] If not, then select one component with version number from the intersection to update the sub-component to be updated, which is used to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components.

[0111] Furthermore, if the version number of the sub-component already stored in the component to be developed belongs to the intersection, then the sub-components corresponding to multiple embedded components that have the same sub-components already stored in the component to be developed will no longer be updated.

[0112] In this embodiment of the invention, if the version number of a sub-component already stored in the component to be developed belongs to the intersection, then the sub-component does not need to be updated; if it does not belong to the intersection, then the sub-component is updated, thereby avoiding repeated updates of the sub-component and reducing the workload of developing the component to be developed.

[0113] In embodiments of the present invention, it is also possible that the multiple embedded components into which the component to be developed is embedded do not embed the same sub-component. Therefore, there is no issue of the updated sub-component version number being inapplicable to the corresponding multiple embedded components. Thus, according to one embodiment of the present invention, such as... Figure 3 As shown, if multiple embedded components in the component to be developed do not include the same sub-components, the method further includes,

[0114] Step 301: Obtain the version range of the child components corresponding to each embedded component;

[0115] Step 302: Select a component with a version number from the version range of the sub-components corresponding to the embedded component as the sub-component to be updated corresponding to the embedded component, and use the sub-component to be updated corresponding to the embedded component to update the sub-components corresponding to the embedded component already stored in the component to be developed.

[0116] In this embodiment of the invention, if multiple embedded components in the component to be developed do not include the same sub-component, then one component with the version number corresponding to the sub-component of each embedded component can be selected for update.

[0117] In this embodiment of the invention, in addition to updating the sub-component, the embedded component also needs to be updated. The action of updating the embedded component can be initiated proactively by the development end of the component to be developed. Therefore, after determining the sub-component to be updated, it is also necessary to determine which version of the embedded component to update. Therefore, to ensure that the business functions of the updated embedded component can operate normally, according to one embodiment of the invention, such as... Figure 4 As shown, after updating the child component corresponding to the embedded component stored in the component to be developed using the child component to be updated corresponding to the embedded component, the method further includes,

[0118] Step 401: Obtain the version range of the embedded component corresponding to the version number of the sub-component to be updated;

[0119] Step 402: Select one component with a version number corresponding to the version range of the embedded components as the embedded component to be updated;

[0120] Step 403: Update the embedded component in the component to be developed that corresponds to the sub-component updated by the sub-component to be updated using the embedded component to be updated.

[0121] In this embodiment of the invention, when the multiple embedded components of the component to be developed do not include the same sub-component, determining which version number of the sub-component to update only requires considering the version range of the corresponding sub-component of the embedded component. Therefore, when updating an embedded component, the version number of the updated embedded component should also correspond to the version number of the updated sub-component. Thus, the version range of embedded components corresponding to the version number of the sub-component to be updated is obtained, and then a component with a version number corresponding to any one of the embedded component version numbers is randomly selected from this range as the embedded component to be updated. Finally, the embedded component in the component to be developed that corresponds to the sub-component being updated is updated using the embedded component to be updated. This ensures that the version number of the updated embedded component and the version number of the updated sub-component correspond to each other, meaning that the function of the updated embedded component can operate normally.

[0122] In this case, the dependency file of the embedded component includes the mapping between the version range of the embedded component and the version range of the child components.

[0123] In some other embodiments of the present invention, if multiple embedded components of a component to be developed include the same sub-component, the version number of these components to be developed needs to be determined based on the version number of the updated sub-component. Therefore, the version range of the embedded component corresponding to the version number of the sub-component to be updated is obtained.

[0124] Select any one of the embedded components from the version range as the embedded component to be updated, and use the embedded component to be updated to update the embedded component in the component to be developed that corresponds to the sub-component to be updated.

[0125] In one embodiment of the present invention, the embedded component of the component to be developed may not include any child components, that is, the embedded component is a native component and does not utilize the business functions of other components. However, this embedded component may be a child component of other embedded components. Therefore, when updating such an embedded component, it is also necessary to consider the version range of the corresponding child components of other embedded components. In view of the above situation, according to one embodiment of the present invention, such as Figure 5 As shown, before determining whether multiple embedded components in the component to be developed include the same sub-component, the method further includes,

[0126] Step 501: Determine the embedded components in the components to be developed that do not include sub-components;

[0127] Step 502: Determine whether the embedded component that does not include sub-components is the same as the sub-components included in other embedded components in the component to be developed;

[0128] If so, then after selecting any sub-component with a version number corresponding to the intersection as the sub-component to be updated, the method further includes,

[0129] Step 503: Update the embedded component (excluding the subcomponent) in the component to be developed using the subcomponent to be updated.

[0130] In this embodiment of the invention, firstly, embedded components that do not include sub-components in the component to be developed are identified. Then, it is determined whether the embedded component is the same as the sub-components included in other embedded components in the component to be developed. If they are the same, it indicates that the version of the embedded component cannot be arbitrarily updated, because the updated version may not be applicable to the embedded component that embeds it. Therefore, if they are the same, a sub-component with a version number is randomly selected from the intersection as the sub-component to be updated. After updating the sub-component, the embedded component is also updated using this sub-component to be updated.

[0131] In this embodiment of the invention, the embedded component that does not include sub-components may not be the same as the sub-components of other embedded components. In this case, the embedded component can be updated directly without considering the other embedded components. Therefore, according to one embodiment of the invention, if the embedded component that does not include sub-components is not the same as the sub-components included in other embedded components in the component to be developed, the method further includes...

[0132] Get the latest version number of the embedded component and use it as the embedded component to be updated;

[0133] The embedded component that does not include child components in the component to be developed is updated using the embedded component to be updated.

[0134] According to one embodiment of the present invention, if the component to be developed does not include an embedded component, it means that the component to be developed is a native component. The component to be developed can be developed directly according to business needs. Finally, the developed component is sent to the component storage server for storage so that other components can embed the component.

[0135] According to one embodiment of the present invention, the embedded component includes multiple layers of sub-components;

[0136] Further determining whether multiple embedded components in the component to be developed include the same sub-components includes,

[0137] Determine whether each layer of a subcomponent of an embedded component is identical to all layers of subcomponents of other embedded components.

[0138] In this embodiment of the invention, a multi-layered sub-component refers to a sub-component directly embedded in an embedded component, which in turn includes other sub-components. In this case, the upper-level sub-component can also be considered an embedded component, except that it is not directly embedded in the component to be developed, but rather directly embedded in a component embedded in the component to be developed. To ensure that each embedded component can function correctly after a sub-component is updated, this embodiment of the invention determines whether each layer of sub-components of an embedded component is identical to all sub-components of other embedded components. If they are identical, their intersection is determined, and then a component is selected from the intersection as the sub-component to be updated.

[0139] This specification provides the following preferred embodiments, in conjunction with... Figure 1 The method of this embodiment of the present invention is illustrated by example.

[0140] First, the third development end 103 sends a request to the component storage server 106 to obtain the first component, which is used to be embedded into the third component to be updated.

[0141] The component storage server 106 sends a first component and a dependency file of the first component. The first component is developed by the first development end 101 and a second component of the second development end 102 is embedded in the first component. The dependency file of the first component includes the correspondence between the version number range of the first component and the version number range of the second component.

[0142] The third component also embeds a fourth component developed by the fourth development end 104, and the fourth component also embeds the second component. When the version of the third component is updated, it is determined whether the second component stored locally needs to be updated based on the dependency file of the first component and the version number of the second component stored locally. If it needs to be updated, the version number of the updated second component is determined based on the dependency file of the fourth component stored locally and the dependency file of the first component, and the updated version number of the second component is sent to the component storage server 106.

[0143] Receive the second component corresponding to the updated second component version number sent by the component storage server 106;

[0144] The third component is updated based on the received second component, the locally stored first component, and the fourth component.

[0145] Then the third development terminal 103 sends the third component to the component storage server 106 for storage.

[0146] When the fifth development end 105 updates the version of the fifth component, it sends a request to the component storage server 106 to obtain the third component. The third component is used to embed into the fifth component to be updated. The fifth component also embeds the first component developed by the first development end 101. The third component also embeds the first component. The first component embeds the second component developed by the second development end 102.

[0147] The component storage server 106 sends the third component, the dependency file of the third component, and the dependency file of the first component. The dependency of the third component includes the correspondence between the version number range of the third component and the version number range of the first component. The dependency file of the first component includes the correspondence between the version number range of the first component and the version number range of the second component.

[0148] When iterating the version of the fifth component, it is determined whether the first component in local storage needs to be updated based on the dependency file of the third component and the version number of the first component in local storage, and it is also determined whether the second component in local storage needs to be updated based on the dependency file of the first component and the version number of the second component in local storage.

[0149] Based on the same inventive concept, embodiments of the present invention also provide a device for detecting inter-component dependencies, such as... Figure 6 As shown, including,

[0150] The identical sub-component determination unit 601 is used to determine whether multiple embedded components in the component to be developed include the same sub-component;

[0151] The sub-component version range acquisition unit 602 is used to acquire the version range of the sub-component corresponding to each of the multiple embedded components when there are identical sub-components.

[0152] Intersection determination unit 603 is used to determine the intersection between multiple version ranges;

[0153] The subcomponent update unit 604 is used to select a component with a version number from the intersection as the subcomponent to be updated, and use the subcomponent to be updated to update the subcomponents that are stored in the component to be developed and correspond to the multiple embedded components that have the same subcomponents.

[0154] The beneficial effects obtained by the above-described device are the same as those obtained by the above-described method, and will not be described in detail in the embodiments of this specification.

[0155] like Figure 7 The diagram illustrates the structure of a computer device according to an embodiment of the present invention. The apparatus in this invention can be the computer device described in this embodiment, executing the method of the present invention as described above. The computer device 702 may include one or more processing devices 704, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 702 may also include any storage resource 706 for storing information of any kind, such as code, settings, data, etc. Non-limitingly, for example, the storage resource 706 may include any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Further, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource can represent a fixed or removable component of the computer device 702. In one case, when the processing device 704 executes associated instructions stored in any storage resource or combination of storage resources, the computer device 702 can perform any operation of the associated instructions. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any storage resource, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0156] Computer device 702 may also include an input / output module 710 (I / O) for receiving various inputs (via input device 712) and providing various outputs (via output device 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface (GUI) 718. In other embodiments, the input / output module 710 (I / O), input device 712, and output device 714 may be omitted, and the device may function solely as a computer device within a network. Computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.

[0157] Communication link 722 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. Communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.

[0158] Corresponding to Figures 2 to 5 In addition to the method described above, this embodiment of the invention also provides a computer-readable storage medium storing a computer program, which is executed by a processor to perform the above steps.

[0159] This invention also provides a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to perform the following: Figures 2 to 5 The method shown.

[0160] This invention also provides a computer program product, which, when run by the processor of a computer device, executes according to... Figures 2 to 5 The method shown.

[0161] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0162] It should also be understood that, in the embodiments of the present invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.

[0163] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0164] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0165] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, or may be electrical, mechanical, or other forms of connection.

[0166] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0167] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0168] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0169] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for detecting inter-component dependencies, characterized in that, The method includes, Determine whether multiple embedded components in the component to be developed contain the same child components; If identical sub-components exist, then obtain the version range of the sub-components corresponding to each of the multiple embedded components; Determine the intersection between the multiple version ranges; Select any component with a version number from the intersection as the sub-component to be updated, and use the sub-component to be updated to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components. If multiple embedded components in the component to be developed do not contain the same child component, the method further includes, Get the version range of the child components corresponding to each embedded component; Select any component with a version number from the version range of the sub-components corresponding to the embedded component as the sub-component to be updated corresponding to the embedded component, and use the sub-component to be updated corresponding to the embedded component to update the sub-components corresponding to the embedded component that are already stored in the component to be developed. After updating the child component corresponding to the embedded component stored in the component to be developed using the child component to be updated corresponding to the embedded component, the method further includes, Obtain the version range of the embedded component corresponding to the version number of the sub-component to be updated; Select any component from the version range of the embedded components as the embedded component to be updated; The embedded component in the component to be developed is updated using the embedded component to be updated, which corresponds to the sub-component updated by the sub-component to be updated.

2. The method according to claim 1, characterized in that, Before selecting a sub-component corresponding to a version number from the intersection, the method further includes, Determine whether the version number of the sub-component already stored in the component to be developed belongs to the intersection; If not, then select one component with version number from the intersection to update the sub-component to be updated, which is used to update the sub-components that are stored in the component to be developed and have the same sub-components as the multiple embedded components.

3. The method according to claim 2, characterized in that, The method also includes, If the version number of the sub-component already stored in the component to be developed belongs to the intersection, then the sub-components corresponding to multiple embedded components that have the same sub-components stored in the component to be developed will no longer be updated.

4. The method according to claim 1, characterized in that, The method further includes obtaining the version range of the embedded component corresponding to the version number of the sub-component to be updated; Select any one of the embedded components from the version range as the embedded component to be updated, and use the embedded component to be updated to update the embedded component in the component to be developed that corresponds to the sub-component to be updated.

5. The method according to claim 1, characterized in that, Before determining whether multiple embedded components in the component to be developed include the same child component, the method further includes, The embedded component that does not include sub-components is identified in the component to be developed; Determine whether the embedded component that does not include sub-components is the same as the sub-components included in other embedded components in the component to be developed; If so, then after selecting any sub-component with a version number corresponding to the intersection as the sub-component to be updated, the method further includes, The embedded component that does not include the subcomponent is updated in the component to be developed using the subcomponent to be updated.

6. The method according to claim 5, characterized in that, If the embedded component that does not include sub-components is not the same as the sub-components included in other embedded components in the component to be developed, the method further includes, Get the latest version number of the embedded component and use it as the embedded component to be updated; The embedded component that does not include child components in the component to be developed is updated using the embedded component to be updated.

7. The method according to claim 1, characterized in that, The method also includes, If the component to be developed does not include an embedded component, then the component to be developed will be developed directly according to business requirements.

8. The method according to claim 1, characterized in that, The embedded component includes multiple layers of sub-components; Further determining whether multiple embedded components in the component to be developed include the same sub-components includes, Determine whether each layer of a subcomponent of an embedded component is identical to all layers of subcomponents of other embedded components.

9. The method according to claim 1, characterized in that, The step of determining whether multiple embedded components in a component to be developed include the same sub-component is initiated when updating any of the embedded components of the component to be developed.

10. The method according to claim 9, characterized in that, Obtaining the version range of the sub-component corresponding to each of the plurality of embedded components further includes, The version range of the subcomponents corresponding to the embedded component is determined based on the updated component information of the embedded component.

11. A device for detecting inter-component dependencies, characterized in that, include, The same sub-component determination unit is used to determine whether multiple embedded components in the component to be developed include the same sub-component; The sub-component version range acquisition unit is used to acquire the version range of the sub-component corresponding to each of the multiple embedded components when there are identical sub-components. An intersection determination unit is used to determine the intersection between multiple version ranges; The subcomponent update unit is used to select a component with a version number from the intersection as the subcomponent to be updated, and use the subcomponent to be updated to update the subcomponents that are stored in the component to be developed and correspond to multiple embedded components that have the same subcomponents. If multiple embedded components in the component to be developed do not include the same sub-component, the apparatus is further used to, Get the version range of the child components corresponding to each embedded component; Select any component with a version number from the version range of the sub-components corresponding to the embedded component as the sub-component to be updated corresponding to the embedded component, and use the sub-component to be updated corresponding to the embedded component to update the sub-components corresponding to the embedded component that are already stored in the component to be developed. After updating the sub-component corresponding to the embedded component stored in the component to be developed using the sub-component to be updated corresponding to the embedded component, the device is further used to: Obtain the version range of the embedded component corresponding to the version number of the sub-component to be updated; Select any component from the version range of the embedded components as the embedded component to be updated; The embedded component in the component to be developed is updated using the embedded component to be updated, which corresponds to the sub-component updated by the sub-component to be updated.

12. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 10.

13. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor of the computer device, it performs the method according to any one of claims 1 to 10.

14. A computer program product, characterized in that, When the computer program product is run by the processor of a computer device, it executes the instructions of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Updating method of application, terminal and computer readable storage medium

    CN108304205A

  • Blockchain-based QR code payment method and device

    CN113112265A