Nothing Special   »   [go: up one dir, main page]

CN110781673A - Document acceptance method and device, computer equipment and storage medium - Google Patents

Document acceptance method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110781673A
CN110781673A CN201910842154.8A CN201910842154A CN110781673A CN 110781673 A CN110781673 A CN 110781673A CN 201910842154 A CN201910842154 A CN 201910842154A CN 110781673 A CN110781673 A CN 110781673A
Authority
CN
China
Prior art keywords
verification
result
document
single sentence
acceptance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910842154.8A
Other languages
Chinese (zh)
Other versions
CN110781673B (en
Inventor
戚慧怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910842154.8A priority Critical patent/CN110781673B/en
Publication of CN110781673A publication Critical patent/CN110781673A/en
Application granted granted Critical
Publication of CN110781673B publication Critical patent/CN110781673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)

Abstract

The invention discloses a document acceptance method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a document to be processed; acquiring a target single sentence from a document to be processed; inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain a semantic result keyword; acquiring an expected verification result of a verification item corresponding to the verification item keyword from a preset verification item set; inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and detecting whether the verification result keyword is matched with the expected verification result by using the test function to obtain the verification result of the verification item corresponding to the verification item keyword; and determining the acceptance result of the document to be processed according to the verification result of each verification item. The technical scheme of the invention can improve the automation level and the acceptance efficiency of document acceptance.

Description

