Text generation method, apparatus, electronic device and computer-readable medium

JP7635396B2Active Publication Date: 2025-02-25BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2023543062
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-01-15
Filing Date
2021-12-17
Publication Date
2025-02-25
Estimated Expiration
2041-12-17

AI Technical Summary

Benefits of technology

【0025】 本開示の前記各実施形態は、本開示のいくつかの実施形態におけるテキスト生成方法によって、テキストトピックの生成効率と精度を向上させる有益な効果を有する。具体的には、テキストトピックを生成する効率と精度が低い原因は、重複された同じテキストに対して重複排除処理されず、重複テキストに対応する重複情報が、その後の計算に関与し、その結果、生成されたテキストに多くの重複テキストが存在し、テキストトピックを生成する効率と精度が低下するためである。これに基づいて、本開示のいくつかの実施形態におけるテキスト生成方法は、まず、処理待ちテキストに基づいて、復号化単語情報セットを決定する。このようにして、生成された復号化単語情報セットは、その後のテキストの重複排除及び目標テキストを生成するためにデータサポートを提供する。次に、前記復号化単語情報セットに対して重複排除処理することによって、候補単語情報セットを生成する。前記復号化単語情報セットにおける各復号化単語情報組には、同じ復号化単語を有する復号化単語情報が存在する場合が多いため、前記同じ復号化単語を有する復号化単語情報を重複排除処理することにより、テキストトピックを生成する効率を向上させることができる。再び、目標単語情報集を得るために、前記候補単語情報セットにおける各候補単語情報組から、目標条件を満たす候補単語情報を目標単語情報として選択することができる。候補単語情報セットから、強い注目を集める目標単語情報集を選択する。最後に、目標単語情報集における各目標単語情報について、目標単語情報が収束条件を満たすと決定したことに応答して、プリセットの単語リストに基づいて、目標単語情報と目標単語情報に対応する過去の目標単語情報シーケンスをテキスト·スティッチングして、目標テキストを生成する。前記プリセットの単語リストは、話し言葉の用語集で構成された単語リストである。前記プリセットの単語リストと、注目度や流暢性の高い目標単語情報集とを組合せることにより、テキストトピックを生成する精度を向上させることができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007635396000001
    Figure 0007635396000001
  • Figure 0007635396000002
    Figure 0007635396000002
  • Figure 0007635396000003
    Figure 0007635396000003
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a text generation method, an apparatus, an electronic device, and a computer-readable medium. The method in a specific embodiment includes the steps of: determining a decoded word information set based on a pending text used to describe a specified object; performing a duplicate elimination process on the decoded word information set to generate a candidate word information set; selecting candidate word information that satisfies a target condition as target word information from each candidate word information set in the candidate word information set to obtain a target word information set; and for each target word information in the target word information set, in response to determining that the target word information satisfies a convergence condition, stitching the target word information and the past target word information sequence corresponding to the target word information based on a preset word list to generate a target text. The above embodiment improves the efficiency and accuracy of generating text topics.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD Embodiments of the present disclosure relate to the field of computer technology, and in particular to text generation methods, apparatus, electronic devices and computer-readable media. [Background technology]

[0002] With the rapid development of computer technology and deep learning technology, breakthroughs have been achieved in various research directions of natural language processing, such as machine translation and text generation (such as generating summaries). In traditional text generation models, the beam search (cluster search) algorithm, which is a commonly used algorithm in the decoding module of text generation models, is often used to greedily solve large solution spaces in the decoding process.

[0003] However, when generating text using the above method, conventional searches often encounter technical problems such as poor efficiency in generating text topics during the decoding process and low accuracy. Summary of the Invention [Problem to be solved by the invention]

[0004] The contents of the present disclosure are used to describe ideas in a concise form, which are described in detail in the following specific embodiment section. The contents of the present disclosure are not intended to identify key features or necessary features of the technical solutions requiring protection, nor are they intended to be used to limit the scope of the technical solutions for which protection is sought. Some embodiments of the present disclosure propose a text generation method, an apparatus, an electronic device, and a computer-readable medium for solving one or more of the technical problems mentioned in the background section above.

[0005] In a first aspect, some embodiments of the present disclosure provide a text generation method, which includes the steps of: determining a decoded word information set based on a text to be processed that is used to describe a specified object; performing a duplicate elimination process on the decoded word information set to generate a candidate word information set; selecting candidate word information that satisfies a target condition from each candidate word information set in the candidate word information set as target word information to obtain a target word information set; and for each target word information in the target word information set, in response to determining that the target word information satisfies a convergence condition, stitching the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text.

[0006] Optionally, determining a decoded word information set based on the pending text includes inputting the pending text to a text encoder to generate an encoded hidden vector, and inputting the encoded hidden vector to a decoder to generate a decoded word information set.

[0007] Optionally, the decoded word information in the decoded word information set includes a decoded word and a decoded word probability value corresponding to the decoded word, and performing a duplicate elimination process on the decoded word information set to generate a candidate word information set includes the steps of: for each decoded word information set in the decoded word information set, dividing the decoded word information set into a duplicate decoded word information set and a single decoded word information set based on the decoded word; selecting duplicate decoded word information that satisfies a preset condition from the duplicate decoded word information set as a target duplicate decoded word information; and stitching the target duplicate decoded word information and the single decoded word information set to generate the candidate word information set.

[0008] Optionally, for each decoded word information set in the decoded word information set, partitioning the decoded word information set into a duplicate decoded word information set and a single decoded word information set based on the decoded word includes, for each decoded word information set in the decoded word information set, in response to there being other decoded word information of a decoded word including the decoded word information in the decoded word information set, placing the decoded word information and the other decoded word information into a duplicate decoded word information set, and otherwise placing the decoded word information into a single decoded word information set.

[0009] Optionally, the candidate word information in the candidate word information set includes a candidate word and a candidate word probability value corresponding to the candidate word, and selecting the candidate word information satisfying the target condition as the target word information from each candidate word information set in the candidate word information set includes the steps of: selecting at least one candidate word information from the candidate word information set according to the order of the candidate word probability value from the largest to the smallest for each candidate word information set in the candidate word information set; putting the candidate word information having the highest probability value among the at least one candidate word information into a past target word information collection; determining at least one initial target word information for the candidate word information having the highest probability value; and generating target word information corresponding to the candidate word information based on the at least one initial target word information. The initial target word information in the at least one initial target word information includes an initial target word and an initial target word probability value corresponding to the initial target word.

[0010] Optionally, generating target word information corresponding to the candidate word information based on at least one of the initial target word information includes: determining an overlapping word probability difference between the initial target word information having the highest initial target word probability value and past target word information corresponding to the past target word information collection in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection; and setting the initial target word information having the highest initial target word probability value as target word information and putting the target word information into the past target word information collection in response to the overlapping word probability difference being greater than the initial target word probability values ​​of other initial target word information corresponding to the candidate word information.

