Text processing method and device, equipment and computer readable storage medium

By automatically generating chapter catalogs and text content and organizing them, the problem of timeliness and inefficiency of human civilization in the prior art is solved, and efficient and automated text processing is achieved.

CN119830869APending Publication Date: 2025-04-15MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411793154.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When writing human civilization, the existing technology has problems such as labor-consuming, strong subjective, low degree of automation, resulting in low timeliness and low efficiency.

Method used

By generating chapter catalogs based on the semantic information of each sentence in the first text, the chapter catalogs are generated, and the text content corresponding to each item is automatically generated, combining chapter catalogs and text content, the second text is generated, and the arrangement format is determined, and the second text is finally arranged to obtain the third text.

Benefits of technology

It realizes automation of text processing, improves timeliness and efficiency, avoids subjectivity and knowledge limitations, and improves the comprehensiveness and accuracy of the third text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830869A_ABST
    Figure CN119830869A_ABST
Patent Text Reader

Abstract

The invention provides a text processing method and device, computer equipment and a computer readable storage medium. The method comprises the steps that based on semantic information of each statement in a first text, a chapter and section directory of the first text is generated, and the chapter and section directory comprises a plurality of entries; generating text content corresponding to each entry based on the first text to obtain a plurality of text contents; generating a second text based on the chapter directory, the plurality of text contents and the corresponding relationship between the plurality of entries and the plurality of text contents; determining an arrangement format of each entry to obtain a text arrangement format; and arranging the second text based on the text arrangement format to obtain a third text. By means of the method and device, the automation degree, timeliness and efficiency of text processing can be improved, and the accuracy of the third text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a text processing method, device, equipment, and computer-readable storage medium. Background Art

[0002] Human civilization refers to the sum of material and spiritual wealth created by human society in the course of historical development. It includes science and technology, culture and art, social organization, economic system and other aspects. The record of human civilization refers to the act of recording and preserving human activities, thoughts, achievements and experiences through various means and methods in the course of historical development. The purpose of recording is to preserve information and pass it on to future generations across time and space. Writing can make historical records more accurate and systematic, and can be passed on for a long time.

[0003] In related technologies, human civilization is mainly written manually, which not only consumes manpower costs, but also the writing process is highly subjective and has a low degree of automation, so the timeliness and efficiency of the writing cannot be guaranteed. Summary of the invention

[0004] Embodiments of the present application provide a text processing method, apparatus, device, and computer-readable storage medium, which can improve the timeliness and efficiency of text processing.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a text processing method, the method comprising:

[0007] Based on the semantic information of each sentence in the first text, generating a chapter list of the first text, the chapter list including a plurality of entries;

[0008] Generate text content corresponding to each of the entries based on the first text to obtain multiple text contents;

[0009] Generate a second text based on the catalog, the multiple text contents, and the correspondence between the multiple entries and the multiple text contents;

[0010] Determine the formatting of each entry to obtain a text formatting;

[0011] The second text is formatted based on the text formatting to obtain a third text.

[0012] The present application provides a text processing device, the device comprising:

[0013] A first generating module, configured to generate a chapter list of the first text based on semantic information of each sentence in the first text, wherein the chapter list includes a plurality of entries;

[0014] A second generating module, configured to generate text content corresponding to each of the items based on the first text, to obtain a plurality of text contents;

[0015] A third generating module, configured to generate a second text based on the catalog, the plurality of text contents, and the correspondence between the plurality of entries and the plurality of text contents;

[0016] A first determination module is used to determine the layout format of each of the entries to obtain a text layout format;

[0017] The layout module is used to layout the second text based on the text layout format to obtain a third text.

[0018] An embodiment of the present application provides a computer device, including:

[0019] A memory for storing computer executable instructions;

[0020] The processor is used to implement the text processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute the text processing method provided in the embodiment of the present application.

[0022] An embodiment of the present application provides a computer program product, including computer executable instructions, which, when executed by a processor, implement the text processing method provided in the embodiment of the present application.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] In an embodiment of the present application, a table of contents of the first text is generated based on the semantic information of each sentence in the first text, and the table of contents includes multiple entries, that is, the table of contents can be automatically generated based on the semantic information, so that the value of the semantic information can be fully explored; then, the text content corresponding to each entry is also generated based on the first text, that is, the text content corresponding to each entry is automatically generated; then, based on the table of contents, the text content, and the correspondence between the entry and the text content, the second text is generated; in addition, the layout format of each entry is determined, so as to obtain the text layout format of the second text, and the second text is arranged to obtain the third text. That is, the third text with a table of contents and a layout format is automatically constructed. In an embodiment of the present application, the table of contents and the text content corresponding to each entry in the table of contents are first generated, and the text layout format is arranged based on the text layout format, and finally the third text is obtained, following the idea from the whole to the part and then to the whole. On the one hand, the table of contents is kept consistent with the text content corresponding to each entry, so as to obtain a second text with high accuracy; on the other hand, the second text is automatically arranged based on the text layout format, so as to obtain a third text with a certain layout format. In this way, the first text can be processed automatically without manual processing, thereby improving the degree of automation, timeliness and efficiency of text processing, while avoiding individual subjectivity and knowledge limitations, thereby improving the comprehensiveness and accuracy of the third text. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic diagram of a network architecture of a text processing system 100 provided in an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application;

[0027] Figure 3 It is a first flow chart of the text processing method provided in the embodiment of the present application;

[0028] Figure 4 This is a schematic diagram of a process for generating a table of contents provided in an embodiment of the present application;

[0029] Figure 5 is a second flow chart of the text processing method provided in an embodiment of the present application;

[0030] Figure 6 It is a third flow chart of the text processing method provided in the embodiment of the present application.

[0031] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0033] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0034] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0035] In the embodiments of the present application, the term "module" or "unit" refers to a computer executable instruction or a part of a computer executable instruction with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0036] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0037] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0038] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0039] 1) Natural Language Processing (NLP) is an interdisciplinary field of computer science, artificial intelligence, and linguistics, which aims to enable computers to understand and process natural languages ​​used by humans. The goal of NLP is to enable computers to interpret, understand, and generate human language in order to communicate effectively with humans.

[0040] The application scope of NLP is very wide, including but not limited to: language translation, text analysis, speech recognition, question-answering systems, information extraction, text generation, and dialogue systems.

[0041] NLP research includes multiple subfields, such as part-of-speech tagging, syntactic analysis, semantic understanding, machine translation, speech recognition, information extraction, and text generation. With the development of deep learning technology, NLP has made significant progress in recent years, especially in the construction of language models, text generation, and dialogue systems.

[0042] 2) Bidirectional Encoder Representation from Transformers (Bert) is a pre-trained language representation model. Bert emphasizes that it no longer uses the traditional unidirectional language model or the shallow concatenation of two unidirectional language models for pre-training as in the past, but instead uses a new masked language model (MLM) to generate deep bidirectional language representation.

[0043] Bert is a powerful natural language processing model that can perform well in a variety of NLP tasks, including text classification, named entity recognition, sentiment analysis, etc. The main features of the Bert model include bidirectional encoding, pre-training tasks, fine-tuning, and versatility.

[0044] 3) Natural Language Understanding (NLU) is a subfield of artificial intelligence that involves the ability of computer programs to understand and interpret human language. The goal of NLU is to enable computers to understand the meaning, intent, and context of natural language so that they can communicate and interact effectively.

[0045] NLU usually includes technologies in part-of-speech tagging, syntactic analysis, semantic analysis, semantic role labeling, coreference resolution, entity recognition, sentiment analysis, and dialogue management.

[0046] NLU has a wide range of application scenarios, including but not limited to intelligent customer service, machine translation, text summarization, voice assistants, search engines, etc. The research and application of NLU are constantly promoting the development of artificial intelligence technology, enabling it to better understand and process human language.

[0047] 4) Natural Language Generation (NLG), a branch of Natural Language Processing (NLP), involves converting structured data, abstract concepts, or other forms of information into natural language text. The goal of NLG is to create artificially generated text that can express information in a natural, fluent, and contextually relevant way.

[0048] Natural language generation can be applied to a variety of scenarios, such as automatic writing, machine translation, chatbots, speech recognition, text summarization, information extraction, personalized recommendations, etc. NLG systems usually include key steps such as information extraction, data organization, language model, and evaluation.

[0049] Natural language generation is an important technology for realizing human-computer interaction, automated content creation, and information transmission. With the advancement of artificial intelligence and machine learning technologies, the performance and application scope of NLG systems are also expanding.

[0050] 5) Prompting Learning is a training technique in machine learning that guides the model’s learning and decision-making process by providing the model with appropriate guiding prompts or examples. Prompts can be text, pictures, audio, or other forms of input, and prompts are used to instruct the model on how to respond to specific inputs.

