PPT generation method, device, equipment and computer-readable storage medium

By automatically determining the theme type and internal semantics of the PPT content, combined with the preset template library, the automation generated by PPT has been realized, the problem of low efficiency in existing technology is solved, and the quality and efficiency of the generated PPT files are improved.

CN112632950BActive Publication Date: 2025-01-24CHINA PING AN LIFE INSURANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011644169.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-01-24
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The existing PPT generation method is inefficient. Users need to manually fill in the content throughout the process and pay attention to the correspondence between the content and the template, which can easily lead to the generation of PPT files that do not meet expectations.

Method used

By obtaining the target text content, its topic type is automatically determined, and the inherent semantics are analyzed to generate content tags. Combine the theme type and content tags, select a matching template from the preset PPT template library, and automatically generate the target PPT without manual operation.

Benefits of technology

It realizes the automation of PPT generation, improves efficiency, ensures that the generated PPT files meet user expectations, and solves the problem of low efficiency in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112632950B_ABST
    Figure CN112632950B_ABST
Patent Text Reader

Abstract

The present invention relates to semantic analysis, and provides a PPT generation method, device, equipment and computer-readable storage medium. The present invention first automatically determines the subject type of the target text content according to the target text content, so as to preliminarily determine the subject type of the PPT that needs to be generated in the end; obtains the content label by analyzing the intrinsic semantics of the target text content, so that the intrinsic semantics of the target text content can be further excavated; selects the matching target PPT template by combining the subject type with the content label, so that the selected target PPT template is highly adapted to the target text content; finally, the target PPT required by the user is automatically generated based on the target text content and the target PPT template, and the target PPT file that meets the user's expectations can be automatically generated without manual operation, thereby greatly improving the generation efficiency of the PPT. In addition, the present invention also relates to blockchain technology, and the above-mentioned target PPT can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a PPT generation method, device, equipment and computer-readable storage medium. Background Art

[0002] There are currently two main ways to generate a PPT file on a web page. The first is static PPT download. This method is to pre-make a PPT file and then upload it to the system. When a user clicks to download, the pre-made PPT file can be downloaded. However, the PPT file downloaded in this way is fixed no matter which user downloads it or how many times it is downloaded, that is, the content and template of the PPT will not change. The second is dynamic PPT download. In this way, the user selects a PPT template on the page, and then fills in the content corresponding to the blank space in the PPT template on the page form. Finally, the system synthesizes it to generate the PPT file required by the user, that is, the content and template of the PPT can be arbitrarily matched by the user based on actual needs. However, when users use this method to make PPT, they need to manually fill in the content throughout the process and pay special attention to the correspondence between the content they fill in and the content of the blank space in the template. Once filled in incorrectly, a PPT file that does not meet expectations will be generated. All of the above situations reflect the technical problem of the inefficiency of the existing PPT generation method. Summary of the invention

[0003] The main purpose of the present invention is to provide a PPT generation method, device, equipment and computer-readable storage medium, aiming to solve the technical problem of low efficiency of existing PPT generation methods.

[0004] To achieve the above object, the present invention provides a PPT generation method, which comprises the following steps:

[0005] Acquire target text content and determine the subject type of the target text content;

[0006] Analyzing the intrinsic semantics of the target text content and generating a content tag corresponding to the intrinsic semantics;

[0007] In combination with the subject type and the content tag, a target PPT template matching the target text content is selected from a preset PPT template library to generate a target PPT based on the target text content and the target PPT template.

[0008] Optionally, analyzing the intrinsic semantics of the target text content and generating a content label corresponding to the intrinsic semantics includes:

[0009] Using a preset conversion model to obtain the word vector and position vector of the target text content, and analyzing the cross-sentence semantics of the target text content based on the TF-IDF algorithm to obtain the adjacent semantic vector of the target text content;

[0010] The word vector, position vector and adjacent semantic vector are used as the intrinsic semantics, input into a pre-trained language model, and a content label corresponding to the intrinsic semantics is obtained.

[0011] Optionally, the using a preset conversion model to obtain a word vector and a position vector of the target text content, and analyzing the cross-sentence semantics of the target text content based on a TF-IDF algorithm to obtain an adjacent semantic vector of the target text content includes:

[0012] The word vector is obtained by using a preset word2vec model, and the position vector is obtained by using a sine wave in a preset transformer model;

[0013] Based on the TF-IDF algorithm and named entity recognition technology, a target candidate word set for obtaining adjacent semantic vectors of the target text content is obtained;

[0014] Based on a preset long short-term memory network model, each candidate word in the target candidate word set is encoded to obtain an adjacent semantic vector of the target text content.

[0015] Optionally, combining the subject type with the content tag to select a target PPT template matching the target text content from a preset PPT template library includes:

[0016] Determine an initial PPT template corresponding to the subject type from the PPT template library, and obtain a section title of the initial PPT template;

[0017] The content tag is matched with the section title, so that the initial PPT template where the section title matching the content tag is located is used as the target PPT template.

[0018] Optionally, matching the content tag with the section title to use the initial PPT template containing the section title that matches the content tag as the target PPT template includes:

[0019] Obtaining the similarity between the content tag and the section title, and taking the initial PPT template corresponding to the section title whose similarity exceeds a preset similarity threshold as a candidate PPT template;

[0020] Dividing the target text content into a plurality of text regions according to the content tags, and associating each of the text regions with a corresponding section of the selected PPT template;

[0021] The number of words in each of the text areas and the word capacity of the corresponding section are obtained, so as to select a candidate PPT template corresponding to the word capacity matching the number of words in each of the text areas as the target PPT template.

[0022] Optionally, the acquiring target text content and determining the subject type of the target text content includes:

[0023] When receiving the PPT generation instruction, obtaining the original file based on the PPT generation instruction, and extracting the target text content in the original file;

[0024] The pre-trained document topic generation model is used to obtain the topic type of the target text content.

[0025] Optionally, generating a target PPT based on the target text content and the target PPT template includes:

[0026] The target text content is mapped to a corresponding section of the target PPT template, and the target text content and the target PPT template are combined to render a synthetic target PPT, wherein the target PPT is stored in the blockchain.

[0027] In addition, to achieve the above object, the present invention also provides a PPT generation device, the PPT generation device comprising:

[0028] A topic type determination module, used to obtain target text content and determine the topic type of the target text content;

[0029] A content label generation module, used to analyze the intrinsic semantics of the target text content and generate a content label corresponding to the intrinsic semantics;

[0030] The target PPT generation module is used to select a target PPT template matching the target text content from a preset PPT template library in combination with the subject type and the content tag, so as to generate a target PPT based on the target text content and the target PPT template.

[0031] Optionally, the content tag generating module includes:

[0032] An adjacency semantics acquisition unit, used to acquire a word vector and a position vector of the target text content by using a preset conversion model, and analyze the cross-sentence semantics of the target text content based on a TF-IDF algorithm to obtain an adjacency semantic vector of the target text content;

[0033] The intrinsic semantics acquisition unit is used to input the word vector, position vector and adjacent semantic vector as the intrinsic semantics into a pre-trained language model to obtain a content label corresponding to the intrinsic semantics.

[0034] Optionally, the adjacency semantics acquisition unit is further used for:

[0035] The word vector is obtained by using a preset word2vec model, and the position vector is obtained by using a sine wave in a preset transformer model;

[0036] Based on the TF-IDF algorithm and named entity recognition technology, a target candidate word set for obtaining adjacent semantic vectors of the target text content is obtained;

[0037] Based on a preset long short-term memory network model, each candidate word in the target candidate word set is encoded to obtain an adjacent semantic vector of the target text content.

[0038] Optionally, the target PPT generation module includes:

[0039] A section title acquisition unit, used to determine an initial PPT template corresponding to the subject type from the PPT template library, and acquire a section title of the initial PPT template;

[0040] The target template acquisition unit is used to match the content tag with the section title to use the initial PPT template where the section title that matches the content tag is located as the target PPT template.

[0041] Optionally, the target template acquisition unit is further used for:

[0042] A candidate module determination unit, used to obtain the similarity between the content tag and the section title, and to use the initial PPT template corresponding to the section title whose similarity exceeds a preset similarity threshold as the candidate PPT template;

[0043] A region section determination unit, used for dividing the target text content into a plurality of text regions according to the content label, and associating each of the text regions with a corresponding section of the selected PPT template;

[0044] The target template determination unit is used to obtain the number of words in each of the text areas and the word capacity of the corresponding section, so as to select a candidate PPT template corresponding to the word capacity matching the number of words in each of the text areas as the target PPT template.

[0045] Optionally, the topic type determination module includes:

[0046] A target content extraction unit, configured to, upon receiving a PPT generation instruction, obtain an original file based on the PPT generation instruction and extract target text content from the original file;

[0047] The text topic uses a pre-trained document topic generation model to obtain the topic type of the target text content.

[0048] Optionally, the target PPT generation module includes:

[0049] A rendering and synthesis unit is used to correspond the target text content to the corresponding section of the target PPT template, and to render and synthesize a target PPT by combining the target text content and the target PPT template, wherein the target PPT is stored in the blockchain.

[0050] In addition, to achieve the above-mentioned purpose, the present invention also provides a PPT generation device, which includes a processor, a memory, and a PPT generation program stored in the memory and executable by the processor, wherein when the PPT generation program is executed by the processor, the steps of the PPT generation method as described above are implemented.

[0051] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a PPT generation program is stored, wherein when the PPT generation program is executed by a processor, the steps of the PPT generation method as described above are implemented.

[0052] The present invention provides a PPT generation method, device, equipment and computer-readable storage medium. The PPT generation method first automatically determines the theme type of a target text content according to the target text content, so as to preliminarily determine the theme type of the PPT that needs to be generated in the end; obtains a content label by analyzing the intrinsic semantics of the target text content, so that the intrinsic semantics of the target text content can be further mined; selects a matching target PPT template by combining the theme type with the content label, so that the selected target PPT template is highly adapted to the target text content; finally, automatically generates a target PPT required by a user based on the target text content and the target PPT template, and can automatically generate a PPT file that meets the user's expectations without manual operation, thereby solving the technical problem of low efficiency of the existing PPT generation method. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of the hardware structure of a PPT generating device involved in an embodiment of the present invention;

[0054] Figure 2 It is a flow chart of the first embodiment of the PPT generation method of the present invention;

[0055] Figure 3 It is a schematic diagram of the functional modules of the PPT generating device of the present invention.

[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0058] The PPT generation method involved in the embodiment of the present invention is mainly applied to a PPT generation device, which can be a PC, a portable computer, a mobile terminal, or other device with display and processing functions.

[0059] Reference Figure 1 , Figure 1 The hardware structure diagram of the PPT generation device involved in the embodiment of the present invention is shown in FIG. In the embodiment of the present invention, the PPT generation device may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0060] Those skilled in the art will understand that Figure 1 The hardware structure shown in does not constitute a limitation on the PPT generating device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0061] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a PPT generation program.

[0062] exist Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the PPT generation program stored in the memory 1005 and execute the PPT generation method provided in the embodiment of the present invention.

[0063] Based on the above hardware structure, various embodiments of the PPT generation method of the present invention are proposed.

[0064] There are currently two main ways to generate a PPT file on a web page. The first is static PPT download. This method is to pre-make a PPT file and then upload it to the system. When a user clicks to download, the pre-made PPT file can be downloaded. However, the PPT file downloaded in this way is fixed no matter which user downloads it or how many times it is downloaded, that is, the content and template of the PPT will not change. The second is dynamic PPT download. In this way, the user selects a PPT template on the page, and then fills in the content corresponding to the blank space in the PPT template on the page form. Finally, the system synthesizes it to generate the PPT file required by the user, that is, the content and template of the PPT can be arbitrarily matched by the user based on actual needs. However, when users use this method to make PPT, they need to manually fill in the content throughout the process and pay special attention to the correspondence between the content they fill in and the content of the blank space in the template. Once filled in incorrectly, a PPT file that does not meet expectations will be generated. All of the above situations reflect the technical problem of the inefficiency of the existing PPT generation method.

[0065] In order to solve the above problems, the present invention provides a PPT generation method, namely, firstly automatically determining the theme type of the target text content according to the target text content, so as to preliminarily determine the theme type of the PPT that needs to be generated in the end; obtaining the content label by analyzing the intrinsic semantics of the target text content, so as to further explore the intrinsic semantics of the target text content; screening out a matching target PPT template by combining the theme type with the content label, so that the screened out target PPT template is highly adapted to the target text content; finally, automatically generating the target PPT required by the user based on the target text content and the target PPT template, and automatically generating a PPT file that meets the user's expectations without manual operation, thereby solving the technical problem of low efficiency of the existing PPT generation method.

[0066] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the PPT generation method of the present invention.

[0067] The first embodiment of the present invention provides a PPT generation method, the PPT generation method comprising the following steps:

[0068] Step S10, obtaining target text content and determining the subject type of the target text content;

[0069] In this embodiment, the method is applied to a terminal. The target text content is the text content determined by the user to be displayed in a PPT. In actual situations, the text content can be presented in different types of files such as text, pictures, PDF files, etc., and the terminal needs to extract it. The theme type refers to the content theme reflected by the target text content. For example, common theme types include work summary, annual report, training sharing, etc.

[0070] The user can send the target text content to the terminal by uploading a file containing the target text content, or editing and inputting the target text content at a specified location on the page. After the terminal extracts or directly obtains the target text content used to generate the PPT, it can determine the subject type of the target text content by searching for keywords or inputting the target text content into a pre-trained model. The specific method of searching for keywords is: using common subject types as preset keywords, searching for whether there are one or more preset keywords in the target text content, if there is only one preset keyword, then using this preset keyword as the subject type of the target text content; if there are multiple preset keywords, then the preset keywords with high frequency of occurrence are preferentially selected as the subject type of the target text content. The latter method will be described in detail in the third embodiment and will not be described in detail here.

[0071] Step S20, analyzing the intrinsic semantics of the target text content and generating a content tag corresponding to the intrinsic semantics;

[0072] In this embodiment, the intrinsic semantics includes the semantic information between words, sentences, and different sentences in the target text content. The content tag is a keyword or keyword group that can indicate the intrinsic semantics of the target text content. Common content tags can be product names, work plans, historical reviews, thank you speeches, etc.

[0073] After obtaining the target text content, the terminal needs to determine its topic type and analyze its intrinsic semantics, and condense the intrinsic semantics obtained from the analysis into one or more content tags. The specific intrinsic semantic analysis method usually uses relevant algorithms and / or models of natural language processing to deeply mine semantic information from the word level to the sentence level and then to the cross-sentence level of the target text content. The terminal then converts the mined intrinsic semantics into one or more keywords as content tags that can indicate the intrinsic semantics of the target text content.

[0074] It should be noted that since a target text content usually expresses multiple meanings, that is, it usually needs to be marked with multiple content tags, the envelope text in the same target text content can be divided into regions according to the content tags, and each region of text is associated with a content tag.

[0075] Step S30, combining the subject type and the content tag, selecting a target PPT template that matches the target text content from a preset PPT template library, so as to generate a target PPT based on the target text content and the target PPT template.

[0076] In this embodiment, the preset PPT template library can be a PPT template library stored locally, or a PPT template library that needs to be accessed online. The preset PPT template library contains commonly used PPT templates, and each PPT template will indicate the applicable scenario category. The target PPT template refers to the PPT template that is finally selected and best matches the current target text content. The target PPT refers to a PPT file that is synthesized after the target text content is adaptively integrated into the target PPT template and can meet user expectations.

[0077] After obtaining the subject type and content label of the target text content, the terminal needs to combine the two and use this as a standard to filter in the preset PPT template library to filter out the PPT template that best matches the target text content, that is, the above-mentioned target PPT template. After determining the target PPT template, the terminal can integrate the target text content into the target PPT template, and the final PPT file is the above-mentioned target PPT.

[0078] It should be noted that since a PPT usually contains pictures, audio or video in addition to text, after the terminal completes processing the text part, the user can further process the target PPT and add the required pictures, audio, video and other content to the target PPT to improve the target PPT.

[0079] In this embodiment, the present invention determines the theme type of the target text content by acquiring the target text content; analyzes the intrinsic semantics of the target text content and generates a content tag corresponding to the intrinsic semantics; combines the theme type and the content tag to select a target PPT template that matches the target text content from a preset PPT template library, so as to generate a target PPT based on the target text content and the target PPT template. Through the above-mentioned method, the present invention first automatically determines the theme type according to the target text content, so as to preliminarily determine the theme type of the PPT that needs to be generated in the end; obtains the content tag by analyzing the intrinsic semantics of the target text content, so as to further mine the intrinsic semantics of the target text content; selects a matching target PPT template by combining the theme type with the content tag, so that the selected target PPT template is highly adapted to the target text content; finally, the target PPT required by the user is automatically generated based on the target text content and the target PPT template, and a PPT file that meets the user's expectations can be automatically generated without manual operation, thereby solving the technical problem of low efficiency of the existing PPT generation method.

[0080] Furthermore, based on the above Figure 2 The first embodiment shown in the figure proposes a second embodiment of the PPT generation method of the present invention. In this embodiment, step S20 includes:

[0081] Using a preset conversion model to obtain the word vector and position vector of the target text content, and analyzing the cross-sentence semantics of the target text content based on the TF-IDF algorithm to obtain the adjacent semantic vector of the target text content;

[0082] The word vector, position vector and adjacent semantic vector are used as the intrinsic semantics, input into a pre-trained language model, and a content label corresponding to the intrinsic semantics is obtained.

[0083] In this embodiment, the term frequency-inverse document frequency algorithm is the TF-IDF (term frequency-inverse document frequency) algorithm. The word vector can usually be obtained using mainstream public models such as word2vec and glove, and the position vector can usually be obtained using the sine wave mentioned in the transformer.

[0084] The terminal uses the TF-IDF algorithm to generate the TF-IDF attribute queue corresponding to the target text content. The terminal converts the target text content into a word vector matrix, performs part-of-speech analysis on each word sequence, and obtains the part-of-speech frequency attribute queue corresponding to the target text content. The terminal uses named entity recognition technology to identify the entities of each sentence sequence in the target text content, and combines the preset knowledge graph triples to obtain the entity co-occurrence frequency attribute queue corresponding to the target text content. The terminal combines the TF-IDF attribute queue, the part-of-speech frequency attribute queue and the entity co-occurrence frequency attribute queue to obtain the target candidate word set. Finally, the terminal can summarize the three types of vectors as the intrinsic semantics corresponding to the target text content. Finally, the input vector of each word is the sum of the word vector, the position vector, and the adjacent semantic vector. The terminal directly uses the intrinsic semantics of the target text content as the input of the pre-trained language model to obtain its corresponding content label.

[0085] Furthermore, the method of obtaining the word vector and position vector of the target text content by using a preset conversion model, and analyzing the cross-sentence semantics of the target text content based on a TF-IDF algorithm to obtain an adjacent semantic vector of the target text content includes:

[0086] The word vector is obtained by using a preset word2vec model, and the position vector is obtained by using a sine wave in a preset transformer model;

[0087] Based on the TF-IDF algorithm and named entity recognition technology, a target candidate word set for obtaining adjacent semantic vectors of the target text content is obtained;

[0088] Based on a preset long short-term memory network model, each candidate word in the target candidate word set is encoded to obtain an adjacent semantic vector of the target text content.

[0089] In this embodiment, the mainstream word2vec model is used to obtain word vectors, and the sine wave mentioned in the transformer can be used to obtain position vectors. The above two types of vector acquisition methods are conventional technical means in the field. The specific acquisition process is not repeated here.

[0090] Since the importance of words in each sentence is different, it is very expensive for the terminal to calculate the adjacent semantic vector of each word in the sentence, so a target candidate calculation word set is set to filter the words. The main process of the terminal's calculation of the target candidate calculation word set is:

[0091] Take actions on the corpus to remove stop words, auxiliary words, and interjections; specifically, let the i-th sentence in the target text content be Xi, and the j-th word in sentence Xi be marked as Xij. Count the frequency of occurrence and inverse document frequency, i.e., TF-IDF, of each word in sentence Xi, and sort them from low to high to form a TF-IDF attribute queue. The position ID in the queue starts counting from 1, and the next position is incremented by 1. For words with equal TF-IDF values, their position ID in the queue is the same ID; perform part-of-speech analysis on each word Xij in the sentence, count the proportion of each part of speech, and sort them from low to high to form a part-of-speech frequency attribute queue. The position ID in the queue starts counting from 1, and the next position is incremented by 1. For words with equal part-of-speech frequencies, their position ID in the queue is the same ID; based on the knowledge graph, FreeBase and others can be used as references in practice to identify entities in sentences through named entity recognition (NER) technology. The frequency of each entity in the sentence co-appearing with other entities in the knowledge graph triples is counted, and sorted from low to high to form an entity co-occurrence frequency attribute queue. The position ID in the queue starts counting from 1, and the next position is incremented by 1. For nouns with equal co-occurrence frequencies, their position IDs in the entity co-occurrence frequency attribute queue are the same ID; for the word Xij in the sentence, take the product of its position ID in the above three types of attribute queues, and sort them to get the final candidate calculation word queue. Different thresholds can be set in each round during the training process, such as 20%, which means taking the top 20% of words into the target candidate calculation word set.

[0092] Furthermore, the combining the subject type and the content tag to select a target PPT template matching the target text content from a preset PPT template library includes:

[0093] Determine an initial PPT template corresponding to the subject type from the PPT template library, and obtain a section title of the initial PPT template;

[0094] The content tag is matched with the section title, so that the initial PPT template where the section title matching the content tag is located is used as the target PPT template.

[0095] In this embodiment, the preset PPT template library is pre-stored with PPT templates commonly used in the field, and each PPT template will be marked with a corresponding theme tag. Usually a PPT template will be divided into several major sections, and each section will be marked with a corresponding section title, such as "Title", "Summary", "Planning", etc. The terminal first uses the theme type of the target text content to perform a first round of screening in the PPT template library, and uses the PPT template that meets the theme type as the initial PPT template, and then uses the content tag to perform a second round of screening in the initial PPT template, and uses the initial PPT template that matches the content tag as the target PPT template. The number of the above-mentioned target PPT templates can be one or more.

[0096] Furthermore, matching the content tag with the section title to use the initial PPT template containing the section title that matches the content tag as the target PPT template includes:

[0097] Obtaining the similarity between the content tag and the section title, and taking the initial PPT template corresponding to the section title whose similarity exceeds a preset similarity threshold as a candidate PPT template;

[0098] Dividing the target text content into a plurality of text regions according to the content tags, and associating each of the text regions with a corresponding section of the selected PPT template;

[0099] The number of words in each of the text areas and the word capacity of the corresponding section are obtained, so as to select a candidate PPT template corresponding to the word capacity matching the number of words in each of the text areas as the target PPT template.

[0100] In this embodiment, the current target text content is a year-end summary speech, and the theme type is the year-end summary type. The terminal selects the PPT template of the year-end summary body from the PPT template library as the initial PPT template. The terminal obtains the titles of the major sections in each initial PPT template, and matches the section title with the content label of the year-end summary speech. The specific matching method can be a similarity algorithm such as Euclidean distance, cosine distance, Hamilton distance, etc., to calculate the similarity between the two. Since the content label and the section title are usually short texts, the preferred similarity algorithm is the cosine similarity algorithm. Taking the cosine similarity algorithm as an example, the terminal first needs to segment the content label and the section title. For example, the terminal can first segment the content title with the help of a segmentation tool to obtain a segmentation list 1; at the same time, the section title is segmented to obtain a segmentation list 2, and then the segmentation list 1 and the segmentation list 2 are put into the same set, and the word frequency of the content label and the section title for the words in this set is calculated respectively to generate the word frequency vectors of the content label and the section title. Finally, the terminal calculates the cosine similarity between the two word frequency vectors of the content label and the section title. The larger the value, the more similar it is. The terminal compares the currently calculated similarity between the two with the preset similarity threshold. The pairing that exceeds the preset similarity threshold is the matching content label-section title pair. For example, the content labels of the current year-end summary include: "Product Name", "Two Plans", "Theme". The section titles in a certain initial PPT template include: "Title (Product Name)", "Content 1 (Plan)", "Content 2 (Plan)", "Content 3 (Theme)", then the above initial PPT template can be matched with the target text content as the target PPT template. When there is more than one target PPT template, the terminal can display multiple target templates for the user to choose from.

[0101] The specific method of dividing the target text content into several text areas according to the content label is: the text part corresponding to the content label is mapped in the target text content as the text area corresponding to the content label. For example, the current target text content is divided into 4 paragraphs, and 3 content labels of the target text content have been obtained in steps S21-S22: product name, publicity plan and communication theme. After obtaining the content label, the terminal can mark the content involved in the content label extraction in the target text content. For example, the content label "product name" is obtained based on the first paragraph, and the first paragraph is marked as the first text area; the content label "publicity plan" is obtained based on the second and third paragraphs, and the second and third paragraphs are marked as the second text area; the content label "communication theme" is obtained based on the fourth paragraph, and the fourth paragraph is marked as the third text area. In this case, the terminal only needs to identify the previous area marking to directly obtain the text area corresponding to each content label in the target text content.

[0102] After the terminal identifies each text area in the target text content corresponding to each content tag, a mapping relationship is established between each text area and the section title that matches its corresponding content tag, and each text area can be mapped to the corresponding section of the selected PPT template. For example, the section title that matches the content tag "Product Name" is "Title Name", and the text area corresponding to this content tag is the first paragraph in the target text content, then a mapping relationship is established between the first paragraph and the section title "Title Name" to classify the text content of the first paragraph into the PPT section named "Title Name".

[0103] As an implementation method, the terminal can further screen the PPT templates according to the number of words in the target text content. For example, the year-end summary speech has a total of 500 words, of which the number of words corresponding to the "Product Name" label is 20, the number of words corresponding to the "Plan 1" label is 150, the number of words corresponding to the "Plan 2" label is 200, and the number of words corresponding to the "Theme" label is "130". The terminal obtains the word capacity that each section in the selected PPT template can accommodate, and selects the selected template whose corresponding content word count of each label in the target text content accounts for 70%-90% of the corresponding section capacity as the target PPT template to ensure the aesthetics of the content presentation, or displays all the selected PPT templates, gives priority to displaying the PPT templates that meet the word count requirements and displays the corresponding recommendation mark, so as to recommend them to users.

[0104] Furthermore, by deeply mining the word vector, position vector and adjacent semantic vector of the target text content and combining them as the intrinsic semantics, the final content label can more accurately represent the actual meaning of the target text content; by using the subject type and content label of the target text content to conduct multiple rounds of screening on the PPT template, the final selected PPT template can be more in line with the target text content; by further considering the matching of the word capacity of each section in the PPT template with the target text content, the final selected target PPT template can be both beautiful and practical.

[0105] Furthermore, based on the above Figure 2 The first embodiment shown in the figure proposes a third embodiment of the PPT generation method of the present invention. In this embodiment, step S10 includes:

[0106] When receiving the PPT generation instruction, obtaining the original file based on the PPT generation instruction, and extracting the target text content in the original file;

[0107] The pre-trained document topic generation model is used to obtain the topic type of the target text content.

[0108] In this embodiment, the terminal directly obtains the text content from the text file as the above-mentioned target text content, or converts the file in other formats into text and then obtains the text content therefrom as the above-mentioned target text content, and then extracts the keywords in the target text content, and determines the topic type of the target text according to the keywords; or directly inputs the target text content into a pre-trained document topic generation model, and the model directly outputs the topic type of the target text content.

[0109] Specifically, the terminal receives a PPT generation instruction. Among them, the instruction can be initiated by the user to the terminal based on actual needs, or it can be automatically initiated by the terminal according to a preset program, and this embodiment does not make specific restrictions. The terminal determines the original text content file containing the target text content according to the instruction. For example, the user can edit a piece of text on the page, and click the preset button in the page after the editing is completed. The terminal will generate the original text content file containing the file currently edited by the user. The user clicks the button, which is equivalent to sending a PPT generation instruction to the terminal. When the terminal receives the instruction, it can obtain it from the instruction, or find the original text content file pointed to by the instruction. When the original text content file is a non-text file, it is converted into a format to obtain an original file of text type, and the text content in the original file can be directly extracted. Prior to this, the terminal can first collect a large amount of text materials with subject labels in related fields as a training data set to train a document theme generation matrix suitable for the field, and then the target text content to be identified can be directly used as the input of the pre-training model, and the model can directly output the text theme corresponding to the target text content. Among them, the document topic generation model (LDA, Latent Dirichlet Allocation) contains a three-layer structure of words, topics, and documents. Documents to topics follow a multinomial distribution, and topics to words follow a multinomial distribution. LDA is an unsupervised machine learning technology that can be used to identify hidden topic information in large-scale document collections or corpuses.

[0110] Further, generating a target PPT based on the target text content and the target PPT template includes:

[0111] The target text content is mapped to a corresponding section of the target PPT template, and the target text content and the target PPT template are combined to render a synthetic target PPT, wherein the target PPT is stored in the blockchain.

[0112] In this embodiment, after determining the final target PPT template, the terminal can copy the text in the text area to the corresponding section according to the mapping relationship between each text area and the section title that matches its corresponding content label that has been established above. For example, copy the text of the first paragraph in the target text content to the "Title Name Section"; copy the text of the second paragraph to the "Plan 1" section; copy the third paragraph to the "Plan 2" section; copy the text of the fourth paragraph to the "Theme Summary" section. The terminal can render and synthesize it through the default settings, or provide optional styles to the user, and render and synthesize it according to the user's choice to obtain the final target PPT file. It should be noted that if there are multiple target PPT files generated in the end, they need to be displayed to the user for comparison so that the user can choose from them.

[0113] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target PPT, the above-mentioned target PPT can also be stored in a node of a blockchain.

[0114] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0115] Furthermore, by utilizing the pre-trained document topic generation model, the topic type of the target text content can be obtained quickly and accurately, thereby improving the efficiency of obtaining the topic type; by combining the target text content with the target PPT template to render the synthetic target PPT, the efficiency and automation of PPT generation are improved.

[0116] In addition, if Figure 3 To achieve the above purpose, the present invention further provides a PPT generating device, the PPT generating device comprising:

[0117] The subject type determination module 10 is used to obtain target text content and determine the subject type of the target text content;

[0118] A content label generation module 20, configured to analyze the intrinsic semantics of the target text content and generate a content label corresponding to the intrinsic semantics;

[0119] The target PPT generation module 30 is used to select a target PPT template matching the target text content from a preset PPT template library in combination with the subject type and the content tag, so as to generate a target PPT based on the target text content and the target PPT template.

[0120] The invention also provides a PPT generating device.

[0121] The PPT generation device includes a processor, a memory, and a PPT generation program stored in the memory and executable on the processor, wherein when the PPT generation program is executed by the processor, the steps of the PPT generation method described above are implemented.

[0122] Among them, the method implemented when the PPT generation program is executed can refer to the various embodiments of the PPT generation method of the present invention, and will not be repeated here.

[0123] In addition, an embodiment of the present invention further provides a computer-readable storage medium.

[0124] A PPT generation program is stored on the computer-readable storage medium of the present invention, wherein when the PPT generation program is executed by a processor, the steps of the PPT generation method as described above are implemented.

[0125] Among them, the method implemented when the PPT generation program is executed can refer to the various embodiments of the PPT generation method of the present invention, and will not be repeated here.

[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0129] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A PPT generation method, characterized in that: The PPT generation method comprises: Acquire target text content and determine the subject type of the target text content; Analyzing the intrinsic semantics of the target text content and generating a content tag corresponding to the intrinsic semantics; In combination with the subject type and the content tag, a target PPT template matching the target text content is selected from a preset PPT template library to generate a target PPT based on the target text content and the target PPT template; The analyzing the intrinsic semantics of the target text content and generating a content label corresponding to the intrinsic semantics includes: Using a preset conversion model to obtain the word vector and position vector of the target text content, and analyzing the cross-sentence semantics of the target text content based on the TF-IDF algorithm to obtain the adjacent semantic vector of the target text content; The word vector, position vector and adjacent semantic vector are used as the intrinsic semantics, input into a pre-trained language model, and a content label corresponding to the intrinsic semantics is obtained; The method of obtaining the word vector and position vector of the target text content by using a preset conversion model, and analyzing the cross-sentence semantics of the target text content based on a TF-IDF algorithm to obtain an adjacent semantic vector of the target text content includes: The word vector is obtained by using a preset word2vec model, and the position vector is obtained by using a sine wave in a preset transformer model; Based on the TF-IDF algorithm and named entity recognition technology, a target candidate word set for obtaining adjacent semantic vectors of the target text content is obtained; Based on a preset long short-term memory network model, each candidate word in the target candidate word set is encoded to obtain an adjacent semantic vector of the target text content.

2. The PPT generation method according to claim 1, characterized in that: The step of combining the subject type with the content tag and selecting a target PPT template matching the target text content from a preset PPT template library includes: Determine an initial PPT template corresponding to the subject type from the PPT template library, and obtain a section title of the initial PPT template; The content tag is matched with the section title, so that the initial PPT template where the section title matching the content tag is located is used as the target PPT template.

3. The PPT generation method according to claim 2, characterized in that: The matching of the content tag with the section title to use the initial PPT template containing the section title matching the content tag as the target PPT template includes: Obtaining the similarity between the content tag and the section title, and taking the initial PPT template corresponding to the section title whose similarity exceeds a preset similarity threshold as a candidate PPT template; Dividing the target text content into a plurality of text regions according to the content tags, and associating each of the text regions with a corresponding section of the selected PPT template; The number of words in each of the text areas and the word capacity of the corresponding section are obtained, so as to select a candidate PPT template corresponding to the word capacity matching the number of words in each of the text areas as the target PPT template.

4. The PPT generation method according to claim 1, characterized in that: The step of obtaining the target text content and determining the subject type of the target text content includes: When receiving the PPT generation instruction, obtaining the original file based on the PPT generation instruction, and extracting the target text content in the original file; The pre-trained document topic generation model is used to obtain the topic type of the target text content.

5. The PPT generation method according to any one of claims 1 to 4, characterized in that: The generating a target PPT based on the target text content and the target PPT template includes: The target text content is mapped to a corresponding section of the target PPT template, and the target text content and the target PPT template are combined to render a synthetic target PPT, wherein the target PPT is stored in the blockchain.

6. A PPT generation device, characterized in that: The PPT generating device comprises: A topic type determination module, used to obtain target text content and determine the topic type of the target text content; A content label generation module, used to analyze the intrinsic semantics of the target text content and generate a content label corresponding to the intrinsic semantics; The content label generation module is also used to obtain the word vector and position vector of the target text content by using a preset conversion model, and analyze the cross-sentence semantics of the target text content based on the TF-IDF algorithm to obtain the adjacent semantic vector of the target text content; the word vector, position vector and adjacent semantic vector are used as the intrinsic semantics, input into the pre-trained language model, and obtain the content label corresponding to the intrinsic semantics; The content tag generation module is further used to obtain the word vector using a preset word2vec model, and to obtain the position vector using a sine wave in a preset transformer model; based on the TF-IDF algorithm and named entity recognition technology, obtain a target candidate word set for obtaining the adjacent semantic vector of the target text content; based on a preset long short-term memory network model, encode each candidate word in the target candidate word set to obtain the adjacent semantic vector of the target text content; The target PPT generation module is used to select a target PPT template matching the target text content from a preset PPT template library in combination with the subject type and the content tag, so as to generate a target PPT based on the target text content and the target PPT template.

7. A PPT generation device, characterized in that: The PPT generating device comprises a processor, a memory, and a PPT generating program stored in the memory and executable by the processor, wherein when the PPT generating program is executed by the processor, the steps of the PPT generating method as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a PPT generation program, wherein when the PPT generation program is executed by a processor, the steps of the PPT generation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Automatic extraction method for text labels in combination with theme model and semantic analyses

    CN106055538A

  • Demonstration document automatic typesetting method and system

    CN107451113A

  • Method, device, computing device and storage medium for obtaining file template

    CN109299445A