A text processing method, apparatus, device, storage medium, and program product

By generating and sending modification commands on the server side and displaying the modified content on the client side, this approach solves the problem that AI tools cannot meet the diverse text modification needs of users, and achieves flexibility and user-friendliness in text modification.

CN121435924BActive Publication Date: 2026-05-15BEIJING FEISHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING FEISHU TECH CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing AI tools cannot meet users' diverse needs for text modification, cannot intuitively judge the content and method of modification, and only support simple tone adjustment, failing to meet users' needs for adding, deleting, replacing, and highlighting text content.

Method used

The server receives text modification requests from clients, converts the data format, inputs it into the data processing model, generates modification commands, and displays the modified content in a revision manner on the client side, supporting multiple modification methods such as adding, deleting, replacing, and highlighting.

Benefits of technology

It enables users to intuitively judge and diversely meet their text modification needs. Users can determine whether the modification meets their requirements, and it supports multiple modification methods, improving the flexibility of text processing and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121435924B_ABST
    Figure CN121435924B_ABST
Patent Text Reader

Abstract

The present disclosure provides a text processing method, device, equipment, storage medium and program product, which are applied to the technical field of computers. The method comprises the following steps: a server receives a text modification requirement for a first text sent by a client. The server obtains a first modification command for modifying the first text based on the first text and the text modification requirement. After obtaining the first modification command, the server sends the first modification command to the client, so that the client displays the text content modified based on the first modification command in a revision format based on the first modification command. In the present disclosure, the document content can be modified by AI, and the modified content can be displayed in a revision format, which improves the document modification efficiency and shortens the processing time of document revision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a text processing method, apparatus, device, storage medium, and program product. Background Technology

[0002] In some scenarios, users need to modify document content. For example, in a scenario where meeting minutes are automatically generated, users may want to modify the automatically recorded minutes. Similarly, users may want to modify articles.

[0003] Currently, some artificial intelligence (AI) tools have the ability to automatically modify text, but the text modification functions provided by current AI tools cannot meet user needs. Therefore, a solution is urgently needed to address the aforementioned problems. Summary of the Invention

[0004] In order to solve or at least partially solve the above-mentioned technical problems, this application provides a text processing method, apparatus, device, storage medium, and program product.

[0005] To achieve the above objectives, the technical solution provided in this application is as follows:

[0006] Firstly, this application provides a text processing method applied on a server, the method comprising:

[0007] Receive text modification requests for the first text sent by the client;

[0008] Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks;

[0009] The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner.

[0010] The text modification request and the first text in the second data format are input into the data processing model to obtain a first modification command to modify the first text;

[0011] The first modification command is sent to the client so that the client displays the text content modified based on the first modification command in a revised manner.

[0012] Secondly, this application provides a text processing method applied to a client, the method comprising:

[0013] Receive text modification requests for the first text;

[0014] Send the text modification request to the server;

[0015] Receive a first modification command from the server to modify the first text based on the text modification requirement;

[0016] Based on the first modification command, the modified text content is displayed in a revised manner; wherein, the server obtains the first modification command in the following way:

[0017] Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks;

[0018] The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner.

[0019] The text modification request and the first text input data processing model in the second data format are used to obtain the first modification command.

[0020] Thirdly, this application provides a text processing apparatus for use on a server, the apparatus comprising:

[0021] The receiving unit is used to receive text modification requests for the first text sent by the client.

[0022] The acquisition unit is used to acquire the first text in a first data format, wherein the first text in the first data format includes multiple blocks;

[0023] The conversion unit is used to convert the first text in the first data format to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incrementing sequence number manner.

[0024] The processing unit is used to input the text modification request and the first text in the second data format into the data processing model to obtain a first modification command to modify the first text.

[0025] The sending unit is configured to send the first modification command to the client, so that the client displays the text content modified based on the first modification command in a revised manner.

[0026] Fourthly, this application provides a text processing apparatus for use on a client side, the apparatus comprising:

[0027] The first receiving unit is used to receive text modification requests for the first text;

[0028] A sending unit is used to send the text modification request to the server.

[0029] The second receiving unit is used to receive a first modification command obtained by the server based on the text modification requirement to modify the first text;

[0030] The display unit is used to display the text content modified by the first modification command in a revised manner; wherein the server obtains the first modification command in the following way:

[0031] Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks;

