CN113760270A - Page development and rendering method and device - Google Patents

Page development and rendering method and device Download PDF

Info

Publication number
CN113760270A
CN113760270A CN202010724629.6A CN202010724629A CN113760270A CN 113760270 A CN113760270 A CN 113760270A CN 202010724629 A CN202010724629 A CN 202010724629A CN 113760270 A CN113760270 A CN 113760270A
Authority
CN
China
Prior art keywords
logic
page
logic element
elements
target
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.)
Pending
Application number
CN202010724629.6A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010724629.6A priority Critical patent/CN113760270A/en
Publication of CN113760270A publication Critical patent/CN113760270A/en
Pending legal-status Critical Current

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a page development and rendering method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a plurality of logic elements, wherein each logic element corresponds to one category; constructing a logic relation graph by using various logic elements and corresponding categories, wherein the logic relation graph characterizes page logic; and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information. The method reduces the coupling degree between the developed page and the logic, the page logic can be realized by constructing the logic relation diagram through the logic elements, and the development efficiency can be effectively improved.

Description

Page development and rendering method and device
Technical Field
The invention relates to the technical field of computers, in particular to a page development and rendering method and device.
Background
The page logic development is part of the page development, and can realize different renderings of the page according to the logic combination of one field or a plurality of fields in the return data of the server.
Currently, for different pages, separate code development is often required according to page requirements, that is, the page or components in the page are redeveloped according to different business requirements.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the existing page development has high coupling between the page and the logic, which causes low development efficiency.
Disclosure of Invention
In view of this, embodiments of the present invention provide a page development and rendering method and apparatus, which reduce a coupling degree between a developed page and a logic, and the page logic can be implemented by constructing a logic relationship diagram through logic elements, so that development efficiency can be effectively improved.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a page development method including:
acquiring a plurality of logic elements, wherein each logic element corresponds to one category;
constructing a logic relation graph by using the multiple logic elements and the corresponding categories, wherein the logic relation graph represents page logic;
and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
Preferably, the step of constructing a logical relationship graph includes:
responding to the addition of a target logic element, judging whether the target logic element meets an addition condition, and if so, adding the target logic element, wherein the target logic element is any one logic element in the multiple logic elements;
and responding to the target logic element to have an adjacent logic element, and generating a connection relation identifier between the target logic element and the adjacent logic element.
Preferably, the first and second electrodes are formed of a metal,
after the target logic element is added, the target logic element generates a corresponding feature number;
adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the adding corresponding attributes comprises the following steps:
and responding to the target logic element to have an upper logic element with a connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
Preferably, the page development method comprises, in response to a page development request,
for each logical element in the logical relationship graph:
and judging whether the connection relation corresponding to the logic element meets a limit condition, and if so, forbidding adding a corresponding lower logic element for the logic element.
Preferably, the adding of the corresponding attribute to the logical element in the logical relationship diagram includes:
responding to the logic element comprising the state category, acquiring state rendering information and/or component information included in page development, and adding the state rendering information and/or the component information into the attribute
Preferably, the adding of the corresponding attribute to the logical element in the logical relationship diagram includes:
responding to the logic element comprising the logic judgment category, and acquiring logic configuration information included in page development;
determining an execution route corresponding to a logic judgment condition included in the logic configuration information;
and adding the logic configuration information and the execution route corresponding to the logic judgment condition into the attribute.
Preferably, the page development method includes:
when a deletion operation on a current logical element in the logical relationship diagram is received, deleting the current logical element and logical elements logically positioned after the current logical element.
Preferably, the page development method includes:
responding to a configuration instruction of any logic element in the logic relationship diagram, and providing at least one visualized executable operation identifier for the logic element corresponding to the configuration instruction, wherein the executable operation identifier comprises: adding any one or more of the operation identifier of the logic element, the operation identifier of the logic element and the ending operation identifier;
and responding to the use instruction identified by any executable operation, and executing corresponding configuration for the selected logic element.
Preferably, the page development method includes:
when a modification instruction for a page is received, providing the logical relationship diagram so that a user can perform modification operation on the logical relationship diagram.
In a second aspect, an embodiment of the present invention provides a page rendering method, including:
responding to an access request of the page, and acquiring at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements;
and rendering the page according to the plurality of logic elements included in the logic relationship diagram and the attributes corresponding to the logic elements.
In a third aspect, an embodiment of the present invention provides a page development apparatus, including:
the interactive unit is used for acquiring a plurality of logic elements, wherein each logic element corresponds to one category;
the building unit is used for building a logic relationship diagram by utilizing the various logic elements and the corresponding categories provided by the interaction unit, and the logic relationship diagram represents page logic; and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
Preferably, the first and second electrodes are formed of a metal,
the construction unit is used for responding to the addition of a target logic element, judging whether the target logic element meets an addition condition, and if so, adding the target logic element, wherein the target logic element is any one logic element in the multiple logic elements; and when the target logic element has an adjacent logic element, generating a connection relation identifier between the target logic element and the adjacent logic element.
Preferably, the first and second electrodes are formed of a metal,
the construction unit is further configured to generate a corresponding feature number for the target logic element; and responding to the target logic element to have an upper logic element with a connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
In a fifth aspect, an embodiment of the present invention provides a page rendering apparatus, including:
the obtaining unit is used for responding to an access request of the page and obtaining at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements;
and the rendering unit is used for rendering the page according to the plurality of logic elements and the attributes corresponding to the logic elements included in the logic relationship diagram acquired by the acquisition unit.
One embodiment of the above invention has the following advantages or benefits: the scheme provided by the embodiment of the invention can construct the logic relationship diagram for representing the page logic through the logic elements and the corresponding categories aiming at different page developments, and different page logics can be realized through different logic relationship diagrams, namely the process of the logic relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logic elements in the logic relationship diagram, development of different pages can be completed. Therefore, the scheme provided by the embodiment of the invention reduces the coupling degree between the developed page and the logic, the page logic can be realized by constructing the logic relation diagram through the logic elements, and the development efficiency can be effectively improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a logical relationship diagram according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of a page development method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a main flow of building a logical relationship graph according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of building a logical relationship graph according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a main flow of a page rendering method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the main elements of a page development apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of the main units of a page rendering apparatus according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Logical elements refer to visual graphical structures such as rectangles, circles, diamonds, squares, cuboids, spheres, and the like.
The category refers to a usage condition or a usage manner for defining the position of the logical element in the logical relationship diagram. For example, the categories may include: a logic start category, a logic decision category, and a status category.
The logic elements belonging to the initial category can only be used in the initial position of the logic relationship diagram, which indicates the start of the logic relationship diagram construction, and there is no upper logic element having a connection relationship, and the lower logic element having a connection relationship corresponding to the logic elements belonging to the initial category may be the logic elements belonging to the logic judgment category, and may also be the logic elements belonging to the state category.
The logic elements belonging to the logic judgment category are used for indicating judgment nodes or condition nodes in page development, and may be divided into two lower connection relationships, each lower connection relationship may connect the lower logic elements corresponding to the logic element, that is, the logic elements belonging to the logic judgment category may connect the two logic elements through the two connection relationships, and the two connected logic elements may be the logic elements belonging to the logic judgment category or the logic elements belonging to the state category. The configuration information corresponding to the logical element belonging to the logical judgment category indicates a logical expression to realize the logical judgment.
The logic element belonging to the state category is the end of the logic relationship diagram, which may be a value such as the display result of a partial page, or configuration information of a component of a page, which has no lower logic element, and whose upper logic element can only be the logic element belonging to the logic judgment category.
The lower logic element and the upper logic element are two opposite concepts.
Next, a logical element, a category, a connection relationship, an upper logical element, and a lower logical relationship will be described by taking the logical relationship diagram shown in fig. 1 as an example.
For example, the graphs with numbers a (rectangle), B (diamond), C (circle), and D (square) shown in fig. 1 are all logic elements, wherein the category of a is the starting category, the category of B is the judgment logic category, and the categories of C and D are all state categories; a to B are a connection relation, B to C are a connection relation, and B to D are a connection relation; a is an upper logic element of B, and B is a lower logic element of A; b is the upper logic element of C, C is the lower logic element of B, B is the upper logic element of D, and D is the lower logic element of B.
Fig. 2 is a page development method according to an embodiment of the present invention, and as shown in fig. 2, the steps of the page development method may include:
s201: acquiring a plurality of logic elements, wherein each logic element corresponds to one category;
s202: constructing a logic relation graph by using various logic elements and corresponding categories, wherein the logic relation graph characterizes page logic;
s203: and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
The page rendering information may be rendering parameters or information of the component, or rendering information of a part of the page, such as a page color, a font size, and the like.
In the embodiment shown in fig. 2, a logic relationship diagram representing page logic can be constructed by logic elements and corresponding categories for different page developments, and different page logic can be implemented by different logic relationship diagrams, that is, the process of the logic relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logic elements in the logic relationship diagram, development of different pages can be completed. Therefore, the scheme provided by the embodiment of the invention reduces the coupling degree between the developed page and the logic, the page logic can be realized by constructing the logic relation diagram through the logic elements, and the development efficiency can be effectively improved.
It should be noted that, a logic relationship diagram constructed by the above-mentioned scheme may indicate a component to be changed with logic, for example, in an order payment page, a payment component is displayed as green and operable before payment, and is displayed as gray and inoperable after payment is successful, and then the rendering of the payment component may be implemented by the logic relationship diagram constructed by the scheme provided by the above-mentioned embodiment. The rendering of one page can be achieved by building multiple logical relationship graphs.
In an embodiment of the present invention, as shown in fig. 3, the step of constructing the logical relationship diagram includes:
s301: responding to the addition of the target logic element, judging whether the target logic element meets the addition condition, and if so, executing the step S302; otherwise, go to step S304;
s302: adding a target logic element, wherein the target logic element is any one of a plurality of logic elements;
s303: responding to the target logic element with an adjacent logic element, generating a connection relation identifier between the target logic element and the adjacent logic element, and ending the current flow;
s304: the target logical element addition is disabled.
Wherein, the adding conditions can comprise: aiming at the initial position of the constructed logic relation graph, only the logic elements of the initial category can be added; for non-start positions, logical elements of a judgment logical class or logical elements of a status class may be added; the logic element of the initial category and the logic element of the state category can be added to the lower logic element of the initial category; the logic element of the initial category can only add one lower logic element, the logic element of the judgment logic category can add two lower logic elements, and the logic element of the status category can not add the lower logic element. For example, if the logic element of the logic category is added at the initial position, the adding condition is not satisfied; for another example, if the logic element of the start category is added at the start position, the addition condition is satisfied, and if the logic element of the start category is added at the non-start position, the addition condition is not satisfied. For another example, if the target logical element is added after the logical element of the state category, the addition condition or the like is not satisfied.
Because the logic elements which do not meet the adding condition can not be added, the accuracy of the logic relationship diagram can be effectively improved through the process of constructing the logic relationship diagram.
In one embodiment of the invention, after the target logic element is added, the target logic element generates a corresponding feature number; the step of adding corresponding attributes to the logical elements in the logical relationship diagram may include: and responding to the target logic element to have the upper logic element with the connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
The feature number may be encoded according to a flow sequence of the logical relationship diagram, for example, S0001 indicates a logical element of a starting position corresponding to the logical relationship diagram S; s0002 indicates the lower logical elements corresponding to the logical elements at the start position corresponding to the logical relationship diagram S, and the logical elements may be sequentially numbered according to the order. In addition to the above feature numbering system, there may be other existing encoding systems for feature numbering.
Through the process, the logical relationship diagram and the logical elements in the logical relationship diagram can be managed conveniently. In addition, the feature number is added to the attribute of the corresponding upper logic element, and in the page rendering process, the lower logic element can be determined according to the feature number existing in the attribute, and the page rendering is performed according to the rendering information in the lower logic element.
In one embodiment of the invention, for each logical element in the logical relationship graph:
and judging whether the connection relation corresponding to the logic element meets the limiting condition, if so, forbidding to newly add the corresponding lower logic element to the logic element, and otherwise, allowing the logic element to newly add the corresponding lower logic element.
Wherein the limiting conditions include: there may only be one connection for the logical elements of the starting category; aiming at the logic elements of the logic judgment category, only two connection relations aiming at the lower logic elements can be provided; for the logic elements of the state category, the connection relationship of the lower logic elements may not exist. That is, when a connection relationship already exists in the logic element of the initial category, the logic element of the initial category may be changed to gray to prohibit adding lower logic elements to the logic element of the initial category; when the logic element of the logic judgment type has two connection relations connected to the lower logic element, the logic element of the logic judgment type can be changed into gray so as to prohibit adding the lower logic element to the logic element of the logic judgment type; when the logic element of the state category is added to the logic relationship diagram, the logic element is directly changed into grey, and the addition of the lower logic element for the logic element of the state category is forbidden.
Through the process, the addition of wrong logic elements can be further prevented, so that the accuracy of the logic relation graph is effectively improved.
In an embodiment of the present invention, a specific implementation of the step of adding the corresponding attribute to the logical element in the logical relationship diagram may include: responding to the logic element comprising the logic judgment category, and acquiring logic configuration information included in page development; determining an execution route corresponding to a logic judgment condition included in the logic configuration information; and adding the logic configuration information and the execution route corresponding to the logic judgment condition into the attribute. The logic configuration information may indicate a specific logic execution program, and may also indicate a storage address of the logic program (where the logic execution program is stored). For example, the logic for a payment component executes the program: before the user triggers the payment assembly, the word 'payment' in the payment assembly is displayed as green and Song style, after the user triggers the payment assembly and carries out payment operation, the word 'payment' in the payment assembly is displayed as grey and regular style, and the logic judgment condition included in the logic execution program is as follows: 1. before the payment operation of the user; 2. after the user payment operation; wherein, 1, the corresponding line before the user payment operation indicates a logic element of a state category so as to realize that the character 'payment' in the rendering payment assembly is displayed as green and Song dynasty; 2. the corresponding line after the user payment operation indicates the logic element of another state category to realize that the character 'pay' in the rendering payment assembly is displayed as a grey and regular script.
Wherein, two logic judgment conditions can be expressed by adopting a logic expression, namely: the logic expression is a corresponding logic judgment condition when the logic expression is true, and the logic expression is false and corresponds to another logic judgment condition.
In one embodiment of the invention, in response to the logic element comprising the logic judgment category, state rendering information and/or component information comprised by the page development is obtained, and the state rendering information and/or the component information is added to the attribute.
In one embodiment of the invention, the page development method may include: and in response to the deletion instruction of the current logic element in the logic relationship diagram, deleting the current logic element and the logic elements logically positioned after the current logic element. For example, in the logical relationship diagram shown in fig. 1, when a deletion operation is performed on the logical element B, the logical element C, and the logical element D are deleted.
In one embodiment of the invention, the page development method may include: responding to a configuration instruction of any logic element in the logic relationship diagram, and providing at least one visualized executable operation identifier for the logic element corresponding to the configuration instruction, wherein the executable operation identifier comprises: adding any one or more of the operation identifier of the logic element, the operation identifier of the logic element and the ending operation identifier; and responding to the use instruction identified by any executable operation, and executing corresponding configuration for the selected logic element. The configuration instructions may be: the cursor is suspended in a configuration instruction generated corresponding to the logic element, or the logic element receives a configuration instruction generated corresponding to the clicking operation. The configuration instruction is a character string or code or the like generated for a page operation by a user and usable by a computer. As shown in fig. 4, the mouse-over current element means that when the mouse is over a line marked with F corresponding to a judgment condition of a logical element (the logical element is a logical judgment category) marked with 1, a configuration instruction matching with the operation of mouse-over current element is generated or generated, and accordingly, the mouse-over current element pops up a frame and corresponding operations such as adding a node, deleting a node, or ending logic. For the logic element of the initial category (i.e., the "start" logic element shown in fig. 4), there are a logic element of the new logic judgment category and a logic element of the new state category. After receiving the click operation of the logic element of the newly added logic judgment category of the user, generating a corresponding configuration instruction aiming at the click operation of the user, correspondingly, generating a logic element (logic element with the label 1) of the logic judgment category under the 'start' logic element, wherein the two logic elements are connected by a line segment with an arrow, and the arrow points to the newly added logic element; clicking the logic element of the new state category generates a logic element of the state category, and connecting the logic elements by using a line segment with an arrow. If the start element has a logical judgment element, the corresponding operation will be grayed out and not clickable.
The logic elements of the logic judgment type are the core of logic visualization, bear the most core functions, have relatively complex corresponding operations and comprise logic elements of a logic judgment type added for the logic judgment condition T, logic elements of a logic judgment type added for the logic judgment condition F, logic elements of a state type added for the logic judgment condition T, logic elements of a state type added for the logic judgment condition F, configuration and deletion operations. The logic element of the logic judgment type is newly added for the logic judgment condition T, the logic element of the logic judgment type is generated under the current logic element, the logic elements are connected by a line segment with an arrow, and a Yes mark, a T mark or a future mark is generated in the middle of the line segment towards the left or the right to represent the route which the line passes through when the logic expression is true; if a logic element of a logic judgment type is newly added for the logic judgment condition F, a logic judgment element is generated on the right side of the current logic element and is connected with the current logic element by a line segment with an arrow, and a No or F or false mark is generated in the middle of the line segment and is a route through which the line passes when the logic expression is false; the logic element of the newly added state type for the logic judgment condition T is a logic element which generates a state type under the current logic element, the logic elements are connected by a line segment with an arrow, and the middle part of the line segment is close to the left to generate a Yes or T or true mark which represents a route passed by the logic expression when true; if a logic element of a new state type is added for the logic judgment condition F, a logic element of a state type is generated right side of the current logic element and is connected with the current logic element by a line segment with an arrow, and a No or F or false mark is generated at the middle lower part of the line segment and represents a route passed by the logic expression of false; the configuration operation is to configure the logic elements corresponding to the current logic judgment category, and is to configure the logic expression in detail; the deletion operation may delete the current element, and the line segment with an arrow pointing to the current element, the flag corresponding to the line segment, and all the descendant elements thereof are also deleted.
And for the logic elements of the state category, carrying out configuration and deletion operations. The configuration operation is to configure the logic element of the state category, and the configuration information may be a text description or a component. If the component is the configuration information, the configuration information is the configuration of the component, including the description of the component, the display of the component, the style of the component and the like; the deletion operation is to delete the current state logic element, and the line segment of the dot arrow pointing to the logic element and the mark corresponding to the line segment are also deleted. For example, a button component, whose name, color, etc. describe fields, may be configured to present a variety of situations, such as (1) name: display color: red (2) name: hide color: black; and (3) judging that the result of the logic expression corresponding to the logic element of the logic judgment category is one of the two conditions, and if the result is true, showing (1), and if the result is false, showing (2).
Based on the above embodiments, it can be known that the logic elements of the logic judgment category and the logic elements of the initial category are both operated by visually guiding a user, and logic development in a page is facilitated.
In one embodiment of the invention, the page development method may include: and providing the logic relation diagram in response to the modification instruction of the page, so that a user can perform modification operation on the logic relation diagram. The visualized modification of the page development logic is realized through the process, and the modification is more convenient and quicker on the basis of the clearer logic because the clearer logic is given by the logic relation diagram. The modification may be to add a logical element corresponding to the logical node, delete an element corresponding to the logical node, change a logical judgment condition included in a logical element corresponding to the logical judgment category, and the like.
The user can check the logic relation diagram to know the development logic, so that the visualization of the page development logic is realized, and the management of the page development logic is facilitated.
Any of the above embodiments may use svg or canvas to construct the logic elements.
As shown in fig. 5, an embodiment of the present invention provides a page rendering method, where the page rendering method may include the following steps:
s501: responding to an access request of a page, and acquiring at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements;
s502: and rendering the page according to the plurality of logic elements and the attributes corresponding to the logic elements included in the logic relationship diagram.
The rendering of the page is realized through the process.
As shown in fig. 6, an embodiment of the present invention provides a page development apparatus 600, where the page development apparatus 600 includes:
an interaction unit 601, configured to obtain multiple logic elements, where each logic element corresponds to a category;
the constructing unit 602 is configured to construct a logical relationship diagram by using the multiple logical elements and the corresponding categories provided by the interacting unit 601, where the logical relationship diagram characterizes page logic; and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
In an embodiment of the present invention, the constructing unit 602 is configured to, in response to adding a target logical element, determine whether the target logical element meets an adding condition, and if so, add the target logical element, where the target logical element is any one of multiple logical elements; and responding to the target logic element to have the adjacent logic element, and generating a connection relation identifier between the target logic element and the adjacent logic element.
In an embodiment of the present invention, the constructing unit 602 is further configured to generate a corresponding feature number for the target logical element; and responding to the target logic element to have the upper logic element with the connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
In an embodiment of the present invention, the constructing unit 602 is further configured to, for each logical element in the logical relationship graph: and judging whether the connection relation corresponding to the logic element meets the limiting condition, and if so, forbidding to newly add the corresponding lower logic element to the logic element.
In an embodiment of the present invention, the constructing unit 602 is further configured to, in response to that the logic element includes a logic judgment category, obtain one piece of logic configuration information included in the page development, and add the logic configuration information to the attribute.
In an embodiment of the present invention, the building unit 602 is further configured to, in response to that the logical element includes a state category, obtain state rendering information and/or component information included in the page development, and add the state rendering information and/or the component information to the attribute.
In an embodiment of the present invention, the constructing unit 602 is further configured to delete, in response to a deletion instruction of a current logical element in the logical relationship diagram, the current logical element and logical elements logically subsequent to the current logical element.
In an embodiment of the present invention, the constructing unit 602 is further configured to, in response to a configuration instruction of any logic element in the logical relationship diagram, provide at least one visualized executable operation identifier for the logic element corresponding to the configuration instruction, where the executable operation identifier includes: adding any one or more of the operation identifier of the logic element, the operation identifier of the logic element and the ending operation identifier; when any executable operation identifier is selected, the corresponding operation is executed for the selected logic element.
In an embodiment of the present invention, the building unit 602 is further configured to provide the logical relationship diagram in response to a modification instruction of the page, so that a user performs a modification operation on the logical relationship diagram.
As shown in fig. 7, an embodiment of the present invention provides a page rendering apparatus 700, where the page rendering apparatus 700 includes:
an obtaining unit 701, configured to obtain at least one logic relationship graph related to a page when an access request for the page is received, where the logic relationship graph represents a page logic and includes a plurality of logic elements and attributes corresponding to the logic elements;
the rendering unit 702 is configured to render a page according to the multiple logic elements and the attributes corresponding to the logic elements included in the logic relationship diagram acquired by the acquisition unit 701.
The page rendering apparatus 700 can be used as a plug-in for a client and a web browser.
Fig. 8 shows an exemplary system architecture 800 to which a page development method or a page development method apparatus or a page rendering method or a page rendering apparatus according to an embodiment of the present invention may be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or transmit logical elements or logical relationship diagrams, etc. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server providing various services, such as a background management server providing support for users to build logical relationship graphs using the terminal devices 801, 802, 803, such as a background management server providing support for rendering of pages browsed by users using the terminal devices 801, 802, 803 (for example only). The background management server may obtain a plurality of logic elements, construct a logic relationship diagram, render and analyze the logic relationship diagram for the page, and feed back a processing result (e.g., a result of page rendering — only an example) to the terminal device.
It should be noted that the page development method or the page rendering method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the page development device or the page rendering device is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, a block diagram of a computer system 900 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an interaction unit and a construction unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, an interactive unit may also be described as a "unit that obtains various logical elements".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring a plurality of logic elements, wherein each logic element corresponds to one category; constructing a logic relation graph by using various logic elements and corresponding categories, wherein the logic relation graph characterizes page logic; and adding corresponding attributes for the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: when an adding instruction of a target logic element is received, judging whether the target logic element meets an adding condition, if so, adding the target logic element, wherein the target logic element is any one of a plurality of logic elements; when the target logic element has adjacent logic elements, a connection relation identifier is generated between the target logic element and the adjacent logic elements.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: generating a corresponding feature number for the target logic element; and when the target logic element has an upper logic element with a connection relation, adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: when an access request to a page is received, acquiring at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements; and rendering the page according to the plurality of logic elements and the attributes corresponding to the logic elements included in the logic relationship diagram.
According to the technical scheme of the embodiment of the invention, the logic relationship diagram for representing the page logic can be constructed by the logic elements and the corresponding categories aiming at different page developments, and different page logics can be realized by different logic relationship diagrams, namely the process of the logic relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logic elements in the logic relationship diagram, development of different pages can be completed. Therefore, the scheme provided by the embodiment of the invention reduces the coupling degree between the developed page and the logic, the page logic can be realized by constructing the logic relation diagram through the logic elements, and the development efficiency can be effectively improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A page development method is characterized by comprising the following steps:
acquiring a plurality of logic elements, wherein each logic element corresponds to one category;
constructing a logic relation graph by using the multiple logic elements and the corresponding categories, wherein the logic relation graph represents page logic;
and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
2. The page development method of claim 1, wherein the step of constructing the logical relationship graph comprises:
responding to the addition of a target logic element, judging whether the target logic element meets an addition condition, and if so, adding the target logic element, wherein the target logic element is any one logic element in the multiple logic elements;
and responding to the target logic element to have an adjacent logic element, and generating a connection relation identifier between the target logic element and the adjacent logic element.
3. The page development method according to claim 2,
adding the target logic element, wherein the target logic element generates a corresponding feature number;
adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the adding corresponding attributes comprises the following steps:
and responding to the target logic element to have an upper logic element with a connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
4. The page development method according to any one of claims 1 to 3, wherein, for each logical element in the logical relationship graph:
and judging whether the connection relation corresponding to the logic element meets a limit condition, and if so, forbidding adding a corresponding lower logic element for the logic element.
5. The page development method according to claim 3, wherein the adding of the corresponding attribute to the logical element in the logical relationship diagram comprises:
responding to the logic element comprising a state category, acquiring state rendering information and/or component information included in page development, and adding the state rendering information and/or the component information into the attribute;
and/or the presence of a gas in the gas,
responding to the logic element comprising the logic judgment category, and acquiring logic configuration information included in page development;
determining an execution route corresponding to a logic judgment condition included in the logic configuration information;
and adding the logic configuration information and the execution route corresponding to the logic judgment condition into the attribute.
6. The page development method according to claim 1, comprising:
responding to a configuration instruction of any logic element in the logic relationship diagram, and providing at least one visualized executable operation identifier for the logic element corresponding to the configuration instruction, wherein the executable operation identifier comprises: adding any one or more of the operation identifier of the logic element, the operation identifier of the logic element and the ending operation identifier;
and responding to the use instruction identified by any executable operation, and executing corresponding configuration for the selected logic element.
7. A page rendering method, comprising:
responding to an access request of the page, and acquiring at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements;
and rendering the page according to the plurality of logic elements included in the logic relationship diagram and the attributes corresponding to the logic elements.
8. A page development apparatus, comprising:
the interactive unit is used for acquiring a plurality of logic elements, wherein each logic element corresponds to one category;
the building unit is used for building a logic relationship diagram by utilizing the various logic elements and the corresponding categories provided by the interaction unit, and the logic relationship diagram represents page logic; and adding corresponding attributes to the logic elements in the logic relationship diagram, wherein the attributes comprise page rendering information.
9. The page developing apparatus according to claim 8,
the construction unit is used for responding to the addition of a target logic element, judging whether the target logic element meets an addition condition, and if so, adding the target logic element, wherein the target logic element is any one logic element in the multiple logic elements; and responding to the target logic element to have an adjacent logic element, and generating a connection relation identifier between the target logic element and the adjacent logic element.
10. The page developing apparatus according to claim 9,
the construction unit is further configured to generate a corresponding feature number for the target logic element; and responding to the target logic element to have an upper logic element with a connection relation, and adding the feature number corresponding to the target logic element into the attribute of the corresponding upper logic element.
11. A page rendering apparatus, comprising:
the obtaining unit is used for responding to an access request of the page and obtaining at least one logic relation graph related to the page, wherein the logic relation graph represents page logic and comprises a plurality of logic elements and attributes corresponding to the logic elements;
and the rendering unit is used for rendering the page according to the plurality of logic elements and the attributes corresponding to the logic elements included in the logic relationship diagram acquired by the acquisition unit.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010724629.6A 2020-07-24 2020-07-24 Page development and rendering method and device Pending CN113760270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010724629.6A CN113760270A (en) 2020-07-24 2020-07-24 Page development and rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010724629.6A CN113760270A (en) 2020-07-24 2020-07-24 Page development and rendering method and device