Document acceptance method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of text processing, in particular to a document acceptance method and device, computer equipment and a storage medium.
Background
With the deep development of information technology, modern software engineering projects are increasingly huge, and functional modules in the projects can be developed, tested, produced and operated by independent development teams.
In order to facilitate project management and maintenance, different functional modules should have perfect data documents. For example, the profile documents include requirements documents, interface documents, test cases, test reports, and the like. When the project is finished, the reviewer of the project needs to review and accept these documents.
At present, the existing checking and acceptance schemes are generally carried out by manually checking and accepting the texts one by one, and a result of acceptance is obtained by relying on the experience of a practitioner, or the text is automatically checked and accepted by a simple text recognition mode. However, due to the diversity and difference of the document, the manual acceptance mode consumes a lot of time, and the acceptance efficiency is low, while the automatic acceptance mode of character recognition is prone to recognition error, and cannot obtain an accurate acceptance result, and the automatic acceptance result is often required to be manually rechecked, so that the automation level of document acceptance is low, and the acceptance efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a document acceptance method and device, computer equipment and a storage medium, and aims to solve the problems of low automation level and low acceptance efficiency of current document acceptance.
A document acceptance method comprising:
acquiring a document to be processed;
acquiring a target single sentence from the document to be processed;
inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain semantic result keywords, wherein the semantic result keywords comprise verification item keywords and verification result keywords;
obtaining an expected verification result of a verification item corresponding to the verification item keyword from a preset verification item set;
inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and using the test function to detect whether the verification result keyword is matched with the expected verification result, so as to obtain the verification result of the verification item corresponding to the verification item keyword;
and determining the acceptance result of the document to be processed according to the verification result of each verification item.
A document acceptance device, comprising:
the document acquisition module is used for acquiring a document to be processed;
the single sentence acquisition module is used for acquiring a target single sentence from the document to be processed;
the semantic recognition module is used for inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain semantic result keywords, wherein the semantic result keywords comprise verification item keywords and verification result keywords;
the data reading module is used for acquiring an expected verification result of a verification item corresponding to the verification item keyword from a preset verification item set;
the test matching module is used for inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and detecting whether the verification result keyword is matched with the expected verification result by using the test function to obtain the verification result of the verification item corresponding to the verification item keyword;
and the result output module is used for determining the acceptance result of the document to be processed according to the verification result of each verification item.
A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the above document acceptance method when executing said computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned document acceptance method.
In the document acceptance method, the document acceptance device, the computer equipment and the storage medium, after a target single sentence is obtained from a document to be processed, the target single sentence is firstly input into a preset NLP-based semantic analysis model, semantic recognition is carried out on the target single sentence to obtain a semantic result keyword comprising a verification item keyword and a verification result keyword, then the verification result keyword and the expected verification result are input into a test function corresponding to the verification item according to the expected verification result of the verification item corresponding to the verification item keyword, whether the verification result keyword is matched with the expected verification result is detected by using the test function to obtain the verification result of the verification item corresponding to the verification item keyword, and finally the acceptance result of the document to be processed is determined according to the verification result of each verification item. Carry out semantic recognition through NLP semantic analysis model, can accurately discern verification result keyword, reuse test function to verify verification result keyword, obtain accurate verification result, the automatic chemical examination acceptance process of treating the document of handling has been realized, improve the automation level of document acceptance, and the rate of accuracy of acceptance result is high, need not to recheck through the manual work again, effectively improve the efficiency of acceptance, and simultaneously, when the acceptance standard changes, need not to change NLP semantic analysis model and test function, only need dispose verification item information in the verification item set, can satisfy the acceptance demand of different acceptance standards, thereby further improve the automation level and the acceptance efficiency of document acceptance.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of an application environment of a document acceptance method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a document acceptance method in one embodiment of the present invention;
FIG. 3 is a flowchart of step S2 in the document acceptance method according to an embodiment of the present invention;
FIG. 4 is a flowchart of step S22 in the document acceptance method according to an embodiment of the present invention;
FIG. 5 is a flowchart of step S6 in the document acceptance method according to an embodiment of the present invention;
FIG. 6 is a flowchart of the configuration of the verification item in the document acceptance method in accordance with one embodiment of the present invention;
FIG. 7 is a schematic diagram of a document acceptance device in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The document acceptance method provided by the application can be applied to an application environment shown in fig. 1, the application environment comprises a server and a client, wherein the server and the client are connected through a network, the network can be a wired network or a wireless network, the client specifically comprises but is not limited to various personal computers, notebook computers, smart phones, tablet computers and the like, and the server can be specifically realized by an independent server or a server cluster formed by a plurality of servers. The client sends the document to be processed to the server, and the server completes automatic acceptance processing of the document to be processed.
In an embodiment, as shown in fig. 2, a document acceptance method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and specifically includes steps S1 to S6, which are detailed as follows:
s1: and acquiring a document to be processed.
Specifically, the document to be processed can be launched to the server by the user through the client. The documents to be processed are specifically data documents that need to be checked and accepted, and include but are not limited to requirement documents, interface documents, test cases, test reports and the like. The file type of the document to be processed is not limited, and may be a file type of multiple different formats, such as excel, word, pdf, and the like.
S2: and acquiring a target single sentence from the document to be processed.
Specifically, by performing sentence segmentation on a document to be processed and removing redundant information from the segmented sentences, a high-quality single sentence, i.e., a target single sentence, which can express semantics and has little redundant information is obtained.
It is understood that the target single sentence in the document to be processed may be several.
S3: inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain semantic result keywords, wherein the semantic result keywords comprise verification item keywords and verification result keywords.
Specifically, the NLP (Natural Language Processing) based semantic analysis model is a machine learning model for understanding and analyzing Natural Language, and the preset NLP based semantic analysis model may be a machine learning model obtained by training collected sample data in advance by using a deep learning algorithm, where the deep learning algorithm may be a Convolutional Neural network (Convolutional Neural network), a cyclic Neural network (Recursive Neural network), a Recursive Neural network (Recursive Neural network), or the like.
Inputting a target single sentence into a NLP-based semantic analysis model, performing word segmentation processing on the target single sentence in the semantic analysis model, segmenting the target single sentence into a plurality of words, representing the words in a word vector form, performing semantic recognition processing on the words, in the semantic recognition processing process, a commonly-used slot filling method can be adopted, setting keywords related to each verification item and near-meaning words close to the keywords as slots (slots) in advance, and then inquiring words matched with the slots in the words of the target single sentence to obtain semantic result keywords.
The semantic result keywords comprise verification item keywords and verification result keywords, the verification item keywords are used for representing verification contents of the verification items, and the verification result keywords are used for representing verification results of the verification items.
It should be noted that, the user may preset an acceptance criterion of the document to be processed, and the acceptance criterion may include a plurality of verification items. And the server inputs all the target single sentences obtained in the step S1 into a semantic analysis model based on NLP, and semantic recognition is carried out to obtain semantic result keywords corresponding to each verification item.
For example, the document to be processed is a terminal test report, and the acceptance criteria of the terminal test report may include verification items such as "display screen test", "touch screen test", "number of test mobile phones", and the like. If a certain target single sentence is that the display screen test is passed, performing semantic recognition on the target single sentence through a semantic analysis model based on NLP to obtain a verification item keyword corresponding to the verification item of the display screen test, wherein the verification item keyword is the display screen test, and the verification result keyword is the pass. If a certain target single sentence is 'tested in 10 mobile phones', the keyword of the verification item corresponding to the verification item 'number of test mobile phones' obtained by performing semantic recognition on the target single sentence through a semantic analysis model based on NLP is 'test mobile phone', and the keyword of the verification result is '10'.
S4: and obtaining an expected verification result of the verification item corresponding to the verification item keyword from a preset verification item set.
In this embodiment, the preset verification item set is a verification item included in the acceptance criterion of the document to be processed, which is preset by the user, and each verification item includes verification content and an expected verification result corresponding to the verification content. Wherein the expected verification result is determined according to the verification content, including pass, fail, quantity, and the like.
It should be noted that, the user may set acceptance criteria for the document to be processed in advance, and save the acceptance criteria in the form of a verification item set. When the acceptance standard changes, the verification item set can be updated only without modifying other acceptance processing, and meanwhile, on the basis of storing the semantic result keywords of the to-be-processed document obtained in the step S3, the acceptance result of the to-be-processed document can be obtained only by re-executing the steps S4 to S6, so that the repeated calculation is avoided, the execution flow is optimized, and the efficiency of automatic document acceptance is effectively improved.
For example, if the document to be processed is a third-party functional interface document, when the user has a new or stricter acceptance requirement for the third-party functional interface document, the acceptance processing of the third-party functional interface document can be automatically completed only by modifying the content of the verification item set or the expected verification result in the verification item set, thereby effectively improving the automation level and the acceptance efficiency of document acceptance.
Specifically, the verification content matched with the keyword of the verification item is searched in a preset verification item set, and an expected verification result corresponding to the verification content is obtained.
S5: and inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and detecting whether the verification result keyword is matched with the expected verification result by using the test function to obtain the verification result of the verification item corresponding to the verification item keyword.
Specifically, the input of the test function is a verification result keyword and an expected verification result, and the output is a verification result of the verification item. The test function is used for detecting the matching degree of the verification result keyword and the expected verification result so as to determine whether the verification result keyword is consistent with the expected verification result or not, and obtaining the verification result of the verification item corresponding to the verification item keyword according to the detection result. The verification result may include two results, i.e., pass and fail.
The test function may specifically detect a matching degree between the verification result keyword and the expected verification result by using a preset keyword matching manner. The keyword matching mode may specifically be a text matching mode, and may also be a mode of calculating text similarity.
And if the text matching mode is adopted, detecting whether the expected verification result is contained in the verification result keyword, if so, determining that the detection result is passed, and if not, determining that the detection result is not passed. If the text similarity is calculated, detecting the text similarity between the keyword of the verification result and the expected verification result, if the text similarity is greater than a preset similarity threshold, determining that the detection result is passed, and if the text similarity is less than or equal to the preset similarity threshold, determining that the detection result is not passed.
It can be understood that the keyword matching mode adopted by the test function is specifically set according to the characteristics of the verification item. For example, for the verification item "display screen test", the corresponding test function may perform keyword matching by calculating text similarity to detect the matching degree between the verification result keyword and the expected verification result, or may detect whether the verification result keyword includes the expected verification result by text matching; for the verification item of 'testing the number of mobile phones', the expected verification result is a number, so that the corresponding test function adopts a text matching mode to detect whether the keyword of the verification result contains the value of the expected verification result.
The verification result output by the test function may be structured data, and specifically may be a key value pair composed of verification content of the verification item and the verification result, where the verification content is used as a key name and the verification result is used as a key value. For example, a set of output verification results may be expressed as: { "test 1": "pass" }, { "test 2": "failed" }, { "number of handsets tested": "pass" }. The structured output has the effect of extracting key value pair structures from complex text relations, and facilitating subsequent data quantization processing.
S6: and determining the acceptance result of the document to be processed according to the verification result of each verification item.
Specifically, the server obtains the verification result of each verification item in the preset verification item set through steps S3 to S5, and performs summary analysis on all the verification results to determine the acceptance result of the document to be processed.
In a specific embodiment, the server side counts the number of the verification items with the verification result of passing, calculates the ratio of the number to the total number of the verification items, and takes the ratio as the acceptance passing rate, if the acceptance passing rate reaches the preset passing rate threshold, the acceptance result of the document to be processed is determined as acceptance passing, otherwise, the acceptance result of the document to be processed is determined as acceptance failing.
In an actual application scenario, the acceptance requirements of the documents to be processed at different periods may be different, for example, for a test document of a third-party functional interface, only part of the test result may be required to be achieved in the previous period, and therefore, the acceptance result can be flexibly adjusted by adjusting the threshold of the pass rate.
In this embodiment, after a target single sentence is obtained from a document to be processed, the target single sentence is input into a preset NLP-based semantic analysis model, semantic recognition is performed on the target single sentence to obtain a semantic result keyword including a validation item keyword and a validation result keyword, then the validation result keyword and an expected validation result of a validation item corresponding to the validation item keyword are input into a test function corresponding to the validation item according to the expected validation result of the validation item corresponding to the validation item keyword, whether the validation result keyword is matched with the expected validation result is detected by using the test function to obtain the validation result of the validation item corresponding to the validation item keyword, and finally, a validation result of the document to be processed is determined according to the validation result of each validation item. Carry out semantic recognition through NLP semantic analysis model, can accurately discern verification result keyword, reuse test function to verify verification result keyword, obtain accurate verification result, the automatic chemical examination acceptance process of treating the document of handling has been realized, improve the automation level of document acceptance, and the rate of accuracy of acceptance result is high, need not to recheck through the manual work again, thereby effectively improve the efficiency of acceptance, and simultaneously, when the acceptance standard changes, need not to change NLP semantic analysis model and test function, only need dispose verification item information in the verification item set, can satisfy the acceptance demand of different acceptance standards, thereby further improve the automation level and the acceptance efficiency of document acceptance.
In one embodiment, as shown in fig. 3, in step S2, the target single sentence is obtained from the document to be processed, specifically including steps S21 to S22, which are detailed as follows:
s21: and formatting the document to be processed to obtain a basic single sentence.
Specifically, the formatting process refers to reading a text of a document to be processed by a natural language processing technology to generate a basic single sentence, i.e., sentences. For example, each basic single sentence can be obtained by identifying punctuation marks in the document to be processed and taking the punctuation marks as segmentation points. For the table in the document or the document to be processed in the form of the table, the service end can use the TableBank proposed by microsoft asia research institute to complete formatting, detect and identify the text content in the table, and obtain the basic single sentence in the table.
For example, after a document to be processed on how to perform a terminal test is formatted, a number of basic phrases may be reached, such as "the display screen test has passed", "10 mobile phones have been tested", "the touch screen test is abnormal", and so on.
S22: and extracting the information abstract of the basic single sentence, and removing redundant information to obtain a target single sentence.
Specifically, the basic single sentence obtained in step S21 may still have redundant or disordered information, which is not beneficial to the later semantic recognition process, so that the server needs to extract the summary of information from the basic single sentence, obtain a high-quality single sentence, i.e., a target single sentence, which has less redundant information and can express semantics, thereby helping to improve the accuracy of subsequent semantic recognition and verification result output.
The server side can select basic single sentences related to the acceptance criteria from the basic single sentences, and extract abstract information of the selected basic single sentences to obtain abstract information, wherein the abstract information can be composed of a plurality of phrases or phrases; and then deleting or recombining the abstract information to generate a target single sentence.
In the embodiment, the document to be processed is firstly formatted to obtain the basic single sentence, then the basic single sentence is subjected to information abstraction extraction, redundant information is removed, the high-quality target single sentence is obtained, an effective data base can be provided for accurate NLP semantic identification and accurate verification result output by the test function, and therefore the result accuracy of automatic acceptance of the document to be processed is improved.
In an embodiment, as shown in fig. 4, in step S22, the method performs information summarization on the basic single sentence, removes redundant information, and obtains a target single sentence, which specifically includes steps S221 to S223, which are detailed as follows:
s221: and carrying out abstract extraction on the basic single sentence according to a preset extraction mode to obtain abstract information.
Specifically, the preset extraction manner includes, but is not limited to, a linear combination manner, a graph model manner, a subtopic analysis manner, and the like.
The linear combination mode utilizes a manually constructed scoring function to set a plurality of important features and manually set feature weights, so as to score and calculate the importance of short sentences or phrases forming basic sentences; and then sorting according to the score results, and selecting short sentences or phrases with scores larger than a preset score threshold value as summary information. The characteristic weight is related to the field of the document to be processed, for example, some interface documents are related to a communication protocol, and technical terms related to the communication protocol, such as an HTTP protocol, signaling, and the like, may have a higher weight and can be preferentially used as summary information.
The graph model mode is that each basic single sentence in the document to be processed is used as a node in the graph, and the content similarity between the basic single sentences is utilized to construct the edge between the nodes in the graph. After the graph is constructed, iteration calculation is carried out on the weight values of the nodes in the graph by using a PageRank algorithm or a HITS (Hyperlink-Induced Topic Search) algorithm, and abstract extraction is carried out on the basic single sentence according to the weight value as a scoring basis of the importance of the basic single sentence.
The subtopic Analysis mode is to discover the subtopics contained in the basic single sentence through clustering or means such as LSA (Latent Semantic Analysis) and pLSA (probabilistic Latent Semantic Analysis), and to extract the basic single sentence from different subtopics to construct summary information.
And the server extracts the abstract of the basic single sentence according to a preset extraction mode, removes other basic single sentences irrelevant to the acceptance standard, removes redundant information from the screened basic single sentences, and extracts abstract information, wherein the extracted abstract information comprises a plurality of phrases or phrases.
S222: and classifying each word in the abstract information according to the part of speech to obtain the part of speech category of each word.
Specifically, the server classifies each word in the summary information according to part of speech, and the part of speech categories include nouns, verbs, auxiliary words and the like.
S223: and selecting the words meeting the preset grammar structure according to the part-of-speech category of each word to form a target single sentence meeting the preset single sentence length.
Specifically, the preset grammar structure refers to a preset grammar structure of a target single sentence, and includes, but is not limited to, a predicate structure, a piont structure, and the like. That is, a single sentence of the structure of a predicate consists of nouns + verbs; the structure of the main predicate object consists of nouns + verbs + nouns, wherein auxiliary words may exist; bingo constructs consist of verbs + nouns.
The word number limit of the target single sentence with the length of the single sentence is preset, and the service end can set the word number limit of the target single sentence according to actual needs. For example, if the preset single sentence length is set to 15, the number of words in the target single sentence cannot exceed 15 words.
And the server selects words with corresponding parts of speech from the summary information for combination according to the part of speech forming mode in the preset grammar structure and the part of speech category of each word in the summary information, and the number of words of the combined target single sentence is not more than the length of the preset single sentence.
It should be noted that different preset syntax structures may correspond to different preset single sentence lengths, and the preset syntax structures may be specifically set according to the needs of the practical application, which is not limited herein.
In the embodiment, the abstract information is extracted from the basic single sentence according to a preset extraction mode, the part-of-speech category of each word in the abstract information is identified, the word meeting a preset grammar structure is selected according to the part-of-speech category of each word to form a target single sentence meeting the length of the preset single sentence, the extraction of the target single sentence with high quality is realized, an effective data base can be provided for accurate NLP semantic identification and accurate verification result output by a test function, and the result accuracy of automatic acceptance of the document to be processed is improved.
In one embodiment, as shown in fig. 5, in step S6, the acceptance result of the document to be processed is determined according to the verification result of each verification item, and specifically includes steps S61 to S63, which are detailed as follows:
s61: and carrying out logical operation on the verification result of each verification item according to a preset logical operation mode to obtain an operation result.
Specifically, the verification result of the verification item may be represented by logic data, that is, the value corresponding to "pass" of the verification result is "true", and the value corresponding to "fail" of the verification result is "false". At this time, the verification result of each verification item may be logically operated according to a preset logical operation manner to obtain an operation result. It can be understood that the operation result is logic type data, and only two values of true and false are available.
The preset logical operation mode may be a logical and operation, a logical or operation, or a combined operation of the logical and operation and the logical or operation, and specifically, different operation modes may be selected for different verification items according to the requirements of the acceptance criteria, and the different operation modes are combined to form the preset logical operation mode.
For example, if the verification results of five verification items of the to-be-processed document are (True, False), and the preset logical operation manner is logical and operation, the obtained operation result of the to-be-processed document is False.
S62: and if the operation result is true, determining that the acceptance result is acceptance pass.
Specifically, if the operation result obtained in step S61 is True, that is, True, the server determines that the acceptance result of the document to be processed is acceptance pass.
S63: and if the operation result is false, determining that the acceptance result is that the acceptance is not passed.
Specifically, if the operation result obtained in step S61 is False, that is, False, the server determines that the acceptance result of the document to be processed is acceptance
In the embodiment, the verification result of each verification item is subjected to logical operation according to a preset logical operation mode to obtain an operation result, the acceptance result of the document to be processed is determined according to the operation result, the acceptance result can be quickly and accurately obtained through the logical operation mode, the preset logical operation mode can be updated in real time according to the change of the acceptance standard, and the flexibility of automatic acceptance is improved.
In an embodiment, as shown in fig. 6, before step S4, that is, before obtaining the expected verification result of the verification item corresponding to the verification item key from the preset verification item set, the verification item may be configured, specifically including steps S71 to S72, which are detailed as follows:
s71: and if the configuration request of the verification item is received, acquiring a target verification value of the verification item from the configuration request.
Specifically, for a document to be processed of the same type, for example, a test case document, when an acceptance criterion changes, a user may initiate a configuration request for a verification item through a client, where the configuration request includes identification information of the verification item that needs to be changed and a target verification value of the verification item.
The client sends the configuration request to the server, and the server reads the identification information and the target verification value of the verification item from the received configuration request.
S72: and in the verification item set, modifying the value of the expected verification result of the verification item into a target verification value.
Specifically, the server obtains the verification item corresponding to the identification information from the preset verification item set according to the identification information of the verification item read in step S71, and reads an expected verification result of the verification item.
And if the read value of the expected verification result is different from the target verification value, modifying the value of the expected verification result into the target verification value.
In this embodiment, for the same type of document to be processed, when the acceptance criteria needs to be adjusted, the configuration request only needs to modify the value of the expected verification result of the corresponding verification item in the verification item set to the target verification value in the configuration request, and no change or modification is needed to be performed on the NLP-based semantic recognition model and the test function, so that the requirements of different acceptance criteria can be met, flexible automatic document acceptance is realized, the acceptance efficiency is improved, and higher flexibility is achieved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a document acceptance apparatus is provided, and the document acceptance apparatus corresponds to the document acceptance method in the above embodiment one to one. As shown in fig. 7, the document acceptance apparatus includes: the system comprises a document acquisition module 10, a single sentence acquisition module 20, a semantic recognition module 30, a data reading module 40, a test matching module 50 and a result output module 60. The functional modules are explained in detail as follows:
the document acquisition module 10 is used for acquiring a document to be processed;
a single sentence acquisition module 20, configured to acquire a target single sentence from a document to be processed;
the semantic recognition module 30 is configured to input the target single sentence into a preset NLP-based semantic analysis model, perform semantic recognition on the target single sentence by using the semantic analysis model, and obtain semantic result keywords, where the semantic result keywords include verification item keywords and verification result keywords;
the data reading module 40 is configured to obtain an expected verification result of the verification item corresponding to the verification item keyword from a preset verification item set;
the test matching module 50 is used for inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and using the test function to detect whether the verification result keyword is matched with the expected verification result, so as to obtain the verification result of the verification item corresponding to the verification item keyword;
and the result output module 60 is used for determining the acceptance result of the document to be processed according to the verification result of each verification item.
Further, the single sentence acquisition module 20 includes:
the formatting submodule 21 is configured to format a document to be processed to obtain a basic single sentence;
and the abstract extraction submodule 22 is used for performing information abstract extraction on the basic single sentence, removing redundant information and obtaining a target single sentence.
Further, the abstract extraction sub-module 22 includes:
the extraction unit 221 is configured to extract the abstract of the basic single sentence according to a preset extraction manner to obtain abstract information;
a classifying unit 222, configured to classify each word in the summary information according to a part of speech to obtain a part of speech category of each word;
and the combining unit 223 is configured to select words meeting the preset grammar structure according to the part-of-speech category of each word, and combine the target single sentence meeting the preset single sentence length.
Further, the result output module 60 includes:
the logical operation submodule 61 is used for carrying out logical operation on the verification result of each verification item according to a preset logical operation mode to obtain an operation result;
a first result sub-module 62, configured to determine that the acceptance result is acceptance pass if the operation result is true;
and a second result submodule 63, configured to determine that the acceptance result is that the acceptance is not passed if the operation result is false.
Further, the document acceptance apparatus further includes:
a configuration request module 71, configured to, if a configuration request for a verification item is received, obtain a target verification value of the verification item from the configuration request;
and a configuration modification module 72, configured to modify, in the verification item set, a value of an expected verification result of the verification item to a target verification value.
For the specific definition of the document acceptance device, reference may be made to the above definition of the document acceptance method, and details are not described here. The modules in the document checking device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a document acceptance method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the document acceptance method in the above embodiments, such as steps S1 to S6 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the respective modules/units of the document acceptance apparatus in the above-described embodiments, such as the functions of the modules 10 to 60 shown in fig. 7. To avoid repetition, further description is omitted here.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the document acceptance method in the above-described method embodiment, or which when executed by a processor implements the functions of each module/unit in the document acceptance apparatus in the above-described apparatus embodiment. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A document acceptance method, characterized in that the document acceptance method comprises:
acquiring a document to be processed;
acquiring a target single sentence from the document to be processed;
inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain semantic result keywords, wherein the semantic result keywords comprise verification item keywords and verification result keywords;
obtaining an expected verification result of a verification item corresponding to the verification item keyword from a preset verification item set;
inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and using the test function to detect whether the verification result keyword is matched with the expected verification result, so as to obtain the verification result of the verification item corresponding to the verification item keyword;
and determining the acceptance result of the document to be processed according to the verification result of each verification item.
2. The document acceptance method of claim 1, wherein the obtaining of the target single sentence from the document to be processed comprises:
formatting the document to be processed to obtain a basic single sentence;
and extracting the information abstract of the basic single sentence, and removing redundant information to obtain a target single sentence.
3. The document acceptance method of claim 2, wherein the extracting the information abstract of the basic single sentence and removing redundant information to obtain the target single sentence comprises:
performing abstract extraction on the basic single sentence according to a preset extraction mode to obtain abstract information;
classifying each word in the abstract information according to the part of speech to obtain the part of speech category of each word;
and selecting the words meeting a preset grammar structure according to the part of speech category of each word to form the target single sentence meeting the preset single sentence length.
4. The document acceptance method of claim 1, wherein the determining an acceptance result of the document to be processed according to the verification result of each verification item comprises:
performing logical operation on the verification result of each verification item according to a preset logical operation mode to obtain an operation result;
if the operation result is true, determining that the acceptance result is acceptance pass;
and if the operation result is false, determining that the acceptance result is that the acceptance is not passed.
5. The document acceptance method according to any one of claims 1 to 4, wherein, before the step of obtaining the expected verification result of the verification item corresponding to the verification item keyword from a preset verification item set, the document acceptance method further comprises:
if a configuration request for the verification item is received, acquiring a target verification value of the verification item from the configuration request;
in the verification item set, modifying the value of the expected verification result of the verification item to the target verification value.
6. A document acceptance apparatus, characterized in that the document acceptance apparatus comprises:
the document acquisition module is used for acquiring a document to be processed;
the single sentence acquisition module is used for acquiring a target single sentence from the document to be processed;
the semantic recognition module is used for inputting the target single sentence into a preset NLP-based semantic analysis model, and performing semantic recognition on the target single sentence by using the semantic analysis model to obtain semantic result keywords, wherein the semantic result keywords comprise verification item keywords and verification result keywords;
the data reading module is used for acquiring an expected verification result of a verification item corresponding to the verification item keyword from a preset verification item set;
the test matching module is used for inputting the verification result keyword and the expected verification result into a test function corresponding to the verification item, and detecting whether the verification result keyword is matched with the expected verification result by using the test function to obtain the verification result of the verification item corresponding to the verification item keyword;
and the result output module is used for determining the acceptance result of the document to be processed according to the verification result of each verification item.
7. The document acceptance apparatus of claim 6 wherein the single sentence acquisition module comprises:
the formatting submodule is used for formatting the document to be processed to obtain a basic single sentence;
and the abstract extraction submodule is used for carrying out information abstract extraction on the basic single sentence and removing redundant information to obtain a target single sentence.
8. The document acceptance apparatus according to claim 6, wherein the digest extraction sub-module includes:
the extraction unit is used for carrying out abstract extraction on the basic single sentence according to a preset extraction mode to obtain abstract information;
the classification unit is used for classifying each word in the abstract information according to the part of speech to obtain the part of speech category of each word;
and the combination unit is used for selecting the words meeting a preset grammar structure according to the part-of-speech category of each word to form the target single sentence meeting the preset single sentence length.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the document acceptance method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out a document acceptance method according to any one of claims 1 to 5.
CN201910842154.8A 2019-09-06 2019-09-06 Document acceptance method and device, computer equipment and storage medium Active CN110781673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910842154.8A CN110781673B (en) 2019-09-06 2019-09-06 Document acceptance method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910842154.8A CN110781673B (en) 2019-09-06 2019-09-06 Document acceptance method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110781673A true CN110781673A (en) 2020-02-11
CN110781673B CN110781673B (en) 2022-06-17

