Text processing method and related equipment

By identifying sentences with poor readability in the text processing method and applying optimized logic and model processing, the reading difficulty problem caused by differences in knowledge levels of different users is solved, and the readability of the text and user experience are improved.

CN120633607APending Publication Date: 2025-09-12CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511078111.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively solve the problems of text reading comprehension difficulties, information overload or insufficiency caused by differences in knowledge levels among different users.

Method used

By responding to text optimization instructions, sentences with low readability values ​​in the initial text are identified, processed using preset optimization logic and sentence optimization models, replaced with target sentences, and the target text is generated.

Benefits of technology

It improves the readability of the text, enhances the user's reading experience and information acquisition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633607A_ABST
    Figure CN120633607A_ABST
Patent Text Reader

Abstract

The invention discloses a text processing method and related equipment, and relates to the technical field of data processing, and the method comprises the steps: responding to a text optimization instruction, determining a to-be-optimized initial statement in an initial text, determining an optimization logic corresponding to the initial statement when a readability value corresponding to the initial statement is smaller than a preset readability threshold value, and based on the optimization logic, using a preset statement optimization model to optimize the initial statement to obtain a target statement, and replacing the initial statement with the target statement to obtain a target text. According to the method, the preset readability threshold value is set based on the knowledge level of the user, and the statement with poor readability in the text is replaced with the statement with good readability based on the preset readability threshold value, so that the readability of the whole 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 data processing technology, and in particular to a text processing method and related equipment. Background Art

[0002] In today's information age, text reading has become one of the primary ways people acquire knowledge and information. However, traditional text reading methods have significant flaws. Due to individual knowledge levels and backgrounds, the readability of different texts varies significantly for different users. This often leads to problems such as difficulty understanding and information overload or insufficiency during reading, seriously impacting the user's reading experience and information acquisition efficiency. Existing technologies have not yet effectively addressed this issue, and a solution that can dynamically adjust text readability based on different user knowledge levels is urgently needed.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a text processing method and related equipment, aiming to solve the technical problem of how to dynamically adjust the readability of text according to the different knowledge levels of users.

[0005] To achieve the above objectives, the present application proposes a text processing method, which includes:

[0006] In response to the text optimization instruction, determining an initial sentence to be optimized in the initial text, wherein a readability value corresponding to the initial sentence is less than a preset readability threshold;

[0007] Determining optimization logic corresponding to the initial statement;

[0008] Based on the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement;

[0009] The initial sentence is replaced by the target sentence to obtain a target text.

[0010] In one embodiment, the step of determining the initial sentence to be optimized in the initial text in response to the text optimization instruction further includes:

[0011] Parsing the initial text to determine a first knowledge level corresponding to each text segment;

[0012] Obtaining a user profile of a target user to determine a second knowledge level corresponding to the target user;

[0013] evaluating a first readability value of each text segment based on the first knowledge level and the second knowledge level;

[0014] Based on a preset readability threshold and the first readability value, an initial sentence to be optimized in the initial text is determined.

[0015] In one embodiment, the step of obtaining a user profile of the target user to determine the second knowledge level corresponding to the target user further includes:

[0016] Obtain basic information, behavioral data, and capability performance data of target users;

[0017] Based on the basic information, behavioral data, and capability performance data, knowledge tags are constructed to generate user profiles;

[0018] Calculating the knowledge value of the target user based on the knowledge level mapping rule and the user portrait;

[0019] Based on the knowledge value and a preset knowledge level table, a second knowledge level corresponding to the target user is determined.

[0020] In one embodiment, the step of determining the optimization logic corresponding to the initial statement further includes:

[0021] Determine the third knowledge level before optimization and the fourth knowledge level after optimization corresponding to each optimization logic in the preset optimization logic database;

[0022] Search the preset optimization logic database for a target logic that meets the optimization conditions, and set the target logic as the optimization logic, wherein the optimization conditions are that the third knowledge level is equal to the first knowledge level, and the second readability values ​​corresponding to the fourth knowledge level and the second knowledge level are less than or equal to a preset readability threshold.

[0023] In one embodiment, the step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement further includes:

[0024] determining the target semantics of the initial sentence;

[0025] Based on the target semantics and the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement, wherein the semantics corresponding to the target statement are consistent with the target semantics.

[0026] In one embodiment, before the step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement, the step further includes:

[0027] Obtaining a sample statement and a sample optimization logic, wherein the sample statement is optimized based on the sample optimization logic and a first optimization result;

[0028] Based on the sample optimization logic, the sample statement is optimized using the current statement optimization model to obtain a second optimization result;

[0029] Determining whether the first optimization result is consistent with the second optimization result;

[0030] If they are inconsistent, adjust the parameters of the current statement optimization model, and based on the parameters of the current statement optimization model after the adjustment, return to the step of optimizing the sample statement based on the sample optimization logic using the current statement optimization model to obtain a second optimization result, until the first optimization result is consistent with the second optimization result, and obtain the preset statement optimization model.

[0031] In one embodiment, the step of replacing the initial sentence with the target sentence to obtain the target text further includes:

[0032] Get the text format and font size corresponding to the initial statement of the location;

[0033] Adjusting the target sentence based on the text format and the character size to obtain an adjusted target sentence;

[0034] The initial sentence is replaced with the adjusted target sentence to obtain a target text.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a text processing device, which includes:

[0036] a response module, the response module being configured to determine, in response to the text optimization instruction, an initial sentence to be optimized in the initial text, wherein the readability value corresponding to the initial sentence is less than a preset readability threshold;

[0037] A determination module, configured to determine an optimization logic corresponding to the initial statement;

[0038] An optimization module, configured to optimize the initial statement based on the optimization logic using a preset statement optimization model to obtain a target statement;

[0039] A replacement module is used to replace the initial sentence with the target sentence to obtain a target text.

[0040] In one embodiment, the response module further includes:

[0041] a parsing unit, configured to parse the initial text and determine a first knowledge level corresponding to each text segment;

[0042] A first acquiring unit is configured to acquire a user profile of a target user to determine a second knowledge level corresponding to the target user;

[0043] an evaluation unit, configured to evaluate a first readability value of each text segment based on the first knowledge level and the second knowledge level;

[0044] The first determining unit is configured to determine an initial sentence to be optimized in the initial text based on a preset readability threshold and the first readability value.

[0045] In one embodiment, the response module further includes:

[0046] The second acquisition unit is used to obtain the basic information, behavior data, and ability performance data of the target user;

[0047] A construction unit, configured to construct a knowledge tag based on the basic information, behavior data, and capability performance data to generate a user profile;

[0048] a calculation unit, configured to calculate the knowledge value of the target user based on the knowledge level mapping rule and the user portrait;

[0049] The second determining unit is configured to determine a second knowledge level corresponding to the target user based on the knowledge value and a preset knowledge level table.

[0050] In one embodiment, the determining module further includes:

[0051] A third determining unit is configured to determine a third knowledge level before optimization and a fourth knowledge level after optimization corresponding to each optimization logic in a preset optimization logic database;

[0052] A search unit is used to search for a target logic that meets the optimization conditions in the preset optimization logic database, and set the target logic as the optimization logic. The optimization conditions are that the third knowledge level is equal to the first knowledge level, and the second readability value corresponding to the fourth knowledge level and the second knowledge level is less than or equal to a preset readability threshold.

[0053] In one embodiment, the optimization module further includes:

[0054] a fourth determining unit, configured to determine target semantics of the initial sentence;

[0055] The first optimization unit is used to optimize the initial statement based on the target semantics and the optimization logic using a preset statement optimization model to obtain a target statement, wherein the semantics corresponding to the target statement are consistent with the target semantics.

[0056] In one embodiment, the text processing apparatus further includes a model training module, and the model training module further includes:

[0057] A third acquiring unit is configured to acquire a sample statement and a sample optimization logic, wherein the sample statement is optimized based on the sample optimization logic and a first optimization result;

[0058] A second optimization unit is configured to optimize the sample statement using a current statement optimization model based on the sample optimization logic to obtain a second optimization result;

[0059] a judging unit, configured to judge whether the first optimization result is consistent with the second optimization result;

[0060] An iterative training unit is used to adjust the parameters of the current statement optimization model if there is any inconsistency, and based on the parameters of the current statement optimization model after the adjustment, return to the step of optimizing the sample statement based on the sample optimization logic using the current statement optimization model to obtain a second optimization result, until the first optimization result is consistent with the second optimization result, and a preset statement optimization model is obtained.

[0061] In one embodiment, the replacement module further includes:

[0062] A fourth acquiring unit, configured to acquire the text format and text size corresponding to the initial sentence of the location;

[0063] an adjusting unit, configured to adjust the target sentence based on the text format and the character size to obtain an adjusted target sentence;

[0064] The replacement unit is used to replace the initial sentence with the adjusted target sentence to obtain a target text.

[0065] In addition, to achieve the above-mentioned purpose, the present application also proposes a text processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the text processing method described above.

[0066] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the text processing method described above are implemented.

[0067] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the text processing method described above are implemented.

[0068] One or more technical solutions proposed in this application have at least the following technical effects:

[0069] The present application proposes a text processing method and related equipment, which relate to the field of data processing and related technologies. Due to the different knowledge levels and backgrounds of each person, the readability of different texts for different users varies greatly. This causes users to often encounter problems such as difficulty in understanding, information overload or insufficiency during the reading process, which seriously affects the user's reading experience and information acquisition efficiency. In the present application, first, in response to a text optimization instruction, the initial sentence to be optimized in the initial text is determined, and the readability value corresponding to the initial sentence is less than a preset readability threshold. Then, the optimization logic corresponding to the initial sentence is determined. Further, based on the optimization logic, the initial sentence is optimized using a preset sentence optimization model to obtain a target sentence. Finally, the initial sentence is replaced with the target sentence to obtain a target text.

[0070] It is understandable that the present application sets a preset readability threshold based on the user's knowledge level, and replaces sentences with poor readability in the text with sentences with better readability based on the preset readability threshold, thereby improving the readability of the entire text. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0073] Figure 1 A flowchart of the first embodiment of the text processing method of this application is provided;

[0074] Figure 2 A flowchart of the second embodiment of the text processing method of this application is provided;

[0075] Figure 3 A flowchart of the third embodiment of the text processing method of this application is provided;

[0076] Figure 4 This is a schematic diagram of the module structure of the text processing device according to an embodiment of the present application;

[0077] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the text processing method in the embodiment of the present application.

[0078] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0079] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0080] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0081] The main solutions of the embodiments of this application are:

[0082] In this embodiment, for ease of description, the text processing device is used as the execution subject for explanation below.

[0083] Due to existing technologies: In today's information age, text reading has become one of the main ways for people to acquire knowledge and information. However, traditional text reading methods have significant flaws. Due to different knowledge levels and backgrounds, the readability of different texts varies greatly for different users. This leads to users often encountering problems such as difficulty in understanding, information overload or insufficient information during the reading process, seriously affecting their reading experience and information acquisition efficiency. Existing technologies have not yet effectively solved this problem, and there is an urgent need for a solution that can dynamically adjust text readability based on different user knowledge levels.

[0084] The present application provides a solution, which includes: first, in response to a text optimization instruction, determining an initial sentence to be optimized in an initial text, wherein the readability value corresponding to the initial sentence is less than a preset readability threshold; then, determining the optimization logic corresponding to the initial sentence; further, based on the optimization logic, optimizing the initial sentence using a preset sentence optimization model to obtain a target sentence; and finally, replacing the initial sentence with the target sentence to obtain a target text.

[0085] It is understandable that the present application sets a preset readability threshold based on the user's knowledge level, and replaces sentences with poor readability in the text with sentences with better readability based on the preset readability threshold, thereby improving the readability of the entire text.

[0086] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device or text processing device capable of implementing the above functions. This embodiment and the following embodiments will be described below using a text processing device as an example.

[0087] Based on this, the present application embodiment provides a text processing method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the text processing method of this application.

[0088] In this embodiment, the text processing method includes steps S100 to S400:

[0089] Step S100, in response to the text optimization instruction, determining an initial sentence to be optimized in the initial text, wherein the readability value corresponding to the initial sentence is less than a preset readability threshold;

[0090] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device or text processing device capable of implementing the above functions. This embodiment and the following embodiments will be described below using a text processing device as an example.

[0091] It should be noted that the initial sentence is the sentence in the original text that needs to be optimized. It may have some problems in readability, clarity of expression, logical coherence, etc., and needs to be improved through optimization.

[0092] When the system receives instructions to optimize text, it triggers a series of subsequent operations. This instruction can be initiated by the user, such as clicking a "text optimization" button in a text editing software, or on some intelligent text processing platforms, the system automatically issues the instruction based on a preset optimization strategy to improve and enhance the existing text content.

[0093] After receiving the optimization instructions, the team must accurately select the sentences that need to be optimized from the initial text to be processed. This is like sorting out the sentences that are unclear or lack fluency from a pile of text, preparing for subsequent targeted optimization.

[0094] It's important to note that readability reflects text quality from multiple perspectives, including the clarity of the text, the clarity and conciseness of sentence structure, and ease of understanding. The "preset readability threshold" is a pre-set standard used to determine whether a sentence meets the readability standard.

[0095] It is understandable that when the text processing device evaluates the readability of sentences in the initial text and finds that the readability value of one or more sentences is lower than the pre-set threshold, it is considered that there are problems with these sentences and they need to be optimized to improve the quality of the entire text, make it more in line with readability requirements, and facilitate readers to read and understand.

[0096] Step S200, determining the optimization logic corresponding to the initial statement;

[0097] It should be noted that optimization logic is a set of rules, methods or ideas used to improve the quality of sentences, aiming to solve problems existing in the initial sentences, such as poor readability, unclear meaning, incoherent logic, and lack of conciseness.

[0098] The process of determining the optimization logic includes the following steps:

[0099] First, analyze the problems with the initial sentence (first find out the defects of the initial sentence, such as complex sentence structure that makes it difficult to understand, or inappropriate word choice that makes the meaning vague, etc.), further, select a suitable optimization strategy (select the appropriate optimization method for the problem. For example, when facing the problem of lengthy sentences, you can use the strategy of streamlining sentence components and removing redundant information to optimize), then formulate optimization rules and steps (after selecting the optimization strategy, formulate specific optimization rules and operation steps in detail, such as splitting long sentences into short sentences, or replacing uncommon words with more easy-to-understand words, etc.), finally, implement the optimization and verify the effect (optimize the initial sentence according to the determined optimization logic, and after completion, evaluate whether the optimized sentence achieves the expected effect, such as whether the readability is improved, whether the meaning is clearer, etc., and adjust and improve the optimization logic if necessary).

[0100] For example, the initial sentence is "This thing happened because that thing caused the situation." Analysis reveals that the problem lies in the wordiness and repetitiveness of the sentence structure. The corresponding optimization logic could be to remove redundant expressions and streamline the sentence to "This thing was caused by that thing."

[0101] Specifically, the step of determining the optimization logic corresponding to the initial statement further includes steps S210 to S220:

[0102] Step S210, determining the third knowledge level before optimization and the fourth knowledge level after optimization corresponding to each optimization logic in the preset optimization logic database;

[0103] It can be understood that by determining the previous and next knowledge levels corresponding to each optimization logic, it is possible to clearly understand the transformation and improvement achieved by each optimization logic at the knowledge level, providing a basis for subsequent screening of appropriate optimization logic.

[0104] Step S220, search the preset optimization logic database for the target logic that meets the optimization conditions, and set the target logic as the optimization logic, wherein the optimization conditions are that the third knowledge level is equal to the first knowledge level, and the second readability value corresponding to the fourth knowledge level and the second knowledge level is less than or equal to the preset readability threshold.

[0105] It can be understood that by finding the target logic that meets the above optimization conditions, it can be ensured that the selected optimization logic can not only optimize the current knowledge level of the initial sentence, but also make the optimized text meet the requirements in terms of readability and meet the established readability standards, thereby achieving a comprehensive improvement in the text in knowledge expression and readability.

[0106] Step S300: Based on the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement.

[0107] It should be noted that the target sentence is the new sentence obtained after optimization. It retains the core semantics of the original sentence while adjusting the grammar, vocabulary, structure, etc. to make the sentence clearer, more concise, and easier to read, while also meeting the requirements of the optimization logic.

[0108] It's important to note that the preset statement optimization model is a pre-built model used to optimize statements. It's a system based on artificial intelligence algorithms (such as machine learning and natural language processing) that automatically analyzes, adjusts, and improves statements based on input and specified optimization logic. This model has been specifically trained and designed to handle a variety of statement optimization tasks.

[0109] The initial statement is used as input, and specific optimization operations are performed using the preset statement optimization model according to the previously determined optimization logic. This process includes but is not limited to the following aspects:

[0110] Grammatical Adjustment: The optimization model modifies the grammatical structure of the initial sentence to make it more grammatically consistent and fluent. For example, this can be done by adjusting the order of sentence components or changing the sentence structure.

[0111] Vocabulary replacement: Based on the optimization logic, the model replaces some complex and uncommon words with simpler and more understandable words to improve the readability of sentences.

[0112] Semantic optimization: While maintaining the original meaning, improve the expression of the sentence to make it convey information more clearly and accurately, and avoid ambiguous and unclear expressions.

[0113] Logical review: If the initial statement has logical incoherence, the model will review and adjust it to make the statement's logic smoother and more consistent with the order of logical reasoning.

[0114] After the above optimization process, a new sentence, the target sentence, is finally obtained. This target sentence is the result of a series of improvements to the initial sentence while still meeting the optimization logic requirements. It significantly improves readability, clarity, and logical coherence compared to the initial sentence, better meeting the optimization goals and expectations, and can better meet user needs or achieve specific text quality standards.

[0115] For example, if the initial statement is "This thing is extremely good, incredibly good, and it's also extremely useful and incredibly useful," the optimization logic is to make the statement more concise and clear, avoiding repetition. The preset statement optimization model will optimize the initial statement based on this logic, potentially producing the target statement "This thing is extremely good and very useful." This target statement is more concise and clear, meeting the optimized criteria.

[0116] Specifically, the step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement further includes steps S310 to S320:

[0117] Step S310, determining the target semantics of the initial sentence;

[0118] In this example, the core meaning or main message of the initial sentence—that is, the precise content it intends to convey to the reader—is clearly defined. This is a critical step in the optimization process. Only by accurately grasping the target semantics of the initial sentence can the subsequent optimization process ensure that the optimized sentence does not deviate from the original meaning. Furthermore, appropriate optimization logic and methods can be selected based on this target semantics, ensuring that the optimized sentence better expresses this semantics.

[0119] Step S320 , based on the target semantics and the optimization logic, the initial sentence is optimized using a preset sentence optimization model to obtain a target sentence, wherein the semantics corresponding to the target sentence is consistent with the target semantics.

[0120] After determining the target semantics of the initial statement and the appropriate optimization logic, the pre-defined statement optimization model is used to perform specific optimization operations on the initial statement, ultimately resulting in a new statement, the target statement. By combining the target semantics and optimization logic, and leveraging the processing power of the optimization model, the initial statement is targeted and improved, making it more accurate, clear, and fluent in expression, while ensuring that the optimized statement accurately conveys the target semantics of the initial statement.

[0121] It's understood that the optimized target statement must maintain semantic consistency with the original statement. That is, while the form of the statement may change, the core meaning or main message it conveys remains the same. This is a crucial requirement for optimization results, ensuring that the optimization process isn't simply a modification of the statement, but rather an improvement without altering the original meaning. This ensures that the optimized statement accurately reflects the intended message of the original statement, avoiding semantic deviations or misunderstandings caused by optimization.

[0122] For example, assuming the initial sentence is "This phone has a large screen and a long battery life, so it is very suitable for long-term use", step S310 determines that its target semantics is "emphasizing the two characteristics of the phone's large screen and long battery life, thereby indicating that it is suitable for long-term use."

[0123] Furthermore, based on this target semantics and the determined optimization logic (for example, to make the statement more concise and clear), the preset sentence optimization model is used to optimize the initial sentence. This might result in the target sentence "This phone has a large screen and long battery life, making it suitable for long-term use." This target sentence is semantically consistent with the target semantics of the initial sentence, both emphasizing the phone's screen and battery life, as well as the conclusion that it is suitable for long-term use, but is more concise and clear, meeting the optimization requirements.

[0124] Step S400: Replace the initial sentence with the target sentence to obtain a target text.

[0125] In this embodiment, the problem sentences in the original text are replaced by improved sentences through the replacement operation, thereby improving the quality of the entire text. This new text version, i.e., the target text, should be better than the original text in terms of readability, expression accuracy, logical coherence, etc.

[0126] For example, assuming the original text is "This phone has a large screen and its battery life is also very long, so it is very suitable for long-term use, but its price is a bit high", then the initial sentence is "This phone has a large screen and its battery life is also very long, so it is very suitable for long-term use", and further, the target sentence is "This phone has a large screen and long battery life, and is suitable for long-term use".

[0127] Target text after replacement: This phone has a large screen and long battery life, making it suitable for long-term use. However, its price is a bit high.

[0128] In this example, after the initial sentence is replaced by the target sentence, the entire text becomes more concise and clear while retaining the original semantics. This is the target text.

[0129] Specifically, the step of replacing the initial sentence with the target sentence to obtain the target text further includes steps S410 to S430:

[0130] Step S410, obtaining the text format and font size corresponding to the initial sentence of the location;

[0131] In this embodiment, the format and text size of the initial sentence in the original text are first determined. The text format may include font type (e.g., Songti, Heiti, etc.), font size (e.g., 4-point, 5-point), font style (e.g., bold, italic, etc.), alignment (e.g., left-aligned, center-aligned, etc.), and line spacing. The text size refers to a specific font size, such as 12-point, 14-point, etc.

[0132] It is understandable that the purpose of obtaining this information is to ensure that the optimized target sentence is consistent with the original text in terms of format and text size in subsequent steps, to ensure the visual consistency and coordination of the entire text, and to avoid affecting the reading experience due to differences in format and size.

[0133] Step S420: adjusting the target sentence based on the text format and the character size to obtain an adjusted target sentence;

[0134] In this embodiment, the target sentence is adjusted accordingly based on the text format and font size information obtained in step S410. This includes adjusting the font type, font size, and font style of the target sentence to be the same as the original sentence, as well as adjusting line spacing and alignment, so that the target sentence matches the original sentence in terms of format and visual effect.

[0135] It can be understood that through this adjustment, it is ensured that after the target sentence replaces the initial sentence, the entire text remains unified and coordinated in format and vision, avoiding visual abruptness to readers due to inconsistent formatting, and improving the overall aesthetics and readability of the text.

[0136] Step S430: Replace the initial sentence with the adjusted target sentence to obtain a target text.

[0137] In this embodiment, the original sentence in the original text is replaced with the reformatted target sentence to generate the final target text. This replacement operation is the final step in the text optimization process. Its purpose is to integrate the optimized sentence back into the original text to form a new, more optimized text version.

[0138] It is understandable that the target text obtained is the final result of the entire optimization process. It is not only optimized in content (such as clearer semantics, more accurate expression, etc.), but also consistent with the original text in format and visual effects. It is a text version that is higher quality and more compliant in both content and form, and can be used for further editing, publication or use.

[0139] For example, suppose the original text is as follows:

[0140] "This phone has a large screen and long battery life, making it suitable for long-term use. However, its price is a bit high (the text format of the initial sentence is Songti, size 5, left-aligned, and the text size is size 5)."

[0141] The target sentence obtained after optimization is: "This phone has a large screen and long battery life, suitable for long-term use (the content has been optimized, but the format and text size may be different from the original text)."

[0142] After obtaining the text format and font size information of the initial sentence according to step S410, the target sentence is adjusted to Songti, size 5, left-aligned, and size 5 in step S420 to obtain the adjusted target sentence: "This mobile phone has a large screen and long battery life, suitable for long-term use (the format and font size are consistent with the original text)."

[0143] Finally, in step S430, the initial sentence is replaced with the adjusted target sentence to obtain the target text: "This phone has a large screen and long battery life, making it suitable for long-term use. However, its price is a bit high (the entire text has been optimized in content and format)."

[0144] The present application proposes a text processing method and related equipment, which relate to the field of data processing and related technologies. Due to the different knowledge levels and backgrounds of each person, the readability of different texts for different users varies greatly. This causes users to often encounter problems such as difficulty in understanding, information overload or insufficiency during the reading process, which seriously affects the user's reading experience and information acquisition efficiency. In the present application, first, in response to a text optimization instruction, the initial sentence to be optimized in the initial text is determined, and the readability value corresponding to the initial sentence is less than a preset readability threshold. Then, the optimization logic corresponding to the initial sentence is determined. Further, based on the optimization logic, the initial sentence is optimized using a preset sentence optimization model to obtain a target sentence. Finally, the initial sentence is replaced with the target sentence to obtain a target text.

[0145] It is understandable that the present application sets a preset readability threshold based on the user's knowledge level, and replaces sentences with poor readability in the text with sentences with better readability based on the preset readability threshold, thereby improving the readability of the entire text.

[0146] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 The step of determining the initial sentence to be optimized in the initial text in response to the text optimization instruction further includes steps S110 to S140:

[0147] Step S110, parsing the initial text to determine the first knowledge level corresponding to each text segment;

[0148] It's important to note that the initial text is analyzed and processed. This process typically involves natural language processing (NLP) techniques, including word segmentation, syntactic analysis, and semantic understanding. The goal is to break the text down into smaller units (such as sentences, phrases, or words) and extract useful information. Parsing allows for a better understanding of the text's structure and content, providing a foundation for subsequent processing and analysis.

[0149] A text segment is a segment of an original text that has been broken down into its parts. These segments can be sentences, paragraphs, or other meaningful units of text. For example, in an article, each paragraph or sentence can be considered a text segment.

[0150] The first level of knowledge is a measure of the knowledge level or complexity of a text segment. It may be determined based on a variety of factors, such as vocabulary difficulty, sentence structure complexity, and semantic depth. For example, a text segment containing specialized terminology and complex sentence structure may be assigned a higher level of knowledge, while a segment using simpler vocabulary and sentence structure may be assigned a lower level of knowledge.

[0151] It's understandable that determining the knowledge level of each text segment facilitates more detailed analysis and processing of the text. For example, during text optimization, appropriate optimization strategies can be selected based on the knowledge level. Higher-level segments might require more specialized explanations or simplification, while lower-level segments might need to remain concise and clear.

[0152] For example, suppose the initial text is an article about computer science, which contains two text fragments: "A computer is an electronic device that can automatically perform operations according to programs" and "In the field of quantum computing, quantum bits (qubits) are the basic units of quantum information. Unlike classical bits, they can be in multiple states at the same time."

[0153] By parsing these two text fragments, we can determine their knowledge levels. The first fragment uses relatively easy-to-understand vocabulary and simple sentence structures, and may be assigned a lower first knowledge level, such as Level 1. The second fragment covers the specialized field of quantum computing, uses technical terms such as "qubit" and "quantum information," and has relatively complex sentence structure, so it may be assigned a higher first knowledge level, such as Level 5.

[0154] After determining the knowledge level of each text segment, subsequent processing can be carried out based on these levels. For example, in the text optimization process, segments with higher knowledge levels can be explained more deeply or simplified to suit the knowledge levels of different readers.

[0155] Step S120: Obtain a user profile of the target user to determine a second knowledge level corresponding to the target user;

[0156] User profiling is a method for describing user characteristics in multiple dimensions. It collects and analyzes various user information (such as age, gender, education background, occupation, hobbies, and reading habits) to construct a virtual user model that reflects the user's characteristics and preferences. For example, a user profile might include information such as the user being a college student, having an interest in technology, and enjoying reading popular science articles.

[0157] It's understandable that obtaining a target user's profile is intended to gain a deeper understanding of their characteristics and needs, thereby providing a basis for subsequent personalized service or content recommendations. In this scenario, the profile can help us determine the target user's knowledge level and comprehension ability, so that we can provide content that is appropriate for their knowledge level.

[0158] The Second Knowledge Level (KL) is a metric that measures the target user's knowledge level or understanding ability. It's determined based on information in the user profile and reflects the target user's mastery and understanding of knowledge in a specific field. For example, a user with a high degree of education and extensive work experience might have a high KL, while a student or someone less familiar with a particular field might have a low KL.