[0051] Hint learning is often used in zero-shot learning, data enhancement, task guidance, error correction, etc. Hint learning can be implemented in different ways, including adding hints to training data, adjusting loss functions, designing model architectures, and using additional hint data. Hint learning provides stronger guidance for the model, speeds up the model's learning process, and improves performance and accuracy.

[0052] 6) Multi-Task Learning (MTL) refers to the strategy of training a model to perform multiple related tasks at the same time. In this learning, the model shares representations on multiple tasks so that it can learn knowledge from each task that helps other tasks. Multi-task learning aims to improve the generalization ability of the model and reduce overfitting, while also improving the performance of each task.

[0053] The application of multi-task learning in language processing includes shared underlying representation, shared feature engineering, joint optimization, and data augmentation.

[0054] The advantage of multi-task learning is that it reduces the need to train a model for each task separately, thereby reducing training cost and time. In addition, by sharing knowledge, multi-task learning models can usually achieve better performance on each task than training each task separately.

[0055] In order to better understand the text processing method provided in the embodiment of the present application, the text processing method in the related art and its existing shortcomings are first described.

[0056] In the related art, the writing of various books is completed by manual recording, which requires manpower costs, and due to the cognitive limitations of the writers and the subjectivity of the writing, the writing results are poorly accurate, low in automation, and lack of comprehensiveness. In addition, since writing takes a long time, it also leads to problems of low writing efficiency and poor timeliness.

[0057] The embodiments of the present application provide a text processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product, which can improve the automation, timeliness, and efficiency of text processing, and improve the accuracy of a third text. The following describes an exemplary application of the computer equipment provided by the embodiments of the present application. The computer equipment provided by the embodiments of the present application can be implemented as a server, and can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, a smart speaker, a smart watch, a smart TV, and a vehicle-mounted terminal. Below, an exemplary application when the computer equipment is implemented as a server will be described.

[0058] See also Figure 1 , Figure 1 It is a schematic diagram of the network architecture of the text processing system 100 provided in an embodiment of the present application. To support a text processing application, the server 400 is connected to the terminal 200 via the network 300, wherein the network 300 may be a wide area network or a local area network, or a combination of the two.

[0059] Continue to see Figure 1In response to the received text processing instruction, the terminal 200 generates a text processing request carrying the first text, and sends the text processing request to the server 400; the server 400 is used to generate a chapter directory of the first text based on the semantic information of each sentence in the first text, and the chapter directory includes multiple entries; based on the first text, the text content corresponding to each entry is generated to obtain multiple text contents; based on the corresponding relationship between the chapter directory, multiple text contents, multiple entries and multiple text contents, the second text is generated; the layout format of each entry is determined to obtain the text layout format; the second text is arranged based on the text layout format to obtain the third text. The server 400 is also used to return the third text to the terminal 200 so that the terminal 200 can display the third text.

[0060] In an embodiment of the present application, the server 400 generates a table of contents for the first text based on the semantic information of each sentence in the first text, and the table of contents includes multiple entries, that is, the table of contents is automatically generated based on the semantic information; then, the text content corresponding to each entry is also generated based on the first text, that is, the text content corresponding to each entry is automatically generated; then, based on the table of contents, the text content, and the correspondence between the entry and the text content, the second text is generated; in addition, the layout format of each entry is determined to obtain the text layout format of the second text, and the second text is layout to obtain the third text. That is, the third text with a table of contents and a layout format is automatically constructed. In this way, the first text is automatically processed without manual processing, thereby improving the degree of automation, timeliness and efficiency of text processing, while avoiding the subjectivity and knowledge limitations of individuals, thereby improving the comprehensiveness and accuracy of the third text.

[0061] In some embodiments, the server 400 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The video server and the server may be directly or indirectly connected via wired or wireless communications.

[0062] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application, Figure 2The server 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0063] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0064] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0065] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0066] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0067] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0068] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0069] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0070] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0071] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0072] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The text processing device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a first generation module 4551, a second generation module 4552, a third generation module 4553, a first determination module 4554 and an arrangement module 4555. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0073] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the text processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic device (Complex Programmable Logic Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA) or other electronic components.

[0074] In some embodiments, the server or terminal can implement the text processing method provided by the embodiment of the present application by running various computer executable instructions. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a text generation APP, a text editing APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0075] The text processing method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server provided in the embodiment of the present application.

[0076] The following describes the text processing method provided by the embodiment of the present application. As mentioned above, the computer device implementing the text processing method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0077] It should be noted that in the example of the text processing method below, the first text is illustrated as a historical text. Based on the understanding of the following text, those skilled in the art can apply the text processing method provided in the embodiment of the present application to the processing of other types of texts such as literary texts, technical texts, educational texts, etc.

[0078] See also Figure 3 , Figure 3 is a first flow chart of the text processing method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are used to illustrate the text processing method provided in the embodiment of the present application. Figure 3 The execution subject is described by taking a server as an example.

[0079] In step S101, a table of contents of the first text is generated based on semantic information of each sentence in the first text.

[0080] In the embodiment of the present application, the catalog includes multiple entries. Exemplarily, the entries may include chapters, sections, subsections, titles, etc.

[0081] In some embodiments, the first text refers to an unprocessed, unwritten text. For example, the first text may be a conversation in daily life, so the first text may contain a large amount of redundant information. Since the first text has not been structured, the readability of the first text is poor and the comprehensibility is difficult, and it is not conducive to retrieving and analyzing the first text. The first text includes a plurality of sentences. For each sentence, the semantic information of the sentence refers to the meaning and significance content conveyed by the sentence. Semantic information includes objects, concepts, relationships, attributes represented by words in the sentence, and thoughts, intentions, and emotions expressed by the sentence as a whole. In some embodiments, the semantic information of the sentence can be determined by at least one of syntactic analysis, semantic role labeling, sentiment analysis, entity recognition, semantic network, and deep learning model.

[0082] In some embodiments, the first model can be used to predict the chapter list based on the semantic information of each sentence to obtain the chapter list of the first text. The first model can generate the chapter list based on the semantic information. Exemplarily, the first model can be a text classification model or a hierarchical text decomposition model. When the first model is a text classification model, the first model can determine the category of each sentence in the first text by classification, and then generate the chapter list according to the category; when the first model is a hierarchical text decomposition model, the first model can identify the hierarchical structure in the first text and generate the chapter list according to the hierarchical structure. In this case, the first model can adopt a recursive neural network architecture or a transformer architecture.

[0083] Taking the first model as a text classification model as an example, in the process of classifying sentences, a category label is assigned to each sentence, and the position of the sentence in the first text is recorded. Each sentence and its category label can be saved in a data structure; when generating a table of contents, sentences of the same category are mapped to the same entry, and the contents of these sentences are saved. For example, an "introduction" entry can be associated with a list containing all sentences classified as "introduction"; an index table is constructed to associate each entry with a corresponding sentence set, where the sentences in the sentence set can be called associated sentences corresponding to the entry.

[0084] For example, to generate multiple sentences of a category label, firstly, the main contents of the multiple sentences are extracted through summary generation technology or key sentence extraction technology, and the main contents are the semantic information of the sentences. Then, the core words are extracted from the main contents through keyword extraction method, and finally the core words are combined into an entry, thus generating an entry. Based on this, the above multiple sentences can be determined as the associated sentences of the entry.

[0085] In some embodiments, see Figure 4The above step S101 can be implemented by the following steps S1011 to S1015, which are described in detail below.

[0086] In step S1011, the semantic information is input into the first model for processing to obtain a candidate chapter list of the first text.

[0087] In some embodiments, when the first text includes a directory, the directory included in the first text is recorded as an initial directory, and the initial directory can be used as a sentence of the first text, and the semantic information includes the semantic information of the initial directory. Based on this, when the directory generation model is used to generate the directory, not only the semantic information corresponding to the content will be encoded, but also the semantic information of the initial directory will be encoded to obtain the corresponding initial directory vector. In this way, during the generation process, the generation process of the chapter directory can be guided based on the initial directory vector, thereby obtaining a candidate chapter directory with high accuracy. This process can be considered as an optimization and improvement of the initial directory, thereby regenerating a candidate chapter directory for the first text, so that in at least one dimension of logic, completeness, simplicity, and consistency, the candidate chapter directory is better than the initial directory.

[0088] In some embodiments, in the process of generating the candidate chapter directory, entries may be generated step by step according to the entry level, and finally the candidate chapter directory is generated based on the entries. For example, chapter entries, section entries, subsection entries and title entries may be generated in sequence first, and finally the candidate chapter directory is constructed using the chapter entries, section entries, subsection entries and title entries.

[0089] In some embodiments, the first model can be obtained through training, and the training process includes the following steps S0111 to S0115.

[0090] In step S0111, an initial model and a first training sample are obtained.

[0091] In the embodiment of the present application, the first training sample includes the second reference text and a directory of the second reference text.

[0092] In some embodiments, the second reference text may be used as sample data, and the directory of the second reference text may be used as sample labels.

