Page rendering method, device and equipment

By obtaining page description information and converting it into code information, and then using the browser engine to render the page, the problems of low page rendering efficiency and high threshold in existing technologies are solved, enabling no-code or low-code page development.

CN118916027APending Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310506256.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In existing technologies, writing HTML, CSS, and JavaScript code during page rendering is inefficient and has a high barrier to entry, making it difficult for users to develop pages independently.

Method used

By obtaining page description information, converting it into page code information, and using the browser engine to render the page, the need for users to directly write code is reduced, and pages are created using drag-and-drop and configuration editing operations.

Benefits of technology

It improves the efficiency of page development, lowers the development threshold, and allows users to create target pages without manually entering code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916027A_ABST
    Figure CN118916027A_ABST
Patent Text Reader

Abstract

The invention provides a page rendering method, device and equipment, which are used for improving the efficiency of page development and reducing the threshold of page development. The method comprises the following steps: when a target page is rendered, firstly obtaining page description information of the target page; and then, converting the page description information into page code information of the target page, and finally, rendering the target page based on the page code information. Wherein the page description information of the target page is obtained according to the page marking operation triggered when the target page is created, and the page code information of the target page is obtained through conversion according to the page description information of the target page, so that a user who creates the page does not need to directly and manually input the page description information of the target page; and the target webpage can be created only through the page editing operation. In this way, the target page is rendered based on the page description information of the target webpage, so that creation of the target page does not depend on codes input by a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and equipment for page rendering. Background Art

[0002] After opening a web page, a program (such as a browser program) can display the data received through the network in a visual form to the user who opened the web page. The above process can be called page rendering. In the process of page rendering, the program can first determine the basic elements of the page, then determine the style and layout of the page, and finally determine the dynamic changes that may be triggered on the page to complete the rendering of the page.

[0003] The basic elements of the above-mentioned pages can be described by Hyper Text Mark-up Language (HTML), the style and layout of the pages can be described by Cascading Style Sheets (CSS), and the dynamic changes of the pages can be described by JavaScript language.

[0004] At present, the above three languages ​​(or other languages ​​used to describe pages) all need to be written manually by technical personnel, which has problems of low efficiency and high threshold. Summary of the invention

[0005] In order to solve the problems of the prior art, the present application provides a method, apparatus and device for page rendering.

[0006] In a first aspect, the present application provides a method for page rendering, the method comprising:

[0007] Obtaining page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created;

[0008] Converting the page description information into page code information of the target page;

[0009] The target page is rendered according to the page code information.

[0010] In a second aspect, the present application provides a page rendering device, the device comprising:

[0011] A description information acquisition unit, used to acquire page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created;

[0012] A code conversion unit, used for converting the page description information into page code information of the target page;

[0013] A rendering unit is used to render the target page according to the page code information.

[0014] In a third aspect, the present application provides a page rendering device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the page rendering method as described in the first aspect is implemented.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the page rendering method as described in the first aspect above.

[0016] It can be seen that this application has the following beneficial effects:

[0017] In the technical solution provided by the present application, when rendering the target page, the page description information of the target page can be obtained first. Then, the page description information can be converted into the page code information of the target page, and finally the target page is rendered based on the page code information. Among them, the page description information of the target page is obtained according to the page mark operation triggered when the target page is created. That is to say, if the user wants to create the target page, the user can trigger the page editing operation in the interface of the page creation. The page marking operation will be recorded in the form of the page description information of the target page. In this way, when the target page needs to be rendered, the page description information of the target page can be called, and the page description information of the target page can be converted into page code information, and then the target page is rendered through a browser engine or the like. Since the page code information of the target page is converted according to the page description information of the target page, the user who creates the page does not need to directly manually input the page description information of the target page, and can create the target web page only by dragging, editing configuration and other editing operations on the page. In this way, the target page is rendered based on the page description information of the target web page, so that the creation of the target page can be independent of the code entered by the user. In this way, the efficiency of page development is improved and the threshold of page development is lowered. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] 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 some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A flowchart of a page rendering method provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a page rendering device provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.

[0023] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0025] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different objects, devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0027] Page rendering is a topic that is often discussed in the current computer field. For example, when a user browses a web page on a website, the user can first send a browsing request to the server of the website through the browser software. The server of the website can send page-related data to the browser software. After obtaining this data, the browser software can build a visual interface based on this data and display it to the user. In addition, the user can also operate on the interface displayed by the browser software.

[0028] In order to realize the above functions, the relevant data of the current page (such as a web page) includes relevant data for describing the basic elements of the page, relevant data for describing the style and layout of the page, and relevant data for describing the dynamic changes of the page. Among them, the data used to describe the changes of the page refers to the data used to describe the interactive functions and dynamic effects of the page. For this reason, the relevant data of the current page mostly includes HTML code, CSS code and JavaScript (hereinafter referred to as JS) code, which respectively correspond to the above-mentioned relevant data for describing the basic elements of the page, the relevant data for describing the style and layout of the page, and the relevant data for describing the dynamic changes of the page.

[0029] At present, the above three types of codes are all written manually by technicians. Obviously, manual code writing has the problem of low efficiency and also has high requirements for technicians. In particular, with the development of computer technology, more and more users have the need for page development. However, due to the difficulty of page development, users often find it difficult to develop pages independently, and most of them need to entrust professional technicians to develop pages. In this way, the threshold and difficulty of page development are increased.

