Online webpage generation method and device based on document processing

Through the online web page generation method based on document processing, using deep learning models and template recommendation engines to automatically parse and generate web pages, the problems of low efficiency and high threshold in the existing technology are solved, and non-technical personnel can quickly produce professional web pages ability.

CN119003906APending Publication Date: 2024-11-22小芒电子商务有限责任公司
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202411009163.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing static web page generation method requires professional front-end developers to manually write HTML, CSS and JavaScript code, resulting in high technical requirements and low efficiency, making it difficult to reduce the threshold and cost of web page development.

Method used

Adopt the online web page generation method based on document processing, and use pre-trained document analysis deep learning models and web template recommendation engine to automatically analyze document content, recommend the best web templates, and perform layout analysis and adjustments to generate target web pages, lower development thresholds and labor costs.

Benefits of technology

It has enabled non-technical personnel to quickly produce professional web pages, lower the threshold and labor costs of web page development, improve the efficiency of web page generation, and simplify the web page production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003906A_ABST
    Figure CN119003906A_ABST
Patent Text Reader

Abstract

The invention discloses an online webpage generation method and device based on document processing, and the method comprises the steps: obtaining a to-be-converted document, carrying out the analysis of the to-be-converted document through a pre-trained document analysis deep learning model, obtaining key information, converting the key information, obtaining document content features, and carrying out the analysis of the to-be-converted document. A target webpage template is obtained through a pre-trained webpage template recommendation engine and document content features, the target webpage template is an optimal webpage template with the highest similarity score between the document content features and template features, the target webpage template is correspondingly filled with document content data in the key information, a corresponding initial webpage is generated, and the initial webpage is stored in a database; performing layout analysis on the initial webpage through a preset layout analysis mode to obtain an optimal layout scheme, the preset layout analysis mode being a mode of analyzing the features of the visual elements and the spatial relationship of the visual elements, and dynamically adjusting the initial webpage according to the optimal layout scheme to obtain a target webpage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software development, and more specifically, to an online web page generation method and device based on document processing. Background Art

[0002] The current method of generating static web pages on the market requires professional front-end developers to use World Wide Web (Web) front-end languages ​​such as Hyper Text Markup Language (HTML), Cascading Style Sheets (CSS) and JavaScript (JS) codes to manually write web page codes and build and layout web page content and styles.

[0003] The web page content and style are built and laid out by manually writing web page codes using a web front-end language. This method requires high technical skills from developers and will result in low efficiency in web page development.

[0004] Therefore, how to improve the efficiency of web page development is a problem that needs to be solved urgently in this application. Summary of the invention

[0005] In view of this, the present application discloses an online web page generation method and device based on document processing, aiming to reduce the threshold of web page development, the difficulty of web page production and the labor cost, and improve the efficiency of web page generation.

[0006] In order to achieve the above purpose, the disclosed technical solution is as follows:

[0007] The first aspect of the present application discloses an online webpage generation method based on document processing, the method comprising:

[0008] Get the document to be converted;

[0009] Parsing the document to be converted by using a pre-trained document parsing deep learning model to obtain key information;

[0010] Transforming the key information to obtain document content features;

[0011] Obtaining a target web page template through a pre-trained web page template recommendation engine and the document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features;

[0012] Fill the document content data in the key information into the target web page template accordingly, and generate a corresponding initial web page;

[0013] Performing layout analysis on the initial webpage by a preset layout analysis method to obtain an optimal layout solution; the preset layout analysis method is a method for analyzing the characteristics of visual elements and the spatial relationship of visual elements;

[0014] The initial web page is dynamically adjusted according to the optimal layout solution to obtain a target web page.

[0015] Preferably, the document parsing deep learning model at least includes a named entity recognition model, a text summarization model, a semantic role labeling model and a sentiment analysis model. The document to be converted is parsed by the pre-trained document parsing deep learning model to obtain key information, including:

[0016] Preprocessing the document to be converted to obtain a document to be converted in a preset format; the preprocessing at least includes cleaning, word segmentation and stop word removal;

[0017] Identify key entities of the document to be converted by using the named entity recognition model;

[0018] Extracting keywords from the document to be converted using a preset algorithm;

[0019] Generate a summary of the document to be converted by using the text summary model;

[0020] Identifying the semantic role of the document to be converted by using the semantic role labeling model;

[0021] Determine the sentiment tendency of the document to be converted by using the sentiment analysis model;

[0022] Key information is extracted from the key entities, the keywords, the abstract, the semantic roles and the sentiment tendency.

[0023] Preferably, obtaining the target web page template through the pre-trained web page template recommendation engine and the document content features includes:

[0024] Converting the document content features into standardized feature vector representations;

[0025] Calculating similarity between the standardized feature vector representation and the template feature vector in the template feature library to obtain the similarity of the current document;

[0026] Through collaborative filtering algorithm, similarity between user's historically selected templates and current documents, personalized template recommendations are made to obtain collaborative filtering results.

[0027] Through a convolutional neural network, a neural network model in deep learning, semantic matching is performed on the document content features and the template feature vector to obtain a deep learning result;

[0028] Through reinforcement learning technology and preset recommendation template feedback, the recommendation algorithm of the web page template recommendation engine is optimized to obtain reinforcement learning results;

[0029] Obtaining a template recommendation list according to the collaborative filtering results, the deep learning results, and the reinforcement learning results;

[0030] A target webpage template having the highest similarity score between the document content feature and the template feature is selected from the template recommendation list.

[0031] Preferably, the step of filling the target webpage template with the document content data in the key information and generating a corresponding initial webpage includes:

[0032] Traversing the HTML code of the target web page template;

[0033] Identify various placeholders of the target web page template through the hypertext markup language code;

[0034] Determine various content elements of document content data in key information;

[0035] Matching various content elements with various placeholders through preset matching rules; wherein the preset matching rules are rules for finding corresponding content elements according to the type of placeholder;

[0036] Intelligently rewrite and optimize the text corresponding to each type of content element after matching; the intelligent rewriting is used to make the text concise and fluent; the optimization is used to improve the efficiency of web page browsing and information acquisition;

[0037] Filling the intelligently rewritten and optimized content elements into the placeholders of the target webpage template to generate filled content;

[0038] The filled content is intelligently typeset and formatted to generate a corresponding initial web page; the intelligent typesetting includes at least adaptive layout and adding interactive effects; the formatting is used to coordinate the filled content with the design style of the target web page template.

[0039] Preferably, performing layout analysis on the initial webpage in a preset layout analysis manner to obtain an optimal layout solution includes:

[0040] Taking a screenshot of the initial webpage, and performing image preprocessing on the screenshot;

[0041] Through the feature extraction method, the visual elements of the screenshots after image preprocessing are extracted to obtain the key visual elements of the web page;

[0042] Analyze the spatial relationship between key visual elements of a web page to obtain spatial relationship information;

[0043] Constructing a reinforcement learning model for layout optimization according to the key visual elements and the spatial relationship information; the reinforcement learning model for layout optimization includes at least a web page layout state representation, an action space, a reward function and a reinforcement learning algorithm;

[0044] The optimal layout solution is obtained through the reinforcement learning model of layout optimization.

[0045] Preferably, dynamically adjusting the initial webpage according to the optimal layout solution to obtain the target webpage includes:

[0046] According to the optimal layout solution, determining corresponding modification parameters;

[0047] Under the responsive layout, the cascading style sheet of the content block in the initial web page is dynamically adjusted according to the modification parameters to obtain the target web page; wherein the responsive layout is determined according to the device type and the screen size.

[0048] Preferably, it also includes:

[0049] When a web page personalization request is received, the personalized adjustment parameters corresponding to the web page personalization request are determined through the pre-built user portrait and intention understanding model; the personalized adjustment parameters at least include content recommendation, style and interaction method;

[0050] During the process of generating the target webpage, the target webpage is dynamically adjusted according to the personalized adjustment parameters.

[0051] Preferably, it also includes:

[0052] Through intelligent web page quality testing and optimization engines, a multi-dimensional evaluation is performed on the target web page; the multi-dimensional evaluation at least includes page performance evaluation, user experience evaluation and search engine optimization friendliness evaluation.

[0053] Preferably, after dynamically adjusting the initial webpage according to the optimal layout solution to obtain the target webpage, the method further includes:

[0054] The target web page is hosted by a preset web server, and search engine optimization is performed on the target web page.

[0055] The second aspect of the present application discloses an online webpage generation device based on document processing, the device comprising:

[0056] A first acquisition unit, used to acquire a document to be converted;

[0057] A parsing unit, used to parse the document to be converted through a pre-trained document parsing deep learning model to obtain key information;

[0058] A conversion unit, used to convert the key information to obtain document content features;

[0059] A second acquisition unit is used to obtain a target web page template through a pre-trained web page template recommendation engine and the document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features;

[0060] A filling generation unit, used to fill the document content data in the key information into the target web page template accordingly, and generate a corresponding initial web page;

[0061] An analysis unit, configured to perform layout analysis on the initial webpage in a preset layout analysis manner to obtain an optimal layout solution; the preset layout analysis manner is a manner of analyzing the characteristics of visual elements and the spatial relationship of visual elements;

[0062] The first adjustment unit is used to dynamically adjust the initial web page according to the optimal layout solution to obtain a target web page.

[0063] It can be known from the above technical scheme that the present application discloses an online web page generation method and device based on document processing, which obtains a document to be converted, parses the document to be converted through a pre-trained document parsing deep learning model to obtain key information, converts the key information to obtain document content features, obtains a target web page template through a pre-trained web page template recommendation engine and document content features, and the target web page template is the optimal web page template with the highest similarity score between the document content features and the template features. The document content data in the key information is filled into the target web page template, and a corresponding initial web page is generated. The initial web page is analyzed by a preset layout analysis method to obtain an optimal layout plan. The preset layout analysis method is a method for analyzing the features of visual elements and the spatial relationship of visual elements. The initial web page is dynamically adjusted according to the optimal layout plan to obtain the target web page. Based on the above scheme, the documents to be converted into web pages are intelligently parsed and converted, and key information such as document content, structure, layout, style, etc. are automatically extracted. The key information is converted to obtain document content features. Through the pre-trained web page template recommendation engine and document content features, the optimal web page template with the highest similarity score is automatically recommended to achieve intelligent mapping of documents to web pages, so that non-technical personnel can also quickly produce professional web pages, thereby reducing the threshold for web page development, the difficulty of web page production and the labor cost, and improving the efficiency of web page generation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0065] Figure 1 A schematic diagram of the structure of the online webpage generation system disclosed in the embodiment of the present application;

