Text polishing method and device, medium, electronic equipment and program product

By generating the first report text and calling the large language model for polishing, combined with the verification of the second report text, the problem of semantic inaccurate text after polishing in the prior art is solved, and a high-accurate text polishing effect is achieved.

CN119903820APending Publication Date: 2025-04-29BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510127747.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Existing text polishing technology cannot ensure that the polished text remains semantically accurate with the original text, especially when processing data reports, it is difficult to ensure 100% accuracy of the data.

Method used

By generating the first report text corresponding to the original text, calling the large language model to polish the first report text, obtaining the polished second report text, and verifying the second report text based on the first report text to ensure its semantic accuracy.

Benefits of technology

After polishing the text through a large language model, semantic accuracy is ensured through verification, thereby improving the text accuracy after polishing, especially when processing data reports, ensuring 100% accuracy of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903820A_ABST
    Figure CN119903820A_ABST
Patent Text Reader

Abstract

The invention provides a text embellishing method and device, a medium, electronic equipment and a program product, and relates to the technical field of natural language process.The method comprises the steps that a first report text corresponding to an original text is generated, a large language model is called to embellish the first report text, a second report text is obtained, and on the basis of the first report text, text embellishing is conducted; according to the method, the second report text is verified, and the second report text is output under the condition that the verification of the second report text is passed, so that the text can be polished through the large language model, and the accuracy of the second report text can be ensured by verifying the second report text, so that the semantic error of the second report text is avoided. Especially for report texts including data, it is difficult to ensure that the data can be 100% accurate, and it can be ensured that the data in the finally output second report text can be 100% accurate by verifying the second report text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of natural language processing technology, and in particular, to a text polishing method, device, medium, electronic device, and program product. Background Art

[0002] Text polishing involves adding common techniques, such as rhetoric and description, to a text, resulting in a more polished text. However, related text polishing techniques have limitations and cannot guarantee semantic accuracy between the polished text and the original text. Summary of the Invention

[0003] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a text polishing method, comprising: generating a first report text corresponding to the original text according to the original text; calling a large language model to polish the first report text to obtain a polished second report text; The second report text is verified based on the first report text, and the second report text is output if the second report text passes the verification.

[0005] In a second aspect, the present disclosure provides a text polishing device, comprising: A generating module configured to generate a first report text corresponding to the original text according to the original text; a polishing module configured to call a large language model to polish the first report text to obtain a polished second report text; The verification module is configured to verify the second report text based on the first report text, and output the second report text if the second report text passes the verification.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Based on the above technical solution, a first report text corresponding to the original text is generated according to the original text, and then the large language model is called to polish the first report text to obtain a polished second report text. The second report text is verified based on the first report text, and the second report text is output when the second report text passes the verification. Not only can the text be polished by the large language model, but the accuracy of the second report text can also be guaranteed by verifying the second report text, so as to avoid semantic errors in the polished second report text due to the illusion problem existing in the large language model itself. In particular, when facing a report text that includes data, it is difficult to ensure that the data is 100% accurate by simply requiring the large language model to ensure the accuracy of the data when generating the data in the prompt words. However, by verifying the second report text, it can be guaranteed that the data in the final output second report text is 100% accurate, which greatly improves the accuracy of the polished second report text.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The present invention is a flowchart of a text polishing method according to an exemplary embodiment.

[0012] Figure 2 The figure is an overall flow chart of a text polishing method according to an exemplary embodiment.

[0013] Figure 3 The figure is a flowchart showing a method for polishing text using a large language model according to an exemplary embodiment.

[0014] Figure 4 It is a schematic diagram of text verification according to an exemplary embodiment.

[0015] Figure 5 The figure is a schematic structural diagram of a text polishing device according to an exemplary embodiment.

[0016] Figure 6It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0017] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0018] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0019] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0021] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0023] Figure 1 FIG. 1 is a flowchart of a text polishing method according to an exemplary embodiment. Figure 1 As shown, the embodiment of the present disclosure provides a text polishing method, which can be specifically performed by a text polishing device, which can be implemented by software and / or hardware and configured in an electronic device. Figure 1 As shown, the method may include the following steps.

[0024] In step 110 , a first report text corresponding to the original text is generated based on the original text.

[0025] Here, the original text may refer to the initial text data that serves as the basis for generating the first report text. It should be understood that the original text can be a file uploaded by the user or text content directly entered. The original text may vary in different scenarios. For example, when interpreting data from a promotion account on a promotion platform, the original text may be the promotion data associated with the promotion account.

