Text recognition method and device, electronic equipment and storage medium

By combining semantic segmentation and pre-trained models with multi-dimensional parameters, the patent text is split and weighted, solving the accuracy and reliability problems of AIGC recognition of patent text and achieving efficient text recognition results.

CN121765093APending Publication Date: 2026-03-31CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing AIGC recognition technologies for patent texts are not optimized for the specific characteristics of patent texts, resulting in insufficient recognition accuracy. Furthermore, they rely on large external models or complex structures, making it difficult to meet the real-time recognition needs of large-scale data and affecting reliability.

Method used

The input text is split into segments by semantic segmentation identifiers, feature vectors are extracted using a pre-trained embedding model, the recognition result is determined by combining a classification model and multi-dimensional parameters, and the final recognition result is obtained by weighted calculation, ensuring semantic integrity and accuracy.

Benefits of technology

It improves the accuracy and reliability of AIGC recognition of patent text, is suitable for complex text scenarios, supports segment-level and global recognition results, and makes up for the shortcomings of existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765093A_ABST
    Figure CN121765093A_ABST
Patent Text Reader

Abstract

The invention discloses a text recognition method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: splitting an input text into text segments according to a semantic segmentation identifier, and extracting feature vectors of the text segments through a pre-trained embedding model; a classification result of the feature vectors is determined through a classification model, and a first recognition result is determined in combination with the multi-dimensional parameters of the text segments; and performing weighted calculation on the first recognition result to obtain a second recognition result of the input text. Wherein the first recognition result represents the probability that the text segment is the first type of text, and the second recognition result represents the probability that the input text is the first type of text. And outputting the first recognition result and the second recognition result to complete text recognition of the input text. According to the technical scheme, the text segments are divided according to semantics, the semantic features are extracted through the pre-training embedding model, the segment-level result is determined in combination with the multi-dimensional parameters, and the global situation is calculated through weighting, so that the text recognition accuracy and reliability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a text recognition method and apparatus, electronic device and storage medium. Background Technology

[0002] Artificial Intelligence Generated Content (AIGC) identification in patent texts uses specific technical means and algorithm models to identify and verify the subject that generated the patent text, determining whether it was generated by AIGC. This effectively distinguishes between human-created and machine-generated content and can be applied to scenarios such as copyright protection, information authenticity verification, and content security.

[0003] Among related technologies, AIGC recognition of patent texts can be achieved through text statistical feature analysis methods, classification techniques based on traditional machine learning, fine-tuning techniques based on pre-trained language models, generation and detection techniques based on prompt engineering, or multimodal fusion.

[0004] However, the aforementioned AIGC recognition technologies for patent texts are not optimized for the specific characteristics of patent texts, resulting in insufficient accuracy in recognizing AIGC texts. Alternatively, they rely on large external models with complex structures, making them only applicable to structured documents. This leads to weak automated processing capabilities and an inability to meet the real-time recognition needs of large-scale data. Consequently, they struggle to balance adaptability to the characteristics of patent texts with poor processing capabilities, thus affecting the reliability of AIGC recognition technologies for patent texts. Summary of the Invention

[0005] In view of this, this application provides a text recognition method, apparatus, electronic device, and storage medium to solve the problem of low reliability in AIGC recognition of patented text.

[0006] Firstly, this application provides a text recognition method, including: The input text is split into text segments based on semantic segmentation identifiers; The feature vectors of the text segment are extracted using a pre-trained embedding model, and the feature vectors are used to represent semantic information. The classification result of the feature vector is determined by a classification model; A first recognition result is determined based on the classification result and the multidimensional parameters of the text segment; the first recognition result represents the probability that the text segment is a first type of text; A weighted calculation is performed on the first recognition result to obtain a second recognition result of the input text, wherein the second recognition result represents the probability that the input text is a first type of text; Output the first recognition result and the second recognition result to complete the text recognition of the input text.

[0007] The above method ensures semantic integrity by splitting text segments through semantic segmentation, extracts deep semantic features through a pre-trained model, improves segment-level recognition accuracy by combining multi-dimensional parameters, and obtains the global result through weighted calculation. This method preserves local details while taking into account the overall semantics, effectively improving the accuracy and comprehensiveness of text recognition and is suitable for complex text scenarios.

[0008] In some embodiments of this application, the step of splitting the input text into text segments based on semantic segmentation identifiers includes: performing a character-by-character counting operation on the input text to obtain a real-time count value; stopping the counting operation in response to the real-time count value being greater than a preset threshold, and querying a target identifier; the target identifier is the first semantic segmentation identifier in the input text located after the position corresponding to the counting operation, and the semantic segmentation identifier is at least one of a period and a newline character; splitting the input text using the starting point corresponding to the counting operation and the target identifier as boundaries to obtain the text segments.

[0009] The above method combines character-by-character counting with semantic segmentation markers to split text segments. This avoids semantic fragmentation caused by fixed-length splitting and ensures that the text segments fully carry semantic units through target markers. It adapts to text structures of different lengths and punctuation layouts, providing high-quality basic units for subsequent feature extraction and recognition, and improving processing robustness.

[0010] In some embodiments of this application, the step of extracting the feature vector of the text segment through a pre-trained embedding model includes: calling the embedding model, which is pre-trained based on a large-scale corpus; freezing the pre-training parameters of the embedding model to retain its reasoning ability; inputting the text segment into the embedding model so that the embedding model performs context encoding on the text segment based on its reasoning ability; and obtaining the feature values ​​generated by the context encoding to obtain the feature vector.

