CN111273903B - Webpage making method and device, computer equipment and computer storage medium - Google Patents

Webpage making method and device, computer equipment and computer storage medium Download PDF

Info

Publication number
CN111273903B
CN111273903B CN202010025110.9A CN202010025110A CN111273903B CN 111273903 B CN111273903 B CN 111273903B CN 202010025110 A CN202010025110 A CN 202010025110A CN 111273903 B CN111273903 B CN 111273903B
Authority
CN
China
Prior art keywords
processing module
current
module
preset
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010025110.9A
Other languages
Chinese (zh)
Other versions
CN111273903A (en
Inventor
李西峙
陈清华
张郭璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tatfook Network Tech Co Ltd
Original Assignee
Shenzhen Tatfook Network Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tatfook Network Tech Co Ltd filed Critical Shenzhen Tatfook Network Tech Co Ltd
Priority to CN202010025110.9A priority Critical patent/CN111273903B/en
Publication of CN111273903A publication Critical patent/CN111273903A/en
Application granted granted Critical
Publication of CN111273903B publication Critical patent/CN111273903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a webpage making method, a webpage making device, computer equipment and a computer storage medium, wherein the webpage making method comprises the steps of receiving webpage making text; dividing text content of a webpage making text to obtain one or more processing modules, and determining a module type of each processing module; converting one or more processing modules into one or more corresponding target format objects according to the module type of each processing module; and sequentially rendering one or more target format objects to generate a webpage corresponding to the webpage making text. By means of the method, text content in webpage making texts input in any format can be converted into different types of module objects in specific formats, the module objects in the specific formats are sequentially rendered to generate the webpage, various editing modes are input and combined to complete webpage making, flexibility of a webpage making method is improved, and diversified webpage making requirements are met.

Description

Webpage making method and device, computer equipment and computer storage medium
Technical Field
The present invention relates to the field of web page manufacturing technologies, and in particular, to a web page manufacturing method, a web page manufacturing device, a computer device, and a computer storage medium.
Background
In recent years, with the development of computer networks, various application services are generated, and these application services are mostly presented in the form of web pages, so how to develop web pages quickly and conveniently is a problem to be solved. In the prior art, when a professional webpage developer generates a webpage source code corresponding to a webpage by manually typing in a logic code through learning programming languages such as HTML (Hypertext Marked Language, hypertext markup language), CSS (Cascading Style Sheets, cascading style sheet) and JS (JavaScript), so as to complete the webpage production. Another method for making web pages is to edit web pages using a simpler programming language, such as Markdown, which is a markup language that can make plain text content have a certain format by a simple markup syntax; however, because of the characteristics of the grammar structure of the Markdown language, the code parsing process is complex, and YAML (Yet Another Markup Language, another markup language) is a format with high readability and used for expressing data serialization; at present, some web page editing platforms exist on the market, but most of the web page editing platforms only support Markdown or other editing languages, are not well compatible with input formats of various editing languages, and are difficult to meet diversified web page manufacturing requirements.
Disclosure of Invention
In order to solve the above problems, the present application provides a method, an apparatus, a computer device and a computer storage medium for web page creation, which are capable of converting text content in a web page creation text input in any format into different types of module objects in a specific format, and sequentially rendering the module objects in the specific format to generate a web page, so as to implement various editing modes to input and combine to complete web page creation, improve flexibility of the web page creation method, and meet diversified web page creation requirements.
In a first aspect, the present application provides a method for making a web page, the method including:
receiving a webpage making text;
dividing text content of a webpage making text to obtain one or more processing modules, and determining a module type of each processing module;
converting one or more processing modules into one or more corresponding target format objects according to the module type of each processing module;
and sequentially rendering one or more target format objects to generate a webpage corresponding to the webpage making text.
In a second aspect, the present application provides a web page creation apparatus, including:
the receiving unit is used for receiving the webpage making text;
the dividing unit is used for dividing the text content of the webpage making text to obtain one or more processing modules and determining the module type of each processing module;
the conversion unit is used for converting one or more processing modules into one or more corresponding target format objects according to the module type of each processing module;
and the rendering unit is used for sequentially rendering one or more target format objects and generating a webpage corresponding to the webpage making text.
In a third aspect, the present application provides a computer device comprising a memory and a processor interconnected to:
the memory is used for storing a computer program;
the processor is configured to execute the computer program and implement the above-described web page making method when executing the computer program.
In a fourth aspect, the present application provides a computer storage medium storing a computer program for implementing the above-described web page making method when executed by a processor.
The application provides a webpage making method, a webpage making device, computer equipment and a computer storage medium, wherein text contents of received webpage making texts are divided to obtain one or more processing modules with different module types, and each processing module is converted into a corresponding target format object according to the module type of each processing module; rendering each target format object in turn to generate a webpage corresponding to the webpage making text, and finishing the webpage making; according to the webpage making method, text contents in webpage making texts input in any format can be converted into different types of module objects in specific formats, various editing modes are supported to be input and combined to complete webpage making, webpage developers can conveniently use various programming languages to combine to complete webpage making, flexibility of the webpage making method is improved, diversified webpage making requirements are met, and webpage making efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flowchart illustrating an embodiment of a method for creating a web page according to the present application;
FIG. 2 is a flowchart illustrating another embodiment of a method for creating a web page according to the present application;
FIG. 3 is a schematic flow chart of step 23 in the embodiment shown in FIG. 2;
FIG. 4 is a flow chart of step 233 in the embodiment shown in FIG. 3;
FIG. 5 is a flow chart of step 234 in the embodiment shown in FIG. 3;
FIG. 6 is a schematic diagram illustrating an embodiment of a webpage making apparatus provided in the present application;
FIG. 7 is a schematic diagram of an embodiment of a computer device provided herein;
fig. 8 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations. In addition, although the division of the functional block units is performed in the apparatus schematic, in some cases, the block division may be different from that in the apparatus schematic.
The embodiment of the application provides a webpage making method, a webpage making device, computer equipment and a computer storage medium, which can be applied to the technical field of webpage making. The editing method of the webpage text can be applied to a terminal or a server, wherein the terminal can be electronic equipment such as a notebook computer, a desktop computer, a personal digital assistant and the like; the servers may be independent servers or may be server clusters.
Referring to fig. 1, fig. 1 is a flowchart of an embodiment of a method for making a web page provided in the present application, where the method includes:
step 11: and receiving webpage making text.
The webpage making text is a text input by a user at a client, and specifically can be an input text generated by inputting webpage editing specific editing contents into a webpage editing page of a webpage making platform, wherein the webpage making text comprises text contents input in at least one editing language format.
In some embodiments, the web page production text may include text content entered in any one or more of a number of language formats, such as text, numbers, strings, pictures, markdown language format, html+css+js language format, or YAML language format.
Step 12: dividing the text content of the webpage making text to obtain one or more processing modules, and determining the module type of each processing module.
After receiving the webpage making text, dividing the text content of the webpage making text according to different editing language formats to obtain one processing module of a determined module type or a plurality of processing modules of different module types.
For example, the text content of the input web page production text includes a text format, a picture format, a Markdown language format and a YAML language format, and is divided into 4 processing modules of different module types according to the difference of the editing language formats, and the module types are a text module, a picture module, a Markdown language module and a YAML language module respectively. The text content may be divided into 4 or more processing modules according to the sequential structure of the actual input content.
Alternatively, in other embodiments, text content in which several language formats are similar may be divided into one module type, and one or more other language formats into another module type, and the text content may be divided into several processing modules according to the sequential structure of the actual input content.
In this embodiment, the processing module types include a preset type and a non-preset type, where the preset type may include a Markdown language format type and other language format types, and the non-preset type includes a YAML language format type.
In some embodiments, the text content may be partitioned according to a preset regular expression, resulting in one or more processing modules, and determining a module type for each processing module.
Step 13: one or more processing modules are converted into corresponding one or more target format objects according to the module type of each processing module.
After the text content is divided to obtain one or more processing modules, the module type of each processing module can be judged, and the target format conversion is carried out on each processing module according to the module type of each processing module, so that a target format object corresponding to each processing module is obtained.
Specifically, the target format object may be an object in JSON (JavaScript Object Notation, JS object profile) format.
Step 14: and sequentially rendering one or more target format objects to generate a webpage corresponding to the webpage making text.
After obtaining one or more target format objects, sequentially transmitting each target format object to an HTML page browser for rendering according to the sequence from top to bottom, generating a webpage corresponding to the webpage making text, and displaying.
The embodiment provides a webpage making method, which is characterized in that text contents of received webpage making texts are divided to obtain one or more processing modules with different module types, and each processing module is converted into a corresponding target format object according to the module type of each processing module; rendering each target format object in turn to generate a webpage corresponding to the webpage making text, and finishing the webpage making; the webpage making method can convert text content in webpage making texts input in any format into different types of module objects in specific formats, supports various editing modes to input and combine to complete webpage making, facilitates webpage developers to complete webpage making by adopting various programming language combinations, improves flexibility of the webpage making method, meets diversified webpage making requirements, and improves webpage making efficiency.
Referring to fig. 2, fig. 2 is a flowchart of another embodiment of a method for making a web page provided in the present application, where the method includes:
step 21: and receiving webpage making text.
The webpage making text is a text input by a user at a client, and specifically can be an input text generated by inputting webpage editing specific editing contents into a webpage editing page of a webpage making platform, wherein the webpage making text comprises text contents input in at least one editing language format.
Step 22: and dividing the text content of the webpage making text according to the rows to obtain row content corresponding to each row of the text content, and sequentially storing the row content in a row content list.
After receiving the webpage making text, the text content of the webpage making text can be divided according to the sequence of the rows, and the row content of each row is sequentially stored in a row content list.
Step 23: traversing the row content in the row content list, dividing the row content list according to a preset regular expression to obtain one or more processing modules, and determining the module type of each processing module and the row content of each processing module.
Traversing the row content list to sequentially acquire all the row contents in the row content list, judging the row contents by using a preset regular expression to acquire all the row contents of each processing module, determining the module type of each processing module until the row contents of the last row in the row content list are traversed to acquire one or more processing modules.
In some embodiments, as shown in fig. 3, the steps of traversing the row contents in the row content list, dividing the row content list according to a preset regular expression to obtain one or more processing modules, and determining the module type of each processing module and the row content of each processing module include steps 231-234:
step 231: and sequentially acquiring the row contents in the row content list as the current row contents.
When traversing the row content list, row contents can be acquired sequentially from top to bottom, and the currently acquired row contents are used as current row contents.
Step 232: and judging whether the current processing module exists or not.
Before judging the current line content by using a preset regular expression, judging whether the current processing module exists or not, and executing step 233 if the current processing module does not exist; if the current processing module exists, step 234 is performed.
The current processing module is a processing module which is generated when the text content is divided, is generated when the beginning line of one processing module is identified, and is ended when the ending line of the processing module is identified.
In some embodiments, a current processing module variable may be set, including the contents of a module number, a module type, a module title, and specific data, and at the end of the current processing module, the current processing module variable may be emptied.
Step 233: if the current processing module does not exist, generating the current processing module, determining a starting line of the current processing module of the current behavior, judging the content of the current line according to a preset first regular expression, and determining the module type of the current processing module.
The module types comprise preset types and non-preset types, when the current processing module does not exist or the last processing module is finished, the current processing module can be regenerated, takes the current line as a starting line, and determines the module type of the current processing module by judging whether the content of the current line accords with a preset first regular expression.
In some embodiments, as shown in FIG. 4, the step of determining the module type of the current processing module includes steps 2331-2333 of determining the current row content based on a preset first regular expression:
step 2331: and judging whether the current line content accords with a preset first regular expression or not.
The preset first regular expression can be set at will according to actual requirements.
For example, "/" is set as a first regular expression, the identifiable character string of which is "" and "" can be used as the beginning identifier of a non-preset type module, and whether the current line content accords with the preset first regular expression "/" is determined by judging whether the current line content accords with the preset first regular expression "/" is "/w/", and the first regular expression is set as "$/", so that whether the module type of the current processing module is of a non-preset type is determined.
Step 2332: if the current line content accords with the preset first regular expression, determining that the module type of the current processing module is a non-preset type.
If the current line content accords with the preset first regular expression, the module type of the current processing module is a non-preset type, a corresponding target format object of the non-preset type can be generated at the moment, and meanwhile, the attribute value of the module type of the current processing module is determined to be the non-preset type.
Step 2333: if the current line content does not accord with the preset first regular expression, determining that the module type of the current processing module is a preset type.
If the current line content does not accord with the preset first regular expression, the module type of the current processing module is a preset type, a target format object of the preset type can be generated at the moment, and meanwhile, the attribute value of the module type of the current processing module is determined to be the preset type.
Step 234: if the current processing module exists, judging the content of the current line according to the module type of the current processing module and a preset second regular expression, and determining the ending line of the current processing module.
If the current processing module is determined to exist and the current processing module is not ended, an ending row of the current processing module can be obtained according to the module type of the current processing module, a preset first regular expression and a preset second regular expression.
Specifically, when the module type of the current processing module is a non-preset type, if the ending line of the module of the current processing module is identified according to a preset second regular expression, the current processing module is indicated to be ended. When the module type of the current processing module is a preset type, if the starting line of the next processing module is identified according to a preset first regular expression, the current processing module is indicated to be ended.
In some embodiments, as shown in fig. 5, the step of determining the ending line of the current processing module includes steps 2341-2344 of determining the current line content according to the module type of the current processing module and the preset second regular expression:
step 2341: and judging whether the current line content accords with a preset second regular expression or not.
The preset second regular expression can be set at will according to actual requirements.
For example, the preset second regular expression may be "/-) and the identifiable character string is" "," "may be used as the end identifier of the non-preset type module, and whether the current processing module ends is determined by determining whether the current row content conforms to the preset second regular expression"/-) and "/".
Step 2342: if the current line content accords with the preset second regular expression and the module type of the current processing module is of a non-preset type, determining that the current processing module is ended, and ending the line of the current processing module according to the current behavior.
For example, when the module type of the current processing module is determined to be a non-preset type and it is determined that the current line content accords with a preset second regular expression "/(" $/"), the ending line of the current processing module is indicated, and the line content of the current processing module includes all line contents from the starting line to the current line.
Specifically, the module type of the current processing module may be determined according to an attribute value representing the module type in the current processing module.
Step 2343: if the current line content does not accord with the preset second regular expression and the module type of the current processing module is of a non-preset type, continuing to acquire the next line content for judgment until the next line content accords with the preset second regular expression, determining that the current processing module is ended, and the next line is an ending line of the current processing module.
When the module type of the current processing module is determined to be a non-preset type and the current line content is judged to be not in accordance with the preset second regular expression, the current processing module is indicated to still belong to the current processing module, the current processing module is not ended, the next line content can be continuously acquired at the moment, the next line content is taken as the current line content, the judgment operation is executed until the current line content is in accordance with the preset second regular expression, the current processing module is ended at the moment, and the line content of the current processing module comprises all line contents from the beginning line to the ending line.
Step 2344: if the module type of the current processing module is the preset type, continuing to acquire the content of the next row for judgment until the content of the next row accords with the preset first regular expression, determining that the current processing module is ended, and the previous row of the next row is the ending row of the current processing module.
If the module type of the current processing module is the preset type, the current processing module is not ended no matter whether the current line accords with the preset second regular expression, the next line content is continuously acquired at the moment to be used as the current line to be judged until the acquired current line content accords with the preset first regular expression, the current line content is indicated to belong to the starting line of the next processing module, the current processing module is determined to be ended at the moment, and the previous line of the starting line of the next processing module is used as the ending line of the current processing module.
The method comprises the steps of identifying a starting line of a current processing module by using a preset first regular expression, identifying an ending line of the current processing module by using a preset second regular expression, thereby determining all line contents of the current processing module, dividing text contents into at least one processing module, and determining the module type of the current processing module.
After traversing all the line contents in the line content list according to the above steps, the line content list may be divided into at least one processing module, and a module type of each processing module and a line content of each processing module may be determined.
Step 24: judging whether the module type of the current processing module is a preset type or not.
Specifically, it may be determined whether the module type of the current processing module is a preset type according to the module type of each processing module obtained in step 23.
Step 25: and if the module type of the current processing module is a preset type, taking the row content of the current processing module as target format data.
When the module type of the current processing module is a preset type, the target format data can be set as the row content of the current processing module, and then the target format object is generated according to the target format data.
For example, when the module type of the current processing module is in Markdown format, the target format data is the line content of the current processing module.
Step 26: and if the module type of the current processing module is a non-preset type, calling a preset format conversion plug-in to convert the row content of the current processing module into target format data.
The preset format conversion plug-in may be a JS-YAML library, for example, when the module type of the current processing module is a non-preset type, the JS-YAML library may be called to perform format conversion on the line content of the current processing module to obtain target format data, and then the target format data is used to generate a target format object.
In some embodiments, a current processing module variable and a module object list may be set, row content and target format data of the current processing module may be assigned to the current processing module variable to generate a current target format object, and the current processing module variable may be emptied after the current target format object is stored in the module object list.
Specifically, in the process of traversing the row content list to generate the current processing module, all row contents belonging to the current processing module obtained by traversing are assigned to the current processing module variable, and the target format data obtained by executing the step 25 or the step 26 is assigned to the current processing module variable, so that a current target format object is generated, the current target format object can be stored in a preset module object list, after the current target format object is stored, the current processing module variable can be emptied to generate a next processing module, and the data of the next processing module is reassigned to the current processing module variable.
After one or more target format objects are generated, each target format object is rendered in turn, so that a webpage corresponding to webpage making text is generated, and the specific steps comprise a step 27 and a step 28.
Step 27: and sequentially acquiring one or more target format objects as current rendering objects, and loading a corresponding configuration attribute list according to the module type of the current rendering objects.
Each target format object can be sequentially acquired according to the storage sequence of the target format objects to be rendered, and the target format object which is currently pre-rendered is used as a current rendering object; since the module types of the target format objects may be different, the module type of the current rendering object may be identified, and a corresponding configuration attribute list including configuration attributes corresponding to each target format object is loaded according to the different module types.
Step 28: and loading the configuration component according to the configuration attribute list, and assigning the data of the current rendering object to the configuration component so as to complete the rendering of the current rendering object.
The target format object comprises at least one configuration component, a program corresponding to the configuration component can be loaded according to the configuration attribute list, and data of the current rendering object is transferred to the configuration component, so that the rendering of the current rendering object is completed.
For example, cmd is an attribute name to distinguish between different module formats; the modType is a character string and consists of 'Mod' and cmd, and the type is a format in a configuration attribute list; the component is a configuration component in a configuration attribute list; assume that the module object list is: [ { cmd: 'Markdown', modType: 'ModMarkDown' }, { cmd: 'title', modType: 'ModTitle' }), the corresponding list of configuration attributes is: [ { type: 'ModMarkDown', component: markdown component }, { type: 'ModTitle', component: titleComponent } ]; traversing the module object list, if the current target format object is { cmd: 'Markdown', modType: 'ModMarkdown' }, searching a configuration component 'Markdown component' from the configuration attribute list, and loading a program corresponding to the configuration component 'Markdown component'; if the current target format object is { cmd:
'title', modType: 'ModTitle' }, then find configuration component from the configuration property list
'TitleComponent' and load the program corresponding to the configuration component 'TitleComponent'.
The embodiment provides a webpage making method, which divides text content in any format into one or more processing modules with different module types through a regular expression, and converts each processing module into a corresponding target format object according to the module type of each processing module; rendering each target format object in turn to generate a webpage corresponding to the webpage making text; based on the characteristics of clear structure and low learning cost of Markdown language and YAML language, the webpage making method in the embodiment can convert text content in webpage making texts input in any format into module objects in different types of specific formats, support the input combination of a plurality of editing modes such as Markdown language and YAML language to finish webpage making, be simple and easy for non-professional programmers, reduce industry thresholds of webpage making, facilitate webpage developers to finish webpage making by adopting a plurality of programming language combinations such as Markdown language and YAML language, improve flexibility of the webpage making method, meet diversified webpage making requirements, and improve webpage making efficiency.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a web page making device provided in the present application, where the web page making device 60 may be configured in a terminal or a server for executing the foregoing web page making method.
As shown in fig. 6, the web page making apparatus 60 includes a receiving unit 61, a dividing unit 62, a converting unit 63, and a rendering unit 64, which are sequentially connected.
The receiving unit 61 is configured to receive web page production text.
The dividing unit 62 is configured to divide text content of the web page production text to obtain one or more processing modules, and determine a module type of each processing module.
The conversion unit 63 is configured to convert one or more processing modules into corresponding one or more target format objects according to the module type of each processing module.
The rendering unit 64 is configured to sequentially render one or more objects in a target format, and generate a web page corresponding to the web page production text.
The webpage making device 60 in this embodiment may be a programmable hardware device such as a computer, and can convert text content in any format into an object in JSON format; for non-professional programmers, different programming languages may be used, such as: and (3) the web pages are manufactured by simple and easy-to-learn programming languages such as MarkDown or YAML, so that the industry threshold of web page manufacturing is reduced, and the web page manufacturing efficiency is improved.
In some embodiments, as shown in fig. 6, the dividing unit 62 includes a text dividing unit 621 and a module dividing unit 622 connected to each other.
The text dividing unit 621 is configured to divide the text content of the web page production text according to the rows to obtain row content corresponding to each row of the text content, and sequentially store the row content in the row content list.
The module dividing unit 622 is configured to traverse the row content in the row content list, divide the row content list according to a preset regular expression, obtain one or more processing modules, and determine a module type of each processing module and a row content of each processing module.
In some embodiments, as shown in fig. 6, the module dividing unit 622 includes a row acquiring unit 6221 and a module judging unit 6222 connected to each other.
The line acquisition unit 6221 is configured to sequentially acquire line contents in the line content list as current line contents.
The module judging unit 6222 is configured to judge whether or not the current processing module exists; if the current processing module does not exist, generating the current processing module, determining a starting line of the current processing module of the current behavior, judging the content of the current line according to a preset first regular expression, and determining the module type of the current processing module, wherein the module type comprises a preset type and a non-preset type; if the current processing module exists, judging the content of the current line according to the module type of the current processing module and a preset second regular expression, and determining the ending line of the current processing module.
In some embodiments, as shown in fig. 6, the module determining unit 6222 includes a type determining unit 62221 and a module end determining unit 62222 connected to each other.
The type determining unit 62221 is configured to determine whether the current line content conforms to a preset first regular expression.
The module end determining unit 62222 is configured to determine whether the current row content conforms to a preset second regular expression.
In some embodiments, as shown in fig. 6, the conversion unit 63 includes a data generation unit 631 and an object storage unit 632 connected to each other.
The object conversion unit 631 is configured to determine whether a module type of a current processing module is a preset type; if the module type of the current processing module is a preset type, taking the row content of the current processing module as target format data; and if the module type of the current processing module is a non-preset type, calling a preset format conversion plug-in to convert the row content of the current processing module into target format data.
The object storage unit 632 is configured to set a current processing module variable and a module object list, assign the row content and the target format data of the current processing module to the current processing module variable to generate a current target format object, and empty the current processing module variable after the current target format object is stored in the module object list.
In some embodiments, as shown in fig. 6, the rendering unit 64 includes an object acquisition unit 641 and a configuration component loading unit 642 which are sequentially connected.
The object obtaining unit 641 is configured to sequentially obtain one or more target format objects as current rendering objects, and load a corresponding configuration attribute list according to a module type of the current rendering object.
The configuration component loading unit 642 is configured to load a configuration component according to the configuration attribute list, and assign data of the current rendering object to the configuration component, so as to complete rendering of the current rendering object.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of a computer device provided in the present application, where the computer device 70 includes a memory 71 and a processor 72 connected to each other, and the memory 71 is used for storing a computer program, and the processor is used for executing the computer program and implementing the web page making method in the above embodiment when executing the computer program.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application, where the computer storage medium 80 is used to store a computer program 81, and the computer program 81, when executed by a processor, is used to implement the flat cable control method in the above embodiment.
The computer storage medium 80 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, etc. various media capable of storing program codes.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is only examples of the present application, and is not intended to limit the scope of the patent application, and all equivalent structures or equivalent processes using the descriptions and the contents of the present application or other related technical fields are included in the scope of the patent application.