[0026] The first report text may be a report text generated by summarizing and pre-polishing the original text. The first report text may be presented in the form of a report. For example, if the original text may be "The month-on-month change rate of account consumption is 306.7%," the first report text generated based on the original text may be "Your account consumption increased by 306.7% compared to the previous period."

[0027] Exemplarily, the first report text may be generated according to the original text by a text generation engine. The original text may be input into the text generation engine to obtain the first report text output by the text generation engine.

[0028] In step 120 , the large language model is called to polish the first report text to obtain a polished second report text.

[0029] Here, the second report text is obtained by the large language model polishing the first report text based on the first report text. For example, the first report text can be input into the large language model to obtain the second report text after the large language model polishes the first report text.

[0030] The large language model uses natural language processing to improve the quality, style, and readability of the first report. For example, if the first report is "Your account consumption increased by 306.7% compared to the previous period," the second report could be "Your account consumption increased by 306.7% compared to the previous period. You are truly the king of the advertising industry!"

[0031] It should be noted that the large language model provided in the embodiments of this disclosure is a pre-trained large language model that can effectively perform text polishing. This large language model can understand the nuances of language and generate fluent, accurate, and attractive text. In the embodiments of this disclosure, the training process of the large language model is not specifically limited.

[0032] In step 130 , the second report text is verified based on the first report text, and the second report text is output if the second report text passes the verification.

[0033] Here, after obtaining the second report text, the second report text can be verified based on the first report text to ensure that the second report text maintains semantic accuracy with the first report text. In other words, verifying the second report text is essentially a quality inspection of the first report text.

[0034] Exemplarily, the semantics of the second report text may be verified based on the semantics of the first report text, and if the semantics of the second report text are consistent with the semantics of the first report text, it is determined that the second report text has passed the verification.

[0035] For example, assuming that the text of the first report is "Your account has increased by 306.7% compared to the previous period", and the text of the second report is "Your account consumption has increased by 306.7% compared to the previous period. You are truly the king of the investment industry!", verifying the second report text can refer to verifying whether the value "306.7%" in the second report text is accurate relative to the value "306.7%" in the first report text.

[0036] Of course, the verification rules for report texts of different scenario types can be different and can be set specifically based on the scenario type. For example, for the first report text "You are such a beautiful person", if the second report text is "You are such an ugly person", the semantics of the second report text will change relative to the semantics of the first report text, and accordingly, the second report text will fail verification.

[0037] It is worth noting that by verifying the second report text after polishing by the large language model, it is possible to avoid semantic errors in the polished second report text caused by the hallucination problem existing in the large language model itself, thereby ensuring that the polished second report text is 100% accurate.

[0038] When the second report text passes the verification, the second report text obtained after polishing the first report text can be input to the user, so that the final output second report text has higher readability and emotional color.

[0039] It should be noted that if the second report text fails to pass the verification, the first report text can be output. Thus, by generating a first report text corresponding to the original text based on the original text, and then calling the large language model to polish the first report text to obtain the polished second report text, and based on the first report text, verifying the second report text, and outputting the second report text if the second report text passes the verification, not only can the text be polished by the large language model, but also by verifying the second report text, the accuracy of the second report text can be guaranteed, so as to avoid semantic errors in the polished second report text caused by the illusion problem existing in the large language model itself. In particular, when facing a report text that includes data, it is difficult to ensure that the data is 100% accurate by simply requiring the large language model to ensure the accuracy of the data when generating the data in the prompt words. However, by verifying the second report text, it can be guaranteed that the data in the final output second report text is 100% accurate, which greatly improves the accuracy of the polished second report text.

[0040] In some feasible implementations, in step 120, for each text segment in the first report text, a large language model is called to polish the text segment to obtain the polished text segment, and then a second report text is obtained based on the polished text segment.

[0041] Here, the first report text generated by the text generation engine may be split into multiple text segments, and then the large language model is called to polish each text segment to obtain polished text segments.

[0042] It should be noted that when the first report text is divided into a plurality of text segments, the first report text may be divided into a plurality of semantically relatively independent text segments according to semantic differences.

[0043] Of course, for each text segment, whether the text segment needs to be polished can be determined by the user. In other words, the user can select a text segment to be polished or not. In a specific implementation, a corresponding switch for controlling whether the text segment needs to be polished can be set for each text segment, and the user can use this switch to select the text segment to be polished.