[0159] It's understandable that determining the target user's second knowledge level helps provide content tailored to their knowledge level. For example, in a content recommendation system, articles or materials of varying difficulty levels can be recommended based on the user's second knowledge level. If the target user has a higher knowledge level, more specialized and in-depth content can be recommended; if the target user has a lower knowledge level, more accessible and basic content can be recommended.

[0160] For example, suppose the target user is a high school student. His user portrait includes the following information: age 17, male, educational background is high school, interested in physics, and likes to read popular science books and magazines.

[0161] Based on this user profile, we can determine the target user's second knowledge level. Since the target user is still a high school student and has some understanding of physics but may not yet possess in-depth expertise, we can assign the target user's second knowledge level to level 3 (assuming a knowledge level scale of 1 to 5, with 1 being the lowest and 5 being the highest). This means that when recommending physics-related content to this user, we should choose materials that are appropriate for a high school level, offer a certain level of depth, but are not overly complex. This approach will satisfy the target user's learning and interest needs, while also avoiding content that is too simple or too complex, potentially hindering their understanding and acceptance.

[0162] Specifically, the step of obtaining a user profile of a target user to determine the second knowledge level corresponding to the target user further includes steps S121 to S124:

[0163] Step S121, obtaining the target user's basic information, behavior data, and capability performance data;

[0164] It should be noted that basic information refers to the basic characteristics of the user, including age, gender, education, occupation, etc. This information helps to initially understand the basic background of the user.

[0165] It should be noted that behavioral data records user behavior patterns, such as browsing history on the website, types of articles read, products purchased, etc. These data reflect the user's interests and preferences.

[0166] It should be noted that performance data is used to evaluate users' performance in specific areas, such as test scores on the learning platform, efficiency in completing tasks, etc. This data provides users with their actual level of knowledge and skills.

[0167] Step S122: constructing knowledge tags based on the basic information, behavior data, and capability performance data to generate a user profile;

[0168] It should be noted that knowledge labeling refers to the classification and labeling of users' knowledge and skills based on various collected data. For example, if a user frequently reads scientific articles and performs well in related tests, they may be labeled as having "high scientific knowledge."

[0169] It should be noted that user profiling refers to the integration of these knowledge tags to form a comprehensive user model, which can reflect the user's knowledge level, interests, behavioral habits and other aspects.

[0170] Step S123, calculating the knowledge value of the target user based on the knowledge level mapping rule and the user portrait;

[0171] It should be noted that the knowledge level mapping rules are a set of predefined rules used to convert the knowledge labels in the user profile into specific knowledge values. For example, the rules may stipulate that the label "high scientific and technological knowledge" corresponds to a higher knowledge value.

[0172] It should be noted that knowledge value refers to the conversion of various labels in the user portrait into a numerical value by applying mapping rules. This numerical value reflects the user's comprehensive level of knowledge.

[0173] Step S124: determining a second knowledge level corresponding to the target user based on the knowledge value and a preset knowledge level table.

[0174] It should be noted that the preset knowledge level table is a predefined table that maps different knowledge value ranges to different knowledge levels. For example, a knowledge value between 0-20 may correspond to knowledge level 1, 21-40 to knowledge level 2, and so on.

[0175] In this embodiment, according to the knowledge value of the target user, the preset knowledge level table is searched to determine the knowledge level (second knowledge level) corresponding to the user. This level can be used for subsequent personalized services or content recommendations.

[0176] For example, let's say the target user is a 25-year-old male with a bachelor's degree in computer science who currently works at a tech company. His behavioral data shows that he frequently visits tech forums and reads articles about artificial intelligence and machine learning. In internal company skills tests, he performs well in these areas.

[0177] The basic information collected includes age 25, male, and a bachelor's degree in computer science; behavioral data includes frequent visits to technical forums and reading articles on artificial intelligence and machine learning; and ability performance data includes excellent performance in the company's skill test. Based on these data, knowledge labels are constructed, such as "high knowledge of computer science", "strong interest in artificial intelligence", "good machine learning skills", etc., to generate user portraits. Further, according to the knowledge level mapping rules, these labels are converted into knowledge values, assuming that the calculated knowledge value is 75. Referring to the preset knowledge level table, a knowledge value of 75 corresponds to a knowledge level of 4 (assuming the levels are from 1 to 5). Therefore, the second knowledge level of the target user is determined to be level 4.

[0178] Step S130 , evaluating a first readability value of each text segment based on the first knowledge level and the second knowledge level;

[0179] The first readability value is a metric that measures the readability or comprehensibility of a text segment for a specific user group. It takes into account the knowledge difficulty of the text segment (the first knowledge level) and the comprehension ability of the target user (the second knowledge level), reflecting whether the text segment is easy to understand for the target user.

[0180] By evaluating the first readability value, you can determine whether the text segment is suitable for the target user. If the first readability value is low, it means that the text segment may be difficult for the target user to understand and needs to be optimized or adjusted. If the first readability value is high, it means that the text segment is relatively easy for the target user to understand and does not require further optimization.

[0181] The evaluation process can be: comparing knowledge levels (comparing the first knowledge level of the text segment with the second knowledge level of the target user. If the first knowledge level is higher than the second knowledge level, it means that the knowledge difficulty of the text segment exceeds the knowledge level of the target user, which may result in lower readability; conversely, if the first knowledge level is lower than or equal to the second knowledge level, it means that the text segment is easier for the target user to understand and has higher readability), calculating readability value (calculating the first readability value of each text segment based on the comparison result of the knowledge level. This value can be a specific numerical value or a relative evaluation result, such as high, medium, or low. For example, a formula or algorithm can be used to combine the first knowledge level and the second knowledge level to calculate the first readability value).

[0182] Step S140 : determining an initial sentence to be optimized in the initial text based on a preset readability threshold and the first readability value.

[0183] In this embodiment, by comparing the first readability value of each text segment with a preset readability threshold, text segments with readability values ​​lower than the threshold are found. These segments are the initial sentences that need to be optimized.