[0011] The above method utilizes the learning results of large-scale corpus of pre-trained embedding models, freezes parameters to retain their powerful semantic reasoning capabilities, captures deep semantic relationships in text segments through context encoding, better represents the essence of the text, avoids performance loss caused by parameter retraining, and improves the accuracy and extraction efficiency of feature vectors.

[0012] In some embodiments of this application, before determining the classification result of the feature vector through the classification model, the method further includes: constructing a training dataset, the training dataset including a second type of text and a first type of text generated by AI from the second type of text; splitting the training dataset into a training set, a test set, and a validation set; the data volume of the training set is greater than the data volume of the test set, and the data volume of the test set is greater than the data volume of the validation set; training an initial classification model using the training set based on the cross-entropy loss function and the adaptive moment estimation optimizer; validating the trained initial classification model based on the validation set to obtain the classification model; and validating the classification model based on the test set.

[0013] In the above method, the training dataset covers two types of text to ensure targeted training, the dataset is split proportionally to make training more thorough and validation more accurate, the cross-entropy loss function and adaptive optimizer improve the model's convergence speed and classification accuracy, and multi-stage validation ensures the model's generalization ability.

[0014] In some embodiments of this application, the step of validating the trained initial classification model based on the validation set includes: in response to the initial classification model completing one round of training, inputting the validation set into the trained initial classification model to obtain a recognition accuracy; if the recognition accuracy does not increase within a preset round threshold, stopping the training of the initial classification model to obtain the classification model; if the recognition accuracy increases within the preset round threshold, performing training of the initial classification model according to a maximum training round threshold to obtain the classification model.

[0015] In the above method, the model's recognition accuracy is monitored in real time by the validation set, and the number of training rounds is dynamically adjusted. This avoids underfitting caused by insufficient training and prevents overfitting caused by overtraining.

[0016] In some embodiments of this application, determining the first recognition result based on the classification result and the multidimensional parameters of the text segment includes: detecting the multidimensional parameters of the text segment, wherein the multidimensional parameters include at least two of the following: average sentence length, sentence length standard deviation, maximum sentence length, lexical diversity value, and number of probability words; analyzing the multidimensional parameters and the classification result to obtain a comprehensive analysis result; and determining the first recognition result of the text segment according to the comprehensive analysis result.

[0017] In the above method, multidimensional parameters capture differences from multiple dimensions such as text structure and lexical features, and combine them with classification results for analysis. This breaks through the limitations of single feature judgment, and can more accurately distinguish the inherent features of different types of text. This allows the first recognition result to take into account both semantic features and text attributes, thereby improving the accuracy of recognition.

[0018] In some embodiments of this application, the weighted calculation of the first recognition result includes: calculating the weight coefficient of the text segment; multiplying the weight coefficient of the text segment by the corresponding first recognition result to obtain the weighted probability value of the text segment; and performing a summation operation on the weighted probability values ​​of all text segments in the input text to obtain the second recognition result.

[0019] In the above method, different text segments are given differentiated influences by weighting coefficients to obtain global recognition results and recognition results for each segment, thereby improving accuracy while ensuring the comprehensiveness of text recognition.

[0020] Secondly, this application also provides a text recognition device, comprising: The preprocessing module is configured to split the input text into segments based on semantic segmentation identifiers; The feature extraction and classification module is configured to extract feature vectors of the text segment through a pre-trained embedding model, the feature vectors being used to represent semantic information; determine the classification result of the feature vectors through a classification model; and determine a first recognition result based on the classification result and the multidimensional parameters of the text segment; the first recognition result representing the probability that the text segment is a first type of text. The recognition module is configured to perform a weighted calculation on the first recognition result to obtain a second recognition result of the input text, wherein the second recognition result represents the probability that the input text is a first type of text; The result output module is configured to output the first recognition result and the second recognition result to complete the text recognition of the input text.

[0021] Thirdly, this application provides an electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect embodiment.

[0022] Fourthly, this application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in the first aspect embodiment.

[0023] As can be seen from the above technical solutions, the text recognition method, apparatus, electronic device, and storage medium disclosed in this application relate to the field of artificial intelligence technology. The method splits the input text into text segments based on semantic segmentation identifiers and extracts feature vectors from the text segments using a pre-trained embedding model. Then, a classification model is used to determine the classification result of the feature vectors, and a first recognition result is determined by combining the multi-dimensional parameters of the text segments. A weighted calculation is then performed on the first recognition result to obtain a second recognition result for the input text. The first recognition result represents the probability that a text segment is of the first type of text, and the second recognition result represents the probability that the input text is of the first type of text. The first and second recognition results are output to complete the text recognition of the input text. By applying the technical solution of this application, which splits text segments semantically, extracts semantic features using a pre-trained embedding model, and combines multi-dimensional parameters to determine segment-level results and perform a weighted global calculation, the accuracy and reliability of text recognition can be improved.