Claims (7)

1. A method of making a web page, comprising:
receiving a webpage making text;
dividing the text content of the webpage making text according to rows to obtain row content corresponding to each row of the text content, and sequentially storing the row content in a row content list;
sequentially acquiring row contents in the row content list as current row contents;
judging whether the current processing module exists or not;
if the current processing module does not exist, generating the current processing module, determining a current behavior, namely a starting line of the current processing module, judging the content of the current line according to a preset first regular expression, and determining the module type of the current processing module, wherein the module type comprises a preset type and a non-preset type;
if the current processing module exists, judging whether the current line content accords with a preset second regular expression or not;
if the current line content accords with the preset second regular expression and the module type of the current processing module is the non-preset type, determining that the current processing module is ended, and performing the current operation on an ending line of the current processing module;
if the current line content does not accord with the preset second regular expression and the module type of the current processing module is the non-preset type, continuing to acquire the next line content for judgment until the next line content accords with the preset second regular expression, determining that the current processing module is ended, and the next line is an ending line of the current processing module;
if the module type of the current processing module is the preset type, continuing to acquire the next row of content for judgment until the next row of content accords with the preset first regular expression, determining that the current processing module is ended, wherein the previous row of the next row is an ending row of the current processing module;
converting the one or more processing modules into one or more corresponding target format objects according to the module type of each processing module;
and rendering the one or more target format objects in turn to generate a webpage corresponding to the webpage making text.
2. The method for making a web page according to claim 1, wherein the determining the current content according to the preset first regular expression, and determining the module type of the current processing module, includes:
judging whether the current line content accords with a preset first regular expression or not;
if the current line content accords with the preset first regular expression, determining that the module type of the current processing module is the non-preset type;
and if the current line content does not accord with the preset first regular expression, determining that the module type of the current processing module is the preset type.
3. The method for creating the web page according to claim 1, wherein the converting the one or more processing modules into the corresponding one or more target format objects according to the module type of each processing module comprises:
judging whether the module type of the current processing module is the preset type or not;
if the module type of the current processing module is the preset type, taking the row content of the current processing module as target format data;
if the module type of the current processing module is the non-preset type, calling a preset format conversion plug-in to convert the line content of the current processing module into target format data;
setting a current processing module variable and a module object list, assigning the row content of the current processing module and the target format data to the current processing module variable to generate a current target format object, and clearing the current processing module variable after the current target format object is stored in the module object list.
4. The method for creating a web page according to claim 1, wherein the sequentially rendering the one or more objects in the target format to create a web page corresponding to the web page creation text comprises:
sequentially acquiring one or more target format objects as current rendering objects, and loading a corresponding configuration attribute list according to the module types of the current rendering objects;
and loading a configuration component according to the configuration attribute list, and assigning the data of the current rendering object to the configuration component so as to complete the rendering of the current rendering object.
5. A web page making apparatus, characterized in that the web page making apparatus comprises:
the receiving unit is used for receiving the webpage making text;
the dividing unit is used for dividing the text content of the webpage making text according to the rows to obtain row content corresponding to each row of the text content, and sequentially storing the row content in a row content list; sequentially acquiring row contents in the row content list as current row contents; judging whether the current processing module exists or not; if the current processing module does not exist, generating the current processing module, determining a current behavior, namely a starting line of the current processing module, judging the content of the current line according to a preset first regular expression, and determining the module type of the current processing module, wherein the module type comprises a preset type and a non-preset type; if the current processing module exists, judging whether the current line content accords with a preset second regular expression or not; if the current line content accords with the preset second regular expression and the module type of the current processing module is the non-preset type, determining that the current processing module is ended, and performing the current operation on an ending line of the current processing module; if the current line content does not accord with the preset second regular expression and the module type of the current processing module is the non-preset type, continuing to acquire the next line content for judgment until the next line content accords with the preset second regular expression, determining that the current processing module is ended, and the next line is an ending line of the current processing module; if the module type of the current processing module is the preset type, continuing to acquire the next row of content for judgment until the next row of content accords with the preset first regular expression, determining that the current processing module is ended, wherein the previous row of the next row is an ending row of the current processing module;
the conversion unit is used for converting the one or more processing modules into one or more corresponding target format objects according to the module type of each processing module;
and the rendering unit is used for sequentially rendering the one or more target format objects and generating a webpage corresponding to the webpage making text.
6. A computer device comprising a memory and a processor coupled to each other:
the memory is used for storing a computer program;
the processor is configured to execute the computer program and to implement the web page making method of any one of claims 1-4 when the computer program is executed.
7. A computer storage medium storing a computer program which, when executed by a processor, is adapted to carry out the method of webpage making as claimed in any one of claims 1 to 4.
CN202010025110.9A 2020-01-10 2020-01-10 Webpage making method and device, computer equipment and computer storage medium Active CN111273903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010025110.9A CN111273903B (en) 2020-01-10 2020-01-10 Webpage making method and device, computer equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010025110.9A CN111273903B (en) 2020-01-10 2020-01-10 Webpage making method and device, computer equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111273903A CN111273903A (en) 2020-06-12
CN111273903B true CN111273903B (en) 2023-08-04

Family

ID=70998805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010025110.9A Active CN111273903B (en) 2020-01-10 2020-01-10 Webpage making method and device, computer equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111273903B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11704474B2 (en) * 2020-02-25 2023-07-18 Transposit Corporation Markdown data content with action binding
CN112416777B (en) * 2020-11-23 2022-11-18 珠海格力电器股份有限公司 Text display test method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163233A (en) * 2011-04-18 2011-08-24 北京神州数码思特奇信息技术股份有限公司 Method and system for converting webpage markup language format
CN110018863A (en) * 2018-01-09 2019-07-16 武汉斗鱼网络科技有限公司 A kind of mobile terminal text display method, storage medium, equipment and system
CN110516186A (en) * 2019-08-15 2019-11-29 中国平安财产保险股份有限公司 Page skeleton automatic generating method, equipment, storage medium and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217024B (en) * 2014-09-26 2018-02-16 深圳创维-Rgb电子有限公司 Web data treating method and apparatus
CN110020038A (en) * 2017-08-01 2019-07-16 阿里巴巴集团控股有限公司 Webpage information extracting method, device, system and electronic equipment
CN107885792B (en) * 2017-10-19 2020-07-24 福建中金在线信息科技有限公司 Webpage article display method, device and system
CN107729526B (en) * 2017-10-30 2020-04-07 清华大学 Text structuring method
CN109726379B (en) * 2018-12-28 2023-01-10 腾讯科技(深圳)有限公司 Content item editing method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163233A (en) * 2011-04-18 2011-08-24 北京神州数码思特奇信息技术股份有限公司 Method and system for converting webpage markup language format
CN110018863A (en) * 2018-01-09 2019-07-16 武汉斗鱼网络科技有限公司 A kind of mobile terminal text display method, storage medium, equipment and system
CN110516186A (en) * 2019-08-15 2019-11-29 中国平安财产保险股份有限公司 Page skeleton automatic generating method, equipment, storage medium and device

Also Published As

Publication number Publication date
CN111273903A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN108415702B (en) Dynamic rendering method and device for application interface of mobile terminal
CN110705237B (en) Automatic document generation method, data processing device and storage medium
KR20040047657A (en) Method and computer-readable medium for importing and exporting hierarchically structured data
CN111273903B (en) Webpage making method and device, computer equipment and computer storage medium
CN106354483B (en) Data processing method and device and electronic equipment
CN109614329B (en) Software test case aided design method based on interface control file
CN113126990A (en) Page development method, device, equipment and storage medium
CN111476006A (en) PDF file online annotation method, device, equipment and readable storage medium
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN116301813A (en) Low-code platform development method and system
JP2006065467A (en) Device for creating data extraction definition information and method for creating data extraction definition information
CN115935909A (en) File generation method and device and electronic equipment
CN116257714A (en) Method, device, computer equipment and storage medium for generating cascading style sheet
CN116107563A (en) Method and related device for acquiring low-code application program
CN110928549B (en) Method and device for re-editing front-end script program
US20150161085A1 (en) Natural language-aided hypertext document authoring
CN114722112A (en) Visual list data display method and device
CN111401005B (en) Text conversion method and device and readable storage medium
CN113127861A (en) Rule hit detection method and device, electronic equipment and readable storage medium
CN112001153B (en) Text processing method, device, computer equipment and storage medium
CN111475679A (en) HTM L document processing method, page display method and device
CN111199568B (en) Vector diagram drawing method and device and computer readable storage medium
CN114138264A (en) Information acquisition interface generation method and device, electronic equipment and storage medium
CN115658056A (en) Front-end VUE code automatic generation method and system based on picture
CN115098439A (en) Method, device, equipment and medium for generating excel report file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant