Content inspection method and device, readable medium and electronic equipment
By real-time detection of the separated marks of the stream generation model, the target inspection content is determined and the inspection is carried out, and the problem of verification is solved in the prior art after all content is generated, efficient content inspection and output is achieved, and the output speed and accuracy of the stream generation model are improved.
Patent Information
- Application Number
- CN202311560442.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, machine learning models often have grammatical errors, spelling errors or logical confusion when generating natural language texts, resulting in content verification that needs to be performed after all content is generated, which reduces the output speed of the model.
Provide a content inspection method. By obtaining the content to be output generated by the stream generation model in real time, when a separation mark is detected, the target inspection content is determined and the inspection is carried out. If the inspection is passed, the target content will be output immediately, and the output characteristics of the stream generation model are maintained.
The streaming generation model generates content while the content to be output is checked and outputted, which improves the output speed of the streaming generation model, reduces user waiting time, and improves the accuracy of content verification.
Smart Images

Figure CN120030985A_ABST
Abstract
Claims
1. A content verification method, It is characterized in that The method comprises: Obtain the content to be output generated in real time by the streaming generation model; When it is detected that the real-time generated content is a separation mark, based on the separation mark, a target inspection content is determined, and the target inspection content is inspected to obtain a target inspection result; When the target inspection result indicates that the inspection is passed, target contents are determined to be output based on the target inspection contents.
2. The method according to claim 1, It is characterized in that The step of determining target inspection content based on the separation identifier includes: Determine all contents between the separation mark and the historical separation mark detected last time as target inspection contents; The step of determining the target content for output based on the target inspection content includes: The target inspection content is determined as the target content for output.
3. The method according to claim 1, It is characterized in that The step of determining target inspection content based on the separation identifier includes: Determine all contents acquired before the separation mark as target inspection contents; The step of determining the target content for output based on the target inspection content includes: The remaining contents in the target inspection contents except the historical target contents are determined as target contents for output, wherein the historical target contents are the contents that have been outputted in the historical inspection process.
4. The method according to claim 1, It is characterized in that The step of determining target inspection content based on the separation identifier includes: Determine all contents between the separation mark and the last detected historical separation mark as the first inspection content, and determine all contents acquired before the separation mark as the second inspection content. Accordingly, the target inspection content includes the first inspection content and the second inspection content. The step of inspecting the target inspection content to obtain a target inspection result includes: The first inspection content is inspected to obtain a first inspection result, and the second inspection content is inspected to obtain a second inspection result. Accordingly, the target inspection result includes the first inspection result and the second inspection result; The step of determining the target content for output based on the target inspection content includes: The first inspection content in the target inspection content is determined as target content for output.
5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: When the target inspection result indicates that the inspection has not been passed, content output based on the target inspection content is prohibited, and / or the content that has been output during the historical inspection process is revoked.
6. The method according to any one of claims 1 to 4, It is characterized in that The step of inspecting the target inspection content to obtain a target inspection result includes: The target inspection content is input into a target content inspection model to obtain a target inspection result, wherein the target content inspection model is trained based on sample inspection content that is pre-labeled with label data, and the label data of the sample inspection content includes abnormal label content in the sample inspection content and label tags indicating semantic abnormalities.
7. The method according to claim 6, It is characterized in that The step of inputting the target inspection content into a target content inspection model to obtain a target inspection result includes: Determine a semantic inspection result according to the target inspection content, wherein the semantic inspection result is used to indicate whether there is a target semantic content in the target inspection content, and the target semantic content is the content with the same semantics as the abnormal content indication in a preset database; When the target semantic content does not exist in the target inspection content, determining that the target inspection result of the target inspection content is passed inspection; When the target semantic content exists in the target inspection content, it is determined that the target inspection result of the target inspection content is failure to pass the inspection.
8. The method according to any one of claims 1 to 4, It is characterized in that The step of inspecting the target inspection content to obtain a target inspection result includes: When there is a logical clue in the target inspection content, determining at least two clue contents associated under the logical clue, wherein the logical clue includes at least one of a time clue or a data calculation clue; Determining a logical relationship between the at least two clue contents, wherein the logical relationship is used to indicate whether the at least two clue contents conform to the logic under the corresponding logical clue; When the logical relationship indicates that the at least two clue contents conform to the logic under the corresponding logical clue, determining that the target inspection result of the target inspection content is passed inspection; When the logical relationship represents that the at least two clue contents do not conform to the logic under the corresponding logical clue, it is determined that the target inspection result of the target inspection content is failed to pass the inspection.
9. A content checking device, It is characterized in that The device comprises: An acquisition module is used to acquire the content to be output generated in real time by the streaming generation model; A testing module, for determining target testing content based on the separation identifier when detecting that the real-time generated content is a separation identifier, and testing the target testing content to obtain a target testing result; The first output module is used to determine the target content for output based on the target inspection content when the target inspection result indicates that the inspection is passed.
10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 8 are implemented.
11. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.