[0024] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating a text recognition method provided in an embodiment of this application is shown; Figure 2 A schematic diagram of the classifier network structure provided in an embodiment of this application is shown; Figure 3 This document illustrates a flowchart of the thought chain discrimination process provided in an embodiment of this application. Figure 4 This paper illustrates a flowchart of AIGC recognition provided in an embodiment of this application. Figure 5 This paper shows a schematic diagram of the structure of a text recognition device provided in an embodiment of this application; Figure 6 A schematic block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0028] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0029] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0030] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. In this disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression. In some embodiments, the terms “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “if…”, “if…”, etc., can be used interchangeably. In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”. The prefixes such as "first" and "second" in the embodiments of this disclosure are only for distinguishing different descriptive objects and do not constitute restrictions on the position, order, priority, number or content of the descriptive objects. For the description of the descriptive objects, please refer to the description in the claims or the context of the embodiments. The use of prefixes should not constitute unnecessary restrictions.

[0031] In the embodiments disclosed herein, "multiple" refers to two or more. In the embodiments disclosed herein, terms such as “import”, “input”, and “read in” can be used interchangeably.

[0032] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.

[0033] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal", "mobile station (MS)", "mobile terminal (MT)", "subscriber station", "mobile unit", "subscriber unit", "wireless unit", "remote unit", "mobile device", "wireless device", "wireless communication device", "remote device", "mobile subscriber station", "access terminal", "mobile terminal", "wireless terminal", "remote terminal", "handset", "useragent", "mobile client", and "client" can be used interchangeably.

[0034] Patent text AIGC recognition refers to the technology of identifying and verifying the subject that generates patent text through specific technical means and algorithm models, determining whether it was generated by artificial intelligence, and thus distinguishing between human-created and machine-generated content. Its core value lies in providing technical support for scenarios such as copyright protection, information authenticity verification, and content security.

[0035] In related technologies, AIGC recognition of patent text can be divided into the following categories: First, analysis methods based on text statistical features, which distinguish the text generation subject by extracting basic statistical features such as word frequency and sentence length distribution; second, classification techniques based on traditional machine learning, which rely on manual or automated feature engineering combined with classification models to achieve identification; third, techniques based on fine-tuning of pre-trained language models, which fine-tune general pre-trained models to adapt to identification tasks through patent text data; fourth, generation detection techniques based on prompt engineering, which guide the large model to output identification results with the help of targeted prompt words; and fifth, identification techniques based on multimodal fusion, which combine multimodal information such as text and attached figures to improve processing results.

[0036] For example, the performance of patent-related processing can be optimized through multimodal feature mapping of text and images and multi-label classification; or the efficiency and accuracy of text classification can be balanced by optimizing the model structure (such as convolutional kernels); or, the efficient recognition of structured documents can be achieved by relying on hybrid neural network models.

[0037] However, the aforementioned AIGC recognition of patent texts has not been specifically optimized for the unique semantic structure, terminology system, and format features of patent texts, resulting in insufficient accuracy in identifying AIGC-generated patent texts. Some solutions rely on large external models or have complex model structures, making it difficult to achieve end-to-end automated processing and failing to meet the real-time recognition requirements of large-scale patent texts. Some solutions focus on structured document processing and have limited ability to extract and recognize features from unstructured or semi-structured patent texts, thereby reducing the reliability of the recognition results.

[0038] To address the aforementioned issues, this application provides a text recognition method aimed at improving the reliability of identifying the source of patent text, such as... Figure 1 As shown, in some embodiments, the method may include steps S101-S106.

[0039] S101. Split the input text into text segments according to the semantic segmentation identifier.

[0040] Before recognizing the input text, it undergoes preprocessing to ensure the accuracy of subsequent procedures. The input text can be a complete patent document, which is then broken down into smaller segments for later processing. These segments are segmented using semantic segmentation identifiers to ensure that the resulting segments possess complete semantic meaning. For example, semantic segmentation identifiers can be periods or line breaks in the input text.

[0041] S102. Extract feature vectors of text segments using a pre-trained embedding model.

[0042] After splitting the input text into multiple segments, these segments are fed into a pre-trained embedding model, allowing the model to extract feature vectors from each segment. These feature vectors represent semantic information, specifically the semantic information of the text segment. For example, the embedding model can be a high-performance embedding model.

[0043] S103. Determine the classification result of the feature vector through the classification model.

[0044] After extracting features from the text segment to obtain the corresponding feature vectors, these feature vectors are input into a classification model to determine the corresponding classification result, i.e., a binary classification result. The classification result can represent whether the text segment is of type I or type II. For example, type I text may be AI-generated text, and type II text may be manually written patent text; or, type I text may be manually written patent text, and type II text may be AI-generated text.

[0045] In one implementation, the embedding model and the classification model are integrated into a single model.

[0046] In another implementation, the embedding model and the classification model are two separate models.

[0047] S104. Determine the first recognition result based on the classification result and the multidimensional parameters of the text segment.

[0048] After obtaining the classification result of the feature vector through the classification model, the first recognition result of the text segment can be determined based on the classification result and combined with the multidimensional parameters of the text segment. The first recognition result represents the probability that the text segment belongs to the first type of text, while the multidimensional parameters are the performance characteristics of the text segment in multiple dimensions, such as the average sentence length, standard deviation of sentence length, maximum sentence length, lexical diversity value, and the number of probable words. By comprehensively considering multidimensional parameters from different dimensions, misjudgments based on a single dimension can be avoided, making the recognition result more accurate and thus improving the overall recognition accuracy.