Family

ID=69384050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910842154.8A Active CN110781673B (en) 2019-09-06 2019-09-06 Document acceptance method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110781673B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581090A (en) * 2020-04-30 2020-08-25 重庆富民银行股份有限公司 Automatic test case generation method and system based on NLP and RF framework
CN112836070A (en) * 2021-02-02 2021-05-25 山东寻声网络科技有限公司 Application of NLP technology in data analysis
CN114741497A (en) * 2022-03-08 2022-07-12 北京元年科技股份有限公司 Method, device and equipment for generating data presentation and computer readable storage medium
CN116245108A (en) * 2022-11-25 2023-06-09 北京瑞风协同科技股份有限公司 Verification matching guide method, verification matching guide, device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122265A (en) * 2011-03-03 2011-07-13 中国工商银行股份有限公司 System and method for verifying computer software test results
US20170017922A1 (en) * 2015-07-14 2017-01-19 Wal-Mart Stores, Inc. Method, apparatus and system for determining accuracy of deliveries and related documentation at time of delivery
CN110119496A (en) * 2019-04-15 2019-08-13 中国平安人寿保险股份有限公司 Area for document authentication method, apparatus, computer equipment and storage medium
CN110134929A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Document verification method, apparatus, computer equipment and storage medium
CN110162468A (en) * 2019-04-26 2019-08-23 腾讯科技(深圳)有限公司 A kind of test method, device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122265A (en) * 2011-03-03 2011-07-13 中国工商银行股份有限公司 System and method for verifying computer software test results
US20170017922A1 (en) * 2015-07-14 2017-01-19 Wal-Mart Stores, Inc. Method, apparatus and system for determining accuracy of deliveries and related documentation at time of delivery
CN110119496A (en) * 2019-04-15 2019-08-13 中国平安人寿保险股份有限公司 Area for document authentication method, apparatus, computer equipment and storage medium
CN110134929A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Document verification method, apparatus, computer equipment and storage medium
CN110162468A (en) * 2019-04-26 2019-08-23 腾讯科技(深圳)有限公司 A kind of test method, device and computer readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581090A (en) * 2020-04-30 2020-08-25 重庆富民银行股份有限公司 Automatic test case generation method and system based on NLP and RF framework
CN111581090B (en) * 2020-04-30 2023-02-24 重庆富民银行股份有限公司 Automatic test case generation method and system based on NLP and RF framework
CN112836070A (en) * 2021-02-02 2021-05-25 山东寻声网络科技有限公司 Application of NLP technology in data analysis
CN114741497A (en) * 2022-03-08 2022-07-12 北京元年科技股份有限公司 Method, device and equipment for generating data presentation and computer readable storage medium
CN116245108A (en) * 2022-11-25 2023-06-09 北京瑞风协同科技股份有限公司 Verification matching guide method, verification matching guide, device, and storage medium
CN116245108B (en) * 2022-11-25 2023-09-26 北京瑞风协同科技股份有限公司 Verification matching guide method, verification matching guide, device, and storage medium

Also Published As

Publication number Publication date
CN110781673B (en) 2022-06-17

Similar Documents

Publication Publication Date Title
CN108647205B (en) Fine-grained emotion analysis model construction method and device and readable storage medium
WO2021042503A1 (en) Information classification extraction method, apparatus, computer device and storage medium
CN110781673B (en) Document acceptance method and device, computer equipment and storage medium
CN111897970A (en) Text comparison method, device and equipment based on knowledge graph and storage medium
WO2020186627A1 (en) Public opinion polarity prediction method and apparatus, computer device, and storage medium
CN109063217B (en) Work order classification method and device in electric power marketing system and related equipment thereof
CN111563384B (en) Evaluation object identification method and device for E-commerce products and storage medium
EP3819785A1 (en) Feature word determining method, apparatus, and server
CN109446885B (en) Text-based component identification method, system, device and storage medium
CN109657137B (en) Public opinion news classification model construction method, device, computer equipment and storage medium
CN112036168B (en) Event main body recognition model optimization method, device, equipment and readable storage medium
CN112416778A (en) Test case recommendation method and device and electronic equipment
CN111985228A (en) Text keyword extraction method and device, computer equipment and storage medium
US11074406B2 (en) Device for automatically detecting morpheme part of speech tagging corpus error by using rough sets, and method therefor
CN112069069A (en) Defect automatic positioning analysis method, device and readable storage medium
CN111428027A (en) Query intention determining method and related device
US11755677B2 (en) Data mining method, data mining apparatus, electronic device and storage medium
CN111460114A (en) Retrieval method, device, equipment and computer readable storage medium
CN117556050B (en) Data classification and classification method and device, electronic equipment and storage medium
CN116975206B (en) Vertical field training method and device based on AIGC large model and electronic equipment
CN112579781B (en) Text classification method, device, electronic equipment and medium
CN116644183B (en) Text classification method, device and storage medium
CN112989829A (en) Named entity identification method, device, equipment and storage medium
CN115858776B (en) Variant text classification recognition method, system, storage medium and electronic equipment
CN111460811A (en) Crowdsourcing task answer verification method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant