Professional document generation method and device, equipment, storage medium and program product

By using professional document generation model and document standardized processing model, the problem of low writing efficiency is solved and efficient and standardized document generation is achieved.

CN119416759AActive Publication Date: 2025-02-11DAWNING CLOUD COMPUTING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411419398.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-11
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

During the process of generating professional documents, the writing efficiency is low, which results in a lot of time and labor consuming manual review and modification.

Method used

By obtaining the initial text and using the professional document generation model to generate the initial professional document structure, and then standardizing the document structure according to the document specification processing model, professional documents that meet the specifications are generated.

Benefits of technology

It improves the efficiency and standardization of professional documents, reduces the time and cost of manual review and modification, and avoids invalid writing caused by incompatibility with writing standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416759A_ABST
    Figure CN119416759A_ABST
Patent Text Reader

Abstract

The invention relates to a professional document generation method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring an initial text, and generating an initial professional document according to the initial text and a professional document generation model; performing standard processing on the document structure of the initial professional document according to a document standard processing model to obtain a standard professional document; wherein the document specification processing model is obtained by training according to a plurality of sample initial professional documents and sample specification professional documents corresponding to the sample initial professional documents. By adopting the method, the writing efficiency of the professional document can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method, apparatus, computer equipment, computer-readable storage medium and computer program product for generating professional documents. Background Art

[0002] Usually, in the process of generating professional documents, the first draft needs to be reviewed before submission or publication, so that it can be submitted or published after it has passed the review. For example, taking the patent document to be applied for as an example, the first draft can be written based on the technical briefing book, and then the patent document can be submitted after the first draft has passed the review.

[0003] However, in the process of generating the above-mentioned professional documents, there is a problem of relatively low efficiency in writing professional documents. Summary of the invention

[0004] Based on this, it is necessary to provide a professional document generation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of writing professional documents in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for generating professional documents. The method comprises:

[0006] Obtaining an initial text, and generating an initial professional document based on the initial text and a professional document generation model;

[0007] According to the document standardization processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document;

[0008] The document standard processing model is obtained by training based on a plurality of sample initial professional documents and sample standard professional documents corresponding to each of the sample initial professional documents.

[0009] In one embodiment, the document standard processing model includes a first segmentation layer, a first matching layer and a paragraph processing layer. The document structure of the initial professional document is standardized according to the document standard processing model to obtain a standardized professional document, including:

[0010] Using the first segmentation layer to segment the initial professional document into paragraphs, to obtain a plurality of paragraphs to be matched;

[0011] For each of the to-be-matched paragraphs, using the first matching layer to perform paragraph matching processing on the to-be-matched paragraphs to obtain at least one matching paragraph;

[0012] The paragraph processing layer is used to standardize the document structure of the initial professional document according to each matching paragraph to obtain the standardized professional document.

[0013] In one embodiment, the paragraph processing layer includes a second segmentation layer, a second matching layer and a sentence processing layer. The paragraph processing layer is used to standardize the document structure of the initial professional document according to each matching paragraph to obtain the standardized professional document, including:

[0014] Using the second segmentation layer to perform sentence segmentation processing on each of the matching paragraphs to obtain a plurality of sentences to be matched;

[0015] For each of the to-be-matched sentences, use the second matching layer to perform sentence matching processing on the to-be-matched sentences to obtain at least one matching sentence;

[0016] The sentence processing layer is used to standardize the document structure of the initial professional document according to each matching sentence to obtain the standardized professional document.

[0017] In one embodiment, generating an initial professional document based on the initial text and a professional document generation model includes:

[0018] Performing similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to a plurality of standard professional documents;

[0019] When the evaluation result is that the initial text meets the professional document generation condition, the initial professional document is generated according to the initial text and the professional document generation model.

[0020] In one embodiment, the query knowledge base includes the first vector corresponding to each of the standard professional documents, and the similarity evaluation of the initial text is performed according to the preset query knowledge base to obtain the evaluation result, including:

[0021] Performing vectorization processing on the initial text to obtain a second vector corresponding to the initial text;

[0022] Determine, based on the second vector, a target vector similar to the second vector from among the first vectors;

[0023] The evaluation result is determined according to the second vector and the target vector.

[0024] In one embodiment, determining the evaluation result according to the second vector and the target vector includes:

[0025] Calculating the similarity between the second vector and the target vector;

[0026] If the similarity is less than a preset similarity threshold, determining that the evaluation result is that the initial text meets the professional document generation condition;

[0027] If the similarity is greater than or equal to the similarity threshold, it is determined that the evaluation result is that the initial text does not meet the professional document generation condition.

[0028] In one embodiment, the query knowledge base further includes query paragraphs corresponding to each of the first vectors, and the generating model based on the initial text and the professional document to generate the initial professional document includes:

[0029] Acquire a target query paragraph corresponding to the target vector from the query knowledge base;

[0030] The initial professional document is generated according to the target query paragraph, the initial text and the professional document generation model.

[0031] In one embodiment, generating the initial professional document according to the target query paragraph, the initial text and the professional document generation model includes:

[0032] Obtaining supplementary text related to the initial text;

[0033] The target query paragraph, the initial text and the supplementary text are input into the professional document generation model to obtain the initial professional document output by the professional document generation model.

[0034] In one embodiment, the method further comprises:

[0035] Obtaining each of the standard professional documents, and performing paragraph segmentation processing on each of the standard professional documents to obtain a plurality of segmented paragraphs;

[0036] According to each of the segmented paragraphs, a plurality of to-be-processed paragraphs are obtained, and paragraph enhancement processing is performed on each of the to-be-processed paragraphs to obtain a plurality of query paragraphs;

[0037] Vectorization processing is performed on each of the query paragraphs to obtain the first vector corresponding to each of the query paragraphs, and the corresponding relationship between each of the query paragraphs and each of the first vectors is stored in the query knowledge base.

[0038] In a second aspect, the present application also provides a professional document generation device. The device comprises:

[0039] A generation module, used to obtain an initial text, and generate an initial professional document based on the initial text and a professional document generation model;

[0040] A processing module, used for standardizing the document structure of the initial professional document according to the document standard processing model to obtain a standardized professional document;

[0041] The document standard processing model is obtained by training based on a plurality of sample initial professional documents and sample standard professional documents corresponding to each of the sample initial professional documents.