[0066] Figure 2 A flowchart of an online web page generation method based on document processing disclosed in an embodiment of the present application;

[0067] Figure 3 A schematic diagram of the structure of an online web page generation device based on document processing disclosed in an embodiment of the present application;

[0068] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

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

[0070] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0071] As can be seen from the background technology, manually writing web page codes using a web front-end language to build and layout web page content and styles requires high technical requirements from developers and leads to low efficiency in web page development. Therefore, how to improve the efficiency of web page development is an urgent problem to be solved in this application.

[0072] In order to solve the above problems, the present application discloses an online web page generation method and device based on document processing, which intelligently parses and converts documents to be converted into web pages, automatically extracts key information such as document content, structure, layout, style, etc., converts the key information into document content features, and automatically recommends the optimal web page template with the highest similarity score through a pre-trained web page template recommendation engine and document content features, so as to realize intelligent mapping from documents to web pages, so that non-technical personnel can also quickly produce professional web pages, thereby reducing the threshold for web page development, the difficulty of web page production and the labor cost, and improving the efficiency of web page generation. The specific implementation method is specifically described through the following embodiments.

[0073] refer to Figure 1 As shown, it is a structural diagram of the online web page generation system disclosed in an embodiment of the present application. The online web page generation system includes a document uploading module, a document parsing module, a web page template matching module, a web page content intelligent filling module, a web page intelligent layout optimization module, a web page personalization customization module, a web page intelligent testing and optimization module and a web page publishing and intelligent promotion module.

[0074] The data interaction process between the document upload module, document parsing module, web page template matching module, web page content intelligent filling module, web page intelligent layout optimization module, web page personalized customization module, web page intelligent testing and optimization module and web page publishing and intelligent promotion module is as follows:

[0075] (1) Intelligent document parsing module:

[0076] The user selects the document to be converted to a web page through the web interface provided by the web page online generation system, and uploads the document to be converted to the server. The web page online generation system supports uploading documents in common formats such as Word, slides (PPT), and portable document formats (PDF). After uploading to the server, the document is saved in the specified directory of the server. The document to be converted is the document that needs to be converted into a web page.

[0077] The online web page generation system uses a pre-trained document parsing deep learning model to intelligently parse the uploaded documents to be converted and obtain key information.

[0078] The document parsing deep learning model uses neural network models such as convolutional neural networks (CNN) and other neural network structures. Through training on a large number of document samples, it can accurately identify the content, structure, format and other elements of the document. At the same time, natural language processing technology is introduced to perform semantic understanding of text content and extract key information. The core code example of the parsing engine of the intelligent document parsing module is as follows:

[0079]

[0080] It should be noted that key information specifically includes the subject and core content of the document, the document's keywords and entities (such as names of people, places, and institutions, etc.), the document's abstract or summary, the document's chapter structure and hierarchical relationships, important sentences or paragraphs in the document, key data and facts in the document, the document's emotional tendencies and opinions and attitudes, etc.

[0081] Parsing results refer to the output of the document parsing model, including:

[0082] content: the text content of the document, i.e. the main body of the document;

[0083] Structure: The structural information of the document, such as the hierarchical relationship and position information of chapters, paragraphs, lists, etc.

[0084] format: document format information, such as font, font size, color, alignment and other style information.

[0085] Post-processing of analysis results means further processing and refining the original analysis output to meet application requirements. Specifically, it can include the following aspects:

[0086] Perform grammatical analysis, syntax analysis and semantic analysis on the text content of the content to extract key information and semantic structures, such as named entities, keywords, summaries, emotions, etc.

[0087] Integrate and optimize the structured information of structure to generate a more standardized and easy-to-use document outline and directory structure;

[0088] Extract and convert the format information of format, and map it to web page formats such as HTML and CSS to meet the needs of web page display.

[0089] Natural language processing technology is introduced to perform semantic understanding of text content and extract key information as shown in A1-A7.

[0090] A1: Preprocess the document to be converted to obtain a document to be converted in a preset format; the preprocessing at least includes cleaning, word segmentation and stop word removal.

[0091] In A1, the documents to be converted are preprocessed by cleaning, word segmentation, and stop word removal, and the documents to be converted are converted into a structured data format that can be understood and processed by computers.

[0092] A2: Identify the key entities of the document to be converted through the named entity recognition model.

[0093] In A2, the named entity recognition model BiLSTM-CRF is used to identify key entities such as names of people, places, and institutions in the text.

[0094] A3: Use the preset algorithm to extract keywords from the document to be converted.

[0095] The preset algorithm includes, but is not limited to, a commonly used weighted technology (TermFrequency–Inverse Document Frequency, TF-IDF) algorithm for information retrieval and data mining. The preset algorithm of this solution is preferably the TF-IDF algorithm.

[0096] Using the TF-IDF algorithm, important keywords are extracted from the document to be converted. The keywords are used to reflect the theme and core content of the document.

[0097] A4: Generate a summary of the document to be converted through the text summarization model.

[0098] Text summarization models include but are not limited to Transformer models.

[0099] In A4, the Transformer model is used to automatically generate a summary or outline of the text and extract the key information of the document to be converted.

[0100] A5: Identify the semantic roles of the document to be converted through the semantic role labeling model.

[0101] The semantic role labeling model includes but is not limited to the BERT-CRF model. The semantic role labeling model of this solution is preferably the BERT-CRF model.

[0102] The BERT-CRF model is used to identify semantic roles in texts, such as agent, patient, time, and place, and to understand the semantic structure of texts.

[0103] A6: Determine the sentiment tendency of the document to be converted through the sentiment analysis model.

[0104] The sentiment analysis model includes but is not limited to a long short-term memory network (LSTM) model. The sentiment analysis model of this solution is preferably an LSTM model.

[0105] The LSTM model is used to determine the sentiment tendency of the document to be converted, such as positive, negative, neutral, etc., so as to understand the author's views and attitudes.

[0106] A7: Extract key information from key entities, keywords, summaries, semantic roles, and sentiment tendencies.

[0107] In A7, according to the application scenarios and requirements, the most important key information, such as key entities, keywords, abstracts, semantic roles and sentiment tendencies, is extracted from the above analysis results (key entities, keywords, abstracts, sentiment tendencies, etc.) to form a structured text representation.

[0108] (2) Intelligent web page template matching module:

[0109] The online web page generation system converts key information to obtain document content features, and based on the pre-trained web page template recommendation engine, intelligently recommends the optimal target web page template according to the parsed and extracted document content features. The target web page template is the optimal web page template with the highest similarity score between the document content features and the template features.

[0110] Parse the documents to be converted uploaded by users and extract key document content features, such as the document's subject, keywords, chapter structure, data tables, pictures, etc.

[0111] The process of obtaining the target web page template through the pre-trained web page template recommendation engine and document content features is shown in B1-B7.

[0112] B1: Convert document content features into standardized feature vector representations.

[0113] It should be noted that the document content features are obtained by further refining and transforming the key information. They represent the content elements of the document in a more structured and vectorized way, providing directly available feature input for intelligent template recommendation.

[0114] Document content features are an application form and representation of key information, and the extraction of key information is the basis and premise for the construction of document content features. The two complement each other and jointly support the document understanding and template recommendation functions of the intelligent web page generation system.

[0115] Document content features mainly include topic features, keyword features, named entity features, sentiment features, structural features, semantic features, etc.

[0116] Topic feature: The topic category to which the document belongs.

[0117] Keyword features: important keywords in the document.

[0118] Named entity features: names of people, places, organizations, etc. that appear in the document.

[0119] Sentiment feature: the emotional tendency of the document.

[0120] Structural features: the document’s chapter structure, paragraph layout, chart location, etc.

[0121] Semantic features: semantic vector representation of a document.

[0122] B2: Calculate the similarity between the standardized feature vector representation and the template feature vector in the template feature library to obtain the similarity of the current document.

[0123] The template feature vector includes the visual feature vector, text content features, label features, etc. of the template.

[0124] The visual feature vector mainly reflects the visual appearance of the template, such as layout structure, color scheme, picture style, etc.

[0125] Text content features and tag features reflect the semantic theme and key information of the template.

[0126] The online web page generation system uses a deep learning model to map these features of different dimensions into a unified high-dimensional vector space, forming a complete template feature vector representation.

[0127] B3: Through collaborative filtering algorithm, the user's historical selection template and the similarity of the current document, personalized template recommendation is performed to obtain collaborative filtering results.

[0128] Among them, the collaborative filtering algorithm is used to make personalized template recommendations based on the similarity between the templates selected by the user in the past and the current document. The collaborative filtering algorithm can discover the user's implicit preferences and recommend templates that are similar to the historical selections or have been selected by other users.

[0129] B4: Through CNN in deep learning, semantic matching is performed on document content features and template feature vectors to obtain deep learning results.

[0130] Among them, CNN can learn the complex nonlinear relationship between documents and templates, and give more accurate deep learning results.

[0131] B5: Through reinforcement learning technology and preset recommendation template feedback, the recommendation algorithm of the web page template recommendation engine is optimized to obtain reinforcement learning results.

[0132] Among them, the preset recommendation template feedback is the user's feedback on the recommendation template, and the user's feedback on the recommendation template includes click, apply, modify and other behaviors.

[0133] Introducing reinforcement learning technology, dynamically adjust the recommendation strategy based on user feedback on recommended templates (such as clicks, applications, modifications, etc.). Reinforcement learning can continuously optimize the recommendation algorithm, improve user satisfaction and template application rate.

[0134] B6: Get a template recommendation list based on the collaborative filtering results, deep learning results, and reinforcement learning results.

[0135] The collaborative filtering results, deep learning results, and reinforcement learning results are integrated to give a final template recommendation list. The templates in the template recommendation list are sorted according to relevance and user preference for user selection and application.

[0136] B7: Select the target web page template with the highest similarity score between the document content feature and the template feature from the template recommendation list.

[0137] Through the above process, the online web page generation system can intelligently recommend the optimal target web page template based on document content features, combined with user historical behavior and real-time feedback, to improve the accuracy and efficiency of template matching.

