CN-121996205-A - Automatic writing method and system for demand analysis
Abstract
The application relates to the technical field of computer software demand analysis and automation, and discloses an automatic writing method and system for demand analysis, wherein the method comprises the steps of constructing a domain knowledge graph comprising component mutual exclusion and dependency relationship, and deducing and generating a component compatibility matrix; the method comprises the steps of converting unstructured demand texts into structured features by using a natural language processing algorithm, generating a virtual configuration list by combining a map, performing conflict detection based on a compatibility matrix and a supervision protocol, quantifying topological connectivity by calculating the sum of the ingress and egress of a component in the map when a violation is detected, automatically correcting by searching a substitute component according to the topological connectivity, monitoring a change event, calculating an influence domain by using a weight conduction algorithm, triggering local re-verification, finally generating a descriptive text, and performing consistency check by reversely extracting numerical values. According to the application, the configuration verification efficiency and the correction stability are improved through matrix operation and topology analysis, and the accuracy of the required analysis document is ensured.
Inventors
- QIAO GUANFENG
- ZHANG KESHENG
- LI ZHUN
- WEI BINGJIE
Assignees
- 中国建设银行股份有限公司河北省分行
Dates
- Publication Date
- 20260508
- Application Date
- 20251225
Claims (10)
- 1. An automatic writing method facing to demand analysis is characterized by comprising the following steps: S1, initializing and constructing a knowledge base, namely constructing a domain knowledge graph comprising a software component, a hardware specification and a supervision specification, and deriving and generating a component compatibility matrix through logic operation according to mutual exclusion relation and dependency relation in the domain knowledge graph; s2, demand information structuralization extraction, namely receiving unstructured demand text, and converting the unstructured demand text into structuralized characteristics comprising a software entity set, hardware constraint conditions and unstructured demand index vectors by using a natural language processing algorithm; S3, virtual configuration mapping and initial verification, namely generating a virtual configuration list comprising software stack combinations and hardware specification parameters according to the structural features and the domain knowledge graph; s4, configuration conflict detection and correction, namely inquiring the component compatibility matrix and the supervision protocol in the domain knowledge graph, performing internal compatibility calculation and external compliance verification on the virtual configuration list, and automatically searching a substitute component when the compatibility conflict and compliance violation are detected, updating the virtual configuration list and re-executing detection until a verified configuration scheme is generated; s5, dynamic change influence analysis, namely monitoring an update event of knowledge base data and a change event of demand input, calculating a change influence domain through a weight conduction algorithm based on a dependency relationship in the domain knowledge graph, and triggering local re-verification of an affected area; And S6, document generation and consistency output, namely filling the configuration scheme and the nonfunctional requirement indexes which pass through verification into document templates stored in a knowledge base, generating descriptive texts by using a natural language generation algorithm, and outputting a requirement analysis document after numerical consistency check is performed.
- 2. The automated writing method for demand analysis according to claim 1, wherein in step S1, a component compatibility matrix is derived and generated through a logic operation according to mutual exclusion relation and dependency relation in the domain knowledge graph, and the generating of the component compatibility matrix specifically includes: Traversing mutual exclusion relation in the domain knowledge graph, and marking the corresponding coordinate position of the component pair with the direct mutual exclusion relation in the component compatibility matrix as a forbidden mark; Traversing the dependency relationship in the domain knowledge graph, when the first component depends on the second component, acquiring a row vector corresponding to the second component in the component compatibility matrix, merging forbidden marks in the row vector corresponding to the second component into the row vector corresponding to the first component through logical sum operation, and transmitting constraint conditions of the second component to the first component along a dependency chain.
- 3. The automated writing method for demand analysis according to claim 1, wherein in step S2, the unstructured demand text is converted into structured features by using a natural language processing algorithm, and the converting the unstructured demand text into structured features specifically includes: Performing sequence labeling on the unstructured required text by using a BERT-BiLSTM-CRF-based composite network structure, calculating to obtain probability distribution of entity boundary labels corresponding to each character in a text sequence by performing operation on a Softmax function of a network output layer, and decoding according to a Viterbi algorithm to obtain an optimal label sequence; Inputting the identified entity-named text fragments into a BERT model, acquiring semantic embedded vectors of the entity-named text fragments, acquiring semantic embedded vectors stored by each standard entity name in the domain knowledge graph, calculating cosine similarity scores between the semantic embedded vectors of the entity-named text fragments and the semantic embedded vectors of each standard entity name by dividing dot products of the two vectors by L2 norms of the two vectors, and taking the standard knowledge entity with the highest score as a mapping result; and analyzing the dependency path between the entity and the index by utilizing a dependency syntax analysis algorithm, and converting the text description into a semantic triplet containing numerical values and logical operators.
- 4. The automated writing method for demand analysis according to claim 1, wherein in step S2, the method further comprises a step of vectorizing and mapping the non-functional demands, and the vectorizing and mapping step specifically includes: Taking qualitative descriptions contained in the text as index key values, carrying out matching inquiry in a business scene reference table stored in the knowledge base, and obtaining a corresponding numerical interval as a determined boundary constraint condition; and carrying out unit normalization processing on the boundary constraint conditions obtained through quantitative deduction, and splicing according to the dimension sequence of the nonfunctional demand indexes to construct the nonfunctional demand feature vector.
- 5. The automated writing method for demand analysis according to claim 1, wherein in step S4, when a compatibility conflict and a compliance violation are detected, an alternative component is automatically searched, the virtual configuration list is updated, and updating the virtual configuration list specifically includes: Analyzing a conflict component set which causes verification failure, quantifying the topological connectivity of each component in the conflict component set by counting the sum of the ingress and egress of each component in the domain knowledge graph, and taking the quantified topological connectivity as a replacement cost gradient; locking the component with the minimum replacement cost gradient as a target component to be replaced; searching a group of candidate substitute components meeting nonfunctional requirement indexes in the domain knowledge graph by taking the entity type and the functional label of the target component as indexes; And placing the candidate replacement components into a virtual environment one by one, calculating compatibility scores of the candidate replacement components and other components in the list through inquiring a component compatibility matrix, and selecting the candidate component with the highest score as a correction replacement item.
- 6. The automated writing method for demand analysis according to claim 1, wherein in step S5, a change influence domain is calculated by a weight conduction algorithm based on a dependency relationship in the domain knowledge graph, and the calculating the change influence domain specifically includes: positioning a change source node in the domain knowledge graph, and setting an initial influence weight value of the change source node as a maximum value; Performing reverse traversal along the dependency relationship side in the domain knowledge graph to obtain an upstream parent node of the current node; The influence weight value of the current node is multiplied by the coupling strength coefficient stored on the side of the dependency relationship, and the conduction weight value transmitted to the upstream father node is obtained through calculation; And judging whether the conduction weight value is larger than a propagation threshold value stored in a knowledge base, if so, adding the current upstream parent node into a queue to be processed, and continuously executing the reverse traversal and the weight calculation to form cascade calculation until the queue is empty, thereby determining all affected node sets.
- 7. An automated writing method for demand analysis according to claim 6, wherein the triggering of a local re-verification of the affected area comprises in particular: Querying the component compatibility matrix, and acquiring neighbor nodes with non-zero value association of all affected nodes in the matrix; merging the affected nodes with the neighbor nodes to construct a minimum re-verification subset; Compatibility logic verification and compliance rule matching is performed only for combinations of components within the minimum re-verification subset.
- 8. The automated writing method for demand analysis according to claim 1, wherein in step S6, a numerical consistency check is performed, and the numerical consistency check specifically includes: Performing regular matching and dependency analysis on descriptive text generated by the natural language generation algorithm, and reversely extracting a number of words and technical nouns contained in the descriptive text as an extraction data set; calculating a difference between the values in the extracted dataset and the original values in the validated configuration scheme by performing a subtraction operation on the values; And judging whether the difference value is zero, if not, judging that the consistency check fails, and triggering the local regeneration logic.
- 9. The automated writing method for demand analysis according to claim 1, wherein in step S3, generating the virtual configuration list specifically includes: taking the nonfunctional demand index vector as input, and calculating to obtain initial hardware specification parameters through a quantization mapping model stored in a knowledge base; And taking the software entity set and the hardware specification parameters as inputs together, and generating a virtual configuration list comprising software stack topology and hardware deployment scheme by inquiring the association relation and deployment rule in the domain knowledge graph.
- 10. An automated authoring system for use in an automated authoring method for demand analysis according to any one of claims 1-9, comprising: The system comprises a knowledge base maintenance module, a demand information extraction module, a demand information processing module and a data processing module, wherein the knowledge base maintenance module is used for constructing a domain knowledge map comprising a software component, a hardware specification and a supervision protocol, and generating a component compatibility matrix through logical operation according to a mutual exclusion relation and a dependency relation; The non-functional requirement collocation mapping and virtual verification module is configured to generate a virtual collocation list according to the structural features and the domain knowledge graph, and conflict detection and automatic correction are carried out on the virtual collocation list by utilizing the component compatibility matrix and the supervision protocol until a verified collocation scheme is generated; the dynamic demand change analysis module is configured to monitor change events, calculate change influence domains through a weight conduction algorithm based on the domain knowledge graph, and trigger the non-functional demand configuration mapping and virtual verification module to execute local re-verification; the demand analysis document generation and optimization module is configured to receive the verified configuration scheme and generate and optimize a demand analysis document; The model selection and training module is configured to construct, train and update a semantic understanding model for the requirement information extraction module and a natural language generation model for the requirement analysis document generation and optimization module.
Description
Automatic writing method and system for demand analysis Technical Field The invention relates to the technical field of computer software demand analysis and automation, in particular to an automatic writing method and system for demand analysis. Background The credit transformation is a key measure for preventing the risk of network attack and the risk of interruption of a supply chain, and relates to the reconstruction and migration of the architecture of a large-scale stock system. In the process, the demand analysis work not only needs to accurately meet the specific requirements of basic software such as domestic operating systems, databases and middleware on performance indexes and interface specifications, but also needs to adapt to the dynamic environment brought by the rapid iteration and frequent update of domestic software versions, and the demand analysis process is required to have higher flexibility and compatibility adaptation capability. Existing software engineering methodologies have limitations in coping with such complex trafficking scenarios. The traditional waterfall model depends on a linear flow, is difficult to respond in time when the information creation technology stack is frequently changed, is easy to cause that a required document is lagged behind an actual development state, and cannot effectively guide subsequent work. While agile development emphasizes iterative interactions, there is often a lack of adequate systematic analysis means when dealing with deep compatibility issues involving underlying native hardware instruction set adaptations or middleware interface protocols. In addition, the common use case analysis method mainly focuses on the carding of functional logic, and is insufficient in attention to non-functional requirements such as system performance, data safety, high availability and the like which are very critical in the credit modification, so that the reliability construction of a comprehensive support system is difficult. In the aspect of automatic auxiliary tools, most of the prior art is not specially optimized for domestic software and hardware environments, and the compatibility conflict recognition capability between domestic basic software is limited. In the face of rapid evolution of belief-creating software, these tools often lack sufficient rule dynamic update capability, cannot automatically adapt to changes in the underlying dependent environment, resulting in tedious demand analysis processes and susceptibility to human error. Meanwhile, the existing tools generally lack deep quantitative analysis and closed loop verification functions for nonfunctional requirements, and strict standards of system safety and stability caused by credit transformation are difficult to meet. Disclosure of Invention Aiming at the defects of the prior art, the invention provides an automatic writing method and system for demand analysis, which solve the problems that the accuracy of converting unstructured text into technical specifications in the demand analysis of a complex system is poor, the verification of multi-level dependence and compatibility among components is difficult, and the generated document is inconsistent with the original data. In order to achieve the purpose, the automatic writing method and system for the demand analysis are achieved through the following technical scheme. The first aspect of the present invention provides an automated writing method for demand analysis, including: And constructing a domain knowledge graph comprising software components, hardware specifications and supervision conventions, and initializing a knowledge base. On the basis, a component compatibility matrix is deduced and generated through logic operation according to mutual exclusion relation and dependency relation in the domain knowledge graph. Specifically, the process traverses mutual exclusion relations in the atlas to mark forbidden terms, traverses dependency relations at the same time, acquires row vectors corresponding to the dependent components, merges forbidden identifications in the forbidden identifications into the row vectors of the dependent components through logical OR operation, and accordingly transfers constraint conditions along a dependency chain to calculate and mark implicit conflicts. And receiving unstructured demand text, and converting the unstructured demand text into structured features by using a natural language processing algorithm, wherein the structured features comprise a software entity set, hardware constraint conditions and an unstructured demand index vector. In the processing process, the text is marked in sequence by utilizing a composite network structure based on BERT-BiLSTM-CRF, the probability distribution of the entity boundary label corresponding to the character is calculated, and decoding is carried out according to the Viterbi algorithm to identify the entity boundary. Aiming at the identified entity reference