[0032] The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner.

[0033] The text modification request and the first text input data processing model in the second data format are used to obtain the first modification command.

[0034] Fifthly, this application provides an electronic device, characterized in that the electronic device includes: a processor and a memory;

[0035] The memory is used to store instructions or computer programs;

[0036] The processor is configured to execute the instructions or computer program in the memory to cause the electronic device to perform the method described in the first aspect or the second aspect above.

[0037] In a sixth aspect, this application provides a computer-readable medium storing instructions or a computer program that, when executed on a device, causes the device to perform the methods described in the first aspect or the second aspect above.

[0038] In a seventh aspect, this application provides a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods described in the first aspect or the second aspect above.

[0039] Eighthly, this application provides a text processing system, including a server that performs the first aspect above and a client that performs the second aspect above.

[0040] Compared with related technologies, this application has at least the following advantages:

[0041] The first aspect of this application provides a text processing method applied to a server. The server receives a text modification request for a first text sent by a client. The server obtains the first text in a first data format, performs a format conversion on the first text in the first data format, and obtains the first text in a second data format. Wherein: the first text in the first data format includes multiple blocks, and the first text in the second data format includes the multiple blocks and first block identifiers corresponding to each of the multiple blocks, the first block identifiers corresponding to each of the multiple blocks being assigned in an incrementing sequence number manner. Further, the server inputs the text modification request and the first text in the second data format into a data processing model to obtain a first modification command to modify the first text. After obtaining the first modification command, the server sends the first modification command to the client, so that the client can display the modified text content based on the first modification command in a revised manner. In this application, the modified text is not directly generated; instead, the server generates the first modification command, the client executes the first modification command, and displays the modified text content based on the first modification command in a revised manner, so that the user can determine whether the text modification request has been met.

[0042] A second aspect of this application provides a text processing method applied to a client. The client receives a text modification request for a first text and sends the request to a server. Based on the first text and the modification request, the server obtains a first modification command to modify the first text, and then sends the first modification command to the client. Correspondingly, the client receives the first modification command from the server and, based on the first modification command, displays the modified text content in a revised manner. Specifically, the server obtains the first modification command by: acquiring the first text in a first data format, the first text in the first data format comprising multiple blocks; converting the first text in the first data format to obtain the first text in a second data format, the first text in the second data format comprising the multiple blocks and first block identifiers corresponding to the multiple blocks, the first block identifiers being assigned in an incrementing sequence number manner; and inputting the text modification request and the first text in the second data format into a data processing model to obtain the first modification command. Therefore, in this application, the modified text is not directly generated. Instead, the server generates a first modification command, which is then executed by the client, and the modified text content based on the first modification command is displayed in a revision manner so that the user can determine whether the text modification requirement has been met. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A signaling interaction diagram of a text processing method provided in an embodiment of this application;

[0045] Figure 2 This is a schematic diagram illustrating an exemplary application scenario provided in an embodiment of this application;

[0046] Figure 3 This is a schematic diagram of the structure of a text processing device provided in an embodiment of this application;

[0047] Figure 4 A schematic diagram of the structure of another text processing device provided in the embodiments of this application;

[0048] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0049] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0050] Currently, some AI tools have the function of modifying text. Specifically, the AI ​​tool obtains the text content that the user selects to be modified, then modifies the text content and returns the modified text to the user. Using this method, users cannot intuitively determine whether the text content they selected has been modified, nor can they determine the specific modification method, thus failing to meet user needs.

[0051] Furthermore, current AI tools only support simple modifications. Specifically, they only allow adjusting the tone of text content or modifying it to a more easily understood style; they do not support other types of modifications. In reality, users have diverse needs for text modification. For example, users may want to add, delete, or replace text content, or generate non-text content (such as adding highlights or column markers). Current AI tools lack these functions and cannot meet user needs.

[0052] In view of this, this application provides a text processing method that can meet the user's need to modify text.

[0053] Next, the text processing method provided in this application will be described in conjunction with the accompanying drawings.

[0054] See Figure 1 The figure is a signaling interaction diagram of a text processing method provided in an embodiment of this application. Figure 1 The method shown includes the following steps S101-S109.

[0055] S101: The client receives a text modification request for the first text.

[0056] In this application, the text modification requirement refers to the requirement to modify the first text.