[0049] S105. Perform a weighted calculation on the first recognition result to obtain the second recognition result of the input text.

[0050] After determining the first recognition result for each text segment, a weighted calculation is performed on the first recognition results of all text segments to obtain the corresponding weighted probability value, which is used as the recognition result for the input text, i.e., the second recognition result. The second recognition result is the recognition result for the entire text, representing the probability that the input text is of the first type of text. In other words, the second recognition result represents the probability that the input text is of the first type of text.

[0051] S106. Output the first recognition result and the second recognition result to complete the text recognition of the input text.

[0052] After obtaining the first recognition result for each text segment and the second recognition result for the entire input text, the first and second recognition results are output to complete the text recognition of the current input text (patented text AIGC recognition). In this way, not only can a global judgment recognition result be obtained, but users can also trace back based on the corresponding recognition result of each text segment to obtain the specific recognition result of each text segment, thereby improving the accuracy and reliability of text recognition.

[0053] In this embodiment, based on semantic segmentation markers such as periods and line breaks, the complete patent text is split into semantically consistent text segments to avoid disrupting the technical logic due to segmentation. A pre-trained embedding model extracts deep semantic feature vectors from the text segments, which are then processed by a classification model to output binary classification results (AI-generated or manually written). The classification results are then corrected using multi-dimensional parameters of the text segments to determine the first recognition result (AI generation probability) for each segment. Finally, the first recognition results of all text segments are weighted to obtain the second recognition result (overall AI generation probability) for the entire text. By outputting the segmented and full-text results, the AIGC identification of the patent text is completed.

[0054] In this way, semantic perception segmentation avoids the semantic fragmentation problem caused by traditional fixed-length segmentation. It relies on pre-trained embedding models to obtain deep semantic features and combines classification results with a dual verification mechanism of multi-dimensional parameters. This effectively solves the shortcomings of single models in terms of insufficient adaptation to patent professional texts and easy misjudgment, and significantly improves the accuracy of AIGC identification. At the same time, it outputs the first identification result at the text segment level and the second identification result at the full text level, supports accurate tracing of paragraphs, makes up for the shortcoming of not being able to locate details, and enhances the reliability of the identification results.

[0055] In some embodiments, when the input text is segmented into text segments based on semantic segmentation identifiers, a character-by-character counting operation is performed on the input text to obtain a real-time count value. In response to the real-time count value exceeding a preset threshold, the counting operation is stopped, and a target identifier is queried. The target identifier is the first semantic segmentation identifier in the input text following the position corresponding to the counting operation, and the semantic segmentation identifier is at least one of a period or a newline character. The input text is then segmented again using the starting point corresponding to the counting operation and the target identifier as boundaries to obtain text segments.

[0056] In other words, the input text is counted character by character according to the order of the article. If the current count reaches a preset threshold number of characters, the counting operation stops, and the next period or newline character is used as a split point. The starting point of the current counting operation and this split point are then split into a single text segment. After each counting operation is completed, the real-time count value is cleared, and the counting and splitting operation is restarted from the split point until all the input text has been split.

[0057] For example, a preset threshold of 800 characters can be used. When the length of a single counting operation exceeds 800 characters, the next period or newline character is used as a segmentation point to split this segment of text. The count is then reset to zero and the text length is recalculated until all input text has been broken down into small segments of similar length. This approach effectively prevents the influence of varying input text lengths on the subsequent model's decision results. Furthermore, more segmentation allows users to finer-grained understanding of the recognition details of each specific text segment within their input text.

[0058] In some embodiments, when extracting feature vectors from text segments using a pre-trained embedding model, the embedding model is invoked; for example, the embedding model can use Qwen3-embedding-8b as a text feature extractor. This embedding model is pre-trained on a large-scale corpus, possessing strong context awareness and semantic understanding capabilities. The pre-training parameters of the embedding model are then frozen to preserve its reasoning ability. The text segment is then input into the embedding model, allowing it to perform context encoding based on its reasoning ability. The feature values ​​generated by the context encoding are then obtained, resulting in a feature vector.

[0059] For example, using Qwen3-embedding-8b as a text feature extractor, this model is pre-trained on a large-scale corpus, possessing strong context awareness and semantic understanding capabilities. It has 8 billion parameters and ultimately transforms the input text into a 4096-dimensional feature vector. Throughout the training process, the parameters of the pre-trained model are frozen and used only for inference. Each segment of the split text is sequentially input into the embedding model's input port, where the semantic processing module performs context encoding. The output port then retrieves a 4096-dimensional numerical vector, which represents the semantic information of the corresponding text segment.

[0060] In this embodiment, Qwen3-embedding-8b, pre-trained on a large-scale corpus, is used as a feature extractor. Leveraging its powerful context awareness and semantic understanding capabilities, it can accurately capture specific semantic information in patent texts, such as the association of technical terms and the hierarchy of technical logic, avoiding the shortcomings of traditional feature extraction methods in representing complex semantics in patents. Simultaneously, by freezing the pre-trained parameters and retaining only the inference function, it saves the computational and time costs of retraining a large model, avoids the risk of overfitting, and can quickly complete the encoding processing of batches of patent text segments, adapting to large-scale recognition needs. The final output 4096-dimensional feature vector can also carry fine-grained semantic details, effectively distinguishing the redundancy of AI-generated text from the technical precision of manually written text.

