Electronic book editing method and device, storage medium, equipment and program product

Through automated editing methods, obtaining and filling e-book contents, the problem of inefficiency in traditional editing methods is solved, and the efficiency, accuracy and cost reduction of e-book editing is achieved.

CN118917287APending Publication Date: 2024-11-08DOUYIN VISION CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410969758.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Traditional e-book editing methods are inefficient, making it difficult to ensure the consistency and accuracy of editing results, especially under the needs of large-scale editing.

Method used

By obtaining the initial book content and target template style, converting it into initial electronic publishing files, extracting template style information, obtaining and filling in valid character content, generating electronic publishing files that meet the target template style, realizing automatic editing.

Benefits of technology

Improves the efficiency and accuracy of e-book editing, reduces labor costs, and ensures consistency between content and style.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917287A_ABST
    Figure CN118917287A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic book editing method and device, a storage medium, equipment and a program product. The method comprises the steps of obtaining initial book content and a target template style; converting the target template style into an initial electronic publication file, wherein the initial electronic publication file comprises an initial hypertext markup language file, a cascade style sheet file and a resource file; extracting template style information of the initial electronic publication file; obtaining effective character content of to-be-processed chapter content in the initial book content, wherein the effective character content at least comprises text content; based on the template style information, filling the effective character content into the initial hypertext markup language file to obtain a target hypertext markup language file of the to-be-processed chapter content; based on the target hypertext markup language file, the cascading style sheet file and the resource file, the target electronic publication file of the chapter content to be processed in the initial book content is generated, automatic electronic book editing can be achieved, and the efficiency and accuracy of electronic book editing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an electronic book editing method, device, storage medium, equipment and program product. Background Art

[0002] With the rapid development of information technology and the popularization of digital reading, e-books have become an indispensable part of people's daily lives. However, traditional e-book editing methods often rely on manual typesetting and content editing, which is inefficient and difficult to meet the needs of large-scale, efficient editing. At the same time, due to the diversity of e-book formats and styles, traditional editing methods are also difficult to ensure the consistency and accuracy of editing results. Summary of the invention

[0003] The embodiments of the present application provide an e-book editing method, apparatus, storage medium, device and program product, which can realize automated e-book editing, improve the efficiency and accuracy of e-book editing, and reduce labor costs.

[0004] On the one hand, an embodiment of the present application provides an electronic book editing method, the method comprising: obtaining initial book content and a target template style; converting the target template style into an initial electronic publishing file, the initial electronic publishing file comprising an initial hypertext markup language file, a cascading style sheet file and a resource file; extracting template style information of the initial electronic publishing file; obtaining valid character content of a chapter content to be processed in the initial book content, the valid character content comprising at least text content; based on the template style information, filling the valid character content into the initial hypertext markup language file to obtain a target hypertext markup language file for the chapter content to be processed; based on the target hypertext markup language file, the cascading style sheet file and the resource file, generating a target electronic publishing file for the chapter content to be processed in the initial book content.

[0005] On the other hand, an embodiment of the present application provides an electronic book editing device, the device comprising:

[0006] A first acquisition unit, used to acquire initial book content and target template style;

[0007] A conversion unit, used to convert the target template style into an initial electronic publication file, wherein the initial electronic publication file includes an initial hypertext markup language file, a cascading style sheet file and a resource file;

[0008] An extraction unit, used for extracting the template style information of the initial electronic publication file;

[0009] A second acquisition unit is used to acquire valid character content of the chapter content to be processed in the initial book content, wherein the valid character content at least includes text content;

[0010] An editing unit, configured to fill the valid character content into the initial hypertext markup language file based on the template style information, to obtain a target hypertext markup language file of the to-be-processed chapter content;

[0011] A generating unit is used to generate a target electronic publication file of the chapter content to be processed in the initial book content based on the target hypertext markup language file, the cascading style sheet file and the resource file.

[0012] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the electronic book editing method described in any of the above embodiments.

[0013] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the e-book editing method described in any of the above embodiments by calling the computer program stored in the memory.

[0014] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the electronic book editing method described in any of the above embodiments.

[0015] The embodiment of the present application obtains initial book content and a target template style; converts the target template style into an initial electronic publishing file, wherein the initial electronic publishing file includes an initial hypertext markup language file, a cascading style sheet file, and a resource file; extracts template style information of the initial electronic publishing file; obtains valid character content of a chapter to be processed in the initial book content, wherein the valid character content includes at least text content; based on the template style information, fills the valid character content into the initial hypertext markup language file to obtain a target hypertext markup language file for the chapter to be processed; and generates a target electronic publishing file for the chapter to be processed in the initial book content based on the target hypertext markup language file, the cascading style sheet file, and the resource file. The embodiment of the present application obtains the initial book content and the target template style, collects the basic text information of the book and the visual style template that the designer wants to apply to the book, and ensures that the content and appearance can meet specific publishing standards or personal preferences; by converting the target template style into an actually applicable initial electronic publishing file format, including an initial hypertext markup language (HTML) file, a cascading style sheet (CSS) file, and a resource file, a basic framework is provided for subsequent editing; by automatically extracting the template style information from the initial electronic publishing file, an accurate style guide is provided for subsequent content filling to ensure the consistency of content and style; it can intelligently identify and obtain valid characters in the initial book content, including but not limited to text content, and exclude invalid or redundant information; based on the extracted template style information, the valid character content is accurately filled into the HTML file to obtain the target HTML file, ensuring the correctness of the content layout and format; combining the target HTML file, CSS file, and resource file, a target electronic publishing file that meets the target template style is generated, and the perfect integration of content and style is achieved. Automated e-book editing can be realized, the efficiency and accuracy of e-book editing can be improved, and the labor cost can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A schematic diagram of the structure of an e-book editing system provided in an embodiment of the present application.

[0018] Figure 2 A flowchart of an e-book editing method provided in an embodiment of the present application.

[0019] Figure 3 A schematic diagram of a first application scenario of the e-book editing method provided in an embodiment of the present application.

[0020] Figure 4 A schematic diagram of a second application scenario of the e-book editing method provided in an embodiment of the present application.

[0021] Figure 5 A schematic diagram of the structure of an electronic book editing device provided in an embodiment of the present application.

[0022] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0024] The embodiments of the present application provide an e-book editing method, apparatus, storage medium, device and program product. Specifically, the e-book editing method of the embodiments of the present application can be executed by a terminal device or by a server. Among them, the computer device can be a terminal device or a server. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart speaker, a wearable smart device, a smart car terminal, a virtual reality device and other devices. The terminal device can also include a client, which can be a client of an application that can perform e-book editing or e-book reading. For example, the client includes at least one of a program client and a web client. For example, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0025] The embodiments of the present application can be applied to various application scenarios such as video production and video review.

[0026] Please refer to Figure 1 , Figure 1 The schematic diagram of the structure of the electronic book editing system provided in the embodiment of the present application includes a terminal device 10 and a server 20, etc. The terminal device 10 and the server 20 are connected via a network, such as a wired or wireless network connection.

[0027] The terminal device 10 can be used to display a graphical user interface. The terminal is used to interact with the user through the graphical user interface, such as downloading and installing the corresponding client through the terminal and running it, such as calling and running the corresponding applet, such as presenting the corresponding graphical user interface by logging into the website, etc. In the embodiment of the present application, the terminal device 10 can be a terminal device with a client that can edit or read e-books (or e-book editing tools) installed.

[0028] The server 20 is used to provide background services for the client of the application (such as an application capable of e-book editing or e-book reading) in the terminal device 10. For example, the server 20 can be a background server of the above application. The server 20 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.

[0029] Among them, when editing an electronic book, a graphical user interface corresponding to the application is displayed in the terminal device 10, and the user can input or select the initial book content and the target template style through the input window on the graphical user interface, and send the initial book content and the target template style to the server 20; the server 20 obtains the initial book content and the target template style; then converts the target template style into an initial electronic publishing file, and the initial electronic publishing file includes an initial hypertext markup language file, a cascading style sheet file and a resource file; then extracts the template style information of the initial electronic publishing file; then obtains the valid character content of the chapter content to be processed in the initial book content, and the valid character content at least includes text content; then based on the template style information, fills the valid character content into the initial hypertext markup language file to obtain the target hypertext markup language file of the chapter content to be processed; then based on the target hypertext markup language file, the cascading style sheet file and the resource file, generates a target electronic publishing file of the chapter content to be processed in the initial book content; then sends the target electronic publishing file to the terminal device 10; the terminal device 10 displays the target electronic publishing file on the graphical user interface.

[0030] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0031] See also Figures 2 to 4 , Figure 2 A flowchart of an e-book editing method provided in an embodiment of the present application is shown in FIG. Figure 3 and Figure 4 Schematic diagram of application scenarios of the e-book editing method provided in the embodiment of the present application. The method can be applied to Figure 1 The terminal device 10 shown. The method includes the following steps 110 to 140:

[0032] Step 110, obtaining initial book content and target template style.

