Presentation conversion method and apparatus, device, and storage medium

By identifying and matching style tags and object information of presentation documents and template pages, the presentation style is automatically adjusted, solving the inefficiency problem caused by manual adjustment in existing technologies and achieving efficient document conversion.

CN115034177BActive Publication Date: 2026-03-24CHINA PING AN LIFE INSURANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

When users use the same presentation in different contexts, they need to manually adjust the presentation style, resulting in low conversion efficiency and increased time costs.

Method used

By acquiring the style tags of the presentation to be converted and the target presentation, identifying and comparing the style tags of the template page, and combining image recognition and object information matching, the target page is automatically determined and the target presentation is generated.

Benefits of technology

It improves the efficiency of presentation conversion, reduces time costs, and ensures that the style of the converted document meets the requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115034177B_ABST
    Figure CN115034177B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a presentation conversion method, device and equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: obtaining a to-be-converted presentation, a target document style label and a plurality of first template pages; performing style identification processing on each first template page to determine a second template page conforming to the target document style label; performing image identification processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and performing image identification processing on each second template page to obtain second object information of each second template page; performing matching processing on the first object information and the second object information to determine a target page from each second template page; and generating a target presentation according to the first object information and the target page. The embodiment of the application can improve the conversion efficiency of the presentation and reduce the time cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a presentation conversion method and device, equipment and a storage medium. BACKGROUND

[0002] With the popularization of office software, presentations are widely used in all aspects of social life. For example, presentations are applied to work reports, enterprise promotion, product promotion, wedding celebrations, project bidding, management consulting, education and training, and the like. The application field of presentations is increasingly wide, and people's demand for slide production is also increasing.

[0003] At present, when a user uses the same presentation in different occasions, the user needs to convert the presentation style of the presentation in advance to ensure that the presentation style meets the needs of the current occasion. However, converting each content page of the presentation requires a lot of time, the conversion efficiency of the presentation is low, and the time cost is increased. SUMMARY

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] The embodiments of the present application provide a presentation conversion method, device, equipment and storage medium, which can improve the conversion efficiency of the presentation and reduce the time cost.

[0006] To achieve the above-mentioned purpose, the first aspect of the embodiments of the present application provides a presentation conversion method, which comprises: obtaining a to-be-converted presentation, a target presentation style label and a plurality of first template pages; performing style recognition processing on each of the first template pages to obtain a first presentation style label of each of the first template pages, and performing comparison processing on the first presentation style label and the target presentation style label, and determining a second template page from the plurality of first template pages according to the comparison result between the first presentation style label and the target presentation style label; performing image recognition processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and performing image recognition processing on each of the second template pages to obtain second object information of each of the second template pages; performing matching processing on the first object information and the second object information, and determining a target page from each of the second template pages according to the matching result between the first object information and the second object information; and generating a target presentation according to the first object information and the target page.

[0007] In some embodiments, the first object information includes a plurality of first text attribute information, a plurality of first image attribute information and first layout type information, and the second object information includes a plurality of second text attribute information, a plurality of second image attribute information and second layout type information; the image recognition processing on the to-be-converted presentation and obtaining the first object information of the to-be-converted presentation, and the image recognition processing on each of the second template pages and obtaining the second object information of each of the second template pages, include: optical character recognition on the to-be-converted presentation and obtaining the first text attribute information, and optical character recognition on each of the second template pages and obtaining the second text attribute information; image recognition on the to-be-converted presentation and obtaining the first image attribute information, and image recognition on each of the second template pages and obtaining the second image attribute information; determining the first layout type information according to the first text attribute information and the first image attribute information, and determining the second layout type information according to the second text attribute information and the second image attribute information.

[0008] In some embodiments, the first text attribute information includes first text position information, first text content information, a first font size value and a first number of words value, the first image attribute information includes first picture position information, the second text attribute information includes second text position information, second text content information, a second font size value and a second number of words value, and the second image attribute information includes second picture position information; the determining the first layout type information according to the first text attribute information and the first image attribute information, and the determining the second layout type information according to the second text attribute information and the second image attribute information, include: semantic recognition processing on the first text content information and obtaining first semantic information; determining a text type of each of the first text attribute information according to the first text position information, the first semantic information, the first font size value and the first number of words value; determining the first layout type information according to the text type of the first text attribute information, the first text position information and the first picture position information; semantic recognition processing on the second text content information and obtaining second semantic information; determining a text type of each of the second text attribute information according to the second text position information, the second semantic information, the second font size value and the second number of words value; and determining the second layout type information according to the text type of the second text attribute information, the second text position information and the second picture position information.