Publications (1)

Publication Number Publication Date
CN113760270A true CN113760270A (en) 2021-12-07

Family

ID=78785570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010724629.6A Pending CN113760270A (en) 2020-07-24 2020-07-24 Page development and rendering method and device

Country Status (1)

Country Link
CN (1) CN113760270A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122746A (en) * 2000-08-15 2007-05-17 Fujitsu Ltd Web application creation device and method
CN106775617A (en) * 2016-11-09 2017-05-31 深圳市中润四方信息技术有限公司 The service logic collocation method and configuration system of a kind of application software
CN108292206A (en) * 2015-11-23 2018-07-17 微软技术许可有限责任公司 Workflow development system with feature easy to use
CN108733374A (en) * 2018-05-22 2018-11-02 深圳壹账通智能科技有限公司 Application program homepage development approach and terminal device
CN110262791A (en) * 2019-06-05 2019-09-20 搜游网络科技(北京)有限公司 A kind of visual programming method, apparatus and performer, readable storage medium storing program for executing
US10540152B1 (en) * 2016-09-23 2020-01-21 Massachusetts Mutual Life Insurance Company Systems, devices, and methods for software coding
CN111273907A (en) * 2020-02-12 2020-06-12 中国平安人寿保险股份有限公司 Page processing method and related equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122746A (en) * 2000-08-15 2007-05-17 Fujitsu Ltd Web application creation device and method
CN108292206A (en) * 2015-11-23 2018-07-17 微软技术许可有限责任公司 Workflow development system with feature easy to use
US10540152B1 (en) * 2016-09-23 2020-01-21 Massachusetts Mutual Life Insurance Company Systems, devices, and methods for software coding
CN106775617A (en) * 2016-11-09 2017-05-31 深圳市中润四方信息技术有限公司 The service logic collocation method and configuration system of a kind of application software
CN108733374A (en) * 2018-05-22 2018-11-02 深圳壹账通智能科技有限公司 Application program homepage development approach and terminal device
CN110262791A (en) * 2019-06-05 2019-09-20 搜游网络科技(北京)有限公司 A kind of visual programming method, apparatus and performer, readable storage medium storing program for executing
CN111273907A (en) * 2020-02-12 2020-06-12 中国平安人寿保险股份有限公司 Page processing method and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
付冉;杨燕;王帅;徐罡;卢彬;: "基于交互逻辑复用的页面集成框架设计", 计算机工程与设计, no. 02, 16 February 2015 (2015-02-16) *

