Text information correction method and device, equipment and medium
By generating query statements to search reference information and evaluating its consistency, the original text information is corrected, which solves the problem of inefficient error checking in copywriting generated by artificial intelligence models, and achieves rapid and accurate text information correction.
Patent Information
- Application Number
- CN202411697825.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, copywriting generated by artificial intelligence models is prone to knowledge or factual errors, and users need to check the errors themselves, which is inefficient.
By obtaining the original text information, a query statement is generated to search for specified data, reference information related to the search points, the consistency between the reference information and the search points, and the original text information is corrected based on the evaluation results.
No need to manually check errors, quickly and accurately check and correct errors in text information, improving user experience and efficiency.
Smart Images

Figure CN119537513A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of text processing technology, and in particular, to a method, device, equipment, and medium for correcting text information. Background Art
[0002] With the continuous development of machine learning technology, artificial intelligence models can provide more and more services for people. At present, there are many artificial intelligence models that can provide copywriting services for people. For example, they can generate corresponding copywriting based on images or scene descriptions for users to use, which provides great convenience for users. However, the generated copywriting usually has knowledge or factual errors. At present, in the relevant technology, the copywriting generated by the artificial intelligence model can only be checked by the user himself. Summary of the invention
[0003] The embodiments of the present disclosure describe a method, apparatus, device and medium for correcting text information.
[0004] According to a first aspect, a method for correcting text information is provided, the method comprising: obtaining original text information to be processed; generating a query statement based on the original text information; the query statement is used to search for retrieval points involved in the original text information; searching from specified data based on the query statement to obtain reference information related to the retrieval points; evaluating the consistency between the reference information and the retrieval points to obtain an evaluation result; and correcting the original text information based on the evaluation result.
[0005] According to a second aspect, a device for correcting text information is provided, the device comprising: an acquisition unit, configured to acquire original text information to be processed; a generation unit, configured to generate a query statement based on the original text information; the query statement is used to search for retrieval points involved in the original text information; a search unit, configured to search from specified data based on the query statement to obtain reference information related to the retrieval points; an evaluation unit, configured to evaluate the consistency between the reference information and the retrieval points to obtain an evaluation result; and a correction unit, configured to correct the original text information based on the evaluation result.
[0006] According to a third aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method as described above in any one of the first aspect is implemented.
[0007] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute any one of the methods in the first aspect.
[0008] According to a fifth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, any one of the methods in the first aspect is implemented.
[0009] According to a text information correction scheme provided by an embodiment of the present disclosure, a query statement is generated based on the original text information, and the query statement is used to search for the retrieval points involved in the original text information. Based on the query statement, a search is performed from the specified data to obtain reference information related to the retrieval points, the consistency of the reference information and the retrieval points is evaluated, an evaluation result is obtained, and the original text information is corrected based on the evaluation result. There is no need to manually check the original text information for errors, so that the content that may have errors in the original text information can be quickly and accurately checked, which provides convenience for users and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure;
[0011] Figure 2 is a flow chart of a method for processing text information correction according to an exemplary embodiment of the present disclosure;
[0012] Figure 3 is a schematic diagram of a text information correction scenario according to an exemplary embodiment of the present disclosure;
[0013] Figure 4 is a flow chart of another method for correcting text information according to an exemplary embodiment of the present disclosure;
[0014] Figure 5 is a block diagram of a device for correcting text information according to an exemplary embodiment of the present disclosure;
[0015] Figure 6 It is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. DETAILED DESCRIPTION
[0016] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0017] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0018] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0019] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0020] The technical solution provided by the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It should also be noted that, for ease of description, only the parts related to the relevant inventions are shown in the accompanying drawings. It should be noted that, in the absence of conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0021] With the continuous development of machine learning technology, artificial intelligence models can provide more and more services for people. At present, there are many artificial intelligence models that can provide copywriting services for people. For example, they can generate corresponding copywriting based on images or scenarios for users to use, which provides great convenience for users. However, the generated copywriting usually has knowledge or factual errors, such as "Dalian is the capital city of Shandong Province" and "Apples are vegetables". At present, in related technologies, the copywriting generated by the artificial intelligence model can only be checked by users themselves.
[0022] The present disclosure provides a text information correction scheme, which generates a query statement based on the original text information, the query statement is used to search for the retrieval points involved in the original text information, searches from the specified data based on the query statement, obtains reference information related to the retrieval points, evaluates the consistency of the reference information and the retrieval points, obtains the evaluation results, and corrects the original text information based on the evaluation results. There is no need to manually check the original text information for errors, so that the content that may have errors in the original text information can be quickly and accurately checked, which provides convenience for users and improves user experience.
[0023] See also Figure 1 , is a schematic diagram of an exemplary system architecture for applying an embodiment of the present disclosure.
[0024] like Figure 1 As shown, the system architecture 100 may include a terminal device 102, a network 103, a server 104 and a database 105. It should be understood that Figure 1 The number or type of terminal devices, networks, and servers in the embodiment are merely illustrative. Any number or type of terminal devices, networks, servers, and databases may be provided as required.
[0025] The network 103 is used to provide a medium for communication links between terminal devices and servers. The network 103 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0026] The terminal device 102 can interact with the server through the network 103 to receive or send requests or information, etc. The terminal device 102 can be various electronic devices, including but not limited to smart phones, tablet computers, laptops, desktop computers, smart wearable devices, etc.
[0027] The server 104 can store, analyze, and process the received data, and can also send control commands or requests to the terminal device or other servers. The server can provide services in response to the user's service request. It is understood that a server can provide one or more services, and the same service can also be provided by multiple servers. A large model is deployed in the server 104, and the large model can assist the server 104 to provide services for the terminal device 102.
[0028] based on Figure 1 In the system architecture shown, in the embodiment of the present disclosure, the user 101 can input the original text information and guide information to be processed through the terminal device 102, and the terminal device 102 can send the original text information and guide information to the server 104 through the network 103 to instruct the large model to generate a query statement based on the original text information and the guide information. The server 104 can generate a query statement for the large model and return it to the terminal device 102 through the network 103. The terminal device 102 can search from the database 105 through the network 103 based on the query statement to obtain reference information. Then, the terminal device 102 can send the original text information, guide information and reference information to the server 104 through the network 103 to indicate that the large model evaluates the consistency of the retrieval points included in the reference information and the original text information. The server 104 can return the evaluation result obtained by the large model to the terminal device 102 through the network 103. The terminal device 102 can display the evaluation result obtained by the large model to the user 101.
[0029] The present disclosure will be described in detail below in conjunction with specific embodiments.
[0030] Figure 2 The flowchart of a method for correcting text information according to an exemplary embodiment is shown. The method can be applied to a terminal device. In this embodiment, for ease of understanding, an example is given in conjunction with a terminal device that can install a third-party application. It can be understood by those skilled in the art that the terminal device can include but is not limited to a mobile terminal device such as a smart phone, a smart wearable device, a tablet computer, etc. The method can include the following steps:
[0031] like Figure 2 As shown, in step 201, original text information to be processed is obtained.
[0032] In this embodiment, a third-party application is installed in the terminal device, and the third-party application may be a client that can provide a text error correction function. The client may first obtain the original text information to be processed, and the original text information may be the text information that needs to be evaluated for errors, for example, the original text information may be a copy generated by an artificial intelligence model.
[0033] Specifically, in one implementation, the client may provide a text input interface to the user through an interface of a text error correction function, and the user may input the original text information through the text input interface. For example, the text input interface may include a text input box, and the user may directly input the original text information into the text input box. For another example, the text input interface may also include a file import button, and the user may import a document including the original text information into the client through the file import button.
[0034] In another implementation, the client may also provide a shortcut button to the user, and the user may import the original text information through the shortcut button. For example, the client also provides the user with a copywriting generation service. After the copywriting is generated, a one-key shortcut button may be provided to the user. The user may trigger the one-key shortcut button to call the error correction service of the client to obtain the generated copywriting as the original text information to be processed. It is understood that the original text information to be processed may also be obtained in other ways, and this embodiment does not limit the specific way of obtaining the original text information to be processed.
[0035] In step 202, a query statement is generated based on the original text information.
[0036] In this embodiment, the query statement can be used to search for the retrieval points involved in the original text information, and the retrieval points can be content information belonging to a preset field. Among them, the query statement can be, for example, a statement including search terms and / or search questions, and different search terms or search questions can be separated by a preset separator. The retrieval points can be, for example, objective knowledge or factual content information involved in the original text information. The preset field can include, but is not limited to, the field of current news, the field of science and technology, the field of humanities and history, the field of physical geography, the field of medical health, the field of environmental science... etc. It can be understood that this embodiment does not limit the specific scope of the preset field.
[0037] In this embodiment, the target large model can be any type of large language model that provides services for the above-mentioned client. The target large model is deployed in the server, and the above-mentioned client can interact with the target large model deployed in the server through the network. For example, after the user triggers the preset operation, the above-mentioned client can send the acquired original text information and the guidance information for the target large model to the server. The server can input the received original text information and the guidance information into the target large model to instruct the target large model to generate a query statement based on the original text information. Among them, the guidance information for the target large model can be input by the user, or it can be pre-set and stored in the client. This embodiment does not limit the specific source of the guidance information.
[0038] Specifically, in one implementation, the target large model can be instructed to directly traverse and parse the original text information from beginning to end. During the traversal and parsing process, the search key points belonging to the preset field can be detected, and a summary information can be generated based on the detected search key points. Finally, a query statement is generated based on the summary information.
[0039] In another implementation, the target macro model can also be instructed to extract at least one text segment involving the search key point from the original text information, generate at least one target atomic fact information corresponding to the search key point based on the text segment, and generate a query statement based on the target atomic fact information. The text segment is taken from the original text, and each text segment can generate one or more target atomic fact information accordingly. The target atomic fact information can be a basic fact or data point in the original text information that cannot be further subdivided, and has a clear definition and clear expression.
[0040] For ease of understanding, a specific example is given below. For example, the original text information A may include the following content:
[0041] [Hello everyone, today we are going to talk about a very important topic: How to identify golden apple snails and tell you why you should never eat them!
[0042] Did you know that the golden apple snail is actually an alien species from tropical and subtropical regions of South America? It was introduced to Asia in the 1970s as a food resource. However, this seemingly harmless snail is potentially very harmful.
[0043] Amazingly, the golden apple snail contains up to 6,000 parasites in its body, which are extremely harmful to human health.
[0044] So, how to avoid eating it by mistake? 】
[0045] The guidance information B for the target large model may include the following:
[0046] You are an expert in copywriting content. You have rich and comprehensive knowledge and experience. You are good at extracting knowledgeable content fragments from copywriting, breaking down content fragments into atomic factual information, and generating query statements based on atomic factual information.
[0047] I will provide you with a copywriting, and you need to complete the following tasks:
[0048] Step 1: Analyze the events or content in the copy and extract the key knowledge points, such as historical events, news, scientific knowledge, natural knowledge, etc.
[0049] Step 2: Generate at least one atomic factual information based on the content fragment extracted in the first step.
[0050] Step 3: Based on the atomic fact information generated in step 2, generate complete search terms suitable for search engines. If there are multiple search terms, please use [next] to separate them. 】
[0051] The original text information A and the guide information B can be sent to the server and input into the target large model. Under the guidance of the guide information B, the target large model extracts the text fragment based on the original text information A, and the content is as follows:
[0052] [The golden apple snail is actually an alien species from tropical and subtropical regions of South America. It was introduced to Asia in the 1970s and was originally used as a food resource.
[0053] The golden apple snail contains up to 6,000 parasites, which are extremely harmful to human health.
[0054] Then, based on the above text fragments, the target atomic fact information is generated as follows:
[0055] [1. Golden apple snails come from tropical and subtropical regions of South America;
[0056] 2. The golden apple snail was introduced to Asia in the 1970s;
[0057] 3. The golden apple snail was introduced to Asia as a food;
[0058] 4. The body of the golden apple snail contains up to 6,000 parasites;
[0059] 5. Parasites are extremely harmful to human health.
[0060] Finally, based on the target atomic fact information, a query statement is generated, as follows:
[0061] [Origin of the Golden Apple Snail[next]Does the Golden Apple Snail originate from South America? [next]When was the Golden Apple Snail introduced to Asia[next]Why was the Golden Apple Snail introduced to Asia[next]Were the Golden Apple Snails introduced as food? [next]Does the Golden Apple Snail have parasites? [next]How many parasites are there in the Golden Apple Snail? [next]Parasites in the human body[next]]
[0062] It can be understood that the above is only an example provided for this implementation. Some contents in the example are not necessary and can be omitted. Other contents can also be added to the example. This embodiment does not limit the specific contents of the original text information and the guide information.
[0063] In step 203, reference information related to the search key point is obtained by searching from designated data based on the query statement.
[0064] In this embodiment, the target large model can return the generated query statement to the client in the terminal device through the network. The client can directly use the query statement to search, for example, it can directly call the search interface and use the query statement to search in the specified data to obtain reference information related to the search point. Among them, the specified data can include but is not limited to a local database, an external database with query authority, any data that can be queried through the Internet, etc. It can be understood that this embodiment does not limit the specific source of the specified data. Among them, the reference information related to the search point can be the search result searched by using the query statement.
[0065] In step 204, the consistency between the reference information and the search key points is evaluated, and in step 205, the original text information is modified based on the evaluation result.
[0066] In this embodiment, the client can further instruct the target large model to evaluate the consistency of the reference information and the retrieval points based on the reference information. Specifically, the original text information, reference information and guide information can be input into the target large model through the network and the server; or the text fragments, reference information and guide information related to the retrieval points in the original text information can be input into the target large model through the network and the server; or the original text information and the location identifiers, reference information and guide information corresponding to the text fragments related to the retrieval points in the original text information can be input into the target large model through the network and the server. The target large model can evaluate the consistency of the reference information and the retrieval points based on the input information, and return the obtained evaluation results to the client. The client can output the evaluation results obtained by the target large model to the user through the user interface.
[0067] In this embodiment, the evaluation result may include indication information for indicating whether the reference information and the search key points are consistent. If the reference information and the search key points are inconsistent, the evaluation result may also include difference information between the reference information and the search key points. For example, when comparing reference information C with search key point D, if the content is consistent, the indication information may be [the content of the text is consistent with the reference information]. If the content is inconsistent, the indication information may be [the content of the text is inconsistent with the reference information. The reference information indicates that ..., which is different from what the content of the text indicates ...].
[0068] In this embodiment, in addition to outputting the evaluation results, the client can also output at least one of the following: a text segment related to the search key point; target atomic fact information corresponding to the search key point; a query statement; and reference information. Figure 3 As shown, interface 301 is an evaluation result display interface provided by the client, wherein in text area 302, the content of text fragments related to the retrieval points can be displayed; in text area 303, the target atomic fact information corresponding to the retrieval points can be displayed; in text area 304, the query statement can be displayed; in text area 305, the reference information (i.e., search results) obtained based on the query statement search can be displayed; in text area 306, the evaluation results returned by the target large model can be displayed.
[0069] Further, after completing step 205, at least in the case where the reference information and the retrieval key points are inconsistent, the client can instruct the target macro model to modify the original text information based on the reference information. For example, in one implementation, if the reference information and the retrieval key points are inconsistent, the client can directly instruct the target macro model to modify the original text information based on the reference information. In another implementation, if the reference information and the retrieval key points are inconsistent, the client can provide a button to the user through the user interface, and when the user triggers the button, the client instructs the target macro model to modify the original text information based on the reference information.
[0070] Specifically, when the client instructs the target large model to modify the original text information based on the reference information, the text content to be modified and the context of the text content to be modified in the original text information can be obtained first. For example, the client can provide an input interface to the user, and the user can input the text content to be modified and the context of the text content to be modified in the original text information through the input interface. For another example, the client can also directly analyze the position of the text content to be modified in the original text information based on the evaluation results, and obtain the text content to be modified and the context of the text content to be modified from the original text information.
[0071] Next, the modification information and guidance information for modifying the text content to be modified can be determined. For example, the client can provide a modification interface to the user, and the user can input the modification information and guidance information for modifying the text content to be modified through the modification interface. For another example, the client can also determine the modification information for modifying the text content to be modified and obtain the pre-set guidance information by analyzing the evaluation results based on preset rules or pre-trained models. It can be understood that this embodiment does not limit the specific method of determining the modification information and guidance information for modifying the text content to be modified.
[0072] Finally, the text content to be modified, the guide information, the modification information, and the context of the text content to be modified can be sent to the target large model. The target large model can modify the text content to be modified based on the guide information and the modification information. And based on the context of the text content to be modified, the modified text content is inserted between the contexts to obtain the modification result. The modification result is then returned to the client. On the one hand, the client can display the modification result to the user. On the other hand, the client can modify the original text information according to the modification result. For example, the client can find the modified text content according to the context of the text content to be modified, and use the modification result to modify the content to be modified.
[0073] Since this embodiment can modify erroneous text information, more modification methods are provided to the user, making it more convenient for the user to process the text information, thereby improving the user experience.
[0074] The present disclosure provides a method for correcting text information, which generates a query statement based on the original text information, the query statement is used to search for the retrieval points involved in the original text information, searches from the specified data based on the query statement, obtains reference information related to the retrieval points, evaluates the consistency of the reference information and the retrieval points, and corrects the original text information based on the evaluation results. There is no need to manually check the original text information for errors, so that the content that may have errors in the original text information can be quickly and accurately checked, which provides convenience for users and improves user experience.
[0075] Figure 4 is a flowchart of another method for correcting text information according to an exemplary embodiment. The embodiment describes a process of generating a query statement, including the following steps:
[0076] like Figure 4 As shown, in step 401, a text segment related to the retrieval point is extracted from the original text information.
[0077] In this embodiment, the client can instruct the target macromodel to extract the text segment related to the search key point from the original text information. For example, in one implementation, the client can directly instruct the target macromodel to extract the text segment related to the search key point from the original text information through the guidance information for obtaining the search key point.
[0078] In another implementation, in addition to sending the original text information and guidance information to the target large model, the client also sends the category of the original text information to the target large model and adds guidance information for the category. This enables the target large model to extract text fragments involving retrieval points from the original text information based on the category of the original text information and the guidance information. Specifically, due to the high probability that text information in categories such as information and popular science contains more objective knowledge or factual content. However, text information in categories such as emotions, inspirations, and advertisements usually contains more subjective content and no or less objective knowledge or factual content. Therefore, the target large model can extract text fragments involving retrieval points from the original text information based on the category of the original text information and the guidance information for the category. Thereby improving the accuracy of the extracted retrieval points and reducing the possibility of using subjective content as retrieval points.
[0079] Furthermore, the client may instruct the target macromodel to mark the text segments related to the search key points. Specifically, the target macromodel may obtain the segment tags corresponding to each of the multiple content segments divided from the original text information, and the segment tags may be, for example, numbers. The client may directly mark the multiple content segments divided from the original text information, and send the tags to the target macromodel at the same time. The target macromodel may also mark each of the multiple content segments divided from the original text information after analyzing the original text information.
[0080] Next, after extracting the text fragments related to the search key points, the target large model can determine the fragment mark corresponding to the text fragment. After evaluating the consistency of the reference information and the search key points, if the evaluation indicates inconsistency, the target fragment mark corresponding to the inconsistent search key points is determined. Then, the content fragment corresponding to the target fragment mark in the original text information can be determined. In this way, the problematic content in the original text information can be quickly located, which provides more convenience for users.
[0081] In step 402, based on the above text segment, target atomic fact information corresponding to the search point is generated.
[0082] In this embodiment, since the above-mentioned text fragment is the content in the original text information, it may contain referential words, and the query statement generated based on the referential words will greatly affect the retrieval effect. Based on this, the initial atomic fact information corresponding to the retrieval point can be generated according to the above-mentioned text fragment. If the initial atomic fact information includes referential word information used for reference, the target content referred to by the referential word information can be obtained based on the original text information, and the referential word information can be replaced with the target content to obtain the target atomic fact information. Thereby, the accuracy of the target atomic fact information is improved, and the meaning expressed by the target atomic fact information is clearer. Among them, the specified word information can be a pronoun, or a referential phrase, etc.
[0083] For example, the text fragment is [Such a super bodyguard team has an annual security fee of 180 million, which is more than ten times what XXX spends]. The initial atomic fact information based on the text fragment can be [1. The annual security fee of this bodyguard team is 180 million; 2. The annual security fee of this bodyguard team is more than ten times that of XXX]. Among them, "this" is the referential word information. It can be determined based on the original text information that "this" refers to person A. Therefore, after replacement, the target atomic fact information can be [1. The annual security fee of A's bodyguard team is 180 million; 2. The annual security fee of A's bodyguard team is more than ten times that of XXX].
[0084] In step 403, a query statement is generated based on the target atomic fact information.
[0085] In this embodiment, a search question can be determined based on the target atomic fact information, and then a query statement including a search term can be generated based on the search question. For example, if the target atomic fact information is [1. Apple snails come from tropical and subtropical regions of South America; 2. Apple snails were introduced to Asia in the 1970s; 3. Apple snails were introduced to Asia as a food], the search question can be [1. It is necessary to determine whether the Apple snails come from tropical and subtropical regions of South America, so the origin of the Apple snails is searched; 2. It is necessary to determine whether the Apple snails were introduced in the 1970s, so the time when the Apple snails were introduced is searched; 3. It is necessary to determine whether the Apple snails were introduced to Asia as food, so the reason for the introduction of the Apple snails is searched]. The query statement generated based on the search question can be [Origin of Apple snails [next] Is the Apple snail originated from South America? [next] Time when the Apple snails were introduced to Asia [next] Reasons for the introduction of Apple snails to Asia [next] Is the introduction of Apple snails as food? ].
[0086] In this embodiment, the text segments related to the search key points are first extracted from the original text information, and then the target atomic fact information corresponding to the search key points is generated based on the text segments, and the query statement is generated based on the target atomic fact information. Therefore, the generation of invalid information irrelevant to the search key points is avoided, the simplicity of the target atomic fact information is improved, and the user experience is further improved.
[0087] It should be noted that although the operations of the method of the disclosed embodiment are described in a specific order in the above embodiments, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0088] Corresponding to the aforementioned text information correction method embodiment, the present disclosure also provides an embodiment of a text information correction device.
[0089] like Figure 5 As shown, Figure 5 1 is a block diagram of a text information correction device according to an exemplary embodiment of the present disclosure. The device may include: an acquisition unit 501, a generation unit 502, a search unit 503, an evaluation unit 504 and a correction unit 505.
[0090] The acquisition unit 501 is configured to acquire original text information to be processed.
[0091] The generating unit 502 is configured to generate a query statement based on the original text information, where the query statement is used to search for the retrieval key points involved in the original text information.
[0092] The search unit 503 is configured to search the designated data based on the query statement to obtain reference information related to the search key point.
[0093] The evaluation unit 504 is configured to evaluate the consistency between the reference information and the search key points to obtain an evaluation result.
[0094] The correction unit 505 is configured to correct the original text information based on the evaluation result.
[0095] In some embodiments, the generation unit 502 generates a query statement based on the original text information, including the following operations: extracting a text segment related to the retrieval point from the original text information, generating target atomic fact information corresponding to the retrieval point based on the text segment, and generating a query statement based on the target atomic fact information.
[0096] In other embodiments, target atomic fact information corresponding to the search point is generated based on the text fragment in the following manner: based on the text fragment, initial atomic fact information corresponding to the search point is generated; if the initial atomic fact information includes reference word information for reference, based on the original text information, the target content referred to by the reference word information is obtained; the reference word information is replaced with the target content to obtain the target atomic fact information.
[0097] In other embodiments, a query statement is generated based on the target atom fact information in the following manner: a search question is determined based on the target atom fact information; and a query statement including a search term is generated based on the search question.
[0098] In other embodiments, the generation unit 502 also performs the following operations including: obtaining the fragment tags corresponding to each of the multiple content fragments divided according to the original text information; after taking out the text fragment related to the retrieval point, determining the fragment tag corresponding to the text fragment; after evaluating the consistency of the reference information and the retrieval point, if the evaluation indicates inconsistency, determining the target fragment tag corresponding to the inconsistent retrieval point; and determining the content fragment corresponding to the target fragment tag in the original text information.
[0099] In other embodiments, the device may also include: an output unit (not shown in the figure), which further outputs at least one of the following contents: a text fragment related to the retrieval point; target atomic fact information corresponding to the retrieval point; a query statement; and reference information.
[0100] In other implementations, the evaluation result includes indication information for indicating whether the reference information and the search key points are consistent; if the reference information and the search key points are inconsistent, the evaluation result also includes difference information between the reference information and the search key points.
[0101] In other implementations, the correction unit 50 is configured to: obtain the text content to be modified in the original text information; determine the modification information and guidance information for modifying the text content to be modified; and modify the text content to be modified based on the guidance information and the modification information.
[0102] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0103] Reference below Figure 6 , Figure 6 A schematic block diagram of an electronic device provided for some embodiments of the present disclosure. The electronic device 920 is suitable for implementing the method for processing text information based on a large language model provided in an embodiment of the present disclosure. The electronic device 920 may be a terminal device, etc., and may be used to implement a client or a server. The electronic device 920 may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that Figure 6 The electronic device 920 shown is only an example and does not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0104] like Figure 6As shown, the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. In the RAM 923, various programs and data required for the operation of the electronic device 920 are also stored. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.
[0105] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 920 is shown to have various devices, but it should be understood that it is not required to implement or possess all of the devices shown, and the electronic device 920 may alternatively implement or possess more or fewer devices. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0106] According to an embodiment of the present disclosure, the above-mentioned method for processing text information based on a large language model can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned method for processing text information based on a large language model. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the method for processing text information based on a large language model provided in the embodiment of the present disclosure can be implemented.
[0107] The embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method provided by the present disclosure.
[0108] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. 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 of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0109] Computer program code for performing the operations of the disclosed embodiments 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0111] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present disclosure can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0112] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present disclosure in detail. It should be understood that the above description is only the specific implementation method of the embodiments of the present disclosure, and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present disclosure shall be included in the scope of protection of the present invention.
Claims
1. A method for correcting text information, the method comprising: Get the original text information to be processed; Generate a query statement based on the original text information; The query statement is used to search for the retrieval points involved in the original text information; Searching from designated data based on the query statement to obtain reference information related to the search key points; Evaluate the consistency between the reference information and the search key points to obtain an evaluation result; The original text information is modified based on the evaluation result.
2. The method according to claim 1, wherein: The step of generating a query statement based on the original text information includes the following operations: Extracting a text segment related to the search key point from the original text information; Based on the text segment, generating target atomic fact information corresponding to the search key point; The query statement is generated based on the target atomic fact information.
3. The method according to claim 2, wherein: The step of generating target atomic fact information corresponding to the search key points based on the text segment includes: Based on the text segment, generating initial atomic fact information corresponding to the search key point; If the initial atomic fact information includes reference word information used for reference, based on the original text information, obtaining the target content referred to by the reference word information; The reference term information is replaced with the target content to obtain the target atomic fact information.
4. The method according to claim 2, wherein: The step of generating the query statement based on the target atomic fact information includes: Determining a search question based on the target atomic fact information; Based on the search question, a query statement including search terms is generated.
5. The method according to claim 2, wherein: The following operations are also performed: Obtaining segment marks corresponding to each of the plurality of content segments divided into the original text information; After extracting the text segment related to the search key point, determining the segment mark corresponding to the text segment; After evaluating the consistency between the reference information and the search key point, if the evaluation indicates inconsistency, determining a target segment tag corresponding to the inconsistent search key point; A content segment corresponding to the target segment mark in the original text information is determined.
6. The method according to claim 2, wherein: The method further includes outputting at least one of the following: The text fragment related to the search point; The target atomic fact information corresponding to the search key point; the query statement; and The reference information.
7. The method according to claim 1, wherein: The evaluation result includes indication information for indicating whether the reference information is consistent with the search key point; if the reference information is inconsistent with the search key point, the evaluation result also includes difference information between the reference information and the search key point.
8. The method according to claim 1, wherein: The modifying the original text information based on the evaluation result includes: Obtaining the text content to be modified in the original text information; Determine modification information and guidance information for modifying the text content to be modified; The text content to be modified is modified based on the guide information and the modification information.
9. A device for correcting text information, the device comprising: An acquisition unit, configured to acquire original text information to be processed; A generating unit, configured to generate a query statement based on the original text information; The query statement is used to search for the retrieval key points involved in the original text information; A search unit configured to search from designated data based on the query statement to obtain reference information related to the search key point; An evaluation unit configured to evaluate the consistency between the reference information and the search key points to obtain an evaluation result; A correction unit is configured to correct the original text information based on the evaluation result.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 8.
12. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Text correction method, electronic device, storage medium and computer program product
CN121524341A
Text correction method, electronic device, storage medium, and computer program product
CN121524341B