[0093] In step S0112, the reference semantics of each reference sentence in the second reference text is determined.

[0094] In some embodiments, each reference sentence in the second reference text can be obtained from the second reference text through text preprocessing and sentence extraction, and then the reference semantics of each reference sentence can be determined. The second reference text can be standardized and written through text preprocessing to facilitate subsequent reference sentence extraction operations. The text preprocessing includes deleting irrelevant information, converting text format, word segmentation, and deleting stop words.

[0095] In some embodiments, the reference semantics of the reference sentence can be obtained through a rule method, a statistical method, or a deep learning method.

[0096] In step S0113, the initial model is used to perform catalog prediction based on reference semantics to generate a predicted catalog.

[0097] In some embodiments, the reference semantics may be encoded first to obtain a semantic vector; then the entry vector corresponding to the semantic vector is determined, and then the entry vector is decoded to obtain the entry corresponding to the semantic vector, that is, the entry corresponding to the reference semantics. Based on this, the entry corresponding to each reference semantics may be determined based on each reference semantics, and finally a prediction catalog may be constructed based on the entry corresponding to each reference semantics.

[0098] In step S0114, error information is determined based on the predicted catalog and the catalog of the second reference text; and model parameters of the initial model are adjusted based on the error information to obtain an adjusted model.

[0099] In some embodiments, the error information between the predicted directory and the directory of the second reference text can be determined by cosine similarity, Jaccard similarity, etc. Then, an optimization algorithm is used to adjust the model parameters and the model parameter update. The purpose of the optimization algorithm is to find a set of model parameters that minimizes the value of the loss function, wherein the optimization algorithm can be a gradient descent, an Adam optimizer, etc. Then, the optimization algorithm guides the update of the model parameters by calculating the gradient of the loss function with respect to each model parameter. The direction of the model parameter update is the opposite direction of the gradient, and the amplitude of the update is determined by the learning rate. Finally, the model after parameter adjustment is determined as the adjusted model.

[0100] In step S0115, when it is determined based on the error information or the number of parameter adjustments that the training stop condition is met, the adjusted model is determined as the first model.

[0101] In some embodiments, the training stop condition may be that the error information is less than the error threshold; the training stop condition may also be that the number of parameter adjustments is less than the number threshold, which also indicates that the number of training times is less than the number threshold; the training stop condition may also be that the error information is less than the error threshold and the number of parameter adjustments is less than the number threshold.

[0102] In some embodiments, when the error information is less than the error threshold, or when the number of parameter adjustments is less than the number threshold, or when the error information is less than the error threshold and the number of parameter adjustments is less than the number threshold, the most recently obtained adjusted model is determined as the first model.

[0103] Through the above steps S0111 to S0115, the initial model can be trained using the first training sample to obtain the first model, which provides a basis for the automatic generation of the subsequent chapter directory.

[0104] Continue to see Figure 4 , continue with the above step S1011 for explanation.

[0105] In step S1012, a consistency check is performed on the candidate chapter lists to obtain a check result.

[0106] In some embodiments, the coherence test of the candidate chapter directory can be implemented through the coherence model. The coherence test includes sequence test and rationality test of the superior and subordinate names, and the test result is obtained. The test result is used to indicate whether the sequence is correct and whether the superior and subordinate names are reasonable.

[0107] In some embodiments, the coherence model is used to evaluate the logical coherence and consistency between entries in the candidate directory of chapters. The coherence model can be a pre-trained language model such as Generative Pretrained Transformer (GPT) or Bidirectional Encoder Representations from Transformers (BERT).

[0108] In step S1013, it is determined whether the detection result is continuous.

[0109] In some embodiments, when the detection result representation order is correct and the superior and subordinate names are reasonable, the detection result is determined to be coherent and the process goes to step S1014; when the detection result representation order is incorrect or the superior and subordinate names are unreasonable, the detection result is determined to be incoherent and the process goes to step S1015.

[0110] In step S1014, the candidate chapter directory is determined as the chapter directory, and the process ends.

[0111] Here, since the detection result represents that the order is correct and the upper and lower level names are reasonable, the candidate chapter directory is determined as the chapter directory.

[0112] In step S1015, the candidate chapter directories are adjusted according to a preset adjustment strategy.

[0113] In the embodiments of the present application, the adjustment of the candidate chapter directory is stopped until the detection result is coherent, the adjusted chapter directory is obtained, and the adjusted chapter directory is determined as the chapter directory.

[0114] Here, since the detection result indicates an incorrect order or unreasonable superior and subordinate names, the candidate chapter directory needs to be adjusted according to the preset adjustment strategy until the order of the adjusted chapter directory is correct and the superior and subordinate names are reasonable, and then the adjusted chapter directory is determined as the chapter directory.

[0115] In some embodiments, the preset adjustment strategy may include that the chapter distance between the same narrative subjects is less than the chapter distance between different narrative subjects. Based on this, the arrangement order of the text content will be adjusted so that the chapter distance between the same narrative subjects is less than the chapter distance between different narrative subjects; the preset adjustment strategy may also include a preset writing preference. For example, the writing preference may be that the chapter related to the shape feature is located before the chapter related to the development history. Based on this, if the chapter related to the shape feature is located after the chapter related to the development history, the chapter related to the shape feature is adjusted to before the chapter related to the development history.

[0116] Through the above steps S1011 to S1015, the candidate chapter directory can be automatically generated by the first model, and the order and the rationality of the superior and subordinate of the candidate chapter directory are also detected, so as to finally obtain a chapter directory with correct order and reasonable superior and subordinate names. Thereby ensuring the logic of the chapter directory, improving the information transmission efficiency, and optimizing the quality of the chapter directory.

[0117] In some embodiments, before performing the above step S101, the first text is also obtained, and the semantic information of each statement in the first text is determined. The first text can be obtained from the public text library.

[0118] In some embodiments, each statement in the first text can be obtained from the first text through text preprocessing and statement extraction, and then the semantic information of each statement is determined. Among them, through text preprocessing, the first text can be standardized and written in a formal way to facilitate subsequent statement extraction operations.

[0119] In some embodiments, the text preprocessing includes deleting irrelevant information, converting the text format, word segmentation, and deleting stop words. Exemplarily, deleting irrelevant information may be deleting the Hyper Text Markup Language (HTML) tags in the first text; converting the text format may be converting all the text in the first text to lowercase; word segmentation may be decomposing the first text into words or phrases; deleting stop words may be deleting common but informationless words such as "de", "shi", "zai" in the first text.

[0120] In some embodiments, the semantic information of a sentence can be obtained by rule-based methods, statistical methods, or deep learning methods. For example, dependency parsing is used to understand the text structure of a sentence, semantic role labeling is used to identify the main participants of a sentence and their relationships, sentiment analysis is used to identify the sentiment tendency of a sentence, a single intent recognition model is used to predict an intent of a sentence, a multi-intent recognition model is used to predict all intents contained in a sentence, a named entity model is used to predict the entity of a sentence or an entity of a specified type, and an inference model is used to predict the inference knowledge or classification of a sentence. Based on this, at least one of the text structure, main participants and their relationships, sentiment tendency, intent, entity, and inference knowledge can be determined as semantic information.

[0121] In some embodiments, entity recognition and relationship extraction can also be performed on the sentence to identify entities in the sentence and extract the relationship between the entities. For example, the entity can be a person's name, a place, an organization, etc.

[0122] In some embodiments, machine learning and deep learning models can also be used to learn the semantic representation of sentences. Exemplarily, the machine learning and deep learning models can be models such as convolutional neural networks (CNN), recurrent neural networks (RNN), long short-term memory networks (LSTM), and transformers.

[0123] In some embodiments, when the first text is a voice text, the voice text can be converted into a character text through preprocessing, voice recognition and postprocessing steps. The preprocessing step includes: removing the background noise of the voice text, converting the continuous analog signal into a digital signal, and extracting the characteristics of the voice signal; voice recognition includes: converting the voice signal into phonemes or syllables, combining grammar and vocabulary information, converting the factors and syllables into possible word sequences, and using algorithms such as Viterbi to determine the most likely word sequence; postprocessing includes: adding punctuation marks, segmenting and other formatting processing to the recognized text, using natural language processing technology to correct and optimize the voice recognition results, and obtaining the first text of the character type. Then, the semantic information of the first text of the character type is determined.

[0124] Continue to see Figure 3 , and the description continues with step S101 above.

[0125] In step S102, text content corresponding to each entry is generated based on the first text to obtain multiple text contents.

[0126] In the embodiment of the present application, the entry is used as a generating unit, and for each entry, the text content corresponding to the entry is generated, so as to obtain multiple text contents. Among them, the text content can include character type content, and the text content can also include chart type content, that is, the embodiment of the present application can not only generate character type content based on sentences, but also generate chart type content based on sentences, so as to enrich the expression form of text content and improve the readability of text content.