[0011] Optionally, generating target word information corresponding to the candidate word information based on at least one of the initial target word information includes the steps of: determining an overlapping word probability difference between the initial target word information having the highest initial target word probability value and past target word information corresponding to the past target word information collection in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection; and setting the initial target word information having the highest initial target word probability value in the other initial target word information as target word information in response to the overlapping word probability difference being equal to or less than the initial target word probability value of the other initial target word information corresponding to the candidate word information, and putting the target word information into the past target word information collection.

[0012] Optionally, generating target word information corresponding to the candidate word information based on at least one of the initial target word information includes the step of setting the initial target word information having the highest initial target word probability value as target word information and putting the target word information into the past target word information collection in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value not belonging to the past target word information collection.

[0013] Optionally, for each target word information in the target word information collection, in response to determining that the target word information satisfies a convergence condition, stitching the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text includes the steps of: stitching the target word information and a past target word information sequence corresponding to the target word information to generate a stitched text in response to determining that the target word information satisfies a preset convergence condition, for each target word information in the target word information collection, in response to determining that the target word information satisfies a preset convergence condition; selecting a word that matches the stitched text from the preset word list as a conjunction; and combining the conjunction and the stitched text to generate a target text.

[0014] In a second aspect, some embodiments of the present disclosure provide a text generating device, which includes a determining unit, a duplicate elimination unit, a selection unit, and a stitching unit. The determining unit is configured to determine a decoded word information set based on a pending text used to describe a specified object. The duplicate elimination unit is configured to perform a duplicate elimination process on the decoded word information set to generate a candidate word information set. The selection unit is configured to select candidate word information that satisfies a target condition as target word information from each candidate word information set in the candidate word information set to obtain a target word information collection. The stitching unit is configured to stitch the target word information and a past target word information sequence corresponding to the target word information based on a preset word list, for each target word information in the target word information collection, in response to determining that the target word information satisfies a convergence condition, to generate a target text.

[0015] Optionally, the determining unit is further configured to input the to-be-processed text to a text encoder to generate an encoded hidden vector, and input the encoded hidden vector to a decoder to generate a decoded word information set.

[0016] Optionally, the decoded word information in the decoded word information set includes a decoded word and a decoded word probability value corresponding to the decoded word, and the duplicate elimination unit is further configured to: for each decoded word information set in the decoded word information set, based on the decoded word, partition the decoded word information set into a duplicate decoded word information set and a single decoded word information set; select from the duplicate decoded word information set a duplicate decoded word information that satisfies a preset condition as a target duplicate decoded word information; and stitch the target duplicate decoded word information and the single decoded word information set to generate the candidate word information set.

[0017] Optionally, the duplicate elimination unit is further configured to, for each decoded word information set in the decoded word information set, in response to the presence in the decoded word information set of other decoded word information of a decoded word including the decoded word information, place the decoded word information and the other decoded word information into a duplicate decoded word information set, and otherwise place the decoded word information into a single decoded word information set.

[0018] Optionally, the candidate word information in the candidate word information set includes a candidate word and a candidate word probability value corresponding to the candidate word, and the selection unit is further configured to: for each candidate word information set in the candidate word information set, select at least one candidate word information from the candidate word information set according to the order of the candidate word probability value from the largest to the smallest, enter the candidate word information with the highest probability value among the at least one candidate word information into a past target word information collection, determine at least one initial target word information for the candidate word information with the highest probability value, and generate target word information corresponding to the candidate word information based on the at least one initial target word information. The initial target word information in the at least one initial target word information includes an initial target word and an initial target word probability value corresponding to the initial target word.

[0019] Optionally, the selection unit is further configured to, in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection, determine an overlapping word probability difference between the initial target word information having the highest initial target word probability value and corresponding past target word information in the past target word information collection, and in response to the overlapping word probability difference being greater than the initial target word probability values ​​of other initial target word information corresponding to the candidate word information, set the initial target word information having the highest initial target word probability value as target word information and enter the target word information into the past target word information collection.

[0020] Optionally, the selection unit is further configured to, in response to an initial target word corresponding to an initial target word information having a highest initial target word probability value belonging to the past target word information collection, determine an overlapping word probability difference between the initial target word information having the highest initial target word probability value and corresponding past target word information in the past target word information collection, and in response to the overlapping word probability difference being equal to or less than an initial target word probability value of other initial target word information corresponding to the candidate word information, set the initial target word information having the highest initial target word probability value in the other initial target word information as target word information, and enter the target word information into the past target word information collection.

[0021] Optionally, the selection unit is further configured, in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value not belonging to the past target word information collection, to set the initial target word information having the highest initial target word probability value as target word information, and enter the target word information into the past target word information collection.

[0022] Optionally, the stitching unit is further configured to, for each target word information in the target word information collection, in response to determining that the target word information satisfies a preset convergence condition, stitch the target word information and a past target word information sequence corresponding to the target word information to generate a stitched text, select a word from the preset word list that matches the stitched text as a conjunction, and combine the conjunction with the stitched text to generate a target text.

[0023] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising one or more processors and a storage device having one or more programs stored therein, the one or more processors, when executed by the one or more programs, causing the one or more processors to realize a method described in any one of the embodiments of the first aspect.

[0024] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program, which, when executed by a processor, implements the method according to any one of the embodiments of the first aspect. Effect of the Invention

[0025] The above-mentioned embodiments of the present disclosure have a beneficial effect of improving the efficiency and accuracy of generating text topics by the text generation method in some embodiments of the present disclosure. Specifically, the efficiency and accuracy of generating text topics are low because the duplicated same text is not subjected to deduplication processing, and the duplicate information corresponding to the duplicated text is involved in subsequent calculations, resulting in a large amount of duplicated text in the generated text, which reduces the efficiency and accuracy of generating text topics. Based on this, the text generation method in some embodiments of the present disclosure first determines a decoded word information set based on the text to be processed. In this way, the generated decoded word information set provides data support for subsequent deduplication of text and generation of target text. Next, a candidate word information set is generated by performing deduplication processing on the decoded word information set. Since each decoded word information set in the decoded word information set often has decoded word information having the same decoded word, the efficiency of generating text topics can be improved by performing deduplication processing on the decoded word information having the same decoded word. Again, in order to obtain a target word information collection, candidate word information that meets a target condition can be selected as target word information from each candidate word information set in the candidate word information set. A target word information collection that attracts strong attention is selected from the candidate word information set. Finally, for each target word information in the target word information collection, in response to determining that the target word information satisfies the convergence condition, the target word information and the past target word information sequence corresponding to the target word information are text-stitched based on a preset word list to generate a target text. The preset word list is a word list composed of a lexicon of spoken language. By combining the preset word list with a target word information collection that attracts high attention and fluency, the accuracy of generating text topics can be improved. [Brief description of the drawings]