[0044] It is worth noting that if the first report text is input into the large language model at one time, since the large language model may not be able to handle more information input well, and when a large amount of information is input into the large language model, the polished text output by the large language model may not meet the requirements. Therefore, by splitting the first report text into multiple text segments, not only can the polished second report text that meets the requirements be obtained, but also for each text segment in the first report text, the large language model can be called concurrently to polish each text segment, thereby improving the speed at which the large language model polishes the first report text.

[0045] In some embodiments, for each text segment in the first report text, a prompt word corresponding to the text segment is determined, and the prompt word and the text segment are input into a large language model to obtain a polished text segment output by the large language.

[0046] For each text segment, a corresponding prompt can be configured. The prompt guides the large language model to generate a specific output based on the first report text. For example, the prompt can define the emotional tone that the large language model uses to polish the first report text, guiding the large language model to output a second report text that matches the desired emotional tone.

[0047] It should be noted that for each text segment, the corresponding prompt word can be different. The prompt word can be customized by the user. Of course, the prompt word can also be automatically generated by a large language model based on the text segment.

[0048] The text segments and the corresponding prompt words can be spliced ​​together, and the spliced ​​text segments can be input into the large language model to obtain the polished text segments output by the large language model.

[0049] After obtaining the polished text segments output by the large language model, all polished text segments can be assembled to obtain a second report text. It should be noted that for text segments that do not require polishing, the polished text segments and unpolished text segments can also be assembled into the second report text in the order of the text segments.

[0050] Therefore, by using the large language model to polish each text segment separately, it can not only ensure that the polished second report text can meet the user's text polishing requirements, but also improve the speed of the large language model in polishing the text, so that the speed of the large language model in producing report text can be maintained within 5 seconds, greatly improving the efficiency of the large language model in polishing the text and reducing the delay in text polishing.

[0051] In some feasible implementations, in step 130, the text features of the second report text can be compared with the text features of the first report text, and if the text features of the second report text and the text features of the first report text meet preset conditions, it is determined that the second report text has passed the verification.

[0052] Here, the text feature may refer to a semantic feature of the report text. The preset condition may be that the semantic feature of the second report text is consistent with the semantic feature of the first report text. By comparing the text features of the second report text with the text features of the first report text, if the text features of the second report text are consistent with the text features of the first report text, it is determined that the second report text has passed verification.

[0053] In some embodiments, the text feature includes at least one of a text style, a numerical feature, and a text length.

[0054] The text style may refer to a text markup style used in the report text, for example, bold, italic, color markup, etc., used to mark text prominently.

[0055] For example, in the first report text "Your account increased by 306.7% compared to the previous period", the text "increased by 306.7%" can be marked in green to highlight "increased by 306.7%". Accordingly, green is the corresponding text marking style.

[0056] It should be noted that the text style can include the tag category corresponding to the text style used in the report text, the number of tags used in the report text, and the tag order used in the report text. For example, in a text, different characters are highlighted by green and red, and green and red correspond to different categories of tags respectively. Different characters are highlighted by bold and italic, and bold and italic correspond to different categories of tags respectively.

[0057] The numerical feature may refer to a feature of a number included in the report text. For example, the numerical feature may include the number included in the report text, the number of numbers included in the report text, the order of numbers included in the report text, and the like.

[0058] Text length can refer to the number of characters or words in the report text. Note that text length can be expressed in either characters or words, and can be set based on actual needs. For example, for the second report text "Your account consumption increased by 306.7% compared to the previous period, truly worthy of being the king of the advertising industry!", if the text length is measured in characters, the second report text's text length is 30; if the text length is measured in words, the second report text's text length is 25.

[0059] Correspondingly, the preset conditions include: a condition set for the text style indicating that the text style of the second report text is consistent with the text style of the first report text; a condition set for the numerical feature indicating that the numerical feature of the second report text is consistent with the numerical feature of the first report text; a condition set for the text length indicating that the text length of the second report text is within a preset length range, and the preset length range is related to the text length of the first report text.

[0060] Among them, for the text feature of text style, the corresponding preset condition is that the text style of the second report text is consistent with the text style of the first report text.

[0061] Continuing with the above embodiment, when the text style includes a tag category, a tag number, and a tag order, the condition set for the text style indicating that the text style of the second report text is consistent with the text style of the first report text may mean that the tag category included in the second report text is consistent with the tag category included in the first report text, the number of tags in the second report text is consistent with the number of tags in the first report text, and the tag order of the second report text is consistent with the tag order of the first report text.