[0033] Among them, with the popularization of digital reading and the popularity of mobile devices, the e-reading market continues to grow. More and more readers choose e-books as a way of reading, which has promoted the development of the e-reading market. The e-reading market not only includes traditional book publications, but also covers a variety of content forms such as magazines, newspapers, comics, and academic papers. Readers can choose various types of e-reading materials according to their interests and needs. In addition, e-reading also provides a personalized reading experience. Readers can adjust parameters such as font size, color, background, etc. according to their preferences to customize their own reading environment.

[0034] Publishers and bookstores have gradually realized the importance of digital transformation and have begun to convert traditional books into e-books and provide online sales and subscription services to meet the needs of the digital reading market.

[0035] With the continuous development of technology, the e-reading market is also constantly innovating. Some new technologies such as artificial intelligence and virtual reality are applied to the e-reading field, bringing readers a richer and more immersive reading experience.

[0036] For example, the main content of e-reading is in the Electronic Publication (EPUB) format. EPUB is an open e-book format used to display and read e-books on e-readers, smartphones, tablets and other devices. EPUB has the following main features:

[0037] Open Standard: EPUB is an open standard developed by the International Digital Publishing Forum (IDPF) to provide a universal, interoperable e-book format to enable a consistent reading experience across different devices and platforms.

[0038] Based on standard technology: The EPUB format is based on standard Hypertext Markup Language (HTML), Cascading Style Sheets (CSS) and Extensible Markup Language (XML) technologies, allowing e-book content to be flexibly typeset and displayed, and supports mixed text and image typesetting, font adjustment, directory navigation and other functions.

[0039] Support adaptive reading: EPUB format supports adaptive layout. Readers can adjust parameters such as font size and line spacing according to the device screen size and personal preferences to obtain a better reading experience.

[0040] Contains metadata: EPUB files usually contain metadata information, such as book title, author, publication date, etc., so that devices and readers can correctly display and manage electronic books.

[0041] Scalability: The EPUB format is scalable and supports embedded multimedia content (such as pictures, audio, video, etc.), footnotes, interactive content, etc., enriching the presentation of e-books.

[0042] Compatibility: EPUB format is widely supported and used in various electronic reading devices and software platforms, such as Amazon's Kindle, Apple's iBooks, Google Books and other readers.

[0043] In general, EPUB format, as an open standard e-book format, plays an important role in the field of digital publishing, providing users with a convenient, flexible and rich reading experience.

[0044] In order to improve editing efficiency and reduce error rates, the editing function of e-reading books needs to introduce more intelligent technologies and automated tools. By combining technologies such as artificial intelligence and natural language processing, automated text processing and editing functions can be achieved, improving editing efficiency and quality, and promoting the development of the e-reading market in the direction of intelligence. This can not only reduce labor costs and improve production efficiency, but also provide users with a better reading experience.

[0045] In step 110 , it is first necessary to receive initial book content and target template style from a user or a data source.

[0046] The initial book content, as the basis for e-book editing, can be in various forms. When received from users or data sources, the system needs to support multiple text data formats, including but not limited to Word documents (.doc or .docx), plain text files (.txt), rich text formats (.rtf), PDF files, etc. The initial book content includes all or part of the chapter content of the book.

[0047] The target template style refers to the visual design of the e-book content, which defines the required appearance and format of the e-book, and may include text tags (such as "title", "paragraph"), font size, color, spacing, position, illustrations, background images and other styles. The target template style can be a visual design provided by a designer, or a specific technical specification, such as HTML and CSS code. The design will show the appearance of the book, while the technical specification defines the specific method to achieve that appearance.

[0048] The sample text used in the template style (such as "Heading", "Paragraph 1", "Paragraph 2") is a placeholder to indicate where the actual content should be placed. In actual application, these positions will be replaced by the actual content of the book. The template style may exist in the form of an HTML template, a CSS style sheet, or a template file of a dedicated design software. The HTML template defines the basic structure of the page, and the CSS style sheet provides rules for how to display these structures.

[0049] like Figure 3 The target template style example shown intuitively demonstrates how text labels (such as "Title", "Paragraph 1", "Paragraph 2") are associated with specific style attributes (such as font size, color, spacing and position), and how illustrations (such as love hearts) are embedded in the page. Such template styles provide clear visual guidance and design frameworks for e-book editors.

[0050] In some embodiments, the obtaining of the initial book content and the target template style includes:

[0051] Select the target template style from the preset template library;

[0052] Receiving initial book content uploaded by users, or obtaining initial book content online;

[0053] Verify whether the format of the initial book content meets the preset standard.

[0054] Among them, in actual operation, the sources of board styles are diverse. For example, a preset template library can usually be provided, which contains a variety of commonly used e-book template styles. Users can select a target template style that meets their needs, and can personalize the selected target template style to obtain the adjusted target template style. The template library can be built-in to the system, or it can be updated through the network or customized by the user. The template styles in the template library should cover e-books of different styles and needs, such as novels, essays, scientific literature, comics, academic journals, etc.

[0055] In addition to the preset template library, the system can also support users to upload custom template styles. Users can upload their own designed template style files to the system and specify them as the target template style. This method can meet users' requirements for special styles or personalized needs.

[0056] For example, in order to facilitate users to design and adjust the template style, the system can also provide an online design tool. Users can use this tool to select appropriate fonts, colors, style layout and other elements, and preview the adjusted effects in real time. After the design is completed, users can save and apply the template style to the e-book editing.

[0057] Among them, the initial book content can come from multiple channels.

[0058] For example, users can upload the initial book content in local Word documents, plain text files, PDF files, etc. formats to the system through the file upload function provided by the system. The system needs to support parsing of these common file formats in order to extract the text content and other multimedia resources of the book.

[0059] For example, if the book content already exists on an online platform or database, the system can obtain the initial book content from the platform or database through the Application Programming Interface (API) or other methods. This method is suitable for scenarios that cooperate with third-party platforms, such as libraries, publishing houses, etc.

[0060] For example, for small-scale book content or editing of specific chapters, the system can also provide a manual input function, allowing users to enter text content directly in the system interface.

[0061] For example, after receiving the book content, it needs to be formatted to ensure that it meets the preset standards or can be effectively parsed by the system. If the format of the book content does not meet the requirements, the system may need to prompt the user to convert or re-upload it.

[0062] Through the above steps, it is possible to ensure that accurate and usable initial book content and target template styles are received from users or data sources, laying a solid foundation for subsequent e-book editing work.

[0063] Step 120: convert the target template style into an initial electronic publication file, wherein the initial electronic publication file includes an initial hypertext markup language file, a cascading style sheet file, and a resource file.

[0064] For example, the target template style can be converted into an initial electronic publication (EPUB) file through common tools. For example, an initial Hypertext Markup Language (HTML) file is generated to arrange the content in the target template style, a Cascading Style Sheet (CSS) file is generated to describe the style in the target template style, and resource files such as illustrations and icons are imported to be edited according to the format of the EPUB file.

[0065] In some embodiments, converting the target template style into an initial electronic publication file includes:

[0066] Obtaining the style structure, style rules and resource files of the target template style;

[0067] Defining the style structure using the initial hypertext markup language file;

[0068] Using the cascading style sheet file to define the style rules;

[0069] The initial hypertext markup language file, the cascading style sheet file and the resource file are packaged to generate the initial electronic publication file.

[0070] Among them, get the style structure, style rules and resource files of the target template style:

[0071] Style structure: refers to the layout and hierarchical relationship of elements in the target template style, such as the arrangement of elements such as titles, paragraphs, and lists.

[0072] Style rules: may include rules for the visual performance of each element, such as font, color, spacing, margin, alignment, background, etc. Each style rule has a corresponding parameter value.

[0073] Resource files: can include multimedia resources such as pictures, audio, video, etc., which can be used to enhance the readability and attractiveness of e-books.

[0074] The initial Hypertext Markup Language (HTML) file is used to define the style structure. The HTML file is the core component of the EPUB file and is used to define the structure and content of the e-book. In the HTML file, you can use tags (such as <h1>、 etc.) to construct the skeleton of the e-book, that is, the style structure.

[0075] like Figure 3 The target template style example shown above will create a corresponding title in the HTML file ( < / h1> <h1>),paragraph( ) and associate CSS style rules through class attributes.

[0076] Among them, the Cascading Style Sheet (CSS) file is used to define the style rules. The CSS file is used to describe the visual style of elements in the HTML file. In the CSS file, you can locate specific elements in the HTML file (such as title, paragraph 1, paragraph 2, etc.) through class attributes (such as .title, .paragraph1, .paragraph2, etc.), and define style rules such as font color, font style, font bold, font spacing, etc.

[0077] Then, the initial HTML file, CSS file and resource file are packaged to generate the initial electronic publication file (EPUB). EPUB is an open standard e-book format that supports complex layouts, styles and multimedia content. During the packaging process, the HTML file, CSS file and all related resource files (such as icons, pictures, etc.) can be packaged into a ZIP format compressed package, and follow the directory structure and file naming rules of the EPUB standard. The generated EPUB file can be read on an electronic reading device that supports this format.