[0057] In one example, a user can enter textual modification requests in natural language on the client-side interface. For instance, a user could enter: "Change to a bilingual (Chinese and English) document," or "Add numbers to all chapters," and so on.

[0058] Optionally, when the need to modify the first text is specific to certain content within the first text, the user can also select the aforementioned specific content from the first text displayed on the client. In this scenario, the text modification need includes not only the needs described in natural language but also the specific content selected by the user. For example, the user selects a paragraph from the first text displayed on the client and enters "move this paragraph to the end of the text," or "add a highlight mark to this paragraph," and so on.

[0059] This application does not specifically limit the first text. The first text may be meeting minutes or other types of text, such as articles, reports, etc.

[0060] In this application, the text modification requirement may be a requirement to modify the entire first text or a requirement to modify part of the content of the first text; this application does not make any specific limitation.

[0061] S102: The client sends the text modification request to the server.

[0062] S103: The server receives the text modification request sent by the client.

[0063] After receiving the text modification request, the client can send it to the server, which in turn receives the request. In one example, the client and server can interact via Hypertext Transfer Protocol Secure (HTTPS), allowing the client to send the text modification request to the server. As a specific example, the client can send an HTTPS message to the server, including the text modification request. Optionally, the text modification request may be encapsulated in JavaScript Object Notation (JSON) format within the HTTPS message.

[0064] S104: The server obtains a first text in a first data format, wherein the first text in the first data format includes multiple blocks.

[0065] In one example, after receiving the text modification request, the server can retrieve the first text from the database. The first text retrieved by the server from the database can be in a first data format (e.g., JSON format).

[0066] In this application, the first text of the first data format includes multiple blocks. In the first text of the first data format, each block has a second block identifier, which is used to identify the block. The format of the second block identifier is relatively complex.

[0067] In one example, when the first data format is JSON, the first text in the JSON format can specifically be the Docx ClientVars corresponding to the first text, where:

[0068] Docx ClientVars, also known simply as ClientVars, is a set of runtime variables / context parameters maintained by the Word client when processing DOCX documents. It stores temporary states, environment configurations, or custom parameters during document editing, rendering, and interaction, acting as a "state container" for the DOCX document during Word's runtime. In other words, ClientVars is a collection of variables dynamically maintained in memory by the Word client after loading the document, supporting the document's dynamic behaviors (such as macros, content control interactions, and custom plugin logic).

[0069] S105: The server performs format conversion on the first text in the first data format to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incrementing sequence number manner.

[0070] S106: The server processes the text modification request and the first text input data model in the second data format to obtain a first modification command to modify the first text.

[0071] After obtaining the first text in the first data format, the server can perform a format conversion on the first text in the first data format, converting it into the first text in the second data format. The server then inputs the text modification request and the first text in the second data format into a data processing model to obtain a first modification command to modify the first text. The data processing model is, for example, a large language model (LLM).

[0072] This application does not specifically limit the second data format, and the second data format may be another format different from the first data format.

[0073] In one example, the second data format is Extensible Markup Language (XML) format.

[0074] In another example, the second data format is Markdown. Markdown is a lightweight markup language that enables efficient document formatting through concise syntax. Since Docx documents inherently possess the technical expertise for converting between ClientVars and Markdown data, and data processing models (such as LLM) naturally support Markdown syntax, using Markdown as the second data format can effectively improve text processing efficiency.

[0075] In this application, a first block identifier can also be assigned to each block among the multiple blocks included in the first text. Correspondingly, the first text in the second data format includes the multiple blocks and the first block identifiers corresponding to each of the multiple blocks. In this application, the first block identifiers corresponding to the multiple blocks are assigned in an incrementing sequence number manner. For example, starting with sequence number 1 as the initial value and incrementing by a step size of 1, first block identifiers are assigned to each of the multiple blocks. In this case, the first block identifier is represented by a number (sequence number). Compared to a complex second block identifier, inputting the first text including the first block identifier (i.e., the first text in the second data format) into the data processing model can reduce the computational load of the data processing model and improve its processing efficiency.

[0076] In one example, any one of the plurality of blocks is referred to as the "first block". The first text of the second data format includes: a block start identifier, a block end identifier, and the first block. The first block is located between the block start identifier and the block end identifier to clearly define the content between them as the first block. Furthermore, both the block start identifier and the block end identifier include a first block identifier for the first block. See Table 1 for further explanation.

[0077] Table 1