Similar Documents

Publication Publication Date Title
CN113342450B (en) Page processing method, device, electronic equipment and computer readable medium
CN112947918A (en) Data display method and device
CN113282444B (en) Visualization method and device for debugging business process
CN115145560B (en) Business orchestration method, apparatus, device, computer-readable medium, and program product
CN115793911A (en) Data processing method and device, electronic equipment and storage medium
CN110020349A (en) The method and device of page rendering
CN112256254A (en) Method and device for generating layout code
CN111143408A (en) Event processing method and device based on business rules
CN113760270A (en) Page development and rendering method and device
CN111782995B (en) Graphics paging loading method and device
CN113362097B (en) User determination method and device
CN110554892A (en) Information acquisition method and device
CN113495651B (en) Window control method and device
CN114816382A (en) Method and device for processing page
CN114036249A (en) Map data processing method, map data processing device, electronic equipment and medium
CN113656041A (en) Data processing method, device, equipment and storage medium
CN112948472A (en) Data processing method, device, equipment and computer readable medium
CN110874302A (en) Method and device for determining buried point configuration information
CN113329011B (en) Security access control method and device
CN112947846B (en) Batch processing task execution method and device of object storage system and electronic equipment
CN115328475A (en) Method, device, equipment and medium for displaying UI (user interface) based on interface data
US20220012299A1 (en) User interface for creating and managing url parameters
CN115481193A (en) Data visualization method, device, equipment and storage medium
CN113961723A (en) Credit card rights status updating method, device, electronic equipment and storage medium
CN113419992A (en) File clearing configuration page display method and device, electronic equipment and medium

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