[0127] In some embodiments, a general second model can be obtained, and the second model can be used to predict the text content based on the first text to generate the text content corresponding to each entry. It is also possible to obtain a second model corresponding to each entry, and then use the second model corresponding to the entry to predict the text content based on the associated sentence corresponding to the entry to generate the text content corresponding to the entry. The second model can be a recurrent neural network such as a long short-term memory network and a gated recurrent unit; the second model can also be a transformer model such as a bidirectional encoder representation transformer, a pre-trained transformer, a text-to-text transformer, etc.; the second model can also be a policy-based reinforcement learning model.

[0128] In some embodiments, the above step S102 can be implemented by the following steps S1021 to S1023, which are described in detail below.

[0129] In step S1021, the second model corresponding to the entry is obtained.

[0130] In some embodiments, if an entry involves a limited scope and covers simple content, the entry may correspond to one second model; and if an entry has a wide range of design and covers complex content, the entry may also correspond to multiple second models. In the embodiment of the present application, different entries may correspond to different second models, and different entries may also correspond to the same second model. For example, the entry includes chapters, sections, subsections, and titles. Since the contents corresponding to chapter entries, section entries, subsection entries, and title entries have different characteristics, chapter entries, section entries, subsection entries, and title entries may correspond to different second models.

[0131] In step S1022, a related sentence corresponding to the entry is obtained from the first text.

[0132] In the embodiment of the present application, the entries are generated based on the semantic information of the associated sentences.

[0133] In some embodiments, after the table of contents of the first text is generated, an index table is constructed, and each entry and the associated sentence corresponding to the entry are stored in the index table. Based on this, the associated sentence corresponding to each entry can be obtained from the index table.

[0134] In step S1023, the associated sentence is input into the second model for processing to obtain the text content corresponding to the entry.

[0135] In some embodiments, the associated sentence can be input into the second model, and the second model can be used to predict the text content based on the associated sentence, so as to obtain the text content corresponding to the entry, and automatically generate the text content corresponding to the entry. In some embodiments, the associated sentence can be first segmented into tokens such as words, phrases, and characters, and then the tokens can be converted into numerical vectors; then, the numerical vectors can be encoded to obtain an encoding result; then, the encoding result can be decoded to obtain a decoded token, and the decoded token can be converted into text, so as to obtain the text content corresponding to the entry.

[0136] Through the above steps S1021 to S1023, the text content corresponding to the entry can be automatically generated through the second model. Since the second model corresponds to the entry, based on this, text content with strong relevance to the entry and high accuracy can be generated.

[0137] Continue to see Figure 3 , and the description continues with step S102 above.

[0138] In step S103, a second text is generated based on the table of contents, the plurality of text contents, and the correspondence between the plurality of entries and the plurality of text contents.

[0139] In the embodiment of the present application, based on the correspondence between multiple entries and multiple text contents, each entry and its corresponding text content can be merged to obtain multiple sixth texts; then, based on the chapter directory, multiple sixth texts can be combined to obtain a seventh text; finally, the chapter directory and the seventh text can be merged to obtain a second text. The second text is a text with a chapter directory. For example, the second text can be a history book or a science and technology book.

[0140] For example, if the table of contents is chapter 1, section 1, subsection 1, chapter 2, section 2, chapter 3 and section 3, and the text content of chapter 1 is text content 1, the text content of section 1 is text content 2, the text content of subsection 1 is text content 3, the text content of chapter 2 is text content 4, the text content of section 2 is text content 5, the text content of chapter 3 is text content 6, and the text content of section 3 is text content 7. Then merge chapter 1 with text content 1, merge section 1 with text content 2, merge subsection 1 with text content 3, merge chapter 2 with text content 4, merge section 2 with text content 5, merge chapter 3 with text content 6, merge section 2 with text content 7, and get six sixth texts; then merge the above six sixth texts in the order of chapter 1, section 1, subsection 1, chapter 2, section 2, chapter 3, and section 3 to get the seventh text, that is, put the sixth text corresponding to chapter 1 in the first place, and then put the sixth text corresponding to section 1, the sixth text corresponding to subsection 1, the sixth text corresponding to chapter 2, the sixth text corresponding to section 2, the sixth text corresponding to chapter 3, and the sixth text corresponding to section 3 in sequence; finally, put the table of contents before the seventh text to merge the table of contents with the seventh text, and get the second text.

[0141] In step S104, the layout format of each entry is determined to obtain a text layout format.

[0142] In the embodiment of the present application, for each entry, the arrangement format of the entry is determined; the arrangement format of each entry constitutes a text arrangement format.

[0143] In some embodiments, if an entry includes chapters, sections, subsections, and titles, the arrangement format of each chapter is the same, the arrangement format of each section is the same, the arrangement format of each subsection is the same, and the arrangement format of each title is the same, while the arrangement formats of chapters, sections, subsections, and titles may be different. Among them, chapters, sections, subsections, and titles may be considered as entries of different entry levels, that is, entries of the same entry level may correspond to the same arrangement format, and entries of different entry levels may correspond to different arrangement formats.

[0144] In some embodiments, for each entry, the format of the entry may be determined in one of the following three ways, which are described in detail below.

[0145] Method 1: determining the arrangement format of the entry based on the entry level of the entry and a first reference arrangement format corresponding to the text theme of the first text.

[0146] In the embodiment of the present application, the entry level of each entry in the chapter directory can be determined first, the text theme of the first text can be determined, and the first reference layout format corresponding to the text theme can be obtained. Taking the text theme as a historical theme as an example, in order to facilitate readers to mark or mark, the first reference layout format can include a layout format with a page margin greater than a preset value, and the first reference layout format can also include fonts, font sizes, font colors, etc. corresponding to different entry levels.

[0147] Take Chapter 1 in the history text as an example. Chapter 1 is a level. The margins of the level in the first reference layout format are: top margin 3.17 cm, bottom margin 3.17 cm, inner margin 4.06 cm, outer margin 3.17 cm. The font, font size, and font color of the level in the first reference layout format are: Songti, size 4, and black. The top margin 3.17 cm, bottom margin 3.17 cm, inner margin 4.06 cm, outer margin 3.17 cm, Songti, size 4, and black are determined as the layout format of Chapter 1. In this way, a layout format that conforms to the theme style can be obtained, which improves the rationality of the layout format.

[0148] Method 2: determining the arrangement format of the entry based on the entry level and the second reference arrangement format corresponding to the first reference text.

[0149] In some embodiments, the first reference text refers to a text with a standardized and reasonable format, and the format of the first reference text has the characteristics of clear structure, unified typesetting, visual beauty, accurate details, strong adaptability, etc. In addition, the first reference text may include at least one text, and the first reference text may be manually specified in advance based on experience, or may be automatically recognized by the device; the first reference text may also be a text belonging to the same field as the first text.

[0150] Take Section 1 in the history text as an example. Section 1 is the second level. The second level margins in the second reference layout format are: top margin 2.54 cm, bottom margin 2.54 cm, inner margin 4.06 cm, outer margin 3.17 cm. The second level font, font size, and font color in the second reference layout format are: Songti, size 4, and black. The top margin 2.54 cm, bottom margin 2.54 cm, inner margin 4.06 cm, outer margin 3.17 cm, Songti, size 4, and black are determined as the layout format of Section 1. In this way, a layout format with clear structure, unified typesetting, beautiful visual appearance, accurate details, and strong adaptability can be obtained.

[0151] Method three: determine the arrangement format of the entry based on the entry level and the preset arrangement format.

[0152] In some embodiments, the arrangement format of the item level in the preset arrangement format can be directly determined as the arrangement format of the item. The preset arrangement format can be manually set based on experience or can be automatically set by the device. In this way, the arrangement format of the item can be quickly determined.

[0153] Through the above-mentioned methods 1 to 3, the diversity of the arrangement formats of the determined entries can be improved.

[0154] In step S105, the second text is formatted based on the text formatting format to obtain a third text.

[0155] In some embodiments, the text layout format includes a layout format for each entry level. The text content of the same entry level in the second text is arranged using the layout format of the entry level in the text layout format to obtain the arranged content of the entry level, that is, the third text.

[0156] Through the above steps S101 to S105, a first text catalogue is generated based on the semantic information of each sentence in the first text, and the catalogue includes multiple entries, that is, the catalogue is automatically generated based on the semantic information; then, the text content corresponding to each entry is also generated based on the first text, that is, the text content corresponding to each entry is automatically generated; then, based on the catalogue, the text content and the correspondence between the entry and the text content, the second text is generated; in addition, the layout format of each entry is determined, so as to obtain the text layout format of the second text, and the second text is arranged to obtain the third text. That is, the third text with a catalogue and a layout format is automatically constructed. In this way, the first text is automatically processed without manual processing, thereby improving the automation, timeliness and efficiency of text processing, while avoiding the subjectivity and knowledge limitations of individuals, thereby improving the comprehensiveness and accuracy of the third text. In addition, since the third text is an arranged text, the third text can be directly used for printing and publishing, online, etc., thereby shortening the publishing cycle or online cycle and improving the efficiency of text processing.

[0157] In some embodiments, after the above step S105, see Figure 5 , the third text may also be checked for content and format, that is, after the above step S105, the following steps S106 and S107 may also be executed, which are described in detail below.

[0158] In step S106, based on the entry level of each entry, the text content corresponding to each entry is proofread to obtain a fourth text.

[0159] In the embodiments of the present application, content proofreading refers to proofreading the meaning of text content. Exemplarily, content proofreading may include whether the content matches the entry. Content proofreading may also include whether the meaning of the content is expressed accurately, completely, and coherently.

[0160] In some embodiments, for each entry, the text content corresponding to the entry may be proofread to obtain the second proofreading content corresponding to the entry; and then the fourth text may be composed of a plurality of the second proofreading contents.

[0161] In some embodiments, for each entry, proofreading the text content corresponding to the entry can be achieved through the following steps S1061 to S1064, which are described in detail below.

[0162] In step S1061, the entry level of the entry is determined.

[0163] In some embodiments, the entries in the chapter directory can be divided into different entry levels. Following the above example, chapters can be divided into the first level, sections can be divided into the second level, subsections can be divided into the third level, and titles can be divided into the fourth level. Based on this, if the chapter directory is chapter 1, section 1, subsection 1, chapter 2, section 2, chapter 3, and section 3, then chapter 1, chapter 2, and chapter 3 are determined as the first level, section 1, section 2, and section 3 are determined as the second level, and subsection 1 is determined as the third level.

[0164] In step S1062, the text content corresponding to the entry is verified using the verification rule corresponding to the entry level of the entry to obtain the first proofreading content.

[0165] In some embodiments, the preset verification rules can be formulated for different entry levels based on manual experience. For example, if the content of a "chapter" has the characteristics of being concise and highly summarized, then the verification rule corresponding to the first-level entry level is a concise and highly summarized rule. For example, the verification rule can be that the number of words is less than 300, and the topic sentence can summarize the main theme of the chapter; if the content of a "section" has the characteristics of transition and connection, then the verification rule corresponding to the second-level entry level is a transition and connection rule. For example, the verification rule can be that the frequency of use of transition words such as "however", "in addition", and "therefore" is between 3% and 10%; if the content of a "subsection" has the characteristics of detailed elaboration, then the verification rule corresponding to the third-level entry level is a detailed elaboration rule. For example, the verification rule can be that the number of sentences is greater than 50, and the proportion of descriptive sentences is greater than 60%. Based on this, different levels correspond to different proofreading standards. When proofreading content, it is necessary to refer to the characteristics of the level.

[0166] In the process of checking the text content, revision information is first obtained, and the revision information is used to indicate the modification method of the text content. For example, the modification method may be to modify word A in the text content to word B.

[0167] In some embodiments, the text content corresponding to the entry can be modified based on the revision information to obtain the first proofreading content. Continuing with the above example, the sentence of word A in the text content is modified to word B to obtain the modified text content, that is, the first proofreading content.

[0168] In step S1063, when it is determined that the first proofreading content meets the proofreading condition based on the first proofreading content and the text content corresponding to the entry, the first proofreading content is determined as the second proofreading text content corresponding to the entry.

[0169] In some embodiments, the proofreading condition means that the content characteristics of the content after proofreading are better than the content characteristics of the content before proofreading, wherein the content characteristics may include at least one of confusion, grammatical correctness, clarity, accuracy, coherence, simplicity, professionalism, adaptability, and consistency. On this basis, satisfying the proofreading condition means that the content characteristics of the content after proofreading are better than the content characteristics of the content before proofreading; and not satisfying the proofreading condition means that the content characteristics of the content before proofreading are better than the content characteristics of the content after proofreading.

[0170] Taking the proofreading condition that the content characteristics of the content after proofreading are better than the confusion degree of the content before proofreading as an example, the confusion degrees of the first proofreading content and the text content corresponding to the entry can be determined respectively. If the confusion degree of the first proofreading content is less than the confusion degree of the text content corresponding to the entry, it means that compared with the text content corresponding to the entry, the first proofreading content is not easy to cause ambiguity, and the first proofreading content is determined to meet the proofreading condition, and the first proofreading content is determined as the second proofreading text content corresponding to the entry.

[0171] In some embodiments, the method of determining the obfuscation level of a text generally involves evaluating the complexity, ambiguity, and difficulty of understanding of the text. The obfuscation level of the text may be determined by:

[0172] Method 1. Semantic complexity analysis: Evaluate the concept density and semantic depth in the text. Complex text contains multiple conceptual levels and is difficult to understand at once.

[0173] Method 2. Grammatical structure analysis: Analyze the complexity of the grammatical structure of the text, including the number of clauses, nested structure, heterogeneous components, etc. Complex grammatical structure will increase the confusion of the text.

[0174] Method 3. Lexical Diversity: Assess the diversity and complexity of the vocabulary in the text, including jargon, similes, metaphors, etc. Using a broad and diverse vocabulary can increase the confusion of a sentence.

[0175] Method 4. Contextual dependence: Consider whether the text depends on a specific context or background knowledge. Texts that are highly dependent on a specific context are more difficult to understand for readers who are not familiar with the context.

[0176] Method 5. Reading difficulty assessment: Use a reading difficulty scale or tool (such as the Flesch-Kincaid Reading Difficulty Scale) to assess the reading difficulty of the text. A higher score usually means that the sentence is more difficult to understand.

[0177] Method 6. Machine Learning Model: Use a machine learning model to predict the degree of confusion of the text. For example, a text classification model can be used to distinguish between easily confusing text and easily understandable text.

[0178] In some embodiments, at least one of the following characteristics of the first proofreading content and the text content corresponding to the entry can also be determined respectively: grammatical correctness, clarity, accuracy, coherence, conciseness, professionalism, adaptability, consistency, etc. Taking adaptability as an example, adaptability refers to the group to which the text is adapted. If the adaptability of the first proofreading content is greater than the adaptability of the text content corresponding to the entry, it indicates that the first proofreading content is adapted to a larger group than the text content corresponding to the entry, and it is determined that the first proofreading content meets the proofreading conditions.

[0179] In step S1064, when it is determined that the first proofreading content does not meet the proofreading condition based on the first proofreading content and the text content corresponding to the entry, the text content corresponding to the entry is determined as the second proofreading content corresponding to the entry.

[0180] In some embodiments, if the obfuscation degree of the first proofreading content text is greater than the obfuscation degree of the text content corresponding to the entry, it indicates that the first proofreading content is more likely to be ambiguous than the text content corresponding to the entry, and it is determined that the first proofreading content does not meet the proofreading condition.

[0181] Taking adaptability as an example, adaptability refers to the group that the text is adapted to. If the adaptability of the first proofreading content is less than the adaptability of the text content corresponding to the entry, it means that the first proofreading content is adapted to a smaller group than the text content corresponding to the entry, and it is determined that the first proofreading content does not meet the proofreading condition. At this time, the text content corresponding to the entry is determined as the second proofreading content corresponding to the entry.

[0182] Through the above steps S1061 to S1064, the text content corresponding to each entry can be verified to obtain the second proofreading content corresponding to each entry, thereby obtaining the second proofreading content with high content accuracy, low complexity and easy to understand.

[0183] Continue to see Figure 5, the following description continues with step S106 above.

[0184] In step S107, the fourth text is formatted and proofread to obtain a fifth text.

[0185] In the embodiment of the present application, after proofreading the content, format proofreading will continue to be performed to obtain a high-quality fifth text. Among them, format proofreading focuses on the accuracy of typesetting and format, and pays attention to the external performance of the text, including text errors (typos), use of punctuation marks, layout design, fonts, font sizes, line spacing, segmentation, alignment, chart quality, etc.

[0186] In some embodiments, the text format refers to the organizational structure and presentation of the text. Exemplarily, the text format may be the layout, font, color, paragraph, etc. of the text content. That is, the fourth text is typesetting proofread and format proofread respectively, so as to obtain typesetting revision information and format revision information; based on this, the text content corresponding to the entry is first modified based on the typesetting revision information and format revision information to obtain the third proofreading content; then, based on the third proofreading content and the text content corresponding to the entry, when it is determined that the third proofreading content meets the proofreading condition, the third proofreading content is determined as the fourth proofreading content corresponding to the entry; and when it is determined that the third proofreading content does not meet the proofreading condition, the text content corresponding to the entry is determined as the fourth proofreading content corresponding to the entry; finally, the fifth text is composed of each fourth proofreading content. Among them, the text content corresponding to the entry in step S107 refers to the text content corresponding to the entry in the fourth text.