[0078] For example, in the initial HTML file corresponding to the generated target template style, the head node (head) can contain the title of the document and a link to the CSS style sheet. The body node (body) can define the actual content of the e-book, such as Figure 3 The target template style can include a title tag and two paragraph tags (paragraph 1, paragraph 2) in the initial HTML file. The title can also include an icon (img) tag.

[0079] For example, in the CSS file corresponding to the generated target template style, three classes (such as .title, .paragraph1, and .paragraph2) can be defined, corresponding to the title and two paragraphs in the initial HTML file. Each class can define different style rules, such as color, font style, and bold.

[0080] In addition, you also need to package the resource files in the icon format (such as icon.png) included in the content into the initial EPUB file. The final template format is an EPUB file.

[0081] For example, resource files in icon format (such as icon.png) need to be placed in the corresponding directory of the EPUB file and displayed in the HTML file through the icon Tag reference.

[0082] During the EPUB packaging process, all resource files (such as pictures, audio, video, etc.) need to be correctly placed in the corresponding directory in the ZIP compressed package, and ensure that the relevant resource files can be correctly referenced in the HTML file.

[0083] Through the above steps, the target template style is successfully converted into an initial EPUB file, which contains the defined style structure, style rules and resource files, and can be displayed on electronic reading devices that support the EPUB format.

[0084] Step 130: extracting the template style information of the initial electronic publication file.

[0085] In some embodiments, the template style information includes position information of each text tag;

[0086] The step of extracting the template style information of the initial electronic publication file includes:

[0087] Acquire a first main node element of the initial hypertext markup language file, wherein the first main node element includes N first child node elements, where N is a natural number greater than 1;

[0088] Convert the first main node element into an array, wherein each array element in the array is used to store each first child node element;

[0089] Get the position information of the text label of each first child node element.

[0090] The purpose of step 130 is to extract template style information from the initial electronic publication file, which includes the position information of each text tag. Specifically, this process can be divided into the following steps:

[0091] (1) Obtaining the first body node element of the initial hypertext markup language document: This step involves parsing the HTML document and locating the body node element, because the content of the book is usually within the body tag. For example, the body node element contains three child node elements: an h1 title and two paragraphs (p tags).

[0092] (2) Convert the first body node element into an array: To facilitate processing and operation, all child node elements under the body node element can be converted into an array. Each array element represents a child node, which contains the HTML content of the child node. In this way, the array can be traversed and each child node element can be processed separately.

[0093] (3) Obtaining the position information of each first child node text tag: By determining the starting position and ending position of the text tag, the position information of each text tag in the initial HTML content is obtained. For example, for the "title" element, its starting position in HTML may be 18 and its ending position may be 20. With this position information, the text content can be accurately located and replaced in the subsequent content replacement process.

[0094] By extracting useful style information from the initial electronic publishing file, the original layout and design can be maintained during the subsequent content replacement process.

[0095] Step 140: Acquire valid character content of the chapter content to be processed in the initial book content, wherein the valid character content at least includes text content.

[0096] In some embodiments, the step of obtaining valid character content of the chapter content to be processed in the initial book content includes:

[0097] Acquire a second main node element in the chapter content to be processed of the initial book content, wherein the second main node element includes M second child node elements, where M is a natural number greater than 1;

[0098] The outer tag of each of the second sub-node elements is removed to obtain the valid character content corresponding to each of the second sub-node elements.

[0099] For example, it is necessary to parse the content of the chapter to be processed to obtain the valid character content therein. For example, remove the outer tag of each paragraph and only keep the content in the tag.

[0100] First, locate the chapter content to be processed. It is necessary to clarify which content in the initial book content is the chapter content to be processed. In practical applications, this may involve parsing the entire initial book content, and then locating the specific chapter based on the chapter markup (such as specific HTML tags, chapter title format, etc.).

[0101] Then, the second main node element is obtained. For example, in the HTML structure, tags are usually used as containers for main content. Assuming that the content of the chapter to be processed is located in a tag, it is called the "second main node element". This tag contains M second child node elements, each of which represents a paragraph or title, etc. M is equal to the number of specific elements (such as titles, paragraphs) in the chapter.

[0102] Then, the second child node elements are traversed, the outer tags of each second child node element are removed, and the valid character content of each second child node element is extracted. For example, the outer tags of each second child node need to be found, the outer tags include a start tag and an end tag, and the start tag and the end tag are removed from the content.

[0103] For example, for < / h1> <h1> Chapter 1: Banquet in Taoyuan, three heroes sworn brotherhood, slaying the Yellow Turban hero and making their first achievement< / h1> Such titles need to be removed <h1> and< / h1> Label, only keep the text in the middle "The first chapter of the Peach Garden Banquet, three heroes swore brotherhood and slew the Yellow Turban hero to make their first achievement".

[0104] For example, for The Yangtze River rolls eastward, Such paragraphs need to be removed and Label, only keep the text in the middle "The Yangtze River flows eastward."

[0105] For example, for The waves wash away all heroes. Such paragraphs need to be removed and Label, only keep the text in the middle "The waves wash away all heroes.".

[0106] For example, by traversing the second child node element, the <h1>and Tags, only the text content within the tag is retained: "In the first chapter, the heroes feasted in Peach Garden and swore brotherhood to slay the Yellow Turban hero and made their first contribution", "The rolling Yangtze River flows eastward," and "The waves wash away all heroes.".

[0107] Then, the extracted valid character content can be stored in a preset structure (such as an array, list, etc.) for subsequent processing. For example, the valid character content is stored as a JSON array, and each array element corresponds to the valid content of a second child node, which is the chapter title and the content of two paragraphs. This structure facilitates the subsequent filling and typesetting of content according to the style and structure of the e-book template.

[0108] By executing step 140, it is ensured that the valid character content of the chapter to be processed is accurately extracted from the original book content, laying a solid foundation for subsequent e-book editing work.

[0109] In some embodiments, before obtaining the valid character content of the chapter content to be processed in the initial book content, the method further includes:

[0110] Automatically detect spelling errors and grammatical errors in the content of the to-be-processed chapter, and generate correction prompt information or automatically correct the content of the to-be-processed chapter based on the corpus and context information of the content of the to-be-processed chapter.

[0111] Among them, spelling error detection is one of the basic tasks in text preprocessing. You can use a pre-trained spelling check algorithm or model to traverse each word in the content of the chapter to be processed and compare it with the standard vocabulary in the corpus. If a mismatch or highly suspected error word is found, it can be marked as a spelling error. This process may be combined with natural language processing techniques such as lemmatization and stemming to better identify variant forms of words.

[0112] In addition to spelling errors, the system can also use syntax analysis tools or algorithms to detect grammatical errors. These tools usually consider grammatical rules, part-of-speech tagging and other information to determine whether the sentence conforms to the correct grammatical structure. When a grammatical error is detected, the error type (such as subject-verb inconsistency, tense error, etc.) can be analyzed and corresponding correction suggestions can be prepared.

[0113] In order to more accurately identify and correct errors, the system will also make full use of the contextual information of the content of the chapter to be processed. Contextual information can help the system understand the meaning and usage of words and sentences in a specific context, so as to make more reasonable judgments. For example, when judging whether a word is a spelling error, the system may consider the words before and after the word and the meaning of the entire sentence; when correcting grammatical errors, the system will consider the overall structure of the sentence and the logical relationship between the context. For example, in a literary work, the author may deliberately use non-standard spelling or grammar to convey a specific emotion or style; in this case, the system needs to be able to recognize and ignore these "errors".

[0114] Among them, after a spelling or grammatical error is detected, a correction prompt message can be generated according to the error type and context information. The correction prompt message will clearly indicate the location, type and possible correction scheme of the error for reference by the editor. At the same time, in some embodiments, the system also supports an automatic correction function. When the system has a high confidence in the correction scheme, it will automatically replace the erroneous content with the correct text to improve work efficiency. However, due to the complexity and diversity of the language, the automatic correction function may have certain limitations, so in some cases manual intervention is still required to ensure the accuracy of the correction. For example, the automatically generated correction prompt message or the automatically corrected content can be provided to the user for confirmation or further editing to ensure the accuracy of the content and meet the author's intention.

[0115] After spelling and grammatical errors are detected and corrected, these corrections can be integrated into the content of the chapter to be processed and a new, more accurate and readable version of the text can be generated. In addition, the system may also provide a feedback mechanism that allows editors to review and verify the corrections to ensure that the quality of the final output text meets expectations.

[0116] In summary, by adding the automatic detection and correction steps of spelling and grammatical errors before obtaining valid character content, the accuracy and readability of book content can be significantly improved, providing a solid foundation for subsequent text processing and analysis.

[0117] In some embodiments, before obtaining the valid character content of the chapter content to be processed in the initial book content, the method further includes:

[0118] In response to the translation instruction, the to-be-processed chapter content is translated into a language version indicated by the translation instruction.

[0119] Among them, the e-book editing tool not only supports content processing in the original language, but also can respond to translation instructions and translate the content of the chapter to be processed into a specified language version. Such a function can provide readers with multilingual versions of e-books, increasing the accessibility and market scope of books.

[0120] First, the e-book editing tool needs to be able to receive and recognize translation instructions from users or automated scripts. This can be a user interface operation, such as clicking a "Translate" button and selecting a target language; it can also be specified through command line parameters or API calls.

[0121] Then, the translation instructions are parsed to determine the source language, target language, and specific text paragraphs or chapters to be translated.

[0122] Then, the content of the chapter to be processed can be preprocessed to obtain valid text content. The text preprocessing can include formatting and cleaning, sentence segmentation and paragraph segmentation, etc. For formatting and cleaning: preprocess the original chapter content to remove HTML tags, special characters or any non-text elements so that the machine translation model can accurately process the plain text. For sentence segmentation and paragraph segmentation: break down long texts into sentences or paragraphs to help improve translation quality and efficiency, because machine translation models tend to be better at processing shorter text units.

[0123] The e-book editing tool then calls a translation service, which can be a built-in translation engine, a third-party API, etc. The choice of translation service depends on the required translation quality, cost, and availability.

[0124] Then, you send the valid text content of the chapter to be processed to the translation service and receive the translation results. This usually involves segmenting the text into appropriate paragraphs or sentences so that the translation service can process it more efficiently.

[0125] The results returned by the translation service are then further processed, such as removing extra spaces, adjusting line breaks, etc., to ensure that the format of the translated text is consistent with the original document.

[0126] Then, the processed translation content is replaced to the corresponding position in the original document, or saved as a new document for use in the subsequent e-book generation step.

[0127] For example, you can save translated content as separate EPUB files, or merge multiple language versions into one multilingual EPUB file so that readers can switch languages ​​in the same e-book.

[0128] Although automatic translation technology is quite advanced, there may still be mistranslations or formatting issues. Therefore, for important publications, manual proofreading and editing of the translated content may be required to ensure the quality of the final output e-book.

[0129] By integrating translation functions, e-book editing tools can not only improve the accessibility of content, but also provide publishers and authors with a wider market. However, in order to ensure the accuracy of the translation and the reading experience of readers, the translated content should be carefully proofread and formatted.

[0130] Step 150: based on the template style information, fill the valid character content into the initial hypertext markup language file to obtain the target hypertext markup language file of the to-be-processed chapter content.

[0131] In some embodiments, the filling of the valid character content into the initial hypertext markup language file based on the template style information to obtain the target hypertext markup language file of the to-be-processed chapter content includes:

[0132] Based on the position information of each text tag of each first sub-node element, the valid character content corresponding to each second sub-node element is filled into the initial hypertext markup language file to obtain a target hypertext markup language file.

[0133] For example, during the filling process, the placeholders in the initial HTML file are first located according to the template style information (the text tag position information of each first child node element), and then the extracted valid character content (from the second child node element of the to-be-processed chapter) is replaced into these placeholders one by one.

[0134] First, it is necessary to determine the position information of each text tag of each first child node element, which is usually accomplished by parsing an initial hypertext markup language file (such as an HTML file).

[0135] Then, the valid character content corresponding to each second child node element is filled into the initial hypertext markup language file, which is achieved by inserting the valid character content into the position specified by the position information.

[0136] In some embodiments, the method further comprises:

[0137] If the number M of the second sub-node elements exceeds the number N of the first sub-node elements, then based on the position information of each text tag of the first to Nth first sub-node elements, the valid character contents corresponding to the first to Nth second sub-node elements are filled into the initial hypertext markup language file;

[0138] Based on the position information of each text tag of the Nth first sub-node element, the valid character contents corresponding to the N+1th to Mth second sub-node elements are filled into the initial hypertext markup language file.

[0139] For example, when the number of first child node elements and second child node elements is equal (i.e., N=M), or when the number of first child node elements is greater than the number of second child node elements (i.e., N>M), the system directly fills the corresponding valid character content one-to-one into the initial HTML file based on the position information of the text tag of each first child node element.

[0140] For example, fill "The first banquet in Taoyuan, the heroes swore brotherhood and killed the Yellow Turban hero for the first time" into<h1class="title"> In the label, fill "Rolling Yangtze River flows eastward" into <p class="paragraph1"> In the label, and so on, fill "The waves wash away the heroes." into <p class="paragraph2">tag.

[0141] For example, when the number M of second child node elements exceeds the number N of first child node elements, the system first processes the first N second child node elements in the one-to-one filling manner described above.

[0142] Then, for the remaining MN second child node elements, the system adopts a specific strategy to process. In the embodiment of the present application, the system chooses to change the style rule of the last first child node element (such as<pclass="paragraph2"> ) is applied to all the extra second child node elements. This means that starting from the N+1th second child node element until the Mth second child node element, they will all be assigned<pclass="paragraph2"> The style of the characters will be filled into the corresponding tag.

[0143] After the above processing, a target HTML file containing all second child node elements is generated. In this file, the redundant content is uniformly processed according to the style of the last paragraph in the template. In this way, the system can flexibly handle the situation where the chapter content exceeds the preset number of paragraphs in the template, ensuring that all content can be displayed in the target HTML file in an appropriate way. The padding operation ensures that all paragraphs, including redundant paragraphs, have a consistent style to maintain the visual coherence of the e-book.

[0144] In some embodiments, if there are additional style rules in the target template style that are applicable to different content types, a matching style rule is selected according to the content type of the chapter content to be processed to process the remaining MN second child node elements.

[0145] For example, first analyze all style rules defined in the target template style and identify the content type (such as title, body, quote, etc.) to which each style applies.

[0146] Then, semantic analysis is performed on the content of the chapter to be processed in the original book content to identify the content type of each paragraph or chapter, such as whether it is a quote, poem, dialogue, etc.

[0147] Then, based on the content type and the style rules in the target template style, the most appropriate style is automatically matched. For example, if poetry content is detected, a specific poetry style can be applied.

[0148] For example, you can set priorities for style rules to ensure that in the event of style conflicts or ambiguities, styles can be assigned according to the preset priority rules.

[0149] In some embodiments, there is also a style customization feature, and the user can provide additional guidance, such as specifying which styles to apply to redundant content, or how to assign styles to different content paragraphs.

[0150] For example, a style selection interface may be provided to allow the user to specify a target style to be applied to specific content or paragraphs through the style selection interface.

[0151] For example, a style configuration interface may be provided through which a user can select text and assign a specific style, or create a new style rule.

[0152] For example, a live preview function can also be implemented to allow users to see the effect immediately after applying the style so that adjustments can be made.

[0153] For example, you can also provide a style locking function that allows users to lock the style of a specific paragraph to prevent the style from being changed during the automatic filling process. At the same time, you can also provide a style overriding function that allows users to customize styles to overwrite the automatically matched styles.

[0154] For example, a batch operation function can also be provided to support batch operations, allowing users to quickly apply the same style rules to multiple paragraphs or entire chapters.

[0155] For example, it can also provide import and export functions, allowing users to import or export style rules, making it convenient to reuse custom styles between different projects or books.

[0156] For example, a third-party style library can also be integrated to allow users to select styles from the third-party style library to increase the diversity of styles.

[0157] In some embodiments, the valid character content also includes non-text content;

[0158] The method of filling the valid character content into the initial hypertext markup language file based on the template style information to obtain the target hypertext markup language file of the chapter content to be processed includes: filling the text content and the non-text content into the initial hypertext markup language file based on the template style information to obtain the target hypertext markup language file of the chapter content to be processed.

[0159] In the process of processing e-books, we not only encounter pure text content, but also often need to process chapters containing non-text content. These non-text contents include pictures, bold or italic text, etc., which are crucial to maintaining the original style and richness of e-books.

[0160] First, identify and preserve the non-text content in the original chapter. This may include Image link in tag, Bold text represented by the tag, Tags represent italic text, etc.

[0161] Identifying these contents usually requires parsing HTML code. In HTML documents, non-text content usually refers to HTML tags, comments, and possibly embedded scripts or styles. For most application scenarios, when referring to "non-text content" that you want to keep in the HTML conversion or filling process, the main focus is on HTML tags. These tags define the structure and style of the document, such as For embedding images, and For bold and italic text respectively.

[0162] After identifying the non-text content, they need to be separated from the normal text content. This means that when extracting valid character content, text and non-text elements should be processed separately to ensure that they are correctly retained and populated in subsequent processing. For non-text content, usually no translation or other text processing is required, but it is directly retained. However, some formatting adjustments may be required to ensure that they are displayed correctly in the final e-book file. For example, it may be necessary to check whether the image link is valid, or adjust the CSS style to display bold and italic text correctly. When populating the valid character content into the initial Hypertext Markup Language file, not only the text content but also the non-text content should be populated.

[0163] For example, when filling content into a template, if the template is designed properly, the HTML fragment containing non-text content can be directly processed as a string. This means that there is no need to distinguish between text and non-text content, but the entire HTML fragment is treated as a whole.

[0164] After filling, you will get a target HTML file containing all text and non-text content. This file should faithfully reproduce all the content and format of the original chapter and comply with the requirements of e-book production.

[0165] Step 160: Generate a target electronic publication file of the to-be-processed chapter content in the initial book content based on the target hypertext markup language file, the cascading style sheet file and the resource file.

[0166] In step 160, a target electronic publication file of the chapter content to be processed in the initial book content is generated based on the target hypertext markup language file, cascading style sheet file and resource file. This process is not just a simple placement of the content into the electronic publication file, but involves a series of meticulous operations to ensure that the final electronic book meets expectations in terms of format, style and resource links.

[0167] Among them, integrate the cascading style sheet file. In order to ensure that the style in the e-book is consistent with the design draft, the cascading style sheet file (CSS file) needs to be correctly integrated into the electronic publishing file. This usually includes the following operations:

[0168] (1) Copy CSS file: First, copy the cascading style sheet file to the designated directory of the electronic publication file. This directory is usually inside the structure of the electronic publication file, such as a folder dedicated to storing style files.

[0169] (2) Add a reference: Add a link tag ( <link> ), whose hyperlink reference (href) attribute points to the relative path of the cascading style sheet file. In this way, when the e-book is read, the HTML content in it can correctly apply these styles.

[0170] Among them, integrate resource files. E-books often contain static resources such as icons and fonts, which also need to be correctly integrated to ensure the complete display of the content. This usually includes the following operations:

[0171] (1) Copy resource files: Copy all static resource files (such as images, icons, font files, etc.) to the corresponding directories of the electronic publication file. These directories should be pre-defined according to the type and purpose of the resource.

[0172] (2) Update resource references: In the target HTML document, update the paths of all resource links to ensure that they point to the correct location in the electronic publication document. This may involve modifying the image tag ( ), or the href attribute of other resource links.

[0173] Then, generate the electronic publishing file. Once all the content and resources are correctly integrated and referenced, the final target electronic publishing file can be generated. For example, all the files and directory structures are packaged into an electronic publishing format file such as EPUB or MOBI through an e-book editing tool. For example, the following is generated: Figure 4 The target electronic publication file is shown.

[0174] Then, after the target electronic publishing file is generated, it needs to be verified and tested to ensure that all styles are applied correctly; that all static resources can be displayed normally; and that the layout and typesetting of the e-book maintain good compatibility and readability on various devices and reading software.

[0175] Through these steps, the integrity and correctness of the e-book in terms of content, style, and resources are ensured, thus providing a high-quality e-reading experience.

[0176] In some embodiments, the method further comprises:

[0177] Providing an editing window for displaying the style rule;

[0178] In response to an editing operation on the editing window, adjusting a parameter value of the style rule;

[0179] Based on the adjusted style rules, the target electronic publication file is updated.

[0180] In order to improve the editing efficiency and flexibility of the target electronic publication file, the method further includes providing an editing window for style rules, responding to editing operations and adjusting parameter values ​​of style rules, and updating the target electronic publication file based on these adjustments.

[0181] Among them, an editing window for displaying style rules is provided. The editing window is a user interface element used to show the style rules of each element in the current electronic publication file to the user. These style rules may include the font, color, margin, alignment, background, etc. of each element, depending on the style requirements and template design of the electronic publication file. The editing window intuitively displays the editable style rules to the user in the form of a graphical user interface (GUI) or a form. The user can easily identify and select the style items that need to be adjusted.

[0182] Among them, in response to the editing operation on the editing window, the parameter value of the style rule is adjusted. For example, the user can interact with the editing window through devices such as a mouse, keyboard or touch screen to perform various editing operations such as clicking, sliding, inputting, etc. These operations are intended to modify the current parameter value of the style rule. The system should respond to the user's editing operation in real time and immediately adjust the parameter value of the style rule. In this way, the user can instantly see the effect of the style change during the editing process, thereby improving the accuracy and efficiency of editing. In order to ensure that the edited parameter value meets the style specifications and design requirements of the electronic publishing file, the system can also perform necessary parameter verification. If the parameter value is invalid or exceeds the allowable range, the system should give a corresponding prompt message and allow the user to re-enter or select a valid parameter value.

[0183] Among them, based on the adjusted style rules, the target electronic publication file is updated. After the style rule adjustment is completed, the system should apply these adjustments to the target electronic publication file. This includes updating the style class definition in the HTML file, modifying the style rules in the CSS file, and adjusting the reference method of resource files (such as pictures, fonts, etc.).

[0184] In order to enhance the user experience, a real-time preview function can be provided. Users can view the updated effect of the electronic publication file at any time during the editing process, so as to more intuitively evaluate and adjust the style rules.

[0185] Users can save updated electronic publishing files to local or cloud storage locations and export them to common e-book formats (such as EPUB, MOBI, etc.) for reading and sharing on e-reading devices.

[0186] By providing an editing window for style rules, responding to editing operations and adjusting parameter values ​​of style rules, and updating the target electronic publication file based on these adjustments, the method provides a flexible, efficient and intuitive electronic publication file editing environment for users. Users can quickly adjust the style and layout of e-books according to actual needs, thereby improving the reading experience and visual effects of e-books.

[0187] In some embodiments, updating the target electronic publication file based on the adjusted style rule includes:

[0188] Displaying a preview view of the adjusted style rule applied to the target electronic publication file;

[0189] In response to a confirmation instruction for the preview view, the target electronic publication file is updated based on the adjusted style rule.

[0190] Among them, a preview view showing the adjusted style rules applied to the target electronic publication file is displayed. When users adjust style rules in the editing interface, such as changing font size, color, layout, or adding background images, the preview view can be updated immediately to reflect these changes. This instant feedback allows users to see the impact of style adjustments on the appearance of the final publication, so that they can make real-time decisions and adjustments.

[0191] The preview feature may also support viewing the electronic publication on multiple devices, such as desktop browsers, tablets, and smartphones. This helps ensure that the publication is well readable and looks good on a variety of screen sizes and device types.

[0192] Users can test navigation links, animation effects or any interactive elements directly through the preview view to ensure that all functions work as expected.

[0193] In response to a confirmation instruction for the preview view, the target electronic publication file is updated based on the adjusted style rules. Once the user is satisfied with the style adjustment in the preview view, they can issue a confirmation instruction by clicking a "Save", "Apply" or "Confirm" button. This indicates that the user has reviewed the preview and agrees to update the electronic publication file according to the style rules shown in the preview.

[0194] After the confirmation command is triggered, the editing tool or platform will formally write all the style adjustments shown in the preview view into the source file of the electronic publication. This may involve updating the CSS style sheet, HTML structure or XHTML document, depending on the format of the publication.

[0195] Before updating, the system may create a backup of the current state so that it can be rolled back to the previous version if necessary. In addition, version control functions can be provided to record every change, making it easier to track modification history and collaborative editing.

[0196] After updating, the system may also automatically run a series of compatibility checks to ensure that the adjusted style rules do not cause display problems on specific devices or readers.

[0197] By displaying a preview view of the target electronic publication file after the adjusted style rule is applied, and responding to the user's confirmation instruction on the preview view to update the file, this embodiment not only improves the efficiency and accuracy of the user's editing of the electronic publication file, but also enhances the user experience satisfaction. The user can intuitively see the effect of the style change in the preview view, and perform the update operation after confirming that it is correct, thereby avoiding unnecessary errors and repeated work.

[0198] In some embodiments, the method further comprises:

[0199] Obtaining interactive elements and / or dynamic embedded content associated with the chapter content to be processed;

[0200] The interactive element and the dynamically embedded content are integrated into the target electronic publication document.

[0201] Among them, interactive elements are components that allow users to interact with them, which can enhance user participation and learning effects. For example, interactive elements are not limited to traditional text and pictures, they can be various forms of interactive tools, such as quizzes, questionnaires, interactive charts, forms, buttons, etc.

[0202] For example, by embedding quizzes and questionnaires in the target electronic publication documents, authors can collect readers' feedback and understand their understanding and interests of the content. Such feedback is of great guiding significance for subsequent content creation and revision.

[0203] For example, interactive charts allow readers to explore data by clicking, dragging, etc., so that they can understand complex information more intuitively. This interactivity not only increases reader participation, but also makes information communication more efficient.

[0204] For example, forms and buttons can be used to collect basic information from readers or guide them to related web pages or resources. This integration can enhance the usability and navigation of electronic publishing documents.

[0205] Among them, dynamic embedded content is content that can be updated in real time or linked to external resources. For example, dynamic embedded content can include links to external resources, audio / video embedding codes, etc.

[0206] For example, linking to external resources: By adding links in electronic publications, readers can directly click to jump to related external resources such as web pages, videos, documents, databases or other electronic publications. This integration method not only provides readers with more information sources, but also makes the document content more flexible and extensible.

[0207] For example, audio / video embedding code: Audio or video is an intuitive and vivid way to present information. By embedding audio / video embedding code in electronic publishing files, audio / video can be played directly in the file, providing readers with a richer and more interesting reading experience.

[0208] First, interactive elements and / or dynamic embedded content related to the content of the chapter to be processed are obtained. These elements and content can be obtained in a variety of ways, such as retrieving from a database, downloading from an external resource, or directly receiving from user input.

[0209] The captured interactive elements and dynamically embedded content are then integrated into the target electronic publication document. This process may involve inserting the elements and content into the appropriate locations, adjusting the formatting and style to match the overall design of the document, and ensuring that the functionality of all elements and content is not affected.

[0210] The integration of interactive elements can include inserting quizzes, questionnaires, interactive charts, forms, buttons and other elements into the corresponding chapters of the target electronic publication document. These elements can enhance reader engagement, provide instant feedback and personalized learning experience.

[0211] Regarding the integration of dynamic embedded content, it can involve inserting links to external resources (such as websites, databases or other electronic publication files), audio / video embedding codes, etc. into electronic publication files. Such content can enrich the information content of the file, provide more diverse learning materials, and enable readers to easily access external resources.

[0212] Among other things, you need to ensure compatibility and functionality of interactive elements and dynamically embedded content. This means testing how these elements and content behave on different devices and platforms, ensuring they work properly and integrate seamlessly with the rest of the target e-publishing document.

[0213] For example, integrated interactive elements and dynamic embedded content can also be updated and maintained. Over time, interactive elements may need to be modified or new dynamic embedded content may need to be added. Therefore, it is important to maintain a system to track and manage these elements and content.

[0214] When integrating interactive elements and dynamically embedded content provided by third parties, you must ensure that appropriate licenses have been obtained and that the use of these materials will not infringe any intellectual property rights or violate relevant laws and regulations.

[0215] In some embodiments, the method further comprises:

[0216] Automatically identify the multimedia resources described in the content of the chapter to be processed;

[0217] The multimedia resource is integrated into the target electronic publication document.

[0218] In the content of the chapter to be processed, the multimedia resources described can be automatically identified through technologies such as natural language processing (NLP), image recognition and speech recognition. These multimedia resources may appear in various forms, such as text descriptions, tags, metadata, etc. The system can intelligently parse these descriptions and identify the corresponding multimedia resources.

[0219] For example, multimedia resources can include pictures, audio, video links, etc. These resources can provide readers with intuitive and vivid information to help them better understand the content of the chapter to be processed.

[0220] For example, pictures are common multimedia resources in electronic publications. Pictures can intuitively display objects, scenes or concepts, enhancing readers' reading experience. The system can automatically identify and extract picture resources, and then integrate them into the target electronic publication file.

[0221] For example, audio resources such as speech recordings and soundtracks can add sound elements to electronic publications, allowing readers to have a richer sensory experience during the reading process. The system can identify audio links or descriptions and embed them into the target electronic publication file.

[0222] For example, video resources convey information through dynamic images and sounds, which is more expressive and attractive. The system can identify video links in chapter content and provide embedding or playback functions in the target electronic publication file.

[0223] In the process of integrating multimedia resources into the target electronic publication file, the identified multimedia resources (such as pictures, audio, and video on the Internet) are first downloaded. According to the format requirements of the target electronic publication file, format conversion may also be required, for example, converting pictures into JPEG or PNG format, converting audio into MP3 format, or converting videos into a format suitable for e-book reading.

[0224] Then, the processed multimedia resources are embedded into the target electronic publication file in the logical order of the chapter content. This includes inserting pictures at the appropriate location, setting audio / video playback controls, and ensuring that the multimedia resources are consistent with the text content and do not disrupt the overall reading experience.

[0225] In addition, for interactive electronic publishing formats such as e-books, it is also necessary to design interactive methods for multimedia resources. For example, add click-to-zoom functions to pictures, add playback control buttons to audio / video, and possible progress bars, volume adjustments, etc.

[0226] Among them, considering the loading speed and running efficiency of the target electronic publishing files, it is necessary to reasonably control the size and quality of multimedia resources, such as compressing or optimizing the resources to avoid slow loading or jamming due to excessive file size.

[0227] Before integrating multimedia resources, you should ensure that you have obtained relevant copyright licenses or followed reasonable use regulations to avoid infringing on the copyrights of others.

[0228] Among them, for target electronic publishing files that need to support barrier-free reading, it is also necessary to ensure that multimedia resources (such as audio and video) can be correctly accessed and interpreted through assistive technologies such as screen readers.

[0229] In some embodiments, the method further comprises:

[0230] If the initial book content includes a plurality of the chapter contents to be processed, then generating a plurality of target electronic publication files of the chapter contents to be processed in parallel;

[0231] Based on the target electronic publication files of the plurality of chapter contents to be processed, an overall electronic publication file of the initial book contents is generated.

[0232] In the scenario where the initial book content contains multiple chapters to be processed, parallel processing technology can be used to process multiple chapters to be processed at the same time. This processing method can greatly improve processing efficiency, and there is no need to wait for one chapter to be processed before starting to process the next chapter.

[0233] Specifically, all the chapters to be processed in the initial book are first identified, and each chapter is assigned an independent processing thread or task. These processing threads or tasks can run simultaneously without interfering with each other. Each processing thread or task is responsible for converting a chapter to be processed into a target electronic publishing file, including but not limited to adding interactive elements, dynamically embedding content, identifying and integrating multimedia resources, etc.

[0234] During the parallel processing, each processing thread or task will generate a corresponding target electronic publication file of the chapter content to be processed. These target electronic publication files are digital presentations of the chapter content, including all necessary text, pictures, audio, video and other elements, as well as possible interactive elements and dynamic embedded content.

[0235] When all the target electronic publishing files of the chapters to be processed are generated, they will be integrated together to generate the overall electronic publishing file of the initial book content. This integration process needs to consider the logical relationship and order of each chapter to ensure the coherence and readability of the overall electronic publishing file.

[0236] During the integration process, some additional elements or functions may be added, such as a table of contents, index, search function, etc., to facilitate readers to browse and retrieve book content. In addition, the system can also further optimize and beautify the overall electronic publishing file as needed, such as adjusting the font, color, layout, etc., to enhance the user's reading experience.

[0237] Among them, by processing multiple chapters to be processed in parallel, the overall processing time can be greatly shortened and the processing efficiency can be improved. Each chapter content is processed independently and the target electronic publishing file is generated, which can ensure the content quality and format consistency of each chapter. The overall electronic publishing file contains all chapter contents and adds additional elements or functions, such as catalogs, search functions, etc., which can facilitate readers to browse and retrieve book contents and improve user experience. By generating an overall electronic publishing file, the needs of different scenarios can be met, such as online reading, downloading and saving, printing and outputting, etc.

[0238] In summary, this method of generating overall electronic publishing files based on parallel processing and chapter content has significant advantages in improving processing efficiency, ensuring content quality and enhancing user experience.

[0239] In some embodiments, the method further comprises:

[0240] Automatically analyzing the chapter structure and title level of the initial book content to automatically generate a table of contents and an index based on the analysis results;

[0241] The table of contents and the index are added to the overall electronic publication file.

[0242] Among them, in order to further improve the readability and user experience of the overall electronic publishing file, the chapter structure and title level of the initial book content can be automatically analyzed, and the directory and index can be automatically generated based on these analysis results, and then added to the overall electronic publishing file.

[0243] First, the initial book content is automatically analyzed to identify the chapter structure and title level. Chapter structure refers to the different levels of chapter division in the book content, such as chapters, subsections, subsections, etc. Title level refers to the hierarchical relationship between different titles, usually expressed by the title font, size, bold, etc.

[0244] During the analysis process, natural language processing and text analysis techniques can be used to identify the title and chapter structure in the book content. For example, titles and chapters can be identified based on the specific format of the title (such as a specific font, size, bold, etc.) or specific tags (such as "Chapter 1", "Section 1.1", etc.). At the same time, the hierarchical relationship between titles is analyzed to determine the level of the title.

[0245] Then, based on the analysis results of chapter structure and heading level, the table of contents and index can be automatically generated. The table of contents is a structural overview of the book content, listing the titles and page numbers of each chapter in the book. The index is a list of keywords or phrases in the book content, which helps readers quickly locate relevant content.

[0246] When generating a table of contents, you can list the titles of each chapter in a hierarchical relationship based on the chapter structure and title level information, and automatically calculate or assign page number information. When generating an index, you can perform keyword extraction and semantic analysis on the book content to identify important concepts, names, place names and other keywords or phrases, and list their locations and page number information in the book.

[0247] Then, the automatically generated table of contents and index can be added to the overall electronic publication file. This process can be achieved by inserting links or embedding codes of the table of contents and index at specific locations in the overall electronic publication file. When readers read the overall electronic publication file, they can quickly jump to the relevant chapters or content locations by clicking on the links in the table of contents or index.

[0248] In some embodiments, the method further comprises:

[0249] When generating the overall electronic publication file of the initial book content, the layout and style of the overall electronic publication file are automatically adjusted according to the device attributes of the target device.

[0250] In order to ensure the best reading experience of electronic publishing files on different target devices, when generating the overall electronic publishing file of the initial book content, the layout and style of the file will be automatically adjusted according to the device properties of the target device.

[0251] First, you need to identify the target device type, screen size, resolution, operating system, browser, and other device attributes that may affect the reading experience. These device attributes can be obtained in a variety of ways, such as the user actively inputting device information, the system obtaining the device's user agent string (User-Agent) through network requests and analyzing it, or using the device detection API provided by modern browsers and applications.

[0252] Device type refers to the type of target device, such as smartphones, tablets, laptops, desktop monitors, head-mounted display devices, etc. Different types of devices usually have different screen sizes, interaction methods, and user habits, so the layout and style of electronic publishing files need to be adjusted according to the device type.

[0253] Screen size refers to the physical size of the device screen, while resolution refers to the number of pixels on the screen. These two properties directly affect the display effect of electronic publishing files on the device. Larger screen sizes and higher resolutions allow more content to be displayed, but also place higher requirements on the sophistication of the layout and the clarity of the elements.

[0254] The operating system is the core program that manages the hardware and software resources of the device. Different operating systems have different interface styles, interaction methods, and rendering engines, so style adjustments need to be made for specific operating systems to ensure the consistency of electronic publishing files and device interfaces.

[0255] Different browsers may have different rendering effects and supported CSS properties. Therefore, when generating electronic publishing files, it is necessary to detect the target browser and apply corresponding style adjustments to ensure the correct display of content and normal use of functions.

[0256] In addition to the above properties, you may also need to consider other device properties that may affect the reading experience, such as screen orientation (landscape or portrait), device performance (processor speed, memory size, etc.), network connection speed, etc. Although these properties do not directly affect layout and style like screen size and resolution, they may also have an important impact on the reading experience in certain situations.

[0257] After identifying the properties of the target device, the layout and style of the electronic publication file can be automatically adjusted according to these properties. This usually involves the following adjustments:

[0258] Layout adjustment: Adjust the arrangement, spacing, and size ratio of elements according to screen size and resolution to ensure that the content is displayed well on screens of different sizes.

[0259] Style adjustment: Adjust font size, color, background and other style attributes according to the characteristics of the operating system and browser to ensure the consistency of electronic publishing files and device interfaces.

[0260] Interaction optimization: Adjust the interaction method according to the device type and operating system, such as adding touch gesture support, optimizing keyboard shortcuts, etc., to improve the convenience and comfort of user operation.

[0261] Performance optimization: Optimize device performance and network connection speed, such as reducing unnecessary resource loading, optimizing the compression ratio of image and video files, etc., to improve the loading speed and response performance of electronic publishing files.

[0262] By comprehensively considering multiple properties of the target device and making corresponding automatic adjustments, it is possible to ensure that electronic publishing files can provide the best reading experience on different devices.

[0263] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.

[0264] The embodiment of the present application obtains initial book content and a target template style; converts the target template style into an initial electronic publishing file, wherein the initial electronic publishing file includes an initial hypertext markup language file, a cascading style sheet file, and a resource file; extracts template style information of the initial electronic publishing file; obtains valid character content of a chapter to be processed in the initial book content, wherein the valid character content includes at least text content; based on the template style information, fills the valid character content into the initial hypertext markup language file to obtain a target hypertext markup language file for the chapter to be processed; and generates a target electronic publishing file for the chapter to be processed in the initial book content based on the target hypertext markup language file, the cascading style sheet file, and the resource file. The embodiment of the present application obtains the initial book content and the target template style, collects the basic text information of the book and the visual style template that the designer wants to apply to the book, and ensures that the content and appearance can meet specific publishing standards or personal preferences; by converting the target template style into an actually applicable initial electronic publishing file format, including an initial hypertext markup language (HTML) file, a cascading style sheet (CSS) file, and a resource file, a basic framework is provided for subsequent editing; by automatically extracting the template style information from the initial electronic publishing file, an accurate style guide is provided for subsequent content filling to ensure the consistency of content and style; it can intelligently identify and obtain valid characters in the initial book content, including but not limited to text content, and exclude invalid or redundant information; based on the extracted template style information, the valid character content is accurately filled into the HTML file to obtain the target HTML file, ensuring the correctness of the content layout and format; combining the target HTML file, CSS file, and resource file, a target electronic publishing file that meets the target template style is generated, and the perfect integration of content and style is achieved. Automated e-book editing can be realized, the efficiency and accuracy of e-book editing can be improved, and the labor cost can be reduced.

[0265] In order to better implement the electronic book editing method of the present application embodiment, the present application embodiment also provides an electronic book editing device. Figure 5 , Figure 5 The schematic diagram of the structure of the electronic book editing device provided in the embodiment of the present application. The electronic book editing device 200 may include:

[0266] A first acquisition unit 210 is used to acquire initial book content and target template style;

[0267] A conversion unit 220, configured to convert the target template style into an initial electronic publication file, wherein the initial electronic publication file includes an initial hypertext markup language file, a cascading style sheet file, and a resource file;

[0268] An extraction unit 230 is used to extract the template style information of the initial electronic publication file;

[0269] A second acquisition unit 240 is used to acquire valid character content of the chapter content to be processed in the initial book content, wherein the valid character content at least includes text content;

[0270] An editing unit 250 is used to fill the valid character content into the initial hypertext markup language file based on the template style information to obtain a target hypertext markup language file of the chapter content to be processed;

[0271] The generating unit 260 is used to generate a target electronic publication file of the chapter content to be processed in the initial book content based on the target hypertext markup language file, the cascading style sheet file and the resource file.

[0272] In some embodiments, the template style information includes position information of each text tag;

[0273] The extraction unit 230 can be used to: obtain the first main node element of the initial hypertext markup language file, the first main node element includes N first child node elements, N is a natural number greater than 1; convert the first main node element into an array, each array element in the array is used to store each first child node element; obtain the position information of the text label of each first child node element.

[0274] In some embodiments, the second acquisition unit 240 can be used to: acquire a second main node element in the to-be-processed chapter content of the initial book content, the second main node element including M second child node elements, where M is a natural number greater than 1; remove the external label of each second child node element to obtain the valid character content corresponding to each second child node element.

[0275] In some embodiments, the editing unit 250 can be used to fill the valid character content corresponding to each second sub-node element into the initial hypertext markup language file based on the position information of each text tag of each first sub-node element to obtain a target hypertext markup language file.

[0276] In some embodiments, the editing unit 250 can also be used for: if the number M of the second sub-node elements exceeds the number N of the first sub-node elements, then based on the position information of the respective text tags of the 1st to Nth first sub-node elements, filling the valid character contents corresponding to the 1st to Nth second sub-node elements into the initial hypertext markup language file; based on the position information of the respective text tags of the Nth first sub-node element, filling the valid character contents corresponding to the N+1th to Mth second sub-node elements into the initial hypertext markup language file.

[0277] In some embodiments, the valid character content also includes non-text content;

[0278] The editing unit 250 may also be used to fill the text content and the non-text content into the initial hypertext markup language file based on the template style information to obtain a target hypertext markup language file of the to-be-processed chapter content.

[0279] In some embodiments, the generating unit 260 may also be used to: obtain interactive elements and / or dynamic embedded content associated with the chapter content to be processed; and integrate the interactive elements and the dynamic embedded content into the target electronic publication file.

[0280] In some embodiments, the generating unit 260 may also be used to: automatically identify multimedia resources described in the to-be-processed chapter content; and integrate the multimedia resources into the target electronic publication file.

[0281] In some embodiments, the generating unit 260 may also be used to: if the initial book content includes a plurality of the to-be-processed chapter contents, generate a plurality of target electronic publishing files of the to-be-processed chapter contents in parallel; and generate an overall electronic publishing file of the initial book content based on the plurality of target electronic publishing files of the to-be-processed chapter contents.

[0282] In some embodiments, the generating unit 260 may also be configured to automatically adjust the layout and style of the overall electronic publication file according to device properties of a target device when generating the overall electronic publication file of the initial book content.

[0283] In some embodiments, the generating unit 260 may also be used to: automatically analyze the chapter structure and title level of the initial book content to automatically generate a table of contents and an index based on the analysis results; and add the table of contents and the index to the overall electronic publication file.

[0284] In some embodiments, the conversion unit 220 can be used to: obtain the style structure, style rules and resource files of the target template style; use the initial hypertext markup language file to define the style structure; use the cascading style sheet file to define the style rules; encapsulate the initial hypertext markup language file, the cascading style sheet file and the resource file to generate the initial electronic publication file.

[0285] In some embodiments, the generating unit 260 may also be used to: provide an editing window for displaying the style rule; adjust the parameter value of the style rule in response to an editing operation on the editing window; and update the target electronic publication file based on the adjusted style rule.

[0286] In some embodiments, when updating the target electronic publication file based on the adjusted style rules, the generation unit 260 can be used to: display a preview view of the adjusted style rules applied to the target electronic publication file; and update the target electronic publication file based on the adjusted style rules in response to a confirmation instruction for the preview view.

[0287] In some embodiments, the second acquisition unit 240 can also be used to: before acquiring the valid character content of the chapter content to be processed in the initial book content, automatically detect spelling errors and grammatical errors in the chapter content to be processed, and generate correction prompt information or automatically correct the chapter content to be processed based on the corpus and the context information of the chapter content to be processed.

[0288] In some embodiments, the second acquisition unit 240 may also be used to: before acquiring valid character content of the chapter content to be processed in the initial book content, in response to a translation instruction, translate the chapter content to be processed into a language version indicated by the translation instruction.

[0289] The electronic book editing device 200 may be integrated in a terminal device or a server that has a storage device and a processor and has computing capabilities, or the electronic book editing device 200 is the terminal device or the server.

[0290] In some embodiments, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0291] In some embodiments, Figure 6 As shown, Figure 6 Another structural diagram of a computer device provided in an embodiment of the present application, the computer device 300 also includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0292] The processor 301 is the control center of the computer device 300. It uses various interfaces and lines to connect the various parts of the entire computer device 300, executes various functions of the computer device 300 and processes data by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the computer device 300 as a whole.

[0293] Optionally, the computer device 300 may be a terminal device, and the processor 301 may call a software program and a module stored in the memory 302 to perform the following operations:

[0294] Acquire initial book content and target template style; convert the target template style into an initial electronic publishing file, wherein the initial electronic publishing file includes an initial hypertext markup language file, a cascading style sheet file and a resource file; extract template style information of the initial electronic publishing file; acquire valid character content of a chapter to be processed in the initial book content, wherein the valid character content includes at least text content; based on the template style information, fill the valid character content into the initial hypertext markup language file to obtain a target hypertext markup language file for the chapter to be processed; based on the target hypertext markup language file, the cascading style sheet file and the resource file, generate a target electronic publishing file for the chapter to be processed in the initial book content.

[0295] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0296] In some embodiments, Figure 6 As shown, the computer device 300 further includes: a display unit 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display unit 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art will appreciate that Figure 6 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0297] The display unit 303 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 303 can include a display panel and a touch panel.

[0298] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.

[0299] The audio circuit 305 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data. The audio data is then processed by the output processor 301 and sent to, for example, another computer device through the radio frequency circuit 304, or the audio data is output to a memory for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and a computer device.

[0300] The input unit 306 may be used to receive input numbers, character information or object feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0301] The power supply 307 is used to supply power to various components of the computer device 300 .

[0302] although Figure 6 Not shown, the computer device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0303] In some embodiments, the present application further provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to a terminal device or a server, and the computer program enables the terminal device or the server to execute the corresponding process in the e-book editing method in the embodiment of the present application, which will not be described here for the sake of brevity.

[0304] In some embodiments, the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the corresponding process in the electronic book editing method in the embodiment of the present application, which will not be described in detail for the sake of brevity.

[0305] The present application also provides a computer program, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the corresponding process in the electronic book editing method in the embodiment of the present application, which will not be described here for the sake of brevity.

[0306] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0307] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0308] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0309] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0310] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0311] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0312] In addition, each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0313] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks or optical disks.

[0314] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims. < / h1>

Claims

1. An electronic book editing method, characterized in that: The method comprises: Get the initial book content and target template style; Converting the target template style into an initial electronic publication file, wherein the initial electronic publication file includes an initial hypertext markup language file, a cascading style sheet file and a resource file; Extracting template style information of the initial electronic publication file; Acquire valid character content of the chapter to be processed in the initial book content, wherein the valid character content at least includes text content; Based on the template style information, the valid character content is filled into the initial hypertext markup language file to obtain a target hypertext markup language file of the to-be-processed chapter content; A target electronic publication file of the to-be-processed chapter content in the initial book content is generated based on the target hypertext markup language file, the cascading style sheet file and the resource file.

2. The electronic book editing method according to claim 1, characterized in that: The template style information includes position information of each text label; The step of extracting the template style information of the initial electronic publication file includes: Acquire a first main node element of the initial hypertext markup language file, wherein the first main node element includes N first child node elements, where N is a natural number greater than 1; Convert the first main node element into an array, wherein each array element in the array is used to store each first child node element; Get the position information of the text label of each first child node element.

3. The electronic book editing method according to claim 2, characterized in that: The step of obtaining valid character content of the chapter to be processed in the initial book content includes: Acquire a second main node element in the chapter content to be processed of the initial book content, wherein the second main node element includes M second child node elements, where M is a natural number greater than 1; The outer tag of each of the second sub-node elements is removed to obtain the valid character content corresponding to each of the second sub-node elements.

4. The electronic book editing method according to claim 3, characterized in that: The step of filling the valid character content into the initial hypertext markup language file based on the template style information to obtain the target hypertext markup language file of the chapter content to be processed includes: Based on the position information of each text tag of each first sub-node element, the valid character content corresponding to each second sub-node element is filled into the initial hypertext markup language file to obtain a target hypertext markup language file.

5. The electronic book editing method according to claim 4, characterized in that: The method further comprises: If the number M of the second sub-node elements exceeds the number N of the first sub-node elements, then based on the position information of the respective text tags of the first to Nth first sub-node elements, the valid character contents corresponding to the first to Nth second sub-node elements are filled into the initial hypertext markup language file; Based on the position information of each text tag of the Nth first sub-node element, the valid character contents corresponding to the N+1th to Mth second sub-node elements are filled into the initial hypertext markup language file.

6. The electronic book editing method according to claim 1, characterized in that: The valid character content also includes non-text content; The step of filling the valid character content into the initial hypertext markup language file based on the template style information to obtain the target hypertext markup language file of the chapter content to be processed includes: Based on the template style information, the text content and the non-text content are filled into the initial hypertext markup language file to obtain a target hypertext markup language file of the to-be-processed chapter content.

7. The electronic book editing method according to claim 1, characterized in that: The method further comprises: Obtaining interactive elements and / or dynamic embedded content associated with the chapter content to be processed; The interactive element and the dynamically embedded content are integrated into the target electronic publication document.

8. The electronic book editing method according to claim 1, characterized in that: The method further comprises: Automatically identify the multimedia resources described in the content of the chapter to be processed; The multimedia resource is integrated into the target electronic publication document.

9. The electronic book editing method according to any one of claims 1 to 8, characterized in that: The method further comprises: If the initial book content includes a plurality of the chapter contents to be processed, then generating a plurality of target electronic publication files of the chapter contents to be processed in parallel; Based on the target electronic publication files of the plurality of chapter contents to be processed, an overall electronic publication file of the initial book contents is generated.

10. The electronic book editing method according to claim 9, characterized in that: The method further comprises: When generating the overall electronic publication file of the initial book content, the layout and style of the overall electronic publication file are automatically adjusted according to the device attributes of the target device.

11. The electronic book editing method according to claim 9, characterized in that: The method further comprises: Automatically analyzing the chapter structure and title level of the initial book content to automatically generate a table of contents and an index based on the analysis results; The table of contents and the index are added to the overall electronic publication file.

12. The electronic book editing method according to any one of claims 1 to 8, characterized in that: The step of converting the target template style into an initial electronic publication file comprises: Obtaining the style structure, style rules and resource files of the target template style; Defining the style structure using the initial hypertext markup language file; Using the cascading style sheet file to define the style rules; The initial hypertext markup language file, the cascading style sheet file and the resource file are packaged to generate the initial electronic publication file.

13. The electronic book editing method according to claim 12, characterized in that: The method further comprises: Providing an editing window for displaying the style rule; In response to an editing operation on the editing window, adjusting a parameter value of the style rule; Based on the adjusted style rules, the target electronic publication file is updated.

14. The electronic book editing method according to claim 13, characterized in that: The updating of the target electronic publication file based on the adjusted style rule includes: Displaying a preview view of the adjusted style rule applied to the target electronic publication file; In response to a confirmation instruction for the preview view, the target electronic publication file is updated based on the adjusted style rule.

15. The electronic book editing method according to any one of claims 1 to 8, characterized in that: Before obtaining the valid character content of the chapter content to be processed in the initial book content, the method further includes: Automatically detect spelling errors and grammatical errors in the content of the to-be-processed chapter, and generate correction prompt information or automatically correct the content of the to-be-processed chapter based on the corpus and context information of the content of the to-be-processed chapter.

16. The electronic book editing method according to any one of claims 1 to 8, characterized in that: Before obtaining the valid character content of the chapter content to be processed in the initial book content, the method further includes: In response to the translation instruction, the to-be-processed chapter content is translated into a language version indicated by the translation instruction.

17. An electronic book editing device, characterized in that: The device comprises: A first acquisition unit, used to acquire initial book content and target template style; A conversion unit, used to convert the target template style into an initial electronic publication file, wherein the initial electronic publication file includes an initial hypertext markup language file, a cascading style sheet file and a resource file; An extraction unit, used for extracting the template style information of the initial electronic publication file; A second acquisition unit is used to acquire valid character content of the chapter content to be processed in the initial book content, wherein the valid character content at least includes text content; An editing unit, configured to fill the valid character content into the initial hypertext markup language file based on the template style information, to obtain a target hypertext markup language file of the to-be-processed chapter content; A generating unit is used to generate a target electronic publication file of the chapter content to be processed in the initial book content based on the target hypertext markup language file, the cascading style sheet file and the resource file.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the electronic book editing method according to any one of claims 1-16.

19. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the electronic book editing method according to any one of claims 1 to 16 by calling the computer program stored in the memory.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the electronic book editing method according to any one of claims 1 to 16 is implemented.

Citation Information

Cited By

  • Electronic book editing method and system, electronic equipment and storage medium

    CN120144024A

  • Document intelligent navigation method and system, electronic equipment and storage medium

    CN120144824A