Software component management method, system and equipment and storage medium
Through the framework system management of software components, the problem of poor component management in the software asset library is solved, and the accurate recommendation and reuse of software modules is achieved, and the development efficiency and quality are improved.
Patent Information
- Application Number
- CN202411147379.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-12
AI Technical Summary
The existing technology lacks effective software component management methods, resulting in the software asset library being useless, the degree of software reuse is low, the repeated development and development cycle is long, and the quality control cost is high.
Using the concept of a framework system, a framework model of software components is generated, and its connection with the association model is judged and established. Detailed description and association of templates such as description slots, association slots, and implementation slots are used to achieve accurate recommendation and multiplexing of software components.
It improves the reuse rate of software modules, shortens the software development cycle, and improves the development efficiency and quality of software systems.
Smart Images

Figure CN118939256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software management, and in particular to a software component management method, system, device and storage medium. Background Art
[0002] At present, when software companies have accumulated a large number of high-quality software assets in previous software projects, they often lack effective description methods for software assets and the work flow of software module authors, resulting in these developed software assets only existing in historical products or projects. In this way, in the development of future projects, current developers may not be aware that these modules with the same or similar functions have already existed, so the same or similar functional modules may be repeatedly developed.
[0003] Therefore, due to the lack of effective management of software components, the software asset library is ineffective, resulting in low software reuse and repeated development, which in turn leads to long software development cycles and high software quality control costs. Summary of the invention
[0004] In view of this, in order to overcome at least one aspect of the above problems, an embodiment of the present invention proposes a software component management method, comprising the following steps: In response to receiving the software component, generating a framework model of the software component according to parameter information of the software component; Determine whether the same framework model exists in the software asset library; In response to the absence of an identical framework model, determining whether the framework model of the software component has an associated model; In response to the existence of the association model, a connection between the framework model of the software component and the association model is established and stored.
[0005] In some embodiments, in response to receiving a software component, generating a framework model of the software component according to parameter information of the software component further includes: Obtaining a framework model template, wherein the framework model template includes a description slot, a composite software component slot, an association slot, an implementation slot, a property slot, a service slot, a guarantee mechanism slot, a constraint condition slot, a first action slot, a second action slot, and a third action slot; Fill the software component name, type, path, function description, performance description, and execution environment description into the description slot; filling the composite software component slot according to the type of the software component; Filling the association slots according to the generic relationship of the software components; Filling the implementation slot according to the programming language, technical framework, code path, function library, reference table, and algorithm logic description of the software component; Fill the attribute slots according to the input value list, return value list, parameter configuration list, database table, and exception list of the software component; Fill the service slot according to the service name, communication protocol, service address, service interface and service function description of the software component; Fill the security mechanism slot according to the data conversion method, transaction processing mechanism, encryption / decryption algorithm, and log processing technology of the software component; filling the constraint slots according to a plurality of constraint expressions of the software component; Binding, creating and initializing an action performed by the software component in the first action slot; Binding in the second action slot an action performed by adding a lower-layer software component to the software component; An action executed by a lower-layer software component to which the software component belongs is bound and deleted in the third action slot.
[0006] In some embodiments, in response to the absence of an identical framework model, determining whether the framework model of the software component has an associated model further comprises: determining whether the framework model of the software component has an associated model based on the associated slot; The method further includes: in response to the association slot being empty, determining that the framework model of the software component does not have an association model; and calling the action bound in the first action slot to set the framework model of the software component as an independent root node.
[0007] In some embodiments, in response to the existence of the association model, establishing a connection between the framework model of the software component and the association model further includes: In response to the association slot being not empty, determining that an association model exists for the framework model of the software component; Finding a related model in the asset library according to the related slot; The action bound to the second action slot in the association model is called to connect the framework model of the software component with the association model.
[0008] In some embodiments, it also includes: In response to receiving the query request, determining a plurality of query conditions in the query request; Based on the multiple query conditions, the search starts from multiple framework models as root nodes of the software asset library; Calculate the semantic similarity between the description of each slot in each framework model as the root node and the corresponding query condition; Take the weighted average of multiple semantic similarities obtained from the same framework model to get the final similarity and sort them from large to small, and return the top N candidate models; The source code is obtained based on the code paths recorded by the implementation slots of the top N candidate models and packaged into a software component for return.
[0009] In some embodiments, calculating the semantic similarity between the description of each slot in each framework model as a root node and the corresponding query condition further includes: Calculate semantic similarity using cosine similarity, Jaccard similarity, BM25 algorithm, or deep learning models.
[0010] In some embodiments, the code paths of the implementation slot records of the top N candidate models are used to obtain source code and package it into a software component for return, further comprising: Determining whether to retrieve a next level model based on the semantic relevance of the associated slots of each of the candidate models; In response to the semantic relevance of the associated slot of the candidate model being greater than a threshold, continuing to cyclically search in a lower layer until the semantic relevance of the associated slot of the lower layer framework model is less than the threshold or the last layer framework model is reached to obtain a plurality of framework model clusters; The source code is obtained according to the code path recorded by the implementation slot of each framework model in each framework model cluster and packaged into a software component for return.
[0011] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a software component management system, including: A generating module, configured to generate a framework model of the software component according to parameter information of the software component in response to receiving the software component; A first determination module is configured to determine whether there is an identical framework model in the software asset library; A second determination module is configured to determine whether there is an associated model for the framework model of the software component in response to the absence of the same framework model; The association module is configured to establish and store a connection between the framework model of the software component and the association model in response to the existence of the association model.
[0012] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including: at least one processor; and A memory storing a computer program executable on the processor, wherein the processor executes the steps of any one of the software component management methods described above when executing the program.
[0013] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the software component management methods described above are performed.
[0014] The present invention has one of the following beneficial technical effects: The solution proposed in the present invention adopts the concept of a framework system to establish a corresponding framework model for software components in a software asset library, such as functional modules, business components, services, workflows, code templates, metadata, etc., to support accurate recommendation of software components during the project development stage, improve the reuse rate of software modules, and thus improve the efficiency and quality of software system development. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A flowchart of a software component management method provided by an embodiment of the present invention; Figure 2 A schematic diagram of the basic structure of a software component assembly evolution framework of a software component management method provided in one embodiment of the present invention; Figure 3 A schematic diagram of commonly used association slots in a software component management method provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a software component management system provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present invention; Figure 6 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0018] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0019] According to one aspect of the present invention, an embodiment of the present invention provides a software component management method, such as Figure 1 As shown, it may include the steps of: S1, in response to receiving a software component, generating a framework model of the software component according to parameter information of the software component; S2, determining whether the same framework model exists in the software asset library; S3, in response to the absence of the same framework model, determining whether the framework model of the software component has an associated model; S4: In response to the existence of the association model, a connection is established between the framework model of the software component and the association model and stored.
[0020] The solution proposed in the present invention adopts the concept of a framework system to establish a corresponding framework model for software components in the software asset library, such as functional modules, business components, services, workflows, code templates, metadata, etc., to support accurate recommendation of software components in the project development stage, improve the reuse rate of software modules, and thus improve the efficiency and quality of software system development.
[0021] In some embodiments, in response to receiving a software component, generating a framework model of the software component according to parameter information of the software component further includes: Obtaining a framework model template, wherein the framework model template includes a description slot, a composite software component slot, an association slot, an implementation slot, a property slot, a service slot, a guarantee mechanism slot, a constraint condition slot, a first action slot, a second action slot, and a third action slot; Fill the software component name, type, path, function description, performance description, and execution environment description into the description slot; filling the composite software component slot according to the type of the software component; Filling the association slots according to the generic relationship of the software components; Filling the implementation slot according to the programming language, technical framework, code path, function library, reference table, and algorithm logic description of the software component; Fill the attribute slots according to the input value list, return value list, parameter configuration list, database table, and exception list of the software component; Fill the service slot according to the service name, communication protocol, service address, service interface and service function description of the software component; Fill the security mechanism slot according to the data conversion method, transaction processing mechanism, encryption / decryption algorithm, and log processing technology of the software component; filling the constraint slots according to a plurality of constraint expressions of the software component; Binding, creating and initializing an action performed by the software component in the first action slot; Binding in the second action slot an action performed by adding a lower-layer software component to the software component; An action executed by a lower-layer software component to which the software component belongs is bound and deleted in the third action slot.
[0022] Specifically, Figure 2 As shown, the framework model template may include 11 basic slots for describing information responsive to various aspects of a component: description, composite component, management, association, implementation, attribute, service, guarantee mechanism, constraint, and 3 actions.
[0023] The description slot provides a general description of the component through name, type, path, function, performance, execution environment, etc. The composite component slot uses an identifier to mark whether the component is a meta-component or a composite component. If it is a composite component, you also need to select the connector type; The role of the association slot is to connect related components to form a composite component network, including vertical connections and horizontal connections. Vertical connections describe the class relationship between the current component and the upper or lower layer components. Commonly used vertical association slots are as follows: Figure 3 As shown in the figure. A horizontal connection is a slot in another component framework, indicating that the current component is associated with other external components in some attributes or interactions (such as service calls); The implementation slot describes the detailed implementation information of the component from aspects such as programming language, technical framework, code path, function library, reference table, algorithm logic, etc. The attribute slot describes the basic properties of the component from the aspects of input value, return value, parameter configuration, database, exception, etc. The service slot describes the external service information if the component is a service; The guarantee mechanism slot explains the additional supporting technologies required by the component from aspects such as data conversion method, transaction processing mechanism, encryption / decryption algorithm, and log processing; The constraint slot describes the logical expression of the applicable conditions of the component. The component is allowed to be recommended only when the design-time / run-time conditions of the component are met. The IF-INITIATED slot binding creates and initializes the actions performed by the current component; The IF-ADDED slot binding is the action performed by adding a lower-level component to the current component; The IF-REMOVED slot binding deletes the action performed by the lower-level component to which the current component belongs.
[0024] In this way, by using the component framework template, all atomic components in the software asset library can be modeled, and then the atomic components can be assembled into composite components using associated slots and further iterated into larger composite components, thereby building a semantic, structured, and hierarchical framework network of software assets from the bottom up in a "Lego building block" manner. Moreover, because components can be referenced to different upper-level composite components through associated slots, they do not need to be copied repeatedly. Finally, by binding response actions to the IF-INITIATE, IF-ADDED, and IF-REMOVED slots, when the framework network changes, the entire framework network can be easily updated from top to bottom or bottom to top in a recursive manner, achieving the effect of automated maintenance.
[0025] In some embodiments, in response to the absence of an identical framework model, determining whether the framework model of the software component has an associated model further comprises: determining whether the framework model of the software component has an associated model based on the associated slot; The method further includes: in response to the association slot being empty, determining that the framework model of the software component does not have an association model; and calling the action bound in the first action slot to set the framework model of the software component as an independent root node.
[0026] In some embodiments, in response to the existence of the association model, establishing a connection between the framework model of the software component and the association model further includes: In response to the association slot being not empty, determining that an association model exists for the framework model of the software component; Finding a related model in the asset library according to the related slot; The action bound to the second action slot in the association model is called to connect the framework model of the software component with the association model.
[0027] Specifically, after a software component is developed, the framework modeling program is used to parse the component and generate the framework model A of the component, fill in the information of each slot in the template model, and especially correctly set the associated slot according to whether the component is vertically connected (such as inheritance, instance) or horizontally connected (such as service call). Then import the model into the software asset library. If the software asset library management program determines whether model A already exists, it will refuse to join and report an error if it does. If the associated slot of model A is empty, model A is used as an independent root node, and the IF-INITIATED slot of model A is called. If the associated slot of model A is not empty, the corresponding model P is retrieved in the asset library according to the side value "<component name>" of the associated slot of model A, establish a connection from A to P, and call the IF-ADDED slot of model P. After model A is added, its parent node (if it exists) needs to update the function / performance / execution environment description in its description slot to include the newly added node.
[0028] In some embodiments, it also includes: In response to receiving the query request, determining a plurality of query conditions in the query request; Based on the multiple query conditions, the search starts from multiple framework models as root nodes of the software asset library; Calculate the semantic similarity between the description of each slot in each framework model as the root node and the corresponding query condition; Take the weighted average of multiple semantic similarities obtained from the same framework model to get the final similarity and sort them from large to small, and return the top N candidate models; The source code is obtained based on the code paths recorded by the implementation slots of the top N candidate models and packaged into a software component for return.
[0029] In some embodiments, calculating the semantic similarity between the description of each slot in each framework model as a root node and the corresponding query condition further includes: Calculate semantic similarity using cosine similarity, Jaccard similarity, BM25 algorithm, or deep learning models.
[0030] In some embodiments, the code paths of the implementation slot records of the top N candidate models are used to obtain source code and package it into a software component for return, further comprising: Determining whether to retrieve a next level model based on the semantic relevance of the associated slots of each of the candidate models; In response to the semantic relevance of the associated slot of the candidate model being greater than a threshold, continuing to cyclically search in a lower layer until the semantic relevance of the associated slot of the lower layer framework model is less than the threshold or the last layer framework model is reached to obtain a plurality of framework model clusters; The source code is obtained according to the code path recorded by the implementation slot of each framework model in each framework model cluster and packaged into a software component for return.
[0031] Specifically, when developers want to query reusable software components from the software asset library, they first fill in the query conditions (i.e., slot information) according to the desired target component attributes. The software asset library manager receives the target component framework model and starts searching multiple root nodes of the software asset library. The retrieval standard is the semantic similarity of each facet value (Value of Facet) of the model. There are a variety of similarity algorithm methods to choose from, such as cosine similarity, Jaccard similarity, BM25 algorithm, etc. You can also use deep learning models to calculate similarity, such as DSSM model, ARC-I model, CNTN model, large language model LLM, etc. Take the weighted average of the calculated semantic similarity values of each facet value and take the Top-N most similar candidate models.
[0032] Starting from each candidate model, first determine whether it is necessary to retrieve the next level model based on the semantic relevance of the associated slot. If the relevance is high, continue to search in a downward loop until the relevance drops to a very low level or reaches the bottom of the framework network. If multiple model clusters are retrieved, take a weighted average of all modules in each cluster. Take the Top-K model clusters, obtain the source code based on the side value of the source code path of the model store in the cluster, restore and package it into a software component and return it to the developer.
[0033] Compared with the traditional retrieval method based on keyword matching, the solution proposed in the present invention has the following advantages: (1) Software retrieval based on the framework model can simultaneously consider the description information of multiple dimensions of software components (the framework model has multiple slots, each of which contains multiple aspects); (2) Based on the calculation correlation of semantic similarity, the retrieval accuracy is high, the generalization effect is good, and the robustness is good; (3) Through the framework's associated slots, all related descendant software components can be retrieved at once, making the retrieved information more comprehensive.
[0034] The solution proposed in the present invention adopts the concept of a framework system to establish a corresponding framework model for software components in the software asset library, such as functional modules, business components, services, workflows, code templates, metadata, etc., to support accurate recommendation of software components in the project development stage, improve the reuse rate of software modules, and thus improve the efficiency and quality of software system development.
[0035] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a software component management system 400, such as Figure 4 As shown, including: A generating module 401 is configured to generate a framework model of the software component according to parameter information of the software component in response to receiving the software component; The first determination module 402 is configured to determine whether there is an identical framework model in the software asset library; A second determination module 403 is configured to determine whether there is an associated model for the framework model of the software component in response to the absence of the same framework model; The association module 404 is configured to establish and store a connection between the framework model of the software component and the association model in response to the existence of the association model.
[0036] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a computer device 501, including: at least one processor 520; and The memory 510 stores a computer program 511 that can be run on the processor. When the processor 520 executes the program, the processor 520 performs the steps of any of the above software component management methods.
[0037] Based on the same inventive concept, according to another aspect of the present invention, Figure 6 As shown, an embodiment of the present invention further provides a computer-readable storage medium 601, which stores a computer program 610. When the computer program 610 is executed by a processor, the steps of any of the above software component management methods are performed.
[0038] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0039] Furthermore, it should be appreciated that the computer-readable storage medium (eg, memory) herein may be either volatile memory or nonvolatile memory, or may include both volatile memory and nonvolatile memory.
[0040] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic software components, blocks, modules, circuits and steps. Whether this function is implemented as software or implemented as hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0041] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0042] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0043] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0044] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0045] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A software component management method, characterized in that: The following steps are involved: In response to receiving the software component, generating a framework model of the software component according to parameter information of the software component; Determine whether the same framework model exists in the software asset library; In response to the absence of an identical framework model, determining whether the framework model of the software component has an associated model; In response to the existence of the association model, a connection between the framework model of the software component and the association model is established and stored.
2. The method according to claim 1, characterized in that In response to receiving the software component, generating a framework model of the software component according to parameter information of the software component further includes: Obtaining a framework model template, wherein the framework model template includes a description slot, a composite software component slot, an association slot, an implementation slot, a property slot, a service slot, a guarantee mechanism slot, a constraint condition slot, a first action slot, a second action slot, and a third action slot; Fill the software component name, type, path, function description, performance description, and execution environment description into the description slot; filling the composite software component slot according to the type of the software component; Filling the association slots according to the generic relationship of the software components; Filling the implementation slot according to the programming language, technical framework, code path, function library, reference table, and algorithm logic description of the software component; Fill the attribute slots according to the input value list, return value list, parameter configuration list, database table, and exception list of the software component; Fill the service slot according to the service name, communication protocol, service address, service interface and service function description of the software component; Fill the security mechanism slot according to the data conversion method, transaction processing mechanism, encryption / decryption algorithm, and log processing technology of the software component; filling the constraint slots according to a plurality of constraint expressions of the software component; Binding, creating and initializing an action performed by the software component in the first action slot; Binding in the second action slot an action performed by adding a lower-layer software component to the software component; An action executed by a lower-layer software component to which the software component belongs is bound and deleted in the third action slot.
3. The method according to claim 2, characterized in that In response to the absence of the same framework model, determining whether the framework model of the software component has an associated model further comprises: determining whether the framework model of the software component has an associated model based on the associated slot; The method further includes: in response to the association slot being empty, determining that the framework model of the software component does not have an association model; and calling the action bound in the first action slot to set the framework model of the software component as an independent root node.
4. The method according to claim 3, characterized in that In response to the existence of the association model, establishing a connection between the framework model of the software component and the association model further includes: In response to the association slot being not empty, determining that an association model exists for the framework model of the software component; Finding a related model in the asset library according to the related slot; The action bound to the second action slot in the association model is called to connect the framework model of the software component with the association model.
5. The method according to claim 3, characterized in that Also includes: In response to receiving the query request, determining a plurality of query conditions in the query request; Based on the multiple query conditions, a search is started from multiple framework models as root nodes of the software asset library; Calculate the semantic similarity between the description of each slot in each framework model as the root node and the corresponding query condition; Take the weighted average of multiple semantic similarities obtained from the same framework model to get the final similarity and sort them from large to small, and return the top N candidate models; The source code is obtained based on the code paths recorded by the implementation slots of the top N candidate models and packaged into a software component for return.
6. The method according to claim 5, characterized in that Calculating the semantic similarity between the description of each slot in each framework model as a root node and the corresponding query condition, further comprising: Calculate semantic similarity using cosine similarity, Jaccard similarity, BM25 algorithm, or deep learning models.
7. The method according to claim 5, characterized in that The method further comprises: obtaining source code based on the code paths of the implementation slot records of the first N candidate models and packaging the source code into software components for return; Determining whether to retrieve a next level model based on the semantic relevance of the associated slots of each of the candidate models; In response to the semantic relevance of the associated slot of the candidate model being greater than a threshold, continuing to cyclically search in a lower layer until the semantic relevance of the associated slot of the lower layer framework model is less than the threshold or the last layer framework model is reached to obtain a plurality of framework model clusters; The source code is obtained according to the code path recorded by the implementation slot of each framework model in each framework model cluster and packaged into a software component for return.
8. A software component management system, characterized in that: include: A generating module, configured to generate a framework model of the software component according to parameter information of the software component in response to receiving the software component; A first determination module is configured to determine whether there is an identical framework model in the software asset library; A second determination module is configured to determine whether there is an associated model for the framework model of the software component in response to the absence of the same framework model; The association module is configured to establish and store a connection between the framework model of the software component and the association model in response to the existence of the association model.
9. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