[0187] Through the above steps S106 and S107, the text content corresponding to each entry can be proofread to obtain a fourth text; the fourth text is then format proofread to obtain a fifth text with correct format, no typos and high chart quality.

[0188] In some embodiments, after the above step S107, the following steps S108 to S111 may also be performed, which are described in detail below.

[0189] In step S108 , the content score of the fifth text is determined.

[0190] In the embodiment of the present application, the content score is used to reflect the quality of the fifth text. A higher content score indicates a better quality of the fifth text, and a lower content score indicates a worse quality of the fifth text.

[0191] In some embodiments, the above step S108 can be implemented by the following steps S1081 to S1084, which are described in detail below.

[0192] In step S1081, a third reference text is obtained, and the fifth text is compared with the third reference text to obtain a comparison score.

[0193] In some embodiments, the third reference text may refer to a comparative text of the fifth text, and the third reference text may be a text in the same field as the fifth text, or may be a document describing the same subject as the fifth text. For example, if the third reference text is a text in the same field as the fifth text, the field to which the fifth text belongs may be determined based on the text content of the fifth text, and then a text belonging to the same field may be obtained from the public text library as the third reference text.

[0194] In some embodiments, the comparison score between the fifth text and the third reference text may be determined by term frequency-inverse document frequency and cosine similarity, or by Latent Dirichlet Allocation (LDA).

[0195] In step S1082, content extraction is performed on the fifth text according to different dimensions to obtain dimensional content corresponding to each dimension.

[0196] In some embodiments, the dimensions of the fifth text include a name dimension, a chapter directory dimension, and a text content dimension.

[0197] In some embodiments, the name of the fifth text, the table of contents of the fifth text, and the text content of the fifth text may be extracted through a content extraction model.

[0198] In step S1083, a rating prediction is performed on each dimensional content to obtain a dimensional score for each dimensional content.

[0199] Continuing with the above example, the score prediction can be performed on the name of the fifth text, the table of contents of the fifth text, and the text content of the fifth text respectively to obtain the name score, the table of contents score, and the content score.

[0200] In some embodiments, the process of determining the name score and the chapter list score is similar. Taking the name score as an example, a name evaluation model can be obtained, and the name of the fifth text can be input into the name evaluation model to obtain the name score. The process of determining the content score includes: obtaining a content evaluation model, splicing the name of the fifth text and the chapter list of the fifth text into the text content of the fifth text to obtain the overall content, and then inputting the overall content into the content evaluation model to obtain the content score.

[0201] In step S1084 , a content score of the fifth text is determined based on the comparison score and each dimension score.

[0202] In some embodiments, the comparison score and the preset weight of each dimension score are obtained, and the sum of all preset weights is 1. Continuing with the above example, the preset weights of the comparison score, name score, chapter score, and content score can be 0.2, 0.15, 0.25, and 0.4, respectively. Then, the comparison score is determined based on the comparison score and the corresponding preset weight. Here, the product of the comparison score and the corresponding preset weight can be determined as the comparison score. Exemplarily, assuming that the comparison score is 82 and the preset weight of the comparison score is 0.2, the comparison score is 16.4. Similarly, each dimension score is determined based on each dimension score and the corresponding preset weight. Finally, the comparison score and each dimension score are summed to obtain the content score of the fifth text.

[0203] Through the above steps S1081 to S1084, a multi-dimensional and comprehensive content score can be obtained for the fifth text, so that the quality of the fifth text can be accurately reflected through the content score.

[0204] The following is a description of step S108 described above.

[0205] In step S109 , when the content score is less than the score threshold, the update times for the fifth text are obtained.

[0206] In some embodiments, the score threshold is a value set in advance, and illustratively, the score threshold may be 80, 85, 88, etc. When the content score is greater than or equal to the score threshold, it indicates that the quality of the fifth text meets the standard, and the fifth text is published; and when the content score is less than the score threshold, it indicates that the quality of the fifth text does not meet the standard, and the number of updates for the fifth text is obtained.

[0207] In some embodiments, the fifth text is published on a public platform for users to read, study, refer to and download, thereby contributing to social development.

[0208] In step S110 , when the number of updates is less than the number threshold, the fifth text is proofread for content and format to obtain an updated fifth text.

[0209] In some embodiments, the times threshold is a value set in advance, and for example, the times threshold may be 5, 8, 10, etc. If the number of updates is less than the times threshold, the fifth text is proofread for content and format, wherein the content proofreading is different from the above step S106, and the proofreading rule may be different from the proofreading rule in the above step S106; the format proofreading is different from the above step S107, and the format that is not proofread in the above step S107 may be proofread, thereby obtaining the updated fifth text.

[0210] In step S111 , when the number of updates is greater than or equal to the number threshold, the first text is reprocessed to obtain an updated fifth text.

[0211] In some embodiments, if the number of updates is greater than or equal to the number threshold, it indicates that the fifth text has been updated multiple times, and the content score of the updated text is still less than the score threshold. Then the first text is reprocessed, and the text processing process can refer to the above steps S101 to S107, and the difference includes at least one of the following: the parameters of the first model are adjusted, the parameters of the second model are adjusted, the verification rules are different from the verification rules in the above step S106, and the format proofreading is different from the above step S107. Thus, the updated fifth text is obtained.

[0212] In some embodiments, a content score of the updated fifth text may also be determined, and if the content score of the updated fifth text is greater than a score threshold, the updated fifth text may be published.

[0213] In some embodiments, if the content score of the updated fifth text is less than the score threshold, the process returns to step S109 until an updated fifth text with a content score greater than or equal to the score threshold is obtained, and finally the updated fifth text with a content score greater than or equal to the score threshold is output.

[0214] Through the above steps S108 to S111, a content score that can accurately and comprehensively characterize the quality of the fifth text is also determined, and when the content score is greater than or equal to the score threshold, the fifth text is published on a public platform for users to read, study, refer to and download, thereby contributing to social development. In the case where the content score is less than the score threshold and the number of updates is less than the number threshold, the update is performed by content proofreading and format proofreading to improve the update speed; and in the case where the content score is less than the score threshold and the number of updates is greater than or equal to the number threshold, the update is performed by re-texting to improve the update accuracy.

[0215] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0216] At present, theoretical research and model exploration of natural language processing have gradually expanded to broader fields that are increasingly close to human intelligence. The problems involved have also gradually extended from tasks such as word segmentation, semantic classification and matching, and question and answering. Whether in the field of text recognition or text generation, they show a trend from easy to difficult.

[0217] The tradition of recording human civilization has continued for thousands of years. In the past, it was recorded and written manually. Now, with the emergence and popularity of big models, the era of using big models to write human civilization has arrived.

[0218] In view of this, an embodiment of the present application proposes a text processing method, which is a human civilization writing framework based on a multi-task fusion learning paradigm, making the process of human civilization writing more comprehensive, timely, and labor-saving, and realizing a virtuous cycle framework in which human history creates civilization products, witnesses, and writes human history.

[0219] In some embodiments, see Figure 6 , Figure 6 is a third flow chart of a text processing method provided in an embodiment of the present application. The text processing method can be executed by a computer device. Figure 6 The computer device is taken as a server as an example for explanation.

[0220] Will combine Figure 6 The steps shown illustrate the text processing method provided in the embodiment of the present application.

[0221] In step S601, all available text data of human civilization are obtained.

[0222] In the embodiment of the present application, the text data may be conversation data with role information. Generally, for conversation data, the identities of the conversation parties need to be indicated. For example, for conversation data in a sales scenario, the identities of the salesperson and the customer need to be indicated. The text data corresponds to the first text in other embodiments.

[0223] In some embodiments, the text data may be obtained by downloading from various public data sets or shared industry internal data.

[0224] In step S602, the text data is respectively input into a single-intent recognition model, a multi-intent recognition model, a named entity model, an inference model, etc. to obtain the intent, named entity sequence and inference relationship of the text.

[0225] In the embodiments of the present application, the intent of the text, the named entity sequence and the reasoning relationship correspond to the semantic information in other embodiments.

[0226] In some embodiments, the single intent recognition model is essentially a classification model. The input of the single intent recognition model is the sentence text in the text data, and the single intent output model can output the intent label embodied in the sentence text. Since the single intent recognition model outputs one intent, it is called a single intent recognition model, which can be considered as a single-label classification task. In actual situations, even if a sentence text itself contains more than one intent, that is, the sentence text itself contains multiple intents, the single intent recognition model only returns one of the intents. Which intent is specifically returned is related to the intention selection tendency in the training data. Exemplarily, the sentence text is: "Don't call me, I want to complain about you." Then the single intent recognition model outputs the "complaint" intent. Among them, the sentence text corresponds to the sentence in other embodiments.

