A method, device, electronic device and storage medium for generating a presentation document

By analyzing and matching the document content, the two-way conversion between documents and code is realized, which solves the problem of high document conversion cost and incompatibility in the existing technology, and realizes automatic generation and efficient conversion of presentation documents.

CN114911753BActive Publication Date: 2025-03-28BEIJING UNISOUND INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210523877.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-14
Publication Date
2025-03-28
Estimated Expiration
2042-05-14

AI Technical Summary

Technical Problem

The existing open source document platform cannot realize the two-way conversion of documents and code, resulting in high development costs, high maintenance costs, and failure in document conversion due to incompatibility of formats.

Method used

By obtaining the target format document, analyzing and extracting the document content and its format information, dividing the document content according to the matching degree between the preset format information and the target format information, converting the content that does not meet the preset format into a voice file, and writing content that meets the preset format in the presentation document, realizing the automatic generation of the presentation document.

Benefits of technology

Automatic generation of presentation documents is realized, which reduces development and maintenance costs and solves the problem of document conversion failure caused by format incompatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911753B_ABST
    Figure CN114911753B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for generating a presentation document. The method includes: obtaining a target format document to be converted; parsing the target format document and extracting at least one document content carried by the target format document and the format information corresponding to each document content; dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content; converting the second document content into a voice file, writing the first document content and the voice file into the preset presentation document to obtain the target presentation document. The present application can automatically divide the first document content that meets the preset format and the second document content that does not meet the preset format, and write the first document content and the second document content into the presentation document to realize the automatic generation of the presentation document. The second document content is written into the presentation document in the form of a voice file to avoid the problem of document conversion failure caused by format incompatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for generating a presentation document. Background Art

[0002] With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are being applied in the financial field. The traditional financial industry is gradually transforming to Fintech. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on document conversion technology. At present, all open source document platforms can only provide traditional document functions, without the function of two-way conversion or code generation between documents and codes. Moreover, in the open source document platform, the development cost from document to code is high, and it is impossible to fully realize the automatic creation of documents, resulting in high maintenance costs for developers on the open source document platform. At the same time, during the document conversion process, it is easy to fail due to format incompatibility. Summary of the invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method, device, electronic device and storage medium for generating a presentation document.

[0004] According to one aspect of an embodiment of the present application, a method for generating a presentation document is provided, comprising:

[0005] Acquire a target format document to be converted, wherein the target format document includes document contents in different formats;

[0006] Parsing the target format document, and extracting at least one document content carried by the target format document, and format information corresponding to each document content;

[0007] Dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, wherein the preset format is a format supported by the presentation document;

[0008] The second document content is converted into a voice file, and the first document content and the voice file are written into the preset presentation document to obtain a target presentation document.

[0009] Furthermore, the parsing of the target format document and extracting at least one document content carried by the target format document and format information corresponding to each document content includes:

[0010] Identifying all document contents of the target format document using a preset rule to obtain at least one format information carried by the all document contents;

[0011] The text content corresponding to each format information is extracted from the entire document content.

[0012] Furthermore, the identifying the entire document content of the target format document by using a preset rule to obtain at least one format information carried by the entire document content includes:

[0013] Detecting all the document contents and extracting document features corresponding to the all the document contents;

[0014] Classifying all the document contents according to the document features to obtain at least one content type of document content to be processed, wherein the content type includes: text type, image type, and table type;

[0015] At least one format information carried in the content of the document to be processed is identified according to the identification strategy corresponding to the content type.

[0016] Furthermore, the dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content includes:

[0017] Calculating a matching degree between the format information and the preset format information;

[0018] The document content whose format information matches the preset format information more than or equal to the preset matching degree is determined as the first document content, and the document content whose format information matches the preset format information less than the preset matching degree is determined as the second document content.

[0019] Furthermore, the writing of the first document content and the voice file into the preset presentation document to obtain the target presentation document includes:

[0020] Writing the first document content into the preset demonstration document to obtain an initial demonstration document;

[0021] Determine a paging node in the initial presentation document, and paginate the initial presentation document according to the paging node to obtain a paginated initial presentation document;

[0022] Acquire the adjacent document content of the second document content from the entire document content, and determine the first position information of the adjacent document content in the initial presentation document after the paging;

[0023] The second location information of the voice file is determined based on the first location information, and the voice file is written into the paginated initial presentation document according to the second location information to obtain the target presentation document.

[0024] Further, the determining of the paging nodes in the initial presentation document includes:

[0025] Acquire a third document content that satisfies a preset paging format in the first document content;

[0026] The position information of the third document content in the first document content is obtained, and the position information is determined as the paging node.

[0027] Furthermore, the method further comprises:

[0028] Obtaining user demand information corresponding to the target presentation document;

[0029] In the case where the user demand information carries security information corresponding to the target presentation document, obtaining encrypted data corresponding to the security information;

[0030] The target presentation document is encrypted using the encryption data to obtain an encrypted target presentation document.

[0031] According to another aspect of the embodiment of the present application, there is also provided a device for generating a presentation document, including:

[0032] An acquisition module, used for acquiring a target format document to be converted, wherein the target format document includes document contents in different formats;

[0033] A parsing module, used to parse the target format document and extract at least one document content carried by the target format document and format information corresponding to each document content;

[0034] A division module, used for dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, wherein the preset format is a format supported by the presentation document;

[0035] The processing module is used to convert the second document content into a voice file, write the first document content and the voice file into the preset presentation document, and obtain a target presentation document.

[0036] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.

[0037] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.

[0038] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.

[0039] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application can automatically divide the first document content that meets the preset format supported by the presentation document and the second document content that does not meet the preset format by detecting the document content in the format document, and write the first document content and the second document content into the presentation document, thereby realizing the automatic generation of the presentation document. And the second document content is written into the presentation document in the form of a voice file, which solves the problem of document conversion failure caused by format incompatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 A flowchart of a method for generating a presentation document provided in an embodiment of the present application;

[0043] Figure 2 A flowchart of a method for generating a presentation document provided in another embodiment of the present application;

[0044] Figure 3 A block diagram of a device for generating a presentation document provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0047] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0048] The embodiments of the present application provide a method, device, electronic device and storage medium for generating a presentation document. The method provided by the embodiments of the present invention can be applied to any required electronic device, for example, it can be an electronic device such as a server or a terminal, which is not specifically limited here. For the convenience of description, it is referred to as an electronic device in the following.

[0049] According to one aspect of the embodiments of the present application, a method embodiment of a method for generating a presentation document is provided. Figure 1 A flowchart of a method provided in an embodiment of the present application is as follows: Figure 1 As shown, the method includes:

[0050] Step S11, obtaining a target format document to be converted, wherein the target format document includes document contents in different formats.

[0051] The method provided in the embodiment of the present application is applied to an intelligent terminal, which may be a smart phone, a laptop, a tablet computer, or other devices. Specifically, the process of the intelligent terminal obtaining the target format document to be converted may be: the requesting device sends it to the intelligent terminal according to its own processing requirements. Or, the user directly uploads it on the intelligent terminal. Among them, the target format document may be a Word document, an Excel document, or the like.

[0052] In the embodiment of the present application, the document contents of different formats included in the target format document may be text, table, picture, etc. Among them, text and table include multiple formats, such as title format, body format, etc., and picture includes multiple formats, such as picture effect, outline, etc.

[0053] Step S12: parsing the target format document, and extracting at least one item of document content carried by the target format document, and format information corresponding to each item of document content.

[0054] In the embodiment of the present application, step S12, parsing the target format document and extracting at least one document content carried by the target format document and the format information corresponding to each document content, includes the following steps A1-A2:

[0055] Step A1, identifying the entire document content of the target format document using a preset rule, and obtaining at least one format information carried by the entire document content.

[0056] In the embodiment of the present application, step A1, using a preset rule to identify all document contents of a target format document, and obtaining at least one format information carried by all document contents, includes the following steps A101-A103:

[0057] Step A101, detecting all document contents and extracting document features corresponding to all document contents.

[0058] In an embodiment of the present application, a target recognition model is used to extract all document contents of a target format document, and to extract document features included in all document contents. The document features may be text features, image features, table features, header and page number features, and the like.

[0059] It should be noted that the target recognition model can be trained using document samples. Specifically, document samples and document annotation information corresponding to the document samples are obtained. The document annotation information is used to annotate the document features corresponding to each content in the entire document content. The document samples and document annotation information are then input into the initial recognition model so that the initial recognition model can extract the document content of the document content and learn the relationship between the document content and the document features to obtain the final target recognition model.

[0060] Step A102, classifying all document contents according to document features to obtain document contents to be processed of at least one content type, wherein the content types include: text type, image type, and table type.

[0061] In an embodiment of the present application, after obtaining the document features of all document contents, the target classification model is used to output the content type corresponding to the current document features based on the correspondence between the document content and the preset content type, and then the document content to be processed corresponding to each document type is summarized.

[0062] It should be noted that the target classification model can be trained using content feature samples. Specifically, the content feature samples and the type annotation information corresponding to the content feature samples are obtained. The type annotation information is used to annotate the content type corresponding to the content feature samples. The content feature samples and the type annotation information are then input into the initial classification model to make the relationship between the content feature samples and the content types in the initial classification model, and obtain the final target classification model.

[0063] Step A103: identifying at least one format information carried in the content of the document to be processed according to the identification strategy corresponding to the content type.

[0064] In an embodiment of the present application, a correspondence between a preset content type and an identification strategy is obtained, and based on the correspondence, an identification strategy corresponding to the current content type is determined, and the identification strategy is used to identify at least one format information carried in the content of the document to be processed.

[0065] As an example: when the content type is text type, the corresponding recognition strategy is the text recognition strategy. The text recognition strategy is used to identify the content of the document to be processed corresponding to the text type. The content of the document to be processed can be matched with the preset format information, and the preset format information with the greatest match degree is used as the final format information, such as: title font size, font, and body text size, font, etc.

[0066] Step A2: extracting text content corresponding to each format information from the entire document content.

[0067] In an embodiment of the present application, after determining the format information in all document contents, the text content of each format information is extracted for subsequent processing of the text content corresponding to the format information when the format information does not meet the document conversion conditions.

[0068] Step S13, dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, and the preset format is the format supported by the presentation document.

[0069] In the embodiment of the present application, step S13, dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, includes the following steps B1-B2:

[0070] Step B1, calculating the matching degree between the format information and the preset format information.

[0071] Step B2: determine the document content whose format information matches the preset format information more than or equal to the preset matching degree as the first document content, and determine the document content whose format information matches the preset format information less than the preset matching degree as the second document content.

[0072] In an embodiment of the present application, the preset format information supported by the presentation document is first obtained, and the matching degree between the format information carried by the target format document and the preset format information is calculated. The preset format information may be an image format, a text format, etc. If the matching degree between the format information and the preset format information is greater than or equal to the preset matching degree, it is determined that the format information matches the preset format information, and the document content whose format information matches the preset format information is determined as the first document content. On the contrary, if the matching degree between the format information and the preset format information is less than the preset matching degree, it is determined that the format information does not match the preset format information, and the document content whose format information does not match the preset format information is determined as the second document content.

[0073] Step S14, converting the second document content into a voice file, writing the first document content and the voice file into a preset presentation document, and obtaining a target presentation document.

[0074] In the embodiment of the present application, since the second document content does not conform to the conversion rules of the presentation document, during the conversion process, the second document content is first converted into a voice file and then written into the presentation document.

[0075] In the embodiment of the present application, step S14, writing the first document content and the voice file into the preset presentation document to obtain the target presentation document, includes the following steps C1-C4:

[0076] Step C1, writing the first document content into a preset demonstration document to obtain an initial demonstration document.

[0077] In an embodiment of the present application, the position information and / or arrangement order of the first document content in the target format document is first obtained, and the first document content is written into a preset rock document according to the position information and / or arrangement order to obtain an initial presentation document.

[0078] As an example, the first document content includes multiple text paragraphs and multiple images. First, the paragraph arrangement order of each text paragraph is determined according to the paragraph sequence number or line number of the text paragraph in the target format document, and according to the position information of the image in the target format document (for example: page number, line number, etc.), and then the text paragraphs are written into the preset presentation document according to the paragraph arrangement order, and the images are written into the preset presentation document according to the position information to obtain the initial presentation document.

[0079] Step C2, determining the paging nodes in the initial presentation document, and paging the initial presentation document according to the paging nodes to obtain the paginated initial presentation document.

[0080] In the embodiment of the present application, determining the paging nodes in the initial presentation document includes the following steps C201-C202:

[0081] Step C201, obtaining third document content that meets a preset paging format in the first document content.

[0082] Step C202: Obtain location information of the third document content in the first document content, and determine the location information as a paging node.

[0083] In an embodiment of the present application, when a text paragraph in the first document content switches from the main text format to the first-level title format, it is determined that the preset paging format is met. At this time, the document content corresponding to the main text format is determined as the third document content, and the position information of the third document content in the first document content is set as the paging node.

[0084] Alternatively, the number of lines in the text paragraph in the first document content is detected, and when the number of lines is greater than a preset number of lines, the document content with the same number of lines in the text paragraph as the preset number of lines is determined as the third document content, and the position information of the third document content in the first document content is set as a paging node.

[0085] In the embodiment of the present application, after the paging nodes are determined, the initial presentation document is paginated using the paging nodes to obtain a paginated presentation document.

[0086] Step C3, obtaining the adjacent document content of the second document content from the entire document content, and determining the first position information of the adjacent document content in the initial presentation document after paging.

[0087] Step C4, determining the second location information of the voice file based on the first location information, and writing the voice file into the paginated initial presentation document according to the second location information to obtain a target presentation document.

[0088] In an embodiment of the present application, after writing the first document content, it is also necessary to obtain the adjacent document content of the second document content from the entire document content. Since the entire document content only includes the first document content and the second document content, it can be determined that the adjacent document content of the second document content belongs to the first document content. Therefore, the first position information of the adjacent document content in the initial presentation document after paging can be directly determined, and the second position information of the voice file can be determined using the first position information. Finally, the voice file is written into the initial presentation document after paging according to the second position information to obtain the final target presentation document.

[0089] The method provided in the embodiment of the present application can automatically divide the first document content that meets the preset format supported by the presentation document and the second document content that does not meet the preset format by detecting the document content in the format document, and write the first document content and the second document content into the presentation document, thereby realizing the automatic generation of the presentation document. The second document content is written into the presentation document in the form of a voice file, thereby solving the problem of document conversion failure caused by format incompatibility.

[0090] Figure 2 A flowchart of a method for generating a presentation document provided in an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:

[0091] Step S21, obtaining user demand information corresponding to the target presentation document.

[0092] Step S22, when the user demand information carries security information corresponding to the target presentation document, obtaining encrypted data corresponding to the security information.

[0093] Step S23, encrypting the target presentation document using the encryption data to obtain the encrypted target presentation document.

[0094] In an embodiment of the present application, after obtaining the target presentation document, it is also necessary to obtain user demand information corresponding to the target presentation document, so that according to the security information corresponding to the target presentation document, the security information may include: the security level of the target presentation document or the department information to which the target presentation document belongs. Based on the corresponding relationship between the security level or department information and the preset encryption data, the currently used encryption data is determined, and the target presentation document is encrypted using the encryption data to obtain the encrypted target presentation document, wherein the encryption process may be to encrypt the text or image in the target presentation document using the encryption algorithm or encryption key in the encryption data. By encrypting the target presentation document after obtaining the target presentation document, the security of the target presentation document can be guaranteed.

[0095] Figure 3 This is a block diagram of a device for generating a presentation document provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 3 As shown, the device comprises:

[0096] An acquisition module 31 is used to acquire a target format document to be converted, wherein the target format document includes document contents in different formats;

[0097] The parsing module 32 is used to parse the target format document and extract at least one document content carried by the target format document and the format information corresponding to each document content;

[0098] A division module 33 is used to divide the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, wherein the preset format is a format supported by the presentation document;

[0099] The processing module 34 is used to convert the second document content into a voice file, write the first document content and the voice file into a preset presentation document, and obtain a target presentation document.

[0100] In the embodiment of the present application, the parsing module 32 is used to identify the entire document content of the target format document using preset rules to obtain at least one format information carried by the entire document content; and extract the text content corresponding to each format information from the entire document content.

[0101] In an embodiment of the present application, the parsing module 32 is used to detect all document contents and extract document features corresponding to all document contents; classify all document contents according to the document features to obtain at least one content type of document content to be processed, wherein the content types include: text type, image type, table type; and identify at least one format information carried in the document content to be processed according to the identification strategy corresponding to the content type.

[0102] In an embodiment of the present application, the division module 33 is used to calculate the matching degree between the format information and the preset format information; determine the document content whose matching degree between the format information and the preset format information is greater than or equal to the preset matching degree as the first document content, and determine the document content whose matching degree between the format information and the preset format information is less than the preset matching degree as the second document content.

[0103] In an embodiment of the present application, the processing module 34 is used to write the first document content into a preset presentation document to obtain an initial presentation document; determine the paging nodes in the initial presentation document, and paginate the initial presentation document according to the paging nodes to obtain the paginated initial presentation document; obtain the adjacent document content of the second document content from the entire document content, and determine the first position information of the adjacent document content in the paginated initial presentation document; determine the second position information of the voice file based on the first position information, and write the voice file into the paginated initial presentation document according to the second position information to obtain the target presentation document.

[0104] In the embodiment of the present application, the processing module 34 is used to obtain the third document content that meets the preset paging format in the first document content; obtain the position information of the third document content in the first document content, and determine the position information as the paging node.

[0105] In an embodiment of the present application, the device also includes: a demand processing module, which is used to obtain user demand information corresponding to the target presentation document; when the user demand information carries security information corresponding to the target presentation document, obtain encrypted data corresponding to the security information; and use the encrypted data to encrypt the target presentation document to obtain the encrypted target presentation document.

[0106] The present application also provides an electronic device, such as Figure 4 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0107] Memory 1503, used for storing computer programs;

[0108] The processor 1501 is used to implement the steps of the above embodiment when executing the computer program stored in the memory 1503.

[0109] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0110] The communication interface is used for communication between the above terminal and other devices.

[0111] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0112] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0113] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the method for generating a presentation document described in any one of the above embodiments.

[0114] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for generating a presentation document described in any one of the above embodiments.

[0115] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk), etc.

[0116] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

[0117] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A method for generating a presentation document, characterized in that: include: Acquire a target format document to be converted, wherein the target format document includes document contents in different formats; Parsing the target format document, and extracting at least one document content carried by the target format document, and format information corresponding to each document content; Dividing the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content includes: calculating the matching degree between the format information and the preset format information, determining the document content whose matching degree between the format information and the preset format information is greater than or equal to the preset matching degree as the first document content, and determining the document content whose matching degree between the format information and the preset format information is less than the preset matching degree as the second document content; The preset format is a format supported by the presentation document; Converting the second document content into a voice file; Writing the first document content and the voice file in a preset presentation document to obtain a target presentation document includes: writing the first document content into the preset presentation document to obtain an initial presentation document, determining the paging nodes in the initial presentation document, and paging the initial presentation document according to the paging nodes to obtain the paginated initial presentation document, obtaining the adjacent document content of the second document content from the entire document content, and determining the first position information of the adjacent document content in the paginated initial presentation document, determining the second position information of the voice file based on the first position information, and writing the voice file into the paginated initial presentation document according to the second position information to obtain the target presentation document.

2. The method according to claim 1, characterized in that The step of parsing the target format document and extracting at least one document content item carried by the target format document and format information corresponding to each document content item includes: Identifying all document contents of the target format document using a preset rule to obtain at least one format information carried by the all document contents; The text content corresponding to each format information is extracted from the entire document content.

3. The method according to claim 2, characterized in that The step of identifying the entire document content of the target format document by using a preset rule to obtain at least one format information carried by the entire document content includes: Detecting all the document contents and extracting document features corresponding to the all the document contents; Classifying all the document contents according to the document features to obtain at least one content type of document content to be processed, wherein the content type includes: text type, image type, and table type; At least one format information carried in the content of the document to be processed is identified according to the identification strategy corresponding to the content type.

4. The method according to claim 1, characterized in that: The determining of the paging nodes in the initial presentation document comprises: Acquire a third document content that satisfies a preset paging format in the first document content; The position information of the third document content in the first document content is obtained, and the position information is determined as the paging node.

5. The method according to claim 1, characterized in that The method further comprises: Obtaining user demand information corresponding to the target presentation document; In the case where the user demand information carries security information corresponding to the target presentation document, obtaining encrypted data corresponding to the security information; The target presentation document is encrypted using the encryption data to obtain an encrypted target presentation document.

6. A device for generating a presentation document, characterized in that: include: An acquisition module, used for acquiring a target format document to be converted, wherein the target format document includes document contents in different formats; A parsing module, used to parse the target format document and extract at least one document content carried by the target format document and format information corresponding to each document content; a division module, configured to divide the document content according to the matching degree between the format information and the preset format information to obtain the first document content and the second document content, including: calculating the matching degree between the format information and the preset format information, determining the document content whose matching degree between the format information and the preset format information is greater than or equal to the preset matching degree as the first document content, and determining the document content whose matching degree between the format information and the preset format information is less than the preset matching degree as the second document content; The preset format is a format supported by the presentation document; A processing module, used for converting the second document content into a voice file, writing the first document content and the voice file into a preset presentation document, and obtaining a target presentation document, including: writing the first document content into the preset presentation document to obtain an initial presentation document, determining a paging node in the initial presentation document, and paging the initial presentation document according to the paging node to obtain a paginated initial presentation document, obtaining adjacent document content of the second document content from the document content, and determining first position information of the adjacent document content in the paginated initial presentation document, determining second position information of the voice file based on the first position information, and writing the voice file into the paginated initial presentation document according to the second position information to obtain the target presentation document.

7. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method steps of any one of claims 1 to 5 when executed.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the method steps of any one of claims 1 to 5 by running a program stored in a memory.

Citation Information

Patent Citations

  • Format conversion method and system

    CN106528744A

  • PPT document generation method and device, storage medium, and terminal

    CN109033049A