[0026] The above and other features, advantages and aspects of the disclosed embodiments will become more apparent with reference to the following specific embodiments in conjunction with the accompanying drawings, in which like or similar drawing reference numerals indicate like or similar elements throughout the drawings. It should be understood that the drawings are schematic and that elements and components are not necessarily drawn to scale. [Figure 1] FIG. 1 is a schematic diagram illustrating an application scenario of the text generation method according to some embodiments of the present disclosure. [Diagram 2] 1 is a flowchart of a text generation method according to some embodiments of the present disclosure. [Diagram 3] 1 is a flowchart of a text generation method according to some other embodiments of the present disclosure. [Figure 4] FIG. 13 illustrates an application scenario of the text generation method according to some other embodiments of the present disclosure. [Diagram 5] FIG. 2 is a schematic diagram illustrating the structure of a text generator according to some embodiments of the present disclosure. [Figure 6] FIG. 1 is a schematic diagram illustrating the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0027] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although specific 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 being limited to the embodiments shown herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the accompanying drawings and embodiments of the present disclosure are used only for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] In addition, it should be noted that, for ease of explanation, only parts related to the present invention are shown in the attached drawings. The embodiments and features in the embodiments of the present disclosure can be combined with each other if there is no contradiction.

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

[0030] The modifications "a" and "one or more" referred to in this disclosure are exemplary rather than limiting, and should be understood by those of skill in the art to mean "one or more" unless the context clearly indicates otherwise.

[0031] The names of messages or information interacted between multiple devices in this embodiment of the disclosure are used for illustrative purposes only and are not intended to limit the scope of those messages or information.

[0032] The present disclosure will be described in detail below in combination with the accompanying drawings.

[0033] FIG. 1 is a schematic diagram illustrating an application scenario of the text generation method in some embodiments of the present disclosure.

[0034] In the application scenario of FIG. 1, first, the computing device 101 can determine a decoded word information set 103 (e.g., ["washing machine": 0.03, "washing machine": 0.07, "care": 0.02, "care": 0.01, "clothing": 0.4, "clothing": 0.1, "beautiful": 0.1, "beautiful": 0.01, "washing": 0.04], ["washing machine": 0.01, "washing machine": 0.04, "care": 0.06, "care": 0.02, "clothing": 0.04, "clothing": 0.07, "beautiful": 0.01, "beautiful": 0.5, "washing": 0.01]) based on the waiting text 102 (e.g., "washing machine", "washing machine", "care", "care", "clothing", "beautiful", "beautiful", "washing"). Here, the waiting text 102 is used to describe a specified object. Then, the computing device 101 can perform a duplicate elimination process on the decoded word information set 103 to generate a candidate word information set 104 (for example: ["washing machine": 0.07, "care": 0.02, "clothing": 0.4, "beautiful": 0.1, "washing": 0.04], ["washing machine": 0.04, "care": 0.06, "clothing": 0.07, "beautiful": 0.5, "washing": 0.01]). After that, the computing device 101 can select candidate word information that satisfies a target condition from each candidate word information group in the candidate word information set 104 as target word information, and obtain a target word information collection 105 (for example: "clothing": 0.4, "beautiful": 0.5). Finally, for each target word information in the target word information collection 105, in response to determining that the target word information satisfies a convergence condition, the computing device 101 stitches the target word information and a past target word information sequence 107 corresponding to the target word information (e.g., ["washing machine": 0.4, "cleaning": 0.3], ["care": 0.5, "clothing": 0.6]) based on a preset word list 106 (e.g., "your", "more", "possible", "effectively" ...) to generate a target text 108 (e.g., ["wash clothes efficiently in a washing machine"], ["take care of clothes to make them beautiful"]).

[0035] It should be noted that the computing device 101 may be hardware or software. If the computing device is hardware, it may be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or a single terminal device. If the computing device is embodied as software, it may be attached to the hardware devices listed above. It may be implemented as multiple software or software modules used, for example, to provide distributed services, or as a single software or software module. This is not a limitation here.

[0036] It should be understood that the number of computing devices in Figure 1 is merely approximate, and any number of computing devices may be included, depending on the needs of the implementation.

[0037] 2, a process 200 of a text generation method according to some embodiments of the present disclosure is illustrated. The text generation method includes a step 201 of determining a decoded word information set based on a pending text.

[0038] In some embodiments, an execution body of the text generation method (e.g., the computing device 101 shown in FIG. 1) may determine a decoded word information set based on a pending text, where the pending text may be a text waiting to be processed. The pending text may be a glossary for describing a specified object. The decoded word information set may be a decoded word information set for any one of the time steps at each time step generated by inputting the preprocessed text into a pretrained text generation model. The pretrained text generation model may be a sequence-to-sequence (Seq2Seq) model. The pretrained text generation model may be a sequence-to-sequence (SeqGAN) model. The decoded word information in the decoded word information set may include a decoded word and a decoded word probability corresponding to the decoded word.

[0039] For example, the text to be processed may be ["washing machine", "washing machine", "care", "care", "clothing", "clothing", "beautiful", "beautiful", "washing"]. The decoded word information set generated by inputting the text to be processed into a pre-trained text generation model may be [["washing machine": 0.03, "washing machine": 0.07, "care": 0.02, "care": 0.01, "clothing": 0.4, "clothing": 0.1, "beautiful": 0.1, "beautiful": 0.01, "washing": 0.04], ["washing machine": 0.01, "washing machine": 0.04, "care": 0.06, "care": 0.02, "clothing": 0.04, "clothing": 0.07, "beautiful": 0.01, "beautiful": 0.5, "washing": 0.01]].

[0040] In step 202, the decoded word information sets are deduplicated to generate candidate word information sets.

[0041] In some embodiments, the execution body of the text generation method generates a candidate word information set by deduplication of a decoded word information set, where, for each decoded word information set in the decoded word information set based on the decoded word, deduplication of decoded word information having the same decoded word in the decoded word information set is performed, only decoded word information having the highest probability value among the same decoded word information is retained, and decoded word information not having the same decoded word and decoded word information having the highest probability value among the same decoded word information are combined to generate a candidate word information set.

[0042] As an example, the decoded word information set may be [[``washing machine'': 0.03, ``washing machine'': 0.07, ``care'': 0.02, ``care'': 0.01, ``clothing'': 0.4, ``clothing'': 0.1, ``beautiful'': 0.1, ``beautiful'': 0.01, ``washing'': 0.04], [``washing machine'': 0.01, ``washing machine'': 0.04, ``care'': 0.06, ``care'': 0.02, ``clothing'': 0.04, ``clothing'': 0.07, ``beautiful'': 0.01, ``beautiful'': 0.5, ``washing'': 0.01]]. By eliminating duplicates from the decoded word information set, a candidate word information set generated may be [[``washing machine'': 0.07, ``care'': 0.02, ``clothing'': 0.4, ``beautiful'': 0.1, ``washing'': 0.04], [``washing machine'': 0.04, ``care'': 0.06, ``clothing'': 0.07, ``beautiful'': 0.5, ``washing'': 0.01]].

[0043] In step 203, in order to obtain a target word information collection, candidate word information that satisfies a target condition is selected as target word information from each candidate word information group in the candidate word information set.

[0044] In some embodiments, the execution body of the text generation method may select candidate word information satisfying a target condition as target word information from each candidate word information pair in the candidate word information set to obtain a target word information collection, where the target condition may be the candidate word information having the highest probability value in the candidate word information pair.

[0045] For example, the candidate word information set may be [["washing machine": 0.07, "care": 0.02, "clothing": 0.4, "beautiful": 0.1, "washing": 0.04], ["washing machine": 0.04, "care": 0.06, "clothing": 0.07, "beautiful": 0.5, "washing": 0.01]]. The target word information collection obtained by selecting candidate word information satisfying the target condition as target word information from each candidate word information pair in the candidate word information set may be [["clothing": 0.4], ["beautiful": 0.5]].

[0046] In step 204, for each target word information in the target word information collection, in response to determining that the target word information satisfies the convergence condition, the target word information and a past target word information sequence corresponding to the target word information are text stitched based on a preset word list to generate a target text.

[0047] In some embodiments, the execution body of the text generation method may, in response to determining that the target word information satisfies a convergence condition for each target word information in the target word information collection, perform text stitching of a target word corresponding to the target word information and a sequence of past target words corresponding to the past target word information sequence corresponding to the target word information to generate a stitched text. Also, a word that matches the stitched text in the preset word list is determined, and the matched word is combined with the stitched text to generate a target text. Here, the target word information satisfying the convergence condition may be target word information corresponding to the last time step of the preset time steps. The preset word list may be a word list composed of a lexicon of spoken language. The past target word information in the past target word information sequence may be past target word information generated at each time step in the preset time steps corresponding to the target word information.

[0048] For example, the target word information collection may be [["clothing":0.4], ["beautiful":0.5]]. In response to determining, for each target word information in the target word information collection, the target word information corresponding to the last time step, which is a preset time step. The length of the preset time step may be 3. The target word information may be ["clothing":0.4]. The past target word information sequence corresponding to the target word information may be [["washing machine":0.4], ["cleaning":0.3]]. The target word information may be ["beautiful":0.5]. The past target word information sequence corresponding to the target word information may be [["care":0.5], ["clothing":0.6]]. The preset word list may be ["your", "more", "possible", "effectively"]. The target text collection generated by stitching the final text may be [["washing machine can wash clothes efficiently"], ["take care of your clothes to make them more beautiful"]].

[0049] The above-mentioned embodiments of the present disclosure have a beneficial effect of improving the efficiency and accuracy of generating text topics by the text generation method in some embodiments of the present disclosure. Specifically, the efficiency and accuracy of generating text topics are low because the same overlapped text is not subjected to a deduplication process, and the overlap information corresponding to the overlapped text is involved in subsequent calculations, resulting in a large amount of overlapped text in the generated text, which reduces the efficiency and accuracy of generating text topics. Based on this, the text generation method in some embodiments of the present disclosure first determines a decoded word information set based on the text to be processed. In this way, the generated decoded word information set provides data support for subsequent deduplication of text and generation of target text. Next, a candidate word information set is generated by performing a deduplication process on the decoded word information set. Since each decoded word information set in the decoded word information set often contains decoded word information having the same decoded word, the efficiency of generating text topics can be improved by performing a deduplication process on the decoded word information having the same decoded word. Again, candidate word information that satisfies a target condition is selected as target word information from each candidate word information set in the candidate word information set, and a target word information collection can be obtained. A target word information collection that attracts strong attention is selected from the candidate word information set. Finally, for each target word information in the target word information collection, in response to determining that the target word information satisfies the convergence condition, the target word information and the past target word information sequence corresponding to the target word information are text-stitched based on a preset word list to generate a target text. The preset word list is a word list composed of a lexicon of spoken language. By combining the preset word list with a target word information collection that attracts high attention and fluency, the accuracy of generating text topics can be improved.

[0050] Continuing to refer to Fig. 3, Fig. 3 shows a process 300 of a text generation method according to some other embodiments of the present disclosure. The text generation method includes the following steps.

[0051] In step 301, a decoded word information set is determined based on the pending text.

[0052] In some embodiments, the execution body determining a decoded word information set based on a pending text comprises: The method includes a first step of inputting the pending text to a text encoder to generate an encoded hidden vector.

[0053] In some embodiments, the execution body may input the raw text to a text encoder to generate an encoded hidden vector. The text encoder may be used to compress the raw text into a low-level text vector. The encoded hidden vector may be a specific compressed word vector. The text encoder may be an encoder composed of various types of neural network models. The text encoder may be an autoencoder. The text encoder may be an encoder in a sequence-to-sequence (seq2seq) model.

[0054] In a second step, the encoded hidden vector is input to a decoder to generate a decoded word information set.

[0055] In some embodiments, the execution body may input the encoded hidden vector to a decoder to generate a decoded word information set. The decoder may be used to generate a decoded word information set by inputting the encoded hidden vector to a pre-trained neural network model for word decoding. The pre-trained neural network model may be a recurrent neural network (RNN). The pre-trained neural network model may be a convolutional neural network (CNN). The decoded word information in the decoded word information set may include a decoded word and a decoded word probability corresponding to the decoded word.

[0056] For example, the to-be-processed text may be ["washing machine", "washing machine", "care", "care", "clothing", "clothing", "beautiful", "beautiful", "washing"]. The generated decoded word information set may be [["washing machine": 0.03, "washing machine": 0.07, "care": 0.02, "care": 0.01, "clothing": 0.04, "clothing": 0.01, "beautiful": 0.1, "beautiful": 0.01, "washing": 0.4], ["washing machine": 0.01, "washing machine": 0.04, "care": 0.06, "care": 0.02, "clothing": 0.4, "clothing": 0.07, "beautiful": 0.01, "beautiful": 0.05, "washing": 0.04]].

[0057] In step 302, for each decoded word information set in the decoded word information set, the decoded word information set is divided into a duplicated decoded word information set and a single decoded word information set based on the decoded word.

[0058] In some embodiments, for each decoded word information set in the decoded word information set, in response to the presence of other decoded word information of the decoded word including the decoded word information in the decoded word information set, the execution body may place the decoded word information and the other decoded word information into a duplicated decoded word information set, or otherwise place the decoded word information into a single decoded word information set. The duplicated decoded word information in the duplicated decoded word information set may be decoded word information having the same decoded word. The single decoded word information in the single decoded word information set may be decoded word information having the same decoded word.

[0059] For example, the generated decoded word information set may be [[``washing machine'': 0.03, ``washing machine'': 0.07, ``care'': 0.02, ``care'': 0.01, ``clothing'': 0.04, ``clothing'': 0.01, ``beautiful'': 0.1, ``beautiful'': 0.01, ``washing'': 0.4], [``washing machine'': 0.01, ``washing machine'': 0.04, ``care'': 0.06, ``care'': 0.02, ``clothing'': 0.4, ``clothing'': 0.07, ``beautiful'': 0.01, ``beautiful'': 0.05, ``washing'': 0.04]].

[0060] For one decoded word information in the decoded word information set: [``washing machine'': 0.03, ``washing machine'': 0.07, ``care'': 0.02, ``care'': 0.01, ``clothing'': 0.04, ``clothing'': 0.01, ``beautiful'': 0.1, ``beautiful'': 0.01, ``cleaning'': 0.4], the corresponding overlapping decoded word information set and single decoded word information set may be [[``washing machine'': 0.03, ``washing machine'': 0.07], [``care'': 0.02, ``care'': 0.01], [``clothing'': 0.04, ``clothing'': 0.01], [``beautiful'': 0.1, ``beautiful'': 0.01]] plus [``cleaning'': 0.4]], respectively.

[0061] As a further example, the generated decoded word information set may be [[``washing machine'': 0.03, ``washing machine'': 0.07, ``care'': 0.02, ``care'': 0.01, ``clothing'': 0.04, ``clothing'': 0.01, ``beautiful'': 0.1, ``beautiful'': 0.01, ``washing'': 0.4], [``clothes washing machine'': 0.01, ``washing machine'': 0.04, ``care'': 0.06, ``care'': 0.02, ``clothing'': 0.4, ``clothing'': 0.07, ``beautiful'': 0.01, ``beautiful'': 0.05, ``washing'': 0.04]].

[0062] For other decoded word information in the decoded word information set: [``washing machine'': 0.01, ``washing machine'': 0.04, ``care'': 0.06, ``care'': 0.02, ``clothing'': 0.4, ``clothing'': 0.07, ``beautiful'': 0.01, ``beautiful'': 0.05, ``washing'': 0.04]], the corresponding overlapping decoded word information set and single decoded word information set may be [[``washing machine'': 0.01, ``washing machine'': 0.04], [``care'': 0.06, ``care'': 0.02], [``clothing'': 0.4, ``clothing'': 0.07], [``beautiful'': 0.01, ``beautiful'': 0.05]] plus [``washing'': 0.04]], respectively.

[0063] In step 303, the duplicated decoded word information satisfying a preset condition is selected as a target duplicated decoded word information from the duplicated decoded word information set.

[0064] In some embodiments, the execution body may select a duplicate decoded word information from the duplicate decoded word information set that satisfies a preset condition as a target duplicate decoded word information, where the preset condition may be that the duplicate decoded word information is the duplicate decoded word information having the highest decoded word probability value in the duplicate decoded word information set. For each duplicate decoded word information in the duplicate decoded word information set, obtain a duplicate decoded word information sequence according to the decoded word probability value from the highest to the lowest, and select the duplicate decoded word information having the highest decoded word probability value from the duplicate decoded word information sequence.

[0065] For example, the overlapping decoded word information set may be [["washing machine":0.03, "washing machine":0.07], ["care":0.02, "care":0.01], ["clothing":0.04, "clothing":0.01], ["beautiful":0.1, "beautiful":0.01]]. The generated target overlapping decoded word information may be [["washing machine":0.07], ["care":0.02], ["clothing":0.04], ["beautiful":0.1]].

[0066] As a further example, the overlapping decoded word information set may be [["washing machine":0.01, "washing machine":0.04], ["care":0.06, "care":0.02], ["clothing":0.4, "clothing":0.07], ["beautiful":0.01, "beautiful":0.05]]. The generated target overlapping decoded word information may be [["washing machine":0.04], ["care":0.06], ["clothing":0.4], ["beautiful":0.05]].

[0067] In step 304, the target overlapping decoded word information and the single decoded word information set are stitched to generate a candidate word information set.

[0068] In some embodiments, the execution body may stitch the target duplicate decoded word information and a single decoded word information set to generate a candidate word information set. The stitching process may combine the target duplicate decoded word information and a single decoded word information set corresponding to the target duplicate decoded word information based on the decoded word information set to generate a candidate word information set.

[0069] For example, the target overlapping decoded word information may be [["washing machine": 0.07], ["care": 0.02], ["clothing": 0.04], ["beautiful": 0.1]]. The single decoded word information set corresponding to the target overlapping decoded word information may be ["washing": 0.04]. The candidate word information set generated by combining the two sets of information may be [["washing machine": 0.07], ["care": 0.02], ["clothing": 0.04], ["beautiful": 0.1], ["washing": 0.4]].

[0070] As a further example, the target overlapping decoded word information may be [["washing machine": 0.04], ["care": 0.06], ["clothing": 0.4], ["beautiful": 0.05]]. The single decoded word information set corresponding to the target overlapping decoded word information may be ["washing": 0.01]. The candidate word information set generated by combining the two sets of information may be [["washing machine": 0.04], ["care": 0.06], ["clothing": 0.4], ["beautiful": 0.05], ["washing": 0.01]].

[0071] In step 305, for each candidate word information pair in the candidate word information set, at least one candidate word information is selected from the candidate word information pair according to the order from the largest to the smallest candidate word probability value.

[0072] In some embodiments, for each candidate word information pair in the candidate word information set, the execution body selects at least one candidate word information from the candidate word information pair according to an order from largest to smallest candidate word probability value, where the candidate word information includes a candidate word and a candidate word probability value corresponding to the candidate word.

[0073] For example, the candidate word information set may be [[“washing machine”: 0.07], [“care”: 0.02], [“clothing”: 0.04], [“beautiful”: 0.1], [“washing”: 0.4]]. At least one candidate word information selected from the candidate word information set in accordance with the order from the largest to the smallest candidate word probability value may be [“beautiful”: 0.1, “washing”: 0.4]. Other candidate word information sets may be [[“washing machine”: 0.04], [“care”: 0.06], [“clothing”: 0.4], [“beautiful”: 0.05], [“washing”: 0.01]]. At least one candidate word information selected from the candidate word information set in accordance with the order from the largest to the smallest candidate word probability value may be [“care”: 0.06, “clothing”: 0.4].

[0074] In step 306, the candidate word information having the highest probability value among the at least one candidate word information is entered into a past target word information collection, at least one initial target word information is determined for the candidate word information having the highest probability value, and target word information corresponding to the candidate word information is generated based on the at least one initial target word information.

[0075] In some embodiments, the execution body can first, for the candidate word information in at least one candidate word information, put the candidate word information having the highest probability value among the at least one candidate word information into a past target word information collection; then, determine at least one initial target word information corresponding to the candidate word information having the highest probability value; finally, generate target word information corresponding to the candidate word information based on the at least one initial target word information; where the initial target word information in the at least one initial target word information includes an initial target word and an initial target word probability value corresponding to the initial target word; and select the initial target word information having the highest initial target word probability value from the at least one initial target word information as the target word information.

[0076] For example, the at least one candidate word information may be ["beautiful": 0.1, "washing": 0.4]. The at least one candidate word information may be ["care": 0.06, "clothing": 0.4]. The candidate word information having the highest probability value may be ["washing": 0.4] or ["clothing": 0.4]. The candidate word information included in the past target word information collection may be [["washing": 0.4], ["clothing": 0.4]]. Initial target word information in the candidate word information is determined. The candidate word information may be ["washing": 0.4]. The initial target word information corresponding to the candidate word information may be ["clothing": 0.7, "beautiful": 0.1], and the target word information generated corresponding to the candidate word information may be ["clothing": 0.7]. The candidate word information may be ["clothing": 0.4], and the initial target word information corresponding to the candidate word information may be ["clothing": 0.07, "beautiful": 0.5]. The target word information generated corresponding to the candidate word information may be ["beautiful": 0.5]. Specifically, FIG. 4 shows an application scenario for generating target word information.

[0077] In some selectable implementations in some embodiments, the execution body may first determine an overlapping word probability difference between the initial target word information having the highest initial target word probability value and the past target word information corresponding to the past target word information collection in response to the initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection. Then, in response to the overlapping word probability difference being greater than the initial target word probability values ​​of other initial target word information corresponding to the candidate word information, the execution body can set the initial target word information having the highest initial target word probability value as target word information and put the target word information into the past target word information collection.

[0078] For example, the initial target word corresponding to the initial target word information having the highest initial target word probability value may be "clothing". The past target word information collection may be [["washing": 0.4], ["clothing": 0.4]]. The probability value of the initial target word corresponding to the initial target word information having the highest initial target word probability value may be 0.7. The overlapping word probability difference between the initial target word information having the highest initial target word probability value and the past target word information corresponding to the past target word information collection may be 0.3. The other initial target word information may be ["beautiful": 0.1]. In response to the overlapping word probability difference being greater than the initial target word probability value of the other initial target word information corresponding to the candidate word information, set the initial target word information having the highest initial target word probability value ["clothing": 0.7] as target word information, and put the target word information into the past target word information collection ["washing": 0.4, "clothing": 0.7,].

[0079] In some selectable implementations in some embodiments, the execution body first determines an overlapping word probability difference between the initial target word information having the highest initial target word probability value and past target word information corresponding to the past target word information collection in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection, and then sets the initial target word information having the highest initial target word probability value in the other initial target word information as target word information in response to the overlapping word probability difference being equal to or less than the initial target word probability value of other initial target word information corresponding to the candidate word information, and puts the target word information into the past target word information collection.

[0080] In some selectable implementations in some embodiments, the execution body first sets the initial target word information having the highest initial target word probability value as target word information in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value not belonging to the past target word information collection, and puts the target word information into the past target word information collection.

[0081] In step 307, for each target word information in the target word information collection, in response to determining that the target word information satisfies the convergence condition, stitch the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text.

[0082] In some embodiments, in response to determining that, for each target word information in the target word information collection, the execution body stitches the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text, the execution body includes the following steps:

[0083] In a first step, for each target word information in the target word information collection, in response to determining that the target word information satisfies a preset convergence condition, the target word information and a past target word information sequence corresponding to the target word information are stitched together to generate a stitched text.

[0084] For example, the target word information may be ["clothes":0.7]. The previous target word information sequence corresponding to the target word information may be ["washing machine":0.3, "washing":0.4]. The stitched text generated by stitching the target word information and the previous target word information sequence corresponding to the target word information may be ["washing clothes in washing machine"].

[0085] The second step is to select words from the preset word list as conjunctions that match the stitched text.

[0086] Here, various machine learning methods are used to select words from the preset word list as conjunctions that match the stitched text.

[0087] As an example, the preset word list may be: ["your", "can", "effectively"]. The selected conjunction may be: ["can", "effectively"].

[0088] In the third step, the conjunctions are combined with the stitched text to generate a target text.

[0089] As an example, the target text generated by combining the conjunction with the stitched text may be "The washing machine can wash clothes efficiently."

[0090] As can be seen from FIG. 3, compared with the description in some embodiments corresponding to FIG. 2, the flow chart 300 of the information processing method in some embodiments corresponding to FIG. 3 is shown. First, a decoded word information set is determined based on the text to be processed. Thus, the generated decoded word information set provides data support for subsequent text deduplication and target text generation. Next, the decoded word information set is subjected to deduplication processing to generate a candidate word information set. Since each decoded word information set in the decoded word information set often has decoded word information having the same decoded word, the efficiency of generating text topics is improved by deduplication processing of the decoded word information having the same decoded word. Again, from each candidate word information set in the candidate word information set, candidate word information that satisfies the target condition is selected as target word information to obtain a target word information collection. Here, even if the target word corresponding to the target word information has been decoded before, if the target word information can attract strong attention at the current time step, it is decoded as target word information. As a result, the generated target word information becomes a relatively fluent predicted word in real life. Finally, for each target word information in the target word information collection, in response to determining that the target word information satisfies the convergence condition, the target word information and the past target word information sequence corresponding to the target word information are text-stitched based on a preset word list to generate a target text. The preset word list is a word list composed of a lexicon of spoken language. The preset word list can be combined with the target word information collection with high attention and fluency to not only improve the accuracy of generating text topics, but also generate a target text with high attention and fluency characteristics.

[0091] With further reference to Figure 5, as a realization of the methods illustrated in said figures, the present disclosure provides several embodiments of an apparatus for generating text corresponding to the embodiments of these methods illustrated in Figure 2. Said apparatus can be particularly applied in various electronic devices.

[0092] As shown in FIG. 5, the apparatus 500 for generating text in some embodiments includes a determining unit 501, a duplicate elimination unit 502, a selecting unit 503 and a stitching unit 504. The determining unit 501 is configured to determine a decoded word information set based on a pending text used to describe a specified object. The duplicate elimination unit 502 is configured to perform duplicate elimination processing on the decoded word information set to generate a candidate word information set. The selecting unit 503 is configured to select candidate word information that satisfies a target condition as target word information from each candidate word information set in the candidate word information set to obtain a target word information collection. The stitching unit 504 is configured to stitch the target word information and a past target word information sequence corresponding to the target word information based on a preset word list for each target word information in the target word information collection in response to determining that the target word information satisfies a convergence condition, to generate a target text.

[0093] It will be understood that the units depicted in the apparatus 500 correspond to the steps in the method described with reference to Figure 2. Thus, the operations, features and beneficial effects achieved in the text above described in relation to the method are equally applicable to the apparatus 500 and the units contained therein and will not be repeated here.

[0094] In an optional implementation of some embodiments, the determining unit 501 is further configured to input the to-be-processed text to a text encoder to generate an encoded hidden vector, and input the encoded hidden vector to a decoder to generate a decoded word information set.

[0095] In some embodiments, in an optional implementation, the decoded word information in the decoded word information set includes a decoded word and a decoded word probability value corresponding to the decoded word. And the duplicate elimination unit 502 is further configured to: for each decoded word information set in the decoded word information set, according to the decoded word, divide the decoded word information set into a duplicate decoded word information set and a single decoded word information set, select a duplicate decoded word information that satisfies a preset condition from the duplicate decoded word information set as a target duplicate decoded word information, and stitch the target duplicate decoded word information and the single decoded word information set to generate the candidate word information set.

[0096] In an optional implementation in some embodiments, the duplicate elimination unit 502 is further configured to, for each decoded word information set in the decoded word information set, in response to the presence of other decoded word information of a decoded word including the decoded word information in the decoded word information set, place the decoded word information and the other decoded word information into a duplicate decoded word information set, and otherwise place the decoded word information into a single decoded word information set.

[0097] In an optional implementation in some embodiments, the candidate word information in the candidate word information set includes a candidate word and a candidate word probability value corresponding to the candidate word. The selection unit 503 is further configured to: select at least one candidate word information from the candidate word information set for each candidate word information set in the candidate word information set according to the order of the candidate word probability value from the largest to the smallest, enter the candidate word information with the highest probability value among the at least one candidate word information into a past target word information collection, determine at least one initial target word information for the candidate word information with the highest probability value, and generate target word information corresponding to the candidate word information based on the at least one initial target word information. The initial target word information in the at least one initial target word information includes an initial target word and an initial target word probability value corresponding to the initial target word.

[0098] In a selectable implementation in some embodiments, the selection unit 503 is further configured to, in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection, determine an overlapping word probability difference between the initial target word information having the highest initial target word probability value and corresponding past target word information in the past target word information collection, and in response to the overlapping word probability difference being greater than the initial target word probability values ​​of other initial target word information corresponding to the candidate word information, set the initial target word information having the highest initial target word probability value as target word information, and enter the target word information into the past target word information collection.

[0099] In a selectable implementation in some embodiments, the selection unit 503 is further configured to, in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection, determine an overlapping word probability difference between the initial target word information having the highest initial target word probability value and corresponding past target word information in the past target word information collection, and in response to the overlapping word probability difference being equal to or less than the initial target word probability value of other initial target word information corresponding to the candidate word information, set the initial target word information having the highest initial target word probability value in the other initial target word information as target word information, and enter the target word information into the past target word information collection.

[0100] In an optional implementation in some embodiments, the selection unit 503 is further configured to, in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value not belonging to the past target word information collection, set the initial target word information having the highest initial target word probability value as target word information, and enter the target word information into the past target word information collection.

[0101] In an optional implementation in some embodiments, the stitching unit 504 is further configured to: for each target word information in the target word information collection, in response to determining that the target word information satisfies a preset convergence condition, stitch the target word information and a previous target word information sequence corresponding to the target word information to generate a stitched text; select a word from the preset word list that matches the stitched text as a conjunction; and combine the conjunction with the stitched text to generate a target text.

[0102] 6, a schematic diagram illustrating the structure of an electronic device (e.g., computing device 101 in FIG. 1) 600 for implementing some embodiments of the present disclosure is shown. The electronic device illustrated in FIG. 6 is merely exemplary and should not impose any limitations on the functionality and scope of use of the embodiments of the present disclosure.

[0103] 6, the electronic device 600 can include a processing unit (e.g., a central processor, a graphic processor, etc.) 601 that can perform various appropriate operations and processes according to a program stored in a read only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. The RAM 603 also stores various programs and data necessary for the operation of the electronic device 600. The processing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0104] In general, the following devices may be connected to the I / O interface 605 including input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc., storage devices 608 including, for example, a magnetic tape, hard disk, etc., and communication devices 609. The communication devices 609 allow the electronic device 600 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 6 illustrates the electronic device 600 with various devices, it should be understood that it is not necessary to implement or include all of the devices shown. Alternatively, more or fewer devices may be implemented or included. Each block illustrated in FIG. 6 may represent one device, or multiple devices as needed.

[0105] In particular, according to some embodiments of the present disclosure, the processes described in the text above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program including program code for performing the methods shown in the flowcharts. In some such embodiments, the computer program may be downloaded and installed from a network via the communication device 609, or may be installed from the storage device 608 or from the ROM 602. The computer program, when executed by the processing device 601, performs the functions defined in the methods of some embodiments of the present disclosure.

[0106] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of both. The computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include, but are not limited to, an electrical connection having 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 memory device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. And, in some embodiments of the present disclosure, the computer-readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave carrying the computer-readable program code. Such transmitted data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, carry, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted using any suitable medium, including, but not limited to, electrical wires, fiber optic cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] In some embodiments, clients and servers may communicate using any network protocol now known or later developed, such as HTTP, and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), an internetwork (e.g., the Internet), an end-to-end network (e.g., an ad-hoc end-to-end network), and any network now known or later developed.

[0108] The computer-readable medium may be included in the device, or may be separate from the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device performs the steps of: determining a decoded word information set based on a pending text for describing a specified object; generating a candidate word information set by deduplication of the decoded word information set; selecting candidate word information that satisfies a target condition from each candidate word information set in the candidate word information set as target word information to obtain a target word information collection; and for each target word information in the target word information collection, stitching the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text in response to determining that the target word information satisfies a convergence condition.

[0109] Computer program code for carrying out operations of some embodiments of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and traditional procedural programming languages ​​such as "C". The program code can run entirely on the user's computer, partially on the user's computer, as an independent package, partially on the user's computer, or entirely on a remote computer or server. When referring to a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate possible implementations of the architecture, functionality, and operation of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code that includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative embodiments, the functions shown in the blocks may occur in a different order than that shown in the accompanying drawings. For example, two blocks shown in succession may in fact be executed substantially in parallel, and may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the specified functions or operations, or may be implemented in a combination of dedicated hardware and computer instructions.

[0111] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be disposed in a processor, and may be described as a processor including, for example, a determining unit, a deduplication unit, a selecting unit, and a stitching unit. Here, the names of these units may not limit the units themselves in some cases, and for example, the deduplication unit may be described as "a unit for deduplication of the decoded word information set to generate a candidate word information set."

[0112] The functions described herein may be performed, at least in part, by one or more hardware logic components. For example, 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 a chip (SOCs), complex programmable logic devices (CPLDs), etc.

[0113] The above description is merely a description of some preferred embodiments of the present disclosure and the technical principles adopted. Those skilled in the art should understand that the scope of the present invention covered by the embodiments of the present disclosure is not limited to the technical solutions resulting from the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, a technical solution formed by substituting the above features with technical features having similar functions disclosed in the embodiments of the present disclosure (but not limited to these).

Claims

1. A method of generating text performed by a computing device, comprising: determining a decoded word information set based on the pending text used to describe the specified object; performing a duplicate elimination process on the decoded word information set to generate a candidate word information set; A step of selecting candidate word information satisfying a target condition as target word information from each candidate word information group in the candidate word information set to obtain a target word information collection; and for each target word information in the target word information collection, in response to determining that the target word information satisfies a convergence condition, stitching the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text.

2. Determining a decoded word information set based on the pending text includes: inputting the pending text to a text encoder to generate an encoded hidden vector; and c) inputting the encoded hidden vector into a decoder to generate a decoded word information set.

3. the decoded word information in the decoded word information set includes a decoded word and a decoded word probability value corresponding to the decoded word; and performing a duplicate elimination process on the decoded word information set to generate a candidate word information set; for each decoded word information pair in the decoded word information set, partitioning the decoded word information pair into a duplicate decoded word information pair and a single decoded word information pair based on the decoded word; Selecting, from the set of duplicated decoded word information, duplicated decoded word information that satisfies a preset condition as a target duplicated decoded word information; 3. The method of claim 1, further comprising the step of stitching the target overlapping decoded word information and the single decoded word information set to generate the candidate word information set.

4. For each decoded word information set in the decoded word information set, dividing the decoded word information set into a duplicate decoded word information set and a single decoded word information set based on the decoded word, 4. The method of claim 3, further comprising the step of: for each decoded word information set in the decoded word information set, in response to the presence in the decoded word information set of other decoded word information of a decoded word that includes the decoded word information, placing the decoded word information and the other decoded word information into a duplicate decoded word information set; otherwise, placing the decoded word information into a single decoded word information set.

5. The candidate word information in the candidate word information set includes a candidate word and a candidate word probability value corresponding to the candidate word; and Selecting candidate word information satisfying a target condition as target word information from each candidate word information group in the candidate word information set selecting at least one candidate word information from each candidate word information pair in the candidate word information set in accordance with an order from the largest to the smallest of the candidate word probability values; The method according to any one of claims 1 to 4, further comprising the steps of: putting candidate word information having the highest probability value among the at least one candidate word information into a past target word information collection; determining at least one initial target word information for the candidate word information having the highest probability value; and generating target word information corresponding to the candidate word information based on the at least one initial target word information, wherein the initial target word information in the at least one initial target word information includes an initial target word and an initial target word probability value corresponding to the initial target word.

6. generating target word information corresponding to the candidate word information based on at least one of the initial target word information, determining an overlapping word probability difference between the initial target word information having the highest initial target word probability value and a past target word information corresponding to the past target word information collection in response to the initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection; 6. The method of claim 5, further comprising the step of: in response to the overlapping word probability difference being greater than the initial target word probability values ​​of other initial target word information corresponding to the candidate word information, setting the initial target word information having the highest initial target word probability value as target word information, and placing the target word information in the past target word information collection.

7. generating target word information corresponding to the candidate word information based on at least one of the initial target word information, determining an overlapping word probability difference between the initial target word information having the highest initial target word probability value and a past target word information corresponding to the past target word information collection in response to the initial target word corresponding to the initial target word information having the highest initial target word probability value belonging to the past target word information collection; 6. The method of claim 5, further comprising the step of: in response to the overlapping word probability difference being equal to or less than the initial target word probability value of other initial target word information corresponding to the candidate word information, setting the initial target word information having the highest initial target word probability value among the other initial target word information as target word information, and entering the target word information into the past target word information collection.

8. generating target word information corresponding to the candidate word information based on at least one of the initial target word information, The method according to any one of claims 5 to 7, further comprising the step of: in response to an initial target word corresponding to the initial target word information having the highest initial target word probability value not belonging to the past target word information collection, setting the initial target word information having the highest initial target word probability value as target word information, and putting the target word information into the past target word information collection.

9. For each target word information in the target word information collection, in response to determining that the target word information satisfies a convergence condition, stitching the target word information and a past target word information sequence corresponding to the target word information based on a preset word list to generate a target text; For each target word information in the target word information collection, in response to determining that the target word information satisfies a preset convergence condition, stitching the target word information and a previous target word information sequence corresponding to the target word information to generate a stitched text; selecting words from the preset word list as conjunctions that match the stitched text; A method according to any one of claims 1 to 8, further comprising the step of combining said conjunctions with said stitched text to generate a target text.

10. 1. An apparatus for generating text, comprising: a determining unit configured to determine a decoded word information set based on the pending text used to describe the specified object; a deduplication unit configured to perform a deduplication process on the decoded word information set to generate a candidate word information set; a selection unit configured to select, as target word information, candidate word information that satisfies a target condition from each candidate word information pair in the candidate word information set, so as to obtain a target word information collection; and a stitching unit configured to stitch, for each target word information in the target word information collection, the target word information and a past target word information sequence corresponding to the target word information based on a preset word list in response to determining that the target word information satisfies a convergence condition, to generate a target text.

11. 1. An electronic device comprising: one or more processors; a storage device having one or more programs stored therein; An electronic device, characterized in that, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.

12. A computer-readable medium having a computer program stored thereon, A computer readable medium, characterized in that when the program is executed by a processor, the method according to any one of claims 1 to 9 is realized.

Citation Information

Patent Citations

  • Minimally invasive medical field-oriented abstract text generation method and device

    CN107832300A

  • Method for generating text title and computing equipment

    CN110532560A

  • Text title generation method and device

    CN111078865A

  • Text regeneration method and device, electronic equipment and computer readable medium

    CN111666418A

  • Vulnerability information management method and apparastus thereof

    KR101893090B1