[0227] In some embodiments, the multi-intent recognition model is essentially also a classification model. The input of the multi-intent recognition model is the sentence text in the text data, and the output of the multi-intent recognition model is the intent label embodied in the sentence text. Assuming that a sentence text itself contains more than one intent, the multi-intent recognition model will return all intents. The return order of multiple intents is related to the order in the intent labels in the training data. The multi-intent recognition model is a multi-label classification model. Exemplarily, the sentence text is: "Don't call me, I want to complain about you." The multi-intent recognition model outputs the intent of "dislike calling, complaining".

[0228] In some embodiments, the named entity model is essentially a sequence labeling model. The input of the named entity model is the sentence text in the text data, and the named entity model outputs the entity categories of the specified type that are hit in sequence in the sentence text. For example, if the sentence text is "Don't call me, I want to complain about you", the named entity model outputs "[[I, person(2,2)], [You, person(11,12)]".

[0229] In some embodiments, the inference model is essentially a generative model. If the input sentence text of the inference model is a single sentence text, the inference model outputs some knowledge or classification inferred from the sentence text. For example, if the sentence text is "Don't call me, I will complain about you", the inference model outputs the inference result of "Communication is difficult". If the input of the inference model is a concatenation format of two or more sentence texts, the output of the inference model is the logical relationship between the multiple sentence texts, where the sentence texts are concatenated by [SEP]. For example, if the sentence text is "Call me [SEP] again or I will complain about you", the inference model outputs the "conditional" inference result.

[0230] In step S603, the intention of the text, the sequence of named entities and the reasoning relationship and the historical document references are input into the document chapter arrangement model, and the document chapter directory is output.

[0231] In the embodiments of the present application, the intention of the text, the sequence of named entities and the reasoning relationship can be collectively referred to as the entire data analysis results, the manuscript chapter arrangement model corresponds to the first model in other embodiments, and the manuscript chapter directory corresponds to the chapter directory in other embodiments. Historical references refer to some books, papers, journals and other materials that study and summarize the laws of language itself.

[0232] In some embodiments, the manuscript chapter arrangement model can be trained first, and the pre-trained language model is loaded first; then the annotation data is sent to the pre-trained language model, and the training task type is set to text generation; finally, the trained model is obtained and recorded as the manuscript chapter arrangement model. Exemplarily, the data annotation format can be: the sentence text "Fintech refers to the application of new technologies to change the way financial services are provided, including mobile payments, blockchain, big data, etc." is annotated as "the meaning of fintech".

[0233] In some embodiments, the chapter names generated by the manuscript chapter arrangement model may be input into the chapter coherence verification model to verify the order of the chapters and the rationality of the names of the upper and lower levels; if unreasonable chapters are detected, the unreasonable chapters are adjusted, and there are two adjustment methods: pure logic adjustment and overall writing preference adjustment:

[0234] For pure logic adjustment, the distance between chapters of the same narrative subject should be smaller than that between chapters of different narrative subjects, that is, chapters of the same "big model" should be arranged close together, while chapters of "big model" and "finance" as narrative subjects should be arranged farther apart. For overall writing preference adjustment, it can be set in advance, for example, before the book is written or processed, the chapters describing the characteristics of the traits should be arranged before the chapters on the history of development. If the existing catalog does not conform to this order, it needs to be adjusted.

[0235] In step S604, each model completes the first draft chapter in which it is good.

[0236] In the embodiments of the present application, each major model refers to a major model that is trained by inputting different fine-tuning data into the basic major model, and the different fine-tuning data are various books and documents in history corresponding to different chapters. Among them, the first draft chapter corresponds to the text content corresponding to the entry in other embodiments.

[0237] In some embodiments, since models trained for different chapters are used, these large models can be used to generate the precise content of the corresponding chapters.

[0238] In step S605, the chapters of the first draft are merged according to the order of the chapters to form a first draft of the document.

[0239] In some embodiments, the chapters of the first draft are merged according to the order of the chapters in the manuscript chapter directory to obtain the first draft of the manuscript, wherein the chapters correspond to the items in other embodiments, and the first draft of the manuscript corresponds to the third text in other embodiments.

[0240] In step S606, the first draft of the manuscript is reviewed and proofread by a three-review and three-proofreading robot to obtain revision suggestions.

[0241] In some embodiments, the three-review and three-proofreading robot refers to a set of robots, that is, a robot collection, which includes 6 small robots, namely, the initial review robot, the review robot, the final review robot, the proofreading robot 1, the proofreading robot 2, and the proofreading robot 3. Each robot reviews the manuscript itself and the review results of the previous robot, that is, a manuscript flows into different review robots in turn. Each robot outputs the robot's comments on the manuscript, correction marks, etc. Among them, the correction opinions correspond to the revision information in other embodiments.

[0242] In some embodiments, the initial review robot is mainly responsible for the review of the first-level chapters; the review robot is mainly responsible for the review of the second and third-level chapters; the final review robot is mainly responsible for the review of the lower-level chapters; the proofreading robot 1 is mainly responsible for the format review; the proofreading robot 2 is mainly responsible for the review of typos; and the proofreading robot 3 is mainly responsible for the review of image quality. For the above 6 robots, the first robot proposes modification suggestions based on the original manuscript, and the next robot proposes new modification suggestions based on the original manuscript, and judges the modification suggestions of the previous robot. If the modification suggestions of the previous robot are judged to be correct, the manuscript can be modified accordingly based on the modification suggestions of the previous robot. Among them, the modification suggestions have a certain format. For example, the text order adjustment [0,3,change] represents the order adjustment of the first word and the fourth word.

[0243] In step S607, the basic large model output document is re-drafted.

[0244] In some embodiments, the basic large model amends the first draft of the manuscript based on the revision opinions in the above step S606 to obtain a second draft of the manuscript, wherein the second draft of the manuscript refers to the manuscript after the first draft of the manuscript is proofread in terms of content and form.

[0245] In step S608, the three-review and three-proofreading robot is used to review and proofread the manuscript again in sequence.

[0246] In some embodiments, the implementation process of step S608 is similar to the implementation process of the above step S606, and therefore, the implementation process of step S608 may refer to the implementation process of the above step S606.

[0247] In step S609, the proofread document obtained by re-proofreading is input into the scoring system to obtain a score.

[0248] In some embodiments, the input of the scoring system is the review manuscript, and the output of the scoring system is the score of the review manuscript. The scoring system is a multi-layer and multi-dimensional scoring system model, which may include n sub-models, each responsible for the score of the manuscript in different dimensions or different perspectives, and finally weighting the multiple scoring scores according to the pre-set weights of different dimensions and different perspectives.

[0249] Here, m scoring dimensions can be pre-set as the scoring dimension selection range. For example, the scoring dimensions can be the manuscript book name, manuscript directory, content, comparison with existing literature, etc. The weights of different scoring dimensions are also set. For example, the weight of the manuscript book name is 0.1.

[0250] In some embodiments, the scoring process includes: inputting the review document into the scoring system, the scoring system calls the content extraction model, the content extraction model extracts the document name and document directory, taking the document directory as an example, inputting the document directory into the directory evaluation sub-model, the directory evaluation sub-model outputs the directory score and the directory comparison score, the score of the document name is similar to the score of the document directory; when scoring the content of each paragraph of text, the document book name and text directory will be spliced ​​into the text content, and the pre-trained language model will be input to obtain the sentence vector encoding of the book name and the sentence vector encoding of the text directory; for the document scores of different dimensions and different perspectives, finally the document scores are weighted according to the pre-set weights of different dimensions and different perspectives to obtain the score of the review document.

[0251] In some embodiments, the scoring system can be considered as a classification model, and the scoring system can be obtained through training. The training process includes: first loading a pre-trained language model; then inputting the example annotated data into the pre-trained language model, and setting the task type to classification; finally obtaining a trained model, that is, obtaining the above-mentioned scoring system. For example, the proofreading manuscript is: the content of the entire book, the label is: 100, the meaning of the label is full score, and the value range of the label is [0,100]).

[0252] During the training process, the scoring system will also be optimized internally, including text shortening, multi-dimensional scoring, and concatenating scores of each dimension. Regarding text shortening technology, since the text length specified during the pre-trained language model training is generally 512, and the text length of the entire book is much longer than 512, it is necessary to optimize text shortening, including first performing a sequence check on the entire text; then generating a summary of the entire text, thereby shortening the text. Regarding multi-dimensional scoring, the text itself does not need to be evaluated manually, but the evaluation of each dimension of the book is obtained through major reading websites, book review websites, etc. Regarding the concatenation of scores of each dimension, the evaluation of each dimension is concatenated at the end of the text as the input of the scoring system.

[0253] In step S610, it is determined whether the score is higher than a threshold.

[0254] In some embodiments, the threshold corresponds to the score threshold in other embodiments. If the score is higher than the threshold, it indicates that the reviewed document meets the publishing conditions, and then the process goes to step S611; if the score is less than or equal to the threshold, it indicates that the reviewed document does not meet the publishing conditions, and then the process goes to step S612.

[0255] In step S611, the proofread manuscript is finalized and published on the Humankind platform, and the process ends.

[0256] In some embodiments, when the proofread manuscript meets the publishing conditions, the proofread manuscript is determined as the final draft and the final draft is published on the global platform. The final draft corresponds to the fifth text in other embodiments.

[0257] In step S612, the proofreading manuscript is cyclically proofread again until the score reaches a threshold.

[0258] In some embodiments, when the proofread manuscript does not meet the publishing conditions, the proofread manuscript is edited again, that is, the above steps S606 to S608 are performed again.

[0259] In some embodiments, the embodiments of the present application can not only realize the writing of human civilization through big model technology, but also review and annotate existing human civilization documents based on big model technology to obtain reviewed documents for valuable reference.

[0260] In some embodiments, on the one hand, voice data and video data can be integrated, and finally a human civilization manuscript can be compiled based on text data, voice data and video data, thereby improving the comprehensiveness of human civilization manuscripts. On the other hand, human civilization manuscripts containing both spoken and written forms can be generated, thereby improving the diversity of manuscripts.

[0261] Through the above steps S601 to S612, by integrating the big model technology into the human civilization writing scenario, the automation of manuscript catalog generation and organization of writing is achieved; by modifying a multi-task fusion learning paradigm, an automated three-review and three-proofreading process is formed.

[0262] It can be understood that in the embodiments of the present application, data related to the first text, the first reference formatting format, the first reference text, etc. are involved, and the collection, use and processing of the relevant data need to comply with relevant laws, regulations and standards.

[0263] The following is a description of an exemplary structure of a text processing device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the text processing device 455 of the memory 450 may include:

[0264] The first generation module 4551 is used to generate a chapter list of the first text based on the semantic information of each sentence in the first text, and the chapter list includes multiple entries; the second generation module 4552 is used to generate text content corresponding to each entry based on the first text to obtain multiple text contents; the third generation module 4553 is used to generate a second text based on the chapter list, the multiple text contents, and the correspondence between the multiple entries and the multiple text contents; the first determination module 4554 is used to determine the layout format of each entry to obtain a text layout format; the layout module 4555 is used to layout the second text based on the text layout format to obtain a third text.

[0265] In some embodiments, the first determination module 4554 is further used to: determine the layout format of the entry based on the entry level of the entry and a first reference layout format corresponding to the text theme of the first text; or, determine the layout format of the entry based on the entry level and a second reference layout format corresponding to the first reference text; or, determine the layout format of the entry based on the entry level and a preset layout format.

[0266] In some embodiments, the software module stored in the text processing device 455 of the memory 450 also includes: a first proofreading module, which is used to proofread the text content corresponding to each of the entries based on the entry level of each of the entries to obtain a fourth text; and a second proofreading module, which is used to perform format proofreading on the fourth text to obtain a fifth text.

[0267] In some embodiments, the first proofreading module is further used to: determine the entry level of the entry; verify the text content corresponding to the entry using the verification rules corresponding to the entry level of the entry to obtain first proofreading content; when it is determined that the first proofreading content meets the proofreading condition based on the first proofreading content and the text content corresponding to the entry, determine the first proofreading content as the second proofreading content corresponding to the entry; when it is determined that the first proofreading content does not meet the proofreading condition based on the first proofreading content and the text content corresponding to the entry, determine the text content corresponding to the entry as the second proofreading content corresponding to the entry.

[0268] In some embodiments, the software modules stored in the text processing device 455 of the memory 450 also include: a second determination module, used to determine the content score of the fifth text; a first acquisition module, used to obtain the number of updates for the fifth text when the content score is less than the score threshold; a first update module, used to perform content proofreading and format proofreading on the fifth text when the number of updates is less than the number threshold, to obtain an updated fifth text; a second update module, used to re-process the first text when the number of updates is greater than or equal to the number threshold, to obtain the updated fifth text.

[0269] In some embodiments, the first generation module 4551 is also used to: input the semantic information into the first model for processing to obtain a candidate chapter list of the first text; perform a coherence test on the candidate chapter list to obtain a test result; if the test result is coherent, determine the candidate chapter list as the chapter list; if the test result is incoherent, adjust the candidate chapter list according to a preset adjustment strategy.

[0270] In some embodiments, the second generation module 4552 is also used to: obtain a second model corresponding to the entry; obtain an associated sentence corresponding to the entry from the first text, wherein the entry is generated based on the semantic information of the associated sentence; and input the associated sentence into the second model for processing to obtain the text content corresponding to the entry.

[0271] The embodiment of the present application provides a computer program product, which includes computer executable instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer executable instructions from the computer-readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the text processing method described in the embodiment of the present application.

[0272] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the text processing method provided by the present application embodiment, for example, Figure 3 , Figure 5 and Figure 6 The text processing method shown.

[0273] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0274] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0275] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0276] By way of example, computer executable instructions may be deployed to be executed on one computer device or on multiple computer devices located at one site or on multiple computer devices distributed across multiple sites and interconnected by a communication network.

[0277] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A text processing method, characterized in that: The method comprises: Based on the semantic information of each sentence in the first text, generating a chapter list of the first text, the chapter list including a plurality of entries; Generate text content corresponding to each of the entries based on the first text to obtain multiple text contents; Generate a second text based on the catalog, the multiple text contents, and the correspondence between the multiple entries and the multiple text contents; Determine the formatting of each entry to obtain a text formatting; The second text is formatted based on the text formatting to obtain a third text.

2. The method according to claim 1, characterized in that For each of the entries, determining the format of the entry includes: Determining a layout format of the entry based on an entry level of the entry and a first reference layout format corresponding to a text theme of the first text; Alternatively, determining the arrangement format of the entry based on the entry level and a second reference arrangement format corresponding to the first reference text; Alternatively, the arrangement format of the entry is determined based on the entry level and a preset arrangement format.

3. The method according to claim 1, characterized in that After obtaining the third text, the method further includes: Based on the entry level of each of the entries, proofread the text content corresponding to each of the entries to obtain a fourth text; The fourth text is formatted and proofread to obtain a fifth text.

4. The method according to claim 3, characterized in that For each of the entries, proofread the text content corresponding to the entry, including: determining an entry level of the entry; Verifying the text content corresponding to the entry using the verification rule corresponding to the entry level of the entry to obtain first proofreading content; If it is determined that the first proofreading content meets a proofreading condition based on the first proofreading content and the text content corresponding to the entry, the first proofreading content is determined as the second proofreading content corresponding to the entry; When it is determined that the first proofreading content does not satisfy the proofreading condition based on the first proofreading content and the text content corresponding to the entry, the text content corresponding to the entry is determined as the second proofreading content corresponding to the entry.

5. The method according to claim 3, characterized in that: After obtaining the fifth text, the method further includes: determining a content score of the fifth text; When the content score is less than the score threshold, obtaining the number of updates for the fifth text; When the update number is less than the number threshold, performing content proofreading and format proofreading on the fifth text to obtain an updated fifth text; When the update times are greater than or equal to the times threshold, the first text is re-processed to obtain the updated fifth text.

6. The method according to any one of claims 1 to 5, characterized in that: The step of generating a table of contents of the first text based on the semantic information of each sentence in the first text includes: Inputting the semantic information into a first model for processing to obtain a candidate chapter list of the first text; Performing a coherence test on the candidate chapter directory to obtain a test result; When the detection result is coherent, determining the candidate chapter directory as the chapter directory; When the detection result is incoherent, the candidate chapter directory is adjusted according to a preset adjustment strategy.

7. The method according to any one of claims 1 to 5, characterized in that: For each entry, generating text content corresponding to the entry based on the first text includes: Obtaining a second model corresponding to the entry; Acquire a related sentence corresponding to the entry from the first text, wherein the entry is generated based on semantic information of the related sentence; The associated sentence is input into the second model for processing to obtain text content corresponding to the entry.

8. A text processing device, characterized in that: The device comprises: A first generating module, configured to generate a chapter list of the first text based on semantic information of each sentence in the first text, wherein the chapter list includes a plurality of entries; A second generating module, configured to generate text content corresponding to each of the items based on the first text, to obtain a plurality of text contents; A third generating module, configured to generate a second text based on the catalog, the plurality of text contents, and the correspondence between the plurality of entries and the plurality of text contents; A first determination module is used to determine the layout format of each of the entries to obtain a text layout format; The layout module is used to layout the second text based on the text layout format to obtain a third text.

9. A computer device, characterized in that: The computer device comprises: A memory for storing computer executable instructions; A processor, configured to implement the text processing method according to any one of claims 1 to 7 when executing the computer executable instructions stored in the memory.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the text processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Text readability analysis method and system based on NLP processing and electronic equipment

    CN120805849A

  • Text readability analysis methods, systems, and electronic devices based on NLP processing

    CN120805849B