Text detection method and device for publications based on large models
By building a large model containing input, inspection and correction modules, the problem of single text accuracy detection dimensions and low accuracy in the prior art is solved, comprehensive detection and correction of publication texts is achieved, and AI text detection capabilities are enhanced.
Patent Information
- Application Number
- CN202510260776.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing large language models have a single detection dimension in text accuracy detection and are low in accuracy, and cannot fully detect text errors in publications.
By obtaining the original publication data, using the big model to annotate and clean the data, combining manual annotation to build a training set, and training the big model of the publication. The model architecture includes input module, inspection module and correction module, which are used to detect statement-level and word-level grammatical errors and correct errors. If the text correctness meets the conditions, AI text detection will be performed.
It improves the accuracy of text detection, can fully detect sentence-level and word-level grammatical errors, and correct them, enhancing the detection ability of AI text.
Smart Images

Figure CN119761351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large model text detection, and in particular to a method and device for detecting text of publications based on a large model. Background Art
[0002] The large language model can provide the publishing industry with intelligent and efficient proofreading, translation, revision and other text tasks through its powerful language understanding capabilities.
[0003] However, the publishing industry has strict requirements on text correctness. The current large language models can only detect text correctness, and the detection dimension is relatively single. In addition, the detection accuracy of text correctness is relatively low.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a method and device for text detection of publications based on a large model, aiming to solve the technical problems that the current large language model can only detect the correctness of the text, the detection dimension is relatively single, and the detection accuracy is relatively low in terms of text correctness detection.
[0006] To achieve the above object, the present invention provides a method for detecting text in a publication based on a large model, and the method for detecting text in a publication based on a large model comprises the following steps: Access to original publication data; Annotating the original publication data by using a large model, and cleaning the annotated data to obtain a first data set; Annotating the original publication data by manual annotation to obtain a second data set; Constructing a training set based on the first data set and the second data set, and training the publication model by using the training set; receiving input publications to be tested; Using the publication large model to perform text correctness detection on the publication to be detected; Determining whether the text correctness of the publication to be tested meets a preset condition based on the text correctness test result; If the text correctness of the publication to be tested meets the preset conditions, AI text detection is performed on the publication to be tested to obtain a detection result.
[0007] In some embodiments, the model architecture corresponding to the publication model includes an input module, a check module, and a correction module, and the training of the publication model using the training set includes: Receive an input training set through the input module, and input the training set into the inspection module and the correction module in sequence; Constructing training tasks corresponding to the checking module and the correcting module, wherein the checking module corresponds to sentence-level grammatical error checking tasks and word-level grammatical error checking tasks, and the correcting module corresponds to error correction tasks; Set a corresponding loss function for the training task, and obtain an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, where the weights corresponding to each training task are the hyperparameters of the publication model; In the process that the checking module and the correcting module perform corresponding training tasks based on the training set, the weights corresponding to the various training tasks are adjusted based on the overall loss function until the training of the large publication model is completed.
[0008] In some embodiments, the step of using the publication macro model to perform text correctness detection on the publication to be detected includes: Encoding the text corresponding to the publication to be detected by the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; Determine, by the checking module, a sentence accuracy based on an embedded representation of the text corresponding to the publication to be checked, and judge whether there is a sentence-level grammatical error in the text corresponding to the publication to be checked based on the sentence accuracy, wherein the embedded representation is determined by the hidden state; The checking module is combined with the CRF model to perform sequence annotation on the text corresponding to the publication to be tested, and the error type label of each word in the text is identified. Based on the error type label, it is determined whether the text corresponding to the publication to be tested has word-level grammatical errors.
[0009] In some embodiments, the method further comprises: Determine, by the checking module, the error type corresponding to the sentence-level grammatical error and / or the word-level grammatical error, wherein the error type at least includes redundancy error, word usage error and missing word error; The checking module determines a starting position and an ending position corresponding to the error based on the error type.
[0010] In some embodiments, the method further comprises: If the text correctness of the publication to be checked does not meet the preset conditions, the error feature information is obtained by using the hidden state obtained by the input module and the starting position and the ending position of the error corresponding to the output of the checking module; generating target correction content according to the error characteristic information; The target correction content is used to correct errors in the text corresponding to the publication to be detected.
[0011] In some embodiments, the performing AI text detection on the publication to be detected includes: Determine the subject of the publication to be tested; Using artificial intelligence to obtain a number of reference sample texts corresponding to the subject; Calculating the similarity between the text corresponding to the publication to be detected and each reference sample text, and determining a similarity mean based on the similarity; If the similarity mean exceeds a preset similarity threshold, it is determined that the text corresponding to the publication to be detected is an AI text.
[0012] In some embodiments, the performing AI text detection on the publication to be detected further includes: Determining statistical features of the text corresponding to the publication to be detected based on preset text index items; Obtaining a first distance between the text feature and a preset AI text statistical feature, and a second distance between the text feature and a preset humanities text statistical feature; If the first distance is smaller than the second distance, it is determined that the text corresponding to the publication to be detected is AI text.
[0013] In addition, to achieve the above-mentioned purpose, the present invention also proposes a text detection device for publications based on a large model, and the text detection device for publications based on a large model comprises: The acquisition module is used to obtain original publication data; A processing module, used for annotating the original publication data through a large model and cleaning the annotated data to obtain a first data set; The processing module is used to annotate the original publication data by manual annotation to obtain a second data set; A training module, used for constructing a training set based on the first data set and the second data set, and training the publication model by using the training set; A receiving module, used for receiving input publications to be tested; A detection module, used for performing text correctness detection on the publication to be detected using the publication macro model; The detection module is used to determine whether the text correctness of the publication to be detected meets a preset condition based on the text correctness detection result; The detection module is used to perform AI text detection on the publication to be detected to obtain a detection result if the text correctness of the publication to be detected meets a preset condition.
[0014] In some embodiments, the model architecture corresponding to the publication model includes an input module, a check module and a correction module, wherein the training module is used to receive a training set input through the input module and input the training set into the check module and the correction module in sequence; Constructing training tasks corresponding to the checking module and the correcting module, wherein the checking module corresponds to sentence-level grammatical error checking tasks and word-level grammatical error checking tasks, and the correcting module corresponds to error correction tasks; Set a corresponding loss function for the training task, and obtain an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, where the weights corresponding to each training task are the hyperparameters of the publication model; In the process that the checking module and the correcting module perform corresponding training tasks based on the training set, the weights corresponding to the various training tasks are adjusted based on the overall loss function until the training of the large publication model is completed.
[0015] In some embodiments, the detection module is used to encode the text corresponding to the publication to be detected through the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; Determine, by the checking module, a sentence accuracy based on an embedded representation of the text corresponding to the publication to be checked, and judge whether there is a sentence-level grammatical error in the text corresponding to the publication to be checked based on the sentence accuracy, wherein the embedded representation is determined by the hidden state; The checking module is combined with the CRF model to perform sequence annotation on the text corresponding to the publication to be tested, and the error type label of each word in the text is identified. Based on the error type label, it is determined whether the text corresponding to the publication to be tested has word-level grammatical errors.
[0016] The present invention obtains original publication data; annotates the original publication data through a large model, and cleans the annotated data to obtain a first data set; annotates the original publication data through manual annotation to obtain a second data set; constructs a training set based on the first data set and the second data set, and trains the publication large model through the training set; receives input publications to be detected; performs text correctness detection on the publications to be detected using the publication large model; determines whether the text correctness of the publications to be detected meets preset conditions based on the text correctness detection results; if the text correctness of the publications to be detected meets the preset conditions, performs AI text detection on the publications to be detected to obtain a detection result. Through the above method, not only the accuracy of text detection can be improved, but also AI text detection can be performed, making the text detection more comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of the first embodiment of the method for text detection of publications based on a large model of the present invention; Figure 2 It is a structural block diagram of the first embodiment of the text detection device for publications based on large models of the present invention.
[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0020] The embodiment of the present invention provides a method for detecting text in publications based on a large model. Figure 1 , Figure 1 The figure is a flow chart of a first embodiment of a method for text detection of publications based on a large model according to the present invention.
[0021] In this embodiment, the text detection method of the publication based on the large model includes the following steps: Step S10: Acquire original publication data.
[0022] In this embodiment, the executor of this embodiment is a text detection device for publications based on a large model, wherein the text detection device for publications based on a large model has functions such as data processing, data communication and program running. The text detection device for publications based on a large model can be a computer terminal device or other network device, and of course it can also be other devices with similar functions, and this embodiment does not limit this.
[0023] It should be noted that the current large language model can only detect the correctness of the text, the detection dimension is relatively single, and the detection accuracy of the text correctness is relatively low.
[0024] In order to solve the above technical problems, in this embodiment, original publication data is obtained; the original publication data is annotated by a large model, and the annotated data is cleaned to obtain a first data set; the original publication data is annotated by manual annotation to obtain a second data set; a training set is constructed based on the first data set and the second data set, and the publication large model is trained by the training set; an input publication to be detected is received; the publication large model is used to perform text correctness detection on the publication to be detected; based on the text correctness detection result, it is determined whether the text correctness of the publication to be detected meets the preset conditions; if the text correctness of the publication to be detected meets the preset conditions, AI text detection is performed on the publication to be detected to obtain a detection result. Through the above method, not only the accuracy of text detection can be improved, but also AI text detection can be performed to make text detection more comprehensive. Specifically, it can be implemented as follows.
[0025] In a specific implementation, in this embodiment, it is necessary to obtain original publication data, which can be used as training data for subsequent publication model construction.
[0026] Step S20: annotating the original publication data using a large model, and cleaning the annotated data to obtain a first data set.
[0027] Step S30: annotating the original publication data by manual annotation to obtain a second data set.
[0028] It should be noted that in terms of data sets, it is planned to use manual annotation and machine synthesis to construct a publishing data set. In this embodiment, on the one hand, the task generalization ability of the large model is used to annotate the original publication data, and then the annotated data is cleaned. On the other hand, a batch of high-quality data is manually annotated for precise fine-tuning of the publishing large model.
[0029] In the specific implementation, you can choose a large model that has been pre-trained in the publishing field or task, such as BERT, GPT-3, and use these models to automatically annotate data. Data cleaning includes removing obvious errors in data annotation, such as identifying non-entities as entities, and removing noise in the data, such as irrelevant annotations, duplicate entries, etc.
[0030] Step S40: construct a training set based on the first data set and the second data set, and train the publication model using the training set.
[0031] In this embodiment, the publication model includes an input module, a check module and a correction module, and its training process is specifically as follows: receiving an input training set through the input module, and inputting the training set into the check module and the correction module in sequence; constructing training tasks corresponding to the check module and the correction module; setting a corresponding loss function for the training task, and obtaining an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, wherein the weights corresponding to each training task are hyperparameters of the publication model; in the process of the check module and the correction module executing the corresponding training task based on the training set, adjusting the weights corresponding to each training task based on the overall loss function until the training of the publication model is completed.
[0032] It should be noted that the checking module corresponds to the sentence-level grammatical error checking task and the word-level grammatical error checking task, the correction module corresponds to the error correction task, the loss function corresponding to the sentence-level grammatical error checking task is loss1, the loss function corresponding to the word-level grammatical error checking task is loss2, and the loss function corresponding to the error correction task is loss3. The corresponding weights are α, β and γ respectively. The overall loss function is L=αloss1+βloss2+γloss3. During the training process, the loss value corresponding to each loss function can be obtained. It should be understood that the lower the loss value of the loss function, the better the effect of the corresponding model. Therefore, the loss value of the loss function can be minimized by adjusting α, β and γ, thereby completing the training of the publication model. Among them, the loss function corresponding to the sentence-level grammatical error checking task is loss1, which can adopt the binary cross entropy loss function. The loss function corresponding to the word-level grammatical error checking task is loss2, which is calculated using the path search score of the CRF layer. The CRF model is a conditional random field model. The loss function corresponding to the error correction task is loss3, which can adopt the cross entropy loss or sequence loss function commonly used in sequence prediction or generation tasks. The sum of α, β and γ can be set to 2 or 3. It can be adjusted accordingly according to actual training needs, and is not limited to this in this embodiment.
[0033] Step S50: receiving input of publications to be tested.
[0034] Step S60: Using the publication macro model to perform text correctness detection on the publication to be detected.
[0035] In a specific implementation, after the training of the publication model is completed, the publication model can be used to perform text detection on the input publication to be detected. The text detection in this embodiment includes text correctness detection and AI text detection.
[0036] Among them, the specific process of text correctness detection is to encode the text corresponding to the publication to be detected through the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; determine the sentence accuracy based on the embedded representation of the text corresponding to the publication to be detected through the inspection module, and judge whether the text corresponding to the publication to be detected has sentence-level grammatical errors based on the sentence accuracy; sequence annotate the text corresponding to the publication to be detected through the inspection module combined with the CRF model, and identify the error type label of each word in the text, and judge whether the text corresponding to the publication to be detected has word-level grammatical errors based on the error type label.
[0037] It should be noted that text correctness detection is divided into sentence-level grammatical error detection and word-level grammatical error detection. The hidden state of the text corresponding to the publication to be detected obtained by the input module is H=(h0,...,h n ), from which the corresponding embedding expression can be obtained as c=tanh(Wh i +b), where W is the preset weight matrix, b is the preset bias term, i∈n, the sentence accuracy P=sigmoid(c), sigmoid is an activation function, and its output value is always in the (0, 1) interval. If the sentence accuracy exceeds the preset accuracy, it is considered that there is no sentence-level grammatical error. Conversely, if it is lower than the preset accuracy, it is considered that there is a sentence-level grammatical error.
[0038] For word-level grammatical errors, this embodiment integrates the CRF model based on the large publication model. The CRF model can perform sequence annotation and identify the error type label of each word in the text. The error type label can be defined as "BR": Begin-Error, "IR": Inside-Error and "O": Outside-Error. The CRF model used in this embodiment has learned these labeling rules. If all are "O", it is considered that there is no word-level error.
[0039] Furthermore, for the above-mentioned grammatical errors, the checking module in this embodiment can also be used to locate them. Specifically, the error type corresponding to the sentence-level grammatical error and / or the word-level grammatical error is determined by the checking module, and the starting position and the ending position corresponding to the error are determined by the checking module based on the error type, wherein the error type includes at least redundant errors, word usage errors, and missing character errors.
[0040] Specifically, for redundancy errors, if x i The error type label is marked as "BR" and (x i+1 ,...,x j) is marked as "IR", the starting position of the corresponding error is i-1, and the ending position is j+1. For missing word errors, if x i The error type label is marked as "BR", then the starting position of the corresponding error is i-1 and the ending position is i.
[0041] Step S70: judging whether the text correctness of the publication to be tested meets a preset condition based on the text correctness test result.
[0042] It should be noted that if there is a sentence-level grammatical error or a word-level error, it can be determined that the text correctness of the publication to be tested does not meet the preset conditions.
[0043] Furthermore, if the correctness of the text does not meet the preset conditions, it can be corrected in the present embodiment. Specifically, error feature information is obtained using the hidden state obtained by the input module and the starting position and the ending position corresponding to the error output by the inspection module; target correction content is generated based on the error feature information; and the target correction content is used to correct the errors in the text corresponding to the publication to be inspected.
[0044] It should be noted that the target correction content is T=MLP[r,E(i)], where r is the feature representation corresponding to the error feature information, E(i) is the position embedding of the i-th word to be generated, MLP is a multi-layer perceptron, and the error information obtained is the feature information before the error, the feature information after the error, and the feature information of the error itself, r= [err1,err2,err3], where err1, err2, err3 are the feature representations corresponding to the feature information before the error, the feature information after the error, and the feature information of the error itself, respectively.
[0045] Step S80: If the text correctness of the publication to be tested meets the preset conditions, AI text detection is performed on the publication to be tested to obtain a detection result.
[0046] It should be noted that in this embodiment, AI text detection can be performed on the publication to be detected in two different ways, so as to determine whether the text is generated by AI.
[0047] The first method is specifically to determine the subject corresponding to the publication to be detected; use artificial intelligence to obtain several reference sample texts corresponding to the subject; calculate the similarity between the text corresponding to the publication to be detected and each reference sample text, and determine the similarity mean based on the similarity; if the similarity mean exceeds a preset similarity threshold, it is determined that the text corresponding to the publication to be detected is an AI text.
[0048] It should be noted that artificial intelligence can use ChatGPT to generate several reference sample texts for the same topic. The similarity calculation can be to construct vectors of the text corresponding to the publication to be detected and the vectors corresponding to each reference sample text respectively, and the distance between the vectors is calculated as the similarity by Euclidean distance or cosine similarity. Since there are multiple reference sample texts, the similarity mean can be obtained by averaging the similarities. The preset similarity threshold can be set according to actual needs, and this is not limited in this embodiment.
[0049] The second method is specifically to determine the statistical features of the text corresponding to the publication to be detected based on preset text index items; obtain a first distance between the text features and the preset AI text statistical features, and a second distance between the text features and the preset humanities text statistical features; if the first distance is less than the second distance, it is determined that the text corresponding to the publication to be detected is AI text.
[0050] It should be noted that the statistical features of the text corresponding to the publication to be detected can be determined based on preset text indicators such as the proportion of non-repeated words, the average length of sentences, the total number of words in the text, and the average number of letters in the words, and there are differences in the above text indicators between the preset AI text statistical features and the preset humanities text statistical features. The smaller the distance, the greater the similarity. If the first distance is less than the second distance, it is determined that the text corresponding to the publication to be detected is AI text. The distance calculation between features can construct their corresponding feature vectors respectively, and then calculate them in the same way as above, which will not be repeated here.
[0051] In this embodiment, original publication data is obtained; the original publication data is annotated by a large model, and the annotated data is cleaned to obtain a first data set; the original publication data is annotated by manual annotation to obtain a second data set; a training set is constructed based on the first data set and the second data set, and the publication large model is trained by the training set; an input publication to be detected is received; the publication to be detected is subjected to text correctness detection using the publication large model; based on the text correctness detection result, it is determined whether the text correctness of the publication to be detected meets the preset conditions; if the text correctness of the publication to be detected meets the preset conditions, the publication to be detected is subjected to AI text detection to obtain a detection result. Through the above method, not only the accuracy of text detection can be improved, but also AI text detection can be performed, making the text detection more comprehensive.
[0052] Reference Figure 2 , Figure 2 It is a structural block diagram of the first embodiment of the text detection device for publications based on large models of the present invention.
[0053] like Figure 2 As shown, the text detection device for publications based on a large model proposed in an embodiment of the present invention includes: The acquisition module 10 is used to obtain original publication data; A processing module 20 is used to annotate the original publication data through a large model and clean the annotated data to obtain a first data set; The processing module 20 is used to annotate the original publication data by manual annotation to obtain a second data set; A training module 30, configured to construct a training set based on the first data set and the second data set, and train the publication model by using the training set; The receiving module 40 is used to receive input publications to be tested; A detection module 50, used for performing text correctness detection on the publication to be detected using the publication macro model; The detection module 50 is used to determine whether the text correctness of the publication to be detected meets a preset condition based on the text correctness detection result; The detection module 50 is used to perform AI text detection on the publication to be detected to obtain a detection result if the text correctness of the publication to be detected meets a preset condition.
[0054] In this embodiment, original publication data is obtained; the original publication data is annotated by a large model, and the annotated data is cleaned to obtain a first data set; the original publication data is annotated by manual annotation to obtain a second data set; a training set is constructed based on the first data set and the second data set, and the publication large model is trained by the training set; an input publication to be detected is received; the publication to be detected is subjected to text correctness detection using the publication large model; based on the text correctness detection result, it is determined whether the text correctness of the publication to be detected meets the preset conditions; if the text correctness of the publication to be detected meets the preset conditions, the publication to be detected is subjected to AI text detection to obtain a detection result. Through the above method, not only the accuracy of text detection can be improved, but also AI text detection can be performed, making the text detection more comprehensive.
[0055] In some embodiments, the model architecture corresponding to the publication model includes an input module, a check module and a correction module, and the training module 30 is used to receive the input training set through the input module, and input the training set into the check module and the correction module in sequence; Constructing training tasks corresponding to the checking module and the correcting module, wherein the checking module corresponds to sentence-level grammatical error checking tasks and word-level grammatical error checking tasks, and the correcting module corresponds to error correction tasks; Set a corresponding loss function for the training task, and obtain an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, where the weights corresponding to each training task are the hyperparameters of the publication model; In the process that the checking module and the correcting module perform corresponding training tasks based on the training set, the weights corresponding to the various training tasks are adjusted based on the overall loss function until the training of the large publication model is completed.
[0056] In some embodiments, the detection module 50 is used to encode the text corresponding to the publication to be detected through the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; Determine, by the checking module, a sentence accuracy based on an embedded representation of the text corresponding to the publication to be checked, and judge whether there is a sentence-level grammatical error in the text corresponding to the publication to be checked based on the sentence accuracy, wherein the embedded representation is determined by the hidden state; The checking module is combined with the CRF model to perform sequence annotation on the text corresponding to the publication to be tested, and the error type label of each word in the text is identified. Based on the error type label, it is determined whether the text corresponding to the publication to be tested has word-level grammatical errors.
[0057] In some embodiments, the detection module 50 is used to determine the error type corresponding to the sentence-level grammatical error and / or the word-level grammatical error through the inspection module, and the error type at least includes redundancy error, word usage error and missing word error; The checking module determines a starting position and an ending position corresponding to the error based on the error type.
[0058] In some embodiments, the detection module 50 is used to obtain error feature information by using the hidden state obtained by the input module and the starting position and the ending position of the error corresponding to the output of the inspection module if the text correctness corresponding to the publication to be detected does not meet the preset conditions; generating target correction content according to the error characteristic information; The target correction content is used to correct errors in the text corresponding to the publication to be detected.
[0059] In some embodiments, the detection module 50 is used to determine the subject corresponding to the publication to be detected; Using artificial intelligence to obtain a number of reference sample texts corresponding to the subject; Calculating the similarity between the text corresponding to the publication to be detected and each reference sample text, and determining a similarity mean based on the similarity; If the similarity mean exceeds a preset similarity threshold, it is determined that the text corresponding to the publication to be detected is an AI text.
[0060] In some embodiments, the detection module 50 is used to determine the statistical features of the text corresponding to the publication to be detected based on preset text index items; Obtaining a first distance between the text feature and a preset AI text statistical feature, and a second distance between the text feature and a preset humanities text statistical feature; If the first distance is smaller than the second distance, it is determined that the text corresponding to the publication to be detected is AI text.
[0061] An embodiment of the present application also provides a text detection device for publications based on a large model, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and the memory is used to store a text detection program for publications based on a large model; the processor is used to implement the above-mentioned text detection method for publications based on a large model when executing the program stored in the memory.
[0062] The communication bus mentioned in the above-mentioned large-scale model-based publication text detection device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0063] The communication interface is used for communication between the above-mentioned text detection device for publications based on large models and other devices.
[0064] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0065] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0066] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0067] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0068] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0069] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0070] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0071] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0072] In addition, for technical details that are not described in detail in this embodiment, please refer to the text detection method for publications based on a large model provided in any embodiment of the present invention, and will not be repeated here.
[0073] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0074] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0076] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0077] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above method.
Claims
1. A method for text detection of publications based on a large model, characterized in that: The text detection method of the publication based on the large model includes: Access to original publication data; Annotating the original publication data by using a large model, and cleaning the annotated data to obtain a first data set; Annotating the original publication data by manual annotation to obtain a second data set; Constructing a training set based on the first data set and the second data set, and training the publication model by using the training set; receiving input publications to be tested; Using the publication large model to perform text correctness detection on the publication to be detected; Determining whether the text correctness of the publication to be tested meets a preset condition based on the text correctness test result; If the text correctness of the publication to be tested meets the preset conditions, AI text detection is performed on the publication to be tested to obtain a detection result.
2. The method for detecting text in a publication based on a large model as claimed in claim 1, characterized in that: The model architecture corresponding to the publication large model includes an input module, a checking module and a correction module. The training of the publication large model by the training set includes: Receive an input training set through the input module, and input the training set into the inspection module and the correction module in sequence; Constructing training tasks corresponding to the checking module and the correcting module, wherein the checking module corresponds to sentence-level grammatical error checking tasks and word-level grammatical error checking tasks, and the correcting module corresponds to error correction tasks; Set a corresponding loss function for the training task, and obtain an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, where the weights corresponding to each training task are the hyperparameters of the publication model; In the process that the checking module and the correcting module perform corresponding training tasks based on the training set, the weights corresponding to the various training tasks are adjusted based on the overall loss function until the training of the large publication model is completed.
3. The method for detecting text in a publication based on a large model as claimed in claim 2, characterized in that: The step of using the publication large model to perform text correctness detection on the publication to be detected includes: Encoding the text corresponding to the publication to be detected by the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; Determine, by the checking module, a sentence accuracy based on an embedded representation of the text corresponding to the publication to be checked, and judge whether there is a sentence-level grammatical error in the text corresponding to the publication to be checked based on the sentence accuracy, wherein the embedded representation is determined by the hidden state; The checking module is combined with the CRF model to perform sequence annotation on the text corresponding to the publication to be tested, and the error type label of each word in the text is identified. Based on the error type label, it is determined whether the text corresponding to the publication to be tested has word-level grammatical errors.
4. The method for detecting text in a publication based on a large model as claimed in claim 3, characterized in that: The method further comprises: Determine, by the checking module, the error type corresponding to the sentence-level grammatical error and / or the word-level grammatical error, wherein the error type at least includes redundancy error, word usage error and missing word error; The checking module determines a starting position and an ending position corresponding to the error based on the error type.
5. The method for detecting text in a publication based on a large model as claimed in claim 4, characterized in that: The method further comprises: If the text correctness of the publication to be checked does not meet the preset conditions, the error feature information is obtained by using the hidden state obtained by the input module and the starting position and the ending position of the error corresponding to the output of the checking module; generating target correction content according to the error characteristic information; The target correction content is used to correct errors in the text corresponding to the publication to be detected.
6. The method for detecting text in a publication based on a large model as claimed in claim 1, characterized in that: The performing AI text detection on the publication to be detected includes: Determine the subject of the publication to be tested; Using artificial intelligence to obtain a number of reference sample texts corresponding to the subject; Calculating the similarity between the text corresponding to the publication to be detected and each reference sample text, and determining a similarity mean based on the similarity; If the similarity mean exceeds a preset similarity threshold, it is determined that the text corresponding to the publication to be detected is an AI text.
7. The method for detecting text in a publication based on a large model as claimed in claim 1, characterized in that: The performing AI text detection on the publication to be detected further includes: Determining statistical features of the text corresponding to the publication to be detected based on preset text index items; Obtaining a first distance between the text feature and a preset AI text statistical feature, and a second distance between the text feature and a preset humanities text statistical feature; If the first distance is smaller than the second distance, it is determined that the text corresponding to the publication to be detected is AI text.
8. A text detection device for publications based on a large model, characterized in that: The text detection device for publications based on the large model includes: The acquisition module is used to obtain original publication data; A processing module, used for annotating the original publication data through a large model and cleaning the annotated data to obtain a first data set; The processing module is used to annotate the original publication data by manual annotation to obtain a second data set; A training module, used for constructing a training set based on the first data set and the second data set, and training the publication model by using the training set; A receiving module, used for receiving input publications to be tested; A detection module, used for performing text correctness detection on the publication to be detected using the publication macro model; The detection module is used to determine whether the text correctness of the publication to be detected meets a preset condition based on the text correctness detection result; The detection module is used to perform AI text detection on the publication to be detected to obtain a detection result if the text correctness of the publication to be detected meets a preset condition.
9. The text detection device for publications based on a large model as claimed in claim 8, characterized in that: The model architecture corresponding to the publication model includes an input module, a check module and a correction module, wherein the training module is used to receive the input training set through the input module and input the training set into the check module and the correction module in sequence; Constructing training tasks corresponding to the checking module and the correcting module, wherein the checking module corresponds to sentence-level grammatical error checking tasks and word-level grammatical error checking tasks, and the correcting module corresponds to error correction tasks; Set a corresponding loss function for the training task, and obtain an overall loss function by integrating multiple training tasks and combining the weights corresponding to each training task, where the weights corresponding to each training task are the hyperparameters of the publication model; In the process that the checking module and the correcting module perform corresponding training tasks based on the training set, the weights corresponding to the various training tasks are adjusted based on the overall loss function until the training of the large publication model is completed.
10. The text detection device for publications based on a large model as claimed in claim 9, characterized in that: The detection module is used to encode the text corresponding to the publication to be detected through the input module to obtain the hidden state of the text corresponding to the publication to be detected in the publication model; Determine, by the checking module, a sentence accuracy based on an embedded representation of the text corresponding to the publication to be checked, and judge whether there is a sentence-level grammatical error in the text corresponding to the publication to be checked based on the sentence accuracy, wherein the embedded representation is determined by the hidden state; The checking module is combined with the CRF model to perform sequence annotation on the text corresponding to the publication to be tested, and the error type label of each word in the text is identified. Based on the error type label, it is determined whether the text corresponding to the publication to be tested has word-level grammatical errors.
Citation Information
Patent Citations
Text error correction and error correction model training method and device, electronic equipment and medium
CN117933231A
Text error correction method, device and equipment based on large model and storage medium
CN118520869A
Method for identifying and detecting artificial intelligence generated text
CN118643818A
Large model language disease error correction method and device based on task chain and storage medium
CN118747497A
Text error correction model training method and device and electronic equipment
CN119294387A