[0062] That is, when verifying the second report text, it is possible to verify whether the tag categories included in the second report text are the same as the tag types included in the first report text, verify whether the number of tags in the second report text is the same as the number of tags in the first report text, and verify whether the tag order in the second report text is the same as the tag order in the first report text. If all of these are the same, it is determined that the corresponding conditions are met. It should be understood that the text style of the second report text is consistent with the text style of the first report text, which actually means that the tag category, number of tags, and tag order used in the second report text are consistent with those of the first report text.

[0063] For the text feature of the numerical feature, the corresponding preset condition is that the numerical feature of the second report text is consistent with the numerical feature of the first report text.

[0064] Continuing from the above embodiment, when the numerical features are the numbers included in the report text, the number of numbers included in the report text, and the order of numbers included in the report text, the conditions set for the numerical features to indicate that the numerical features of the second report text are consistent with the numerical features of the first report text may mean that the numbers included in the second report text are consistent with the numbers included in the first report text, the number of numbers included in the second report text is consistent with the number of numbers included in the first report text, and the order of numbers included in the second report text is consistent with the order of numbers included in the first report text.

[0065] That is to say, when verifying the second report text, it is possible to verify whether the numbers included in the second report text are the same as the numbers included in the first report text, verify whether the number of numbers in the second report text is the same as the number of numbers in the first report text, and verify whether the order of numbers in the second report text is the same as the order of numbers in the first report text. If all of them are the same, it is determined that the corresponding conditions are met. It should be understood that the numerical characteristics of the second report text are consistent with the numerical characteristics of the first report text, which actually means that the numbers, number of numbers, and order of numbers used in the second report text are consistent with those in the first report text, which means that in terms of numerical values, the polished second report text is consistent with the first report text before polishing.

[0066] It is worth noting that, for a report text of the data report type, the text features set therein may at least include numerical features to ensure that the numerical values ​​in the polished second report text are consistent with those in the first report text.

[0067] With respect to the text feature of text length, the corresponding preset condition is that the text length of the second report text is within a preset length range.

[0068] Among them, the preset length range can be determined by the text length of the first report text. For example, the upper limit value in the preset length range can be the text length of the first report text multiplied by a first preset percentage, and the lower limit value in the preset length range can be the text length of the first report text multiplied by a second preset percentage, and the second preset percentage is greater than the first preset percentage. It should be understood that the second preset percentage and the first preset percentage can be set by the user according to actual needs, and the text length of the second report text being within the preset length range can mean that the text length of the second report text is within an appropriate range, that is, the text length of the second report text is neither too short nor too long.

[0069] It is worth noting that, when the text features include at least two of text style, numerical features and text length, passing the second report text verification may mean that the text features of the second report text meet the preset conditions corresponding to the text features of all dimensions.

[0070] Thus, by verifying that the textual features of the second report text meet the preset conditions with those of the first report text, the second report text output by the large language model can be guaranteed to be 100% correct in terms of textual features relative to the first report text, thus avoiding errors in the polished second report text due to hallucinations by the large language model. This is particularly true for data report-type reports, ensuring that the polished second report text is 100% accurate in both data and textual style, greatly improving the accuracy of the second report text polished by the large language model.

[0071] In some feasible implementations, in step 110 , a template matching the semantic information may be determined based on the semantic information of the original text, and then a first report text may be generated based on the template and the original text.

[0072] Here, for a report text of a data report type, the semantic information of the original text may refer to the scenario type to which the original text belongs and the data change status corresponding to the data included in the original text.

[0073] The scenario type can refer to the type of data. For example, for a promotion account report, the scenario type can refer to the specific data type targeted by the original report. For example, the scenario type can refer to the consumption of the promotion account, the ROI (Return on Investment) of the promotion account, and so on.

[0074] The data change status can refer to the increase or decrease of the data of the corresponding scenario type. For example, for the consumption of the promotion account, the corresponding data change status of the consumption of the promotion account can be consumption increase, unchanged, or decrease.

[0075] It is worth noting that both the scene type and the data change status can be determined based on the keywords included in the original text. For example, the scene type can be determined based on the keywords representing the scene type in the original text. The data change status can be determined based on the keywords representing the data change in the original text.