[0030] In order to solve the problems of the prior art, an embodiment of the present application provides a method for page rendering, which is described in detail below in conjunction with the drawings in the specification.

[0031] See also Figure 1 , Figure 1 An information interaction diagram of a page rendering method provided in an embodiment of the present application, the embodiment of the present application can be applied to a scenario of page rendering based on page description information. The page description information is obtained based on the page editing operation performed when the page is created. The page editing operation can be, for example, an add operation for a control, and can also include a drag operation for a control, and can also include a configuration operation for a control. The configuration operation is used to configure the relevant information of the control in the visual interface.

[0032] In an embodiment of the present application, the page rendering method can be performed by a page rendering device, which can be implemented by software. For example, the page rendering device can be a plug-in in the browser software, which is used to convert the page description information into page code information and render it. Optionally, the page rendering device can include a page rendering engine of the browser software. The page rendering device can run on a terminal device or on a server.

[0033] like Figure 1 As shown, the method specifically comprises the following steps:

[0034] S101: Obtain page description information of a target page.

[0035] In order to display the target page to the user in a visual form, the page description information of the target page can be obtained first. The page description information is obtained based on the page marking operation triggered when the user creates the target page. Since the page description information is triggered based on the operation when the target page is created, the page description information can reflect the settings and requirements of the user who created the target page for the target page. Therefore, the target page created by the user who created the target page can be restored based on the page description information.

[0036] In order to distinguish the user who creates the target page and triggers the page rendering of the target page, in this embodiment, the user who creates the target page is called the first user, and the user who triggers the page rendering of the target page is called the second user. The software or program used by the first user to create the page is called a page editor.

[0037] Specifically, the first user can manipulate the elements on the target page in the interface for creating the target page (hereinafter referred to as the editing interface). For example, the first user can set the background color of the target page in the editing interface, add icons in the editing interface, create new controls in the editing interface, configure the types of the above controls in the editing interface, and configure the functions of the above controls in the editing interface.

[0038] In the embodiment of the present application, the above operations may be collectively referred to as page editing operations. It is understandable that, in addition to the above examples, all related operations on the page that may be triggered by the first user when creating the page belong to page editing operations. Optionally, this way of creating a page may be referred to as a no-code (NoCode) or low-code (LowCode) way.

[0039] When the first user creates the target page, page description information may be generated and stored according to the page editing operation triggered by the first user. If the second user triggers an operation related to rendering the target page, the device corresponding to the second user may execute S101 to render the target page.

[0040] In an embodiment of the present application, the page description information of the target page may be stored in the server. The acquisition of the page description information may be based on the access trigger of the target page. That is, after the second user triggers the access operation for the target page, the page rendering device may acquire the page description information of the target page.

[0041] For example. Assume that the above-mentioned page rendering device is a plug-in in the browser software on the terminal device used by the second user. After the second user triggers a jump operation on the web link corresponding to the target page, the browser software can send an access request to the address corresponding to the web link. The server corresponding to the target page can obtain the access request and return the page description information of the target page. In this way, the page rendering device can obtain the page description information of the target page, and then render the target page according to the page description information.

[0042] In the embodiment of the present application, the page description information of the target page is not a code. For example, in some possible implementations, the page description information of the target page can be a file written in JavaScript Object Notation (JSON). The page description information can be called User Interface Definition Language (UIDL) or Page UIDL.

[0043] S102: Convert the page description information into page code information of the target page.

[0044] As described above, software with page rendering function such as browsers renders pages based on codes, while the page description information of the target page is not codes. Therefore, in order to achieve the rendering of the target page, the page description information of the target page can be converted into codes. Specifically, the codes converted from the page description information can be called page code information of the target page. Optionally, the page code information of the target page can include HTML codes, CSS codes and JS codes, or can only include JS codes.

[0045] In actual application scenarios, the structure of the target page may be complex. For example, multiple elements belonging to the same area on the target page may have similar attributes. Or different elements on the target page may be intertwined or associated. If each element is rendered one by one, the rendering workload may be large.

[0046] For this reason, in an embodiment of the present application, multiple nodes with the same attributes can be regarded as belonging to a container, and then the container and the node are rendered respectively. In this way, the efficiency of rendering can be improved by layered rendering. In other words, the page description information of the target page may include the description information of the container and the description information of the node. The page code information of the target page may include the code corresponding to the container and the code corresponding to the node. Among them, the description information of the container is used to describe the attributes common to all codes in the container.

[0047] It is understandable that the container can be determined based on the page editing operation of the first user. For example, if the first user selects ten text boxes on the target page when creating the target page and sets the colors of the ten text boxes at the same time, then the ten text boxes can be regarded as belonging to the same container.

[0048] Alternatively, the container can also be established based on the tree structure corresponding to the target page. Specifically, the target page can be organized into one or more tree structures, and then a node tree consisting of multiple nodes with the same attributes is called a container. Correspondingly, the description information of the container refers to the information of the attributes shared by all nodes in the node tree corresponding to the container. The description information of the node refers to the information of the attributes of a node in the tree structure. The description information of the child nodes of a node may be different from or conflict with the description information of the node.

[0049] It is understandable that if the target page is regarded as a complete tree structure, then each point in the tree structure can be regarded as the "node" mentioned above. And if all nodes in the subtree of a node in the tree structure have the same attributes, the node can be regarded as a container. For example, since the target page is regarded as a node tree, the entire target page can be regarded as a container, which corresponds to the root node of the complete node tree.

[0050] Since the container includes at least one node, each container can be regarded as an internal node in the node tree. An internal node refers to a node with child nodes, that is, a node that is not a leaf node in the node tree. The subtree of the internal node corresponding to the container is the node tree corresponding to the container. The description information of the container is the attribute information shared by all nodes in the node tree. For example, it may include attribute information such as request, data, style, and dependency of the node in the node tree. For the sake of convenience, the node corresponding to the container in the tree structure is called a container node.

[0051] In addition, if the target page is regarded as a node tree, the internal nodes in the node tree can be container nodes or not. In other words, a node can also have child nodes or child node trees. However, all child nodes corresponding to non-container nodes may not have the same attribute information. In addition, a container can also include child containers. In the tree structure, the node corresponding to the child container is the child node of the node corresponding to the container.

[0052] It should be noted that the "node" in the above introduction is not the same concept as the "node" in the Document Object Model (DOM) in the traditional network rendering process. The node in the above introduction is a concept in the page description information and page code information, not a node in the DOM tree converted from JS code.

[0053] Accordingly, the page description information may include the description information of the container and the description information of the node. The description information of the container, also known as the container-level UIDL (Container UIDL), is used to describe the attribute information common to all child nodes corresponding to the container node, such as the request, data, style, and dependency attribute information of the above node. The description information of the node, also known as the node-level UIDL (Node UIDL), is used to describe the attribute information of the node.

[0054] In actual application scenarios, the target page may have multiple types of containers. Accordingly, when converting the description information of the container into the code corresponding to the container, the conversion can be performed based on the type of the container. Three types of containers are introduced below.

[0055] Type 1: Page container.

[0056] The page container corresponds to a relatively complete page, for example, it can correspond to the target page, or to a subpage under the target page. The description information of the page container (PageContainerUIDL): used to describe the information of an entire page. The description information of the page container includes the description information related to the page.

[0057] Type 2: Block container.

[0058] A section container corresponds to a section in a page, that is, a part of a page. The description information of the section container (SectionContainerUIDL) is used to describe the information of the section.

[0059] Type three: Component container.

[0060] A component container corresponds to a component in a page. A component is composed of multiple elements. The description information of the component container (ComponentContainerUIDL) is used to describe the information of the component.

[0061] That is, if page container A includes block container B, block container B includes component container C, and component container C includes node D, then the attributes of node D are determined based on the description information of page container A, the description information of block container B, the description information of component container D, and the description information of node D.

[0062] The above introduces three types of containers. The following introduces two types of nodes.

[0063] Type 1: Dynamic Node.

[0064] The description information of a dynamic node corresponds to the description of dynamic data, and is the node specification corresponding to the node in conditional rendering and loop rendering.

[0065] Type 2: EcoNode.

[0066] The ecological node is used to declare that the component of the node comes from asynchronous loading, and its real corresponding component is known through supplementary information. The description information of the ecological node is used to solve the problem that dynamic component import may cause component duplication.

[0067] It is understandable that the above three types of containers and two types of nodes are only examples. In actual application scenarios, more types of containers and nodes may be included. The first user may set a new container type according to the requirements of creating a target page.

[0068] The description information of the container and the description information of the node are introduced above. The following takes the description information of the first node in the target page as an example to introduce some implementation methods of converting the description information of the node into the code corresponding to the node.

[0069] In order to render the first node in the target web page, the description information of the first node in the page description information can be converted into code information. At present, the code used to describe the page is often an object-oriented code. The object-oriented code describes the properties and / or functions of the object through variables. In other words, the first node corresponds to multiple variables. When converting the code of the first node, the multiple variables corresponding to the first node can be determined according to the description information of the first node, so as to describe the properties and / or functions of the first node through multiple variables.

[0070] According to the previous introduction, the page description information of the target page can be implemented based on the JSON language. The JSON language can represent data in the form of key-value pairs, which has the advantage of being lightweight. However, page rendering may involve multiple types of variables, and the native JSON language supports limited variable types. Some types of variables may not be recorded through the native JSON language. Therefore, if the description information of the first node is recorded through the native JSON language, the code converted from the description information of the first node may lack the variables required to describe the properties and / or functions of the first node. For example, the JSON language cannot record variables of types such as dates, regular expressions, and functions. These variables are variables that are frequently involved in page rendering.

[0071] In the embodiment of the present application, in order to fully record all the information in the target page, the JSON language can be expanded. The expanded JSON language can record any information of any node in the target page. It is understandable that even if the page description information is implemented based on other languages, if the language cannot fully record all the variables of the first node, the language can also be expanded.

[0072] Specifically, the type and content of the variable of the first node can be recorded in the form of a string in the description information of the first node. Since the data format of the string can be recognized by traditional languages, traditional languages ​​can also store the type and content of the variable in the form of a string. When the page description information is converted into page code information, the type and content of the variable in the string format can be parsed from the description information of the first node. Then, the parsing method of the content of the variable can be determined according to the type of the variable, so that the content of the variable recorded in the string format in the description information can be processed by the parsing method to restore the data format of the content of the variable.