[0078] The content of the first text The first text in the second data format Document heading reference block first line reference block second line <!--s:1-->Document title <!--e:1--> <!--s:2--><blockquote> <!--s:3-->First line of the blockquote <!--e:3--> <!--s:4-->Second line of the blockquote <!--s:4-->< / blockquote> <!--e:2-->

[0079] In Table 1, “Document Title”, “Reference Block”, “First Line of Reference Block” and “Second Line of Reference Block” can all be used as the aforementioned first block.

[0080] For the "Document Headings" block, its first block identifier is 1, and the block start identifier is "".<!--s:1 --> The block end identifier is "<!--e:1--> "In this context: 's' indicates the start, and 'e' indicates the end."

[0081] Similarly, for the "reference block" block, its first block identifier is 2, and its block start identifier is "".<!--s:2--> The block end identifier is "<!--e:2--> ".

[0082] For the block "first line of the referenced block", its first block identifier is 3, and its block start identifier is "".<!--s:3--> The block end identifier is "<!--e:3--> ".

[0083] For the block "referenced second line", its first block identifier is 4, and its block start identifier is "".<!--s:4--> The block end identifier is "<!--e:4--> ".

[0084] In one example, to clarify the mapping relationship between the first text in the second data format obtained after conversion and the first text in the first data format, a correspondence can also be established between the first block identifier of each block in the aforementioned multiple blocks and the second block identifier of each block.

[0085] In this application, after inputting the text modification request and the first text in the second data format into the data processing model, the data processing model can process the first text based on the text modification request and the second data format to obtain a second modification command to modify the first text. The second modification command is also a command in the second data format (e.g., Markdown format). The second modification command includes a first block identifier for the block involved in modifying the first text.

[0086] In one example, the second modification command includes a command start identifier and a command end identifier. The command start identifier includes a command type and command parameters, and the command end identifier includes the command type. The command type indicates the data operation type, which includes deletion, addition, and replacement. In principle, these three data operation types can be used individually or in combination to meet the text modification needs of various scenarios. The command parameters indicate the first block identifier of the block associated with the data operation type. Example:

[0087] The command start identifier can be...<!--s:{command}|{params}-->Here, `command` indicates the command type, and `params` indicates the command parameters. The command end identifier can be...<!--e:{command}--> .

[0088] In some examples, the command parameters can also be extended, for example, to support extended instructions to generate additional information such as "reason for modification".

[0089] In one example, the data operation type is deletion. In this case, the second modification command is used to instruct the deletion of the block indicated by the command parameters. This can be understood in conjunction with Table 2, which shows a second modification command indicating data deletion.

[0090] Table 2

[0091] Data operation types Second modification command illustrate delete <!--s:block-delete|block-ids--> <!--e:block-delete--> Meaning: Delete the block corresponding to block-ids. Multiple blocks can be specified at once, separated by commas.

[0092] In Table 2, delete indicates the data operation type "delete". block-ids indicates the first block identifier of at least one block that was deleted.

[0093] In another example, the data operation type is data addition. In this case, the second modification command, in addition to the aforementioned command start identifier and command end identifier, also includes the content to be added located between the command start identifier and the command end identifier. In this scenario, the second modification command is used to instruct the insertion of the content to be added after the block indicated by the command parameters. For this case, please refer to Table 3 below for understanding the second modification command.

[0094] Table 3

[0095] Data operation types Second modification command illustrate Increase <!--s:block-insert|block-id-->content1content2... <!--e:block-insert--> Meaning: Insert content1, content2, etc. below the Block corresponding to "block-id"; where: the inserted content can be one or more Blocks, and the format is plain second data format text.

[0096] In Table 3, insert indicates the data operation type "insert" (that is, add).

[0097] In this application, the content to be added can be text, non-text (e.g., columns), or content in a specific format (e.g., a first format). The first format is, for example, highlighting.

[0098] When the content to be added is content with a first format, the second modification command includes, in addition to the aforementioned command start identifier, command end identifier, and content to be added, a first format start identifier located between the command start identifier and the content to be added, and a first format end identifier located between the command end identifier and the content to be added. The first format start identifier and the first format end identifier can indicate that the content to be added is in the first format.