[0061] In some embodiments, before determining the classification result of the feature vectors using a classification model, a training dataset is constructed. This training dataset includes a second type of text and a first type of text generated by AI from the second type of text. For example, approximately 90,000 manually written patent texts are collected from a patent database, and a corresponding number of AIGC texts are generated using an AI model, forming a balanced dataset.

[0062] The training dataset is then split into training, test, and validation sets. The training set contains more data than the test set, and the test set contains more data than the validation set; for example, the ratio of training, test, and validation sets is 7:2:1. An initial classification model is trained using the training set, based on the cross-entropy loss function and the adaptive moment estimation optimizer. For example, using the split training set, the model is trained using the cross-entropy loss function and the Adam optimizer, with a learning rate of 1*10^-4, a batch size of 16, and 10 training epochs.

[0063] After training an initial classification model using the training set, the trained initial classification model is validated using the validation set to obtain a classification model. Furthermore, the classification model is validated using the test set to determine its performance.

[0064] For the validation of the initial classification model, in some embodiments, in response to the initial classification model completing one round of training, a validation set is input into the trained initial classification model to obtain the recognition accuracy. That is, after each round of training, the trained model is validated using the validation set to obtain the corresponding recognition accuracy. If the recognition accuracy does not increase within a preset round threshold, the training of the initial classification model is stopped to obtain the classification model, which satisfies the early stopping condition and terminates the training of the initial classification model early. If the recognition accuracy increases within the preset round threshold, i.e., the early stopping condition is not met, the training of the initial classification model is executed according to the maximum training round threshold until the maximum training round is obtained to obtain the classification model.

[0065] For example, during network training, approximately 90,000 manually written patent texts were collected from a patent database, and an AI model was used to generate a corresponding number of AIGC texts, forming a balanced dataset. The dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Training was performed using the cross-entropy loss function and the Adam optimizer, with a learning rate of 1*10^-4, a batch size of 16, and 10 training epochs. During training, the model accuracy was evaluated on the validation set after each iteration; if the accuracy did not improve for three consecutive epochs, training was terminated early.

[0066] In some embodiments, the classification model is integrated into the classifier network, employing a fully connected neural network (FCNN) structure. Its input is the 4096-dimensional text feature vector extracted in the previous step, and its output is a binary classification result. The structure of the fully connected neural network includes an input layer for receiving the 4096-dimensional text feature vector; a hidden layer with 256 nodes, using a rectified linear unit (ReLU) activation function; and an output layer with two nodes, outputting a two-dimensional softmax (activation function) vector with values ​​ranging from (1,0) to (0,1), representing the probability that the text was generated by AIGC. During training, the parameters adjusted are the parameters of this fully connected classification model.

[0067] For example, such as Figure 2 As shown, the text segment is input into the embedding model (without training, only inference) to obtain a binary classification result; the binary classification result is input into the fully connected network to update the parameters of the classification model and output the corresponding result, which is the first recognition result corresponding to the text segment.

[0068] In this way, by using a pre-trained embedding model, the network can be deployed with high versatility and ease of use. Simply load the parameter file of the trained fully connected model and connect it to the pre-prepared open-source embedding model to form a complete classification model. In some embodiments, when determining the first recognition result based on the classification result and the multidimensional parameters of the text segment, the multidimensional parameters of the text segment are detected. The multidimensional parameters include at least two of the following: average sentence length, sentence length standard deviation, maximum sentence length, lexical diversity value, and number of probability words, so as to realize multidimensional consideration of the inherent features of the text segment.

[0069] Regarding average sentence length, when humans write text, sentence length naturally fluctuates according to semantic needs (e.g., short sentences for narration, long sentences for argumentation), and the average length is more in line with the expression logic; AIGC is affected by the model generation rules, and the average length often shows convergence (e.g., excessive pursuit of fluency leads to more long sentences, or avoidance of complex structures leads to a concentration of short sentences), deviating from the average range of natural human expression.

[0070] Regarding the standard deviation of sentence length, the sentence length fluctuates more when humans write text (high standard deviation), reflecting the flexibility of thinking (such as the alternation of long and short sentences to enhance the sense of rhythm); the sentences generated by AIGC are more uniform in length (low standard deviation), because the model tends to generate according to a fixed pattern, making it difficult to simulate the random but reasonable length changes in writing text.

[0071] Regarding maximum sentence length, when writing text, extremely long sentences are accompanied by a clear semantic hierarchy (such as complex modifications but logical coherence) and occur infrequently. AIGC avoids sentence segmentation errors or information omissions, which may generate redundant extremely long sentences (containing repetitive modifications or loosely logical components), or the maximum length may be abnormally short due to avoiding complex structures, which is significantly different from the human use of extremely long sentences.

[0072] Regarding lexical diversity, when writing text, synonyms and near-synonyms are flexibly selected according to the topic (such as alternating between "enhance," "strengthen," and "improve"), resulting in high lexical diversity. AIGC, influenced by the preference for high-frequency words in the training data, tends to repeatedly use a limited vocabulary (especially in long texts), resulting in low diversity values ​​and a tendency to exhibit lexical poverty.

[0073] Regarding the number of probability words, human use of probability words (such as possible, perhaps) is strongly correlated with contextual uncertainty (such as moderate use in speculative content); AIGC, in order to avoid the risk of errors in absolute statements, often overuses or mechanically uses probability words (such as still appearing frequently in certain content), forming a characteristic of safe expression, which is significantly different from the natural usage pattern of humans.