[0138] The recommendation engine uses a combination of collaborative filtering and deep learning to analyze user behavior and template features to provide personalized template matching results. At the same time, reinforcement learning technology is introduced to dynamically optimize the recommendation strategy through user feedback. The specific process is shown in 2.1-2.7:

[0139] 2.1 Build template feature library:

[0140] First, the webpage online generation system needs to analyze and process the existing webpage template library. Each template has its own unique content structure, layout style, color matching and other features. The webpage online generation system uses CNN in deep learning to extract features from the template screenshots and obtain the visual feature vector of the template. At the same time, it uses natural language processing technology to perform semantic analysis on the text content and tags of the template to extract keywords and topic features. Finally, each template is represented as a high-dimensional feature vector and stored in the template feature library.

[0141] The text content of the template includes the title, paragraph, list, table, link and other text elements in the template. These text contents reflect the main information and semantic structure of the template.

[0142] Tags refer to keywords describing the semantic theme, style characteristics, and applicable scenarios of a template, such as "simple and elegant", "commercial", "product display", etc. These tags are usually added manually by template designers or users, reflecting the attributes and uses of the template. The user's behavior of choosing to apply a template can also serve as an implicit tag feedback.

[0143] Specifically, natural language processing technology is used to perform semantic analysis on the text content and tags of the template. The process of extracting keywords and topic features includes text preprocessing, topic modeling, tag analysis, feature fusion and feature storage:

[0144] Text preprocessing: Perform preprocessing operations such as word segmentation, stop word removal, and part-of-speech tagging on the text content of the template to convert the text into a structured data format.

[0145] Keyword extraction: Use the TF-IDF keyword extraction algorithm to identify important keywords from the text and reflect the core content of the template.

[0146] Topic modeling: The topic model algorithm (Latent Dirichlet Allocation, LDA) is used to map the text into the semantic topic space and extract the topic distribution characteristics of the template.

[0147] Tag analysis: Segment and semantically vectorize the template tags to extract the keywords and semantic features of the tags.

[0148] Feature fusion: The extracted keyword features, topic features, and tag features are fused to generate a unified text semantic feature vector.

[0149] Feature storage: The text semantic feature vector is stored in the template feature library, and together with the visual feature vector, it constitutes a complete template feature representation.

[0150] Through the above steps, keywords and topic features rich in semantic information can be extracted from the text content and tags of the template, providing important semantic clues for subsequent template matching and recommendation.

[0151] 2.2 User behavior data collection and analysis:

[0152] The online webpage generation system will record various behavior data of users on the platform, such as browsing, clicking, collecting, using, etc. By analyzing these behavior data, we can understand the user's preferences, habits and needs. The system uses collaborative filtering algorithms to find the template usage preferences of other similar users based on the user's historical behavior, and use this as a reference for recommendation.

[0153] 2.3 Build a recommendation model:

[0154] The online web page generation system uses template features, user behavior data, and document content features to build an intelligent recommendation model. The model uses a neural network structure in deep learning and mainly includes the following parts:

[0155] Input layer: receives document content features, user features and template feature data.

[0156] Embedding layer: vectorizes discrete features and maps them into a continuous low-dimensional space.

[0157] Fusion layer: Use a fully connected neural network to fuse the features of documents, users, and templates to generate a comprehensive feature representation.

[0158] Matching layer: Calculate the matching scores between the comprehensive features and each template in the template feature library through metrics such as cosine similarity.

[0159] Output layer: Select the top-N templates with the highest matching scores as recommendation results.

[0160] It should be noted that in recommendation systems, input features and target features are usually distinguished.

[0161] Input features refer to the independent variable features used for training and prediction, including user features, item features, context features, etc. Here, the template feature data, as part of the input layer, together with the document content features and user features, constitutes a complete input feature space.

[0162] The target feature refers to the target variable that the recommendation system wants to predict, which is usually the user's behavioral labels such as rating, clicking, and purchasing of items. In the template recommendation scenario, the target feature can be whether the user has applied a certain template, or the user's satisfaction rating of the template.

[0163] The template feature data received by the input layer is the original feature representation extracted from the template feature library, such as the visual feature vector, text content feature vector, label feature vector, etc. of the template. These original feature vectors may have high dimensions and redundant information, and cannot be directly used for training and prediction of the recommendation model. Therefore, when building a recommendation model, it is usually necessary to further process and transform the original feature data received by the input layer to extract a more compact and informative feature representation as the input of the neural network. This process can be achieved in the following ways (feature selection, feature transformation, feature embedding, feature crossover):

[0164] Feature selection: Select the most relevant and discriminative feature subset from the original high-dimensional feature space to reduce feature dimension and noise.

[0165] Feature transformation: Perform numerical transformations such as normalization, standardization, and discretization on the original features to make the feature distribution smoother and facilitate model learning.

[0166] Feature embedding: Use the embedding layer to map high-dimensional sparse discrete features into low-dimensional dense continuous vector space to mine the semantic associations between features.

[0167] Feature intersection: Construct high-order interactive features through feature combination, feature multiplication, etc. to capture the nonlinear relationship between features.

[0168] After the above feature engineering operations, an optimized, low-dimensional dense feature representation is obtained, which is used as the actual input of the neural network and participates in the training and optimization of the model together with the target features.

[0169] It should be noted that the template feature data received by the input layer can be regarded as the original form of the target feature vector, but it still needs to go through a series of feature processing and conversion to become the input feature vector for recommendation model training and prediction. This process is an important part of the recommendation system construction and directly affects the performance and effect of the model.

[0170] 2.4 Model training and optimization:

[0171] The training of the recommendation model adopts the supervised learning method, with the user's actual selection template as the label and the comprehensive features as the input. The model parameters are continuously optimized through the back propagation algorithm to minimize the prediction error. At the same time, the reward mechanism in reinforcement learning is introduced, and the user's feedback (such as clicks, usage, etc.) is used as a reward signal to dynamically adjust the model's recommendation strategy so that it can adapt to the ever-changing needs of users.

[0172] 2.5 Online recommendation service:

[0173] The trained recommendation model is deployed as an online service, receiving document parsing results and user requests in real time. When a user uploads a document, the online webpage generation system extracts the document content features, combines the user's own features, and inputs them into the recommendation model to quickly generate personalized template recommendation results.

[0174] Among them, document content features include topic features, keyword features, named entity features, sentiment features, structural features, semantic features, etc.

[0175] Topic features: The topic category to which the document belongs, such as news, technology, entertainment, etc., can be extracted using topic models such as LDA.

[0176] Keyword features: Important keywords in a document, reflecting the core content of the document, can be extracted using algorithms such as TF-IDF and TextRank, a graph-based ranking algorithm for text.

[0177] Named entity features: Named entities such as names of people, places, and organizations that appear in documents can be extracted using a named entity recognition model.

[0178] Sentiment features: The emotional tendency of a document, such as positive, negative, neutral, etc., can be extracted using a sentiment analysis model.

[0179] Structural features: The document’s chapter structure, paragraph layout, chart location and other structural information can be extracted using document parsing technology.

[0180] Semantic features: The semantic vector representation of a document captures the semantic information of the document and can be extracted using representation learning methods such as word vectors, sentence vectors, and document vectors.

[0181] These document content features characterize the content attributes of the document from different angles and can serve as important inputs to the recommendation model, helping the model understand the document content and give more accurate template recommendations.

[0182] In order to facilitate understanding of the process of extracting document content features, combining user characteristics, inputting them into the recommendation model, and quickly generating personalized template recommendation results by the online web page generation system, an example is given here to illustrate:

[0183] For example, suppose user A uploads a technical blog document. The online webpage generation system first parses and extracts features from the document:

[0184] Topic features: The topics of the documents extracted are "deep learning", "computer vision", etc.

[0185] Keyword features: The keywords extracted from the document are "convolutional neural network", "image classification", "dataset", etc.

[0186] Named entity features: extract the names of scholars, datasets, algorithms, etc. mentioned in the document;

[0187] Sentimental features: Analyze the tone and sentiment of the document to obtain a neutral to positive sentiment value;

[0188] Structural features: extract the document's chapter hierarchy, number of paragraphs, location of graphics and other structural information;

[0189] Semantic features: Convert documents into semantic vector representations, such as document vectors generated by Doc2Vec.

[0190] At the same time, the system also extracts the following features of user A:

[0191] Historical browsing records: technical documents, tutorials, papers, etc. that user A has browsed before;

[0192] Historically applied templates: the types and styles of web page templates that user A has previously selected and applied;

[0193] Personal attributes: User A’s occupation, education, age and other registration information;

[0194] The user features and document content features are input into the recommendation model together. The model obtains the predicted scores of user A's interest in different templates through forward calculation, such as:

[0195] Template 1 (simple technical style): 0.85;

[0196] Template 2 (vivid graphic style): 0.62;

[0197] Template 3 (professional paper style): 0.78; ...;

[0199] According to the prediction score sorting, the system selects the N templates with the highest scores and generates a personalized recommendation list:

[0200] [Template 1, Template 3, Template 2...];

[0201] The recommendation result comprehensively considers the historical preferences of user A and the content characteristics of the current document, and gives the most matching template recommendation. User A can select the template that he or she is most satisfied with from the recommendation list to apply and edit;

[0202] This process demonstrates an end-to-end personalized template recommendation process. By extracting document content features and user features and using intelligent recommendation models, it automatically matches the optimal web page template for users, thereby improving the efficiency and quality of document-to-web page conversion.

[0203] 2.6 Sorting and display of recommended results:

[0204] The recommendation model gives a list of templates, sorted by matching scores. The system displays the top-ranked templates to users in a friendly way, such as a card-style layout with pictures and text, to facilitate user browsing and selection.

[0205] 2.7 User feedback and model update:

[0206] User feedback on the recommended results (such as clicks, favorites, usage, etc.) will be recorded as new behavior data and added to the user behavior database. At the same time, this feedback data is also used to continuously optimize the recommendation model. Through incremental training or online learning, the model can continue to evolve and adapt to new user needs and preference changes.

[0207] The core code example of template matching is as follows:

[0208]

[0209]

[0210] (3) Web page content intelligent filling module:

[0211] The webpage content intelligent filling module automatically fills the parsed document content data into the target webpage template and generates the corresponding initial webpage. The specific process of generating the corresponding initial webpage is shown in C1-C7.

[0212] C1: Traverse the HTML code of the target web page template.

[0213] C2: Identify various placeholders of the target web page template through the Hypertext Markup Language code.

[0214] Among them, various types of placeholders include title placeholders, paragraph placeholders, etc.

[0215] C3: Determine the various content elements of the document content data in the key information.

[0216] In C3, various types of content elements include document titles, paragraphs, lists, pictures, and other different types of content elements.

[0217] C4: Matching various content elements with various placeholders through preset matching rules; wherein the preset matching rules are rules for finding corresponding (i.e., similar) content elements according to the type of placeholder;

[0218] In C4, the content elements in the document parsing results are matched with the placeholders in the template. The matching principle is to find the most similar content element based on the type and attributes of the placeholder. For example, the title placeholder will match the title element in the document, the paragraph placeholder will match the paragraph element, the image placeholder will match the image element, etc. During the matching process, the system will also consider factors such as the order, length, and format of the content elements to ensure the rationality of the filling.

[0219] C5: Intelligently rewrite and optimize the text corresponding to each type of matched content element; intelligent rewriting is used to make the text concise and fluent; optimization is used to improve the efficiency of web page browsing and information acquisition.

[0220] During the filling process, natural language generation technology is used to intelligently rewrite and optimize the text content to make it more in line with the language style and expression habits of the web page. The specific details are shown in 3.1-3.7:

[0221] 3.1 Structured representation of document parsing results:

[0222] The results of parsing the document to be converted are usually stored in JSON structured data format. These data include different types of content elements such as the document title, paragraphs, lists, pictures, etc. Each content element has its corresponding attributes, such as text content, format, style, etc. The online web page generation system will read these structured data into memory and build a tree-shaped data structure to facilitate subsequent operations.

[0223] 3.2 Content placeholder identification of web page template:

[0224] In the target web page template, some content placeholders are usually reserved to indicate the filling positions of different types of content. These placeholders can be special HTML tags, CSS class names, or custom tags. The system will traverse the HTML code of the template, identify these placeholders, and record their location and type information.

[0225] 3.3 Matching of content elements and placeholders:

[0226] The online web page generation system matches the content elements in the document parsing results with the placeholders in the target web page template. The matching principle is to find the most similar content element based on the type and attributes of the placeholder. For example, the title placeholder will match the title element in the document, the paragraph placeholder will match the paragraph element, the image placeholder will match the image element, etc. During the matching process, the system will also consider factors such as the order, length, and format of the content elements to ensure the rationality of the filling.

[0227] 3.4 Intelligent rewriting and optimization of content:

[0228] Before filling the content elements into the placeholders in the target web page template, the web page online generation system will intelligently rewrite and optimize them. This mainly uses natural language generation technology, including the following steps:

[0229] 3.4.1 Text analysis: Perform grammatical analysis, syntax analysis and semantic analysis on the text of content elements to extract key information and semantic structure.

[0230] 3.4.2 Text rewriting: According to the language style and expression habits of the webpage, the text content should be appropriately rewritten. This may include vocabulary replacement, sentence adjustment, tone conversion, etc. The purpose of rewriting is to make the text more concise, fluent and easy to read.

[0231] 3.4.3 Text optimization: Based on the characteristics of web page reading, the text is further optimized, such as shortening paragraph length, adding subheadings, highlighting keywords, etc. The optimized text is more suitable for quick browsing of web pages and information acquisition.

[0232] 3.5 Intelligent layout and format adjustment of content:

[0233] The filled content also needs to be intelligently formatted and formatted to adapt to the layout and design style of the web page. This mainly uses CSS and JavaScript technology, including the following aspects:

[0234] Adaptive layout: Dynamically adjust the size and position of the content according to the length of the content and the layout of the template to achieve an adaptive layout effect.

[0235] Style optimization: Apply appropriate CSS styles to content elements, such as fonts, colors, spacing, etc., to make them consistent with the design style of the template.

[0236] Interactive effects: Add some interactive effects to the content, such as hover, click, animation, etc., to enhance the interactivity and attractiveness of the web page.

[0237] Preview and confirmation of content filling results:

[0238] 3.6 After completing the content filling, the system will generate a web page preview for the user to view and confirm. The user can further edit and adjust the filling results, such as modifying text, adjusting pictures, optimizing layout, etc. When the user confirms that everything is correct, the system will generate the final web page code.

[0239] 3.7 Exception handling and logging:

[0240] During the content filling process, some abnormal situations may occur, such as missing content elements, placeholder matching failure, disordered layout, etc. The system needs to properly handle these abnormalities, give friendly prompts or adopt the default filling strategy. At the same time, record detailed log information to facilitate problem tracking and debugging.

[0241] C6: Fill various content elements after intelligent rewriting and optimization into the placeholders of the target web page template to generate the filled content;

[0242] C7: Intelligently typeset and format the filled content to generate a corresponding initial web page; the intelligent typesetting includes at least adaptive layout and adding interactive effects; the format adjustment is used to coordinate the filled content with the design style of the target web page template.

[0243] (4) Webpage intelligent layout optimization module:

[0244] The webpage intelligent layout optimization module performs layout analysis on the initial webpage through a preset layout analysis method to obtain the optimal layout solution. The specific process is shown in D1-D5.

[0245] D1: Take a screenshot of the initial web page and perform image preprocessing on the screenshot.

[0246] Among them, the headless browser Puppeteer is used to simulate the user accessing the initial web page and generate screenshots. The obtained screenshot images need to be preprocessed, such as scaling to a fixed size, converting to grayscale, etc., to facilitate subsequent feature extraction and analysis.

[0247] D2: Through the feature extraction method, the features of visual elements are extracted from the screenshots after image preprocessing to obtain the key visual elements of the web page.

[0248] Among them, feature extraction methods include edge detection, color analysis, texture analysis, etc.

[0249] The key visual elements include web page HTML-related elements, layout elements, text elements, image elements, video elements, etc.

[0250] D3: Analyze the spatial relationship between the key visual elements of the web page to obtain spatial relationship information.

[0251] Among them, the spatial relationship between each key visual element includes relative position, size, alignment, etc.

[0252] D4: Based on each key visual element and spatial relationship information, a reinforcement learning model for layout optimization is constructed; the reinforcement learning model for layout optimization at least includes web page layout state representation, action space, reward function and reinforcement learning algorithm.

[0253] D5: Obtain the optimal layout solution through the reinforcement learning model of layout optimization.

[0254] Through the reinforcement learning model of layout optimization, continuous attempts and iterations are made to find the optimal layout solution.

[0255] For web pages filled with content, we use computer vision and deep learning algorithms to perform intelligent layout analysis and optimization. By extracting and learning the features of web page screenshots, we identify important visual elements and their spatial relationships. Then, we use reinforcement learning algorithms to find the optimal layout solution through continuous trial and iteration, and dynamically adjust the size, position, spacing and other attributes of content blocks to make the visual presentation of the web page more friendly and beautiful. The specific details are as follows:

[0256] 4.1 Acquisition and preprocessing of web page screenshots:

[0257] First, the webpage online generation system will take a screenshot of the initial webpage filled with content. This can be achieved through the headless browser Puppeteer, simulating a user accessing the initial webpage and generating a screenshot. The obtained screenshot image needs to be preprocessed, such as scaling to a fixed size, converting to grayscale, etc., to facilitate subsequent feature extraction and analysis.

[0258] 4.2 Feature extraction of visual elements:

[0259] Next, the online web page generation system uses feature extraction methods in computer vision to analyze the web page screenshots. Common feature extraction methods include:

[0260] Edge detection: Use the Canny algorithm to extract edge information in the image and highlight the outline of the content block.

[0261] Color analysis: Count and cluster the color distribution of the image to identify the theme color and color scheme.

[0262] Texture analysis: Extract texture features of the image, and the SIFT algorithm captures the visual style of the content block.

[0263] The code example is as follows:

[0264] import cv2

[0265] #Read webpage screenshot

[0266] image=cv2.imread('webpage_screenshot.png',

[0267] cv2.IMREAD_GRAYSCALE)

[0268] #Gaussian blur, reduce noise

[0269] blurred=cv2.GaussianBlur(image, (5, 5), 0)

[0270] #Canny edge detection

[0271] edges=cv2.Canny(blurred, 50, 150)

[0272] # Display results

[0273] cv2.imshow('Edges', edges)

[0274] cv2.waitKey(0)

[0275] cv2.destroyAllWindows()

[0276] This is import cv2 to extract SIFT edge features

[0277] #Read the image

[0278] image=cv2.imread('image.jpg')

[0279] gray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)

[0280] #Create SIFT feature extractor

[0281] sift = cv2.SIFT_create()

[0282] #Detect and extract SIFT features

[0283] keypoints, descriptors=sift.detectAndCompute(gray,None)

[0284] #Draw key points

[0285] image_with_keypoints=cv2.drawKeypoints(image,keypoints,None)

[0286] # Display results

[0287] cv2.imshow('SIFT Keypoints', image_with_keypoints)

[0288] cv2.waitKey(0)

[0289] cv2.destroyAllWindows()

[0290] 4.3 Spatial relationship analysis of visual elements:

[0291] Through feature extraction, the online web page generation system obtains the key visual elements in the web page. The spatial relationship between these key visual elements is analyzed, such as relative position, size, alignment, etc. This can be achieved through the following steps:

[0292] Element coordinate and size extraction: Record the bounding box coordinates and size information of each visual element.

[0293] Hierarchical structure analysis of elements: Based on the nesting and overlapping relationships of elements, a tree-like hierarchy is constructed to represent the subordinate relationships between elements.

[0294] Element alignment and distribution analysis: Calculate the alignment (left alignment, right alignment, center alignment, etc.) and distribution (even distribution, clustered distribution, etc.) between elements.

[0295] 4.4 Reinforcement Learning Model for Layout Optimization:

[0296] Using key visual elements and spatial relationship information, we build a reinforcement learning model, and find the optimal layout solution through continuous trial and iteration. The reinforcement learning model mainly includes state representation, action space, reward function, learning algorithm, etc.:

[0297] State representation: The current web page layout is represented as a state vector, which contains the position, size, alignment and other properties of each visual element.

[0298] Action space: defines a set of layout adjustment actions, such as moving elements, resizing elements, changing element alignment, etc.

[0299] Reward function: Design a reward function to evaluate the quality of the layout. You can consider factors such as the neatness, aesthetics, and readability of the layout.

[0300] Learning algorithm: Use reinforcement learning algorithm, Q-learning, to learn the optimal layout strategy through continuous interaction and feedback with the environment.

[0301] Code example:

[0302]

[0303]

[0304] 4.5 Application of layout optimization results:

[0305] The webpage intelligent layout optimization module determines the corresponding modification parameters according to the optimal layout plan, and dynamically adjusts the cascading style sheet (CSS) (such as position, size (width, height), spacing (margin, padding), etc.) of the content block in the initial webpage according to the modification parameters under the responsive layout to obtain the target webpage; wherein the responsive layout is determined according to the device type and screen size.

[0306] The optimal layout solution obtained by the reinforcement learning model will be applied by the online web page generation system to the actual web page. This requires dynamic adjustment of the CSS style of the content blocks in the web page, such as position, size (width, height), spacing (margin, padding), etc. At the same time, responsive layout under different devices and screen sizes must be considered to ensure that the web page can maintain good visual effects in various environments.

[0307] (5) Web page customization module:

[0308] When the web page personalization module receives a web page personalization request, the web page personalization module determines the personalized adjustment parameters corresponding to the web page personalization request through the pre-built user portrait and intention understanding model; the personalized adjustment parameters include at least content recommendation, style and interaction method. During the process of generating the target web page, the target web page is dynamically adjusted according to the personalized adjustment parameters.

[0309] The online web page generation system builds a user portrait and intention understanding model by analyzing the user's historical behavior, preferences, scenarios and other data. During the web page generation process, the content recommendation, style, interaction method, etc. of the web page are dynamically adjusted to provide a personalized web page experience for different users.

[0310] Users can also use the visual editing tools provided by the system to fine-tune and re-create web pages to further meet personalized needs, as follows:

[0311] 5.1 User data collection and processing:

[0312] First, the online web page generation system needs to collect various data from users, including browsing history, search history, and click behavior. This data can be obtained through user login, cookie tracking, and tracking. The collected raw data needs to be pre-processed by cleaning, deduplication, and formatting to facilitate subsequent analysis and mining.

[0313] 5.2 User portrait construction:

[0314] Based on the collected user data, the online web page generation system uses machine learning algorithms to build user portraits. Commonly used algorithms include:

[0315] 5.2.1 Clustering algorithm: Use the K-means algorithm to divide similar users into different groups and discover the common characteristics of users.

[0316] 5.2.2 Association rule mining: Through the Apriori algorithm, the association rules between user behaviors are discovered and the user's potential interests are predicted.

[0317] 5.2.3 Matrix decomposition: Using SVD technology, the user-item matrix is ​​decomposed into user feature matrix and item feature matrix to realize the extraction of implicit features.

[0318] Code example:

[0319] from sklearn.cluster import KMeans

[0320] #User characteristic data

[0321] user_features=[

[0322] [0.2, 0.8, 0.3],

[0323] [0.1, 0.9, 0.4],

[0324] [0.7, 0.2, 0.6],

[0325] [0.8, 0.3, 0.5], ]

[0327] #Set the number of clusters

[0328] num_clusters=2

[0329] #Create a K-means clusterer

[0330] kmeans=KMeans(n_clusters=num_clusters)

[0331] # Train the clusterer

[0332] kmeans.fit(user_features)

[0333] #Get clustering results

[0334] cluster_labels=kmeans.labels_

[0335] #Print clustering results

[0336] for i, label in enumerate(cluster_labels):

[0337] print(f"User {i} belongs to cluster {label}").

[0338] 5.3 User Intent Understanding:

[0339] On the basis of building user portraits, the online web page generation system needs to further understand the user's real-time intentions. This can be achieved through the following aspects:

[0340] 5.3.1 Query understanding: Analyze user search queries and extract keywords and semantic information through natural language processing techniques such as lexical analysis, syntax analysis, and semantic understanding.

[0341] 5.3.2 Scenario Identification: Based on the user’s access time, location, device and other contextual information, infer the user’s scenario and task, such as work, study, entertainment, etc.

[0342] 5.3.3 Behavior sequence analysis: Use sequence models, such as HMM, LSTM, etc., to model the user's behavior sequence and predict the user's next action and long-term goals.

[0343] 5.4 Personalized web page generation:

[0344] Based on the results of user portrait and intent understanding, the system dynamically generates personalized web page content and style. It mainly includes the following aspects:

[0345] 5.4.1 Content recommendation: Recommend relevant articles, products, services and other content based on user interests and preferences to improve user engagement and satisfaction.

[0346] 5.4.2 Style adaptation: Dynamically adjust the color matching, layout style, interaction method, etc. of the web page according to the user's aesthetic preferences and usage scenarios to create a comfortable visual experience.

[0347] 5.4.3 Interaction optimization: Optimize the navigation structure, functional layout, operation process, etc. of the web page according to user behavior habits and task requirements to improve user efficiency and convenience.

[0348] Code example:

[0349] from sklearn.metrics.pairwise import cosine_similarity

[0350] #User-item rating matrix

[0351] ratings=[

[0352] [4, 3, 0, 5],

[0353] [0, 0, 3, 0],

[0354] [2, 4, 0, 1],

[0355] [0, 3, 0, 2], ]

[0357] # Calculate the similarity between users

[0358] user_similarity=cosine_similarity(ratings)

[0359] #Find similar users to the target user

[0360] target_user=0

[0361] similar_users=user_similarity[target_user].argsort()[::-1][1:]

[0362] #Recommended Items

[0363] recommended_items=set()

[0364] foruserin similar_users:

[0365] liked_items=set(i fori, rating in enumerate(ratings[user])ifrating>0)

[0366] recommended_items.update(liked_items)

[0367] #Filter out items that the target user has rated

[0368] recommended_items-=set(i fori, rating in enumerate(ratings[target_user])ifrating>0)

[0369] #Print the recommended results

[0370] print(f"Recommended items for user {target_user}: ", recommended_items).

[0371] 5.5 Visual editing and secondary creation:

[0372] Visual editing tools allow users to personalize and re-create the generated web pages. Users can modify the content, layout, style, etc. of the web page by dragging and dropping, configuring, etc., to achieve more fine-grained customization.

[0373] (6) Web page intelligent testing and optimization module:

[0374] The online web page generation system integrates an intelligent web page quality test and optimization engine. The web page intelligent test and optimization module conducts multi-dimensional evaluations on the generated web pages, including page performance evaluation, user experience evaluation, search engine optimization (SEO) friendliness evaluation, etc. The engine uses machine learning algorithms to automatically discover problems and optimization points in web pages by comparing with standard data sets, and gives corresponding repair and optimization suggestions. At the same time, the system will also track users' actual access behavior data and continuously iterate and optimize web page generation strategies.

[0375] 6.1 Web page quality assessment indicators:

[0376] First, we need to define a series of web page quality evaluation indicators, covering different dimensions and aspects. Common indicators include:

[0377] Page load speed: Measures the loading time of a web page, such as first render time, first contentful paint time, etc.

[0378] Responsiveness: Evaluate the responsiveness and stability of web pages under different devices and network conditions.

[0379] Code quality: Check the standardization, semantics, and maintainability of the HTML, CSS, JavaScript, and other codes of the web page.

[0380] User experience: Evaluate the user-friendliness and ease of use of a web page in terms of layout, design, interaction, etc.

[0381] SEO optimization: Analyze the optimization of SEO elements such as keywords, titles, descriptions, links, etc. of web pages.

[0382] Web page quality data collection:

[0383] In order to evaluate the quality of web pages, the system needs to collect various relevant data, mainly including the following aspects:

[0384] Performance indicators: Use Puppeteer through browser automation tools to simulate users accessing web pages and collect performance indicators such as page loading, rendering, and interaction.

[0385] Code indicators: Use static code analysis tools such as ESLint, JSHint, etc. to check the quality and standardization of web page code.

[0386] Search engine data: obtain data such as the ranking, inclusion, and traffic of web pages in search engines to evaluate the effectiveness of SEO optimization.

[0387] Code example:

[0388]

[0389]

[0390] 6.2 Machine Learning Model Training:

[0391] The online web page generation system uses the collected web page quality data to train a machine learning model for automatic evaluation and prediction of the comprehensive quality score of a web page. In order to train a machine learning model, a standard web page quality dataset needs to be prepared. The dataset should contain a large number of web page samples of different qualities and the corresponding manual evaluation scores. Various quality indicators need to be extracted from each web page sample, such as page loading speed, code quality, user experience, etc. These indicators will serve as input features of the machine learning model.

[0392] Next, choose a suitable machine learning algorithm to build the model. Commonly used algorithms include regression models, classification models, and clustering models.

[0393] For regression models, such as linear regression and decision tree regression, the goal is to predict the comprehensive quality score of a web page based on its various quality indicators. The web page quality indicators are used as input features, and the manual evaluation scores are used as target variables. The regression model is trained to fit this mapping relationship. By minimizing the difference between the predicted score and the actual score, the regression model can learn the rules of web page quality evaluation.

[0394] For classification models, such as logistic regression and support vector machines, the goal is to classify web pages into different quality levels, such as excellent, good, fair, poor, etc. Using web page quality indicators as input features and manually assessed quality levels as target categories, the classification model is trained to learn the discrimination boundary of web page quality. By maximizing the probability of correct classification, the classification model is able to master the strategy of web page quality assessment.

[0395] For clustering models, such as the K-means clustering model and the density-based spatial clustering algorithm (DBSCAN), the goal is to automatically aggregate web pages of similar quality and discover common features of different quality levels. The web page quality index is used as the input feature, and the web page samples are divided into multiple clusters using the clustering algorithm. The quality of web pages in each cluster is similar, and the quality of web pages between different clusters varies greatly. By analyzing the center points or representative samples of cada clusters, the typical characteristics and optimization directions of different quality levels can be summarized.

[0396] In the process of model training, the cross-validation method is usually used to divide the data set into multiple subsets, which are used as training sets and validation sets. Through multiple rounds of cross-validation, I can evaluate the generalization performance of the model and adjust the hyperparameters of the model to obtain the best performance.

[0397] After training is completed, the model is finally evaluated using the test set. The test set is a set of independent web page samples used to verify the model's predictive ability on unknown data. The web page quality indicators of the test set are input into the trained model, and the quality score or grade predicted by the model is compared with the actual manual evaluation results. Evaluation indicators such as mean absolute error and accuracy are calculated to measure the performance of the model.

[0398] Finally, the trained model is integrated into the webpage intelligent testing and optimization module. When a new webpage is generated, its quality indicators are extracted and input into the model for prediction. The model automatically gives the comprehensive quality score or grade of the webpage and gives corresponding optimization suggestions based on the prediction results. By continuously collecting user feedback and interaction data, I can regularly update and optimize the model so that it can adapt to the ever-changing webpage quality standards and user needs.

[0399] 6.3 Web page problem diagnosis and optimization suggestions:

[0400] Using the trained machine learning model, the online web page generation system can automatically diagnose various quality problems in the web page and give corresponding optimization suggestions. The diagnosis and suggestion process usually includes the following steps:

[0401] Problem identification: Input various indicators of the target webpage into the machine learning model to predict its quality score and grade. If the score is low or the grade is poor, it indicates that there is a quality problem with the webpage.

[0402] Problem location: Use techniques such as feature importance analysis and outlier detection to locate key indicators and page elements that cause quality problems.

[0403] Optimization suggestions: Based on the problem location results, combined with predefined optimization rules and experience knowledge base, generate targeted optimization suggestions, such as compressing images, merging CSS files, optimizing keywords, etc.

[0404] Code example:

[0405] from sklearn.ensemble import RandomForestRegressor

[0406] #Web Quality Dataset

[0407] X_train = [

[0408] [0.8, 0.9, 0.7, 0.6],

[0409] [0.6, 0.7, 0.8, 0.7],

[0410] [0.9, 0.8, 0.9, 0.8],

[0411] [0.5, 0.6, 0.7, 0.6], ]

[0413] y_train=[0.8, 0.7, 0.9, 0.6]

[0414] #Training random forest regression model

[0415] model=RandomForestRegressor()

[0416] model.fit(X_train, y_train)

[0417] #Webpage metrics to be evaluated

[0418] X_test=[[0.7, 0.8, 0.6, 0.7]]

[0419] #Predicting web page quality score

[0420] y_pred=model.predict(X_test)

[0421] print('Webpage quality score:', y_pred[0])

[0422] #Get the importance of indicators

[0423] importances=model.feature_importances_

[0424] print('Indicator importance:', importances).

[0425] 6.4 Iterative optimization of web page generation strategy:

[0426] According to the results of web page quality evaluation and user behavior analysis, the online web page generation system needs to continuously iterate and optimize the web page generation strategy. It mainly includes the following aspects:

[0427] 6.4.1 Template optimization: Based on the quality assessment results, improve the design and architecture of the web page template, such as optimizing the layout, simplifying the structure, and improving performance.

[0428] 6.4.2 Content Optimization: Adjust the content strategy of the web page based on user interests and feedback, such as adding popular topics, optimizing keywords, improving copywriting, etc.

[0429] 6.4.3 Interaction Optimization: Optimize the interaction design of web pages based on user behavior data, such as simplifying operation processes, providing personalized recommendations, and improving navigation experience.

[0430] 6.4.4 Algorithm Optimization: Based on the accumulated quality data and user feedback, continuously optimize the machine learning algorithms and models to improve the accuracy of web page quality assessment and generation.

[0431] Code example:

[0432] import tensorflow as tf

[0433] #Define model structure

[0434] model = tf.keras.Sequential([

[0435] tf.keras.layers.Dense(64, activation='relu', input_shape=(4,)),

[0436] tf.keras.layers.Dense(32, activation='relu'),

[0437] tf.keras.layers.Dense(1) ])

[0439] # Compile the model

[0440] model.compile(optimizer='adam', loss='mse', metrics=['mae'])

[0441] #Train model

[0442] history=model.fit(X_train, y_train, epochs=100, validation_split=0.2)

[0443] #Evaluate the model

[0444] loss,mae=model.evaluate(X_test,y_test)

[0445] print('Mean absolute error:',mae)

[0446] # Fine-tune the model

[0447] model.fit(X_train, y_train, epochs=50, validation_split=0.2)

[0448] #Save the optimized model

[0449] model.save('optimized_model.h5').

[0450] Through continuous web page quality assessment, user behavior analysis and generation strategy optimization, the system can continuously improve the overall quality of web pages and user experience, while also adapting to changing user needs and market trends.

[0451] (7) Web page publishing and intelligent promotion module:

[0452] After the target web page is generated, the web page publishing and intelligent promotion module hosts the target web page through a preset web server and performs search engine optimization on the target web page.

[0453] The web page online generation system uses a high-performance web server (Nginx) to host web pages, ensuring the access speed and stability of web pages. At the same time, the web page online generation system will perform SEO optimization on web pages to increase their exposure in search engines.

[0454] 7.1 Web server deployment:

[0455] You need to choose a high-performance web server to host the generated web pages. Common choices include Nginx, open source web servers (Apache HTTP Server, Apache), etc. Here, we take Nginx as an example to introduce the process of web page deployment.

[0456] Upload the generated web page files (HTML, CSS, JavaScript, etc.) to the specified directory of the server.

[0457] Configure Nginx's virtual host and specify the path of the web page file and the access domain name.

[0458] Optimize Nginx performance parameters, such as the number of concurrent connections, cache strategy, etc., to improve the access speed and stability of web pages.

[0459] Nginx configuration file:

[0460]

[0461] 7.2SEO Optimization:

[0462] In order to increase the exposure of the target web page in search engines, the web page publishing and intelligent promotion module needs to perform SEO optimization on the target web page. The main optimization strategies include:

[0463] Optimize the web page's title, description, keywords and other meta information to make it conform to the search engine's indexing rules.

[0464] Optimize the content structure of web pages, such as using semantic HTML tags and reasonable title hierarchy, to improve the readability and relevance of the content.

[0465] Optimize the link structure of web pages, such as the reasonable distribution of internal links, the authority of external links, etc., to improve the link quality and weight of web pages.

[0466] Optimize the loading speed of web pages, such as compressing files and using content delivery networks (CDNs), to improve user experience and search engine ratings.

[0467] Code example:

[0468]

[0469]

[0470] 7.3 Intelligent Promotion Engine:

[0471] After a web page is published, an intelligent promotion strategy needs to be adopted to accurately push the web page to the target audience. The main tasks of the intelligent promotion engine include:

[0472] Analyze the content and theme of the web page, extract keywords and tags, and determine the direction and scope of promotion.

[0473] Collect and analyze user behavior data, such as browsing history, search terms, interests and hobbies, to build user portraits.

[0474] Select the best promotion channels, such as search engine advertising, social media advertising, content recommendation platforms, etc., and formulate promotion strategies based on the characteristics and pricing models of different channels.

[0475] Monitor promotion results in real time, such as click-through rate, conversion rate, etc., and dynamically adjust promotion strategies and bids to achieve budget optimization and maximize results.

[0476] Code example:

[0477]

[0478] Through the analysis and optimization of the intelligent promotion engine, accurate promotion of web pages can be achieved, and promotion efficiency and return on investment can be improved.

[0479] This solution automatically converts common documents such as PPT, Word, Excel, PDF, etc. into an online system for web pages, allowing non-technical personnel to quickly create professional web pages, greatly reducing the difficulty and labor costs of web page production and improving the efficiency of web page generation.

[0480] The innovation of this solution is that it can automatically extract the document content, structure, layout, style and other information through intelligent parsing and conversion of uploaded documents, map and convert them into corresponding HTML web page codes, and support users to customize and edit web page content. The technical solution of this solution can adapt to a variety of common document formats and generate target web pages with good compatibility and high restoration.

[0481] Technical problems solved by this solution:

[0482] Solve the problem that traditional web page production requires professional front-end developers to manually write codes, which has high technical barriers and low development efficiency;

[0483] This solution uses file parsing and conversion technology to automatically convert common documents such as Word, PPT, PDF, etc. into web pages without manual coding, so that non-technical personnel can quickly create professional web pages, greatly reducing the technical threshold for web page production and improving web page development efficiency;

[0484] Solve the problem that existing web page creation tools have limited functions and cannot meet the needs of personalized web page customization;

[0485] This solution supports users to upload documents in various formats, extracts document content and style through an intelligent parsing engine, and supports users to edit, modify, and layout web page content online to meet personalized web page customization needs in different scenarios;

[0486] Solve the problem of lack of automation and intelligent means in the web page production process and low production efficiency;

[0487] This solution uses intelligent technologies such as file parsing, content extraction, and format conversion to achieve automatic generation and conversion of documents to web pages. The entire process does not require human intervention, and the efficiency of web page production is greatly improved compared to traditional methods.

[0488] The beneficial effects of this program are as follows:

[0489] Automated document conversion: This solution automatically extracts the structured data and style information of the document through the document parsing module, reducing the workload of manual document conversion and improving conversion efficiency;

[0490] Intelligent web page generation: Through the web page template matching module, this solution can automatically recommend the most similar web page template based on the content and structural characteristics of the document, realize the intelligent mapping of documents to web pages, and lower the threshold for web page development;

[0491] Personalized template selection: The system presets multiple sets of web page templates with different styles and layouts. Users can choose their favorite templates to apply according to their preferences, meeting their personalized needs;

[0492] Improved display effect: By automatically matching the optimal template, this solution can generate a web page with stronger visual appeal and more reasonable layout for the document content, thus improving the display effect of the document content and user experience;

[0493] Save development costs: The traditional document-to-webpage process requires the participation of professional webpage developers, which is costly. However, the present invention reduces the requirements for professional skills and saves development costs through automated document parsing and template matching;

[0494] Flexible and scalable: The template library of this solution can be continuously expanded and updated, supporting the addition of new template designs and layout styles. At the same time, the document parsing and template matching algorithms can also be continuously optimized to adapt to different types of documents and user needs;

[0495] Improve the efficiency of information dissemination: By automatically converting documents into web pages, this solution can speed up the dissemination of document content, allowing more people to easily access and view document information, thereby improving the efficiency of information dissemination.

[0496] In an embodiment of the present application, the document to be converted into a web page is intelligently parsed and converted, key information such as document content, structure, layout, style, etc. is automatically extracted, and the key information is converted to obtain document content features. Through a pre-trained web page template recommendation engine and document content features, the optimal web page template with the highest similarity score is automatically recommended, and intelligent mapping of documents to web pages is achieved, so that non-technical personnel can also quickly produce professional web pages, thereby reducing the threshold for web page development, the difficulty of web page production and the labor cost, and improving the efficiency of web page generation.

[0497] refer to Figure 2 As shown, an online web page generation method based on document processing disclosed in an embodiment of the present application is applied to the above embodiment. Figure 1 The online web page generation system based on document processing mainly includes the following steps:

[0498] S201: Obtain the document to be converted;

[0499] S202: Analyze the document to be converted through a pre-trained document parsing deep learning model to obtain key information.

[0500] Among them, the document parsing deep learning model includes at least a named entity recognition model, a text summarization model, a semantic role labeling model and a sentiment analysis model.

[0501] Specifically, the process of parsing the document to be converted through the pre-trained document parsing deep learning model to obtain key information is shown in E1-E7.

[0502] E1: Preprocess the document to be converted to obtain a document to be converted in a preset format; the preprocessing at least includes cleaning, word segmentation and stop word removal.

[0503] E2: Identify key entities of the document to be converted through the named entity recognition model.

[0504] E3: Use a preset algorithm (TF-IDF algorithm) to extract keywords (reflecting the theme and core content of the text) from the document to be converted.

[0505] E4: Generate a summary of the document to be converted through the text summarization model.

[0506] E5: Identify the semantic roles of the document to be converted (such as agent, patient, time, place, etc.) through the semantic role labeling model to understand the semantic structure of the text.

[0507] E6: Determine the sentiment tendency of the document to be converted (such as positive, negative, neutral, etc., to understand the author's views and attitudes) through the sentiment analysis model.

[0508] E7: Extract key information from key entities, keywords, summaries, semantic roles, and sentiment tendencies.

[0509] The execution process and execution principle of E1-E7 are similar to the above embodiments. Figure 1 The execution process and execution principle of A1-A7 are the same, which can be referred to and will not be repeated here.

[0510] S203: Transform the key information to obtain document content features.

[0511] S204: Obtain a target web page template through a pre-trained web page template recommendation engine and document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features.

[0512] The specific process of obtaining the target web page template through the pre-trained web page template recommendation engine and document content features is shown in F1-F7:

[0513] F1: Convert document content features into standardized feature vector representations.

[0514] F2: Calculate the similarity between the standardized feature vector representation and the template feature vector in the template feature library to obtain the similarity of the current document.

[0515] F3: Through collaborative filtering algorithm, the user's historical selection template and the similarity of the current document, personalized template recommendation is performed to obtain collaborative filtering results.

[0516] F4: Through the convolutional neural network (CNN), a neural network model in deep learning, semantic matching is performed on the document content features and template feature vectors to obtain deep learning results.

[0517] F5: Through reinforcement learning technology and preset recommendation template feedback, the recommendation algorithm of the web page template recommendation engine is optimized to obtain reinforcement learning results.

[0518] F6: Get a template recommendation list based on collaborative filtering results, deep learning results, and reinforcement learning results.

[0519] F7: Select the target web page template with the highest similarity score between the document content features and the template features from the template recommendation list.

[0520] The execution process and execution principle of F1-F7 are similar to those of the above embodiment. Figure 1 The execution process and execution principle of B1-B7 are the same, which can be referred to and will not be repeated here.

[0521] S205: Fill the document content data in the key information into the target web page template accordingly, and generate a corresponding initial web page.

[0522] The specific process of filling the document content data in the key information into the target web page template and generating the corresponding initial web page is shown in G1-G7.

[0523] G1: Traverse the HTML code of the target web page template.

[0524] G2: Identify various placeholders (title placeholder, paragraph placeholder, etc.) of the target web page template through the hypertext markup language code.

[0525] G3: Identify various content elements of document content data in key information.

[0526] G4: Match various content elements with various placeholders through preset matching rules; wherein the preset matching rules are rules for finding corresponding content elements according to the type of placeholder.

[0527] G5: Intelligently rewrite and optimize the text corresponding to each type of matched content element; intelligent rewriting is used to make the text concise and fluent; optimization is used to improve the efficiency of web page browsing and information acquisition.

[0528] G6: Fill the placeholders of the target web page template with the corresponding content elements after intelligent rewriting and optimization to generate the filled content.

[0529] G7: Intelligently layout and format the filled content to generate a corresponding initial web page; the intelligent layout at least includes adaptive layout and adding interactive effects; the format adjustment is used to coordinate the filled content with the design style of the target web page template.

[0530] The execution process and execution principle of G1-G7 are similar to the above embodiments. Figure 1 The execution process and execution principle of C1-C7 are the same, which can be used as a reference and will not be repeated here.

[0531] S206: Performing layout analysis on the initial webpage by using a preset layout analysis method to obtain an optimal layout solution; the preset layout analysis method is a method for analyzing the characteristics of visual elements and the spatial relationship of visual elements.

[0532] The process of performing layout analysis on the initial web page through a preset layout analysis method and obtaining the optimal layout solution is shown in H1-H5.

[0533] H1: Take a screenshot of the initial web page and perform image preprocessing on the screenshot.

[0534] H2: Through the feature extraction method, the features of visual elements are extracted from the screenshots after image preprocessing to obtain the key visual elements of the web page.

[0535] H3: Analyze the spatial relationship between the key visual elements of the web page to obtain spatial relationship information.

[0536] H4: Based on the key visual elements and spatial relationship information, a reinforcement learning model for layout optimization is constructed; the reinforcement learning model for layout optimization at least includes web page layout state representation, action space, reward function and reinforcement learning algorithm.

[0537] H5: The optimal layout solution is obtained through the reinforcement learning model of layout optimization.

[0538] The execution process and execution principle of H1-H5 are similar to the above embodiments. Figure 1 The execution process and execution principle of the web page intelligent layout optimization module are consistent, which can be used as a reference and will not be repeated here.

[0539] S207: Dynamically adjust the initial web page according to the optimal layout solution to obtain the target web page.

[0540] In S207, corresponding modification parameters are determined according to the optimal layout solution, and under the responsive layout, the cascading style sheet of the content block in the initial web page is dynamically adjusted according to the modification parameters to obtain the target web page; wherein the responsive layout is determined according to the device type and the screen size.

[0541] When a web page personalization request is received, the personalized adjustment parameters corresponding to the web page personalization request are determined through the pre-built user portrait and intent understanding model; the personalized adjustment parameters include at least content recommendation, style and interaction method. During the process of generating the target web page, the target web page is dynamically adjusted according to the personalized adjustment parameters.

[0542] Through intelligent web page quality testing and optimization engines, a multi-dimensional evaluation is performed on the target web page; the multi-dimensional evaluation at least includes page performance evaluation, user experience evaluation and SEO friendliness evaluation.

[0543] The target web page is hosted through a preset web server and search engine optimized for the target web page.

[0544] The execution process and execution principle of S201-S207 are similar to those of the above embodiment. Figure 1 The execution process and execution principle of the online web page generation system are consistent, which can be used as a reference and will not be repeated here.

[0545] In an embodiment of the present application, the document to be converted into a web page is intelligently parsed and converted, key information such as document content, structure, layout, style, etc. is automatically extracted, and the key information is converted to obtain document content features. Through a pre-trained web page template recommendation engine and document content features, the optimal web page template with the highest similarity score is automatically recommended, and intelligent mapping of documents to web pages is achieved, so that non-technical personnel can also quickly produce professional web pages, thereby reducing the threshold for web page development, the difficulty of web page production and the labor cost, and improving the efficiency of web page generation.

[0546] Based on the above embodiments Figure 2 The disclosed method for generating an online web page based on document processing, the embodiment of the present application also discloses an online web page generating device based on document processing, such as Figure 3 As shown, the online web page generation device based on document processing includes:

[0547] A first acquisition unit 301 is used to acquire a document to be converted;

[0548] A parsing unit 302 is used to parse the document to be converted through a pre-trained document parsing deep learning model to obtain key information;

[0549] The conversion unit 303 is used to convert the key information to obtain document content features;

[0550] The second acquisition unit 304 is used to obtain a target web page template through a pre-trained web page template recommendation engine and document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features;

[0551] A filling generation unit 305 is used to fill the document content data in the key information into the target web page template and generate a corresponding initial web page;

[0552] The analysis unit 306 is used to perform layout analysis on the initial web page by using a preset layout analysis method to obtain an optimal layout solution; the preset layout analysis method is a method of analyzing the characteristics of visual elements and the spatial relationship of visual elements;

[0553] The first adjusting unit 307 is used to dynamically adjust the initial web page according to the optimal layout solution to obtain a target web page.

[0554] Furthermore, the parsing unit 302 includes:

[0555] A preprocessing module is used to preprocess the document to be converted to obtain a document to be converted in a preset format; the preprocessing includes at least cleaning, word segmentation and stop word removal;

[0556] A first recognition module, used for identifying key entities of the document to be converted through a named entity recognition model;

[0557] A first extraction module, used to extract keywords from the document to be converted using a preset algorithm;

[0558] A generation module, used to generate a summary of the document to be converted through a text summary model;

[0559] A second recognition module is used to identify the semantic role of the document to be converted through a semantic role labeling model;

[0560] A first determination module is used to determine the sentiment tendency of the document to be converted through a sentiment analysis model;

[0561] The second extraction module is used to extract key information from key entities, keywords, summaries, semantic roles and sentiment tendencies.

[0562] Furthermore, the second acquisition unit 304 includes:

[0563] A conversion module, used to convert document content features into standardized feature vector representations;

[0564] A calculation module is used to calculate the similarity between the standardized feature vector representation and the template feature vector in the template feature library to obtain the similarity of the current document;

[0565] The recommendation module is used to make personalized recommendations of templates through collaborative filtering algorithms, the similarity between the user's historical selection templates and the current document, and obtain collaborative filtering results;

[0566] The first matching module is used to perform semantic matching between document content features and template feature vectors through a convolutional neural network, a neural network model in deep learning, to obtain a deep learning result;

[0567] An optimization module is used to optimize the recommendation algorithm of the webpage template recommendation engine through reinforcement learning technology and preset recommendation template feedback to obtain reinforcement learning results;

[0568] The third acquisition module is used to obtain a template recommendation list according to the collaborative filtering results, the deep learning results and the reinforcement learning results;

[0569] The selection module is used to select a target web page template with the highest similarity score between document content features and template features from the template recommendation list.

[0570] Further, filling the generation unit includes:

[0571] A traversal module, used for traversing the hypertext markup language code of the target web page template;

[0572] A third identification module is used to identify various placeholders of the target web page template through the hypertext markup language code;

[0573] A first determination module is used to determine various content elements of document content data in key information;

[0574] A second matching module is used to match various content elements with various placeholders according to preset matching rules; wherein the preset matching rules are rules for finding corresponding content elements according to the type of placeholder;

[0575] The rewriting optimization module is used to intelligently rewrite and optimize the text corresponding to the matched content elements; intelligent rewriting is used to make the text concise and fluent; optimization is used to improve the efficiency of web browsing and information acquisition;

[0576] A filling module is used to fill various content elements after intelligent rewriting and optimization into the placeholders of the target web page template to generate filled content;

[0577] The generation module is used to intelligently layout and format the filled content to generate the corresponding initial web page; the intelligent layout at least includes adaptive layout and adding interactive effects; the format adjustment is used to make the filled content coordinated with the design style of the target web page template.

[0578] Furthermore, the analysis unit 306 includes:

[0579] A screenshot processing module is used to take a screenshot of the initial web page and perform image preprocessing on the screenshot;

[0580] A feature extraction module is used to extract the features of visual elements from the screenshot after image preprocessing through a feature extraction method to obtain various key visual elements of the web page;

[0581] An analysis module is used to analyze the spatial relationship between various key visual elements of a web page to obtain spatial relationship information;

[0582] A construction module is used to construct a reinforcement learning model for layout optimization based on each key visual element and spatial relationship information; the reinforcement learning model for layout optimization at least includes a web page layout state representation, an action space, a reward function, and a reinforcement learning algorithm;

[0583] The fourth acquisition module is used to obtain the optimal layout solution through a reinforcement learning model of layout optimization.

[0584] Furthermore, the first adjustment unit 307 includes:

[0585] A second determination module is used to determine corresponding modification parameters according to the optimal layout solution;

[0586] The adjustment module is used to dynamically adjust the cascading style sheet of the content block in the initial web page according to the modification parameters under the responsive layout to obtain the target web page; wherein the responsive layout is determined according to the device type and the screen size.

[0587] Furthermore, the online web page generation device based on document processing also includes:

[0588] A determination unit, configured to, when receiving a web page personalization request, determine the personalization adjustment parameters corresponding to the web page personalization request by using a pre-built user portrait and intention understanding model; the personalization adjustment parameters at least include content recommendation, style, and interaction mode;

[0589] The second adjustment unit is used to dynamically adjust the target webpage according to the personalized adjustment parameters during the process of generating the target webpage.

[0590] Furthermore, the online web page generation device based on document processing also includes:

[0591] The evaluation unit is used to perform multi-dimensional evaluation on the target web page through intelligent web page quality testing and optimization engine; the multi-dimensional evaluation at least includes page performance evaluation, user experience evaluation and search engine optimization friendliness evaluation.

[0592] Furthermore, the online web page generation device based on document processing also includes:

[0593] The hosting optimization unit is used to host the target web page through a preset web server and perform search engine optimization on the target web page.

[0594] In an embodiment of the present application, the document to be converted into a web page is intelligently parsed and converted, key information such as document content, structure, layout, style, etc. is automatically extracted, and the key information is converted to obtain document content features. Through a pre-trained web page template recommendation engine and document content features, the optimal web page template with the highest similarity score is automatically recommended, and intelligent mapping of documents to web pages is achieved, so that non-technical personnel can also quickly produce professional web pages, thereby reducing the threshold for web page development, the difficulty of web page production and the labor cost, and improving the efficiency of web page generation.

[0595] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the online web page generation method based on document processing as described above.

[0596] The present application also provides an electronic device, whose structural diagram is as follows: Figure 4 As shown, it specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to execute the one or more instructions 402 to perform the above-mentioned document processing-based online web page generation method.

[0597] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0598] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0599] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.

[0600] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0601] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0602] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating online web pages based on document processing, characterized in that: The method comprises: Get the document to be converted; Parsing the document to be converted by using a pre-trained document parsing deep learning model to obtain key information; Transforming the key information to obtain document content features; Obtaining a target web page template through a pre-trained web page template recommendation engine and the document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features; Fill the document content data in the key information into the target web page template accordingly, and generate a corresponding initial web page; Performing layout analysis on the initial webpage by a preset layout analysis method to obtain an optimal layout solution; the preset layout analysis method is a method for analyzing the characteristics of visual elements and the spatial relationship of visual elements; The initial web page is dynamically adjusted according to the optimal layout solution to obtain a target web page.

2. The method according to claim 1, characterized in that The document parsing deep learning model at least includes a named entity recognition model, a text summarization model, a semantic role labeling model and a sentiment analysis model. The document to be converted is parsed by the pre-trained document parsing deep learning model to obtain key information, including: Preprocessing the document to be converted to obtain a document to be converted in a preset format; the preprocessing at least includes cleaning, word segmentation and stop word removal; Identify key entities of the document to be converted by using the named entity recognition model; Extracting keywords from the document to be converted using a preset algorithm; Generate a summary of the document to be converted by using the text summary model; Identifying the semantic role of the document to be converted by using the semantic role labeling model; Determine the sentiment tendency of the document to be converted by using the sentiment analysis model; Key information is extracted from the key entities, the keywords, the abstract, the semantic roles and the sentiment tendency.

3. The method according to claim 1, characterized in that The method of obtaining a target web page template by using a pre-trained web page template recommendation engine and the document content features includes: Converting the document content features into standardized feature vector representations; Calculating similarity between the standardized feature vector representation and the template feature vector in the template feature library to obtain the similarity of the current document; Through collaborative filtering algorithm, similarity between user's historically selected templates and current documents, personalized template recommendations are made to obtain collaborative filtering results. Through a convolutional neural network, a neural network model in deep learning, semantic matching is performed on the document content features and the template feature vector to obtain a deep learning result; Through reinforcement learning technology and preset recommendation template feedback, the recommendation algorithm of the web page template recommendation engine is optimized to obtain reinforcement learning results; Obtaining a template recommendation list according to the collaborative filtering results, the deep learning results, and the reinforcement learning results; A target webpage template having the highest similarity score between the document content feature and the template feature is selected from the template recommendation list.

4. The method according to claim 1, characterized in that: The step of filling the target webpage template with the document content data in the key information and generating a corresponding initial webpage includes: Traversing the HTML code of the target web page template; Identify various placeholders of the target web page template through the hypertext markup language code; Determine various content elements of document content data in key information; Matching various content elements with various placeholders through preset matching rules; wherein the preset matching rules are rules for finding corresponding content elements according to the type of placeholder; Intelligently rewrite and optimize the text corresponding to each type of content element after matching; the intelligent rewriting is used to make the text concise and fluent; the optimization is used to improve the efficiency of web page browsing and information acquisition; Filling the intelligently rewritten and optimized content elements into the placeholders of the target webpage template to generate filled content; The filled content is intelligently typeset and formatted to generate a corresponding initial web page; the intelligent typesetting includes at least adaptive layout and adding interactive effects; the formatting is used to coordinate the filled content with the design style of the target web page template.

5. The method according to claim 1, characterized in that The performing layout analysis on the initial webpage by a preset layout analysis method to obtain an optimal layout solution includes: Taking a screenshot of the initial webpage, and performing image preprocessing on the screenshot; Through the feature extraction method, the visual elements of the screenshots after image preprocessing are extracted to obtain the key visual elements of the web page; Analyze the spatial relationship between key visual elements of a web page to obtain spatial relationship information; Constructing a reinforcement learning model for layout optimization according to the key visual elements and the spatial relationship information; the reinforcement learning model for layout optimization includes at least a web page layout state representation, an action space, a reward function and a reinforcement learning algorithm; The optimal layout solution is obtained through the reinforcement learning model of layout optimization.

6. The method according to claim 1, characterized in that The dynamically adjusting the initial webpage according to the optimal layout solution to obtain the target webpage includes: According to the optimal layout solution, determining corresponding modification parameters; Under the responsive layout, the cascading style sheet of the content block in the initial web page is dynamically adjusted according to the modification parameters to obtain the target web page; wherein the responsive layout is determined according to the device type and the screen size.

7. The method according to claim 1, characterized in that Also includes: When a web page personalization request is received, the personalized adjustment parameters corresponding to the web page personalization request are determined through the pre-built user portrait and intent understanding model; The personalized adjustment parameters include at least content recommendation, style and interaction mode; During the process of generating the target webpage, the target webpage is dynamically adjusted according to the personalized adjustment parameters.

8. The method according to claim 1, characterized in that Also includes: Through intelligent web page quality testing and optimization engines, a multi-dimensional evaluation is performed on the target web page; the multi-dimensional evaluation at least includes page performance evaluation, user experience evaluation and search engine optimization friendliness evaluation.

9. The method according to claim 1, characterized in that: After dynamically adjusting the initial webpage according to the optimal layout solution to obtain the target webpage, the method further includes: The target web page is hosted by a preset web server, and search engine optimization is performed on the target web page.

10. An online web page generation device based on document processing, characterized in that: The device comprises: A first acquisition unit, used to acquire a document to be converted; A parsing unit, used to parse the document to be converted through a pre-trained document parsing deep learning model to obtain key information; A conversion unit, used to convert the key information to obtain document content features; A second acquisition unit is used to obtain a target web page template through a pre-trained web page template recommendation engine and the document content features; the target web page template is an optimal web page template having the highest similarity score between the document content features and the template features; A filling generation unit, used to fill the document content data in the key information into the target web page template accordingly, and generate a corresponding initial web page; An analysis unit, configured to perform layout analysis on the initial webpage in a preset layout analysis manner to obtain an optimal layout solution; the preset layout analysis manner is a manner of analyzing the characteristics of visual elements and the spatial relationship of visual elements; The first adjustment unit is used to dynamically adjust the initial web page according to the optimal layout solution to obtain a target web page.

Citation Information

Cited By

  • New report automatic generation method and system based on data feature learning

    CN119294379A

  • Free grid layout conversion system and method based on WEB end and storage medium

    CN119441658A

  • Slide display direction switching method and device

    CN119884397A

  • Slide show direction switching method and device

    CN119884397B

  • Intelligent printing and typesetting method and device based on machine learning

    CN119885902A