[0042] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0044] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0045] In the above-mentioned professional document generation method, device, computer equipment, computer-readable storage medium and computer program product, the server first obtains the initial text, and generates an initial professional document based on the initial text and the professional document generation model, and then, according to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document, wherein the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standardized professional documents corresponding to each sample initial professional document. In the professional document generation method, the professional document generation model can quickly generate an initial professional document based on the initial text, thereby improving the efficiency of obtaining the initial professional document. Furthermore, the document structure of the initial professional document is standardized according to the document standard processing model, which can improve the standardization and professionalism of the initial professional document, so that a standardized professional document that meets the professional document writing standards can be obtained, thereby avoiding the problem of invalid writing caused by professional documents not meeting the writing standards, thereby improving the writing efficiency of professional documents. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] FIG1 is a diagram showing an application environment of a method for generating professional documents in one embodiment;

[0048] FIG2 is a schematic diagram of a process of generating a professional document in one embodiment;

[0049] FIG3 is a schematic diagram of a flow chart of step 202 in another embodiment;

[0050] FIG4 is a schematic diagram of a flow chart of step 303 in another embodiment;

[0051] FIG5 is a schematic diagram of a flow chart of step 201 in another embodiment;

[0052] FIG6 is a schematic diagram of a flow chart of step 501 in another embodiment;

[0053] FIG7 is a schematic diagram of a flow chart of step 502 in another embodiment;

[0054] FIG8 is a schematic diagram of a process of generating a professional document in another embodiment;

[0055] FIG9 is a schematic diagram of a process of generating a professional document in another embodiment;

[0056] FIG10 is a structural block diagram of a professional document generating device in one embodiment;

[0057] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] In the application field of professional document writing, for example, the writing of patent documents, as companies pay more and more attention to the protection of intellectual property rights, whenever there is a new technological innovation or product innovation, they will apply for patents in a timely manner to protect their rights and interests. Usually, the written patent documents need to be reviewed, and during the review process, it is often necessary to manually review the patent documents to ensure that they meet the requirements, and then modify the patent documents according to the patent format. This approach not only requires the retrieval of relevant patent documents, but also requires manual comparison of innovative points and evaluation of the innovation of patent documents, which requires a lot of manpower and time; in addition, there may be overlapping patent protection points within the same enterprise, which will lead to duplication of written patent documents and cause invalid work. Therefore, traditional technology has the problem of relatively low efficiency in patent writing.

[0060] In view of this, an embodiment of the present application provides a method for generating a professional document, wherein the server first obtains an initial text, and generates an initial professional document based on the initial text and a professional document generation model, and then, according to a document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document, wherein the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standardized professional documents corresponding to each sample initial professional document. In the professional document generation method, the professional document generation model can quickly generate an initial professional document based on the initial text, thereby improving the efficiency of obtaining the initial professional document. Furthermore, the document structure of the initial professional document is standardized according to the document standard processing model, which can improve the standardization and professionalism of the initial professional document, thereby obtaining a standardized professional document that meets the professional document writing standards, thereby avoiding the problem of invalid writing caused by professional documents not meeting the writing standards, thereby improving the writing efficiency of professional documents.

[0061] The professional document generation method provided in the embodiment of the present application can be applied in the implementation environment as shown in Figure 1, which includes a server. The server can be implemented as an independent server or a server cluster composed of multiple servers, and the data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or it can be placed on the cloud or other network servers. Among them, the server obtains the initial text, and generates an initial professional document based on the initial text and the professional document generation model. Then, according to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document; wherein the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standardized professional documents corresponding to each sample initial professional document.

[0062] In other possible implementations, the professional document generation method provided in the embodiment of the present application can also be applied to terminals, which can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.

[0063] In an exemplary embodiment, as shown in FIG2 , a method for generating a professional document is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps 201 and 202:

[0064] Step 201, obtain the initial text, and generate a model based on the initial text and professional documents to generate an initial professional document.

[0065] It should be noted that the professional document generation method provided in the present application can be applied to scenarios of generating various types of professional documents, such as patent documents, legal documents, etc. The embodiment of the present application takes the professional document as a patent document as an example to describe the process of obtaining a standardized professional document.

[0066] Among them, the initial text refers to the text to be written. For example, if the initial text is the initial text corresponding to the patent document, the initial text can be the text content used to describe a technology or a product. The initial text can be used to determine the invention and innovation points of the technology or product.

[0067] It is understandable that after obtaining the initial text, it is necessary to generate corresponding professional documents based on the initial text. In order to improve the efficiency and accuracy of generating professional documents, in this embodiment, a trained professional document generation model can be used to generate professional documents. The professional document generation model is a neural network model for generating professional documents. For example, the professional document generation model can be a large language model, or the professional document generation model can also be a recurrent neural network model, which is not limited in this embodiment.

[0068] In this embodiment, the server can receive a data packet including an initial text sent by other terminals, servers, etc. through the network, and obtain the initial text from the parsing result by parsing the data packet. Then, the initial text can be input into a professional document generation model, and the output result of the professional document generation model can be used as the initial professional document.

[0069] Step 202, based on the document standardization processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document; wherein the document standardization processing model is obtained by training based on a plurality of sample initial professional documents and sample standardized professional documents corresponding to each sample initial professional document.

[0070] Among them, the document standardization processing model refers to a neural network model that performs standardization processing on the generated initial professional documents. Optionally, the document standardization processing model can be a convolutional neural network model, or the document standardization processing model can also be a recurrent neural network model, which is not limited in this embodiment.

[0071] It is understandable that since the initial professional document is only to convert the initial text into a document that conforms to the professional document template, different types of professional documents may correspond to different document structures, such as title, abstract, text, attachments, etc., as well as the document structures of claims, instructions, and abstracts of instructions included in patent documents. Therefore, it is also necessary to standardize the initial professional document according to the corresponding document structure, so as to obtain a standardized professional document that conforms to the document structure of the professional document, wherein the standardized professional document is obtained after standardizing the document structure corresponding to the initial professional document.

[0072] In order to reduce the workload in the process of standardizing the initial professional documents, the initial professional documents can be standardized through the document standardization processing model. In this embodiment, in the process of obtaining the document standardization processing model, multiple sample initial professional documents can be obtained as training samples, and sample standardized professional documents corresponding to the multiple sample initial professional documents can be used as gold standards. Then, the initial document standardization processing model is trained using the training samples and the gold standard until the loss function value corresponding to the initial document standardization processing model reaches a minimum or a stable value during a certain training process, and the initial document standardization processing model corresponding to the training process is used as the document standardization processing model.