[0074] In some implementations, the average sentence length is calculated by dividing the text segment into multiple independent sentences at periods, counting the number of characters in each sentence and summing them, and then dividing the sum by the total number of sentences to obtain the average sentence length.

[0075] In some implementations, the standard deviation of sentence length is calculated by taking the number of words in each sentence and then taking the square root of the sum of the squares of the differences between the number of words in each sentence and the average sentence length, divided by the total number of sentences.

[0076] In some implementations, the maximum sentence length is determined by selecting the sentence with the most characters from all sentences; the number of characters in the sentence with the most characters is the maximum sentence length.

[0077] In some implementations, the lexical diversity value is calculated by counting the total number of unique words in the text segment and then dividing that number by the total number of words in the text segment to obtain the lexical diversity value.

[0078] In some implementations, the number of occurrences of probability words is counted by pre-setting a vocabulary list containing high-frequency probability words of AIGC-generated text, traversing each word in the text segment, and counting the number of words appearing in the vocabulary list as the number of occurrences of probability words.

[0079] Further analysis of the multidimensional parameters and classification results yields a comprehensive analysis result, which is then used to determine the first recognition result for the text segment. In this way, by utilizing the aforementioned multidimensional parameters across different dimensions, the accuracy of text recognition can be improved.

[0080] For example, such as Figure 3 As shown, the comprehensive analysis results are determined through a thought chain discrimination mechanism. A comprehensive judgment is made on whether an article is AI-generated from multiple dimensions, including the average sentence length, standard deviation of sentence length, maximum sentence length, lexical diversity value, number of probable words, and other multidimensional parameters, as well as the classification results output by the classification model. The comprehensive classification results and multidimensional parameters are used by a large model to complete the final judgment of the text, outputting a comprehensive result including the probability of it being AIGC-generated, along with corresponding causal analysis.

[0081] In some embodiments, when adjusting the probability of AIGC generation by combining multidimensional parameters and classification results, the initial probability (classification result) output by the classification model is dynamically corrected by quantifying the matching degree between each parameter and the AIGC feature.

[0082] For example, preset feature ranges for human text and AIGC text are provided for each multidimensional parameter (derived from statistical analysis of a large amount of labeled data). For instance, the average sentence length of human text is typically set to 15-35 characters, while AIGC text is mostly concentrated above 35 characters (overly fluent) or below 10 characters (avoiding complex structures); the standard deviation of sentence length is set to 8-15 for human text (large fluctuations) and 3-8 for AIGC text (small fluctuations); the lexical diversity value is set to 0.3-0.6 for human text and 0.1-0.3 for AIGC text, etc.

[0083] Calculate the feature matching degree for each parameter: if the parameter falls within the AIGC interval, assign a positive weight (e.g., 0.1-0.3, with higher weights closer to the center of the interval); if it falls within the human interval, assign a negative weight (e.g., -0.1 to -0.3); if it falls outside the interval, assign a weight of 0. For example, if a text segment has 12 probability words (the superhuman average is 3-5, falling within the AIGC high-frequency interval), assign it a weight of +0.25; if its lexical diversity value is 0.2 (AIGC interval), assign it a weight of +0.2.

[0084] Based on the initial probability output by the classification model (e.g., 60%), the weighted values ​​of each parameter are added. If the total weighted value of the multi-dimensional parameters is positive (e.g., +0.4), the initial probability is increased (e.g., 60% + 40% × 0.4 = 76%); if the total weighted value is negative (e.g., -0.3), the initial probability is decreased (e.g., 60% - 40% × 0.3 = 48%). Here, 40% represents the maximum weight percentage for parameter adjustment, ensuring that the basic judgment of the classification model still plays a dominant role and avoiding excessive influence of a single parameter on the result.

[0085] Then, a secondary calibration is performed through the thinking chain discrimination module. If multiple parameters show consistent AIGC features (such as excessively long average sentence length, high frequency of probability words, and low vocabulary diversity), an additional 10%-20% collaborative weight is added (to enhance credibility due to feature consistency). If parameter features conflict (such as average sentence length conforming to human characteristics, but high frequency of probability words), the weight of a single parameter is reduced (e.g., from 0.2 to 0.1), and the adjusted AIGC generation probability is finally output.

[0086] It should be noted that the data and specific implementations in the above examples are merely illustrative examples of one scenario and are not intended to limit the methods described in this application.

[0087] In some embodiments, when performing weighted calculation on the first recognition result, the weight coefficient of the text segment is calculated, and then the weight coefficient of the text segment is multiplied by the corresponding first recognition result to obtain the weighted probability value of the text segment. Then, the weighted probability values ​​of all text segments in the input text are summed to obtain the second recognition result.

[0088] In other words, after segmenting the text for recognition, the recognition results of each segment are aggregated and combined to form the final output. Simultaneously, the recognition results of each text segment (mainly the probability scores generated by AIGC) are weighted and summed to obtain a complete overall score evaluation of the entire input article, while still retaining the output results of each individual segment. This allows users to see the overall AIGC score and evaluation results of the entire article (input text), as well as to examine the scores and evaluation results of each individual segment in detail. In some embodiments, the weight coefficient of each text segment is calculated by dividing the number of words in a single text segment by the total number of words in the input text to obtain the weight coefficient of the current text segment, and the sum of the weight coefficients of all text segments is 1.

