Document playback control method and device, electronic device, and computer storage medium
By parsing the document pages and constructing the graph structure of the presentation, an operation graph structure is generated, which solves the problems of poor playback effect and easy error in the traditional manual editing method, and realizes automated presentation playback control.
Patent Information
- Application Number
- CN202510589606.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-05-08
AI Technical Summary
Traditional presentation playback sequence editing methods require manual operation, which makes it difficult to effectively express the complex structure and semantic meaning of presentations, resulting in poor playback effects and a high susceptibility to errors.
By acquiring the document to be processed, parsing the document pages and initial playback order, constructing an initial graph structure, and generating an operation graph structure based on the document playback information input by the user, the target playback order of the document to be played can be achieved.
It improves the reliability and efficiency of presentation playback control, and can automatically generate playback sequences that meet user needs, reducing human error.
Smart Images

Figure CN120492647B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of computer technology, and particularly relates to the technical fields of natural language processing, operations research, and decision science. Specifically, it discloses a document playback control method and apparatus, electronic equipment, and computer-readable storage medium. Background Technology
[0002] Presentations are widely used information display and communication tools in modern work and study. However, to obtain new presentations with different playback sequences, the traditional approach is to first parse the presentation document, and then manually edit the playback order based on the parsing results to transform it into a new presentation with its own playback sequence. Document parsing methods include parsing the presentation's underlying XML (Extensible Markup Language) structure, or simply mapping the presentation content to common data structures such as JSON (JavaScript Object Notation). While this method can extract basic content, it struggles to effectively express the complex structure and relationships within a PowerPoint presentation and lacks a comprehensive understanding of the presentation's semantics and visual layout. Although this manual editing method can transform the parsed content into presentations with different styles, it requires manual intervention, is prone to errors, and results in poor playback quality for the new presentation. Summary of the Invention
[0003] This disclosure provides a document playback control method and apparatus, an electronic device, and a computer-readable storage medium.
[0004] According to the first aspect, a document playback control method is provided, the method comprising: acquiring a document to be processed; parsing the document pages and the initial playback order of the document pages in the document to be processed to obtain a document page parsing result; constructing an initial graph structure based on the document page parsing result; obtaining an operation graph structure based on the document playback information input by the user and the initial graph structure; and obtaining the document to be played and the target playback order of the document to be played based on the operation graph structure.
[0005] According to a second aspect, a document playback control device is provided, comprising: an acquisition unit configured to acquire a document to be processed; a parsing unit configured to parse the document pages and the initial playback order of the document pages to obtain a document page parsing result; a construction unit configured to construct an initial graph structure based on the document page parsing result; an operation unit configured to obtain an operation graph structure based on user-inputted document playback information and the initial graph structure; and a obtaining unit configured to obtain a target document based on the operation graph structure.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method as described in any implementation of the first aspect.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the method described in any implementation of the first aspect.
[0008] The document playback control method and apparatus provided in the embodiments of this disclosure first acquire a document to be processed; second, parse the document pages and the initial playback order of the document pages to obtain a document page parsing result; third, construct an initial graph structure based on the document page parsing result; fourth, obtain an operation graph structure based on the document playback information input by the user and the initial graph structure; and finally, obtain the document to be played and the target playback order of the document to be played based on the operation graph structure. Thus, by explicitly transforming the document to be processed into an operation graph structure with complex presentation and playback logic through the graph structure, and transforming the operation graph structure into the document to be played and the target playback order required by the user, the document to be played can be played according to the target playback order, improving the reliability of the playback control of the document to be played.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0011] Figure 1 This is a flowchart of an embodiment of the playback control method according to this disclosure document;
[0012] Figure 2 This is a schematic diagram of one type of initial diagram structure in this disclosure;
[0013] Figure 3 This is a schematic diagram of the structure of one embodiment of the document playback control device disclosed herein;
[0014] Figure 4 This is a block diagram of an electronic device used to implement the document playback control method of the embodiments of this disclosure. Detailed Implementation
[0015] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0016] The technical solutions of this disclosure are illustrated below through specific embodiments. It should be understood that one or more steps mentioned in this disclosure do not preclude the existence of other methods and steps before or after the combined steps, or that other methods and steps may be inserted between these explicitly mentioned steps. It should also be understood that these examples are for illustrative purposes only and are not intended to limit the scope of this disclosure. Unless otherwise stated, the numbering of each method step is only for the purpose of identifying each method step, and not to limit the order of each method or to limit the scope of implementation of this disclosure. Changes or adjustments to their relative relationships, without substantial changes to the technical content, can also be considered as within the scope of implementation of this disclosure.
[0017] The raw materials and instruments used in the examples are not subject to any specific restrictions on their source; they can be purchased from the market or prepared according to conventional methods known to those skilled in the art.
[0018] Traditional document parsing methods, such as directly parsing the underlying XML structure of the presentation document, simply mapping its content to general data structures like JSON, or relying on API libraries that provide access to the basic document structure (such as pages, shapes, and text boxes), while capable of extracting basic content, struggle to effectively represent the complex structure and playback logic of presentation documents. Specifically, JSON, as a lightweight data exchange format, has limited capabilities in representing the rich spatial layout relationships (such as overlap, alignment, and combination), logical relationships (such as animation sequences and hyperlink jumps), semantic associations, and style inheritance between pages in a presentation document due to its inherent tree-like or key / value pair structure. This simple data structure cannot support deep, relationship-based queries, intelligent modifications, or complex generation tasks of the presentation document content.
[0019] Furthermore, existing tools typically lack a comprehensive understanding of the semantics and visual layout of presentation document content, making it difficult to achieve intelligent content querying, modification, style transfer, and automated generation. Users usually need to operate manually, which is inefficient and prone to errors.
[0020] To address the shortcomings of traditional technologies, this disclosure proposes a document playback control method. Figure 1 A flow 100 of an embodiment of a document playback control method according to the present disclosure is shown, the document playback control method including the following steps:
[0021] Step 101: Obtain the document to be processed.
[0022] In this embodiment, the document to be processed is the document to be processed. The document to be processed may include multiple document pages arranged in a certain order, and each document page may have corresponding page elements. By dividing the document to be processed into two levels—the overall document page and the page elements—the document to be processed can be transformed into a graph structure. The document type of the document to be processed can be one of various types, such as presentation, spreadsheet software document, word processing software document, or Portable Document Format (hereinafter referred to as PDF). In practical applications, the document to be processed can be either PPT or PDF.
[0023] In this embodiment, the document to be processed can be obtained in various ways. For example, the document to be processed can be a document obtained from the server by an execution entity running on an AI-based document generation method through real-time communication with the server; the document to be processed can also be a document retrieved from a database by the execution entity. Optionally, the document to be processed can also be a document uploaded by a user. By processing the document to be processed using the method disclosed herein, the target document required by the user can be obtained.
[0024] Step 102: parse the document pages and the initial playback order of the document pages to be processed to obtain the document page parsing results.
[0025] In this embodiment, the document to be processed has multiple document pages with a corresponding arrangement order. Each document page has corresponding page elements, which are the basic units that make up the page. Page elements can specifically be units such as buttons, displayed content, and images. Page elements include playback elements, which are used to control the playback of the document pages to be processed. The playback elements of each document page or between pages have corresponding relationships. By parsing the document pages and their initial playback order, the document to be processed and its playback status can be effectively identified.
[0026] In this embodiment, the initial playback order is the playback order of the document pages in the document to be processed. For example, the initial playback order can be: playing the document pages in the order they are arranged, or playing the odd-numbered pages first, followed by the even-numbered pages, according to the arrangement of the document pages in the document to be processed. When the document to be processed or a playback element on the document to be processed is triggered by external factors, the document to be processed can be played directly according to the initial playback order. The initial playback order can be obtained directly from the attribute values of the document to be processed. The document to be processed has a playback function, and the initial playback order of the document to be processed can be determined from this playback function information.
[0027] In this embodiment, step 102 includes: using an artificial intelligence model integrating natural language processing and computer vision to parse the document pages and their initial playback order in the document to be processed, obtaining page element parsing results. These results include: all document pages in the document to be processed, the page arrangement order, master page, and layout; page elements of each document page, including but not limited to: text boxes (TextBox), pictures (Picture), shapes (Shape), tables (Table), charts (Chart), SmartArt graphics, multimedia objects (video / audio), and group objects (Group); and attributes of each page element, including: content attributes (text content, image content (or its description / tag), table data, chart data series and categories, etc.); position and geometric attributes (precise coordinates (x, y), size (width, height), and rotation angle of the page element on the page); and visual style attributes (font (name, size, color, bold, italic, etc.), fill color, border style, shape type, transparency, and shadow effects, etc.). Structural and relational attributes include the document page to which a page element belongs, its Z-order, grouping (whether it belongs to a group), hyperlink targets, animation effects (type, order, triggering method), and notes. Page element relationships include implicit relationships between page elements, such as spatial proximity, alignment, content relevance (e.g., text descriptions are related to adjacent chart data), and style similarity / inheritance.
[0028] In this embodiment, when the document to be processed is a PPT or PDF document, the initial page nodes of the PPT or PDF can be generated and connected in sequence according to the physical order of the layout designed by the tool to obtain the document page parsing result.
[0029] Step 103: Based on the document page parsing results, construct the initial graph structure.
[0030] In this embodiment, based on the document page parsing results, a graph data structure is constructed to obtain an initial graph structure. This initial graph structure is used to represent the entire document to be processed, and it is the core intermediate representation of this disclosure. Figure 2 As shown, A~F are nodes representing document pages of the document to be processed in the initial graph structure, and the edges between A~F represent the relationships between the nodes. These relationships can represent the playback order of the document pages. Figure 2In the diagram, node E has corresponding relationships with nodes B, D, and F. For example, playing any document page of nodes B, D, or F will trigger the playback of node E. Node A is only related to nodes B and F, and playing any document page of nodes B or F will trigger the playback of node A. Node C is only related to nodes B and D, and playing any document page of nodes B or D will trigger the playback of node C.
[0031] In this embodiment, the page element parsing results include: all document pages and their initial playback order, page attributes (such as page order, layout, etc.), page elements, page element attributes, and page element relationships. Page element attributes include the page element's own attributes and structural and relational attributes. The structural and relational attributes characterize the relationship between the page element and the document page, such as which document page the page element belongs to. Step 103 includes: determining nodes and their attributes based on all document pages and page elements in the page element parsing results; determining edges and their attributes based on the page element relationships, initial playback order, and structural and relational attributes in the page element parsing results; connecting each node with edges; and adding corresponding attribute information to the edges and nodes based on the page element attributes and initial playback order in the page element parsing results to obtain the initial graph structure.
[0032] In this embodiment, the graph structure can naturally and richly represent the complex relationships (space, style, semantics, interaction, etc.) between elements within a document, overcoming the limitations of simple structures such as JSON. When the document to be processed is of various types, step 103 can support the conversion of the document format (such as PPT, PDF, etc.) to a unified intermediate initial graph structure, and can generate any supported output format from the initial graph structure, realizing seamless migration and format conversion of document pages and playback logic.
[0033] Step 104: Based on the user-inputted document playback information and the initial graph structure, obtain the operation graph structure.
[0034] In this embodiment, the operation graph structure is a graph structure obtained by collecting document playback information input by the user and combining it with the structural information of the initial graph structure. The operation graph structure can be used to obtain the document to be played. This document is the document requested by the user. The document format of the document to be played can be the same as or different from the document to be processed. For example, the document to be processed may be a PPT, while the document to be played may be a PDF.
[0035] In this embodiment, document playback information is used to characterize the user's playback demand for the document to be played. This document playback information can be information from adding, deleting, modifying, and querying operations on the initial graph structure. By performing these operations on the initial graph structure, an operation graph structure can be obtained. Step 104 includes: parsing the document playback information into graph structure information; and according to the graph structure information, adding nodes or edges, deleting nodes or edges, modifying nodes or edges, or querying nodes or edges in the initial graph structure.
[0036] In this embodiment, adding nodes or edges to the initial graph structure includes: adding new nodes to the initial graph structure, such as adding a new page node to a specified document page node; and adding new edges to the initial graph structure to establish relationship edges between new page elements and document pages.
[0037] In this embodiment, deleting nodes or edges in the initial graph structure includes: deleting document pages in the initial graph structure, such as deleting a document page node or an element node on the page (while simultaneously processing associated edges). Edge deletion operations include removing a relationship between edges between document page nodes.
[0038] In this embodiment, modifying nodes or edges in the initial graph structure includes: modifying node attributes, such as modifying the text content, font size, or color of a document page node; modifying the position of a document page node; and modifying edges, such as changing the page order or changing the target of a hyperlink.
[0039] In this embodiment, the nodes or edges in the initial graph structure mentioned above include: attribute-based query operations, such as finding all document page nodes with the font "Microsoft YaHei". Content-based query operations, such as finding document page nodes whose content contains specific keywords / synonyms. Relationship-based query operations, such as finding document page nodes related to the grounding of the playback elements on the document page. Complex graph pattern queries, such as finding document page nodes that "contain title A and chart B, and chart B is below title A". Natural language query interface: Users can ask questions in natural language (such as "What is on page 3?", "Which pages mention 'user growth'?"), and the system will convert them into graph query statements for execution.
[0040] Step 105: Based on the operation graph structure, obtain the document to be played and the target playback order of the document to be played.
[0041] In this embodiment, after operating on the initial graph structure, an operation graph structure is obtained. Based on the operation graph structure or new content generated based on the operation graph structure, the new content can be re-rendered into a target format document to be played, along with the target playback order of the document to be played. The type of the document to be played can be the same as the document to be processed, or it can be a different type of document. When the types of the document to be played and the document to be processed are different, the document to be played generated from the document to be processed is a document with style conversion. When the types of the document to be processed and the document to be played are the same, in a specific example, the document to be processed is a PPT, the graph structure information is converted back to the target document in PPT file format, preserving the content, layout, style, and relationships.
[0042] In this embodiment, the document to be played and the document to be processed can be the same or different; the target playback order is the playback order of the document pages in the document to be played, which is also generated based on the document playback information input by the user. For example, the target playback order can be to play the odd-numbered pages in the document to be played in sequence first, and then play the even-numbered pages in the document to be played in sequence; or the target playback order can be to play the document pages in sequence in the document to be played. Relative to the document to be processed, regardless of whether the document pages in the document to be played change, the target playback order is different from the initial playback order.
[0043] In this embodiment, step 105 includes: inputting the operation graph structure into a pre-trained artificial intelligence model to obtain the document to be played and the target playback order output by the artificial intelligence model. The artificial intelligence model is a model trained with a large number of samples that transforms graph structure information into the document corresponding to the graph structure information and the order of document pages in the document. That is, the artificial intelligence model can directly identify the nodes and edges in the operation graph structure and, based on the attributes of the nodes and edges, transform the operation graph structure into the document to be played and the playback order of the document to be played.
[0044] The document playback control method provided in this disclosure first obtains the document to be processed; second, it parses the document pages and the initial playback order of the document pages to obtain the document page parsing result; third, it constructs an initial graph structure based on the document page parsing result; fourth, it obtains an operation graph structure based on the document playback information input by the user and the initial graph structure; and finally, it obtains the document to be played and the target playback order of the document to be played based on the operation graph structure. Thus, by explicitly transforming the document to be processed into an operation graph structure with complex presentation and playback logic through the graph structure, and transforming the operation graph structure into the target document required by the user, the efficiency of target document generation is improved.
[0045] Optionally, in some embodiments of this disclosure, the document playback control method further includes: receiving a user's document playback instruction; and playing the document to be played according to the target playback order based on the document playback instruction. In this embodiment, the document playback instruction is an instruction that directly controls the playback of the document to be played. After receiving the user's document playback instruction, the document to be played is played directly according to the target playback order, thus realizing the direct playback of the document to be played.
[0046] In some optional implementations of this disclosure, the above-mentioned parsing of the document pages and the initial playback order of the document pages to obtain the document page parsing results includes: parsing the document pages at the document page level to obtain page recognition results; parsing the initial playback order of the document to obtain playback recognition results; determining the page information of each document page, the playback elements in each document page, and the playback sequence number of the document page controlled by the playback elements based on the page recognition results and the playback recognition results; determining the association between the document pages and the playback elements based on the page information, the playback elements, and the playback sequence number, and using the page information, the playback elements, and the association as the document page parsing results.
[0047] In this optional implementation, an artificial intelligence model integrating natural language processing and computer vision can be used to perform document page-level parsing of the document to be processed, obtaining page recognition results. Document page-level parsing takes each document page in the document as the parsing object, distinguishing the relationship between any two document pages in the document. The page recognition results include: page information of all document pages in the document, the arrangement order of each document page, the layout of each document page, and the relationship of playback elements in each document page relative to other document pages. For example, triggering a playback element on one document page is required to display another document page. The page information includes basic information about the document page, such as its identifier, name, and style.
[0048] In this optional implementation, the above-mentioned initial playback order parsing of the document to be processed to obtain the playback recognition result includes: identifying the playback element in the document to be processed; obtaining the key attribute of the playback element; and determining at least one document page controlled by the playback element and the playback sequence number of each document page in the at least one document page based on the key attribute. It should be noted that the initial playback order of all document pages in the document to be processed is determined by at least one document page and the playback sequence number.
[0049] In this embodiment, the page recognition result contains page information of each document page and each playback element, while the playback recognition result contains the playback sequence number of the document page controlled by each playback element. Thus, the page information of all document pages corresponding to the document to be processed, the playback elements in all document pages, and the playback sequence number of the document page controlled by each playback element can be determined through the page recognition result and the playback recognition result. Based on the playback sequence number and page information, the relationship between all document pages in the document to be processed and the playback elements in the document pages can be analyzed. Based on the playback elements and playback sequence number, the relationship between playback elements in different document pages can be determined.
[0050] The optional implementation provides a method for obtaining document page parsing results. This method performs document page-level parsing on the document to be processed to obtain page recognition results; performs initial playback sequence parsing on the document to be processed to obtain playback recognition results; based on the page recognition results and playback recognition results, it determines the page information of each document page, the playback elements in each document page, and the playback sequence number of the document page controlled by the playback elements; based on the page information, playback elements, and playback sequence numbers, it determines the association between document pages and playback elements, and uses the page information, playback elements, and associations as the document page parsing results, thus improving the reliability of the obtained document page parsing results.
[0051] In some optional implementations of this disclosure, the above-mentioned construction of the initial graph structure based on the document page parsing results includes: determining the nodes and their attributes based on the page information and playback elements in the document page parsing results; and determining the edges and their attributes based on the association relationships in the document page parsing results to obtain the initial graph structure.
[0052] In this optional implementation, page information refers to the basic information of the document page. The document page can be determined through the page information. Based on the document page of the document to be processed and the playback elements in the document page parsing result, the nodes in the initial graph structure can be determined. These nodes can be used to represent the document page and the playback elements. The page information can also be used to determine the overall layout, style and other page attributes of the document page, as well as the display style and position of the playback elements in the document page. The page attributes and element attributes are filled into the corresponding attribute content of the node to obtain the node's attributes.
[0053] In this optional implementation, the document page parsing result contains the relationships between document pages (e.g., one document page is a subpage of another document page, and another document page can only be displayed when the first document page is triggered) and the relationships between document pages and playback elements (e.g., the affiliation of the playback element to which document page it belongs to, or the playback relationship where the playback element controls which document pages to play in a certain order). Through the relationships in the document page parsing result, the edges between each node in the initial graph structure can be determined. The edges only represent the relationship between nodes, and the attributes of the edges can be specifically determined through the type of relationship. The attributes are used to represent the specific relationship of the edges.
[0054] This optional implementation provides a method for constructing an initial graph structure. Based on the page information and playback elements in the document page parsing results, it determines the nodes and their attributes; based on the relationships in the document page parsing results, it determines the edges and their attributes, thus obtaining the initial graph structure. This provides a reliable implementation method for constructing the initial graph structure and improves the reliability of the obtained initial graph structure.
[0055] In some optional implementations of this disclosure, the aforementioned document playback information includes: uploaded document and migration requirements. Based on the user-inputted document playback information and the initial graph structure, obtaining the operation graph structure includes: parsing the uploaded document to obtain the upload parsing result; constructing the upload graph structure based on the upload parsing result; and, based on the migration requirements, replacing the attributes of the corresponding nodes in the upload graph structure with the attributes of the nodes in the initial graph structure, and replacing the attributes of the corresponding edges in the upload graph structure with the attributes of the edges in the initial graph structure, thereby obtaining the operation graph structure.
[0056] In this optional implementation, the uploaded document is a user-uploaded document, and the migration requirement is the need to transfer the document to be processed to the uploaded document. This migration requirement can be a style conversion requirement, layout and formatting requirement, etc. By using the user-uploaded document and the migration requirement, it is possible to: migrate the entire document style of the document to be processed to the uploaded document, achieving layout and formatting / font style conversion between two different document types.
[0057] In this optional implementation, the above-mentioned parsing of the uploaded document to obtain the upload parsing result includes: parsing the page information of the uploaded document to obtain the page information of the document page and the playback elements in the document page; parsing the playback order of the uploaded document to obtain the association relationship between the document pages in the uploaded document and the association relationship between the document pages and the playback elements in the uploaded document; and using the page information of the document pages, the playback elements in the document page, the association relationship between the document pages, and the association relationship between the document pages and the playback elements in the uploaded document as the upload parsing result.
[0058] In this optional implementation, the process of constructing the upload graph structure based on the upload parsing result is the same as the process of constructing the initial graph structure, and will not be repeated here.
[0059] In this optional implementation, the migration requirement is used to characterize the need to convert the style and / or layout of the initial graph structure to the uploaded graph structure. To this end, based on the migration requirement, the attributes of the nodes in the initial graph structure are used to replace the attributes of the corresponding nodes in the uploaded graph structure. When the attributes of the edges in the initial graph structure are used to replace the attributes of the corresponding edges in the uploaded graph structure, all attributes in the nodes and / or edges can be replaced directly based on the requirements in the migration requirement, or some attributes in the nodes and / or edges can be replaced.
[0060] This optional implementation provides a method for obtaining the operation graph structure. It parses the uploaded document to obtain the upload parsing result; constructs the upload graph structure based on the upload parsing result; and, based on migration requirements, replaces the attributes of the corresponding nodes in the upload graph structure with the attributes of the nodes in the initial graph structure, and replaces the attributes of the corresponding edges in the upload graph structure with the attributes of the edges in the initial graph structure, thus obtaining the operation graph structure. This implements a conversion process for content migration to the upload graph structure based on the initial graph structure, providing a reliable implementation method for obtaining the operation graph structure.
[0061] In some optional implementations of this disclosure, obtaining the operation graph structure based on the user-inputted document playback information and the initial graph structure includes: determining the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the relationship between each document page and the corresponding playback elements, and key attributes based on the user-inputted document playback information; modifying the initial graph structure based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the relationship between each document page and the corresponding playback elements, and key attributes to obtain the operation graph structure.
[0062] In this optional implementation, the document playback information can be natural language description information. This natural language description information (e.g., "Clicking this button will jump to page 10 and play animation effect 3") represents the interaction logic, which the system then converts into a modification of the graph structure. Specifically, the document playback information can be directly obtained from the natural language description information based on the user's intended playback order. Using this information, the page nodes in the initial graph structure are rearranged to generate an operation graph structure. Optionally, the document playback information can also be a custom playback scheme (supporting multiple custom playback schemes, with the user selecting one as the default) that represents the user's desired playback order. In this optional implementation, the document to be played is the document to be processed and converted into, and the document playback information represents the user's desired presentation and playback format of the document to be played. The above-mentioned method for determining the playback order, layout, playback elements, and relationships between document pages and their corresponding playback elements based on user-inputted document playback information includes: identifying page keywords in the user-inputted playback information to determine the document pages and layout of the document to be played; identifying playback order keywords in the user-inputted playback information to determine the playback order of all playback sequences; when the document playback information contains images, a deep learning model can be used to identify the images in the document playback information to determine the playback elements and layout of the document pages; a natural language model can also be used to determine the relationships and key attributes between each document page and its corresponding playback elements. The relationships between document pages and their corresponding playback elements refer to playback elements related to the document page. These related playback elements can be playback elements located on the document page or playback elements that control the playback of the document page according to the target playback order. Key attributes can include the main attributes of the document page and the main attributes of the playback elements.
[0063] In this optional implementation, the modification of the initial graph structure to obtain the operation graph structure based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the relationship between each document page and the corresponding playback elements, and key attributes includes: querying nodes in the initial graph structure based on the document page layout of each document page, the playback elements of each document page, the relationship between each document page and the corresponding playback elements, and key attributes, to obtain node query results; querying the playback order in the initial graph structure based on the playback order of all document pages in the document to be played and the playback elements of each document page, to obtain order query results; generating new node information or new node attributes for the target node based on the node query results; generating the target playback order for the target node based on the order query results; replacing the node information of the target node in the initial graph structure with the new node information; replacing the node attributes of the target node in the initial graph structure with the new node attributes; and replacing the initial playback order of the target node in the initial graph structure with the target playback order, to obtain the operation graph structure.
[0064] Optionally, in this optional implementation, the modification of the initial graph structure based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes, to obtain the operation graph structure includes: in response to the fact that the association between a document page in the document to be played is different from the association between that document page in the document to be processed, removing the edge of that document page in the initial graph structure, adding an edge to that document page in the initial graph structure, and setting the attribute of the edge based on the key attributes of that document page, so that the set attribute represents the association between the document page and the document page in the document to be played.
[0065] The optional implementation provides a method for obtaining the operation graph structure. By deeply parsing the document playback information input by the user, it determines the information of the target node in the document to be played, and replaces the information in the initial graph structure with the parsed information, thereby improving the accuracy of the operation graph structure generation.
[0066] In some optional implementations of this disclosure, the aforementioned document playback information includes: document playback order information and document layout information. Based on the document playback information input by the user, determining the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes includes: based on the document layout information, determining the initial relationship and initial attributes of all document pages in the document to be played, the page layout of each document page, the playback elements of each document page, and the relationship between each document page and the corresponding playback elements; based on the document playback order information, determining the playback sequence number of each document page in the document to be played; based on the playback sequence number, modifying the initial relationship and initial attributes to obtain the association between each document page and the corresponding playback elements and key attributes.
[0067] In this optional implementation, the document playback order information represents the target playback order information. The target playback order of the document to be played can be determined by the document playback order, and the target playback order can be converted into node attributes and recorded in the operation graph structure. The document layout information represents the layout of each document page in the document to be played and the arrangement order of the document pages. The document layout information can be converted into node attributes and recorded in the operation graph structure.
[0068] In this optional implementation, the initial relationship is the relationship between the various document pages in the document to be played, determined by the document layout information when no document playback order information is added, such as the first document page being the parent page of the second document page. The initial attributes are the attributes of the document pages and playback elements in the document to be played, determined by the document layout information when no document playback order information is added.
[0069] In this optional implementation, after determining the playback sequence number of each document page using the document playback order information, the actual playback order of each document page can be determined. This order is not solely determined by the layout of the document pages. Modifying the initial relationships and attributes refers to adding relationship content and attribute content determined by the playback sequence number to the relationship content of the initial relationships and the attribute content of the initial attributes, thus obtaining the association relationships and key attributes.
[0070] This optional implementation provides a method for determining the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the relationship between each document page and the corresponding playback elements, and key attributes. By comprehensively considering the document playback order and document layout of the document, it determines the relationship between the document pages and playback elements in the document to be played and the key attributes, thereby improving the comprehensiveness and reliability of the information obtained.
[0071] In some optional implementations of this disclosure, the aforementioned document playback information includes: event information and action information to be added; based on the user-inputted document playback information and the initial graph structure, the operation graph structure is obtained by: determining event nodes and the first edge associated with the event nodes based on the event information; determining action nodes and the second edge associated with the action nodes based on the action information; and adding the event nodes, action nodes, the first edge, and the second edge to the initial graph structure to obtain the operation graph structure.
[0072] In this optional implementation, the event and action information to be added can be obtained through FSM (Finite State Machine) modeling. The process of the user describing the page playback order in natural language is simplified into an update process of the FSM. Event information reflects the conditions or signals that trigger state transitions in the finite state machine. Event information can be external inputs, timer triggers, or changes in internal system conditions. Action information is the operation performed in a specific state or during a state transition, such as data processing or signal output. The FSM triggers state transitions through event information and executes action information during the transition.
[0073] In this optional implementation, the status node is the physical page number of the corresponding page node, the starting node is page 1, and the input symbol set is the ID name of the elements that mark the hyperlinks between pages in each page.
[0074] In this optional implementation, the transition function that maps input symbols and the current state to the next state defines which destination page the hyperlink element in the corresponding page number will jump to.
[0075] In this optional implementation, action information can include maintenance actions and transition actions. In an FSM, state nodes can be decomposed into entry / exit / maintenance actions, and transition functions can be mapped to event-triggered transition actions, enabling the transformation from FSM logic to an event-driven system. During design, the action binding method must be selected based on the state machine type (e.g., Mealy or Moore), and event response logic must be managed through a state transition table. Existing hyperlinks can be updated to jump to the destination page; additional hyperlink elements can also be added to link any two pages.
[0076] In practical applications, if the document to be played is a PPT or PDF, the playback logic described by FSM can be output as a visual mind map before generating the final PPT / PDF. The mind map allows users to confirm the corresponding event and action information.
[0077] In this optional implementation, the event information to be added consists of basic information about the triggering event related to the document to be processed, and the action information to be added consists of basic information about the action related to the event within the event information. For example, the event information might be: controlling the transformation of the document to be processed and its initial playback order to the target playback order by clicking a hyperlink, including the hyperlink's address information, the name and address of the document to be processed, and the name and address of the document to be played. The action information includes: entering the hyperlink page, clicking the hyperlink, and the URL of the hyperlink.
[0078] In this optional implementation, the first edge is the edge emanating from the event node. For example, the first edge includes: the edge from the event node to the event node, the edge from the event node to the action node, and the edge from the event node to the node in the initial graph structure. The process of determining the event node and the first edge related to the event node based on the event information can refer to the construction process of the node and edge in the initial graph structure, which will not be repeated here.
[0079] In this optional implementation, the second edge is an edge that radiates out from the action node. For example, the second edge includes: an edge from action node to action node, an edge from event node to action node, and an edge from action node to node in the initial graph structure. The process of determining the action node and the second edge related to the action node based on the action information can refer to the construction process of nodes and edges in the initial graph structure, which will not be repeated here.
[0080] In this optional implementation, the event node, action node, first edge, and second edge each carry their own attributes. By using the content recorded in these attributes, the event node, action node, first edge, and second edge are added to the initial graph structure to obtain the operation graph structure.
[0081] This optional implementation provides a method for obtaining an operation graph structure, which can explicitly represent complex presentation playback logic, not just sequential playback. Non-linear navigation paths can be defined by adding event nodes (such as `OnClick`), action nodes (such as `GoToPage`, `PlayAnimation`), and corresponding first and second edges, improving the comprehensiveness and reliability of the operation graph structure representation.
[0082] In a specific example, a user uploads a PPT document (Input.pptx) to be processed. The execution entity (hereinafter referred to as the system) running on this document playback control method generates an initial graph structure Graph_A. The user gives a command via interface or natural language: "On page 2, make the 'Learn More' button click to jump to page 8." The system identifies the playback element (the "Learn More" button, which may be located by text content or visual positioning to the corresponding node N_button) and the target (page 8, corresponding to page node P8) in the command. The system adds an `INTERACTS_WITH` edge to Graph_A, pointing from node N_button to node P8 (or the intermediate node representing the jump action), and sets the edge's attributes, such as `trigger:onClick`, `target:page8`. During the document generation and conversion stage, the generator reads these `INTERACTS_WITH` edges and sets the corresponding hyperlinks or interactive actions in the generated PPT.
[0083] The document playback control method disclosed herein effectively overcomes the limitations of existing technologies by deeply analyzing the document to be processed and constructing a powerful graph data structure as an intermediate representation. This solution not only enables complex querying and precise editing of the content and structure of the document to be processed, but also supports the automated generation, style transfer, and complex interactive logic design of the document to be played, greatly improving the intelligence and efficiency of presentation processing and has broad application prospects. Its core graph structure intermediate representation concept also has the potential to be extended to other types of document processing.
[0084] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a document playback control device, which is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0085] like Figure 3 As shown, the document playback control device 300 provided in this embodiment includes: an acquisition unit 301, a parsing unit 302, a construction unit 303, an operation unit 304, and a obtaining unit 305. The acquisition unit 301 can be configured to acquire a document to be processed. The parsing unit 302 can be configured to parse the document pages and their initial playback order to obtain a document page parsing result. The construction unit 303 can be configured to construct an initial graph structure based on the document page parsing result. The operation unit 304 can be configured to obtain an operation graph structure based on user-inputted document playback information and the initial graph structure. The obtaining unit 305 can be configured to obtain a target document based on the operation graph structure.
[0086] In this embodiment, the specific processing of the document playback control device 300, including the acquisition unit 301, parsing unit 302, construction unit 303, operation unit 304, and obtaining unit 305, and the resulting technical effects, can be found in the following references: Figure 1 The relevant descriptions of steps 101, 102, 103, 104, and 105 in the corresponding embodiments will not be repeated here.
[0087] In some embodiments of this disclosure, the parsing unit 302 is configured to: perform document page-level parsing on the document to be processed to obtain page recognition results; perform initial playback order parsing on the document to be processed to obtain playback recognition results; based on the page recognition results and playback recognition results, determine the page information of each document page, the playback elements in each document page, and the playback sequence number of the document page controlled by the playback elements; based on the page information, playback elements, and playback sequence number, determine the association relationship between the document pages and playback elements, and use the page information, playback elements, and association relationship as the document page parsing results.
[0088] In some embodiments of this disclosure, the above-mentioned construction unit 303 is configured to: determine nodes and node attributes based on page information and playback elements in the document page parsing results; and determine edges and edge attributes based on the association relationships in the document page parsing results to obtain an initial graph structure.
[0089] In some embodiments of this disclosure, the document playback information includes: uploaded document and migration requirements. The operation unit 304 is configured to: parse the uploaded document to obtain an upload parsing result; construct an upload graph structure based on the upload parsing result; and, based on the migration requirements, replace the attributes of the nodes corresponding to the nodes in the upload graph structure with the attributes of the nodes in the initial graph structure, and replace the attributes of the edges corresponding to the edges in the upload graph structure with the attributes of the edges in the initial graph structure, to obtain an operation graph structure.
[0090] In some embodiments of this disclosure, the operation unit 304 is configured to: determine the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes based on the document playback information input by the user; and modify the initial graph structure based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes to obtain an operation graph structure.
[0091] In some embodiments of this disclosure, the document playback information includes: document playback order information and document layout information. The operation unit 304 is configured to: determine, based on the document layout information, all document pages in the document to be played, the page layout of each document page, the playback elements of each document page, the initial relationship between each document page and the corresponding playback elements, and the initial attributes; determine, based on the document playback order information, the playback sequence number of each document page in the document to be played; and modify the initial relationship and initial attributes based on the playback sequence number to obtain the association relationship and key attributes between each document page and the corresponding playback elements.
[0092] In some embodiments of this disclosure, the document playback information includes: event information and action information to be added; the operation unit 304 is configured to: determine an event node and a first side associated with the event node based on the event information; determine an action node and a second side associated with the action node based on the action information; and add the event node, action node, first side, and second side to the initial graph structure to obtain an operation graph structure.
[0093] The document playback control device provided in the embodiments of this disclosure firstly acquires the document to be processed by the acquisition unit 301; secondly, the parsing unit 302 parses the document pages and the initial playback order of the document pages to obtain the document page parsing result; thirdly, the construction unit 303 constructs an initial graph structure based on the document page parsing result; fourthly, the operation unit 304 obtains an operation graph structure based on the document playback information input by the user and the initial graph structure; finally, the obtaining unit 305 obtains the document to be played and the target playback order of the document to be played based on the operation graph structure. Thus, by explicitly converting the document to be processed into an operation graph structure with complex presentation and playback logic through the graph structure, and converting the operation graph structure into the target document required by the user, the efficiency of target document generation is improved.
[0094] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0095] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their patterns are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0096] like Figure 4 As shown, device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 402 or a computer program loaded from storage unit 408 into random access memory (RAM) 403. RAM 403 may also store various programs and data required for the operation of device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0097] Multiple components in device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0098] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the document playback control method. For example, in some embodiments, the document playback control method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the document playback control method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the document playback control method by any other suitable means (e.g., by means of firmware).
[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable document playback control device, such that when executed by the processor or controller, the program code causes the patterns / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0104] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0105] The foregoing description of specific exemplary embodiments of this disclosure is for illustrative and explanatory purposes. These descriptions are not intended to limit this disclosure to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of this disclosure and their practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of this disclosure, as well as various different choices and variations. The scope of this disclosure is intended to be defined by the claims and their equivalents.
Claims
1. A document playback control method, the method comprising: Get the document to be processed; The document to be processed is parsed, including the document pages and the initial playback order of the document pages, to obtain the document page parsing results; The step of parsing the document pages and the initial playback order of the document pages to obtain the document page parsing result includes: parsing the document pages at the document page level to obtain the page identification result; parsing the initial playback order of the document to obtain the playback identification result; based on the page identification result and the playback identification result, determining the page information of each document page, the playback elements in each document page, and the playback sequence number of the document page controlled by the playback elements; based on the page information, the playback elements, and the playback sequence number, determining the association between the document pages and the playback elements, and using the page information, the playback elements, and the association as the document page parsing result; Based on the document page parsing results, an initial graph structure is constructed; Based on the user-inputted document playback information and the initial graph structure, an operation graph structure is obtained. The document playback information includes: document playback order information and document layout information. Obtaining the operation graph structure based on the user-inputted document playback information and the initial graph structure includes: determining the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes based on the document layout information. The initial graph structure is defined as follows: The initial relationships and attributes between each document page and its corresponding playback elements are defined; based on the document playback order information, the playback sequence number of each document page in the document to be played is determined; based on the playback sequence number, the initial relationships and attributes are modified to obtain the association relationships and key attributes between each document page and its corresponding playback elements; based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association relationships and key attributes between each document page and its corresponding playback elements, the initial graph structure is modified to obtain the operation graph structure. Based on the operation graph structure, the document to be played and the target playback order of the document to be played are obtained.
2. The method according to claim 1, wherein, The construction of the initial graph structure based on the document page parsing results includes: Based on the page information and playback elements in the document page parsing results, determine the nodes and their attributes; Based on the relationships in the document page parsing results, the edges and their attributes are determined to obtain the initial graph structure.
3. The method according to claim 1, wherein, The document playback information includes: uploaded document and migration requirements. The process of obtaining the operation graph structure based on the user-inputted document playback information and the initial graph structure includes: The uploaded document is parsed to obtain the upload parsing result; Based on the upload parsing results, construct the upload graph structure; Based on the migration requirements, the attributes of the nodes in the initial graph structure are used to replace the attributes of the corresponding nodes in the upload graph structure, and the attributes of the edges in the initial graph structure are used to replace the attributes of the corresponding edges in the upload graph structure, thus obtaining the operation graph structure.
4. The method according to claim 1, wherein, The aforementioned document playback information includes: event information and action information to be added; the process of obtaining the operation graph structure based on the user-inputted document playback information and the initial graph structure includes: Based on the event information, determine the event node and the first edge associated with the event node; Based on the action information, determine the action node and the second side associated with the action node; The event node, the action node, the first edge, and the second edge are added to the initial graph structure to obtain the operation graph structure.
5. A document playback control device, the device comprising: The acquisition unit is configured to acquire the document to be processed. The parsing unit is configured to parse the document pages and the initial playback order of the document pages in the document to be processed, and obtain the document page parsing result; The parsing unit is configured to perform document page-level parsing on the document to be processed to obtain page recognition results; The document to be processed is parsed for an initial playback order to obtain a playback recognition result; based on the page recognition result and the playback recognition result, the page information of each document page, the playback elements in each document page, and the playback sequence number of the document page controlled by the playback elements are determined. Based on the page information, the playback element, and the playback sequence number, the relationship between the document page and the playback element is determined, and the page information, the playback element, and the relationship are used as the document page parsing result. The building unit is configured to construct an initial graph structure based on the document page parsing results; The operation unit is configured to obtain an operation graph structure based on the user-inputted document playback information and the initial graph structure; The document playback information includes: document playback order information and document layout information. The operation unit is configured to: determine the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes based on the document playback information input by the user. This includes: determining the initial relationship and initial attributes of all document pages in the document to be played, the page layout of each document page, the playback elements of each document page, and the relationship between each document page and the corresponding playback elements based on the document layout information; determining the playback sequence number of each document page in the document to be played based on the document playback order information; modifying the initial relationship and initial attributes based on the playback sequence number to obtain the association between each document page and the corresponding playback elements and key attributes; and modifying the initial graph structure based on the playback order of all document pages in the document to be played, the document page layout of each document page, the playback elements of each document page, the association between each document page and the corresponding playback elements, and key attributes to obtain an operation graph structure. The unit is configured to obtain the target document based on the operation graph structure.
6. An electronic device, characterized in that, include: at least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-4.
7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.
Citation Information
Patent Citations
Automatic circuit splicing system and method based on altium software
CN114492293A
Collaborative editing method and device for rich text format document and storage medium
CN119692311A