Content matching method and device for business demand book
Through the integration of vectorized representation and multi-representation adaptive interaction layers, the accuracy of business requirements content matching is solved, and efficient information integration and performance improvement is achieved.
Patent Information
- Application Number
- CN202410697888.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-08-01
AI Technical Summary
The prior art is difficult to accurately match the content of the business demand book, resulting in inefficient matching and poor performance.
Through vectorized representation, coarse-grained and fine-grained semantic extraction, label extraction and the fusion of multi-representation adaptive interaction layers, multiple representation forms are generated to achieve accurate matching of business requirements.
Improve matching efficiency and performance, discover deep structure and potential correlation of data, optimize information integration, and reduce computing and storage requirements.
Smart Images

Figure CN120407761A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology and can be used in the field of fintech. In particular, it relates to a method and device for content matching of a business requirements document. Background Art
[0002] This section aims to provide background or context for the embodiments of the present invention described in the claims. The description herein is not admitted to be prior art merely by including it in this section.
[0003] Content matching of a business requirements document refers to matching appropriate requirements document content for the title of a target requirements document. Content and semantic extraction are key steps among them. Extracting accurate and comprehensive semantic features is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] In a first aspect, an embodiment of the present invention provides a method for content matching of a business requirements document, which is used to match highly adaptable content for the title of a target requirements document. The method includes:
[0005] Performing vectorization representation on multiple words of the title to be analyzed and corresponding tags of a business requirements document, and multiple words of each body content and corresponding tags thereof, to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each body content, and a vector set of the tags corresponding to each body content;
[0006] According to the vector set of the title, performing coarse-grained semantic extraction and fine-grained semantic extraction on the title respectively to obtain coarse-grained semantic information and fine-grained semantic information of the title;
[0007] According to the vector set of each body content, performing coarse-grained semantic extraction and fine-grained semantic extraction on each body content respectively to obtain coarse-grained semantic information and fine-grained semantic information of each body content;
[0008] Using a tag extractor, according to the vector set of the tags corresponding to the title and the vector set of the tags corresponding to each body content, performing semantic extraction on the tags corresponding to the title and the tags corresponding to each body content respectively to obtain tag representations of the tags corresponding to the title and tag representations of the tags corresponding to each body content;
[0009] Performing cross-fusion on the coarse-grained semantic information and fine-grained semantic information of the title, the coarse-grained semantic information and fine-grained semantic information of each body content, and the tag representations of the tags corresponding to the title and the tag representations of the tags corresponding to each body content to obtain a multi-representation adaptive interaction result corresponding to each body content;
[0010] Determining the body content that matches the title to be analyzed according to the multi-representation adaptive interaction result corresponding to each body content.
[0011] In a second aspect, an embodiment of the present invention provides a content matching device for a business requirement document, which is used to match content with a high degree of adaptation to the title of a target requirement document. The device includes:
[0012] A vectorization module, configured to perform vectorization representation on multiple words of the title to be analyzed and corresponding labels of a business requirement document, and multiple words of each piece of body content and corresponding labels thereof, to obtain a vector set of the title, a vector set of the labels corresponding to the title, a vector set of each piece of body content, and a vector set of the labels corresponding to each piece of body content;
[0013] A first semantic extraction module, configured to perform coarse-grained semantic extraction and fine-grained semantic extraction on the title respectively according to the vector set of the title, to obtain the coarse-grained semantic information and fine-grained semantic information of the title; perform coarse-grained semantic extraction and fine-grained semantic extraction on each piece of body content respectively according to the vector set of each piece of body content, to obtain the coarse-grained semantic information and fine-grained semantic information of each piece of body content;
[0014] A second semantic extraction module, configured to use a label extractor to perform semantic extraction on the labels corresponding to the title and the labels corresponding to each piece of body content respectively according to the vector set of the labels corresponding to the title and the vector set of the labels corresponding to each piece of body content, to obtain the label representation of the labels corresponding to the title and the label representation of the labels corresponding to each piece of body content;
[0015] A multi-representation adaptive interaction module, configured to perform cross-fusion on the coarse-grained semantic information and fine-grained semantic information of the title, the coarse-grained semantic information and fine-grained semantic information of each piece of body content, and the label representation of the labels corresponding to the title and the label representation of the labels corresponding to each piece of body content, to obtain the multi-representation adaptive interaction result corresponding to each piece of body content;
[0016] A matching module, configured to determine the body content that matches the title to be analyzed according to the multi-representation adaptive interaction result corresponding to each piece of body content.
[0017] In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned content matching method for a business requirement document is implemented.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned content matching method for a business requirement document is implemented.
[0019] Fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program that, when executed by a processor, implements the content matching method of the business requirement document.
[0020] In the embodiments of the present invention, for multiple words of the to-be-analyzed title and corresponding tags of the business requirement document, and multiple words of each piece of body content and corresponding tags, vectorization representation is performed to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each piece of body content, and a vector set of the tags corresponding to each piece of body content; according to the vector set of the title, coarse-grained semantic extraction and fine-grained semantic extraction are respectively performed on the title to obtain the coarse-grained semantic information and fine-grained semantic information of the title; according to the vector set of each piece of body content, coarse-grained semantic extraction and fine-grained semantic extraction are respectively performed on each piece of body content to obtain the coarse-grained semantic information and fine-grained semantic information of each piece of body content; a tag extractor is used to perform semantic extraction on the tags corresponding to the title and the tags corresponding to each piece of body content respectively according to the vector set of the tags corresponding to the title and the vector set of the tags corresponding to each piece of body content, to obtain the tag representation of the tags corresponding to the title and the tag representation of the tags corresponding to each piece of body content; cross-fusion is performed on the coarse-grained semantic information and coarse-grained semantic information of the title, the coarse-grained semantic information and fine-grained semantic information of each piece of body content, and the tag representation of the tags corresponding to the title and the tag representation of the tags corresponding to each piece of body content to obtain the multi-representation adaptive interaction result corresponding to each piece of body content; according to the multi-representation adaptive interaction result corresponding to each piece of body content, the body content that matches the to-be-analyzed title is determined. Through the above steps, the tag representation can be explicitly used for the subsequent matching degree calculation of the requirement document; cross-fusion is performed on these three representations of coarse-grained semantic information, fine-grained semantic information, and tag representation to obtain a multi-representation adaptive cross result. The matching based on this structure can achieve accurate body content recommendation; multi-representation fusion helps to discover potential associations and patterns between different representations, and these associations may reveal the deep structure or characteristics of the data, providing valuable clues for subsequent analysis and processing; effective integration and optimization of information such as titles, body content, and tags improve the efficiency and performance of matching. The acquisition of the above representations can be parallel computed, accelerating the fusion process and reducing the computational amount and storage requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:
[0022] Figure 1Flowchart of the content matching method for the business requirement document in the embodiments of the present invention;
[0023] Figure 2 Structural diagram of the content matching of the business requirement document in the embodiments of the present invention;
[0024] Figure 3 Structural diagram of the tag extractor in the embodiments of the present invention;
[0025] Figure 4 Structural diagram of the coarse-grained extractor in the embodiments of the present invention;
[0026] Figure 5 Structural diagram of the fine-grained extractor in the embodiments of the present invention;
[0027] Figure 6 Schematic structural diagram of the content matching device for the business requirement document in the embodiments of the present invention;
[0028] Figure 7 Schematic diagram of the computer device in the embodiments of the present invention. Detailed implementation manners
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following further describes the embodiments of the present invention in detail with reference to the accompanying drawings. Herein, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.
[0030] In the technical solutions of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.
[0031] The inventor believes that tags are the basis of content analysis, usually representing the understanding of content. At the same time, tags are also important data sources reflecting user interests, providing the most basic features for personalized recommendation. Therefore, tags should be explicitly utilized. On this basis, the efficient fusion of multi-granularity information and the efficient mining of cross-representation information both contribute to the content matching of the requirement document.
[0032] To achieve more accurate requirement document recommendations, the embodiments of the present invention propose a business requirement document recommendation method based on multi-representation fusion. First, a coarse-grained semantic information extractor is used to extract the global coarse-grained semantic representation from the entire text description. Secondly, the hierarchical structure of the content description is mined, and a fine-grained semantic information extractor is used to extract the fine-grained semantic representation containing the fine-grained structural semantics. Thirdly, through a label extractor, the label representation is directly extracted from the label information. Moreover, the extracted label representation is used to guide the extraction process of the coarse-grained and fine-grained semantic representations, and the fine-grained business semantics of the description is mined. Under the guidance of the label-driven attention mechanism, three different information extraction models are used to generate three representation forms of the requirement document title and the body content respectively. These three representations are actually complementary, and further a multi-representation adaptive interaction layer is proposed in the service recommendation process to effectively fuse the three representations, so as to perform matching and recommendation.
[0033] Figure 1 It is a flowchart of the content matching method for the business requirement document in the embodiments of the present invention, including:
[0034] Step 101: Perform vectorization representation on multiple words of the title to be analyzed and the corresponding labels of the business requirement document, and multiple words of each body content and the corresponding labels of each body content, to obtain a vector set of the title, a vector set of the labels corresponding to the title, a vector set of each body content, and a vector set of the labels corresponding to each body content;
[0035] Step 102: According to the vector set of the title, perform coarse-grained semantic extraction and fine-grained semantic extraction on the title respectively, to obtain the coarse-grained semantic information and the fine-grained semantic information of the title;
[0036] Step 103: According to the vector set of each body content, perform coarse-grained semantic extraction and fine-grained semantic extraction on each body content respectively, to obtain the coarse-grained semantic information and the fine-grained semantic information of each body content;
[0037] Step 104: Use a label extractor to perform semantic extraction on the labels corresponding to the title and the labels corresponding to each body content respectively according to the vector set of the labels corresponding to the title and the vector set of the labels corresponding to each body content, to obtain the label representation of the labels corresponding to the title and the label representation of the labels corresponding to each body content;
[0038] Step 105: Perform cross-fusion on the coarse-grained semantic information and the coarse-grained semantic information of the title, the coarse-grained semantic information and the fine-grained semantic information of each body content, and the label representation of the labels corresponding to the title and the label representation of the labels corresponding to each body content, to obtain the multi-representation adaptive interaction result corresponding to each body content;
[0039] Step 106: Determine the body content that matches the title to be analyzed according to the multi-representation adaptive interaction results corresponding to each body content.
[0040] In the embodiments of the present invention, the tag representation can be explicitly used for the subsequent matching degree calculation of the requirement document; the three representations of coarse-grained semantic information, fine-grained semantic information, and tag representation are cross-fused to obtain a multi-representation adaptive cross result. The matching based on this structure can achieve accurate body content recommendation; multi-representation fusion helps to discover potential associations and patterns between different representations, and these associations may reveal the deep structure or characteristics of the data, providing valuable clues for subsequent analysis and processing; the effective integration and optimization of information such as titles, body content, and tags improve the efficiency and performance of matching. The acquisition of the above representations can be calculated in parallel, accelerating the fusion process and reducing the computational amount and storage requirements.
[0041] The following is a detailed introduction. Figure 2 FIG. is a structural diagram of the content matching of the business requirement document in the embodiments of the present invention. The meanings of the characters are described later. In step 101, for the words of the title to be analyzed and the corresponding tags of the business requirement document, and the words of each body content and the corresponding tags of each body content, vectorization representations are performed to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each body content, and a vector set of the tags corresponding to each body content, including:
[0042] For the title to be analyzed and each body content of the business requirement document, word segmentation is performed to obtain multiple words of the title and multiple words of each body content;
[0043] Vectorization representation is performed on each word to obtain a word vector of each word;
[0044] The word vectors of the title are formed into a vector set of the title, and the word vectors of each body content are formed into a vector set of each body content;
[0045] Vectorization representations are respectively performed on the multiple tags corresponding to the title and the multiple tags corresponding to each body content to obtain a word vector of each tag;
[0046] The word vectors of the tags corresponding to the title are formed into a vector set of the tags corresponding to the title, and the word vectors of the tags corresponding to each body content are formed into a vector set of the tags corresponding to each body content.
[0047] In the above embodiments, there is one title to be analyzed, and word segmentation needs to be performed on the title to obtain multiple words. There are multiple pieces of body content to be matched, and each piece of body content includes multiple paragraphs, and each paragraph includes multiple sentences. Word segmentation needs to be performed on the sentences to obtain multiple words of each piece of body content.
[0048] As the feature most relevant to business content, the label contains the business intent of the requirements document title and the body content, and its contribution to the performance of the recommendation system is even more important than the description. Sometimes, the business requirements can be reflected by the label, while other features are irrelevant to the recommendation task. To provide accurate requirements document recommendations, special attention should be paid to the labels of the requirement content. Therefore, explicitly match with the label information and extract it through a label extractor. The label is not obtained by word segmentation but through business analysis, and multiple labels of the title and multiple labels of each body content can be obtained.
[0049] In one embodiment, each word is vectorized to obtain the word vector of each word, including:
[0050] Adopt a pre-trained model to vectorize each word to obtain the word vector of each word;
[0051] Respectively vectorize the multiple labels corresponding to the title and the multiple labels corresponding to each body content to obtain the word vector of each label, including:
[0052] Adopt a pre-trained model to respectively vectorize the multiple labels corresponding to the title and the multiple labels corresponding to each body content to obtain the word vector of each label.
[0053] Specifically, obtaining the word vector of each word and obtaining the word vector of each label can be performed in parallel. The pre-trained model uses bidirectional context modeling to train the model, that is, considering the context information before and after simultaneously during the training process, so that the model can better understand the relationships between words, phrases, and sentences, and thus obtain more accurate representations. The BERT model can be used, and directly input each word and multiple labels into the BERT model. The word vectors extracted by the BERT model already contain rich context semantics, and then enter different extractors for subsequent semantic extraction to further obtain the recommendation result.
[0054] See Figure 3 , in one embodiment, the label extractor includes an attention layer and a first output layer, where
[0055] The attention layer is used to: according to the vector set of the label, adopt the masked attention mechanism to obtain the weight set of the label, and each weight in the weight set corresponds one-to-one with each word vector in the vector set of the label;
[0056] The first output layer is used to: perform a weighted sum calculation according to the vector set of the label and the weight set to obtain the label representation of the label.
[0057] In one embodiment, the formula of the masked attention mechanism is as follows:
[0058]
[0059] Among them, are the weights in the weight set respectively, are the word vectors in the vector set of the labels respectively, f is a linear calculation, and softmax is an activation function.
[0060] In specific implementation, taking the title as an example, the set of multiple words of the title and the corresponding label v is The vector set of the title corresponding label is Then, the weight set of the title corresponding label is calculated using formula (1):
[0061]
[0062] Among them, are the weights in the weight set of the title corresponding label respectively, are the word vectors in the vector set of the title corresponding label respectively, f is a linear calculation, and softmax is an activation function.
[0063] The formula for weighted summation calculation is as follows:
[0064]
[0065] Among them, the sum of all weights in the weight set is 1, and the label representation of the title corresponding label is r Tag,v .
[0066] For each piece of body text content, the set of multiple words of each piece of body text content and the corresponding label is Tag m , and the vector set of the label corresponding to each piece of body text content is Then, the weight set of the label corresponding to each piece of body text content can be calculated using formula (2):
[0067]
[0068] Then, the label representation of the label corresponding to each piece of body text content is calculated using formula (4):
[0069]
[0070] Through the label extractor, the label representation of the title is obtained as r Tag,v , and the label representation of each piece of body text content is r Tag,m , and the output of the label extractor can be uniformly represented as r Tag . The label representation can be explicitly used for subsequent matching degree calculation.
[0071] In steps 102 and 103, both coarse-grained semantic extraction and fine-grained semantic extraction are required. When performing coarse-grained semantic extraction, a coarse-grained extractor can be used, and when performing fine-grained semantic extraction, a fine-grained extractor can be used. Figure 4 This is the structural diagram of the coarse-grained extractor in the embodiment of the present invention. The coarse-grained semantic information extractor includes a first paragraph-level extraction layer, a label-driven attention mechanism layer, and a second output layer; among them,
[0072] The first paragraph-level extraction layer is used to obtain the paragraph matrix representation of the object according to the word vectors of all the words of the object, and the object is the title or each piece of text content;
[0073] The label-driven attention mechanism layer is used to obtain the coarse-grained semantic information of the object by using the label-driven attention mechanism according to the paragraph matrix representation of the object;
[0074] The second output layer is used to output the coarse-grained semantic information of the object.
[0075] Figure 5 This is the structural diagram of the fine-grained extractor in the embodiment of the present invention. The fine-grained semantic information extractor includes a sentence-level extraction layer, a label-driven sentence-level attention mechanism layer, a second paragraph-level extraction layer, a label-driven paragraph-level attention mechanism layer, and a third output layer; among them,
[0076] The sentence-level extraction layer is used to obtain the sentence matrix representation of the object according to the word vectors of all the words of the object;
[0077] The label-driven sentence-level attention mechanism layer is used to obtain the attention mechanism sentence matrix representation of the object by using the label-driven sentence-level attention mechanism according to the sentence matrix representation of the object;
[0078] The second paragraph-level extraction layer is used to obtain the paragraph matrix representation of the object according to the attention mechanism sentence matrix representation of the object;
[0079] The label-driven paragraph-level attention mechanism layer is used to obtain the fine-grained semantic information of the object by using the label-driven paragraph-level attention mechanism according to the paragraph matrix representation of the object;
[0080] The third output layer is used to output the fine-grained semantic information of the object.
[0081] The multiple representations extracted by different extractors describe the requirements of the same title or text content from different perspectives. Therefore, there is a certain internal correlation between different representations, and the information of multiple representations is complementary. Directly using a simple concatenation method to fuse multi-granularity representations may not be able to effectively explore the internal connections between representations and may not be able to select the representations that are more useful for the recommendation effect. In addition to using the original feature representations extracted from the descriptive text, exploring the correlations between multiple representations can also improve the performance of the model to a certain extent. And in the process of fusing different representations, reducing the impact of inaccurate representations on the recommendation system helps to improve the overall recommendation effect. Therefore, an efficient fusion method is needed to explore the cross-information across representations.
[0082] To deeply explore the relationships between the three representations and efficiently mine cross-representation information, a multi-representation adaptive interaction layer is proposed in the multi-representation fusion recommendation method to capture the internal correlations between different representations and adaptively learn the importance of different representations, thereby further promoting the effective fusion of multiple representations and improving the recommendation effect.
[0083] In one embodiment, cross-fusion is performed on the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each text content, the label representation of the label corresponding to the title and the label representation of the label corresponding to each text content to obtain the multi-representation adaptive interaction result corresponding to each text content, including:
[0084] Using a variety of cross-fusion algorithms, cross-fusion is respectively performed on the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each text content, the label representation of the label corresponding to the title and the label representation of the label corresponding to each text content to obtain a variety of adaptive interaction representations corresponding to each text content;
[0085] Connect the variety of adaptive interaction representations to obtain the multi-representation adaptive interaction result.
[0086] There are a variety of cross-fusion algorithms. Among them, the formula of the cross-fusion algorithm is as follows:
[0087] r cross =exp[z fine-grained,v lnr fine-grained,v +z coarse-grained,v lnr coarse-grained,v +z tag, v lnr tag,v +z fine-grained,m lnr fine-grained,m +z coarse-grained,m lnr coarse-grained,m +z tag,m lnr tag,m (5)
[0088] Among them, r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are respectively the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content, z fine-grained,v , z coarse-grained,v , z tag,v , z fine-grained,m , z coarse-grained,m , z tag,m are respectively the importance parameter values corresponding to the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content.
[0089] The importance parameter values are learnable parameters.
[0090] Among them again, the formula of the cross-fusion algorithm is as follows:
[0091]
[0092] Among them, r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are respectively the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content, is the product operation.
[0093] In order to deeply explore the relationship between the title and text representations, in the multi-representation adaptive interaction layer, not only a single cross-representation of multiple representations is generated, but multiple cross-representations are generated, so as to comprehensively obtain the cross-representation information between multiple representations of the title and text. Therefore, the multi-representation adaptive interaction layer has D heads, and each head adaptively learns a cross-representation, which is formally represented as Then the multiple cross-representations obtained are concatenated to obtain the output of the multi-representation adaptive interaction layer:
[0094]
[0095] Among them, denotes connecting D vectors r i cross to form a new vector.
[0096] Therefore, the matching degree is calculated for the output of the multi-representation adaptive interaction layer of the target title and the body content to evaluate the body content candidate that is closest to the target title in terms of business. That is, for the sample to be predicted, the three representations of the target title and the three representations of the body are passed through the multi-representation adaptive interaction layer, and the obtained result is input into the multi-layer perceptron to obtain the final prediction.
[0097] In one embodiment, determining the body content that matches the title to be analyzed according to the multi-representation adaptive interaction result corresponding to each body content includes:
[0098] Calculating the matching degree between the title and each body content according to the multi-representation adaptive interaction result corresponding to each body content;
[0099] Determining the body content with the highest matching degree as the body content that matches the title to be analyzed.
[0100] Specifically, during implementation, through the multi-layer perceptron, is calculated, and finally it is predicted whether there is a call relationship between the target title and the body content, that is, predicting as:
[0101]
[0102] During training, the loss function adopted in the embodiment of the present invention is the cross-entropy loss function, that is, the overall objective function is
[0103]
[0104] Among them, is the matching degree, MLP is the multi-layer perceptron, sigmoid is the activation function, r v and r m are the title representation and the content representation respectively, l is the objective function of the multi-layer perceptron, and y is the matching degree label.
[0105] The embodiment of the present invention also proposes a content matching device for a business requirement document, the principle of which is similar to the content matching method for a business requirement document, and will not be elaborated here.
[0106] Figure 6 is a schematic diagram of the content matching device for a business requirement document in the embodiment of the present invention, including:
[0107] The vectorization module 601 is used to perform vectorization representation on multiple words of the to-be-analyzed title and corresponding tags of the business requirement document, and multiple words of each piece of body content and corresponding tags, to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each piece of body content, and a vector set of the tags corresponding to each piece of body content;
[0108] The first semantic extraction module 602 is used to perform coarse-grained semantic extraction and fine-grained semantic extraction on the title respectively according to the vector set of the title, to obtain the coarse-grained semantic information and fine-grained semantic information of the title; perform coarse-grained semantic extraction and fine-grained semantic extraction on each piece of body content respectively according to the vector set of each piece of body content, to obtain the coarse-grained semantic information and fine-grained semantic information of each piece of body content;
[0109] The second semantic extraction module 603 is used to adopt a tag extractor to perform semantic extraction on the tags corresponding to the title and the tags corresponding to each piece of body content respectively according to the vector set of the tags corresponding to the title and the vector set of the tags corresponding to each piece of body content, to obtain the tag representations of the tags corresponding to the title and the tag representations of the tags corresponding to each piece of body content;
[0110] The multi-representation adaptive interaction module 604 is used to perform cross-fusion on the coarse-grained semantic information and fine-grained semantic information of the title, the coarse-grained semantic information and fine-grained semantic information of each piece of body content, and the tag representations of the tags corresponding to the title and the tag representations of the tags corresponding to each piece of body content, to obtain the multi-representation adaptive interaction results corresponding to each piece of body content;
[0111] The matching module 605 is used to determine the body content that matches the to-be-analyzed title according to the multi-representation adaptive interaction results corresponding to each piece of body content.
[0112] In one embodiment, the vectorization module is specifically used for:
[0113] Perform word segmentation on the to-be-analyzed title and each piece of body content of the business requirement document to obtain multiple words of the title and multiple words of each piece of body content;
[0114] Perform vectorization representation on each word to obtain the word vector of each word;
[0115] Form a vector set of the title with the word vectors of the title, and form a vector set of each piece of body content with the word vectors of each piece of body content;
[0116] Perform vectorization representation on multiple tags corresponding to the title and multiple tags corresponding to each piece of body content respectively to obtain the word vectors of each tag;
[0117] Form a vector set of the title by using the word vectors corresponding to the title tags, and form a vector set of each body content by using the word vectors corresponding to the tags of each body content.
[0118] In one embodiment, the vectorization module is specifically configured to:
[0119] Adopt a pre-trained model to perform vectorization representation on each word to obtain the word vector of each word;
[0120] Perform vectorization representation on the multiple tags corresponding to the title and the multiple tags corresponding to each body content respectively to obtain the word vectors of each tag, including:
[0121] Adopt a pre-trained model to perform vectorization representation on the multiple tags corresponding to the title and the multiple tags corresponding to each body content respectively to obtain the word vectors of each tag.
[0122] In one embodiment, the tag extractor includes an attention layer and an output layer, wherein,
[0123] The attention layer is used to: according to the vector set of the tags, adopt a masked attention mechanism to obtain a weight set of the tags, and each weight in the weight set corresponds one-to-one to each word vector in the vector set of the tags;
[0124] The output layer is used to: perform weighted sum calculation according to the vector set of the tags and the weight set to obtain the tag representation of the tags.
[0125] In one embodiment, the formula of the masked attention mechanism is as follows:
[0126]
[0127] Wherein, Are respectively the weights in the weight set, Are respectively the word vectors in the vector set of the tags, f is a linear calculation, and softmax is an activation function.
[0128] In one embodiment, the multi-representation adaptive interaction module is specifically configured to:
[0129] Adopt a variety of cross-fusion algorithms to perform cross-fusion on the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each body content, and the tag representations of the tags corresponding to the title and the tag representations of the tags corresponding to each body content respectively to obtain a variety of adaptive interaction representations corresponding to each body content;
[0130] Connect the variety of adaptive interaction representations to obtain a multi-representation adaptive interaction result.
[0131] In one embodiment, the formula of the cross-fusion algorithm is as follows:
[0132] r cross = exp[z fine-grained,v ln r fine-grained,v + z coarse-grained,v ln r coarse-grained,v + z tag, v ln r tag,v + z fine-grained,m ln r fine-grained,m + z coarse-grained,m ln r coarse-grained,m + z tag,m ln r tag,m
[0133] where r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content respectively, and z fine-grained,v , z coarse-grained,v , z tag,v , z fine-grained,m , z coarse-grained,m , z tag,m are the importance parameter values corresponding to the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content respectively.
[0134] In one embodiment, the formula of the cross-fusion algorithm is as follows:
[0135]
[0136] where r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content respectively, is the product operation.
[0137] In one embodiment, the matching module is specifically configured to:
[0138] Calculate the matching degree between the title and each body content according to the multi-representation adaptive interaction results corresponding to each body content;
[0139] Determine the body content with the highest matching degree as the body content that matches the title to be analyzed.
[0140] In summary, in the method and device proposed in the embodiments of the present invention, the tag representation can be explicitly used for subsequent matching degree calculation of the requirement document; the three representations of coarse-grained semantic information, fine-grained semantic information, and tag representation are cross-fused to obtain a multi-representation adaptive cross result. The matching based on this structure can achieve accurate body content recommendation; multi-representation fusion helps to discover potential associations and patterns between different representations, and these associations may reveal the deep structure or characteristics of the data, providing valuable clues for subsequent analysis and processing; the effective integration and optimization of information such as titles, body contents, and tags improve the efficiency and performance of matching. The acquisition of the above representations can be calculated in parallel, accelerating the fusion process, reducing the amount of calculation and storage requirements.
[0141] The embodiments of the present invention also provide a computer device, Figure 7 which is a schematic diagram of the computer device in the embodiments of the present invention. The computer device 700 includes a memory 710, a processor 720, and a computer program 730 stored on the memory 710 and executable on the processor 720. When the processor 720 executes the computer program 730, the content matching method of the above business requirement document is implemented.
[0142] The embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the content matching method of the above business requirement document is implemented.
[0143] The embodiments of the present invention also provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the content matching method of the above business requirement document is implemented.
[0144] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0146] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0148] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A content matching method for a business requirement document, characterized in that, Including: Performing vectorization representation on multiple words of the to-be-analyzed title and corresponding tags in the business requirement document, as well as multiple words of each piece of body content and corresponding tags, to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each piece of body content, and a vector set of the tags corresponding to each piece of body content; According to the vector set of the title, performing coarse-grained semantic extraction and fine-grained semantic extraction on the title respectively to obtain the coarse-grained semantic information and fine-grained semantic information of the title; According to the vector set of each piece of body content, performing coarse-grained semantic extraction and fine-grained semantic extraction on each piece of body content respectively to obtain the coarse-grained semantic information and fine-grained semantic information of each piece of body content; Using a tag extractor, according to the vector set of the tags corresponding to the title and the vector set of the tags corresponding to each piece of body content, performing semantic extraction on the tags corresponding to the title and the tags corresponding to each piece of body content respectively to obtain the tag representation of the tags corresponding to the title and the tag representation of the tags corresponding to each piece of body content; Performing cross-fusion on the coarse-grained semantic information and fine-grained semantic information of the title, the coarse-grained semantic information and fine-grained semantic information of each piece of body content, and the tag representation of the tags corresponding to the title and the tag representation of the tags corresponding to each piece of body content to obtain the multi-representation adaptive interaction result corresponding to each piece of body content; According to the multi-representation adaptive interaction result corresponding to each piece of body content, determining the body content that matches the to-be-analyzed title.
2. The method according to claim 1, characterized in that, Performing vectorization representation on multiple words of the to-be-analyzed title and corresponding tags in the business requirement document, as well as multiple words of each piece of body content and corresponding tags, to obtain a vector set of the title, a vector set of the tags corresponding to the title, a vector set of each piece of body content, and a vector set of the tags corresponding to each piece of body content, including: Performing word segmentation on the to-be-analyzed title and each piece of body content in the business requirement document to obtain multiple words of the title and multiple words of each piece of body content; Performing vectorization representation on each word to obtain the word vector of each word; Forming a vector set of the title with the word vectors of the title, and forming a vector set of each piece of body content with the word vectors of each piece of body content; Performing vectorization representation on multiple tags corresponding to the title and multiple tags corresponding to each piece of body content respectively to obtain the word vector of each tag; Forming a vector set of the tags corresponding to the title with the word vectors of the tags corresponding to the title, and forming a vector set of the tags corresponding to each piece of body content with the word vectors of the tags corresponding to each piece of body content.
3. The method according to claim 2, wherein Performing vectorization representation on each word to obtain the word vector of each word, including: Using a pre-trained model to perform vectorization representation on each word to obtain the word vector of each word, the pre-trained model; Performing vectorization representation on multiple tags corresponding to the title and multiple tags corresponding to each piece of body content respectively to obtain the word vector of each tag, including: Using a pre-trained model to perform vectorization representation on multiple tags corresponding to the title and multiple tags corresponding to each piece of body content respectively to obtain the word vector of each tag.
4. The method according to claim 1, characterized in that, The tag extractor includes an attention layer and an output layer, where, The attention layer is used to: according to the vector set of tags, adopt the masked attention mechanism to obtain the weight set of tags, where each weight in the weight set corresponds one-to-one with each word vector in the vector set of tags; The output layer is used to: perform weighted sum calculation according to the vector set of tags and the weight set to obtain the tag representation of the tags.
5. The method according to claim 4, wherein The formula of the masked attention mechanism is as follows: Among them, are the weights in the weight set respectively, are the word vectors in the vector set of labels respectively, f is a linear calculation, and softmax is an activation function.
6. The method according to claim 1, wherein Cross-fuse the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each body content, the tag representation of the tag corresponding to the title and the tag representation of the tag corresponding to each body content to obtain the multi-representation adaptive interaction result corresponding to each body content, including: Adopt multiple cross-fusion algorithms to cross-fuse the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each body content, the tag representation of the tag corresponding to the title and the tag representation of the tag corresponding to each body content respectively to obtain multiple adaptive interaction representations corresponding to each body content; Connect the multiple adaptive interaction representations to obtain the multi-representation adaptive interaction result.
7. The method according to claim 6, wherein The formula of the cross-fusion algorithm is as follows: r cross = exp[z fine-grained,v lnr fine-grained,v +z coarse-grained,v lnr coarse-grained,v +z tag,v lnr tag,v +z fine -grained,m lnr fine-grained,m +z coarse-grained,m lnr coarse-grained,m +z tag,m lnr tag,m Among them, r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the body content, the coarse-grained semantic information of the body content, and the label representation of the label corresponding to the body content respectively, z fine-grained,v , z coarse-grained,v , z tag,v , z fine-grained,m , z coarse-grained,m , z tag,m are the importance parameter values corresponding to the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the body content, the coarse-grained semantic information of the body content, and the label representation of the label corresponding to the body content respectively.
8. The method according to claim 6, wherein The formula of the cross-fusion algorithm is as follows: where r cross is the adaptive interaction representation, r fine-grained,v , r coarse-grained,v , r tag,v , r fine-grained,m , r coarse-grained,m , r tag,m are the fine-grained semantic information of the title, the coarse-grained semantic information of the title, the label representation of the label corresponding to the title, the fine-grained semantic information of the text content, the coarse-grained semantic information of the text content, and the label representation of the label corresponding to the text content, respectively. is the product operation.
9. The method according to claim 1, wherein According to the multi-representation adaptive interaction result corresponding to each body content, determine the body content that matches the title to be analyzed, including: Calculate the matching degree between the title and each body content according to the multi-representation adaptive interaction result corresponding to each body content; Determine the body content with the highest matching degree as the body content that matches the title to be analyzed.
10. A content matching device for a business requirement document, characterized in that, Including: The vectorization module is used to perform vectorization representation on multiple words of the title to be analyzed and the corresponding tags of the business requirements document, multiple words of each body content and the corresponding tags of each body content to obtain the vector set of the title, the vector set of the tags corresponding to the title, the vector set of each body content, and the vector set of the tags corresponding to each body content; The first semantic extraction module is used to respectively perform coarse-grained semantic extraction and fine-grained semantic extraction on the title according to the vector set of the title to obtain the coarse-grained semantic information and the fine-grained semantic information of the title; respectively perform coarse-grained semantic extraction and fine-grained semantic extraction on each body content according to the vector set of each body content to obtain the coarse-grained semantic information and the fine-grained semantic information of each body content; The second semantic extraction module is used to adopt a tag extractor to respectively perform semantic extraction on the tag corresponding to the title and the tag corresponding to each body content according to the vector set of the tag corresponding to the title and the vector set of the tag corresponding to each body content to obtain the tag representation of the tag corresponding to the title and the tag representation of the tag corresponding to each body content; The multi-representation adaptive interaction module is used to cross-fuse the coarse-grained semantic information of the title and the coarse-grained semantic information, the coarse-grained semantic information and the fine-grained semantic information of each body content, the tag representation of the tag corresponding to the title and the tag representation of the tag corresponding to each body content to obtain the multi-representation adaptive interaction result corresponding to each body content; The matching module is used to determine the body content that matches the title to be analyzed according to the multi-representation adaptive interaction result corresponding to each body content.
11. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.