[0089] In some embodiments, when outputting the first and second identification results, each text segment is associated with a paragraph number, a paragraph content summary, the first identification result, and a reason for judgment to obtain detailed identification information. The reason for judgment includes the initial probability output by the classification model and explanations of anomalous features in the multidimensional parameters (such as excessively low lexical diversity values). The detailed identification information of all text segments is then arranged in paragraph number order to form a segmented identification result list. The second identification result is integrated with the segmented identification result list to generate a structured report containing the overall identification result and segmented identification details. This structured report is then output.

[0090] In one implementation, the structured report can be directly exported as a text file; or displayed in a visualization interface, where the visualization interface should highlight the text segments in the first recognition result whose probability is higher than the target probability. For example, the target probability could be 80%.

[0091] The text recognition method described in the above embodiments, such as Figure 4 As shown, after the text input is based on the patent document, it is split into multiple smaller text segments. These text segments are then sequentially fed into an embedding-based model for feature extraction and a classification model based on the embedding model for classification and recognition. Finally, the recognition results of each segment and the entire text are returned as the output.

[0092] Based on the above text recognition methods, such as Figure 5 As shown, this application also provides a text recognition device 500. The text recognition device 500 includes a preprocessing module 501, a feature extraction and classification module 502, a recognition module 503, and a result output module 504, wherein: Preprocessing module 501 is configured to split the input text into text segments based on semantic segmentation identifiers; The feature extraction and classification module 502 is configured to extract feature vectors of the text segment through a pre-trained embedding model, the feature vectors being used to represent semantic information; determine the classification result of the feature vectors through a classification model; determine a first recognition result based on the classification result and the multidimensional parameters of the text segment; the first recognition result represents the probability that the text segment is a first type of text; The recognition module 503 is configured to perform a weighted calculation on the first recognition result to obtain a second recognition result of the input text, wherein the second recognition result represents the probability that the input text is a first type of text; The result output module 504 is configured to output the first recognition result and the second recognition result to complete the text recognition of the input text.

[0093] In some embodiments, the preprocessing module 501 performs a process of splitting the input text into text segments based on semantic segmentation identifiers. This is configured to perform a character-by-character counting operation on the input text to obtain a real-time count value. In response to the real-time count value exceeding a preset threshold, the counting operation is stopped, and a target identifier is queried. The target identifier is the first semantic segmentation identifier in the input text located after the position corresponding to the counting operation, and the semantic segmentation identifier is at least one of a period or a newline character. The input text is then split into text segments using the starting point corresponding to the counting operation and the target identifier as boundaries.

[0094] In some embodiments, the feature extraction and classification module 502 performs feature vector extraction of the text segment using a pre-trained embedding model, configured to invoke the embedding model, which is pre-trained based on a large-scale corpus; freeze the pre-training parameters of the embedding model to preserve its reasoning ability; input the text segment into the embedding model so that the embedding model performs context encoding on the text segment based on its reasoning ability; and obtain the feature values ​​generated by the context encoding to obtain the feature vector.

[0095] In some embodiments, before the feature extraction and classification module 502 determines the classification result of the feature vector through a classification model, it is further configured to construct a training dataset, the training dataset including a second type of text and a first type of text generated by AI from the second type of text; split the training dataset into a training set, a test set, and a validation set; the data size of the training set is greater than that of the test set, and the data size of the test set is greater than that of the validation set; an initial classification model is trained using the training set based on the cross-entropy loss function and the adaptive moment estimation optimizer; the trained initial classification model is validated based on the validation set to obtain the classification model; and the classification model is validated based on the test set.

[0096] In some embodiments, the feature extraction and classification module 502 performs validation on the trained initial classification model based on the validation set. It is configured to, in response to the initial classification model completing one round of training, input the validation set into the trained initial classification model to obtain a recognition accuracy. If the recognition accuracy does not increase within a preset round threshold, the training of the initial classification model is stopped to obtain the classification model. If the recognition accuracy increases within the preset round threshold, the training of the initial classification model is performed according to the maximum training round threshold to obtain the classification model.

[0097] In some embodiments, the feature extraction and classification module 502 performs a first recognition result determination based on the classification result and the multidimensional parameters of the text segment. The multidimensional parameters are configured to detect the multidimensional parameters of the text segment, which include at least two of the following: average sentence length, sentence length standard deviation, maximum sentence length, lexical diversity value, and number of probability words; analyze the multidimensional parameters and the classification result to obtain a comprehensive analysis result; and determine the first recognition result of the text segment according to the comprehensive analysis result.

[0098] In some embodiments, the recognition module 503 performs a weighted calculation on the first recognition result, configured to calculate the weight coefficient of the text segment; multiply the weight coefficient of the text segment by the corresponding first recognition result to obtain the weighted probability value of the text segment; and perform a summation operation on the weighted probability values ​​of all text segments in the input text to obtain the second recognition result.

[0099] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0100] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0101] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0102] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 602 or loaded from storage unit 608 into RAM (Random Access Memory) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.

[0103] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0104] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as text recognition methods. For example, in some embodiments, the text recognition method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the aforementioned text recognition method by any other suitable means (e.g., by means of firmware).