[0073] For example, assuming that a traditional language (such as JSON language) cannot record the first variable of the first node, then the description information of the first node may include the type of the first variable and the content of the first variable, wherein the type of the first variable and the content of the first variable are both stored in the description information of the first node in the form of a string.

[0074] When determining the code corresponding to the first node, two strings, the type of the first variable and the content of the first variable, can be extracted. Then, the value of the string "type of the first variable" can be matched with a preset type. The preset type is a plurality of variable types that are preset, and each variable type corresponds to a parsing method. After determining the preset type corresponding to the type of the first variable, the value of the string "content of the first variable" can be parsed using the parsing method of the type, thereby converting the content of the first variable into a code of a corresponding format.

[0075] For example, assuming that the content of the first variable is a function. Then the description information of the first node may include an identifier of the type "function" and the specific content of the function corresponding to the first variable. When converting the code corresponding to the first node, it can be determined that the string "the content of the first variable" carries a function according to the type "function" of the first variable, and the value of the string "the content of the first variable" is converted into a function through the function parsing method.

[0076] If the page description information is implemented based on the JSON language, the type and content of the above variables can be recorded through JSON metadata (JSONMeta). Specifically, the description information of the first node may include one or more JSONMeta, each JSONMeta corresponding to a variable of the first node. Each JSONMeta includes the type (type) and content (content) of the variable.

[0077] Specifically, the JSON language records information in the form of key-value pairs, so the JSONMeta corresponding to the first variable includes at least two key-value pairs. The key part of one key-value pair is "type", and the value part is the type of the first variable; the key part of the other key-value pair is "content", and the value part is the specific content of the first variable.

[0078] In this way, when converting the description information of the first node into the code corresponding to the first node, the parsing method for determining the content of the first variable according to the type of the first variable can be determined according to the JSONMeta corresponding to the first variable. Then, the key-value pair in the JSONMeta corresponding to the first variable can be extracted, and the type of the first variable can be determined according to the content of the value part corresponding to the key part "type". Then, the parsing method for the content of the first variable is determined according to the type of the first variable. Finally, the content of the value part corresponding to the key part "content" is parsed using the parsing method.

[0079] In addition, the description information of the first node may also include an identifier corresponding to the first variable. The identifier is used to indicate that the content of the first variable needs to be parsed based on the type of the first node. Optionally, the identifier may be referred to as a first identifier. That is, when converting the description information of the first node into a code corresponding to the first node, it can be determined based on the first identifier that the content of the first variable cannot be parsed directly, but it is necessary to first determine a parsing method for parsing the content of the first variable based on the type of the first variable, and then parse the content of the variable using the corresponding parsing method.

[0080] Optionally, if the description information of the first variable is implemented based on JSONMeta, the JSONMeta corresponding to the first variable may further include a key-value pair whose key part is “JSONMeta”, and whose value part is the first identifier.

[0081] In this way, the content of the first variable is carried by the character string, so that the content of the first variable can be completely recorded in the description information of the first node. In addition, the content of the first variable is carried in the description information of the first node, and the content of the first variable can be converted into a specific code by a corresponding method during the code conversion process. In this way, the content that cannot be recorded in traditional language can be recorded in the page description information and correctly converted into code.

[0082] Furthermore, since the method of parsing the content of a variable is defined according to the type of the variable, a basis is provided for the extensibility of the variable. Specifically, in an actual application scenario, a user can create a variable of a new type and set a parsing method for the new variable. In this way, when converting the code, the content of the variable can be parsed according to the type of the new variable using the parsing method newly set by the user. In this way, the extensibility of creating a page is improved, and the page rendering device can convert any variable for which a parsing method exists into code. Optionally, the above-mentioned users may include the aforementioned first user, and may also include a technician of the page editor.

[0083] The following uses the implementation of variable description information based on JSONMeta as an example to introduce ten types of variables that may be involved in actual application scenarios, as well as the implementation method of converting variable description information into code information.

[0084] The first type: variables of undefined type.

[0085] The type of the variable in the description information of the Undefined type variable may be "undefined". The content of the variable may be empty. When the description information of the Undefined variable is converted into code information, Undefined may be used as the content of the variable.

[0086] For example, if the variable "key1" is a variable of type Undefined, the description information of the variable key1 can be as follows:

[0087] "key1":{"JSONMeta":"AAA","type":"undefined",}.

[0088] The specific value of the value part of the first key-value pair is "AAA", which corresponds to the first identifier. The specific value of the value part of the second key-value pair is "undefined", indicating that the variable key1 is a variable of the Undefined type. The comma after "undefined" indicates that the value part of the key-value pair corresponding to the content is empty.

[0089] Then after converting the description information of the variable "key1" into JS language, we can get the following code: {key1:undefined}.

[0090] The second type: variables of symbol type.

[0091] In the description information of a variable of the Symbol type, the variable type may be "symbol". The content of the variable may be the specific value of the symbol.

[0092] For example, if the variable key1 is a variable of the Symbol type, the description information of the variable key1 can be as follows:

[0093] "key1":{"JSONMeta":"AAA","type":"symbol","content":"test"}.

[0094] The specific value of the value part of the first key-value pair is "AAA", which corresponds to the first identifier. The specific value of the value part of the second key-value pair is "symbol", indicating that the variable key1 is a variable of the Symbol type. The specific value of the value part of the third key-value pair is "test", indicating that the specific content of the variable key1 is "test".

[0095] Then after converting the description information of the variable "key1" into JS language, we can get the following code: {key1:Symbol("test")}.

