Automatic document layout and publishing method and system based on multi-channel theme mapping
By combining a literature in-depth reading and summarization model with a channel topic mapping dictionary, academic literature is processed automatically, solving the problems of complex typesetting and low publishing efficiency in existing technologies. This enables efficient and accurate publication of literature and meets the needs of rapid dissemination of scientific research results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIEHELIX (SHANGHAI) MEDICAL TECH CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-14
AI Technical Summary
The existing academic literature typesetting and publishing process is complex and time-consuming, making it difficult to meet the needs of rapid dissemination of scientific research results. Furthermore, the visual style requirements of different self-media platforms increase the difficulty of manual adjustments, and existing tools have limited functionality and cannot achieve one-stop operation.
By acquiring the original literature information from the multidimensional table, the literature is transformed into standardized academic structure markup language text using a literature in-depth reading and summarization model. The channel topic mapping dictionary is called according to the channel identifier to be published, realizing the conversion of structure nodes into inline style blocks. Combined with the image and text message publishing interface parameters of the self-media platform, the automated typesetting and publishing are completed.
It enables structured processing of literature content, accurately adapts to the visual style requirements of different self-media platforms, improves typesetting efficiency and accuracy, and achieves full automation from literature information acquisition to final publication, ensuring timely and accurate dissemination of research results and enhancing the influence of research results.
Smart Images

Figure CN122088441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of academic literature dissemination technology, and more specifically, to a method and system for automated typesetting and publishing of documents based on multi-channel topic mapping. Background Technology
[0002] In the current field of academic literature dissemination, the typesetting and publication of literature is a complex and time-consuming process. Traditionally, after researchers complete the writing of their literature, they need to manually type it to adapt to the publication requirements of different self-media platforms. This process not only requires a lot of manpower and time, but is also prone to typesetting errors, which affects the dissemination effect of the literature.
[0003] Meanwhile, different self-media platforms have their own unique visual style requirements, necessitating researchers to make specific style adjustments for each platform, further increasing the workload. Moreover, most existing literature processing tools are single-function and cannot achieve a one-stop operation from literature information acquisition, content extraction and structuring, to automatic formatting according to different platform style requirements, and finally to publication. This results in low efficiency in literature publication, making it difficult to meet the needs of rapid dissemination of research results. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method and system for automated document typesetting and publishing based on multi-channel topic mapping.
[0005] According to a first aspect of this application, a method for automated document typesetting and publishing based on multi-channel topic mapping is provided, the method comprising:
[0006] Retrieve the original literature information entries entered in the multidimensional table. The original literature information entries include a literature title field, a literature source file link field, and a channel identifier field to be published.
[0007] The full-text extraction operation is triggered based on the link field of the source file of the literature to obtain the full-text data of the literature. The full-text data of the literature is then input into a preset literature in-depth reading and summarization model to obtain standardized academic structure markup language text. The standardized academic structure markup language text includes a background information layer, a method information layer, a result information layer, and a conclusion information layer.
[0008] The pre-stored channel theme mapping dictionary is called according to the channel identifier field to be published. The channel theme mapping dictionary stores the correspondence between different channel identifiers to be published and channel-specific visual style parameters. Based on the channel-specific visual style parameters, the standardized academic structure markup language text is converted from structure nodes to inline style blocks to obtain the graphic hypertext markup language body text containing channel-specific inline cascading style sheet code.
[0009] Obtain the set of image and text message publishing interface parameters of the target self-media platform. The set of image and text message publishing interface parameters includes a cover image material identifier, a text image material identifier, and an image and text message metadata field group. Perform a cloud material library matching operation based on the cover image material identifier and the text image material identifier to obtain the cover material address corresponding to the cover image material identifier and the text material address corresponding to the text image material identifier. Combine the image and text hypertext markup language text with the cover material address, the text material address, and the image and text message metadata field group to obtain the image and text message publishing data structure.
[0010] Call the image and text message publishing interface of the target self-media platform, submit the image and text message publishing data structure to the image and text message publishing interface, obtain the image and text message draft generation status information, and write the image and text message draft generation status information back to the status field of the corresponding original document information entry in the multidimensional table.
[0011] According to a second aspect of this application, a document automated typesetting and publishing system based on multi-channel topic mapping is provided. The document automated typesetting and publishing system based on multi-channel topic mapping includes a machine-readable storage medium and a processor. The machine-readable storage medium stores machine-executable instructions. When the processor executes the machine-executable instructions, the document automated typesetting and publishing system based on multi-channel topic mapping implements the aforementioned document automated typesetting and publishing method based on multi-channel topic mapping.
[0012] Based on any of the above aspects, the technical effect of this application is as follows:
[0013] By acquiring the original literature information entries from a multidimensional table, the system automatically triggers full-text extraction of the literature. Utilizing a pre-defined literature analysis and summarization model, the literature is transformed into standardized academic markup language text containing background, methods, results, and conclusions. This achieves structured processing of the literature content. Based on the channel identifier field, the system calls the channel topic mapping dictionary to convert structural nodes into inline style blocks, resulting in a graphic and textual markup language body containing channel-specific inline cascading style sheet code. This accurately adapts to the visual style requirements of different self-media platforms, eliminating the need for manual adjustments and significantly improving typesetting efficiency and accuracy. By acquiring the graphic and text message publishing interface parameter set of the target self-media platform, the system completes material matching and data structure combination, and then calls the interface for publishing. This achieves full automation from literature information acquisition to final publication, effectively improving the speed of literature publication, ensuring timely and accurate dissemination of research results, and enhancing the impact of research findings. Attached Figure Description
[0014] Figure 1A flowchart illustrating the document automated typesetting and publishing method based on multi-channel topic mapping provided in this application embodiment is shown.
[0015] Figure 2 This illustration shows a schematic diagram of the component structure of a document automated typesetting and publishing system based on multi-channel topic mapping, provided in an embodiment of this application, for implementing the above-described document automated typesetting and publishing method based on multi-channel topic mapping. Detailed Implementation
[0016] Figure 1 This paper illustrates a flowchart of a method and system for automated document typesetting and publishing based on multi-channel topic mapping, as provided in an embodiment of this application. The detailed steps include:
[0017] Step S110: Obtain the original document information entries entered in the multidimensional table. The original document information entries include a document title field, a document source file link field, and a channel identifier field to be published.
[0018] In this embodiment, a multidimensional table is used as the management entry point for document information. Each row of the multidimensional table corresponds to a raw document information entry to be processed. During the retrieval operation, the data storage area of the multidimensional table is first read using a structured query language statement to locate the target row record. From this row record, the value of the "Document Title" column is extracted as the document title field, which stores a string used to uniquely identify the document. The value of the "Document Source File Link" column is extracted as the document source file link field, which stores a Uniform Resource Locator (URL) string pointing to the storage location of the full text of the document. The value of the "Target Publishing Channel" column is extracted as the target publishing channel identifier field, which stores a predefined channel code string used to distinguish different publishing channels. After the values of the document title field, document source file link field, and target publishing channel identifier field are extracted simultaneously, they serve as the basic input data for all subsequent operations. The document title field is used to generate metadata for the subsequent text and image message, the document source file link field is used to trigger full-text extraction, and the target publishing channel identifier field is used for subsequent visual style matching.
[0019] Step S120: Trigger the full-text extraction operation based on the document source file link field to obtain the full-text data of the document. Input the full-text data of the document into the preset document in-depth reading and summarization model to obtain standardized academic structure markup language text. The standardized academic structure markup language text includes a background information layer, a method information layer, a result information layer and a conclusion information layer.
[0020] This step aims to obtain the original data of the full text of the literature from the external storage location based on the literature source file link field obtained in step S110, and to transform the original data into a structured markup language text with semantic tags through a pre-trained deep neural network model—the literature in-depth reading and summarization model. This markup language text is strictly divided into four parts: background information layer, method information layer, result information layer, and conclusion information layer.
[0021] Step S121: Parse the document source file storage address pointed to by the document source file link field, initiate a document full-text retrieval request to the document source file storage address via Hypertext Transfer Protocol, receive the document source file data stream returned by the document source file storage address, and perform format parsing on the document source file data stream to obtain the document full-text data. The document full-text data includes document title information, document author information, document abstract information, document body paragraph set, and document reference list.
[0022] The Uniform Resource Locator (URL) string stored in the document source file link field obtained in step S110 is parsed. The protocol header, domain name, port number, path, and query parameters are extracted from the URL string and reconstructed into a complete URL. Based on this URL, a GET request message conforming to the Hypertext Transfer Protocol (HTTP) specification is constructed. This GET request message includes a request line, a request header, and a blank line. The request line explicitly specifies the request method as GET, the request target as the path portion of the aforementioned URL, and the protocol version as HTTP 1.1. This request message is sent to the server indicated by the URL via a Transmission Control Protocol (TCP) connection. After the server responds, it receives the returned binary data stream, which is stored in a memory buffer as a byte sequence. The binary data stream is then parsed. First, the first few bytes of the binary data stream are read and compared with the known file format magic number to determine the file type. When the file type is identified as Portable Document Format (Portable Document Format), a Portable Document Format parsing library is invoked. Following the object structure in the Portable Document Format specification, the document's directory tree, page tree, and resource dictionary are traversed. The document's metadata stream extracts the title string as the document title information and the author string as the document author information. Through text pattern matching, the text block containing the keyword "abstract" is located, and this text block and its subsequent continuous text content are extracted as the document abstract information. The document's page content stream is traversed sequentially, and text blocks in the page content stream are aggregated according to line breaks and paragraph spacing rules to form a collection of document body paragraphs containing multiple string elements, each string element corresponding to a natural paragraph. Regular expressions are used to match keywords such as "references" to locate the citation list area at the end of the document, and citation content is extracted one by one by number to form the document reference list. The document title information, document author information, document abstract information, document body paragraph collection, and document reference list are encapsulated into a structured data object as the full-text data of the document.
[0023] Step S122: Perform chapter structure recognition processing on the set of document text paragraphs in the full-text data of the document. According to the keyword features of the chapter titles, divide the set of document text paragraphs into background chapter paragraph group, method chapter paragraph group, result chapter paragraph group and conclusion chapter paragraph group. Mark the background chapter paragraph group, the method chapter paragraph group, the result chapter paragraph group and the conclusion chapter paragraph group as background information layer input text, method information layer input text, result information layer input text and conclusion information layer input text, respectively.
[0024] The set of full-text paragraphs from the literature obtained in step S121 is used as input. This set of paragraphs is an ordered list containing multiple string elements, each corresponding to the text content of a natural paragraph. Each paragraph text string in the set is traversed, and the first N characters of each paragraph text string are processed for word segmentation and part-of-speech tagging. The word sequence after word segmentation and part-of-speech tagging is matched against a predefined chapter title keyword dictionary. This dictionary maps keywords such as "background," "introduction," "preface," and "research background" to the "background" category label; keywords such as "methods," "materials and methods," "experimental methods," "research methods," and "technical route" to the "methods" category label; keywords such as "results," "experimental results," "research results," and "data analysis" to the "results" category label; and keywords such as "discussion," "conclusion," "summary," and "prospect" to the "conclusion" category label. When the first paragraph text string mapped to the "background" category label is matched, its index position in the full-text paragraph set is recorded as the starting index of the background chapter. Continue iterating through subsequent paragraph text strings until the first paragraph text string mapped to the "Method" category label is matched. Record the index position of this paragraph text string as the background chapter end index and the method chapter start index. Aggregate all paragraph text strings in the literature text paragraph set from the background chapter start index to the position before the background chapter end index and mark them as background chapter paragraph groups. Following the above logic, starting from the method chapter start index, iterate through the first paragraph text string mapped to the "Result" category label, aggregating and marking the paragraph text strings in between as method chapter paragraph groups. Starting from the result chapter start index, iterate through the first paragraph text string mapped to the "Conclusion" category label, aggregating and marking the paragraph text strings in between as result chapter paragraph groups. Aggregate and mark the remaining paragraph text strings from the conclusion chapter start index to the end of the literature text paragraph set as conclusion chapter paragraph groups. The background section paragraph group is assigned to the background information layer input text variable, the method section paragraph group is assigned to the method information layer input text variable, the result section paragraph group is assigned to the result information layer input text variable, and the conclusion section paragraph group is assigned to the conclusion information layer input text variable. The background information layer input text, method information layer input text, result information layer input text, and conclusion information layer input text each contain one or more paragraph text strings, corresponding to the complete content of the four main sections: introduction, methods, results, and discussion, in the original literature.
[0025] Step S123: Input the background information layer input text into the first summarization unit of the literature intensive reading and summarization model. The first summarization unit performs key information extraction and semantic compression operations on the background information layer input text and outputs the background information layer summary text. The background information layer summary text includes research background description statements and research gap description statements.
[0026] The literature review and inductive model is a pre-trained sequence-to-sequence deep neural network model based on the Transformer architecture. This model contains four independent inductive units: the first, second, third, and fourth inductive units, corresponding to the inductive processing of the four standard structural layers of an academic paper: background, methods, results, and conclusions. The first inductive unit is specifically used to process the background information layer input text. The first inductive unit adopts an encoder-decoder architecture, where the encoder consists of multiple identical encoder layers stacked together. Each encoder layer contains a multi-head self-attention sublayer and a feedforward neural network sublayer, followed by layer normalization and residual connections. The background information layer input text obtained in step S122 is used as the input to the first inductive unit. The background information layer input text is a string variable containing multiple paragraph text strings. First, the background information layer input text is processed by word segmentation and word embedding, converting each word into a high-dimensional vector representation, resulting in a word embedding vector sequence. This word embedding vector sequence is input to the encoder, which calculates the interdependencies between words through a multi-head self-attention mechanism, generating an encoded vector sequence rich in contextual semantics. The decoder is also composed of multiple identical decoder layers stacked together. Each decoder layer contains a masked multi-head self-attention sublayer, an encoder-decoder multi-head attention sublayer, and a feedforward neural network sublayer. Each sublayer is followed by layer normalization and residual connections. The initial input to the decoder is a special start symbol vector. At each step, the decoder generates a word and uses this word as the input for the next step, generating output text word by word in an autoregressive manner. The decoder's generation process is guided by two pre-defined task cue vectors. The first task cue vector guides the decoder to output a statement summarizing the current state and known information of the research field, i.e., a research background description statement. The second task cue vector guides the decoder to output a statement describing the shortcomings or unresolved issues in existing research, i.e., a research gap description statement. The decoder ultimately generates a text string containing two sentences, which serves as the background information layer's inductive text output, where the first sentence is the research background description statement and the second sentence is the research gap description statement.
[0027] Step S124: Input the method information layer input text into the second summarization unit of the literature intensive reading and summarization model. The second summarization unit performs research design type identification, research object selection criterion extraction and technical route step decomposition operations on the method information layer input text, and outputs method information layer summary text. The method information layer summary text includes research design type description statements, research object selection criterion description statements and technical route step sequence description statements.
[0028] The second induction unit is also based on the Transformer architecture, but its internal structure is optimized for the characteristics of method description text. The encoder of the second induction unit has the same structure as the encoder of the first induction unit, used to encode the input text of the method information layer. The decoder of the second induction unit integrates three different output heads during the generation process, each corresponding to a different generation task. The method information layer input text obtained in step S122 is used as the input to the second induction unit. The method information layer input text is a string variable containing multiple paragraph text strings. The method information layer input text is first fed into the encoder to generate an encoded vector sequence. During the generation process, the hidden state at each step of the decoder is simultaneously input into the three output heads. The first output head is a classifier network consisting of multiple fully connected layers and a Softmax layer. This classifier network predicts the best-matching category from predefined research design type categories such as "randomized controlled trial," "cohort study," "case-control study," "cross-sectional study," "in vitro experiment," "animal experiment," and "clinical trial," and maps the category identifier to a natural language description string to generate a research design type description statement. The second output head is a sequence labeling network. Using a conditional random field model, it identifies the positions of lemmas related to entities such as "inclusion criteria," "exclusion criteria," "selection criteria," and "rejection criteria" from the encoded vector sequence. It then extracts the corresponding original text fragments, performs semantic recombination and summarization, and generates descriptive statements for the research object selection criteria. The third output head is a sequence generation network. By analyzing the attention weight distribution of lemmas representing sequential relationships (such as "first," "then," "following," "next," "finally," "step one," and "step two") in the encoded vector sequence, it breaks down the technical process into a series of independent step description fragments and generates a technical route step sequence description statement in the form of an ordered list. The second induction unit finally outputs a method information layer summary text, which contains three parts: a research design type description statement, a research object selection criteria description statement, and a technical route step sequence description statement.
[0029] Step S125: Input the result information layer input text into the third summarization unit of the literature in-depth reading and summarization model. The third summarization unit performs data indicator extraction, statistical significance identification, and core conclusion extraction of charts and graphs on the result information layer input text and outputs the result information layer summary text. The result information layer summary text includes descriptions of main data indicators, descriptions of statistical significance, and descriptions of core conclusions of charts and graphs.
[0030] The encoder of the third induction unit has the same structure as the encoder of the first induction unit. The result information layer input text obtained in step S122 is used as the input to the third induction unit. The result information layer input text is a string variable containing multiple paragraph text strings. The result information layer input text is first fed into the encoder to generate an encoded vector sequence. The decoder of the third induction unit integrates three output heads during the generation process. The first output head is an information extraction network. This network uses a pointer network mechanism to locate and extract text fragments representing key data indicators from the encoded vector sequence, such as "cell survival rate reduced to 30%", "tumor volume inhibition rate reached 65%", "protein expression level downregulated by 0.5 times", etc., and combines the extracted fragments into a fluent descriptive statement to generate a description of the main data indicators. The second output head is a network combining classification and extraction. This network first identifies keywords representing the results of statistical significance tests (such as "P-value", "significant difference", "confidence interval"), and then extracts the numerical values and comparison objects associated with the keywords to generate a statistical significance description statement. The third output head is a summary generation network that, based on the encoded vector sequence, generates a statement summarizing the core findings or conclusions presented in the chart, thus generating a descriptive statement of the chart's core conclusions. The third induction unit finally outputs a results information layer summary text, which includes descriptive statements of the main data indicators, statistical significance, and the core conclusions of the chart.
[0031] Step S126: Input the conclusion information layer input text into the fourth induction unit of the literature intensive reading and summarization model. The fourth induction unit performs research conclusion summary, research limitation analysis and future research direction inference operations on the conclusion information layer input text, and outputs conclusion information layer summary text. The conclusion information layer summary text includes research conclusion summary description statements, research limitation analysis description statements and future research direction inference description statements.
[0032] The encoder of the fourth inductive unit has the same structure as the encoder of the first inductive unit. The conclusion information layer input text obtained in step S122 is used as the input to the fourth inductive unit. The conclusion information layer input text is a string variable containing multiple paragraph text strings. The conclusion information layer input text is first fed into the encoder to generate an encoded vector sequence. The decoder of the fourth inductive unit integrates three output heads during the generation process. The first output head is a summary generation network, which generates a highly condensed sentence based on the encoded vector sequence, summarizing the core findings and final conclusions of the entire study, generating a research conclusion summary statement. The second output head is a critical analysis network, which generates a statement describing the research's shortcomings and constraints by identifying keywords indicating limitations in the encoded vector sequence (such as "limitations," "insufficiency," "failure," "needs improvement") and their context, generating a research limitation analysis statement. The third output head is a deductive generation network, which, based on information in the encoded vector sequence about unresolved issues and the potential for extending current findings, infers and proposes one or more possible directions for future research through a Transformer-based generator, generating a future research direction inference statement. The fourth inductive unit ultimately outputs a conclusion information layer summary text, which includes a summary description of the research conclusions, an analysis of the research limitations, and a prediction of future research directions.
[0033] Step S127: The background information layer summary text, the method information layer summary text, the result information layer summary text, and the conclusion information layer summary text are spliced together according to a preset standardized academic structure template to obtain standardized academic structure markup language text. The standardized academic structure markup language text includes a background information layer, a method information layer, a result information layer, and a conclusion information layer. Each information layer is wrapped with a corresponding markup language tag.
[0034] The pre-defined standardized academic structure template is a string template containing four placeholders, corresponding to the background information layer, method information layer, result information layer, and conclusion information layer, respectively. The background information layer summary text output in step S123 is used to fill the positions of the background information layer placeholders, and a background information layer markup language tag pair is wrapped around the background information layer summary text, for example...<background_layer> and< / background_layer> Fill the method information layer summary text output in step S124 into the positions of the method information layer placeholders, and wrap a method information layer markup language tag pair around the method information layer summary text, for example...<method_layer> and< / method_layer> Fill the result information layer summary text output in step S125 into the position of the result information layer placeholder, and wrap a result information layer markup language tag pair around the result information layer summary text, for example...<result_layer> and< / result_layer> Fill the placeholder positions with the conclusion information layer summary text output in step S126, and wrap the conclusion information layer summary text with a conclusion information layer markup language tag pair, for example...<conclusion_layer> and< / conclusion_layer> After completing the above padding and wrapping operations, a complete string is obtained, which is the Standardized Academic Structure Markup Language (SCL) text, containing four structured information layers explicitly identified using markup language tags.
[0035] Step S130: Call the pre-stored channel theme mapping dictionary according to the channel identifier field to be published. The channel theme mapping dictionary stores the correspondence between different channel identifiers to be published and channel-specific visual style parameters. Based on the channel-specific visual style parameters, perform a conversion operation from structure nodes to inline style blocks on the standardized academic structure markup language text to obtain the graphic hypertext markup language body text containing channel-specific inline cascading style sheet code.
[0036] This step aims to obtain the corresponding visual style parameters from the pre-stored channel topic mapping dictionary based on the channel identifier field to be published obtained in step S110, and to convert the structural nodes in the standardized academic structure markup language text obtained in step S127 into Hypertext Markup Language body text carrying inline Cascading Style Sheet code.
[0037] Step S131: Based on the channel identifier field to be published, perform key-value matching search in the channel theme mapping dictionary to obtain the channel-specific visual style parameters corresponding to the channel identifier field to be published. The channel-specific visual style parameters include channel main color code parameters, channel secondary color code parameters, channel title font parameters, channel body text font parameters, channel reference block background color parameters, and channel border style parameters.
[0038] The channel theme mapping dictionary is a key-value pair storage structure, where the key is the string value of the channel identifier field to be published, and the value is a channel-specific visual style parameter object. The channel identifier field to be published, obtained in step S110, is used as the lookup key to perform an exact match in the channel theme mapping dictionary. Upon successful matching, the corresponding channel-specific visual style parameter object is returned. This channel-specific visual style parameter object contains multiple attributes, including: a channel primary color code parameter storing a six-digit hexadecimal color code string; a channel secondary color code parameter storing another six-digit hexadecimal color code string; a channel title font parameter storing a font definition string containing the font family name, font size range, and weight level; a channel body text font parameter storing a font definition string containing the font family name, font size, and line height ratio; a channel reference block background color parameter storing a six-digit hexadecimal color code string or a color function string that supports transparency control; and a channel border style parameter storing a composite style string containing the border width, border type, and border color.
[0039] Step S132: Perform lexical parsing on the standardized academic structure markup language text, and split the standardized academic structure markup language text into multiple structured node units according to the hierarchical structure of the markup language tags. The structured node units include heading level node units, paragraph node units, list node units, and citation block node units.
[0040] Step S1321: Read the character sequence of the standardized academic structure markup language text, traverse each character in the character sequence from left to right, when the markup language tag start symbol is encountered, record the position index of the markup language tag start symbol, continue traversing until the markup language tag end symbol is encountered, and extract the tag name string between the markup language tag start symbol and the markup language tag end symbol.
[0041] The standardized academic structure markup language text obtained in step S127 is treated as a character array, where each element corresponds to a character. Starting from the first index position of the character array, each character is read sequentially. When a read character matches the markup language tag start symbol "<", the current index position is recorded as the tag start symbol position index. The character array is traversed further until a read character matches the markup language tag end symbol ">", and the current index position is recorded as the tag end symbol position index. All characters after the tag start symbol position index and before the tag end symbol position index are extracted, and these characters are combined into a string in their original order. This string is the tag name string.
[0042] Step S1322: Determine the node type of the current tag based on the tag name string. When the tag name string matches the name of the first-level heading tag, mark the node corresponding to the current tag as a first-level heading node unit and record the start and end positions of the first-level heading node unit.
[0043] The tag name string extracted in step S1321 is compared with a predefined tag type mapping table. In this tag type mapping table, the set of first-level heading tag names contains the string "h1". When the tag name string completely matches the string "h1", the node type of the current tag is determined to be a first-level heading level node unit. A first-level heading level node unit object is created, with its starting position set to the position index of the tag start symbol recorded in step S1321, and its ending position set to the position index of the end symbol of the corresponding end tag. The corresponding end tag is located by traversing from after the current start tag and finding the first end tag " / h1" that has the same name as the current tag.
[0044] Step S1323: When the tag name string matches the second-level heading tag name, mark the node corresponding to the current tag as a second-level heading level node unit, and record the start and end positions of the second-level heading level node unit.
[0045] When the tag name string extracted in step S1321 completely matches the string "h2" in the set of second-level heading tag names in the predefined tag type mapping table, the node type of the current tag is determined to be a second-level heading level node unit. A second-level heading level node unit object is created, and the starting position of the node unit object is set to the position index of the tag start symbol recorded in step S1321, and the ending position is set to the position index of the end symbol of the ending tag " / h2" corresponding to the starting tag.
[0046] Step S1324: When the tag name string matches the paragraph tag name, mark the node corresponding to the current tag as a paragraph node unit, and record the start and end positions of the paragraph node unit.
[0047] When the tag name string extracted in step S1321 completely matches the string "p" in the paragraph tag name set in the predefined tag type mapping table, the node type of the current tag is determined to be a paragraph node unit. A paragraph node unit object is created, and the starting position of the node unit object is set to the position index of the tag start symbol recorded in step S1321, and the ending position is set to the position index of the end symbol of the ending tag " / p" corresponding to the starting tag.
[0048] Step S1325: When the tag name string matches the unordered list tag name, mark the node corresponding to the current tag as an unordered list node unit, record the start and end positions of the unordered list node unit, continue to parse the list item sub-tags inside the unordered list node unit, and extract the list item text content corresponding to each list item sub-tag.
[0049] When the tag name string extracted in step S1321 completely matches the string "ul" in the unordered list tag name set in the predefined tag type mapping table, the node type of the current tag is determined to be an unordered list node unit. An unordered list node unit object is created, with its starting position set to the position index of the tag start symbol recorded in step S1321, and its ending position set to the position index of the ending symbol of the corresponding ending tag " / ul". Within the character range between the starting and ending positions, the process continues to traverse to find the start and ending symbols of the list item sub-tag "li". For each "li" tag pair found, the characters inside the tag pair are extracted as the list item text content, and this list item text content is added to the list item text content set of the unordered list node unit object.
[0050] Step S1326: When the tag name string matches the ordered list tag name, mark the node corresponding to the current tag as an ordered list node unit, record the start and end positions of the ordered list node unit, continue to parse the list item sub-tags inside the ordered list node unit, extract the list item text content corresponding to each list item sub-tag and retain the list item sequence number information.
[0051] When the tag name string extracted in step S1321 completely matches the string "ol" in the ordered list tag name set in the predefined tag type mapping table, the node type of the current tag is determined to be an ordered list node unit. An ordered list node unit object is created, with its starting position set to the position index of the tag start symbol recorded in step S1321, and its ending position set to the position index of the ending symbol of the ending tag " / ol" corresponding to the starting tag. Within the character range between the starting and ending positions, the list item sub-tags "li" are traversed. For each "li" tag pair found, the characters inside the tag pair are extracted as the list item text content, and its sequence number is recorded according to the order in which the list item appears in the "ol" tag pair. The list item text content and sequence number are then associated and stored in the list item content set of the ordered list node unit object.
[0052] Step S1327: When the tag name string matches the reference block tag name, mark the node corresponding to the current tag as a reference block node unit, and record the start and end positions of the reference block node unit.
[0053] When the tag name string extracted in step S1321 completely matches the string "blockquote" in the set of reference block tag names in the predefined tag type mapping table, the node type of the current tag is determined to be a reference block node unit. A reference block node unit object is created, and the starting position of the node unit object is set to the position index of the tag start symbol recorded in step S1321, and the ending position is set to the position index of the end symbol of the ending tag " / blockquote" corresponding to the starting tag.
[0054] Step S1328: Based on the start and end positions of all recorded structured node units, sort all structured node units in ascending order of start position to generate a structured node unit sequence. Each unit in the structured node unit sequence contains a node type identifier, node text content, and node level depth value.
[0055] Collect all structured node unit objects created in steps S1322 to S1327, including first-level heading level node units, second-level heading level node units, paragraph node units, unordered list node units, ordered list node units, and quotation block node units. Place these structured node unit objects into a list, and sort the list in ascending order using the starting position of each node unit object as the sort key, resulting in a structured node unit sequence. For each structured node unit in the sequence, extract the characters between the start and end positions from the standardized academic markup language text as the node text content. By parsing the nesting relationships of nodes in the markup language tree, calculate the node hierarchy depth value of each structured node unit, which is equal to the number of ancestor nodes on the path from the root node to the current node.
[0056] Step S133: Create a corresponding inline style block container for each structured node unit, extract the corresponding style parameter group from the channel-specific visual style parameters according to the node type of the structured node unit, convert the style parameter group into an inline cascading style sheet attribute declaration string, and write the inline cascading style sheet attribute declaration string into the inline style block container.
[0057] Step S1331: Traverse each structured node unit in the structured node unit sequence and create an empty inline style block container for the currently traversed structured node unit. The inline style block container contains a style attribute declaration storage area and a text content storage area.
[0058] Creates an empty inline style block container object containing two separate storage areas. The style attribute declaration storage area is initialized as an empty key-value pair mapping structure, used to store style attribute names and their corresponding values. The text content storage area is initialized as an empty string, used to store the text content of structured node units.
[0059] Step S1332: Read the node type identifier of the current structured node unit, and perform a matching query in the preset node type and style parameter mapping table according to the node type identifier to obtain the style parameter requirement list corresponding to the node type identifier. The style parameter requirement list includes font size requirement, font color requirement, background color requirement, border style requirement, and margin requirement.
[0060] The default node type-style parameter mapping table is a dictionary structure that maps node type identifiers to style parameter requirement lists. The node type identifier is read from the current structured node unit, and used as the key to look up the value in the node type-style parameter mapping table. The lookup result returns a style parameter requirement list, which is an array containing multiple requirement items, each corresponding to a Cascading Style Sheet (CSS) property.
[0061] Step S1333: Extract the specific style parameter value corresponding to each requirement item in the style parameter requirement list from the channel-specific visual style parameters, and assemble the extracted specific style parameter values according to the syntax format of Cascading Style Sheet attribute declaration to generate font size attribute declaration string, font color attribute declaration string, background color attribute declaration string, border style attribute declaration string, and margin attribute declaration string.
[0062] Iterate through the style parameter requirement list obtained in step S1332. For the font size requirement, extract the corresponding font size parameter value from the channel-specific visual style parameters obtained in step S131, and concatenate this parameter value with the strings "font-size:" and ";" to generate a font size attribute declaration string. For the font color requirement, extract the corresponding font color parameter value from the channel-specific visual style parameters, and concatenate this parameter value with the strings "color:" and ";" to generate a font color attribute declaration string. For the background color requirement, extract the corresponding background color parameter value from the channel-specific visual style parameters, and concatenate this parameter value with the strings "background-color:" and ";" to generate a background color attribute declaration string. For the border style requirement, extract the corresponding border style parameter value from the channel-specific visual style parameters, and concatenate this parameter value with the strings "border:" and ";" to generate a border style attribute declaration string. For margin requirements, extract the corresponding top margin, bottom margin, left margin, and right margin parameter values from the channel-specific visual style parameters. Concatenate these parameter values with the "margin:" string and the ";" string in the order of "top right bottom left" to generate the margin attribute declaration string.
[0063] Step S1334: Concatenate the font size attribute declaration string, the font color attribute declaration string, the background color attribute declaration string, the border style attribute declaration string, and the margin attribute declaration string in a preset declaration order to obtain the inline cascading style sheet attribute declaration string.
[0064] The default declaration order is: font size attribute declaration string, font color attribute declaration string, background color attribute declaration string, border style attribute declaration string, and margin attribute declaration string. Following this order, the attribute declaration strings generated in step S1333 are concatenated sequentially without any separators between adjacent strings, ultimately forming a continuous string, namely the inline Cascading Style Sheet attribute declaration string.
[0065] Step S1335: Write the inline cascading style sheet attribute declaration string into the style attribute declaration storage area of the inline style block container, and write the node text content of the current structured node unit into the text content storage area of the inline style block container to complete the construction of the inline style block container corresponding to the current structured node unit.
[0066] The inline cascading style sheet attribute declaration string generated in step S1334 is stored in the style attribute declaration storage area of the inline style block container object created in step S1331. The node text content is extracted from the current structured node unit, and this node text content string is stored in the text content storage area of the inline style block container object. At this point, the inline style block container object contains complete style attributes and text content, completing its construction.
[0067] Step S134: Concatenate the inline style block container corresponding to the title-level node unit with the text content of the title-level node unit to generate a title-level inline style code block. The title-level inline style code block contains a font size attribute declaration, a font color attribute declaration, and a font weight attribute declaration constructed based on the channel title font parameters and the channel main color code parameters.
[0068] Filter all the heading-level node units with node type identifiers of first-level heading-level node units or second-level heading-level node units from the structured node unit sequence generated in step S132. Obtain the inline style block container object corresponding to each heading-level node unit. Read the node hierarchy depth value of each heading-level node unit, and extract the corresponding heading font size parameter and heading font weight parameter from the channel-exclusive visual style parameters obtained in step S131 according to the node hierarchy depth value. The channel heading font parameter is a composite parameter containing multiple levels. For example, the first-level heading corresponds to the font size parameter A1 and the font weight parameter B1, and the second-level heading corresponds to the font size parameter A2 and the font weight parameter B2. Merge the extracted heading font size parameter with the font size attribute declaration template to generate a heading font size attribute declaration string. Merge the extracted heading font weight parameter with the font weight attribute declaration template to generate a heading font weight attribute declaration string. Extract the channel main color code parameter from the channel-exclusive visual style parameters, and merge the channel main color code parameter with the font color attribute declaration template to generate a heading font color attribute declaration string. Combine the heading font size attribute declaration string, the heading font weight attribute declaration string, and the heading font color attribute declaration string according to the standard syntax of cascading style sheet attribute declarations to form a heading-level inline style attribute string. Use this heading-level inline style attribute string as the value of the style attribute and wrap it in the start tag of the hypertext markup language heading tag to form a tag structure such as <h1 style="heading-level inline style attribute string">, and embed the text content of the heading-level node unit between the start tag and the corresponding end tag to generate a complete heading-level inline style code block.
[0069] Step S135: Concatenate the inline style block container corresponding to the paragraph node unit with the text content of the paragraph node unit to generate a paragraph-level inline style code block, and the paragraph-level inline style code block contains a font size attribute declaration and a line height attribute declaration constructed based on the channel body text font parameters.
[0070] Filter all paragraph node units with the node type identifier being paragraph node units from the structured node unit sequence generated in step S132. Obtain the inline style block container object corresponding to each paragraph node unit. Extract the channel body text font parameters from the channel-specific visual style parameters obtained in step S131. The channel body text font parameters include the font size parameter C and the line height ratio parameter D. Merge the font size parameter C with the font size attribute declaration template to generate the font size attribute declaration string for the paragraph. Merge the line height ratio parameter D with the line height attribute declaration template to generate the line height attribute declaration string for the paragraph. Combine the font size attribute declaration string for the paragraph and the line height attribute declaration string for the paragraph according to the standard syntax of the Cascading Style Sheets attribute declaration to form the paragraph-level inline style attribute string. Use the paragraph-level inline style attribute string as the value of the style attribute and wrap it in the start tag of the Hypertext Markup Language paragraph tag to form a tag structure such as , and embed the text content of the paragraph node unit between the start tag and the corresponding end tag to generate a complete paragraph-level inline style code block.
[0071] Step S136: Concatenate the inline style block container corresponding to the list node unit with the list item content of the list node unit to generate a list-level inline style code block, and the list-level inline style code block includes a list marker color attribute declaration constructed based on the channel secondary color code parameter and a list item font attribute declaration constructed based on the channel body text font parameters.
[0072] Filter all list node units with node type identifiers of unordered list node units or ordered list node units from the structured node unit sequence generated in step S132. Obtain the inline style block container object corresponding to each list node unit. Extract the channel secondary color code parameter and the channel main text font parameter from the channel-specific visual style parameters obtained in step S131. Merge the channel secondary color code parameter with the list marker color attribute declaration template to generate a list marker color attribute declaration string. Merge the font size parameter C in the channel main text font parameter with the font size attribute declaration template to generate a list item font size attribute declaration string. Merge the line height ratio parameter D in the channel main text font parameter with the line height attribute declaration template to generate a list item line height attribute declaration string. Combine the list marker color attribute declaration string, the list item font size attribute declaration string, and the list item line height attribute declaration string according to the standard syntax of Cascading Style Sheets attribute declarations to form a list-level inline style attribute string. Wrap the list-level inline style attribute string as the value of the style attribute in the start tag of the Hypertext Markup Language list tag to form a tag structure such as or . For unordered list node units, wrap each list item text content of the list node unit between the list item tags and and embed The label is internal. For ordered list node units, the text content of each list item in the list node unit, along with its preserved sequential numbering information, is wrapped in a list item label. and Between, and embedded Inside the tag pair, generate a complete list-level inline style code block.
[0073] Step S137: Concatenate the inline style block container corresponding to the reference block node unit with the reference text content of the reference block node unit to generate a reference-level inline style code block. The reference-level inline style code block contains a background color attribute declaration constructed based on the channel reference block background color parameter, a border attribute declaration constructed based on the channel border style parameter, and a text color attribute declaration constructed based on the channel secondary color code parameter.
[0074] Filter all reference block node units with a node type identifier of reference block node unit from the structured node unit sequence generated in step S132. Obtain the inline style block container object corresponding to each reference block node unit. Extract the channel reference block background color parameter, the channel border style parameter, and the channel secondary color code parameter from the channel-specific visual style parameters obtained in step S131. Merge the channel reference block background color parameter with the background color attribute declaration template to generate a reference block background color attribute declaration string. Merge the channel border style parameter with the border attribute declaration template to generate a reference block border attribute declaration string. Merge the channel secondary color code parameter with the font color attribute declaration template to generate a reference block text color attribute declaration string. Combine the reference block background color attribute declaration string, the reference block border attribute declaration string, and the reference block text color attribute declaration string according to the standard syntax of the Cascading Style Sheets attribute declaration to form a reference-level inline style attribute string. Use this reference-level inline style attribute string as the value of the style attribute and wrap it in the start tag of the Hypertext Markup Language reference block tag to form a tag structure such as <blockquote style="reference-level inline style attribute string">, and embed the reference text content of the reference block node unit between this start tag and the corresponding end tag to generate a complete reference-level inline style code block.
[0075] Step S138: Obtain the title-level inline style code block, the paragraph-level inline style code block, the list-level inline style code block, and the reference-level inline style code block, arrange them in the order of the original structured node units in the standard academic structure markup language text, and insert a preset blank line spacing control code block between adjacent different types of inline style code blocks. Merge all the arranged inline style code blocks into a graphic and text Hypertext Markup Language body, and each text unit in the graphic and text Hypertext Markup Language body carries an inline Cascading Style Sheets code generated based on the channel-specific visual style parameters.
[0076] Step S1381: Establish a code block arrangement queue. According to the order of appearance of the structured node units in the structured node unit sequence, extract the corresponding inline style code blocks from the inline style block container corresponding to each structured node unit in sequence, and push the extracted inline style code blocks into the code block arrangement queue in the extraction order.
[0077] Create a first-in, first-out (FIFO) queue data structure as the code block arrangement queue. Iterate through the sequence of structured node units generated in step S1328, processing each structured node unit sequentially according to its order. For the currently processed structured node unit, extract the already generated complete inline style code block from the corresponding inline style block container constructed in step S1335. Add this inline style code block as an element to the end of the code block arrangement queue.
[0078] Step S1382: Traverse the inline style code blocks in the code block arrangement queue. For the currently traversed inline style code block, obtain the node type identifier of its previous adjacent inline style code block and the node type identifier of the current inline style code block. When the node type identifier of the previous adjacent inline style code block is different from the node type identifier of the current inline style code block, generate a blank line spacing control code block. The blank line spacing control code block contains a top margin attribute declaration string and a bottom margin attribute declaration string. Insert the blank line spacing control code block between the previous adjacent inline style code block and the current inline style code block.
[0079] The process begins traversing the code block queue starting from the second element, i.e., the element at index 1. For the currently traversed inline style code block, the node type identifier of its preceding adjacent inline style code block (index position minus 1) is obtained. The node type identifier of the preceding adjacent inline style code block is compared with the node type identifier of the current inline style code block. If they are different, a blank line spacing control code block is generated. The blank line spacing control code block is generated as follows: a Hypertext Markup Language (HTML) div element is created, and an inline style attribute is added to this div element. This inline style attribute includes top margin attribute declaration strings and bottom margin attribute declaration strings. The values of the top margin attribute declaration strings and bottom margin attribute declaration strings are obtained from preset spacing parameters. The generated blank line spacing control code block is inserted between the preceding adjacent inline style code block and the current inline style code block. That is, in the code block queue, the blank line spacing control code block is placed after the preceding adjacent inline style code block and before the current inline style code block.
[0080] Step S1383: After completing the traversal of all inline style code blocks and the insertion of blank line spacing control code blocks, all inline style code blocks and blank line spacing control code blocks currently contained in the code block arrangement queue are taken out in the order of the queue. All the taken-out code blocks are concatenated in the order of taking out to generate the graphic text markup language body. Each text unit in the graphic text markup language body carries inline cascading style sheet code generated based on the channel-specific visual style parameters.
[0081] After traversal, the code block queue contains the original inline style code blocks and the newly inserted blank line spacing control code blocks. Starting from the head of the code block queue, each code block is popped sequentially. The string representations of each popped code block are concatenated in the popped order to form a complete Hypertext Markup Language (HTML) string. This string is the HTML text.
[0082] Step S140: Obtain the image and text message publishing interface parameter set of the target self-media platform. The image and text message publishing interface parameter set includes a cover image material identifier, a body image material identifier, and an image and text message metadata field group. Perform a cloud material library matching operation based on the cover image material identifier and the body image material identifier to obtain the cover material address corresponding to the cover image material identifier and the body material address corresponding to the body image material identifier. Combine the image and text hypertext markup language body with the cover material address, the body material address, and the image and text message metadata field group to obtain the image and text message publishing data structure.
[0083] This step aims to obtain the interface parameters required for publishing, match material addresses from the cloud material library, and combine all content into a data structure that conforms to the interface specifications of the target self-media platform.
[0084] Step S141: Send a material list retrieval request to the material management interface of the target self-media platform, and receive the material list data set returned by the material management interface. The material list data set contains multiple material entries, and each material entry corresponds to a material identifier and a material access address.
[0085] Construct a Hypertext Transfer Protocol (HTTP) GET request, with the target Uniform Resource Locator (URL) set to the target self-media platform's content management interface address. Send this request to the target self-media platform's server. Upon the server's response, receive the returned response data packet. The body of this response data packet is a collection of content lists. The content list data collection is a structured data object, typically encoded in JavaScript object notation, containing an array where each element corresponds to a content entry. Each content entry contains multiple key-value pairs, including at least one content identifier field and one content access address field.
[0086] Step S142: Traverse the material entries in the material list data set, perform string matching between the material identifier of each material entry and the cover image material identifier, and extract the material access address of the material entry as the cover material address when the material identifier of the material entry matches the cover image material identifier.
[0087] Obtain the cover image material identifier from step S140, which is a string. Iterate through the array of material entries in the material list data set received in step S141. For each material entry in the array, extract the value of its material identifier field and perform a string equality comparison with the cover image material identifier. When the comparison result is equal, extract the value of the material access address field from that material entry and assign this value to the cover material address variable.
[0088] Step S143: Continue to traverse the material entries in the material list data set, and perform string matching between the material identifier of each material entry and the text image material identifier. When the material identifier of the material entry matches the text image material identifier, extract the material access address of the material entry as the text material address.
[0089] After matching the cover image's address, continue iterating through the array of image entries in the image list dataset, or start iterating from the beginning. Obtain the text image image identifier from step S140; this identifier is a string. For each image entry in the array, extract the value of its image identifier field and perform a string equality comparison with the text image image identifier. If the comparison result is equal, extract the value of the image access address field from that image entry and assign this value to the text image address variable.
[0090] Step S144: Obtain the graphic message metadata field group in the graphic message publishing interface parameter set. The graphic message metadata field group includes an author field, an abstract field, an original claim field, and a comment switch field, and assign the author field, the abstract field, the original claim field, and the comment switch field to their corresponding preset default values respectively.
[0091] From the graphic message publishing interface parameter set obtained in step S140, extract the graphic message metadata field group. The graphic message metadata field group is a composite object containing multiple fields, including an author field, an abstract field, an original claim field, and a comment switch field. Read the default value string of the author field from a preset configuration file and assign this string to the author field. Extract the title string from the literature title field obtained in step S110 and assign this string as the content of the abstract field to the abstract field. Read the default boolean value or enumeration value of the original claim field from a preset configuration file and assign this value to the original claim field. Read the default boolean value of the comment switch field from a preset configuration file and assign this value to the comment switch field.
[0092] Step S145: Parse the image references in the graphic HTML body, extract all the image reference placeholders in the graphic HTML body, and sequentially replace the corresponding image reference placeholders with the body material address according to the appearance order of the image reference placeholders, to obtain the graphic HTML body after image reference replacement.
[0093] Take the graphic HTML body generated in step S138 as a string and scan this string. Use a regular expression to match the image reference placeholder pattern, such as placeholder strings in specific formats like "{{IMAGE_PLACEHOLDER_number}}" or "<imgdata-src="placeholder identifier">". Extract all the matched image reference placeholder strings in the order they appear in the original text to form an image reference placeholder list. Obtain the body material address obtained in step S143. The body material address may contain one or more material access addresses to form a body material address list. According to the appearance order of the image reference placeholders, sequentially replace the Nth placeholder in the image reference placeholder list with the Nth material access address in the body material address list. The replacement operation is completed through a string replacement function, replacing the placeholder string with a standard HTML image tag, such as <imgsrc="material access address"alt="image description">. After all replacements are completed, obtain a new HTML string, that is, the graphic HTML body after image reference replacement.
[0094] Step S146: Assign the cover material address to the cover address parameter of the image and text message publishing interface; assign the image and text hypertext markup language body text after image reference replacement to the body text content parameter of the image and text message publishing interface; assign the assigned author field to the author parameter of the image and text message publishing interface; assign the assigned summary field to the summary parameter of the image and text message publishing interface; assign the assigned original declaration field to the original declaration parameter of the image and text message publishing interface; and assign the assigned comment switch field to the comment switch parameter of the image and text message publishing interface.
[0095] The target self-media platform's image and text message publishing interface defines a set of fixed parameter names, including cover image address parameter, body content parameter, author parameter, summary parameter, originality declaration parameter, and comment switch parameter. The cover image address obtained in step S142 is assigned to the cover image address parameter. The image and text hypertext markup language body text obtained in step S145 after image reference replacement is assigned to the body content parameter. The value of the author field obtained in step S144 is assigned to the author parameter. The value of the summary field obtained in step S144 is assigned to the summary parameter. The value of the originality declaration field obtained in step S144 is assigned to the originality declaration parameter. The value of the comment switch field obtained in step S144 is assigned to the comment switch parameter.
[0096] Step S147: Construct a key-value pair mapping structure based on the cover address parameter, body content parameter, author parameter, abstract parameter, originality declaration parameter, and comment switch parameter of the image and text message publishing interface, and use the key-value pair mapping structure as the image and text message publishing data structure.
[0097] Create a key-value pair mapping structure, which is a data container capable of storing key-value pairs. Insert the cover address parameter and its value, assigned in step S146, as a key-value pair into this structure. Insert the body content parameter and its value as a key-value pair into this structure. Insert the author parameter and its value as a key-value pair into this structure. Insert the abstract parameter and its value as a key-value pair into this structure. Insert the originality declaration parameter and its value as a key-value pair into this structure. Insert the comment switch parameter and its value as a key-value pair into this structure. After completing all insertion operations, this key-value pair mapping structure becomes the image and text message publishing data structure.
[0098] Step S150: Call the image and text message publishing interface of the target self-media platform, submit the image and text message publishing data structure to the image and text message publishing interface, obtain the image and text message draft generation status information, and write the image and text message draft generation status information back to the status field of the corresponding original document information entry in the multidimensional table.
[0099] This step aims to call the target self-media platform's API, submit the published data, and update the corresponding original literature information entries in the multidimensional table with the status information returned by the API.
[0100] Step S151: Obtain the Uniform Resource Locator (URL) address of the image and text message publishing interface of the target self-media platform, and send a Hypertext Transfer Protocol (HTTP) request to the URL address. The request body of the HTTP request includes the image and text message publishing data structure.
[0101] Read the Uniform Resource Locator (URL) address string of the target self-media platform's text and image message publishing interface from the preset configuration file. Construct a Hypertext Transfer Protocol (HTTP) POST request, setting the URL as the target address of the request. Serialize the text and image message publishing data structure constructed in step S147, typically converting it to a string in JavaScript object notation, and use this string as the request body. Set the content type field to application / json in the request header. Send the request to the target server via a Transmission Control Protocol (TCP) connection.
[0102] Step S152: Receive the response data packet returned by the image and text message publishing interface, parse the status code field of the response data packet, and when the value of the status code field indicates that the request is successful, extract the image and text message draft identifier and the image and text message draft access link from the response data packet.
[0103] After receiving the request, the server returns a Hypertext Transfer Protocol (HTTP) response data packet. Upon receiving this response data packet, the server first parses the status code field in the response status line. A status code value of 200 or 201, indicating success, signifies that the request was processed successfully. The server then continues parsing the body of the response data packet, which is typically structured data in JavaScript object notation format. From this structured data, based on the field names defined in the API documentation, the server extracts the values of the "Draft Message Identifier" field and the "Draft Message Access Link" field.
[0104] Step S153: Combine the image and text message draft identifier and the image and text message draft access link into image and text message draft generation status information, which includes a draft identifier subfield and a draft access link subfield.
[0105] Create a status information object containing two subfields. Assign the value of the image / text message draft identifier extracted in step S152 to the draft identifier subfield. Assign the value of the image / text message draft access link extracted in step S152 to the draft access link subfield. This status information object represents the image / text message draft generation status information.
[0106] Step S154: Based on the row index position of the original document information entry in the multidimensional table, locate the data row where the original document information entry is located, and write the image and text message draft generation status information into the status field of the data row.
[0107] Obtain the row index position of the original document information entry read in step S110 within the multidimensional table. This row index position is a unique numerical or key-value pair that identifies the data in that row. Using this row index position, locate the corresponding data row object in the data storage area of the multidimensional table. Within this data row object, find the position of the status field. Serialize the status information generated from the draft graphic message in step S153, typically converting it to a string in JavaScript object notation format, and write this string into the status field.
[0108] Step S155: After the status field of the data row is written, read all data rows in the multidimensional table whose status fields contain the status information of the image and text message draft generation. Extract the literature title field and image and text message draft access link field corresponding to the read data rows to generate a list of literature to be reviewed.
[0109] Perform a query in the multidimensional table, with the query criteria being that the value of the status field is not empty and conforms to the data structure of the image and text message draft generation status information. Retrieve all data rows that meet the criteria. Iterate through these data rows, and for each row, extract the value of the document title field and the value of the image and text message draft access link subfield in the status field. Add the extracted document title and image and text message draft access link of each row as an entry to the list of documents awaiting review.
[0110] Step S156: Send the list of documents to be reviewed to the preset reviewer's communication address to trigger the reviewer's final confirmation operation on the draft text and image message.
[0111] The reviewer's contact address is read from a preset configuration file. This address can be an email address or a user identifier for an instant messaging tool. The list of documents to be reviewed generated in step S155 is formatted into a readable text message, for example, listing each entry in lines as "Title: Document Title Value, Link: Draft Access Link Value". This text message is sent as the message body to the reviewer's contact address via Simple Mail Transfer Protocol or the application programming interface provided by the instant messaging tool.
[0112] Step S210: Parse the interlayer boundary positions of the background information layer, method information layer, result information layer, and conclusion information layer in the standardized academic structure markup language text, extract the end label position of the background information layer and the start label position of the method information layer, and insert a first interlayer transition inline style block container between the end label position of the background information layer and the start label position of the method information layer. The first interlayer transition inline style block container contains a set of separator color attribute declarations and separator thickness attribute declarations constructed based on the channel primary color code parameters in the channel-specific visual style parameters, as well as a set of transition area background gradient color attribute declarations constructed based on the channel secondary color code parameters.
[0113] Traverse the standardized academic structure markup language text generated in step S127, and locate the end tag position of the background information layer markup language tag, i.e., "< / background_layer> "The end index of the string. The method for locating the starting tag position of an Information Layer Markup Language tag, i.e...."<method_layer> The starting index of the string. Insert a first-level transition inline style block container within the position interval after the end tag and before the start tag. This first-level transition inline style block container is a Hypertext Markup Language (HTML) div element. Extract the channel primary color code parameter from the channel-specific visual style parameters obtained in step S131, and merge this parameter with the color attribute declaration of the horizontal separator line to generate a separator line color attribute declaration string. Extract the separator line thickness parameter from the preset style parameters to generate a separator line thickness attribute declaration string. Extract the channel secondary color code parameter from the channel-specific visual style parameters, and combine this parameter with one or more gradient direction and gradient color stop point parameters to generate a set of background gradient color attribute declarations for the transition area. This set contains multiple background-image attribute declarations or background attribute declarations to achieve gradient effects from top to bottom, from left to right, or radially. Write the separator line color attribute declaration string, the separator line thickness attribute declaration string, and the set of background gradient color attribute declarations for the transition area as inline style properties into the div element.
[0114] Step S220: Parse the interlayer boundary positions of the method information layer, result information layer, and conclusion information layer in the standardized academic structure markup language text, extract the end label position of the method information layer and the start label position of the result information layer, and insert a second interlayer transition inline style block container between the end label position of the method information layer and the start label position of the result information layer. The second interlayer transition inline style block container contains a decorative subscript symbol inline style block constructed based on the channel primary color code parameter and the channel secondary color code parameter in the channel-specific visual style parameters, as well as a citation text block referencing the current document title field. The position attribute declaration of the decorative subscript symbol inline style block is generated based on the position offset parameter in the channel border style parameters.
[0115] The end tag of the location method information layer< / method_layer> "The starting label of the position and result information layer"<result_layer> At the position of "", a second-level inter-level transition inline style block container is inserted between the two. This second-level inter-level transition inline style block container is a Hypertext Markup Language (HTML) div element, which contains a decorative superscript inline style block and a quotation text block. The decorative superscript inline style block is an HTML span element, whose inline style properties include a background color attribute declaration based on the channel primary color code parameter, a text color attribute declaration based on the channel secondary color code parameter, and a position attribute declaration, top attribute declaration, left attribute declaration, or right attribute declaration generated based on the position offset parameter in the channel border style parameter, used to position the superscript symbol at the specified position. The quotation text block is an HTML p element or span element, whose text content is the value of the document title field obtained in step S110, and whose inline style properties include a font color attribute declaration based on the channel primary color code parameter and a font size attribute declaration based on the channel body text font parameter.
[0116] Step S230: Parse the boundary positions between the result information layer and the conclusion information layer in the standardized academic structure markup language text, extract the end label position of the result information layer and the start label position of the conclusion information layer, and insert a third inter-layer transition inline style block container between the end label position of the result information layer and the start label position of the conclusion information layer. The third inter-layer transition inline style block container includes a summary introduction background color attribute declaration constructed based on the channel reference block background color parameter in the channel-specific visual style parameters, a summary introduction font attribute declaration constructed based on the channel body text font parameter, and a research background description statement extracted from the background information layer of the standardized academic structure markup language text as the summary introduction text content.
[0117] The end label of the location result information layer< / result_layer> "The starting label of the position and conclusion information layer"<conclusion_layer> At the position of "", a third-level inter-layer transition inline style block container is inserted between the two. This third-level inter-layer transition inline style block container is a Hypertext Markup Language (HTML) div element. The channel reference block background color parameter is extracted from the channel-specific visual style parameters to generate a summary introduction background color attribute declaration, which is used as the background color of this div element. The channel body text font parameter is extracted from the channel-specific visual style parameters to generate a summary introduction font attribute declaration, which is used as the font style of this div element. The research background description statement is extracted from the background information layer summary text output in step S123, and this statement is used as the summary introduction text content and embedded inside this div element. The inline style properties of this div element also include a border attribute declaration built based on the channel border style parameters and a text color attribute declaration built based on the channel secondary color code parameters.
[0118] Step S240: Parse the end tag position of the conclusion information layer in the standardized academic structure markup language text, and insert an end-of-text aggregated inline style block container after the end tag position of the conclusion information layer. The end-of-text aggregated inline style block container includes a first aggregated sub-container, a second aggregated sub-container, and a third aggregated sub-container. The first aggregated sub-container is used to hold the list of references extracted from the full-text data of the document. The second aggregated sub-container is used to hold the medical disclaimer text block matched and obtained from the channel disclaimer library based on the channel identifier field to be published. The third aggregated sub-container is used to hold the original source identifier and the unique identifier of the document digital object obtained by parsing the source file link field of the document.
[0119] The end label of the location conclusion information layer< / conclusion_layer> At the position of the closing tag, insert an inline style block container for the end-of-text aggregation. The end-of-text aggregation inline style block container is a Hypertext Markup Language (HTML) div element containing three parallel sub-containers. The first aggregation sub-container is an HTML div element used to hold the list of references from the full-text data obtained in step S121, presented according to its original numbering and format. The second aggregation sub-container is an HTML div element used to hold the medical disclaimer text block. This medical disclaimer text block is obtained by using the channel identifier field to be published as the key, within a pre-... The system performs a matching search within a pre-defined channel disclaimer library. This library stores disclaimer text strings corresponding to different channel identifiers. Upon successful matching, the corresponding disclaimer text is returned. The third aggregate sub-container is a Hypertext Markup Language (HTML) div element used to contain the original source identifier and the unique digital object identifier (DOI) of the document. The original source identifier is obtained by parsing the document title information or the document source file link field from the full-text data obtained in step S121. The unique digital object identifier is obtained by parsing the metadata in the full-text data or by matching the unique digital object identifier string in the document text using regular expressions.
[0120] Step S250: After completing the insertion operations of the first inter-level transition inline style block container, the second inter-level transition inline style block container, the third inter-level transition inline style block container, and the end-of-text aggregation inline style block container, the heading-level inline style code block, the paragraph-level inline style code block, the list-level inline style code block, the citation-level inline style code block, and the inserted first inter-level transition inline style block container, the second inter-level transition inline style block container, the third inter-level transition inline style block container, and the end-of-text aggregation inline style block container are arranged according to the original structured node unit order and insertion position in the standardized academic structure markup language text. A preset blank line spacing control code block is inserted between adjacent code blocks of different types. All the arranged code blocks are merged into the text-image hypertext markup language body text.
[0121] The heading-level inline style code blocks, paragraph-level inline style code blocks, list-level inline style code blocks, and citation-level inline style code blocks generated in steps S134 to S137, along with the first-level transition inline style block containers, second-level transition inline style block containers, third-level transition inline style block containers, and end-of-text aggregation inline style block containers generated in steps S210, S220, S230, and S240, are arranged according to their original positional order in the Standardized Academic Markup Language (SAL) text. After arrangement, blank line spacing control code blocks are inserted between adjacent code blocks of different types, following the method described in steps S1381 to S1383. All code blocks are then concatenated according to the arrangement order to generate the graphic hypertext markup language body text.
[0122] For example, in step S310: the pre-trained visual style transfer model is invoked to perform channel-specific visual enhancement operations on the text of the graphic hypertext markup language. The visual style transfer model includes a channel style encoder, a content feature encoder, and a style transfer decoder. The channel identifier field to be published is input into the channel style encoder to obtain a channel style feature tensor, and the text of the graphic hypertext markup language is input into the content feature encoder to obtain a content layout feature tensor.
[0123] The visual style transfer model is a pre-trained deep neural network model with an architecture comprising three sub-networks. The channel style encoder, consisting of multiple stacked convolutional and fully connected layers, maps the channel identifier field to be published to a high-dimensional channel style feature tensor. The string of the channel identifier field obtained in step S110 is embedded and encoded into a vector, which is then input into the channel style encoder. After multiple non-linear transformations, it outputs a channel style feature tensor with dimensions M multiplied by N, where M represents the number of channels for the style features and N represents the feature dimension of each channel. The content feature encoder is a convolutional neural network-based encoder. Its input is a rendered image of the Hypertext Markup Language (HText Markup Language) text or a structured layout representation. The output is a content layout feature tensor with dimensions P multiplied by Q, where P represents the number of channels for the layout features and Q represents the feature dimension of the spatial location. The text in the Hypertext Markup Language (HText Markup Language) is first rendered as a layout image, or parsed as a structured layout graph containing node types, node positions, and node sizes. It is then input into a content feature encoder, which processes the text through multiple convolutional and pooling layers to extract a high-level content layout feature tensor.
[0124] Step S320: Input the channel style feature tensor and the content layout feature tensor into the style transfer decoder. The style transfer decoder performs a multi-scale feature fusion operation on the channel style feature tensor and the content layout feature tensor to generate a set of transferred visual style parameters that includes channel-specific color distribution features, channel-specific font hierarchy features, and channel-specific spacing rhythm features.
[0125] The style transfer decoder is an architecture based on a deconvolutional neural network or a generative adversarial network (GAN), taking channel style feature tensors and content layout feature tensors as inputs. The style transfer decoder first uses a feature fusion module to concatenate the channel style feature tensors and the content layout feature tensors along the channel dimension or performs weighted fusion using an attention mechanism, resulting in a fused feature tensor. Then, the style transfer decoder progressively restores the fused feature tensor to the same spatial size as the input layout image through multiple upsampling and deconvolutional layers. During the decoding process, the style transfer decoder generates different visual style parameters through multiple output heads. The first output head generates channel-specific color distribution features, which is a multi-dimensional array storing the color value of each pixel position or each layout region in the image. The second output head generates channel-specific font hierarchy features, which is a vector containing multiple levels, each level corresponding to parameters such as font size, font weight, and line height for different text elements such as titles, subtitles, and body text. The third output header generates channel-specific spacing rhythm features, which are vectors storing spacing parameters such as top, bottom, left, and right margins between different layout elements. The style transfer decoder outputs a set of these three features as the set of transferred visual style parameters.
[0126] Step S330: Based on the channel-specific color distribution features in the migrated visual style parameter set, traverse all inline style block containers in the text of the graphic hypertext markup language, and replace the background color attribute declaration and text color attribute declaration in each inline style block container with the color code value corresponding to the channel-specific color distribution features.
[0127] Extract channel-specific color distribution features from the migrated visual style parameter set. This includes a color mapping table that maps different layout areas or node types to specific color code values. Iterate through all inline style block container objects constructed in step S133. For each inline style block container, based on its corresponding node type or its position in the layout, look up the corresponding background color code value and text color code value in the color mapping table. Replace the background color attribute declaration value in the style attribute declaration storage area of the inline style block container with the found background color code value, and replace the text color attribute declaration value with the found text color code value.
[0128] Step S340: Based on the channel-specific font hierarchy features in the migrated visual style parameter set, traverse all heading-level inline style code blocks and paragraph-level inline style code blocks in the text of the graphic hypertext markup language, replace the font size attribute declaration and weight attribute declaration in each heading-level inline style code block with the heading-level font parameters corresponding to the channel-specific font hierarchy features, and replace the font size attribute declaration and line height attribute declaration in each paragraph-level inline style code block with the body text font parameters corresponding to the channel-specific font hierarchy features.
[0129] Extract channel-specific font hierarchy features from the migrated visual style parameter set. This includes a font parameter mapping table that maps heading levels to corresponding font size and weight parameters, and body text types to corresponding font size and line height parameters. Iterate through all heading-level inline style code blocks. For each heading-level inline style code block, search the font parameter mapping table for the corresponding font size and weight parameters based on the heading level depth value. Replace the declared values of the font size and weight attributes in the inline style code block with the found parameter values. Similarly, iterate through all paragraph-level inline style code blocks, searching the font parameter mapping table for the corresponding body text font size and line height parameters. Replace the declared values of the font size and line height attributes in the inline style code block with the found parameter values.
[0130] Step S350: Based on the channel-specific spacing prosody features in the migrated visual style parameter set, traverse all adjacent inline style code blocks of different types in the text of the image and text markup language, and replace the top margin attribute declaration string and bottom margin attribute declaration string in each blank line spacing control code block with the spacing value parameter corresponding to the channel-specific spacing prosody features.
[0131] Extract channel-specific spacing prosody features from the migrated visual style parameter set. This includes a spacing parameter mapping table that maps different code block type combinations to corresponding top and bottom margin values. Iterate through all blank line spacing control code blocks generated in step S1382. For each blank line spacing control code block, obtain the node type identifier combination of its preceding and following inline style code blocks, and look up the corresponding top and bottom margin values in the spacing parameter mapping table. Replace the value of the top margin attribute declaration string in the blank line spacing control code block with the found top margin value, and replace the value of the bottom margin attribute declaration string with the found bottom margin value.
[0132] Step S360: After completing the color replacement of all inline style block containers, the font replacement of all heading-level inline style code blocks and paragraph-level inline style code blocks, and the spacing replacement of all line spacing control code blocks, merge all the replaced inline style code blocks and line spacing control code blocks in their original order to generate visually enhanced graphic hypertext markup language body text. The visual style parameters of each text unit in the visually enhanced graphic hypertext markup language body text are dynamically generated by the visual style transfer model based on the channel identifier field to be published.
[0133] All inline style code blocks, inline style block container code blocks, and blank line spacing control code blocks that have been replaced in steps S330, S340, and S350 are rearranged and concatenated according to their original order in the graphic hypertext markup language body to generate a new hypertext markup language string, which is the visually enhanced graphic hypertext markup language body.
[0134] Step S410: Call the pre-trained document content semantic injection model to perform channel-adaptive semantic enhancement operation on the visually enhanced graphic hypertext markup language text. The document content semantic injection model includes a channel semantic feature extraction sub-network, a document core concept extraction sub-network, and a semantic-to-visual mapping sub-network.
[0135] The document content semantic injection model is a pre-trained deep neural network model whose architecture includes three sub-networks. The channel semantic feature extraction sub-network is used to extract semantic features related to the channel, the document core concept extraction sub-network is used to extract core concepts from the document, and the semantic-to-visual mapping sub-network is used to map semantic features to visual style parameters.
[0136] Step S420: Input the channel identifier field to be published into the channel semantic feature extraction subnetwork. The channel semantic feature extraction subnetwork retrieves the corresponding high-frequency term set and core concept vector of the channel from the preset channel term library according to the channel identifier field to be published, and outputs the channel semantic feature vector.
[0137] The channel semantic feature extraction subnetwork comprises a retrieval module and an embedding module. Using the channel identifier field as the key, it searches a pre-built channel terminology database. This database stores a set of high-frequency terms and a core concept vector for each channel identifier. The high-frequency terminology set is a list containing multiple specialized terms, and the core concept vector is a high-dimensional vector representing the channel's core semantic information. The retrieval module returns the high-frequency terminology set and the core concept vector. The embedding module converts each term in the high-frequency terminology set into a word vector using a word embedding model. Then, it performs a weighted average or concatenates all word vectors with the core concept vector to generate a channel semantic feature vector.
[0138] Step S430: Input the standardized academic structure markup language text into the document core concept extraction subnetwork. The document core concept extraction subnetwork performs core concept extraction operations on the background information layer, method information layer, result information layer, and conclusion information layer of the standardized academic structure markup language text. It extracts the research target concept vector from the background information layer, the technical means concept vector from the method information layer, the key data concept vector from the result information layer, and the innovation point concept vector from the conclusion information layer. The research target concept vector, the technical means concept vector, the key data concept vector, and the innovation point concept vector are weighted and fused to obtain the document core concept feature vector.
[0139] The core concept extraction subnetwork is a Transformer-based encoder that takes standardized academic structure markup language text as input. This encoder processes text content at the background information layer, methodological information layer, results information layer, and conclusion information layer. For the background information layer, the encoder focuses on text fragments describing research objectives and research gaps using an attention mechanism, generating a research objective concept vector. For the methodological information layer, the encoder focuses on text fragments describing technical methods and experimental procedures, generating a technical method concept vector. For the results information layer, the encoder focuses on text fragments describing data indicators and statistical results, generating a key data concept vector. For the conclusion information layer, the encoder focuses on text fragments describing innovations and contributions, generating an innovation point concept vector. The research objective concept vector, technical method concept vector, key data concept vector, and innovation point concept vector are input into a weighted fusion module. This module assigns a weight coefficient to each concept vector, the value of which is calculated using a learnable attention network. The four weighted vectors are then concatenated or summed to obtain the core concept feature vector of the literature.
[0140] Step S440: Input the channel semantic feature vector and the document core concept feature vector into the semantic-to-visual mapping sub-network. The semantic-to-visual mapping sub-network performs cross-modal feature alignment operation on the channel semantic feature vector and the document core concept feature vector to generate a semantic enhancement visual parameter set. The semantic enhancement visual parameter set includes keyword highlighting color parameters, key data indicator highlighting background parameters, and core concept citation block border style parameters.
[0141] The semantic-to-visual mapping subnetwork is a multimodal feature fusion network that takes channel semantic feature vectors and document core concept feature vectors as inputs. This subnetwork first uses a cross-modal attention module to calculate the correlation weights between the channel semantic feature vectors and the document core concept feature vectors, generating an aligned fused feature vector. This fused feature vector is then fed into three different output heads. The first output head is a fully connected layer that outputs a color vector as a keyword highlighting color parameter. The second output head is a fully connected layer that outputs a color vector as a key data indicator highlighting background parameter. The third output head is a vector containing multiple parameters, serving as the core concept reference block border style parameters, including border color, border thickness, border type, and corner radius.
[0142] Step S450: Based on the keyword highlighting color parameters in the semantic enhancement visual parameter set, traverse the paragraph-level inline style code blocks in the visually enhanced graphic hypertext markup language body, identify professional terminology entries that match the channel high-frequency terminology set from the text content of each paragraph-level inline style code block, and create a terminology highlighting inline style wrapping layer for each identified professional terminology entry. The terminology highlighting inline style wrapping layer contains a text color attribute declaration and a text weight attribute declaration constructed based on the keyword highlighting color parameters.
[0143] Extract keyword highlighting color parameters from the semantic enhancement visual parameter set. Iterate through all paragraph-level inline style code blocks in the visually enhanced image-text markup language body. For each paragraph-level inline style code block, obtain its text content string. Match this text content string with each term in the channel high-frequency term set obtained in step S420. For each matched term, create a term highlighting inline style wrapping layer, which is a Hypertext Markup Language span element. Extract text color and weight values from the keyword highlighting color parameters, generating text color attribute declarations and text weight attribute declarations as inline style attributes of the span element. Insert the start tag of the span element before the matched term and the end tag after the term to complete the wrapping of the term.
[0144] Step S460: Based on the key data indicator highlighting background parameters in the semantically enhanced visual parameter set, traverse the paragraph-level inline style code blocks and list-level inline style code blocks in the visually enhanced graphic hypertext markup language body, identify the numerical indicator units that match the key data indicator description statements in the key data concept vector from the text content, and create an indicator highlighting inline style wrapping layer for each identified numerical indicator unit. The indicator highlighting inline style wrapping layer includes a background color attribute declaration constructed based on the key data indicator highlighting background parameters and a border rounded corner attribute declaration constructed based on the channel main color code parameters.
[0145] Extract key data indicator highlighting background parameters from the semantically enhanced visual parameter set. Traverse all paragraph-level and list-level inline style code blocks in the visually enhanced text-image hypertext markup language body. For each code block, obtain its text content string. Obtain key data indicator description statements from the key data concept vector extracted in step S430; these description statements contain pattern features of numerical indicators. Identify units in the text content string that conform to the numerical indicator pattern using regular expression matching, such as percentage values, multiple relationships, statistical test values, etc. For each identified numerical indicator unit, create an indicator highlighting inline style wrapping layer, which is a hypertext markup language span element. Extract the background color value from the key data indicator highlighting background parameters and generate a background color attribute declaration. Extract the border rounded corner value from the channel main color code parameters obtained in step S131 and generate a border rounded corner attribute declaration. Use the background color attribute declaration and the border rounded corner attribute declaration as inline style attributes of the span element. Insert the start tag of the span element before the numerical indicator unit and the end tag after the numerical indicator unit to complete the wrapping of the unit.
[0146] Step S470: Based on the core concept citation block border style parameters in the semantically enhanced visual parameter set, traverse the citation-level inline style code blocks in the visually enhanced graphic hypertext markup language text, identify the core conclusion statements that match the innovation point concept vector in the core concept feature vector of the document from the text content of each citation-level inline style code block, and create a core concept enhanced inline style wrapping layer for each identified core conclusion statement. The core concept enhanced inline style wrapping layer includes a border color attribute declaration, a border thickness attribute declaration, and a citation icon inline style declaration constructed based on the core concept citation block border style parameters.
[0147] Extract the border style parameters of the core concept reference block from the semantically enhanced visual parameter set. Traverse all reference-level inline style code blocks in the visually enhanced graphic-text markup language body. For each reference-level inline style code block, obtain its text content string. Obtain the semantic representation of the core conclusion statement from the innovation point concept vector extracted in step S430. By calculating the cosine similarity between the vector representation of each sentence in the text content string and the innovation point concept vector, identify the core conclusion statements whose similarity exceeds a preset threshold. For each identified core conclusion statement, create a core concept enhanced inline style wrapping layer, which is a hypertext markup language div element or blockquote element. Extract the border color value and border thickness value from the core concept reference block border style parameters, and generate border color attribute declaration and border thickness attribute declaration. Obtain the inline style declaration of the reference icon from the preset icon library, which includes background image attribute declaration, background position attribute declaration, and background size attribute declaration. Use the border color attribute declaration, border thickness attribute declaration, and reference icon inline style declaration as the inline style attributes of the wrapping layer element. The wrapping element's start tag is inserted before the core conclusion statement, and its end tag is inserted after the statement, thus completing the wrapping of the statement.
[0148] Step S480: The paragraph-level inline style code blocks wrapped by the terminology highlighting inline style wrapping layer, the paragraph-level inline style code blocks and list-level inline style code blocks wrapped by the indicator highlighting inline style wrapping layer, and the reference-level inline style code blocks wrapped by the core concept enhancement inline style wrapping layer are merged with other inline style code blocks not wrapped in the visually enhanced graphic hypertext markup language body in the original order to generate semantically enhanced graphic hypertext markup language body. In the semantically enhanced graphic hypertext markup language body, professional terms, key data indicators and core conclusion statements that are strongly related to the channel domain all carry differentiated visual styles that are different from ordinary text.
[0149] All inline style code blocks that underwent wrapping in steps S450, S460, and S470 are rearranged and concatenated with other unwrapped inline style code blocks in the visually enhanced HText Markup Language (HML) text, according to their original order of appearance in the text. During concatenation, each wrapped text unit retains its original inline style attributes, while also incorporating additional style attributes from the wrapping layer. After concatenation, a new HML string is generated, which constitutes the semantically enhanced HML text.
[0150] Figure 2 This application illustrates an automated document typesetting and publishing system 100 based on multi-channel topic mapping, comprising a processor 1001 and a memory 1003. The processor 1001 and memory 1003 are connected, for example, via a bus 1002. Optionally, the automated document typesetting and publishing system 100 may further include a transceiver 1004, which can be used for data interaction between this automated document typesetting and publishing system and other automated document typesetting and publishing systems based on multi-channel topic mapping, such as sending and / or receiving data. It should be noted that in actual scheduling, the transceiver 1004 is not limited to one, and the structure of this automated document typesetting and publishing system 100 based on multi-channel topic mapping does not constitute a limitation on the embodiments of this application.
[0151] The memory 1003 is used to store program code for executing the embodiments of this application, and its execution is controlled by the processor 1001. The processor 1001 is used to execute the program code stored in the memory 1003 to implement the steps shown in the foregoing method embodiments.
[0152] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.
Claims
1. A method for automated document typesetting and publishing based on multi-channel topic mapping, characterized in that, The method includes: Retrieve the original literature information entries entered in the multidimensional table. The original literature information entries include a literature title field, a literature source file link field, and a channel identifier field to be published. The full-text extraction operation is triggered based on the link field of the source file of the literature to obtain the full-text data of the literature. The full-text data of the literature is then input into a preset literature in-depth reading and summarization model to obtain standardized academic structure markup language text. The standardized academic structure markup language text includes a background information layer, a method information layer, a result information layer, and a conclusion information layer. The pre-stored channel theme mapping dictionary is called according to the channel identifier field to be published. The channel theme mapping dictionary stores the correspondence between different channel identifiers to be published and channel-specific visual style parameters. Based on the channel-specific visual style parameters, the standardized academic structure markup language text is converted from structure nodes to inline style blocks to obtain the graphic hypertext markup language body text containing channel-specific inline cascading style sheet code. Obtain the set of image and text message publishing interface parameters of the target self-media platform. The set of image and text message publishing interface parameters includes a cover image material identifier, a text image material identifier, and an image and text message metadata field group. Perform a cloud material library matching operation based on the cover image material identifier and the text image material identifier to obtain the cover material address corresponding to the cover image material identifier and the text material address corresponding to the text image material identifier. Combine the image and text hypertext markup language text with the cover material address, the text material address, and the image and text message metadata field group to obtain the image and text message publishing data structure. Call the image and text message publishing interface of the target self-media platform, submit the image and text message publishing data structure to the image and text message publishing interface, obtain the image and text message draft generation status information, and write the image and text message draft generation status information back to the status field of the corresponding original document information entry in the multidimensional table.
2. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 1, characterized in that, The process of triggering full-text extraction based on the source file link field of the document to obtain full-text data is described. This full-text data is then input into a preset in-depth reading and summarization model to obtain standardized academic structure markup language text, including: The document source file storage address pointed to by the document source file link field is parsed, and a full-text retrieval request for the document source file storage address is initiated through the Hypertext Transfer Protocol. The document source file data stream returned by the document source file storage address is received, and the document source file data stream is parsed to obtain the full-text data of the document. The full-text data of the document includes document title information, document author information, document abstract information, document body paragraph set, and document reference list. The document's full-text data is processed by chapter structure identification. Based on the keyword features of the chapter titles, the document's full-text paragraphs are divided into background chapter paragraph groups, method chapter paragraph groups, result chapter paragraph groups, and conclusion chapter paragraph groups. The background chapter paragraph groups, method chapter paragraph groups, result chapter paragraph groups, and conclusion chapter paragraph groups are respectively labeled as background information layer input text, method information layer input text, result information layer input text, and conclusion information layer input text. The background information layer input text is input into the first summarization unit of the literature intensive reading and summarization model. The first summarization unit performs key information extraction and semantic compression operations on the background information layer input text and outputs the background information layer summary text. The background information layer summary text includes research background description statements and research gap description statements. The method information layer input text is input into the second summarization unit of the literature intensive reading and summarization model. The second summarization unit performs research design type identification, research object selection criteria extraction and technical route step decomposition operations on the method information layer input text, and outputs method information layer summary text. The method information layer summary text includes research design type description statements, research object selection criteria description statements and technical route step sequence description statements. The result information layer input text is input into the third summarization unit of the literature in-depth reading and summarization model. The third summarization unit performs data indicator extraction, statistical significance identification and core conclusion extraction of charts and graphs on the result information layer input text and outputs result information layer summary text. The result information layer summary text includes descriptions of main data indicators, descriptions of statistical significance and descriptions of core conclusions of charts and graphs. The conclusion information layer input text is input into the fourth induction unit of the literature intensive reading and summarization model. The fourth induction unit performs research conclusion summary, research limitation analysis and future research direction inference operations on the conclusion information layer input text, and outputs conclusion information layer summary text. The conclusion information layer summary text includes research conclusion summary description statement, research limitation analysis description statement and future research direction inference description statement. The background information layer summary text, the method information layer summary text, the result information layer summary text, and the conclusion information layer summary text are spliced together according to a preset standardized academic structure template to obtain standardized academic structure markup language text. The standardized academic structure markup language text contains a background information layer, a method information layer, a result information layer, and a conclusion information layer, and each information layer is wrapped with a corresponding markup language tag.
3. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 1, characterized in that, The process involves calling a pre-stored channel theme mapping dictionary based on the channel identifier field to be published. This dictionary stores the correspondence between different channel identifiers to be published and channel-specific visual style parameters. Based on these channel-specific visual style parameters, a conversion operation from structure nodes to inline style blocks is performed on the standardized academic markup language text to obtain a graphic hypertext markup language body containing channel-specific inline cascading style sheet code, including: Based on the channel identifier field to be published, a key-value matching search is performed in the channel theme mapping dictionary to obtain the channel-specific visual style parameters corresponding to the channel identifier field to be published. The channel-specific visual style parameters include channel main color code parameters, channel secondary color code parameters, channel title font parameters, channel body text font parameters, channel reference block background color parameters, and channel border style parameters. Lexical parsing is performed on the standardized academic structure markup language text. Based on the hierarchical structure of the markup language tags, the standardized academic structure markup language text is split into multiple structured node units, including heading-level node units, paragraph node units, list node units, and citation block node units. Create a corresponding inline style block container for each structured node unit, extract the corresponding style parameter group from the channel-specific visual style parameters according to the node type of the structured node unit, convert the style parameter group into an inline cascading style sheet attribute declaration string, and write the inline cascading style sheet attribute declaration string into the inline style block container. The inline style block container corresponding to the title-level node unit is concatenated with the text content of the title-level node unit to generate a title-level inline style code block. The title-level inline style code block contains a font size attribute declaration, a font color attribute declaration, and a font weight attribute declaration constructed based on the channel title font parameters and the channel main color code parameters. The inline style block container corresponding to the paragraph node unit is concatenated with the text content of the paragraph node unit to generate a paragraph-level inline style code block. The paragraph-level inline style code block contains a font size attribute declaration and a line height attribute declaration constructed based on the channel body text font parameters. The inline style block container corresponding to the list node unit is concatenated with the list item content of the list node unit to generate a list-level inline style code block. The list-level inline style code block contains a list marker color attribute declaration based on the channel secondary color code parameter and a list item font attribute declaration based on the channel body text font parameter. The inline style block container corresponding to the reference block node unit is concatenated with the reference text content of the reference block node unit to generate a reference-level inline style code block. The reference-level inline style code block includes a background color attribute declaration constructed based on the background color parameter of the channel reference block, a border attribute declaration constructed based on the channel border style parameter, and a text color attribute declaration constructed based on the channel secondary color code parameter. The title-level inline style code block, the paragraph-level inline style code block, the list-level inline style code block, and the citation-level inline style code block are obtained and arranged according to the original structured node unit order in the standardized academic markup language text. A preset blank line spacing control code block is inserted between adjacent inline style code blocks of different types. All the arranged inline style code blocks are merged into the graphic hypertext markup language body text. Each text unit in the graphic hypertext markup language body text carries inline cascading style sheet code generated based on the channel-specific visual style parameters.
4. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 1, characterized in that, The step involves obtaining the image and text message publishing interface parameter set of the target self-media platform. This parameter set includes a cover image material identifier, a text image material identifier, and an image and text message metadata field group. A cloud-based material library matching operation is performed based on the cover image material identifier and the text image material identifier to obtain the cover material address corresponding to the cover image material identifier and the text material address corresponding to the text image material identifier. The image and text hypertext markup language text is then combined with the cover material address, the text material address, and the image and text message metadata field group to obtain an image and text message publishing data structure, including: Send a material list retrieval request to the material management interface of the target self-media platform, and receive the material list data set returned by the material management interface. The material list data set contains multiple material entries, and each material entry corresponds to a material identifier and a material access address. Traverse the material entries in the material list data set, match the material identifier of each material entry with the cover image material identifier, and extract the material access address of the material entry as the cover material address when the material identifier of the material entry matches the cover image material identifier. Continue to traverse the material entries in the material list data set, and perform string matching between the material identifier of each material entry and the text image material identifier. When the material identifier of the material entry matches the text image material identifier, extract the material access address of the material entry as the text material address. Obtain the image and text message metadata field group from the image and text message publishing interface parameter set. The image and text message metadata field group includes an author field, a summary field, an original declaration field, and a comment switch field. Assign the corresponding preset default values to the author field, the summary field, the original declaration field, and the comment switch field respectively. The image reference parsing of the text in the image-text hypertext markup language is performed to extract all image reference placeholders in the text. The text material addresses are then replaced with the corresponding image reference placeholders in the order in which they appear, resulting in the text-text hypertext markup language text after image reference replacement. Assign the cover material address to the cover address parameter of the image and text message publishing interface; assign the image and text hypertext markup language body text after image reference replacement to the body text content parameter of the image and text message publishing interface; assign the assigned author field to the author parameter of the image and text message publishing interface; assign the assigned summary field to the summary parameter of the image and text message publishing interface; assign the assigned original declaration field to the original declaration parameter of the image and text message publishing interface; assign the assigned comment switch field to the comment switch parameter of the image and text message publishing interface. Based on the cover address parameters, body content parameters, author parameters, abstract parameters, originality declaration parameters, and comment switch parameters of the image and text message publishing interface, a key-value pair mapping structure is constructed, and the key-value pair mapping structure is used as the image and text message publishing data structure.
5. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 1, characterized in that, The process of calling the image and text message publishing interface of the target self-media platform, submitting the image and text message publishing data structure to the image and text message publishing interface, obtaining the image and text message draft generation status information, and writing the image and text message draft generation status information back to the status field of the corresponding original document information entry in the multidimensional table includes: Obtain the Uniform Resource Locator (URL) address of the image and text message publishing interface of the target self-media platform, and send a Hypertext Transfer Protocol (HTTP) request to the URL address. The request body of the HTTP request includes the image and text message publishing data structure. Receive the response data packet returned by the image and text message publishing interface, parse the status code field of the response data packet, and when the value of the status code field indicates that the request is successful, extract the image and text message draft identifier and the image and text message draft access link from the response data packet; The image and text message draft identifier and the image and text message draft access link are combined to form image and text message draft generation status information, which includes a draft identifier subfield and a draft access link subfield. Based on the row index position of the original document information entry in the multidimensional table, locate the data row where the original document information entry is located, and write the image and text message draft generation status information into the status field of the data row; After the status field of the data row is written, read all data rows in the multidimensional table whose status fields contain the status information of the image and text message draft generation. Extract the literature title field and image and text message draft access link field corresponding to the read data row to generate a list of literature to be reviewed. The list of documents to be reviewed is sent to the preset reviewer's communication address, triggering the reviewer's final confirmation of the text and image message draft.
6. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 3, characterized in that, The lexical parsing process performed on the standardized academic structure markup language text involves splitting the text into multiple structured node units based on the hierarchical structure of the markup language tags, including: Read the character sequence of the standardized academic structure markup language text, traverse each character in the character sequence from left to right, and when the markup language tag start symbol is encountered, record the position index of the markup language tag start symbol. Continue traversing until the markup language tag end symbol is encountered, and extract the tag name string between the markup language tag start symbol and the markup language tag end symbol. The node type of the current tag is determined based on the tag name string. When the tag name string matches the name of the first-level heading tag, the node corresponding to the current tag is marked as a first-level heading level node unit, and the start and end positions of the first-level heading level node unit are recorded. When the tag name string matches the name of the second-level heading tag, the node corresponding to the current tag is marked as a second-level heading level node unit, and the start and end positions of the second-level heading level node unit are recorded. When the tag name string matches the paragraph tag name, the node corresponding to the current tag is marked as a paragraph node unit, and the start and end positions of the paragraph node unit are recorded. When the tag name string matches the unordered list tag name, the node corresponding to the current tag is marked as an unordered list node unit, the start and end positions of the unordered list node unit are recorded, and the list item sub-tags inside the unordered list node unit are parsed to extract the list item text content corresponding to each list item sub-tag. When the tag name string matches the ordered list tag name, the node corresponding to the current tag is marked as an ordered list node unit, the start and end positions of the ordered list node unit are recorded, the list item sub-tags inside the ordered list node unit are parsed, the list item text content corresponding to each list item sub-tag is extracted, and the sequential numbering information of the list items is retained. When the tag name string matches the reference block tag name, the node corresponding to the current tag is marked as a reference block node unit, and the start and end positions of the reference block node unit are recorded; Based on the start and end positions of all recorded structured node units, all structured node units are sorted in ascending order of start position to generate a structured node unit sequence. Each unit in the structured node unit sequence contains a node type identifier, node text content, and node level depth value.
7. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 6, characterized in that, The step of creating a corresponding inline style block container for each structured node unit, extracting the corresponding style parameter group from the channel-specific visual style parameters according to the node type of the structured node unit, converting the style parameter group into an inline cascading style sheet attribute declaration string, and writing the inline cascading style sheet attribute declaration string into the inline style block container includes: Traverse each structured node unit in the sequence of structured node units, and create an empty inline style block container for the currently traversed structured node unit. The inline style block container contains a style attribute declaration storage area and a text content storage area. Read the node type identifier of the current structured node unit, and perform a matching query in the preset node type and style parameter mapping table according to the node type identifier to obtain the style parameter requirement list corresponding to the node type identifier. The style parameter requirement list includes font size requirement, font color requirement, background color requirement, border style requirement, and margin requirement. Extract the specific style parameter values corresponding to each requirement item in the style parameter requirement list from the channel-specific visual style parameters, and assemble the extracted specific style parameter values according to the syntax format of Cascading Style Sheet attribute declaration to generate font size attribute declaration string, font color attribute declaration string, background color attribute declaration string, border style attribute declaration string and margin attribute declaration string; The font size attribute declaration string, the font color attribute declaration string, the background color attribute declaration string, the border style attribute declaration string, and the margin attribute declaration string are concatenated in a preset declaration order to obtain the inline cascading style sheet attribute declaration string; Write the inline cascading style sheet attribute declaration string into the style attribute declaration storage area of the inline style block container, and write the node text content of the current structured node unit into the text content storage area of the inline style block container, thus completing the construction of the inline style block container corresponding to the current structured node unit.
8. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 3, characterized in that, The process involves obtaining the heading-level inline style code block, the paragraph-level inline style code block, the list-level inline style code block, and the citation-level inline style code block, arranging them according to the original structured node unit order in the standardized academic markup language text, and inserting preset blank line spacing control code blocks between adjacent inline style code blocks of different types. All the arranged inline style code blocks are then merged into the graphic hypertext markup language body text. Each text unit in the graphic hypertext markup language body text carries inline cascading style sheet code generated based on the channel-specific visual style parameters, including: Establish a code block arrangement queue. According to the order of appearance of the structured node units in the structured node unit sequence, extract the corresponding inline style code blocks from the inline style block container corresponding to each structured node unit in turn. Push the extracted inline style code blocks into the code block arrangement queue in turn according to the extraction order. Traverse the inline style code blocks in the code block queue. For the currently traversed inline style code block, obtain the node type identifier of its previous adjacent inline style code block and the node type identifier of the current inline style code block. When the node type identifier of the previous adjacent inline style code block is different from the node type identifier of the current inline style code block, generate a blank line spacing control code block. The blank line spacing control code block contains a top margin attribute declaration string and a bottom margin attribute declaration string. Insert the blank line spacing control code block between the previous adjacent inline style code block and the current inline style code block. After completing the traversal of all inline style code blocks and the insertion of blank line spacing control code blocks, all inline style code blocks and blank line spacing control code blocks currently contained in the code block queue are taken out in the order of the queue. All the taken-out code blocks are then concatenated in the order of their extraction to generate the graphic text markup language body. Each text unit in the graphic text markup language body carries inline cascading style sheet code generated based on the channel-specific visual style parameters.
9. The method for automated document typesetting and publishing based on multi-channel topic mapping according to claim 3, characterized in that, After performing a key-value match search in the channel theme mapping dictionary based on the channel identifier field to be published, and obtaining the channel-specific visual style parameters corresponding to the channel identifier field to be published, the method further includes: The text is analyzed to determine the boundary positions between the background information layer, method information layer, result information layer, and conclusion information layer in the standardized academic structure markup language text. The end label position of the background information layer and the start label position of the method information layer are extracted. A first interlayer transition inline style block container is inserted between the end label position of the background information layer and the start label position of the method information layer. The first interlayer transition inline style block container contains a set of separator line color attribute declarations and separator line thickness attribute declarations constructed based on the channel primary color code parameters in the channel-specific visual style parameters, as well as a set of transition area background gradient color attribute declarations constructed based on the channel secondary color code parameters. The method, result, and conclusion information layers in the standardized academic structure markup language text are analyzed to determine their interlayer boundary positions. The end label position of the method information layer and the start label position of the result information layer are extracted. A second interlayer transition inline style block container is inserted between the end label position of the method information layer and the start label position of the result information layer. The second interlayer transition inline style block container contains a decorative superscript symbol inline style block constructed based on the channel primary color code parameter and the channel secondary color code parameter in the channel-specific visual style parameters, as well as a citation text block referencing the current document title field. The position attribute declaration of the decorative superscript symbol inline style block is generated based on the position offset parameter in the channel border style parameters. The boundary positions between the result information layer and the conclusion information layer in the standardized academic structure markup language text are analyzed. The end label position of the result information layer and the start label position of the conclusion information layer are extracted. A third inter-layer transition inline style block container is inserted between the end label position of the result information layer and the start label position of the conclusion information layer. The third inter-layer transition inline style block container contains a summary introduction background color attribute declaration constructed based on the channel reference block background color parameter in the channel-specific visual style parameters, a summary introduction font attribute declaration constructed based on the channel body text font parameter, and a research background description statement extracted from the background information layer of the standardized academic structure markup language text as the summary introduction text content. The end tag position of the conclusion information layer in the standardized academic structure markup language text is parsed, and an end-of-text aggregated inline style block container is inserted after the end tag position of the conclusion information layer. The end-of-text aggregated inline style block container includes a first aggregated sub-container, a second aggregated sub-container, and a third aggregated sub-container. The first aggregated sub-container is used to hold the list of references extracted from the full-text data of the literature. The second aggregated sub-container is used to hold the medical disclaimer text block matched and obtained from the channel disclaimer library based on the channel identifier field to be published. The third aggregated sub-container is used to hold the original source identifier and the unique identifier of the document digital object obtained by parsing the source file link field of the literature. After inserting the first inter-level transition inline style block container, the second inter-level transition inline style block container, the third inter-level transition inline style block container, and the end-of-text aggregation inline style block container, the heading-level inline style code block, the paragraph-level inline style code block, the list-level inline style code block, the citation-level inline style code block, and the inserted first inter-level transition inline style block container, the second inter-level transition inline style block container, the third inter-level transition inline style block container, and the end-of-text aggregation inline style block container are arranged according to the original structured node unit order and insertion position in the standardized academic structure markup language text. Preset blank line spacing control code blocks are inserted between adjacent code blocks of different types. All the arranged code blocks are then merged into the text-image hypertext markup language body text.
10. A document automated typesetting and publishing system based on multi-channel topic mapping, characterized in that, The method includes a processor and a computer-readable storage medium storing machine-executable instructions that, when executed by the processor, implement the document automated typesetting and publishing method based on multi-channel topic mapping as described in any one of claims 1-9.