[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0107] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0109] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0110] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0111] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0112] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0113] As can be seen from the above technical solutions, the text recognition method, apparatus, electronic device, and storage medium provided in this application can improve the accuracy and reliability of AIGC identification of patent texts: By using a classifier model specifically trained for patent texts, compared to the general large-scale model's identification method using Prompt, it can more accurately capture the linguistic features and generation patterns of patent texts, thereby significantly improving the recognition accuracy and stability of AIGC-generated texts. It can also achieve automation and batch processing capabilities. Based on a deep learning model, it possesses highly automated characteristics, enabling rapid and efficient batch processing of large amounts of patent texts, meeting the practical needs of large-scale text identification and reducing manual review costs.

[0114] This application also incorporates a high-performance embedding model to extract semantic features: It employs an open-source, high-performance pre-trained language model as a feature extractor, effectively capturing deep semantic information and contextual relationships within the text, providing high-quality input features for the classifier, and enhancing the model's discriminative ability. Based on a comprehensive analysis of multi-angle, multi-level thought chains, it effectively improves the versatility and interpretability of AIGC analysis. Furthermore, compared to rule-based or simple statistical feature-based methods, this application utilizes deep learning methods to achieve high-precision judgment of the patent text generation method, overcoming current technical difficulties in patent text recognition.

[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A text recognition method, characterized in that, include: The input text is split into text segments based on semantic segmentation identifiers; The feature vectors of the text segment are extracted using a pre-trained embedding model, and the feature vectors are used to represent semantic information. The classification result of the feature vector is determined by a classification model; A first recognition result is determined based on the classification result and the multidimensional parameters of the text segment; the first recognition result represents the probability that the text segment is a first type of text; A weighted calculation is performed on the first recognition result to obtain a second recognition result of the input text, wherein the second recognition result represents the probability that the input text is a first type of text; Output the first recognition result and the second recognition result to complete the text recognition of the input text.

2. The method according to claim 1, characterized in that, The step of splitting the input text into text segments based on semantic segmentation identifiers includes: Perform a character-by-character counting operation on the input text to obtain a real-time count value; In response to the real-time count value being greater than a preset threshold, the counting operation is stopped, and the target identifier is queried; the target identifier is the first semantic segmentation identifier in the input text located after the position corresponding to the counting operation, and the semantic segmentation identifier is at least one of a period and a newline character; Using the starting point corresponding to the counting operation and the target identifier as boundaries, the input text is split to obtain the text segment.

3. The method according to claim 1 or 2, characterized in that, The step of extracting the feature vector of the text segment using a pre-trained embedding model includes: The embedding model is invoked, and the embedding model is pre-trained based on a large-scale corpus. Freeze the pre-training parameters of the embedding model to preserve its reasoning ability; The text segment is input into the embedding model, so that the embedding model performs context encoding on the text segment based on the reasoning ability; The feature values ​​generated by the context encoding are obtained to obtain the feature vector.

4. The method according to claim 1, characterized in that, Before determining the classification result of the feature vector through the classification model, the method further includes: Construct a training dataset, which includes a second type of text and a first type of text generated by performing AI on the second type of text; The training dataset is split into a training set, a test set, and a validation set; the training set has a larger data volume than the test set, and the test set has a larger data volume than the validation set. An initial classification model is trained using the training set based on the cross-entropy loss function and the adaptive moment estimation optimizer. The initial classification model after training is validated based on the validation set to obtain the classification model; The classification model is validated based on the test set.

5. The method according to claim 4, characterized in that, The validation of the trained initial classification model based on the validation set includes: In response to the initial classification model completing one round of training, the validation set is input into the trained initial classification model to obtain the recognition accuracy. If the recognition accuracy does not increase within a preset round threshold, then the training of the initial classification model is stopped to obtain the classification model. If the recognition accuracy increases within the preset training round threshold, the initial classification model is trained according to the maximum training round threshold to obtain the classification model.

6. The method according to claim 1, characterized in that, The determination of the first recognition result based on the classification result and the multidimensional parameters of the text segment includes: The multidimensional parameters of the text segment are detected, including at least two of the following: average sentence length, standard deviation of sentence length, maximum sentence length, lexical diversity value, and number of probabilistic words. By analyzing the multidimensional parameters and the classification results, a comprehensive analysis result is obtained; The first recognition result of the text segment is determined based on the comprehensive analysis results.

7. The method according to claim 1, characterized in that, The weighted calculation of the first identification result includes: Calculate the weight coefficient of the text segment; Multiply the weight coefficient of the text segment by the corresponding first recognition result to obtain the weighted probability value of the text segment; The weighted probability values ​​of all text segments in the input text are summed to obtain the second recognition result.

8. A text recognition device, characterized in that, include: The preprocessing module is configured to split the input text into segments based on semantic segmentation identifiers; The feature extraction and classification module is configured to extract feature vectors of the text segment through a pre-trained embedding model, the feature vectors being used to represent semantic information; determine the classification result of the feature vectors through a classification model; and determine a first recognition result based on the classification result and the multidimensional parameters of the text segment; the first recognition result representing the probability that the text segment is a first type of text. The recognition module is configured to perform a weighted calculation on the first recognition result to obtain a second recognition result of the input text, wherein the second recognition result represents the probability that the input text is a first type of text; The result output module is configured to output the first recognition result and the second recognition result to complete the text recognition of the input text.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.