[0099] In one example, the first format start identifier and the first format end identifier are in HyperText Markup Language (HTML). When the second data format is Markdown, since Markdown supports mixing with HTML, this approach can improve development efficiency. For example, assuming the first format is highlighting, the first format start identifier could be: <layout-callout data-emoji-id="[ICON]" data-background-color="[BG]"> The first format end identifier can be...< / layout-callout> In this scenario, a complete second modification command can be shown in Table 4 below:

[0100] Table 4

[0101] Data operation types Second modification command illustrate Increase <!--s:block-insert|block-id--> <layout-callout data-emoji-id="[ICON]" data-background-color="[BG]"> content1< / layout-callout> <!--e:block-insert--> Meaning: Insert a highlighted content1 below the Block corresponding to the "block-id".

[0102] In another example, the data operation type is replacement. In this case, the second modification command, in addition to the aforementioned command start identifier and command end identifier, also includes the content to be replaced located between the command start identifier and the command end identifier. In this scenario, the second modification command is used to instruct the block indicated by the command parameters to be replaced with the content to be replaced.

[0103] For this situation, please refer to Table 5 below for an understanding of the second modification command.

[0104] Table 5

[0105] Data operation types Second modification command illustrate replace <!--s:block-replace|block-id-->content <!--e:block-replace--> Meaning: Replace the Block corresponding to "block-id" with content; where: content can be a complete Block, such as a table, or a list, plain text, or content in a second format.

[0106] In Table 5, "replace" indicates the data operation type "replacement".

[0107] In this application, the content to be replaced can be text, tables, or non-text (such as columns), or content using a specific format (such as a second format). The second format is, for example, highlighting.

[0108] When the content to be replaced is content with a second format, the second modification command includes, in addition to the aforementioned command start identifier, command end identifier, and content to be replaced, a second format start identifier located between the command start identifier and the content to be replaced, and a second format end identifier located between the command end identifier and the content to be replaced. The second format start identifier and the second format end identifier can indicate that the content to be replaced is in the second format.

[0109] The principle of the second format start identifier is the same as that of the first format start identifier, and the principle of the second format end identifier is the same as that of the first format end identifier. Therefore, for the second format start identifier and the second format end identifier, please refer to the previous description of the first format start identifier and the first format end identifier. They will not be repeated here.

[0110] Considering that the first text displayed to the client is retrieved from the database, and the identifiers of each block in the first text retrieved from the database are the second block identifiers, the client cannot correctly identify the first block identifier in the second modification command. Therefore, after receiving the second modification command, the server can, based on the aforementioned correspondence, modify the first block identifier included in the second modification command to the corresponding second block identifier, thereby obtaining the first modification command.

[0111] S107: The server sends the first modification command to the client.

[0112] S108: The client receives the first modification command sent by the server.

[0113] After receiving the first modification command, the server sends it to the client, and the client receives the first modification command from the server. The server can send the first modification command to the client via HTTPS.

[0114] S109: The client displays the text content modified based on the first modification command in a revised manner.

[0115] After receiving the first modification command, the client can parse the first modification command and execute the modification operation indicated by the first modification command. Furthermore, the client displays the text content modified based on the first modification command in a revision manner.

[0116] It should be noted that in this application, the server may receive one or more first modification commands based on the first text and text modification requirements. In this application, one first modification command will be used as an example for explanation. In this application, the client executes S109 once for each first modification command received. That is, the client can perform revision mark display operations at the level of modification commands.

[0117] In one example, for content displayed in a revised manner on the client, the user can trigger corresponding actions, such as triggering an action to accept revisions, or further triggering an action to edit, etc., which will not be specifically described in this application.

[0118] As can be seen from the above description, the solution provided by the embodiments of this application does not directly generate the modified text. Instead, the server generates a first modification command, the client executes the first modification command, and displays the modified text content based on the first modification command in a revision manner, so that the user can determine whether the text modification requirement has been met.

[0119] Moreover, this solution supports multiple modification methods, such as adding text content, deleting text content, replacing text content, and generating non-text content (adding highlight marks to text, adding column marks, etc.), thereby meeting the diverse modification needs of users.

[0120] The solutions provided by the embodiments of this application have been described above. Next, in conjunction with… Figure 2 The scenario shown illustrates a specific implementation method provided in this application.

[0121] See Figure 2 This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.

[0122] Figure 2 The application scenarios shown include: users, servers, clients, databases, and LLM (i.e., the data processing model mentioned earlier). Among them:

[0123] The client can display the first text retrieved from the database.

[0124] Users can input their text modification requests for the first text on the client.

[0125] The client receives the text modification request and sends it to the server.

[0126] The server retrieves the first text in a first data format from the database, converts the first text in the first data format into the first text in a second data format, and sends the text modification request and the first text in the second data format to the LLM.

[0127] LLM processes the received text modification request and the first text in the second data format to obtain the second modification command, which is then sent to the server.

[0128] The server modifies the first block identifier in the second modification command to the second block identifier, obtains the first modification command, and sends the first modification command to the client.

[0129] The client executes the first modification command and displays the modified text content based on the first modification command in a revised manner.

[0130] Please refer to Table 6 below for an understanding of the content of the first text, the first text of the second data format, the text modification requirements, and the second modification command.

[0131] Table 6

[0132] The content of the first text The first text in the second data format Text modification requirements Second modification command Document heading reference block first line reference block second line <!--s:1-->Document title <!--e:1--> <!--s:2--><blockquote> <!--s:3-->First line of the block quote <!--e:3--> <!--s:4-->Second line of the block quote <!--s:4-->< / blockquote> <!--e:2--> Convert the reference block to an unordered list <!--s:block-delete|2,3,4--><!--e:block-delete--><!--s:block-insert|1-->-First line of the reference block-Second line of the reference block<!--e:block-insert-->

[0133] As shown in Table 6, the second modification command includes two types of data operations. The first is to delete blocks 2 to 4, and the second is to add the first and second lines of the reference block after block 2. By combining the two types of data operations, the text modification requirement of "converting the reference block into an unordered list" is solved.

[0134] about Figure 2 The processing flow shown is described in the previous text and will not be repeated here.

[0135] Based on the text processing method provided in the embodiments of this application, the embodiments of this application also provide a corresponding text processing device, which will be described below in conjunction with... Figure 3 and Figure 4 To provide explanations and clarifications. Among them: Figure 3 and Figure 4 The diagrams illustrate the structures of two text processing devices provided in the embodiments of this application. It should be noted that for technical details of the text processing devices provided in the embodiments of this application, please refer to the relevant content of the text processing methods described above.

[0136] like Figure 3 As shown, the text processing device 300 provided in this application embodiment is applied to a server and is used to perform the operations performed by the server as provided in the above embodiments. The device 300 includes: a receiving unit 301, an acquiring unit 302, a conversion unit 303, a processing unit 304, and a sending unit 305.

[0137] The receiving unit 301 is used to receive a text modification request for the first text sent by the client.

[0138] The acquisition unit 302 is used to acquire the first text in a first data format, wherein the first text in the first data format includes multiple blocks.

[0139] The conversion unit 303 is used to convert the first text in the first data format to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner.

[0140] The processing unit 304 is used to input the text modification request and the first text in the second data format into the data processing model to obtain a first modification command to modify the first text.

[0141] The sending unit 305 is used to send the first modification command to the client, so that the client can display the text content modified based on the first modification command in a revised manner.

[0142] Optionally, the plurality of blocks includes a first block, and the first text in the second data format includes:

[0143] The block includes a start identifier, an end identifier, and a first block, wherein the first block is located between the start identifier and the end identifier, and both the start identifier and the end identifier include the first block identifier of the first block.

[0144] Optionally, the device further includes:

[0145] The establishment unit is used to establish a correspondence between the first block identifier of each block in the plurality of blocks and the second block identifier of each block in the first text of the first data format;

[0146] The processing unit 304 is specifically used for, including:

[0147] The text modification requirement and the first text in the second data format are input into the data processing model to obtain a second modification command. The second modification command includes a first block identifier of the block involved in modifying the first text.

[0148] Based on the correspondence, the first block identifier included in the second modification command is modified to the corresponding second block identifier to obtain the first modification command.

[0149] Optionally, the second modification command includes:

[0150] The command start identifier includes a command type and a command end identifier. The command start identifier includes a command type and command parameters. The command end identifier includes the command type. The command type is used to indicate a data operation type. The command parameters are used to indicate the first block identifier of the block associated with the data operation type.

[0151] Optionally, the data operation type is deletion, and the second modification command is used to instruct the deletion of the block indicated by the command parameter.

[0152] Optionally, if the data operation type is add, then the second modification command also includes the content to be added located between the command start identifier and the command end identifier, and the second modification command is used to instruct the insertion of the content to be added after the block indicated by the command parameter.