[0073] In this embodiment, the server can input the initial professional document into the document standard processing model, use the document standard processing model to adjust the document structure of the initial professional document, and obtain the adjusted initial professional document, thereby using the adjusted initial professional document output by the document standard processing model as a standard professional document.

[0074] In the above-mentioned professional document generation method, the server first obtains the initial text, and generates an initial professional document based on the initial text and the professional document generation model. Then, according to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document, wherein the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standardized professional documents corresponding to each sample initial professional document. In this professional document generation method, the professional document generation model can quickly generate an initial professional document based on the initial text, thereby improving the efficiency of obtaining the initial professional document. Furthermore, the document structure of the initial professional document is standardized according to the document standard processing model, which can improve the standardization and professionalism of the initial professional document, thereby obtaining a standardized professional document that meets the professional document writing standards, thereby avoiding the problem of invalid writing caused by professional documents not meeting the writing standards, thereby improving the writing efficiency of professional documents.

[0075] Based on the embodiment shown in FIG2 , referring to FIG3 , the document standard processing model includes a first segmentation layer, a first matching layer, and a paragraph processing layer. This embodiment relates to how the server performs standard processing on the document structure of the initial professional document according to the document standard processing model to obtain a standardized professional document. Step 202 includes steps 301 to 303 shown in FIG3 .

[0076] Step 301: segment the initial professional document into paragraphs using the first segmentation layer to obtain a plurality of paragraphs to be matched.

[0077] It should be noted that in the document standard processing model, in order to improve the standardization of the output results, the initial professional document can be standardized at the paragraph level and the sentence level. Among them, the first segmentation layer refers to the processing layer for segmenting the initial professional document into paragraphs. In this embodiment, the first initial segmentation layer in the initial document standard processing model can be trained using the paragraph segmentation results corresponding to the sample professional document and the sample standardized professional document to obtain the first segmentation layer.

[0078] In this embodiment, the server can use the first segmentation layer in the document standard processing model to segment the initial professional document into multiple paragraphs according to punctuation marks and paragraph marks, and use the multiple paragraphs as multiple paragraphs to be matched.

[0079] Step 302: for each to-be-matched paragraph, use the first matching layer to perform paragraph matching processing on the to-be-matched paragraph to obtain at least one matching paragraph.

[0080] The first matching layer refers to a processing layer for matching the paragraph to be matched to obtain a paragraph similar to the paragraph to be matched. In this embodiment, the first matching layer can search and obtain a paragraph similar to the paragraph to be matched from multiple historical normative sample documents as a matching paragraph.

[0081] Optionally, the matching paragraphs may include a paragraph similar to the paragraph to be matched, or the matching paragraphs may include multiple paragraphs similar to the paragraph to be matched. The matching paragraph may have similar content to the paragraph to be matched, or the matching paragraph may have similar structure to the paragraph to be matched, or the matching paragraph may have similar writing style to the paragraph to be matched.

[0082] In this embodiment, the server can use the first matching layer in the document standard processing model to find paragraphs similar to the to-be-matched paragraph from paragraphs included in multiple historical standard sample documents, and use the similar paragraphs as matching paragraphs.

[0083] As an optional implementation, if there are multiple paragraphs similar to the paragraph to be matched, the first n paragraphs may be selected as the matching paragraphs according to the similarity between each paragraph and the paragraph to be matched.

[0084] Step 303, using the paragraph processing layer, the document structure of the initial professional document is standardized according to each matching paragraph to obtain a standardized professional document.

[0085] The paragraph processing layer refers to a processing layer that processes matching paragraphs to convert them into standard paragraphs. In this embodiment, the server can use the paragraph processing layer in the document standard processing model to standardize the document structure of the initial professional document according to the writing style, sentence description style, etc. corresponding to each matching paragraph to obtain a standard professional document.

[0086] In this embodiment, the server uses the first segmentation layer to perform paragraph segmentation processing on the initial professional document to obtain multiple paragraphs to be matched. Then, for each paragraph to be matched, the server uses the first matching layer to perform paragraph matching processing on the paragraph to be matched to obtain at least one matching paragraph. Then, the paragraph processing layer is used to standardize the document structure of the initial professional document according to each matching paragraph to obtain a standardized professional document. Since the initial professional document is divided into multiple paragraphs to be matched and each paragraph to be matched is matched separately, the accuracy of the matching process is improved, thereby improving the matching degree of the obtained matching paragraphs. Furthermore, by standardizing the document structure of the initial professional document at the paragraph level for each matching paragraph, the standardization and professionalism of the obtained standardized professional document are improved.

[0087] Based on the embodiment shown in FIG3 , referring to FIG4 , the paragraph processing layer includes a second segmentation layer, a second matching layer, and a sentence processing layer. This embodiment relates to how the server uses the paragraph processing layer to standardize the document structure of the initial professional document according to each matching paragraph to obtain a standardized professional document. Step 303 includes steps 401 to 403 shown in FIG4 .

[0088] Step 401 : Use the second segmentation layer to perform sentence segmentation processing on each matching paragraph to obtain a plurality of sentences to be matched.

[0089] The second segmentation layer refers to a processing layer for performing sentence segmentation on each matching paragraph. In this embodiment, the sentence segmentation results corresponding to the sample professional documents and the sample standard professional documents can be used to train the second initial segmentation layer in the initial document standard processing model to obtain the second segmentation layer.

[0090] In this embodiment, the server can use the second segmentation layer in the document standard processing model to segment each matching paragraph into multiple sentences according to punctuation marks, keywords, and stop words, and use the multiple sentences as multiple sentences to be matched.

[0091] Step 402: for each to-be-matched statement, use the second matching layer to perform statement matching processing on the to-be-matched statement to obtain at least one matching statement.

[0092] The second matching layer refers to a processing layer that matches the sentences to be matched to obtain sentences similar to the sentences to be matched. In this embodiment, the second matching layer can search and obtain sentences similar to the sentences to be matched from multiple historical normative sample documents as matching sentences.

[0093] Optionally, the matching sentence may include a sentence similar to the sentence to be matched, or the matching sentence may include multiple sentences similar to the sentence to be matched. The matching sentence may have a similar meaning to the sentence to be matched, or the matching sentence may have similar words to the sentence to be matched, or the matching sentence may have a similar writing style to the sentence to be matched.

[0094] In this embodiment, the server can use the second matching layer in the document standard processing model to find sentences similar to the to-be-matched sentences from sentences included in multiple historical standard sample documents, and use the similar sentences as matching sentences.

[0095] As an optional implementation, if there are multiple statements similar to the statement to be matched, the first n statements may be selected as matching statements according to the similarity between each statement and the statement to be matched.

[0096] Step 403, using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0097] The sentence processing layer refers to a layer that processes matching sentences to convert them into standard sentences. In this embodiment, the server can use the sentence processing layer in the document standard processing model to standardize the document structure of the initial professional document according to the writing style and sentence description style corresponding to each matching sentence to obtain a standard professional document.

[0098] In this embodiment, the server uses the second segmentation layer to perform sentence segmentation processing on each matching paragraph to obtain multiple sentences to be matched, and then uses the second matching layer to perform sentence matching processing on each sentence to be matched to obtain at least one matching sentence, and then uses the sentence processing layer to standardize the document structure of the initial professional document according to each matching sentence to obtain a standardized professional document. Since each paragraph to be matched is segmented into multiple sentences to be matched, and each sentence to be matched is matched separately, the precision and accuracy of the matching process are improved, thereby improving the matching degree of the obtained matching sentences, and then by standardizing the document structure of the initial professional document from the sentence level for each matching sentence, the standardization and professionalism of the obtained standardized professional document are improved.

[0099] Based on the embodiment shown in Figure 2, referring to Figure 5, this embodiment relates to the process of how the server generates an initial professional document based on the initial text and the professional document generation model. Step 201 includes step 501 and step 502 shown in Figure 5.

[0100] Step 501 , perform similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to a plurality of standard professional documents.

[0101] The query knowledge base includes a plurality of standard professional documents after being processed in a standardized manner. For example, if the query knowledge base is a knowledge base corresponding to patent documents, the query knowledge base includes a plurality of patent documents that have been submitted or authorized, wherein different types of professional documents may correspond to different query knowledge bases. It is understandable that when writing the initial text as a professional document, in order to avoid the problem of invalid writing caused by the initial text of the same content having been written before, it is necessary to first determine whether the initial text can be written.

[0102] In this embodiment, the server may compare the initial text with standard professional documents included in a preset query knowledge base, perform a similarity evaluation on the initial text based on the comparison result to obtain an evaluation result, and determine whether the initial text can be written based on the evaluation result.

[0103] Step 502: When the evaluation result shows that the initial text meets the professional document generation conditions, an initial professional document is generated according to the initial text and the professional document generation model.

[0104] Among them, the professional document generation condition refers to the low similarity between the content of the initial text and the content of the standard professional document, that is, the difference between the professional document written by the initial text and the standard professional document is large, and the content of the initial text cannot be disclosed by the content of the standard professional document. For example, taking patent documents as an example, the professional document generation condition refers to the low similarity between the professional document corresponding to the initial text and the submitted patent documents, and the submitted patent documents cannot disclose the professional document corresponding to the initial text.

[0105] In this embodiment, the server can determine whether the initial text can be written based on the evaluation results, and if the initial text can be written, determine that the initial text meets the professional document generation conditions, and then input the initial text into the professional document generation model, and determine the output result of the professional document generation model as the initial professional document.

[0106] In this embodiment, the server performs a similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result. Since the query knowledge base is constructed based on multiple standard professional documents, the query knowledge base can accurately evaluate whether the initial text can be written. When the evaluation result is that the initial text meets the professional document generation conditions, the initial professional document is generated according to the initial text and the professional document generation model, thereby avoiding the problem of invalid loading and unloading and wasting writing resources due to the inability to write the initial text, thereby improving the efficiency of writing professional documents.

[0107] Based on the embodiment shown in FIG5 , referring to FIG6 , the query knowledge base includes the first vector corresponding to each standard professional document. This embodiment relates to how the server performs similarity evaluation on the initial text according to the preset query knowledge base to obtain the evaluation result. Step 501 includes steps 601 to 603 shown in FIG6 .

[0108] Step 601, vectorize the initial text to obtain a second vector corresponding to the initial text.

[0109] It should be noted that when evaluating the similarity between texts, since text data is unstructured and difficult to process, the text content can be converted into a numerical form that can be recognized by a computer device, that is, the text data is converted into vector data. Optionally, the algorithm obtained by vectorization processing can be a bag of words model, or the algorithm for vectorization processing can also be Word2Vec, which is not limited in this embodiment. Among them, the vector corresponding to each standard professional document in the query knowledge base is the first vector, and the vector corresponding to the initial text is the second vector.

[0110] In this embodiment, the server may perform vectorization processing on the initial text using a vectorization processing algorithm, and determine the result of the vectorization processing as the second vector.

[0111] Step 602: Determine a target vector similar to the second vector from each first vector according to the second vector.

[0112] The target vector refers to a vector in the first vector that is similar to the second vector. It can be understood that if there is a vector in the first vector that is similar to the second vector, the first vector can be determined as the target vector.

[0113] In this embodiment, the server may respectively calculate the cosine similarity between the second vector and each first vector, determine whether the first vector is similar to the second vector according to the cosine similarity, and thereby determine the first vector similar to the second vector as the target vector.

[0114] Step 603: Determine an evaluation result according to the second vector and the target vector.

[0115] The evaluation result refers to whether the initial text meets the conditions for generating a professional document. Optionally, the evaluation result may be that the initial text meets the conditions for generating a professional document, or the evaluation result may be that the initial text does not meet the conditions for generating a professional document.

[0116] In a possible implementation, the above step 603 may calculate the similarity between the second vector and the target vector, and determine the evaluation result according to the similarity.

[0117] The similarity calculation method may be Euclidean distance, Pearson similarity, Jaccard similarity, etc.

[0118] In this embodiment, the server may calculate the similarity between the second vector and the target vector using a similarity calculation method, and then determine an evaluation result corresponding to the similarity according to the similarity.

[0119] In an optional implementation, if the similarity is less than a preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions.

[0120] In another optional implementation, if the similarity is greater than or equal to the similarity threshold, then the evaluation result is determined to be that the initial text does not meet the professional document generation conditions.

[0121] Among them, the similarity threshold can be a similarity threshold determined based on the historical original text and the corresponding historical standard professional document. For example, the similarity threshold can be 10%, or the similarity threshold can also be 20%. This embodiment does not impose any restrictions on this.

[0122] In this embodiment, the server can determine the evaluation result based on the similarity by calculating the similarity between the second vector and the target vector, so that when the similarity is less than a preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions; and when the similarity is greater than or equal to the similarity threshold, the evaluation result is determined to be that the initial text does not meet the professional document generation conditions. Since the judgment process of judging the relationship between the similarity and the similarity threshold is relatively simple, it is possible to quickly and accurately determine whether the initial text meets the professional document generation conditions.

[0123] In this embodiment, the server vectorizes the initial text to obtain a second vector corresponding to the initial text, and then determines a target vector similar to the second vector from each first vector based on the second vector. Then, based on the second vector and the target vector, an evaluation result is determined. Compared with text data, vector data can be recognized by a computer device, and the server can quickly process the vector data, thereby using the second vector corresponding to the initial text and the first vector corresponding to the standard professional document to determine whether the initial text meets the conditions for generating a professional document. The target vector can be determined quickly and accurately from the first vector, thereby improving the efficiency of determining whether to generate an initial professional document based on the initial text based on the evaluation result.

[0124] Based on the embodiment shown in FIG5 , referring to FIG7 , the query knowledge base further includes query paragraphs corresponding to each first vector, and this embodiment relates to how the server generates a model based on the initial text and the professional document to generate an initial professional document. Step 502 includes steps 701 and 702 shown in FIG7 .

[0125] Step 701: Obtain a target query paragraph corresponding to a target vector from a query knowledge base.

[0126] The target query paragraph refers to the text data corresponding to the target vector. It is understandable that the query knowledge base can store the corresponding relationship between multiple query paragraphs and the vectors corresponding to each query paragraph.

[0127] In this embodiment, the server may obtain a query paragraph corresponding to the target vector from the query knowledge base according to the target vector, and use the query paragraph as the target query paragraph.

[0128] Step 702, generating an initial professional document based on the target query paragraph, the initial text and the professional document generation model.

[0129] In this embodiment, the server can input the target query paragraph and the initial text into the professional document generation model. In the professional document generation model, the content of the initial text can be modified and written according to the text structure and language description of the target query paragraph to obtain an initial professional document.

[0130] In a possible implementation, the above step 702 may also be implemented by the following steps:

[0131] Obtain supplementary text related to the initial text; input the target query paragraph, the initial text and the supplementary text into the professional document generation model to obtain the initial professional document output by the professional document generation model.

[0132] The supplementary text is text related to the content of the initial text. For example, the supplementary text may be text of background introduction related to the initial text, or the initial text may be text of beneficial effects corresponding to the initial text.

[0133] In this embodiment, the server can input the supplementary text, the target query paragraph, and the initial text into the professional document generation model, so that the professional document generation model can use the supplementary text to expand and supplement the content of the initial text, thereby outputting an initial professional document.

[0134] In this implementation, since the server obtains the supplementary text corresponding to the initial text, it can use the supplementary text to expand the content of the initial text, and then input the target query paragraph, the initial text and the supplementary text into the professional document generation model, which can improve the richness of the initial professional document obtained.

[0135] In this embodiment, the server can generate an initial professional document based on the target query paragraph, the initial text and the professional document generation model by obtaining the target query paragraph corresponding to the target vector from the query knowledge base. Since the target query paragraph is obtained from the query knowledge base and the target query paragraph is similar to the initial text, when the professional document generation model writes the initial text according to the target query paragraph, the obtained initial professional document can conform to the text content of the initial text while also conforming to the writing style of the target query paragraph, thereby improving the accuracy and professionalism of the obtained initial professional document.

[0136] In one embodiment, based on the above embodiment, referring to Fig. 8, this embodiment involves a process of how a server constructs a query knowledge base. The server can implement the process by executing steps 801 to 803 as shown in Fig. 8.

[0137] Step 801, obtain each standard professional document, and segment each standard professional document into paragraphs to obtain a plurality of segmented paragraphs.

[0138] Each standard professional document refers to a professional document that has been processed according to the standardization based on the initial text in the historical time period. In this embodiment, the server can segment the standard professional document according to paragraph marks, key sentences and other iconic sentences or words, thereby obtaining multiple segmented paragraphs.

[0139] Step 802 , obtaining a plurality of to-be-processed paragraphs according to each segmented paragraph, and performing paragraph enhancement processing on each to-be-processed paragraph to obtain a plurality of query paragraphs.

[0140] It is understandable that in the process of segmenting each standard professional document into paragraphs to obtain multiple segmented paragraphs, segmentation based on paragraph markers, key sentences and other iconic sentences or vocabulary may result in some segmented paragraphs having fewer words. In the subsequent evaluation of whether the initial text can be written using the segmented paragraphs, the evaluation results may be inaccurate. Therefore, a paragraph word count threshold can be set. According to the sequence number of the segmented paragraphs, if the word counts of multiple adjacent paragraphs are less than the paragraph word count threshold, the multiple paragraphs can be merged, and the merged paragraphs can be used as the paragraphs to be processed.

[0141] The to-be-processed paragraphs refer to the paragraphs that need to be enhanced. Paragraph enhancement refers to the pre-processing of the first sentence in each to-be-processed paragraph to further strengthen the distinction between each paragraph. The query paragraph refers to the paragraph that needs to be compared with the initial text when evaluating whether the initial text can be written using the query knowledge base.

[0142] In this embodiment, the server may first merge paragraphs that are less than the paragraph word count threshold according to the word count of each segmented paragraph and the paragraph word count threshold, and then use the merged paragraphs and paragraphs that are equal to or greater than the paragraph word count threshold as paragraphs to be processed, and then use the paragraph enhancement processing algorithm to perform paragraph enhancement processing on each paragraph to be processed, and use the paragraph enhancement processed paragraphs as query paragraphs.

[0143] Step 803 , vectorization is performed on each query paragraph to obtain a first vector corresponding to each query paragraph, and the corresponding relationship between each query paragraph and each first vector is stored in a query knowledge base.

[0144] In this embodiment, the server can perform vectorization processing on each query paragraph according to a vector processing algorithm to obtain a first vector corresponding to each query paragraph. Then, a correspondence between each query paragraph and the first vector corresponding to each query paragraph can be established, and then, the established multiple correspondences can be stored in a query knowledge base.

[0145] In this embodiment, the server obtains each standard professional document and performs paragraph segmentation processing on each standard professional document to obtain multiple segmented paragraphs. Then, based on each segmented paragraph, it can obtain multiple to-be-processed paragraphs, and perform paragraph enhancement processing on each to-be-processed paragraph to obtain multiple query paragraphs. Then, by vectorizing each query paragraph, a first vector corresponding to each query paragraph is obtained, and the correspondence between each query paragraph and each first vector is stored in a query knowledge base, so that the query knowledge base can be updated, so that the query knowledge base includes the correspondence between multiple standard professional documents and the corresponding first vectors, and then the evaluation result of whether the initial text can be written in the query knowledge base can be determined, so as to improve the accuracy of writing the initial text into the initial professional document.

[0146] In one embodiment, a method for generating professional documents is provided, which is used in a server. As shown in FIG9 , the method comprises the following steps:

[0147] Step 901, obtain each standard professional document, and segment each standard professional document into paragraphs to obtain a plurality of segmented paragraphs.

[0148] Step 902: Obtain multiple to-be-processed paragraphs according to each segmented paragraph, and perform paragraph enhancement processing on each to-be-processed paragraph to obtain multiple query paragraphs.

[0149] Step 903 , vectorization processing is performed on each query paragraph to obtain a first vector corresponding to each query paragraph, and the corresponding relationship between each query paragraph and each first vector is stored in a query knowledge base.

[0150] Step 904, obtaining the initial text.

[0151] Step 905: perform vectorization processing on the initial text to obtain a second vector corresponding to the initial text.

[0152] Step 906: Determine a target vector similar to the second vector from each first vector according to the second vector.

[0153] Step 907: Calculate the similarity between the second vector and the target vector.

[0154] Step 908: If the similarity is greater than or equal to the similarity threshold, it is determined that the evaluation result is that the initial text does not meet the professional document generation conditions.

[0155] Step 909: If the similarity is less than a preset similarity threshold, it is determined that the evaluation result is that the initial text meets the professional document generation conditions.

[0156] Step 9010: Obtain the target query paragraph corresponding to the target vector from the query knowledge base.

[0157] Step 9011, obtaining supplementary text related to the initial text.

[0158] Step 9012, input the target query paragraph, the initial text and the supplementary text into the professional document generation model to obtain the initial professional document output by the professional document generation model.

[0159] Step 9013, using the first segmentation layer to segment the initial professional document into paragraphs, to obtain a plurality of paragraphs to be matched.

[0160] Step 9014: for each to-be-matched paragraph, use the first matching layer to perform paragraph matching processing on the to-be-matched paragraph to obtain at least one matching paragraph.

[0161] Step 9015: Use the second segmentation layer to perform sentence segmentation processing on each matching paragraph to obtain multiple sentences to be matched.

[0162] Step 9016: For each sentence to be matched, use the second matching layer to perform sentence matching processing on the sentence to be matched, and obtain at least one matching sentence.

[0163] Step 9017, using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0164] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0165] Based on the same inventive concept, the embodiment of the present application also provides a professional document generation device for implementing the professional document generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more professional document generation device embodiments provided below can refer to the limitations of the professional document generation method above, and will not be repeated here.

[0166] In an exemplary embodiment, as shown in FIG10 , a professional document generation device is provided, comprising:

[0167] The generation module 1001 is used to obtain the initial text and generate an initial professional document based on the initial text and the professional document generation model;

[0168] The processing module 1002 is used to standardize the document structure of the initial professional document according to the document standard processing model to obtain a standardized professional document;

[0169] Among them, the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standard professional documents corresponding to each sample initial professional document.

[0170] In one embodiment, the document standard processing model includes a first segmentation layer, a first matching layer and a paragraph processing layer, and the processing module 1002 includes:

[0171] A first acquisition unit is used to segment the initial professional document into paragraphs using the first segmentation layer to obtain a plurality of paragraphs to be matched;

[0172] A second acquisition unit is used to perform paragraph matching processing on each to-be-matched paragraph using the first matching layer to obtain at least one matching paragraph;

[0173] The third acquisition unit is used to utilize the paragraph processing layer to standardize the document structure of the initial professional document according to each matching paragraph to obtain a standardized professional document.

[0174] In one embodiment, the paragraph processing layer includes a second segmentation layer, a second matching layer and a sentence processing layer, and the third acquisition unit is specifically used to: perform sentence segmentation processing on each matching paragraph using the second segmentation layer to obtain a plurality of sentences to be matched;

[0175] For each to-be-matched statement, use the second matching layer to perform statement matching processing on the to-be-matched statement to obtain at least one matching statement;

[0176] By using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0177] In one embodiment, the generating module 1001 includes:

[0178] A fourth acquisition unit is used to perform similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to a plurality of standard professional documents;

[0179] The generation unit is used to generate an initial professional document according to the initial text and the professional document generation model when the evaluation result is that the initial text meets the professional document generation conditions.

[0180] In one embodiment, the query knowledge base includes first vectors corresponding to each standard professional document, and the fourth acquisition unit is specifically used to: perform vectorization processing on the initial text to obtain a second vector corresponding to the initial text;

[0181] According to the second vector, determining a target vector similar to the second vector from each of the first vectors;

[0182] An evaluation result is determined based on the second vector and the target vector.

[0183] In one embodiment, the fourth acquisition unit is specifically used to: calculate the similarity between the second vector and the target vector;

[0184] If the similarity is less than the preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions;

[0185] If the similarity is greater than or equal to the similarity threshold, the evaluation result is determined to be that the initial text does not meet the conditions for generating a professional document.

[0186] In one of the embodiments, the query knowledge base further includes a query paragraph corresponding to each first vector, and a generating unit is specifically used to: obtain a target query paragraph corresponding to the target vector from the query knowledge base;

[0187] Generate an initial professional document based on the target query paragraph, the initial text and the professional document generation model.

[0188] In one of the embodiments, the generating unit is specifically configured to: obtain supplementary text related to the initial text;

[0189] The target query paragraph, the initial text and the supplementary text are input into the professional document generation model to obtain an initial professional document output by the professional document generation model.

[0190] In one embodiment, the device further comprises:

[0191] The first acquisition module is used to acquire each standard professional document and perform paragraph segmentation processing on each standard professional document to obtain a plurality of segmented paragraphs;

[0192] The second acquisition module is used to acquire multiple to-be-processed paragraphs according to each segmented paragraph, and perform paragraph enhancement processing on each to-be-processed paragraph to obtain multiple query paragraphs;

[0193] The third acquisition module is used to perform vectorization processing on each query paragraph to obtain a first vector corresponding to each query paragraph, and store the corresponding relationship between each query paragraph and each first vector in the query knowledge base.

[0194] Each module in the above-mentioned professional document generation device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the server in the form of hardware, or can be stored in the memory in the server in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0195] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store professional document data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for generating professional documents is implemented.

[0196] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0197] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0198] Obtaining the initial text, and generating a model based on the initial text and the professional document to generate an initial professional document;

[0199] According to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document;

[0200] Among them, the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standard professional documents corresponding to each sample initial professional document.

[0201] In one embodiment, the processor implements the following steps when executing the computer program:

[0202] The first segmentation layer is used to segment the initial professional document into paragraphs to obtain a plurality of paragraphs to be matched;

[0203] For each to-be-matched paragraph, use the first matching layer to perform paragraph matching processing on the to-be-matched paragraph to obtain at least one matching paragraph;

[0204] By using the paragraph processing layer, the document structure of the initial professional document is standardized according to each matching paragraph to obtain a standardized professional document.

[0205] In one embodiment, the processor implements the following steps when executing the computer program:

[0206] Using the second segmentation layer to perform sentence segmentation processing on each matching paragraph, a plurality of sentences to be matched are obtained;

[0207] For each to-be-matched statement, use the second matching layer to perform statement matching processing on the to-be-matched statement to obtain at least one matching statement;

[0208] By using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0209] In one embodiment, the processor implements the following steps when executing the computer program:

[0210] Perform similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to multiple standard professional documents;

[0211] When the evaluation result is that the initial text meets the conditions for generating a professional document, an initial professional document is generated based on the initial text and the professional document generation model.

[0212] In one embodiment, the processor implements the following steps when executing the computer program:

[0213] Performing vectorization processing on the initial text to obtain a second vector corresponding to the initial text;

[0214] According to the second vector, determining a target vector similar to the second vector from each of the first vectors;

[0215] An evaluation result is determined based on the second vector and the target vector.

[0216] In one embodiment, the processor implements the following steps when executing the computer program:

[0217] Calculate the similarity between the second vector and the target vector;

[0218] If the similarity is less than the preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions;

[0219] If the similarity is greater than or equal to the similarity threshold, the evaluation result is determined to be that the initial text does not meet the conditions for generating a professional document.

[0220] In one embodiment, the processor implements the following steps when executing the computer program:

[0221] Obtain a target query paragraph corresponding to the target vector from the query knowledge base;

[0222] Generate an initial professional document based on the target query paragraph, the initial text and the professional document generation model.

[0223] In one embodiment, the processor further implements the following steps when executing the computer program:

[0224] Obtain supplementary text related to the initial text;

[0225] The target query paragraph, the initial text and the supplementary text are input into the professional document generation model to obtain an initial professional document output by the professional document generation model.

[0226] In one embodiment, the processor further implements the following steps when executing the computer program:

[0227] Obtain each standard professional document, and perform paragraph segmentation processing on each standard professional document to obtain a plurality of segmented paragraphs;

[0228] According to each segmented paragraph, a plurality of to-be-processed paragraphs are obtained, and each to-be-processed paragraph is enhanced to obtain a plurality of query paragraphs;

[0229] Each query paragraph is vectorized to obtain a first vector corresponding to each query paragraph, and the corresponding relationship between each query paragraph and each first vector is stored in a query knowledge base.

[0230] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0231] Obtaining the initial text, and generating a model based on the initial text and the professional document to generate an initial professional document;

[0232] According to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document;

[0233] Among them, the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standard professional documents corresponding to each sample initial professional document.

[0234] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0235] The first segmentation layer is used to segment the initial professional document into paragraphs to obtain a plurality of paragraphs to be matched;

[0236] For each to-be-matched paragraph, use the first matching layer to perform paragraph matching processing on the to-be-matched paragraph to obtain at least one matching paragraph;

[0237] By using the paragraph processing layer, the document structure of the initial professional document is standardized according to each matching paragraph to obtain a standardized professional document.

[0238] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0239] Using the second segmentation layer to perform sentence segmentation processing on each matching paragraph, a plurality of sentences to be matched are obtained;

[0240] For each to-be-matched statement, use the second matching layer to perform statement matching processing on the to-be-matched statement to obtain at least one matching statement;

[0241] By using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0242] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0243] Perform similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to multiple standard professional documents;

[0244] When the evaluation result is that the initial text meets the conditions for generating a professional document, an initial professional document is generated based on the initial text and the professional document generation model.

[0245] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0246] Performing vectorization processing on the initial text to obtain a second vector corresponding to the initial text;

[0247] According to the second vector, determining a target vector similar to the second vector from each of the first vectors;

[0248] An evaluation result is determined based on the second vector and the target vector.

[0249] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0250] Calculate the similarity between the second vector and the target vector;

[0251] If the similarity is less than the preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions;

[0252] If the similarity is greater than or equal to the similarity threshold, the evaluation result is determined to be that the initial text does not meet the conditions for generating a professional document.

[0253] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0254] Obtain a target query paragraph corresponding to the target vector from the query knowledge base;

[0255] Generate an initial professional document based on the target query paragraph, the initial text and the professional document generation model.

[0256] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0257] Obtain supplementary text related to the initial text;

[0258] The target query paragraph, the initial text and the supplementary text are input into the professional document generation model to obtain an initial professional document output by the professional document generation model.

[0259] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0260] Obtain each standard professional document, and perform paragraph segmentation processing on each standard professional document to obtain a plurality of segmented paragraphs;

[0261] According to each segmented paragraph, a plurality of to-be-processed paragraphs are obtained, and each to-be-processed paragraph is enhanced to obtain a plurality of query paragraphs;

[0262] Each query paragraph is vectorized to obtain a first vector corresponding to each query paragraph, and the corresponding relationship between each query paragraph and each first vector is stored in a query knowledge base.

[0263] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0264] Obtaining the initial text, and generating a model based on the initial text and the professional document to generate an initial professional document;

[0265] According to the document standard processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document;

[0266] Among them, the document standard processing model is obtained by training based on multiple sample initial professional documents and sample standard professional documents corresponding to each sample initial professional document.

[0267] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0268] The first segmentation layer is used to segment the initial professional document into paragraphs to obtain a plurality of paragraphs to be matched;

[0269] For each to-be-matched paragraph, use the first matching layer to perform paragraph matching processing on the to-be-matched paragraph to obtain at least one matching paragraph;

[0270] By using the paragraph processing layer, the document structure of the initial professional document is standardized according to each matching paragraph to obtain a standardized professional document.

[0271] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0272] Using the second segmentation layer to perform sentence segmentation processing on each matching paragraph, a plurality of sentences to be matched are obtained;

[0273] For each to-be-matched statement, use the second matching layer to perform statement matching processing on the to-be-matched statement to obtain at least one matching statement;

[0274] By using the sentence processing layer, the document structure of the initial professional document is standardized according to each matching sentence pair to obtain a standardized professional document.

[0275] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0276] Perform similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to multiple standard professional documents;

[0277] When the evaluation result is that the initial text meets the conditions for generating a professional document, an initial professional document is generated based on the initial text and the professional document generation model.

[0278] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0279] Performing vectorization processing on the initial text to obtain a second vector corresponding to the initial text;

[0280] According to the second vector, determining a target vector similar to the second vector from each of the first vectors;

[0281] An evaluation result is determined based on the second vector and the target vector.

[0282] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0283] Calculate the similarity between the second vector and the target vector;

[0284] If the similarity is less than the preset similarity threshold, the evaluation result is determined to be that the initial text meets the professional document generation conditions;

[0285] If the similarity is greater than or equal to the similarity threshold, the evaluation result is determined to be that the initial text does not meet the conditions for generating a professional document.

[0286] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0287] Obtain a target query paragraph corresponding to the target vector from the query knowledge base;

[0288] Generate an initial professional document based on the target query paragraph, the initial text and the professional document generation model.

[0289] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0290] Obtain supplementary text related to the initial text;

[0291] The target query paragraph, the initial text and the supplementary text are input into the professional document generation model to obtain an initial professional document output by the professional document generation model.

[0292] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0293] Obtain each standard professional document, and perform paragraph segmentation processing on each standard professional document to obtain a plurality of segmented paragraphs;

[0294] According to each segmented paragraph, a plurality of to-be-processed paragraphs are obtained, and each to-be-processed paragraph is enhanced to obtain a plurality of query paragraphs;

[0295] Each query paragraph is vectorized to obtain a first vector corresponding to each query paragraph, and the corresponding relationship between each query paragraph and each first vector is stored in a query knowledge base.

[0296] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0297] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0298] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating professional documents, characterized in that: The method comprises: Obtaining an initial text, and generating an initial professional document based on the initial text and a professional document generation model; According to the document standardization processing model, the document structure of the initial professional document is standardized to obtain a standardized professional document; The document standard processing model is obtained by training based on a plurality of sample initial professional documents and sample standard professional documents corresponding to each of the sample initial professional documents.

2. The method according to claim 1, characterized in that The document standard processing model includes a first segmentation layer, a first matching layer and a paragraph processing layer. The document structure of the initial professional document is standardized according to the document standard processing model to obtain a standardized professional document, including: Using the first segmentation layer to segment the initial professional document into paragraphs, to obtain a plurality of paragraphs to be matched; For each of the to-be-matched paragraphs, using the first matching layer to perform paragraph matching processing on the to-be-matched paragraphs to obtain at least one matching paragraph; The paragraph processing layer is used to standardize the document structure of the initial professional document according to each matching paragraph to obtain the standardized professional document.

3. The method according to claim 2, characterized in that The paragraph processing layer includes a second segmentation layer, a second matching layer and a sentence processing layer. The paragraph processing layer is used to standardize the document structure of the initial professional document according to each matching paragraph to obtain the standardized professional document, including: Using the second segmentation layer to perform sentence segmentation processing on each of the matching paragraphs to obtain a plurality of sentences to be matched; For each of the to-be-matched sentences, use the second matching layer to perform sentence matching processing on the to-be-matched sentences to obtain at least one matching sentence; The sentence processing layer is used to standardize the document structure of the initial professional document according to each matching sentence to obtain the standardized professional document.

4. The method according to any one of claims 1 to 3, characterized in that: The step of generating an initial professional document based on the initial text and the professional document generation model includes: Performing similarity evaluation on the initial text according to a preset query knowledge base to obtain an evaluation result, wherein the query knowledge base is constructed according to a plurality of standard professional documents; When the evaluation result is that the initial text meets the professional document generation condition, the initial professional document is generated according to the initial text and the professional document generation model.

5. The method according to claim 4, characterized in that The query knowledge base includes the first vector corresponding to each of the standard professional documents, and the similarity evaluation is performed on the initial text according to the preset query knowledge base to obtain the evaluation result, including: Performing vectorization processing on the initial text to obtain a second vector corresponding to the initial text; Determine, based on the second vector, a target vector similar to the second vector from among the first vectors; The evaluation result is determined according to the second vector and the target vector.

6. The method according to claim 5, characterized in that The determining the evaluation result according to the second vector and the target vector includes: Calculating the similarity between the second vector and the target vector; If the similarity is less than a preset similarity threshold, determining that the evaluation result is that the initial text meets the professional document generation condition; If the similarity is greater than or equal to the similarity threshold, it is determined that the evaluation result is that the initial text does not meet the professional document generation condition.

7. The method according to claim 5, characterized in that The query knowledge base also includes query paragraphs corresponding to each of the first vectors. The generating model based on the initial text and the professional document to generate the initial professional document includes: Acquire a target query paragraph corresponding to the target vector from the query knowledge base; The initial professional document is generated according to the target query paragraph, the initial text and the professional document generation model.

8. The method according to claim 5, characterized in that The method further comprises: Obtaining each of the standard professional documents, and performing paragraph segmentation processing on each of the standard professional documents to obtain a plurality of segmented paragraphs; According to each of the segmented paragraphs, a plurality of to-be-processed paragraphs are obtained, and paragraph enhancement processing is performed on each of the to-be-processed paragraphs to obtain a plurality of query paragraphs; Vectorization processing is performed on each of the query paragraphs to obtain the first vector corresponding to each of the query paragraphs, and the corresponding relationship between each of the query paragraphs and each of the first vectors is stored in the query knowledge base.

9. A professional document generation device, characterized in that: The device comprises: A generation module, used for acquiring an initial text, and generating an initial professional document based on the initial text and a professional document generation model; A processing module, used for standardizing the document structure of the initial professional document according to the document standard processing model to obtain a standardized professional document; The document standard processing model is obtained by training based on a plurality of sample initial professional documents and sample standard professional documents corresponding to each of the sample initial professional documents.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, 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 8 are implemented.

12. A computer program product, comprising 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 8 are implemented.

Citation Information

Patent Citations

  • Dispute case entity identification method and device, computer equipment and storage medium

    CN111062834A

  • Sentence vector generation method and device, computer equipment and storage medium

    CN114444471A

  • Automatic typesetting method and system for documents

    CN116738934A

  • Document adjustment method and device, equipment and storage medium

    CN117829116A

  • Bulletin document generation method, device and equipment

    CN118485054A