[0096] The third type: regular type variables.

[0097] The variable type in the description information of a regular type variable may be "regExp". The content of the variable may be a specific regular expression.

[0098] For example, if the variable key1 is a regular type variable, the description information of the variable key1 can be as follows:

[0099] "key1":{"JSONMeta":"AAA","type":"regExp","content":"^a\\d+$"}.

[0100] The specific value of the value part of the first key-value pair is "AAA", which corresponds to the first identifier. The specific value of the value part of the second key-value pair is "regExp", indicating that the variable key1 is a regular type variable. The specific value of the value part of the third key-value pair is "^a\\d+$", indicating that the regular expression corresponding to the variable key1 is "^a\\d+$".

[0101] Then after converting the description information of the variable "key1" into JS language, we can get the following code: {key1:newRegExp('^a\\d+$')}.

[0102] The fourth type: variable of date type.

[0103] The variable type in the description information of a variable of type Date may be "date". The content of the variable may be a date or a timestamp. Optionally, for a variable of type Date, the value of the content part in its description information may be pre-set or determined according to the passed parameter.

[0104] For example, if the variable key1 is a variable of the Date type, the description information of the variable key1 can be as follows:

[0105] "key1":{"JSONMeta":"AAA","type":"date","content":"2022-02-24T09:51:33.279Z"}.

[0106] Among them, the specific value of the value part of the first key-value pair is "AAA", corresponding to the aforementioned first identifier. The specific value of the value part of the second key-value pair is "date", indicating that the variable key1 is a variable of the Date type. The specific value of the value part of the third key-value pair is "2022-02-24T09:51:33.279Z", indicating that the specific time corresponding to the variable key1 is 9:51:33.279 on February 24, 2022, Coordinated Universal Time (UTC).

[0107] Then after converting the description information of the variable "key1" into JS language, we can get the following code: {key1:newDate("2022-02-24T09:51:33.279Z")}.

[0108] The fifth type: variables of function type.

[0109] In the description information of a variable of the Function type, the variable type may be "function". The content of the variable may be the name of the called function.

[0110] For example, if the variable key1 is a Function type variable, the description information of the variable key1 can be as follows:

[0111] "key1":{"JSONMeta":"AAA","type":"function","content":"function(){\console.log(123)\}".

[0112] The specific value of the value part of the first key-value pair is "AAA", which corresponds to the first identifier. The specific value of the value part of the second key-value pair is "function", indicating that the variable key1 is a variable of the Function type. The specific value of the value part of the third key-value pair is "function(){\console.log(123)\}", indicating that the variable key1 corresponds to a function named console.log(123). The function console.log(123) is declared in other codes.

[0113] Then after converting the description information of the variable "key1" into JS language, we can get the following code: {key1:functuin(){console.log(123)}.

[0114] The sixth type: variables of expression type.

[0115] In the description information of a variable of the Expression type, the variable type may be "expression". The content of the variable may be the specific content of the expression.

[0116] For example, if the variable key1 is an Expression type variable, the description information of the variable key1 can be as follows:

[0117] "key1":{"JSONMeta":"AAA","type":"expression","content":{"context":"component","value":"this.state.message"}".

[0118] The specific value of the value part of the first key-value pair is "AAA", which corresponds to the first identifier mentioned above. The specific value of the value part of the second key-value pair is "expression", indicating that the variable key1 is a variable of the Expression type. The specific value of the value part of the third key-value pair is ""context":"component","value":"this.state.message"", indicating that the expression corresponding to the variable key1 is the variable "this.state.message" in the context of "component".

[0119] Then, after converting the description information of the variable "key1" into JS language, the following code can be obtained: {key1:newExpression("this.state.message","component")}. If the value of the variable "this.state.message" under the component is "helloworld", then the output result can be: {key1:"helloworld"}.

[0120] The above six types of variables are the existing variable types in page rendering. In addition, users can also set new variable types. The following is an introduction based on the specific implementation method.

[0121] The seventh type: Slot type variables.

[0122] The type of the variable in the description information of the slot type variable may be "bbb". The content of the variable may be the description information of the child node.

[0123] For example, if the variable key1 is a variable of the Slot type, the description information of the variable key1 can be as follows:

[0124]

[0125]

[0126] Among them, the specific value of the value part of the first key-value pair is "AAA", corresponding to the aforementioned first identifier. The specific value of the value part of the second key-value pair is "bbb", indicating that the variable key1 is a variable of the Slot type. The specific value of the value part of the third key-value pair is the specific structure of the child node of the variable key1. The id of the child node is "abv1223r4bdf", and the node type of the node abv1223r4bdf is "Layout". The child node abv1223r4bdf also includes a child node 34dfg3f435. The type of node 34dfg3f435 is "Text", the properties (props) of the child node 34dfg3f435 include red (red), and the text displayed by the child node 34dfg3f435 is "helloworld".

[0127] After converting the description information of the variable "key1" into JS language, the following code can be obtained: key1:( <layout><Textcolor="red"> helloworld< / layout> ).

[0128] The eighth type: Function Slot type variables.

[0129] The type of the variable in the description information of the Function Slot type variable may be "ccc". The content of the variable may be a function for generating rendering content.

[0130] For example, if the variable key1 is a Function Slot type variable, the description information of the variable key1 can be as follows:

[0131]

[0132]

[0133] Among them, the specific value of the value part of the first key-value pair is "AAA", corresponding to the aforementioned first identifier. The specific value of the value part of the second key-value pair is "ccc", indicating that the variable key1 is a variable of the FunctionSlot type. The specific value of the value part of the third key-value pair is the specific rendering method of the variable key1. Among them, the input parameters of the function include "color" and "obj", and the function includes the child node 34dfg3f435. The "color" attribute of the child node 34dfg3f435 is determined according to the "color" in the input parameter, and the "size" attribute of the child node is determined according to the "size" part of the "obj" in the input parameter.

[0134] After converting the description information of the variable "key1" into JS language, the following code can be obtained: key1: (color, obj) = > (<Textcolor={color}size={obj.size}bold={true}> helloworld.

[0135] Ninth type: Path Query type variable.

[0136] In the description information of a variable of the Path Query type, the variable type may be "ddd". The content of the variable may be the path to be queried.

[0137] For example, if the variable key1 is a variable of the Path Query type, the description information of the variable key1 can be as follows:

[0138] "key1":{"JSONMeta":"AAA","type":"ddd","content":"name"}.

[0139] The specific value of the value part of the first key-value pair is "AAA", corresponding to the aforementioned first identifier. The specific value of the value part of the second key-value pair is "ddd", indicating that the variable key1 is a variable of the Path Query type. The specific value of the value part of the third key-value pair is "name", indicating that the variable key1 is used to query the value of the variable name under the currently set path.

[0140] If the current path is / test / abc, and the path / test / abc contains variables name and age, where the value of variable name is bob and the value of variable age is 12, then converting the description information of variable "key1" into JS language will yield the following code: {key1:'bob'}.

[0141] Tenth: Internationalization type variables.

[0142] In the description information of an internationalized variable, the variable type can be "eee". The content of the variable can be a string.

[0143] For example, if the variable key1 is a variable of the Symbol type, the description information of the variable key1 can be as follows:

[0144] "key1":{"JSONMeta":"AAA",

[0145] "type":"eee",

[0146] "content":"hello"}。

[0147] Among them, the specific value of the value part of the first key-value pair is "AAA", corresponding to the aforementioned first identifier. The specific value of the value part of the second key-value pair is "eee", indicating that the variable key1 is an internationalized type variable. The specific value of the value part of the third key-value pair is "hello", indicating that the variable key1 is used to output the string corresponding to the variable hello.

[0148] If the current internationalization configuration is {"zh-CN":{"hello":"你好世界"}, indicating that the variable hello corresponds to the Chinese string "你好世界". Then, after converting the description information of the variable "key1" into JavaScript language, the following code can be obtained: {key1:'你好世界'}.

[0149] It can be understood that the above ten types of variables are only used as examples. In actual application scenarios, other types of variables can also be extended according to actual needs.

[0150] S103: Render the target page according to the page code information.

[0151] After converting the page description information of the target page into page code information, the target page can be rendered according to the page code information of the target page. Specifically, the page rendering device can render the page code information of the target page based on the browser engine, so as to display the target page in a visual form to the second user.

[0152] According to the previous introduction, the page code information of the target page can include the code corresponding to the container and the code corresponding to the node. Accordingly, when rendering the target page, the relevant information of the container can be determined according to the code corresponding to the container, and then the specific content on the target page can be rendered based on the code corresponding to the node.

[0153] For example, assuming that the aforementioned first container corresponds to the first area on the target page, then when rendering the target page, the basic information of the first area can be determined according to the code corresponding to the first container. Then, according to the codes corresponding to the respective child nodes of the first container, each element in the first area can be specifically rendered.

[0154] If the target page is regarded as a complete tree structure, then the root node of this tree structure can be regarded as the largest container, and all the content on the target page belongs to this container. Accordingly, when rendering the target page, it can be rendered from the container corresponding to the root node of the tree structure. Then, traverse each node in the tree structure in the order of the hierarchical relationship between the nodes, so as to render the entire property structure.

[0155] In some possible implementations, the rendering of the node can also be adjusted through a plug-in. Specifically, the description information of the node can include a rendering type identifier. When the description information of the node is converted into the code information of the node, the above rendering type identifier is used. When rendering the node according to the code information of the node, the corresponding rendering plug-in can be determined according to the rendering type identifier, and then the node is rendered through the plug-in.

[0156] Specifically, the rendering plug-in can adjust the code corresponding to the node before the node is rendered, which is called pre-rendering. The rendering plug-in can also adjust the rendered visualization page after rendering, which is called post-rendering. Optionally, pre-rendering and post-rendering can be implemented by different rendering plug-ins, or by the same rendering plug-in.

[0157] In the technical solution provided by the present application, when rendering the target page, the page description information of the target page can be obtained first. Then, the page description information can be converted into the page code information of the target page, and finally the target page is rendered based on the page code information. Among them, the page description information of the target page is obtained according to the page mark operation triggered when the target page is created. That is to say, if the user wants to create the target page, the user can trigger the page editing operation in the interface of the page creation. The page marking operation will be recorded in the form of the page description information of the target page. In this way, when the target page needs to be rendered, the page description information of the target page can be called, and the page description information of the target page can be converted into page code information, and then the target page is rendered through a browser engine or the like. Since the page code information of the target page is converted according to the page description information of the target page, the user who creates the page does not need to directly manually input the page description information of the target page, and can create the target web page only by dragging, editing configuration and other editing operations on the page. In this way, the target page is rendered based on the page description information of the target web page, so that the creation of the target page can be independent of the code entered by the user. In this way, the efficiency of page development is improved and the threshold of page development is lowered.

[0158] Based on the page rendering method provided by the above method embodiment, the embodiment of the present application also provides a page rendering device, which will be described below in conjunction with the accompanying drawings.

[0159] See also Figure 2 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a page rendering device provided in an embodiment of the present application. Figure 2 As shown, the page rendering device includes:

[0160] A description information acquisition unit 201 is used to acquire page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created;

[0161] A code conversion unit 202, used for converting the page description information into page code information of the target page;

[0162] The rendering unit 203 is configured to render the target page according to the page code information.

[0163] In a possible implementation, the page description information includes description information of a first container, and the first container includes at least one first-category node; the code conversion unit 202 is specifically used to convert the description information of the first container into a code corresponding to the first container, and the code corresponding to the first container is used to indicate attribute information of the first-category node.

[0164] In a possible implementation, the page description information also includes description information of a second container, the second container includes at least one second-type node, and the second-type node belongs to the first-type node; the code conversion unit 202 is specifically used to convert the description information of the second container into a code corresponding to the second area, and the code corresponding to the second container is used to indicate the attribute information of the second-type node.

[0165] In a possible implementation, the page description information includes description information of a first node; the code conversion unit 202 is specifically used to convert the description information of the first node into a code corresponding to the first node, and the code corresponding to the first node is used to describe multiple variables corresponding to the first node.

[0166] In a possible implementation, the multiple variables corresponding to the first node include a first variable, and the description information of the first node includes the type and content of the first variable; the code conversion unit 202 is specifically used to parse the type of the first variable according to the type of the first variable, and determine the code used to describe the first variable.

[0167] In a possible implementation, the code description information of the first node further includes a first identifier, and the first identifier corresponds to the first variable; the code conversion unit 202 is specifically configured to determine that the description information of the first code includes the first identifier.

[0168] In a possible implementation manner, the description information of the first node further includes a first rendering type identifier, where the first rendering type identifier is used to indicate a rendering type of the first node;

[0169] The rendering unit 203 is specifically configured to determine a first rendering plug-in according to the first rendering type identifier, where the first rendering plug-in corresponds to the first rendering type identifier; and render the first node using the first rendering plug-in and the code information of the first node.

[0170] Based on the page rendering method provided by the above method embodiment, the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the page rendering method described in any of the above embodiments.

[0171] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device 300 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0172] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 306 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0173] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 306 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0174] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 306, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0175] The electronic device provided in the embodiment of the present application and the page rendering method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0176] Based on a page rendering method provided by the above method embodiment, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the page rendering method as described in any of the above embodiments is implemented.

[0177] It should be noted that the computer-readable medium in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0178] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0179] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0180] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the page rendering method.

[0181] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages ​​or a combination thereof, and the above-mentioned programming languages ​​include but are not limited to object-oriented programming languages-such as Java, Smalltalk, C++, and also include conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the unit / module does not, in some cases, constitute a limitation on the unit itself.

[0184] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0185] In the context of the present application embodiment, machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0186] According to one or more embodiments of the present application, [Example 1] provides a method for page rendering, the method comprising:

[0187] Obtaining page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created;

[0188] Converting the page description information into page code information of the target page;

[0189] The target page is rendered according to the page code information.

[0190] According to one or more embodiments of the present application, [Example 2] provides a method for page rendering, wherein the page description information includes description information of a first container, and the first container includes at least one first-type node;

[0191] The converting the page description information into the page code information of the target page includes:

[0192] The description information of the first container is converted into a code corresponding to the first container, where the code corresponding to the first container is used to indicate attribute information of the first type of node.

[0193] According to one or more embodiments of the present application, [Example 3] provides a method for page rendering, wherein the page description information further includes description information of a second container, the second container includes at least one second-type node, and the second-type node belongs to the first-type node;

[0194] The converting the description information of the first container into a code corresponding to the first container includes:

[0195] The description information of the second container is converted into a code corresponding to the second area, where the code corresponding to the second container is used to indicate the attribute information of the second type of node.

[0196] According to one or more embodiments of the present application, [Example 4] provides a method for page rendering, wherein the page description information includes description information of a first node;

[0197] The converting the page description information into the page code information of the target page includes:

[0198] The description information of the first node is converted into a code corresponding to the first node, where the code corresponding to the first node is used to describe multiple variables corresponding to the first node.

[0199] According to one or more embodiments of the present application, [Example 5] provides a page rendering method, wherein the multiple variables corresponding to the first node include a first variable, and the description information of the first node includes a type and content of the first variable;

[0200] The converting the description information of the first node into the corresponding code of the first node includes:

[0201] According to the type of the first variable, the type of the first variable is parsed to determine a code for describing the first variable.

[0202] According to one or more embodiments of the present application, [Example 6] provides a page rendering method, wherein the code description information of the first node further includes a first identifier, and the first identifier corresponds to the first variable;

[0203] Before parsing the first variable, the method further includes:

[0204] Determine that the description information of the first code includes the first identifier.

[0205] According to one or more embodiments of the present application, [Example 7] provides a page rendering method, wherein the description information of the first node further includes a first rendering type identifier, and the first rendering type identifier is used to indicate a rendering type of the first node;

[0206] Rendering the target page according to the page code information includes:

[0207] The first rendering plug-in corresponds to the first rendering type identifier;

[0208] A first rendering plug-in is determined according to the first rendering type identifier, and the first node is rendered using the first rendering plug-in and the code information of the first node.

[0209] According to one or more embodiments of the present application, [Example 8] provides a page rendering device, the device comprising:

[0210] A description information acquisition unit, used to acquire page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created;

[0211] A code conversion unit, used for converting the page description information into page code information of the target page;

[0212] A rendering unit is used to render the target page according to the page code information.

[0213] According to one or more embodiments of the present application, [Example Nine] provides a page rendering device, wherein the page description information includes description information of a first container, and the first container includes at least one first-class node; the code conversion unit is specifically used to convert the description information of the first container into a code corresponding to the first container, and the code corresponding to the first container is used to indicate attribute information of the first-class node.

[0214] According to one or more embodiments of the present application, [Example 10] provides a page rendering device, wherein the page description information also includes description information of a second container, the second container includes at least one second-type node, and the second-type node belongs to the first-type node; the code conversion unit is specifically used to convert the description information of the second container into a code corresponding to the second area, and the code corresponding to the second container is used to indicate the attribute information of the second-type node.

[0215] According to one or more embodiments of the present application, [Example 11] provides a page rendering device, wherein the page description information includes description information of a first node; the code conversion unit is specifically used to convert the description information of the first node into a code corresponding to the first node, and the code corresponding to the first node is used to describe multiple variables corresponding to the first node.

[0216] According to one or more embodiments of the present application, [Example 12] provides a page rendering device, wherein the multiple variables corresponding to the first node include a first variable, and the description information of the first node includes the type and content of the first variable; the code conversion unit is specifically used to parse the type of the first variable according to the type of the first variable, and determine the code used to describe the first variable.

[0217] According to one or more embodiments of the present application, [Example 13] provides a page rendering device, wherein the code description information of the first node also includes a first identifier, and the first identifier corresponds to the first variable; the code conversion unit is specifically used to determine that the description information of the first code includes the first identifier.

[0218] According to one or more embodiments of the present application, [Example 14] provides a page rendering device, wherein the description information of the first node also includes a first rendering type identifier, and the first rendering type identifier is used to indicate the rendering type of the first node; the rendering unit is specifically used to determine a first rendering plug-in according to the first rendering type identifier, and the first rendering plug-in corresponds to the first rendering type identifier; and the first node is rendered using the first rendering plug-in and the code information of the first node.

[0219] According to one or more embodiments of the present application, [Example 15] provides a page rendering device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a page rendering method as described in any one of [Example 1] to [Example 7] is implemented.

[0220] According to one or more embodiments of the present application, [Example 16] provides a computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the page rendering method as described in any one of [Example 1] to [Example 7].

[0221] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0222] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0223] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0224] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0225] 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 spirit or 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.

Claims

1. A method for page rendering, It is characterized in that The method comprises: Obtaining page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created; Converting the page description information into page code information of the target page; The target page is rendered according to the page code information.

2. The method according to claim 1, It is characterized in that The page description information includes description information of a first container, and the first container includes at least one first-type node; The converting the page description information into the page code information of the target page includes: The description information of the first container is converted into a code corresponding to the first container, where the code corresponding to the first container is used to indicate attribute information of the first type of node.

3. The method according to claim 2, It is characterized in that The page description information further includes description information of a second container, the second container includes at least one second-type node, and the second-type node belongs to the first-type node; The converting the description information of the first container into a code corresponding to the first container includes: The description information of the second container is converted into a code corresponding to the second area, where the code corresponding to the second container is used to indicate the attribute information of the second type of node.

4. The method according to claim 1, It is characterized in that The page description information includes description information of the first node; The converting the page description information into the page code information of the target page includes: The description information of the first node is converted into a code corresponding to the first node, where the code corresponding to the first node is used to describe multiple variables corresponding to the first node.

5. The method according to claim 4, It is characterized in that The multiple variables corresponding to the first node include a first variable, and the description information of the first node includes a type and content of the first variable; The converting the description information of the first node into the corresponding code of the first node includes: According to the type of the first variable, the type of the first variable is parsed to determine a code for describing the first variable.

6. The method according to claim 5, It is characterized in that The code description information of the first node further includes a first identifier, and the first identifier corresponds to the first variable; Before parsing the first variable, the method further includes: Determine that the description information of the first code includes the first identifier.

7. The method according to any one of claims 4 to 6, It is characterized in that The description information of the first node further includes a first rendering type identifier, where the first rendering type identifier is used to indicate a rendering type of the first node; Rendering the target page according to the page code information includes: Determine a first rendering plug-in according to the first rendering type identifier, where the first rendering plug-in corresponds to the first rendering type identifier; The first node is rendered using the first rendering plug-in and the code information of the first node.

8. A page rendering device, It is characterized in that The device comprises: A description information acquisition unit, used to acquire page description information of a target page, wherein the page description information is obtained according to a page editing operation triggered when the target page is created; A code conversion unit, used for converting the page description information into page code information of the target page; A rendering unit is used to render the target page according to the page code information.

9. A page rendering device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for page rendering according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the page rendering method according to any one of claims 1 to 7.