[0153] Optionally, if the content to be added is content with a first format, then the second modification command further includes:

[0154] A first format start identifier located between the command start identifier and the content to be added, and a first format end identifier located between the command end identifier and the content to be added.

[0155] Optionally, the first format start identifier and the first format end identifier are in Hypertext Markup Language.

[0156] Optionally, if the data operation type is replacement, then the second modification command further includes the content to be replaced located between the command start identifier and the command end identifier. The second modification command is used to instruct the block indicated by the command parameter to be replaced with the content to be replaced.

[0157] Optionally, if the content to be replaced is content with a second format, then the second modification command further includes:

[0158] A second format start identifier located between the command start identifier and the content to be replaced, and a second format end identifier located between the command end identifier and the content to be replaced.

[0159] Optionally, the second data format includes:

[0160] Markdown format.

[0161] Optionally, the first modification command is a command using the second data format.

[0162] like Figure 4As shown, the text processing device 400 provided in this embodiment is applied to a client and is used to perform the operations performed by the client as described in the above embodiments. The device 400 includes:

[0163] The first receiving unit 401 is used to receive text modification requests for the first text.

[0164] The sending unit 402 is used to send the text modification request to the server.

[0165] The second receiving unit 403 is used to receive a first modification command obtained by the server based on the text modification requirement to modify the first text.

[0166] Display unit 404 is used to display the text content modified by the first modification command in a revised manner. The server obtains the first modification command in the following way:

[0167] Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks;

[0168] The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner.

[0169] The text modification request and the first text input data processing model in the second data format are used to obtain the first modification command.

[0170] In addition, this application also provides an electronic device, the device including a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device performs any implementation of the text processing method provided in this application.

[0171] See Figure 5 This diagram illustrates a structural schematic of an electronic device 500 suitable for implementing embodiments of the present disclosure. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0172] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0173] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0174] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0175] The electronic device provided in this embodiment belongs to the same inventive concept as the method provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0176] This application also provides a computer-readable medium storing instructions or computer programs that, when executed on a device, cause the device to perform any implementation of the text processing method provided in this application.

[0177] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0178] In some implementations, clients and servers (e.g., corresponding servers) can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., adhoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0179] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0180] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to perform the aforementioned methods.

[0181] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0182] In addition, this application also provides a text processing system, which includes a server and a client (e.g., including the execution of the text processing methods provided in the above embodiments) that perform text processing methods. Figure 1 The method shown includes both server-side and client-side components.

[0183] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0184] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units / modules do not necessarily limit the specific unit itself.

[0185] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

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

[0187] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0188] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0189] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0190] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0191] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text processing method, characterized in that, The method includes: Receive text modification requests for the first text sent by the client; Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks; The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner. The plurality of blocks include the first block. The first text in the second data format includes: a block start identifier, a block end identifier, and the first block. The first block is located between the block start identifier and the block end identifier. Both the block start identifier and the block end identifier include the first block identifier of the first block. The text modification requirement and the first text in the second data format are input into the data processing model to obtain a second modification command. The second modification command includes a first block identifier of the block involved in modifying the first text. Based on the correspondence between the first block identifier of each block in the plurality of blocks and the second block identifier of each block in the first text of the first data format, the first block identifier included in the second modification command is modified to the corresponding second block identifier to obtain the first modification command for modifying the first text. The first modification command is sent to the client so that the client displays the text content modified based on the first modification command in a revised manner.

2. The method according to claim 1, characterized in that, The method further includes: Establish the aforementioned correspondence.

3. The method according to any one of claims 1-2, characterized in that, The second modification command includes: The command start identifier includes a command type and a command end identifier. The command start identifier includes a command type and command parameters. The command end identifier includes the command type. The command type is used to indicate a data operation type. The command parameters are used to indicate the first block identifier of the block associated with the data operation type.

4. The method according to claim 3, characterized in that, The data operation type is deletion, and the second modification command is used to instruct the deletion of the block indicated by the command parameters.

5. The method according to claim 3, characterized in that, If the data operation type is "add", then the second modification command also includes the content to be added located between the command start identifier and the command end identifier. The second modification command is used to instruct the insertion of the content to be added after the block indicated by the command parameter.