[0184] It is understandable that, in this embodiment, sentences that are less readable for target users are screened out so that targeted optimization processing can be performed later, thereby improving the readability and comprehensibility of the entire text for target users.

[0185] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to above and will not be described in detail. Figure 3 Before the step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement, the method further includes steps A1 to A4:

[0186] Step A1: obtaining a sample statement and a sample optimization logic, wherein the sample statement is optimized based on the sample optimization logic to obtain a first optimization result;

[0187] In this embodiment, some sample statements and corresponding sample optimization logic are first obtained. At the same time, the results obtained after these sample statements are optimized according to the sample optimization logic are already known, and this result is called the first optimization result.

[0188] It should be noted that the sample statements and sample optimization logic are the foundational data used to train and adjust the current statement optimization model. The first optimization result serves as the optimization target and reference standard, used in subsequent steps to evaluate whether the optimization effect of the current statement optimization model meets expectations.

[0189] Step A2: Based on the sample optimization logic, the sample statement is optimized using the current statement optimization model to obtain a second optimization result;

[0190] In this embodiment, the current statement optimization model is used to optimize the sample statement according to the sample optimization logic to obtain a new optimization result, ie, the second optimization result.

[0191] It is understood that the optimization process is actually run through the current statement optimization model, and the results obtained will be used to compare with the first optimization results to evaluate the performance and accuracy of the current model.

[0192] Step A3, determining whether the first optimization result is consistent with the second optimization result;

[0193] In this embodiment, the first optimization result and the second optimization result are compared to determine whether they are the same or close enough.

[0194] It's understandable that this comparison process is a key step in evaluating whether the current statement optimization model can accurately optimize the sample statement according to the sample optimization logic. If the two results are consistent, it means the current model is able to perform the optimization task well; if not, the model needs to be adjusted.

[0195] Step A4: If there is inconsistency, adjust the parameters of the current statement optimization model, and based on the parameters of the current statement optimization model after the adjustment, return to the step of optimizing the sample statement based on the sample optimization logic using the current statement optimization model to obtain a second optimization result, until the first optimization result is consistent with the second optimization result, and obtain the preset statement optimization model.

[0196] It's understandable that if the first and second optimization results are inconsistent, the parameters of the current statement optimization model need to be adjusted. After adjusting the parameters, the adjusted model is used again to optimize the sample statement according to the sample optimization logic, resulting in a new second optimization result. This process is repeated until the first and second optimization results are consistent.

[0197] By continuously adjusting model parameters and reoptimizing, the performance of the current statement optimization model is gradually improved, enabling it to more accurately optimize according to the sample optimization logic. When the first and second optimization results are consistent, the current statement optimization model has achieved the preset optimization effect and is now the preset statement optimization model.

[0198] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the text processing method of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.

[0199] This application also provides a text processing device, please refer to Figure 4 , the text processing device includes:

[0200] A response module 10 is configured to determine, in response to the text optimization instruction, an initial sentence to be optimized in the initial text, wherein the readability value corresponding to the initial sentence is less than a preset readability threshold;

[0201] A determination module 20, configured to determine an optimization logic corresponding to the initial statement;

[0202] An optimization module 30 is configured to optimize the initial statement based on the optimization logic using a preset statement optimization model to obtain a target statement;

[0203] The replacement module 40 is used to replace the initial sentence with the target sentence to obtain a target text.

[0204] In one embodiment, the response module further includes:

[0205] a parsing unit, configured to parse the initial text and determine a first knowledge level corresponding to each text segment;

[0206] A first acquiring unit is configured to acquire a user profile of a target user to determine a second knowledge level corresponding to the target user;

[0207] an evaluation unit, configured to evaluate a first readability value of each text segment based on the first knowledge level and the second knowledge level;

[0208] The first determining unit is configured to determine an initial sentence to be optimized in the initial text based on a preset readability threshold and the first readability value.

[0209] In one embodiment, the response module further includes:

[0210] The second acquisition unit is used to obtain the basic information, behavior data, and ability performance data of the target user;

[0211] A construction unit, configured to construct a knowledge tag based on the basic information, behavior data, and capability performance data to generate a user profile;

[0212] a calculation unit, configured to calculate the knowledge value of the target user based on the knowledge level mapping rule and the user portrait;

[0213] The second determining unit is configured to determine a second knowledge level corresponding to the target user based on the knowledge value and a preset knowledge level table.

[0214] In one embodiment, the determining module further includes:

[0215] A third determining unit is configured to determine a third knowledge level before optimization and a fourth knowledge level after optimization corresponding to each optimization logic in a preset optimization logic database;

[0216] A search unit is used to search for a target logic that meets the optimization conditions in the preset optimization logic database, and set the target logic as the optimization logic. The optimization conditions are that the third knowledge level is equal to the first knowledge level, and the second readability value corresponding to the fourth knowledge level and the second knowledge level is less than or equal to a preset readability threshold.

[0217] In one embodiment, the optimization module further includes:

[0218] a fourth determining unit, configured to determine target semantics of the initial sentence;

[0219] The first optimization unit is used to optimize the initial statement based on the target semantics and the optimization logic using a preset statement optimization model to obtain a target statement, wherein the semantics corresponding to the target statement are consistent with the target semantics.

[0220] In one embodiment, the text processing apparatus further includes a model training module, and the model training module further includes:

[0221] A third acquiring unit is configured to acquire a sample statement and a sample optimization logic, wherein the sample statement is optimized based on the sample optimization logic and a first optimization result;

[0222] A second optimization unit is configured to optimize the sample statement using a current statement optimization model based on the sample optimization logic to obtain a second optimization result;

[0223] a judging unit, configured to judge whether the first optimization result is consistent with the second optimization result;

[0224] An iterative training unit is used to adjust the parameters of the current statement optimization model if there is any inconsistency, and based on the parameters of the current statement optimization model after the adjustment, return to the step of optimizing the sample statement based on the sample optimization logic using the current statement optimization model to obtain a second optimization result, until the first optimization result is consistent with the second optimization result, and a preset statement optimization model is obtained.

[0225] In one embodiment, the replacement module further includes:

[0226] A fourth acquiring unit, configured to acquire the text format and text size corresponding to the initial sentence of the location;

[0227] an adjusting unit, configured to adjust the target sentence based on the text format and the character size to obtain an adjusted target sentence;

[0228] The replacement unit is used to replace the initial sentence with the adjusted target sentence to obtain a target text.

[0229] The text processing device provided in this application utilizes the text processing method described in the above-mentioned embodiments to solve the technical problems of text processing. Compared to the prior art, the text processing device provided in this application has the same beneficial effects as the text processing method described in the above-mentioned embodiments. Other technical features of the text processing device are the same as those disclosed in the above-mentioned embodiments and are not further described here.

[0230] The present application provides a text processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the text processing method in the above-mentioned embodiment one.

[0231] Reference below Figure 5, which shows a schematic diagram of the structure of a text processing device suitable for implementing the embodiments of the present application. The text processing device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The text processing device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0232] like Figure 5 As shown, the text processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the text processing device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. Communication device 1009 can allow the text processing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a text processing device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.

[0233] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0234] The text processing device provided by this application utilizes the text processing method of the above-described embodiment to solve the technical problems. Compared with the prior art, the beneficial effects of the text processing device provided by this application are the same as those of the text processing method provided by the above-described embodiment. Other technical features of the text processing device are the same as those disclosed in the above-described embodiment and are not further described here.

[0235] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0236] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0237] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the text processing method in the above embodiment.

[0238] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0239] The computer-readable storage medium may be included in the text processing device, or may exist independently without being incorporated into the text processing device.

[0240] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a text processing device, the text processing device:

[0241] In response to the text optimization instruction, determining an initial sentence to be optimized in the initial text, wherein a readability value corresponding to the initial sentence is less than a preset readability threshold;

[0242] Determining optimization logic corresponding to the initial statement;

[0243] Based on the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement;

[0244] The initial sentence is replaced by the target sentence to obtain a target text.

[0245] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0246] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0247] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0248] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described text processing method, thereby solving the technical problem of text processing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the text processing method provided in the above-described embodiment, and are not further elaborated here.

[0249] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned text processing method when executed by a processor.

[0250] The computer program product provided in this application can solve the technical problem of text processing. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the text processing method provided in the above embodiment, which will not be repeated here.

[0251] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A text processing method, characterized in that: The text processing method comprises: In response to the text optimization instruction, determining an initial sentence to be optimized in the initial text, wherein a readability value corresponding to the initial sentence is less than a preset readability threshold; Determining optimization logic corresponding to the initial statement; Based on the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement; The initial sentence is replaced by the target sentence to obtain a target text.

2. The text processing method according to claim 1, wherein: The step of determining the initial statement to be optimized in the initial text in response to the text optimization instruction further includes: Parsing the initial text to determine a first knowledge level corresponding to each text segment; Obtaining a user profile of a target user to determine a second knowledge level corresponding to the target user; evaluating a first readability value of each text segment based on the first knowledge level and the second knowledge level; Based on a preset readability threshold and the first readability value, an initial sentence to be optimized in the initial text is determined.

3. The text processing method according to claim 2, wherein: The step of obtaining a user profile of the target user to determine the second knowledge level corresponding to the target user further includes: Obtain basic information, behavioral data, and capability performance data of target users; Based on the basic information, behavioral data, and capability performance data, knowledge tags are constructed to generate user profiles; Based on the knowledge level mapping rule and the user portrait, the knowledge value of the target user is calculated; based on the knowledge value and a preset knowledge level table, the second knowledge level corresponding to the target user is determined.

4. The text processing method according to claim 1, wherein: The step of determining the optimization logic corresponding to the initial statement further includes: Determine the third knowledge level before optimization and the fourth knowledge level after optimization corresponding to each optimization logic in the preset optimization logic database; Search the preset optimization logic database for a target logic that meets the optimization conditions, and set the target logic as the optimization logic, wherein the optimization conditions are that the third knowledge level is equal to the first knowledge level, and the second readability values ​​corresponding to the fourth knowledge level and the second knowledge level are less than or equal to a preset readability threshold.

5. The text processing method according to claim 1, wherein: The step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement further includes: determining the target semantics of the initial sentence; Based on the target semantics and the optimization logic, the initial statement is optimized using a preset statement optimization model to obtain a target statement, wherein the semantics corresponding to the target statement are consistent with the target semantics.

6. The text processing method according to claim 1, wherein: Before the step of optimizing the initial statement using a preset statement optimization model based on the optimization logic to obtain a target statement, the method further includes: Obtaining a sample statement and a sample optimization logic, wherein the sample statement is optimized based on the sample optimization logic and a first optimization result; Based on the sample optimization logic, the sample statement is optimized using the current statement optimization model to obtain a second optimization result; Determining whether the first optimization result is consistent with the second optimization result; If they are inconsistent, adjust the parameters of the current statement optimization model, and based on the parameters of the current statement optimization model after the adjustment, return to the step of optimizing the sample statement based on the sample optimization logic using the current statement optimization model to obtain a second optimization result, until the first optimization result is consistent with the second optimization result, and obtain the preset statement optimization model.

7. The text processing method according to claim 1, wherein: The step of replacing the initial sentence with the target sentence to obtain the target text further includes: Get the text format and font size corresponding to the initial statement of the location; Adjusting the target sentence based on the text format and the character size to obtain an adjusted target sentence; The initial sentence is replaced with the adjusted target sentence to obtain a target text.

8. A text processing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the text processing method according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the text processing method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the text processing method according to any one of claims 1 to 7 are implemented.