[0076] Different templates can be matched to different semantic information, where the templates include pre-polished texts that match the semantic information and are pre-generated by a large language model.

[0077] It should be understood that a template can be understood as pre-polished text that is pre-generated by the large language model and matches the semantic information. Templates pre-generated by the large language model for different semantic information can be stored in the dynamic configuration center. Of course, the templates stored in the dynamic configuration center can also be generated by the large language model based on the original text and manually verified.

[0078] After the original text is acquired, a template matching the semantic information can be searched for in the dynamic configuration center according to the semantic information of the original text, and a first report text can be generated according to the template and the original text.

[0079] It should be noted that generating the first report text according to the template and the original text may be filling in the information in the original text into the template to generate the corresponding first report text.

[0080] In some embodiments, a template matching both the scene type and the data change state may be determined based on the scene type and the data change state.

[0081] For example, for the original text "The month-on-month change rate of account consumption is xx%," the scenario type is account consumption. If the data change status of the original text indicates that xx% is greater than 0, the corresponding template is "Your account consumption increased by xx% compared to the previous period," with "increased by xx%" marked in green. If the data change status of the original text indicates that xx% is equal to 0, the corresponding template is "Your account consumption remains the same as the previous period." If the data change status of the original text indicates that xx% is less than 0, the corresponding template is "Your account consumption decreased by xx% compared to the previous period," with "decreased by xx%" marked in red.

[0082] Following the above implementation, it's worth noting that because the template is pre-polished text generated by the large language model, if the second report text fails verification in step 130, the directly output first report text can also meet the polishing requirements. In other words, the first report text generated by the template is a pre-polished text that initially passes. If the large language model fails to polish the first report text, the first report text can be directly used as a backup polishing text.

[0083] Therefore, through the above embodiment, not only can the template be used to generate the pre-polished text, but the dynamic configuration center and the verification mechanism can also ensure that the polished second report text is 100% accurate.

[0084] The following is combined with Figure 2 , Attachment Figure 3 and attached Figure 4 The above-mentioned embodiment will be described in detail.

[0085] Figure 2 FIG. 1 is an overall flow chart of a text polishing method according to an exemplary embodiment. Figure 2As shown, a first report text is generated based on the original text through a text generation engine. The text generation engine can generate the first report text based on the template in the dynamic configuration center, and business knowledge can be injected into the generated first report text by using the template. Then, for the text segments in the first report text, the large language model is called concurrently to generate polished text segments corresponding to each text segment. Then, for the polished text segments, the polished text segments are verified concurrently, and after the verification passes, the polished text segments are used to assemble the text to obtain the second report text.

[0086] Figure 3 FIG. 1 is a flowchart of polishing text using a large language model according to an exemplary embodiment. Figure 3 As shown, the original text is input into the text generation engine to obtain the corresponding text segments (the text segments in the first report text). Then, for each text segment, it is determined whether the text segment needs to be polished. If not, the original text segment (the text segment output by the text generation engine) is output. If polishing is required, prompt words are assembled for the text segment, and the large language model is used to polish the text segment to obtain the polished text segment. Next, the polished text segment is verified by the verification center and determined to pass the verification. If the polished text segment passes the verification, the polished text segment is output. If the polished text segment fails the verification, the original text segment is output. Finally, all text segments are assembled to obtain the second report text.

[0087] Figure 4 FIG. 1 is a schematic diagram of text verification according to an exemplary embodiment. Figure 4 As shown, for a text segment in the second report text, it is determined whether the text segment has been polished. If the text segment has been polished, the polished text segment is verified by a verification center. The verification center can verify whether the text length of the polished text segment is within a preset length range, whether the number of tags in the polished text segment is the same as the number of tags in the original text segment (the text segment in the first report text before polishing), whether the tag category of the polished text segment is the same as the tag category of the original text segment, whether the tag order of the polished text segment is the same as the tag order of the original text segment, whether the number of numbers in the polished text segment is the same as the number of numbers in the original text segment, whether the numbers in the polished text segment are the same as the numbers in the original text segment, and whether the number order of the numbers in the polished text segment is the same as the number of numbers in the original text segment.

[0088] If the verification passes, the polished text segment is output; if the verification fails, the original text segment is output.

[0089] Figure 5 FIG. 1 is a structural diagram of a text polishing device according to an exemplary embodiment. Figure 5 As shown, an embodiment of the present disclosure provides a text polishing device 500, which includes: The generating module 501 is configured to generate a first report text corresponding to the original text according to the original text; A polishing module 502 is configured to call a large language model to polish the first report text to obtain a polished second report text; The verification module 503 is configured to verify the second report text based on the first report text, and output the second report text if the second report text passes the verification.

[0090] Optionally, the polishing module 502 is specifically configured to: For each text segment in the first report text, calling a large language model to polish the text segment to obtain a polished text segment; The second report text is obtained based on the polished text segmentation.

[0091] Optionally, the verification module 503 is specifically configured to: comparing text features of the second report text with text features of the first report text; If the text features of the second report text and the text features of the first report text meet preset conditions, it is determined that the second report text passes verification.

[0092] Optionally, the text feature includes at least one of a text style, a numerical feature, and a text length; The preset conditions include: a condition set for the text style indicating that the text style of the second report text is consistent with the text style of the first report text; a condition set for the numerical feature indicating that the numerical feature of the second report text is consistent with the numerical feature of the first report text; The condition set for the text length indicates that the text length of the second report text is within a preset length range, and the preset length range is related to the text length of the first report text.

[0093] Optionally, the generating module 501 is specifically configured to: Determining, based on the semantic information of the original text, a template that matches the semantic information, wherein the template includes a pre-polished text that matches the semantic information and is pre-generated by a large language model; The first report text is generated according to the template and the original text.

[0094] Optionally, the semantic information includes the scene type to which the original text belongs and the data change status corresponding to the data included in the original text; the generating module 501 is specifically configured to: According to the scene type and the data change state, a template matching both the scene type and the data change state is determined.

[0095] Regarding the text polishing device 500 in the above embodiment, the method logic executed by each functional module has been described in detail in the part about the method, and will not be repeated here.

[0096] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure 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), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0097] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.

[0098] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Figure 6The electronic device 600 is shown with various devices, but 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 instead.

[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart 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 method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0100] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, 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, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may 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 the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.

[0101] In some embodiments, electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can interconnect with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0103] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: generates a first report text corresponding to the original text based on the original text; calls a large language model to polish the first report text to obtain a polished second report text; verifies the second report text based on the first report text, and outputs the second report text if the second report text passes the verification.

[0104] Computer program code for performing the operations of the present disclosure may 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, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer 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).

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

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

[0107] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0108] In the context of the present disclosure, a machine-readable medium may 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 may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on 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), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0109] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0110] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0111] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A text polishing method, characterized in that: include: Generate a first report text corresponding to the original text according to the original text; Calling a large language model to polish the first report text to obtain a polished second report text; The second report text is verified based on the first report text, and the second report text is output if the second report text passes the verification.

2. The method according to claim 1, characterized in that The calling of the large language model to polish the first report text to obtain a polished second report text includes: For each text segment in the first report text, calling a large language model to polish the text segment to obtain a polished text segment; Based on the polished text segments, the second report text is obtained.

3. The method according to claim 1 or 2, characterized in that: The verifying the second report text based on the first report text includes: comparing text features of the second report text with text features of the first report text; When the text features of the second report text and the text features of the first report text meet preset conditions, it is determined that the second report text passes verification.

4. The method according to claim 3, characterized in that The text feature includes at least one of a text style, a numerical feature and a text length; The preset conditions include: a condition set for the text style indicating that the text style of the second report text is consistent with the text style of the first report text; a condition set for the numerical feature indicating that the numerical feature of the second report text is consistent with the numerical feature of the first report text; The condition set for the text length indicates that the text length of the second report text is within a preset length range, and the preset length range is related to the text length of the first report text.

5. The method according to claim 1 or 2, characterized in that: The step of generating a first report text corresponding to the original text according to the original text includes: Based on the semantic information of the original text, determining a template matching the semantic information, wherein the template includes a pre-polished text matching the semantic information that is pre-generated by a large language model; The first report text is generated according to the template and the original text.

6. The method according to claim 5, characterized in that The semantic information includes the scene type to which the original text belongs and the data change status corresponding to the data included in the original text; The step of determining a template matching the semantic information based on the semantic information of the original text includes: According to the scene type and the data change state, a template matching both the scene type and the data change state is determined.

7. A text polishing device, characterized in that: include: A generating module, configured to generate a first report text corresponding to the original text according to the original text; A polishing module is configured to call a large language model to polish the first report text to obtain a polished second report text; The verification module is configured to verify the second report text based on the first report text, and output the second report text if the second report text passes the verification.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.