[0009] In some embodiments, the text types include at least one of a main title type, a subtitle type, and a main text type; the first layout type information includes at least one of picture-text type information, contrast type information, clause type information, and other type information; the second layout type information includes the picture-text type information, the contrast type information, and the clause type information; wherein, for the to-be-converted presentation, first font size values corresponding to the main title type, the subtitle type, and the main text type decrease in turn, the picture-text type information refers to the first image attribute information including one first picture position information, the contrast type information refers to the first image attribute information including two first picture position information, the clause type information refers to the first template page including three or more first text attribute information belonging to the subtitle type, and the other type information refers to type information different from the picture-text type information, the contrast type information, and the clause type information.

[0010] In some embodiments, the matching processing of the first object information and the second object information, and the determination of the target page from each of the second template pages according to a matching result between the first object information and the second object information, includes: comparison processing of the first layout type information and the second layout type information, and the determination of a same-type template page from each of the second template pages according to a comparison result of the first layout type information and the second layout type information; and matching processing of the first object information and the second object information, and the determination of the target page from each of the same-type template pages according to a matching result between the first object information and the second object information.

[0011] In some embodiments, the matching processing of the first object information and the second object information, and the determination of the target page from each of the same-type template pages according to a matching result between the first object information and the second object information, includes: merging processing of the to-be-converted presentation and each of the same-type template pages to obtain a merged page corresponding to each of the same-type template pages; for each of the merged pages, determination of a first matching value according to the first text position information and the second text position information, and determination of a second matching value according to the first picture position information and the second picture position information; determination of a matching result of each of the same-type template pages and the to-be-converted presentation according to the first matching value and the second matching value; and determination of the target page from each of the same-type template pages according to the matching result of each of the same-type template pages and the to-be-converted presentation.

[0012] In some embodiments, before the step of comparing the first typesetting information and the second typesetting information, and determining the same type template page from each of the second template pages according to a comparison result of the first typesetting information and the second typesetting information, the method further includes: when the first typesetting information is the other type information, changing the first typesetting information to the graphic-text type information.

[0013] To achieve the above object, a second aspect of the embodiments of the present application provides a presentation conversion device, the device comprising: an acquisition unit configured to acquire a to-be-converted presentation, a target document style label and a plurality of first template pages; an analysis unit configured to perform style identification processing on each of the first template pages to obtain a first document style label of each of the first template pages, and perform comparison processing on the first document style label and the target document style label to determine a second template page from the plurality of first template pages according to a comparison result between the first document style label and the target document style label; an identification unit configured to perform image identification processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and perform image identification processing on each of the second template pages to obtain second object information of each of the second template pages; a matching unit configured to perform matching processing on the first object information and the second object information to determine a target page from each of the second template pages according to a matching result between the first object information and the second object information; and a generation unit configured to generate a target presentation according to the first object information and the target page.

[0014] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, the electronic device comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, the program being executed by the processor to realize the presentation conversion method of the first aspect.

[0015] To achieve the above object, a fourth aspect of the embodiments of the present application provides a storage medium, the storage medium being a computer-readable storage medium, for computer-readable storage, the storage medium storing one or more programs, the one or more programs being executable by one or more processors to realize the presentation conversion method of the first aspect.

[0016] The presentation conversion method, device, equipment and storage medium provided in the application, the embodiment of the application comprises: obtaining a to-be-converted presentation, a target document style label and a plurality of first template pages; performing style identification processing on each of the first template pages to obtain a first document style label of each of the first template pages, and performing comparison processing on the first document style label and the target document style label, and determining a second template page from the plurality of first template pages according to a comparison result between the first document style label and the target document style label; performing image recognition processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and performing image recognition processing on each of the second template pages to obtain second object information of each of the second template pages; performing matching processing on the first object information and the second object information, and determining a target page from each of the second template pages according to a matching result between the first object information and the second object information; and generating a target presentation according to the first object information and the target page. According to the scheme provided in the embodiment of the application, the first document style label of each of the first template pages is identified by using style identification processing, the first document style label is compared with the target document style label, and the second template page meeting the document style requirement is determined according to the comparison result, then the first object information of the to-be-converted presentation is identified by using image recognition processing, and the second object information of each of the second template pages is identified, then the target page suitable for converting the to-be-converted presentation is determined by matching the first object information and the second object information according to the matching result, and then the target presentation is generated, so that the to-be-converted presentation is converted into the target presentation, the conversion efficiency of the presentation is improved, and the time cost is reduced.

[0017] Other features and advantages of the application will be set forth in the descriptions that follow and in part will be apparent from the description, or can be learned by practice of the application. The purposes and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings are included to provide a further understanding of the technical scheme of the application, and constitute a part of the specification, and are used together with the embodiments of the application to explain the technical scheme of the application, and do not constitute a limitation on the technical scheme of the application.

[0019] Figure 1 is a flowchart of a presentation conversion method provided by an embodiment of the application;

[0020] Figure 2 is a flowchart of a method for determining typesetting type information provided by another embodiment of the application;

[0021] Figure 3 is a flowchart of another process for determining layout type information provided by another embodiment of the present application;

[0022] Figure 4 is a flowchart of a process for determining a target page provided by another embodiment of the present application;

[0023] Figure 5 is a flowchart of another process for determining a target page provided by another embodiment of the present application;

[0024] Figure 6 is a flowchart of a process for changing layout type information provided by another embodiment of the present application;

[0025] Figure 7 is a structural schematic diagram of a presentation conversion device provided by another embodiment of the present application;

[0026] Figure 8 is a hardware structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0028] In the description of the present application, the meaning of several is one or more, the meaning of multiple is two or more, greater than, less than, more than, etc. are understood as not including the number, above, below, within, etc. are understood as including the number.

[0029] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or above figures are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0030] First, the meanings of several terms involved in the present application are analyzed:

[0031] Artificial intelligence (AI): is a new technical science of studying, developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence, including robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also the theory, method, technology and application system of using digital computer or digital computer controlled machine to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain optimal results.

[0032] Optical Character Recognition (OCR) refers to the process by which electronic devices (such as scanners or digital cameras) examine characters printed on paper, determine their shape by detecting light and dark patterns, and then translate the shape into computer text using character recognition methods.

[0033] Natural Language Processing (NLP) is an important direction in the field of computer science and artificial intelligence; NLP studies various theories and methods that enable effective communication between people and computers using natural language.

[0034] At present, when a user uses the same presentation in different occasions, the user needs to convert the style of the presentation first to ensure that the style of the presentation meets the needs of the current occasion. However, converting each content page of the presentation requires a lot of time, and the conversion efficiency of the presentation is low, resulting in an increase in time cost.

[0035] To solve the problem of low conversion efficiency of a presentation, which leads to an increase in time cost, the application provides a presentation conversion method, device, equipment and storage medium. The method comprises the following steps: obtaining a to-be-converted presentation, a target document style label and a plurality of first template pages; performing style recognition processing on each first template page to obtain a first document style label of each first template page, and performing comparison processing on the first document style label and the target document style label, and determining a second template page from the plurality of first template pages according to a comparison result between the first document style label and the target document style label; performing image recognition processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and performing image recognition processing on each second template page to obtain second object information of each second template page; performing matching processing on the first object information and the second object information, and determining a target page from each second template page according to a matching result between the first object information and the second object information; and generating a target presentation according to the first object information and the target page. According to the scheme provided in the embodiment of the application, the first document style label of each first template page is recognized by using style recognition processing, the first document style label and the target document style label are compared, and the second template page meeting the document style requirement is determined according to the comparison result, then the first object information of the to-be-converted presentation is recognized by using image recognition processing, and the second object information of each second template page is recognized, then the target page suitable for converting the to-be-converted presentation is determined by matching the first object information and the second object information according to the matching result, and then the target presentation is generated, which realizes the conversion of the to-be-converted presentation into the target presentation, improves the conversion efficiency of the presentation, and reduces the time cost.

[0036] The presentation conversion method, device, equipment and storage medium provided in the embodiment of the application are described in detail through the following embodiments. First, the presentation conversion method in the embodiment of the application is described.

[0037] The presentation conversion method provided in the embodiments of the present application relates to the technical field of data processing. The presentation conversion method provided in the embodiments of the present application can be applied to a terminal, can be applied to a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like; the server end can be configured as a stand-alone physical server, can be configured as a server cluster or a distributed system formed by multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms; and the software can be an application that implements the presentation conversion method, but is not limited to the above forms.

[0038] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0039] It should be noted that in each specific embodiment of the present application, when relevant processing needs to be performed according to user information, user behavior data, user history data, and user location information and other data related to the identity or characteristics of the user, the user's permission or consent will be obtained first, and the collection, use, and processing of the data will comply with relevant laws, regulations, and standards of the country and region. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiments of the present application to normally operate will be obtained.

[0040] The embodiments of the present application will be further described below with reference to the accompanying drawings.

[0041] As Figure 1 shown, Figure 1is a flowchart of a presentation conversion method provided by an embodiment of the present application. The presentation conversion method includes but is not limited to the following steps:

[0042] In step S110, a to-be-converted presentation, a target document style label, and a plurality of first template pages are acquired.

[0043] In step S120, style recognition processing is performed on each first template page to obtain a first document style label of each first template page, and the first document style label is compared with the target document style label. According to a comparison result between the first document style label and the target document style label, a second template page is determined from the plurality of first template pages.

[0044] In step S130, image recognition processing is performed on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and image recognition processing is performed on each second template page to obtain second object information of each second template page.

[0045] In step S140, the first object information and the second object information are matched. According to a matching result between the first object information and the second object information, a target page is determined from each second template page.

[0046] In step S150, a target presentation is generated according to the first object information and the target page.

[0047] It can be understood that the user input is obtained the to-be-converted presentation and the target document style label, the target document style label is one of a plurality of preset document style labels, the document style label is used to represent the document style of the presentation, and a plurality of first template pages stored in the template library are obtained. The identification object of the style identification processing includes but is not limited to: the size of the presentation, the text features and picture features in the presentation. Through the style identification processing, the document style of each first template page can be effectively determined, combined with the preset document style label, the first document style label of each first template page is obtained, then the first document style label same as the target document style label is screened out, and then the first module page matched with the target document style label is taken as the second template page. All second template pages meet the document style requirement, then through image recognition processing on the to-be-converted presentation, first object information is obtained, and image recognition processing is performed on each second template page to obtain second object information. The first object information and the second object information refer to the sum of the feature information of each object in the presentation. The sum of the feature information of each object can be used as the feature information of the presentation. The object includes but is not limited to: text and picture; then the second object information with the highest matching degree with the first object information is determined, and the second template page corresponding to the second object information is taken as the target page, and then the target presentation is generated through the first object information and the target page; since the target page is the second template page closest to the feature information of the to-be-converted presentation, it can avoid large changes in the content of the to-be-converted presentation during the conversion process, increase the readability of the target presentation, and improve the conversion quality of the presentation; based on this, the first document style label of each first template page is identified by using the style identification processing, the first document style label and the target document style label are compared, and the second template page meeting the document style requirement is determined according to the comparison result, then the first object information of the to-be-converted presentation is identified by using the image recognition processing, and the second object information of each second template page is identified, then the first object information and the second object information are matched, and the target page suitable for converting the to-be-converted presentation is determined according to the matching result, and then the target presentation is generated, which realizes the conversion of the to-be-converted presentation into the target presentation, improves the conversion efficiency of the presentation, and reduces the time cost.

[0048] It is worth noting that the target presentation is generated by the first object information and the target page, and the specific steps include but are not limited to: removing the text content of the text box in the target page, and removing the picture in the target page, then adding the text content corresponding to the first object information into the corresponding text box in the target page, setting the text style of the text content to the text style in the initial state, and the text style includes but is not limited to: font, font size, text color, and text highlighting; then insert the picture corresponding to the first object information into the position of the picture in the initial state of the target page, and adjust the size of the picture corresponding to the first object information according to the size of the picture in the initial state of the target page.

[0049] It should be noted that the style recognition model can be used for style recognition processing. The presentation is input into the trained style recognition model. First, the pre-processing layer of the style recognition model is used for pre-processing, so as to determine the size of the presentation, the text features and picture features in the presentation; then, the style recognition model analyzes the size of the presentation, for example, the aspect ratio of the presentation is used to determine the display style of the presentation, the presentation with an aspect ratio greater than one is suitable for computer end, and the presentation with an aspect ratio less than one is suitable for mobile phone end; then, the style recognition model analyzes the text features in the presentation, for example, the text features include but are not limited to: text position, text word count and text font, the text font includes but is not limited to: Song, Kai and Cursive, first determine the text paragraph with the most text word count, then determine the text font of the text paragraph, and determine the font style of the presentation through the text font; then, the style recognition model analyzes the picture features in the presentation to determine the picture style of the presentation, and the picture style includes but is not limited to: technology, ink, business and cartoon, and the picture features include but are not limited to: picture position and picture size; the layout style of the presentation is also determined by the text position, text word count, picture position and picture size, and the layout style includes but is not limited to: graphic-text layout style, contrast layout style and clause layout style; the presentation style label is determined by the display style, font style, picture style and layout style of the presentation.

[0050] It should be noted that the presentation style label and the plurality of presentation training presentations are used as training data to train the preset classification model, so as to obtain the above-mentioned style recognition model.

[0051] It should be noted that the presentation refers to PPT, and can also refer to a poster or other design scheme with text content on the picture, which is not limited here.

[0052] In specific practice, the presentation conversion method can convert the presentation style of the to-be-converted presentation according to the template pages of different presentation styles, so as to meet the user demand and present the content in different styles. The presentation conversion method can be applied in the fields of education, training, design and the like.

[0053] In addition, with reference to Figure 2 In an embodiment, the first object information includes a plurality of first text attribute information, a plurality of first image attribute information and first layout type information, and the second object information includes a plurality of second text attribute information, a plurality of second image attribute information and second layout type information. Figure 1 The step S130 in the illustrated embodiment includes but is not limited to the following steps:

[0054] The step S210 includes optical character recognition of the to-be-converted presentation to obtain the first text attribute information, and optical character recognition of each second template page to obtain the second text attribute information.

[0055] The step S220 includes image recognition of the to-be-converted presentation to obtain the first image attribute information, and image recognition of each second template page to obtain the second image attribute information.

[0056] The step S230 includes determination of the first layout type information according to the first text attribute information and the first image attribute information, and determination of the second layout type information according to the second text attribute information and the second image attribute information.

[0057] It can be understood that the first text attribute information and the second text attribute information can be determined through optical character recognition, and the first image attribute information and the second image attribute information can be determined through image recognition. The first text attribute information and the second text attribute information both include but are not limited to text position information and text word number information. The first image attribute information and the second image attribute information both include but are not limited to picture position information and picture size information. The layout type of the to-be-converted presentation can be determined through the first text attribute information and the first image attribute information. The layout type of the second template page can be determined through the second text attribute information and the second image attribute information. The first layout type information is used to represent the layout type of the to-be-converted presentation, and the second layout type information is used to represent the layout type of the second template page.

[0058] It is worth noting that the optical character recognition can be performed through an optical character recognition model, and the image recognition can be performed through an image recognition model. The method of performing optical character recognition through an optical character recognition model and the method of performing image recognition through an image recognition model are well known to those skilled in the art, and will not be described here.

[0059] In addition, with reference to Figure 3 In an embodiment, the first text attribute information comprises first text position information, first text content information, a first font size value and a first number of words value, the first image attribute information comprises first picture position information, the second text attribute information comprises second text position information, second text content information, a second font size value and a second number of words value, and the second image attribute information comprises second picture position information. Figure 2 The step S230 in the illustrated embodiment includes but is not limited to the following steps:

[0060] In step S310, the first text content information is subjected to semantic recognition processing to obtain first semantic information.

[0061] In step S320, the text type of each first text attribute information is determined according to the first text position information, the first semantic information, the first font size value and the first number of words value.

[0062] In step S330, the first layout type information is determined according to the text type of the first text attribute information, the first text position information and the first picture position information.

[0063] In step S340, the second text content information is subjected to semantic recognition processing to obtain second semantic information.

[0064] In step S350, the text type of each second text attribute information is determined according to the second text position information, the second semantic information, the second font size value and the second number of words value.

[0065] In step S360, the second layout type information is determined according to the text type of the second text attribute information, the second text position information and the second picture position information.

[0066] It can be understood that the first semantic information and the second semantic information are obtained through semantic recognition processing, the first semantic information is used to represent the semantic content of the first text content information, and the second semantic information is used to represent the semantic content of the second text content information, the text type of the first text attribute information can be analyzed through the first text position information, the first semantic information, the first font size value and the first number of words value, and then the first layout type information is determined in combination with the first picture position information, in addition, the text type of the second text attribute information can be analyzed through the second text position information, the second semantic information, the second font size value and the second number of words value, and then the second layout type information is determined in combination with the second picture position information, and the layout types of the to-be-converted presentation and the second template page can be accurately analyzed.

[0067] It is worth noting that semantic recognition processing belongs to natural language processing, and the method of performing semantic recognition through a trained semantic recognition model is a well-known technology to those skilled in the art, and will not be described here.

[0068] In addition, in an embodiment, the text type includes at least one of the following: a main title type, a sub-title type, and a main text type.

[0069] The first layout type information includes at least one of the following: picture-text type information, contrast type information, clause type information, and other type information.

[0070] The second layout type information includes picture-text type information, contrast type information, and clause type information.

[0071] In the embodiment, the first font size value corresponding to the main title type, the sub-title type, and the main text type of the to-be-converted presentation is sequentially reduced, the picture-text type information refers to the first image attribute information including one first picture position information, the contrast type information refers to the first image attribute information including two first picture position information, the clause type information refers to the first template page including three or more first text attribute information belonging to the sub-title type, and the other type information refers to type information different from the picture-text type information, the contrast type information, and the clause type information.

[0072] It can be understood that in the same page of the presentation, the font size values of the main title, the sub-title, and the main text are sequentially reduced, and the number of words of the main title, the sub-title, and the main text content is usually sequentially increased, so that the text type can be analyzed by the font size value or the number of words. When the page of the presentation is provided with one main title, one main text, and one picture, the layout type of the presentation belongs to the picture-text type. When the page of the presentation is provided with one main title, two parallel sub-titles, two parallel main texts, and two parallel pictures, the layout type of the presentation belongs to the contrast type. When the page of the presentation is provided with one main title, multiple sub-titles, and corresponding main texts of the sub-titles, the layout type of the presentation belongs to the clause type.

[0073] In addition, with reference to Figure 4 In an embodiment, the step S140 in the illustrated embodiment includes but is not limited to the following steps: Figure 1 The step S140 in the illustrated embodiment includes but is not limited to the following steps:

[0074] The step S410 includes comparing the first layout type information and the second layout type information, and determining the same type template page from each second template page according to the comparison result of the first layout type information and the second layout type information.

[0075] The step S420 includes matching the first object information and the second object information, and determining the target page from each same type template page according to the matching result between the first object information and the second object information.

[0076] It can be understood that the second template page with the same layout type as the to-be-converted presentation is determined as a same-type template page, and then the first object information and the second object information of the same-type template page are matched to determine the same-type template page closest to the feature information of the to-be-converted presentation as the target page. The same-type template pages are filtered out first. In the matching process, the number of same-type template pages is less than the number of second template pages, which can reduce the number of matching processes. Compared with determining the same-type template page from each second template page, the matching process of the first object information and the second object information takes more time. Therefore, by reducing the number of matching processes, the matching efficiency can be effectively improved, and the conversion efficiency of the presentation can be improved.

[0077] As shown in FIG. 1, Figure 5 As shown in FIG. 1, Figure 4 The step S420 in the embodiment shown includes but is not limited to the following steps:

[0078] In step S510, the to-be-converted presentation and each same-type template page are merged to obtain a merged page corresponding to each same-type template page.

[0079] In step S520, for each merged page, a first matching value is determined according to the first text position information and the second text position information, and a second matching value is determined according to the first picture position information and the second picture position information.

[0080] In step S530, the matching result of each same-type template page and the to-be-converted presentation is determined according to the first matching value and the second matching value.

[0081] In step S540, the target page is determined from each same-type template page according to the matching result of each same-type template page and the to-be-converted presentation.

[0082] It can be understood that the to-be-converted presentation and each same-type template page are merged, which means that the content of the to-be-converted presentation is completely copied into each same-type template page to obtain a corresponding merged page. The first text position information and the second text position information are analyzed to calculate a first matching value representing the text matching degree, and the first picture position information and the second picture position information are analyzed to calculate a second matching value representing the picture matching degree. Then the first matching value and the second matching value are added to obtain a total matching value, which is the matching result of each same-type template page. The same-type template page with the highest total matching value is selected as the target page, which can effectively filter out the same-type template page closest to the feature information of the to-be-converted presentation, avoid large changes in the content of the to-be-converted presentation during the conversion process, increase the readability of the target presentation, and improve the conversion quality of the presentation.

[0083] In a specific implementation, the first matching value is determined by determining a first text coordinate of a center of the text box in which the text is located in a page of the presentation according to the first text position information, determining a second text coordinate of the center of the text box in which the text is located in the page of the presentation according to the second text position information, and then calculating a first Euclidean distance between the first text coordinate and the second text coordinate; the first matching value is negatively correlated with the first Euclidean distance, and the smaller the value of the first Euclidean distance, the greater the first matching value; the second matching value is determined by determining a first picture coordinate of a center of the picture in the page of the presentation according to the first picture position information, determining a second picture coordinate of the center of the picture in the page of the presentation according to the second picture position information, and then calculating a second Euclidean distance between the first picture coordinate and the second picture coordinate; the second matching value is negatively correlated with the second Euclidean distance, and the smaller the value of the second Euclidean distance, the greater the second matching value.

[0084] It is worth noting that the method of calculating the Euclidean distance of two coordinates is a well-known technology to those skilled in the art, and will not be described in detail here.

[0085] As shown in FIG. 6, Figure 6 As shown in FIG. 4, Figure 4 Before step S410 in the embodiment shown, the following steps are further included but not limited to:

[0086] Step S610, when the first typesetting type information is other type information, changing the first typesetting type information to graphic-text type information.

[0087] It can be understood that the first typesetting type information is other type information, which means that there is no first typesetting type information in the second typesetting type information. Changing the first typesetting type information to general graphic-text type information can ensure the effective conversion of the to-be-converted presentation.

[0088] In addition, with reference to Figure 7 The application further provides a presentation conversion device 700, comprising:

[0089] An acquisition unit 710 is configured to acquire a to-be-converted presentation, a target document style label, and a plurality of first template pages.

[0090] An analysis unit 720 is configured to perform style recognition processing on each first template page to obtain a first document style label of each first template page, and perform comparison processing on the first document style label and the target document style label, and determine a second template page from the plurality of first template pages according to a comparison result between the first document style label and the target document style label.

[0091] The recognition unit 730 is configured to perform image recognition processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and perform image recognition processing on each second template page to obtain second object information of each second template page.

[0092] The matching unit 740 is configured to perform matching processing on the first object information and the second object information, and determine a target page from each second template page according to a matching result between the first object information and the second object information.

[0093] The generation unit 750 is configured to generate a target presentation according to the first object information and the target page.

[0094] It can be understood that the specific implementation of the presentation conversion apparatus 700 is basically the same as the specific implementation of the presentation conversion method described above, and will not be repeated here. Based on this, the first document style label of each first template page is identified by using style recognition processing, the first document style label and the target document style label are compared, and the second template page that meets the document style requirement is determined according to the comparison result. Then, the first object information of the to-be-converted presentation and the second object information of each second template page are identified by using image recognition processing. Then, the first object information and the second object information are matched, and the target page suitable for converting the to-be-converted presentation is determined according to the matching result. Then, the target presentation is generated, the to-be-converted presentation is converted into the target presentation, the conversion efficiency of the presentation is improved, and the time cost is reduced.

[0095] In addition, with reference to Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0096] The processor 801 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present application.

[0097] The memory 802 can be implemented in the form of read only memory (ROM), static storage device, dynamic storage device or random access memory (RAM), etc. The memory 802 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 802 and are called and executed by the processor 801 to perform the presentation conversion method of the embodiments of the present application, for example, to perform the method steps S110 to S150 in the method of Figure 1 , the method steps S210 to S230 in the method of Figure 2 , the method steps S310 to S360 in the method of Figure 3 , the method steps S410 to S420 in the method of Figure 4 , the method steps S510 to S540 in the method of Figure 5 , and the method step S610 in the method of Figure 6 .

[0098] The input / output interface 803 is used to realize information input and output.

[0099] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0100] The bus 805 is used to transmit information between various components (such as the processor 801, the memory 802, the input / output interface 803 and the communication interface 804) of the device.

[0101] The processor 801, the memory 802, the input / output interface 803 and the communication interface 804 are connected to each other through the bus 805 to realize the communication connection between them in the device.

[0102] The embodiments of the present application also provide a storage medium, which is a computer readable storage medium, used for computer readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned presentation conversion method, for example, to perform the method steps S110 to S150 in the method of Figure 1 , the method steps S210 to S230 in the method of Figure 2 , the method steps S310 to S360 in the method of Figure 3 , the method steps S410 to S420 in the method of Figure 4 , the method steps S510 to S540 in the method of Figure 5 , and the method step S610 in the method of Figure 6The method step S610 in the method.

[0103] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0104] The presentation conversion method, device, equipment and storage medium provided by the embodiments of the present application obtain a to-be-converted presentation, a target document style label and a plurality of first template pages; perform style recognition processing on each first template page to obtain a first document style label of each first template page, and perform comparison processing on the first document style label and the target document style label, and determine a second template page from the plurality of first template pages according to the comparison result between the first document style label and the target document style label; perform image recognition processing on the to-be-converted presentation to obtain first object information of the to-be-converted presentation, and perform image recognition processing on each second template page to obtain second object information of each second template page; perform matching processing on the first object information and the second object information, and determine a target page from each second template page according to the matching result between the first object information and the second object information; and generate a target presentation according to the first object information and the target page. Based on this, the first document style label of each first template page is recognized by using the style recognition processing, the first document style label and the target document style label are compared, and the second template page that meets the document style requirement is determined according to the comparison result, then the first object information of the to-be-converted presentation is recognized by using the image recognition processing, and the second object information of each second template page is recognized, then the target page suitable for converting the to-be-converted presentation is determined by matching the first object information and the second object information according to the matching result, and then the target presentation is generated, which realizes the conversion of the to-be-converted presentation into the target presentation, improves the conversion efficiency of the presentation, and reduces the time cost.

[0105] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0106] Those skilled in the art can understand that Figures 1 to 6 The technical solutions shown in the above embodiments are not intended to limit the embodiments of the present application, and more or fewer steps can be included, or some steps can be combined, or different steps can be included.

[0107] The apparatus embodiments described above are merely illustrative, and the units described as separate components can or can not be physically separated, i.e., can be located in one place or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0108] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0109] The terms "first", "second", "third", "fourth" and the like (if any) in the specification of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0110] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0111] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0112] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0113] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0114] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0115] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A presentation conversion method, characterized in that, The method includes: Retrieve the presentation to be converted, the target document's style tags, and multiple first template pages; Style recognition processing is performed on each of the first template pages to obtain the first document style tag of each of the first template pages, and the first document style tag is compared with the target document style tag. Based on the comparison result between the first document style tag and the target document style tag, the second template page is determined from multiple first template pages. The presentation to be converted is subjected to image recognition processing to obtain the first object information of the presentation to be converted, and each of the second template pages is subjected to image recognition processing to obtain the second object information of each of the second template pages; wherein, the first object information includes first layout type information, and the second object information includes second layout type information; The first layout type information and the second layout type information are compared and processed. Based on the comparison results of the first layout type information and the second layout type information, similar template pages are determined from each of the second template pages. The first object information and the second object information are matched, and the target page is determined from each of the similar template pages based on the matching result between the first object information and the second object information. Based on the first object information and the target page, a target presentation is generated; wherein, generating the target presentation includes: Remove text content and images from the target page; Add the text content corresponding to the first object information to the corresponding text box on the target page; Insert the image corresponding to the first object information into the corresponding image position on the target page.

2. The method according to claim 1, characterized in that, The first object information includes several first text attribute information, several first image attribute information, and first layout type information; the second object information includes several second text attribute information, several second image attribute information, and second layout type information. The step of performing image recognition processing on the presentation to be converted to obtain the first object information of the presentation to be converted, and performing image recognition processing on each of the second template pages to obtain the second object information of each of the second template pages, includes: Optical character recognition is performed on the presentation to be converted to obtain the first text attribute information, and optical character recognition is performed on each of the second template pages to obtain the second text attribute information; The presentation to be converted is subjected to image recognition to obtain the first image attribute information, and each of the second template pages is subjected to image recognition to obtain the second image attribute information; The first layout type information is determined based on the first text attribute information and the first image attribute information, and the second layout type information is determined based on the second text attribute information and the second image attribute information.

3. The method according to claim 2, characterized in that, The first text attribute information includes first text position information, first text content information, first font size value and first character value; the first image attribute information includes first image position information; the second text attribute information includes second text position information, second text content information, second font size value and second character value; and the second image attribute information includes second image position information. The step of determining the first layout type information based on the first text attribute information and the first image attribute information, and determining the second layout type information based on the second text attribute information and the second image attribute information, includes: The first text content information is subjected to semantic recognition processing to obtain the first semantic information; Based on the first text location information, the first semantic information, the first font size value, and the first character value, determine the text type of each of the first text attribute information; The first layout type information is determined based on the text type of the first text attribute information, the first text location information, and the first image location information; The second text content information is subjected to semantic recognition processing to obtain the second semantic information; The text type of each of the second text attribute information is determined based on the second text location information, the second semantic information, the second font size value, and the second character value. The second layout type information is determined based on the text type of the second text attribute information, the second text position information, and the second image position information.

4. The method according to claim 3, characterized in that, The text type includes at least one of the following: main title type, subtitle type, and body text type; The first type of layout information includes at least one of the following: graphic information, comparative information, clause information, and other types of information; The second type of layout information includes graphic information, comparative information, and clause information; Specifically, for the presentation to be converted, the first font size values ​​corresponding to the main title type, the subtitle type, and the body text type decrease sequentially. The graphic information refers to the first image attribute information including one first image position information. The comparison information refers to the first image attribute information including two first image position information. The clause information refers to the first template page including three or more first text attribute information belonging to the subtitle type. The other types of information refer to types of information that are different from the graphic information, the comparison information, and the clause information.

5. The method according to claim 4, characterized in that, The step of matching the first object information and the second object information, and determining the target page from each of the similar template pages based on the matching result between the first object information and the second object information, includes: The presentation to be converted and each of the similar template pages are merged to obtain the merged page corresponding to each of the similar template pages. For each of the merged pages, a first matching value is determined based on the first text location information and the second text location information, and a second matching value is determined based on the first image location information and the second image location information; Based on the first matching value and the second matching value, determine the matching result between each of the similar template pages and the presentation to be converted; Based on the matching results between the various similar template pages and the presentation to be converted, the target page is determined from the various similar template pages.

6. The method according to claim 4, characterized in that, Before the step of comparing the first layout type information and the second layout type information, and determining similar template pages from each of the second template pages based on the comparison results, the method further includes: When the first layout type information is the other type information, the first layout type information is changed to the graphic type information.

7. A presentation conversion device, characterized in that, The device includes: The acquisition unit is used to acquire the presentation to be converted, the target document's style tags, and multiple first template pages; The analysis unit is used to perform style recognition processing on each of the first template pages to obtain the first document style tag of each of the first template pages, and to compare the first document style tag with the target document style tag. Based on the comparison result between the first document style tag and the target document style tag, the second template page is determined from multiple first template pages. The recognition unit is used to perform image recognition processing on the presentation to be converted to obtain first object information of the presentation to be converted, and to perform image recognition processing on each of the second template pages to obtain second object information of each of the second template pages; wherein, the first object information includes first layout type information, and the second object information includes second layout type information; The matching unit is used to compare the first layout type information and the second layout type information, and determine the same type of template page from each of the second template pages based on the comparison result of the first layout type information and the second layout type information; the matching unit is also used to match the first object information and the second object information, and determine the target page from each of the same type of template pages based on the matching result between the first object information and the second object information. The generation unit is configured to generate a target presentation based on the first object information and the target page, wherein generating the target presentation includes: Remove text content and images from the target page; Add the text content corresponding to the first object information to the corresponding text box on the target page; Insert the image corresponding to the first object information into the corresponding image position on the target page.

8. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for establishing communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the presentation conversion method as described in any one of claims 1 to 6.

9. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the presentation conversion method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Slide beautification and matching method and apparatus

    CN108268436A

  • Presentation file generation method and device, equipment and medium

    CN111753108A

  • PowerPoint generation method and device, equipment and storage medium

    CN114021541A