6. The method according to claim 5, characterized in that, If the content to be added has a first format, then the second modification command further includes: A first format start identifier located between the command start identifier and the content to be added, and a first format end identifier located between the command end identifier and the content to be added.

7. The method according to claim 3, characterized in that, If the data operation type is replacement, then the second modification command also includes the content to be replaced located between the command start identifier and the command end identifier. The second modification command is used to instruct the block indicated by the command parameter to be replaced with the content to be replaced.

8. The method according to claim 7, characterized in that, If the content to be replaced has a second format, then the second modification command further includes: A second format start identifier located between the command start identifier and the content to be replaced, and a second format end identifier located between the command end identifier and the content to be replaced.

9. A text processing method, characterized in that, Applied to a client, the method includes: Receive text modification requests for the first text; Send the text modification request to the server; Receive a first modification command from the server to modify the first text based on the text modification requirement; Based on the first modification command, the modified text content is displayed in a revised manner; wherein, the server obtains the first modification command in the following way: Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks; The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner. The plurality of blocks include the first block. The first text in the second data format includes: a block start identifier, a block end identifier, and the first block. The first block is located between the block start identifier and the block end identifier. Both the block start identifier and the block end identifier include the first block identifier of the first block. The text modification requirement and the first text in the second data format are input into the data processing model to obtain a second modification command. The second modification command includes a first block identifier of the block involved in modifying the first text. Based on the correspondence between the first block identifier of each block in the plurality of blocks and the second block identifier of each block in the first text of the first data format, the first block identifier included in the second modification command is modified to the corresponding second block identifier to obtain the first modification command.

10. A text processing device, characterized in that, Applied to the server side, the device includes: The receiving unit is used to receive text modification requests for the first text sent by the client. The acquisition unit is used to acquire the first text in a first data format, wherein the first text in the first data format includes multiple blocks; A conversion unit is used to convert the first text in the first data format to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner. The plurality of blocks include the first block. The first text in the second data format includes: a block start identifier, a block end identifier, and the first block. The first block is located between the block start identifier and the block end identifier. Both the block start identifier and the block end identifier include the first block identifier of the first block. The processing unit is configured to input the text modification request and the first text in the second data format into a data processing model to obtain a second modification command, wherein the second modification command includes a first block identifier of the block involved in modifying the first text; based on the correspondence between the first block identifier of each block in the plurality of blocks and the second block identifier of each block in the first text in the first data format, the first block identifier included in the second modification command is modified to the corresponding second block identifier to obtain a first modification command for modifying the first text; The sending unit is configured to send the first modification command to the client, so that the client displays the text content modified based on the first modification command in a revised manner.

11. A text processing device, characterized in that, Applied to a client, the device includes: The first receiving unit is used to receive text modification requests for the first text; A sending unit is used to send the text modification request to the server. The second receiving unit is used to receive a first modification command obtained by the server based on the text modification requirement to modify the first text; The display unit is used to display the text content modified by the first modification command in a revised manner; wherein the server obtains the first modification command in the following way: Obtain the first text in a first data format, wherein the first text in the first data format comprises multiple blocks; The first text in the first data format is converted to obtain the first text in the second data format. The first text in the second data format includes the plurality of blocks and the first block identifiers corresponding to the plurality of blocks respectively. The first block identifiers corresponding to the plurality of blocks are allocated in an incremental sequence number manner. The plurality of blocks include the first block. The first text in the second data format includes: a block start identifier, a block end identifier, and the first block. The first block is located between the block start identifier and the block end identifier. Both the block start identifier and the block end identifier include the first block identifier of the first block. The text modification requirement and the first text in the second data format are input into the data processing model to obtain a second modification command. The second modification command includes a first block identifier of the block involved in modifying the first text. Based on the correspondence between the first block identifier of each block in the plurality of blocks and the second block identifier of each block in the first text in the first data format, the first block identifier included in the second modification command is modified to the corresponding second block identifier to obtain the first modification command.

12. An electronic device, characterized in that, The electronic device includes: a processor and a memory; The memory is used to store instructions or computer programs; The processor is configured to execute the instructions or computer program in the memory to cause the electronic device to perform the method according to any one of claims 1-9.

13. A computer-readable medium, characterized in that, The computer-readable medium stores instructions or computer programs that, when executed on the device, cause the device to perform the method according to any one of claims 1-9.

14. A computer program product, characterized in that, It includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method of any one of claims 1-9.