A method and apparatus for page development and rendering
By building a logical relationship diagram and adding attributes of page rendering information, the inefficient development problem caused by the high coupling of pages and logic is solved, and more efficient page development and rendering is achieved.
Patent Information
- Application Number
- CN202010724629.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-24
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-07-24
AI Technical Summary
In the prior art, the page development of pages is highly coupled to the logic, resulting in low development efficiency.
By obtaining multiple logical elements, each logical element corresponds to a category, a logical relationship diagram is constructed, and the logical elements in the logical relationship diagram add corresponding attributes, including page rendering information, to realize the development and rendering of page logic.
The coupling degree between pages and logic is reduced, and development efficiency is improved, so that page logic can be realized by constructing a logical relationship diagram through logical elements.
Smart Images

Figure CN113760270B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a page development and rendering method and device. Background Art
[0002] Page logic development is a part of page development, which can realize different rendering of the page according to the logical combination of one field or multiple fields in the data returned by the server.
[0003] Currently, for different pages, separate code development is often required according to page requirements, that is, the page or the components in the page must be redeveloped according to different business needs.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] The pages developed by the existing pages are highly coupled with the logic, which will result in low development efficiency. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a page development and rendering method and device, which reduces the coupling between the developed page and the logic. The page logic can be implemented by constructing a logical relationship diagram through logical elements, which can effectively improve the development efficiency.
[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a page development method is provided, comprising:
[0008] Acquire multiple logical elements, wherein each of the logical elements corresponds to a category;
[0009] Using the multiple logic elements and corresponding categories, construct a logic relationship diagram, wherein the logic relationship diagram represents the page logic;
[0010] The logical elements in the logical relationship diagram are added with corresponding attributes, and the attributes include page rendering information.
[0011] Preferably, the step of constructing a logical relationship diagram includes:
[0012] In response to adding a target logical element, determining whether the target logical element satisfies an adding condition, and if so, adding the target logical element, wherein the target logical element is any one of the multiple logical elements;
[0013] In response to the target logical element having an adjacent logical element, a connection relationship identifier is generated between the target logical element and the adjacent logical element.
[0014] Preferably,
[0015] After adding the target logical element, the target logical element generates a corresponding feature number;
[0016] The logical elements in the logical relationship diagram add corresponding attributes, including:
[0017] In response to the existence of an upper logical element having a connection relationship with the target logical element, a feature number corresponding to the target logical element is added to an attribute of the corresponding upper logical element.
[0018] Preferably, the page development method,
[0019] For each logical element in the logical relationship diagram:
[0020] It is determined whether the connection relationship corresponding to the logic element meets the restriction condition. If yes, it is prohibited to add a corresponding lower-level logic element to the logic element.
[0021] Preferably, the logical elements in the logical relationship diagram are added with corresponding attributes, including:
[0022] In response to the logic element including a state category, obtaining state rendering information and / or component information included in the page development, and adding the state rendering information and / or component information to the attribute
[0023] Preferably, the logical elements in the logical relationship diagram are added with corresponding attributes, including:
[0024] In response to the logic element including the logic judgment category, obtaining a logic configuration information included in the page development;
[0025] Determine an execution route corresponding to the logic judgment condition included in the logic configuration information;
[0026] The logic configuration information and the execution route corresponding to the logic judgment condition are added to the attribute.
[0027] Preferably, the page development method comprises:
[0028] When a deletion operation on a current logical element in the logical relationship graph is received, the current logical element and a logical element logically located after the current logical element are deleted.
[0029] Preferably, the page development method comprises:
[0030] In response to a configuration instruction of any logical element in the logical relationship diagram, providing at least one visualized executable operation identifier for the logical element corresponding to the configuration instruction, wherein the executable operation identifier includes: any one or more of an operation identifier for adding a logical element, an operation identifier for deleting a logical element, and an operation identifier for ending;
[0031] In response to a use instruction of any of the executable operation identifiers, a corresponding configuration is performed for the selected logic element.
[0032] Preferably, the page development method comprises:
[0033] When a modification instruction for a page is received, the logical relationship diagram is provided so that the user can perform a modification operation on the logical relationship diagram.
[0034] In a second aspect, an embodiment of the present invention provides a page rendering method, comprising:
[0035] In response to an access request for the page, obtaining at least one logical relationship graph related to the page, wherein the logical relationship graph represents page logic and includes a plurality of logical elements and attributes corresponding to the logical elements;
[0036] The page is rendered according to the multiple logical elements included in the logical relationship diagram and the attributes corresponding to the logical elements.
[0037] In a third aspect, an embodiment of the present invention provides a page development device, including:
[0038] An interaction unit, configured to obtain a plurality of logical elements, wherein each of the logical elements corresponds to a category;
[0039] A construction unit is used to construct a logical relationship diagram using the various logical elements and corresponding categories provided by the interaction unit, wherein the logical relationship diagram represents the page logic; the logical elements in the logical relationship diagram add corresponding attributes, and the attributes include page rendering information.
[0040] Preferably,
[0041] The construction unit is used to judge whether the target logical element meets the adding condition in response to adding the target logical element, and if so, add the target logical element, wherein the target logical element is any one of the multiple logical elements; when the target logical element has an adjacent logical element, a connection relationship identifier is generated between the target logical element and the adjacent logical element.
[0042] Preferably,
[0043] The construction unit is further used to generate a corresponding feature number for the target logical element; in response to the existence of an upper logical element with a connection relationship with the target logical element, add the feature number corresponding to the target logical element to the attribute of the corresponding upper logical element.
[0044] In a fifth aspect, an embodiment of the present invention provides a page rendering device, including:
[0045] an acquisition unit, configured to acquire at least one logical relationship graph related to the page in response to an access request for the page, wherein the logical relationship graph represents page logic and includes a plurality of logical elements and attributes corresponding to the logical elements;
[0046] A rendering unit is used to render the page according to the multiple logical elements included in the logical relationship diagram acquired by the acquisition unit and the attributes corresponding to the logical elements.
[0047] An embodiment of the above invention has the following advantages or beneficial effects: the solution provided by the embodiment of the present invention can construct a logical relationship diagram representing the page logic through logical elements and corresponding categories for different page developments, and different page logics can be implemented through different logical relationship diagrams, that is, the process of the logical relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logical elements in the logical relationship diagram, the development of different pages can be completed. Therefore, the solution provided by the embodiment of the present invention reduces the coupling between the developed page and the logic, and the page logic can be implemented by constructing a logical relationship diagram through logical elements, which can effectively improve the development efficiency.
[0048] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0050] Figure 1 is a schematic diagram of a logical relationship diagram according to an embodiment of the present invention;
[0051] Figure 2 is a schematic diagram of the main process of the page development method according to an embodiment of the present invention;
[0052] Figure 3 It is a schematic diagram of the main process of constructing a logical relationship diagram according to an embodiment of the present invention;
[0053] Figure 4 is a schematic diagram of constructing a logical relationship diagram according to an embodiment of the present invention;
[0054] Figure 5 is a schematic diagram of the main process of the page rendering method according to an embodiment of the present invention;
[0055] Figure 6 is a schematic diagram of main units of a page development device according to an embodiment of the present invention;
[0056] Figure 7 is a schematic diagram of main units of a page rendering device according to an embodiment of the present invention;
[0057] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0058] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0060] Logical elements refer to visual graphic structures, such as rectangles, circles, diamonds, squares, cuboids, spheres, etc.
[0061] A category refers to a condition or method of use used to limit the position of a logic element in a logic relationship diagram. For example, the category may include: a logic start category, a logic judgment category, and a state category.
[0062] Among them, the logical element belonging to the starting category can only be used at the starting position of the logical relationship diagram, which indicates the beginning of the construction of the logical relationship diagram. There is no upper-level logical element with a connection relationship. The lower-level logical element with a connection relationship corresponding to the logical element belonging to the starting category can be a logical element belonging to the logical judgment category or a logical element belonging to the state category.
[0063] The logical element belonging to the logical judgment category is used to indicate the judgment node or condition node in page development, which can branch out two lower connection relationships, each of which can connect the lower logical element corresponding to the logical element, that is, the logical element belonging to the logical judgment category can connect two logical elements through two connection relationships, and the two connected logical elements can be logical elements belonging to the logical judgment category or logical 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 logical judgment.
[0064] The logical element belonging to the state category is the end of the logical relationship diagram. It can be a value such as the display result of a part of the page, or it can be the configuration information of a component of the page. It has no lower-level logical elements, and its upper-level logical elements can only be logical elements belonging to the logical judgment category.
[0065] Lower-level logical elements and upper-level logical elements are two relative concepts.
[0066] Below Figure 1 A logical relationship diagram is shown as an example to illustrate logical elements, categories, connection relationships, upper logical elements and lower logical relationships.
[0067] for example, Figure 1 The figures numbered A (rectangle), B (diamond), C (circle) and D (square) shown are all logical elements, among which A is a starting category, B is a judgment logic category, and C and D are both state categories; A to B is a connection relationship, B to C is a connection relationship, and B to D is a connection relationship; A is the upper logical element of B, and B is the lower logical element of A; B is the upper logical element of C, C is the lower logical element of B, B is the upper logical element of D, and D is the lower logical element of B.
[0068] Figure 2 A page development method according to an embodiment of the present invention is as follows: Figure 2 As shown, the steps of the page development method may include:
[0069] S201: Acquire multiple logical elements, where each logical element corresponds to a category;
[0070] S202: constructing a logic relationship diagram using multiple logic elements and corresponding categories, where the logic relationship diagram represents page logic;
[0071] S203: Add corresponding attributes to the logical elements in the logical relationship diagram, where the attributes include page rendering information.
[0072] The page rendering information may be rendering parameters or information of a component, or may be rendering information of a part of a page such as page color, font, font size, etc.
[0073] exist Figure 2 In the illustrated embodiment, a logical relationship diagram representing the page logic can be constructed for different page developments through logical elements and corresponding categories, and different page logics can be implemented through different logical relationship diagrams, that is, the process of the logical relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logical elements in the logical relationship diagram, the development of different pages can be completed. Therefore, the solution provided by the embodiment of the present invention reduces the coupling between the developed page and the logic, and the page logic can be implemented by constructing a logical relationship diagram through logical elements, which can effectively improve the development efficiency.
[0074] It is worth noting that a logical relationship diagram constructed by the above solution can indicate the change of a component with logic. For example, on an order payment page, the payment component is displayed as green and operable before payment, and is displayed as gray and inoperable after payment is successful. The logical relationship diagram constructed by the solution given in the above embodiment can realize the rendering of the payment component. The rendering of a page can be realized by constructing multiple logical relationship diagrams.
[0075] In one embodiment of the present invention, Figure 3 As shown, the steps of constructing a logical relationship diagram include:
[0076] S301: In response to adding a target logical element, determine whether the target logical element meets the adding condition, if yes, execute step S302; otherwise, execute step S304;
[0077] S302: Add a target logical element, where the target logical element is any one of the multiple logical elements;
[0078] S303: In response to the target logical element having an adjacent logical element, generating a connection relationship identifier between the target logical element and the adjacent logical element, and ending the current process;
[0079] S304: Prohibit the target logical element from being added.
[0080] Among them, the adding conditions may include: for the starting position of constructing the logical relationship diagram, only the logical elements of the starting category can be added; for the non-starting position, the logical elements of the judgment logic category or the logical elements of the state category can be added; the lower logical elements of the logical elements of the starting category can add the logical elements of the judgment logic category and the logical elements of the state category; the logical elements of the starting category can only add one lower logical element, the logical elements of the judgment logic category can add two lower logical elements, and the logical elements of the state category cannot add lower logical elements. For example, if the logical elements of the judgment logic category are added at the starting position, the adding conditions are not met; for another example, if the logical elements of the starting category are added at the starting position, the adding conditions are met, and if the logical elements of the starting category are added at the non-starting position, the adding conditions are not met. For another example, if the target logical element is added after the logical element of the state category, the adding conditions are not met, etc.
[0081] Since the logic elements that do not meet the adding condition cannot be added, the accuracy of the logic relationship diagram can be effectively improved through the above process of constructing the logic relationship diagram.
[0082] In one embodiment of the present invention, after the target logical element is added, the target logical element generates a corresponding feature number; the step of adding corresponding attributes to the logical elements in the logical relationship diagram may include: in response to the existence of an upper-level logical element with a connection relationship to the target logical element, adding the feature number corresponding to the target logical element to the attribute of the corresponding upper-level logical element.
[0083] The feature number can be encoded according to the process sequence of the logic relationship diagram, for example, S0001 indicates the logic element at the starting position corresponding to the logic relationship diagram S; S0002 indicates the lower logic element corresponding to the logic element at the starting position corresponding to the logic relationship diagram S, and the sequence numbering can be performed according to this sequence. In addition to the above feature numbering method, other existing encoding methods can also be used for feature numbering.
[0084] The above process can facilitate the management of the logical relationship diagram and the logical elements in the logical relationship diagram. In addition, the feature number is added to the attribute of the corresponding upper logical element. During the page rendering process, the lower logical element can be determined according to the feature number in the attribute, and the page rendering can be performed according to the rendering information in the lower logical element.
[0085] In one embodiment of the present invention, for each logical element in the logical relationship diagram:
[0086] It is determined whether the connection relationship corresponding to the logic element meets the restriction condition. If yes, it is prohibited to add the corresponding lower logic element to the logic element. Otherwise, it is allowed to add the corresponding lower logic element to the logic element.
[0087] The limiting conditions include: for the logical element of the starting category, there can only be one connection relationship; for the logical element of the logic judgment category, there can only be two connection relationships with the lower logical elements; for the logical element of the state category, there cannot be a connection relationship with the lower logical elements. That is, when the logical element of the starting category already has one connection relationship, the logical element of the starting category can be turned gray to prohibit the addition of lower logical elements to the logical element of the starting category; when the logical element of the logic judgment category already has two connection relationships connected to the lower logical elements, the logical element of the logic judgment category can be turned gray to prohibit the addition of lower logical elements to the logical element of the logic judgment category; when the logical element of the state category is added to the logic relationship diagram, it directly turns gray to prohibit the addition of lower logical elements to the logical element of the state category.
[0088] The above process can further prevent the addition of erroneous logical elements, thereby effectively improving the accuracy of the logical relationship diagram.
[0089] In one embodiment of the present invention, the specific implementation of the step of adding corresponding attributes to the logic elements in the logic relationship diagram may include: in response to the logic element including the logic judgment category, obtaining a logic configuration information included in the page development; determining the execution route corresponding to the logic judgment condition included in the logic configuration information; adding the logic configuration information and the execution route corresponding to the logic judgment condition to the attribute. The logic configuration information may indicate a specific logic execution program, or may indicate a storage address of the logic program (the storage address stores the logic execution program). For example, a logic execution program for a payment component: before the user triggers the payment component, the word "payment" in the payment component is displayed in green and Song font; after the user triggers the payment component and performs a payment operation, the word "payment" in the payment component is displayed in gray and Kai font. The logic judgment conditions included in the logic execution program are: 1. Before the user's payment operation; 2. After the user's payment operation; Among them, 1. The line corresponding to the user's payment operation indicates a logic element of a state category, so as to realize the rendering of the word "payment" in the payment component in green and Song font; 2. The line corresponding to the user's payment operation indicates another logic element of the state category, so as to realize the rendering of the word "payment" in the payment component in gray and Kai font.
[0090] Among them, the two logical judgment conditions can be expressed by logical expressions, that is, one logical judgment condition corresponds to true when the logical expression is true, and the other logical judgment condition corresponds to false when the logical expression is false.
[0091] In one embodiment of the present invention, in response to the logic element including the logic judgment category, the state rendering information and / or component information included in the page development is obtained, and the state rendering information and / or component information is added to the attribute.
[0092] In one embodiment of the present invention, the page development method may include: in response to a deletion instruction of the current logical element in the logical relationship diagram, deleting the current logical element and the logical elements logically located after the current logical element. Figure 1 For the logical relationship diagram shown, when the deletion operation is performed on the logical element B, the logical element B, the logical element C and the logical element D are deleted.
[0093] In one embodiment of the present invention, the page development method may include: responding to the configuration instruction of any logical element in the logical relationship diagram, providing at least one visual executable operation identifier for the logical element corresponding to the configuration instruction, wherein the executable operation identifier includes: any one or more of an operation identifier for adding a logical element, an operation identifier for deleting a logical element, and an operation identifier for ending; responding to the use instruction of any executable operation identifier, performing corresponding configuration for the selected logical element. The configuration instruction may be: a configuration instruction generated corresponding to when the cursor hovers over a logical element, or a configuration instruction generated corresponding to when the logical element receives a click operation. The configuration instruction is a string or code generated in response to the user's page operation and can be interpreted by the computer. Figure 4 As shown, when the mouse hovers over the current element, it means that when the mouse hovers over a line with a judgment condition marked as F corresponding to the logic element marked as 1 (the logic element is a logic judgment category), a configuration instruction matching the operation of hovering the current element will be generated or generated. Accordingly, a corresponding operation such as adding a node, deleting a node, or ending the logic will appear in a pop-up box. Figure 4 For the "start" logic element shown in the figure, there are logic elements of newly added logic judgment categories and logic elements of newly added status categories. After receiving the user's click operation on the logic element of the newly added logic judgment category, the corresponding configuration instruction will be generated for the user's click operation. Accordingly, a logic element of the logic judgment category (the logic element labeled 1) will be generated directly below the "start" logic element, and the two will be connected by a line segment with an arrow, and the arrow points to the newly added logic element; clicking on the logic element of the newly added status category will generate a logic element of the status category and connect it with a line segment with an arrow. If the start element already has a logic judgment element, the corresponding operation will be grayed out and unclickable.
[0094] The logical elements of the logical judgment category are the core of logical visualization and carry the most core functions. The operations they have are relatively complex, including adding logical elements of the logical judgment category to the logical judgment condition T, adding logical elements of the logical judgment category to the logical judgment condition F, adding logical elements of the state category to the logical judgment condition T, adding logical elements of the state category to the logical judgment condition F, configuration, and deletion operations. Among them, adding a logical element of the logical judgment category to the logical judgment condition T means that a logical element of the logical judgment category will be generated directly below the current logical element, and the two are connected by a line segment with an arrow, and a Yes, T, or true sign is generated on the left or right side of the line segment, indicating that the line is the route passed when the logical expression is true; adding a logical element of the logical judgment category to the logical judgment condition F will generate a logical element on the right side of the current logical element, and the two are connected by a line segment with an arrow, and a No, F, or false sign is generated on the lower middle of the line segment, indicating that the line is the route passed when the logical expression is false; adding a logical element of the state category to the logical judgment condition T means generating a state category logical element directly below the current logical element. Other logical elements are connected by lines with arrows, and a Yes, T or ture sign is generated on the left side of the line segment, indicating the route taken when the logical expression is true; to add a logical element of a state category for the logical judgment condition F, a logical element of a state category is generated on the right side of the current logical element. They are connected by lines with arrows, and a No, F or false sign is generated on the bottom middle of the line segment, indicating the route taken when the logical expression is false; the configuration operation is to configure the logical element corresponding to the current logical judgment category, which is a detailed configuration of the logical expression; the deletion operation can delete the current element, and the line segment with an arrow pointing to the current element, the sign corresponding to the line segment, and all its descendant elements will also be deleted.
[0095] The state-category logical elements have configuration and deletion operations. The configuration operation is to configure the state-category logical elements. The configuration information can be a text description or a component. If it is a component, 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, etc.; the deletion operation is to delete the current state logical element, and the line segment of the dot arrow pointing to the logical element and the mark corresponding to the line segment will also be deleted. For example, a button component, their name, color and other description fields, through configuration, there will be a variety of situations, such as (1) name: display color: red (2) name: hide color: black; the logical expression corresponding to the logical element of the logical judgment category judges the result of one of these two situations. If the result is true, display (1), and if the result is false, display (2).
[0096] Based on the above embodiments, it can be seen that the logical elements of the logic judgment category and the logical elements of the starting category are visually guided by the user to operate, which facilitates the logic development in the page.
[0097] In one embodiment of the present invention, the page development method may include: in response to a modification instruction of the page, providing a logic relationship diagram so that the user can perform modification operations on the logic relationship diagram. Through this process, the page development logic can be modified visually. Since the logic relationship diagram provides a relatively clear logic, the modification is more convenient and quick on the basis of the relatively clear logic. The modification may be to add a logic element corresponding to a logic node, delete an element corresponding to a logic node, change the logic judgment condition included in the logic element corresponding to the logic judgment category, etc.
[0098] Users can view the above logical relationship diagram to understand the development logic, realize the visualization of page development logic, and facilitate the management of page development logic.
[0099] Any of the above embodiments may use svg or canvas to construct logical elements.
[0100] like Figure 5 As shown, an embodiment of the present invention provides a page rendering method, which may include the following steps:
[0101] S501: In response to a page access request, obtaining at least one logical relationship graph related to the page, wherein the logical relationship graph represents page logic and includes a plurality of logical elements and attributes corresponding to the logical elements;
[0102] S502: Rendering a page according to a plurality of logical elements included in the logical relationship diagram and attributes corresponding to the logical elements.
[0103] The page rendering is achieved through the above process.
[0104] like Figure 6 As shown, an embodiment of the present invention provides a page development device 600, and the page development device 600 includes:
[0105] An interaction unit 601 is used to obtain a plurality of logical elements, wherein each logical element corresponds to a category;
[0106] The construction unit 602 is used to construct a logic relationship diagram using the various logic elements and corresponding categories provided by the interaction unit 601, and the logic relationship diagram represents the page logic; the logic elements in the logic relationship diagram add corresponding attributes, and the attributes include page rendering information.
[0107] In one embodiment of the present invention, the construction unit 602 is used to, in response to adding a target logical element, determine whether the target logical element meets the adding condition, and if so, add the target logical element, wherein the target logical element is any one of the multiple logical elements; in response to the existence of an adjacent logical element to the target logical element, generate a connection relationship identifier between the target logical element and the adjacent logical element.
[0108] In one embodiment of the present invention, the construction unit 602 is further used to generate a corresponding feature number for the target logical element; in response to the target logical element having an upper logical element with a connection relationship, the feature number corresponding to the target logical element is added to the attribute of the corresponding upper logical element.
[0109] In one embodiment of the present invention, the construction unit 602 is further used to determine, for each logical element in the logical relationship diagram, whether the connection relationship corresponding to the logical element meets the restriction condition; if so, prohibiting adding a corresponding lower-level logical element to the logical element.
[0110] In one embodiment of the present invention, the construction unit 602 is further used to obtain a logic configuration information included in the page development in response to the logic element including the logic judgment category, and add the logic configuration information to the attribute.
[0111] In one embodiment of the present invention, the construction unit 602 is further used to obtain state rendering information and / or component information included in the page development in response to the logic element including the state category, and add the state rendering information and / or component information to the attribute.
[0112] In one embodiment of the present invention, the construction unit 602 is further configured to delete the current logical element and the logical elements logically located after the current logical element in response to a deletion instruction of the current logical element in the logical relationship diagram.
[0113] In one embodiment of the present invention, the construction unit 602 is further used to respond to the configuration instruction of any logical element in the logical relationship diagram, and provide at least one visualized executable operation identifier for the logical element corresponding to the configuration instruction, wherein the executable operation identifier includes: any one or more of an operation identifier for adding a logical element, an operation identifier for deleting a logical element, and an operation identifier for ending; when any executable operation identifier is selected, the corresponding operation is performed for the selected logical element.
[0114] In one embodiment of the present invention, the construction unit 602 is further configured to provide a logical relationship diagram in response to a modification instruction of the page, so that the user can perform modification operations on the logical relationship diagram.
[0115] like Figure 7As shown, an embodiment of the present invention provides a page rendering device 700, and the page rendering device 700 includes:
[0116] The acquisition unit 701 is used to acquire at least one logical relationship graph related to the page when receiving an access request to the page, wherein the logical relationship graph represents the page logic and includes a plurality of logical elements and attributes corresponding to the logical elements;
[0117] The rendering unit 702 is used to render the page according to the multiple logical elements and the attributes corresponding to the logical elements included in the logical relationship diagram obtained by the obtaining unit 701.
[0118] The page rendering device 700 can be used as a plug-in of a client or a web browser.
[0119] Figure 8 An exemplary system architecture 800 is shown to which the page development method or page development method apparatus or page rendering method or page rendering apparatus according to the embodiments of the present invention can be applied.
[0120] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0121] The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send logical elements or logical relationship diagrams, etc. Various communication client applications can be installed on the terminal devices 801, 802, 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0122] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0123] The server 805 may be a server that provides various services, such as a background management server that supports users in constructing a logical relationship diagram using terminal devices 801, 802, and 803, and a background management server that supports users in rendering pages browsed using terminal devices 801, 802, and 803 (for example only). The background management server may obtain a variety of logical elements, construct a logical relationship diagram, and parse the logical relationship diagram for page rendering, and feed back the processing results (for example, the results of page rendering - for example only) to the terminal device.
[0124] It should be noted that the page development method or page rendering method provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the page development device or page rendering device is generally disposed in the server 805 .
[0125] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0126] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device or server suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0127] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0128] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0129] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a 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 part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0130] It should be noted that the computer-readable medium shown in the present invention 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 the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. 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. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, 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 appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0131] 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 invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.
[0132] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an interaction unit and a construction unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the interaction unit may also be described as a "unit for obtaining multiple logical elements".
[0133] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining multiple logical elements, where each logical element corresponds to a category; using multiple logical elements and corresponding categories, constructing a logical relationship diagram, the logical relationship diagram represents page logic; adding corresponding attributes to the logical elements in the logical relationship diagram, the attributes including page rendering information.
[0134] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the device includes: when receiving an instruction to add a target logical element, judging whether the target logical element meets the adding condition, and if so, adding the target logical element, wherein the target logical element is any one of a plurality of logical elements; when the target logical element has adjacent logical elements, generating a connection relationship identifier between the target logical element and the adjacent logical element.
[0135] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the device includes: generating a corresponding feature number for a target logical element; when the target logical element has an upper-level logical element with a connection relationship, adding the feature number corresponding to the target logical element to the attribute of the corresponding upper-level logical element.
[0136] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: when receiving an access request for a page, obtaining at least one logical relationship diagram related to the page, wherein the logical relationship diagram represents the page logic and includes multiple logical elements and attributes corresponding to the logical elements; and rendering the page according to the multiple logical elements and attributes corresponding to the logical elements included in the logical relationship diagram.
[0137] According to the technical solution of the embodiment of the present invention, a logical relationship diagram representing the page logic can be constructed for different page developments through logical elements and corresponding categories, and different page logics can be implemented through different logical relationship diagrams, that is, the process of the logical relationship diagram can be constructed according to different page requirements. By adding corresponding attributes including page rendering information to the logical elements in the logical relationship diagram, the development of different pages can be completed. Therefore, the solution provided by the embodiment of the present invention reduces the coupling between the developed page and the logic, and the page logic can be implemented by constructing a logical relationship diagram through logical elements, which can effectively improve the development efficiency.
[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A page development method, characterized in that: include: Acquire multiple logical elements, wherein each of the logical elements corresponds to a category; Using the multiple logic elements and corresponding categories, construct a logic relationship diagram, wherein the logic relationship diagram represents the page logic; The logical elements in the logical relationship graph add corresponding attributes, including: adding a target logical element; the target logical element generates a corresponding feature number, including: in response to the target logical element having an upper logical element with a connection relationship, adding the feature number corresponding to the target logical element to the attribute of the corresponding upper logical element, so as to perform page rendering according to the feature number during page rendering; the attribute includes page rendering information; The logical elements in the logical relationship diagram are added with corresponding attributes, further comprising: In response to the logic element including a state category, acquiring state rendering information and / or component information included in the page development, and adding the state rendering information and / or component information to the attribute; and / or, In response to the logic element including a logic judgment category, a logic configuration information included in the page development is obtained; an execution route corresponding to the logic judgment condition included in the logic configuration information is determined; and the logic configuration information and the execution route corresponding to the logic judgment condition are added to the attribute.
2. The page development method according to claim 1, characterized in that: The steps to construct a logical relationship diagram include: In response to adding a target logical element, determining whether the target logical element satisfies an adding condition, and if so, adding the target logical element, wherein the target logical element is any one of the multiple logical elements; In response to the target logical element having an adjacent logical element, a connection relationship identifier is generated between the target logical element and the adjacent logical element.
3. The page development method according to any one of claims 1 to 2, characterized in that: For each logical element in the logical relationship diagram: It is determined whether the connection relationship corresponding to the logic element meets the restriction condition. If yes, it is prohibited to add a corresponding lower-level logic element to the logic element.
4. The page development method according to claim 1, characterized in that: include: In response to a configuration instruction of any logical element in the logical relationship diagram, providing at least one visualized executable operation identifier for the logical element corresponding to the configuration instruction, wherein the executable operation identifier includes: any one or more of an operation identifier for adding a logical element, an operation identifier for deleting a logical element, and an operation identifier for ending; In response to a use instruction of any of the executable operation identifiers, a corresponding configuration is performed for the logic element corresponding to the configuration instruction.
5. A page rendering method, characterized in that: include: In response to an access request for the page, obtaining at least one logical relationship graph related to the page, wherein the logical relationship graph represents page logic and includes a plurality of logical elements and attributes corresponding to the logical elements; According to the plurality of logical elements included in the logical relationship diagram and the attributes corresponding to the logical elements, in response to the existence of an upper logical element with a connection relationship with the target logical element, adding a feature number corresponding to the target logical element to the attribute of the corresponding upper logical element; and rendering the page according to the feature number; The attribute corresponding to the logical element is added to the logical element by the following technical means: In response to the logic element including a state category, acquiring state rendering information and / or component information included in the page development, and adding the state rendering information and / or component information to the attribute; and / or, In response to the logic element including the logic judgment category, obtaining a logic configuration information included in the page development; Determine an execution route corresponding to the logic judgment condition included in the logic configuration information; The logic configuration information and the execution route corresponding to the logic judgment condition are added to the attribute.
6. A page development device, characterized in that: include: An interaction unit, configured to obtain a plurality of logical elements, wherein each of the logical elements corresponds to a category; A construction unit is used to construct a logic relationship diagram using the multiple logic elements and corresponding categories provided by the interaction unit, wherein the logic relationship diagram represents the page logic; the logic elements in the logic relationship diagram add corresponding attributes, including: adding a target logic element; the target logic element generates a corresponding feature number, including: in response to the target logic element having an upper logic element with a connection relationship, adding the feature number corresponding to the target logic element to the attribute of the corresponding upper logic element, so as to perform page rendering according to the feature number during the page rendering process; the attribute includes page rendering information; In response to the logic element including a state category, the construction unit obtains state rendering information and / or component information included in the page development, and adds the state rendering information and / or component information to the attribute; and / or, in response to the logic element including a logic judgment category, obtains a logic configuration information included in the page development; determines the execution route corresponding to the logic judgment condition included in the logic configuration information; and adds the logic configuration information and the execution route corresponding to the logic judgment condition to the attribute.
7. The page development device according to claim 6, characterized in that: The construction unit is used 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, wherein the target logical element is any one of the multiple logical elements; in response to the existence of an adjacent logical element to the target logical element, generate a connection relationship identifier between the target logical element and the adjacent logical element.
8. A page rendering device, characterized in that: include: an acquisition unit, configured to acquire, in response to an access request for the page, at least one logical relationship graph related to the page, wherein the logical relationship graph represents page logic and includes a plurality of logical elements and attributes corresponding to the logical elements; a rendering unit, configured to add a feature number corresponding to the target logical element to the attribute of the corresponding upper logical element according to the plurality of logical elements and the attributes corresponding to the logical elements included in the logical relationship diagram acquired by the acquisition unit, in response to the existence of an upper logical element with a connection relationship with the target logical element; and render the page according to the feature number; The attribute corresponding to the logical element is added to the logical element by the following technical means: In response to the logic element including a state category, acquiring state rendering information and / or component information included in the page development, and adding the state rendering information and / or component information to the attribute; and / or, In response to the logic element including the logic judgment category, obtaining a logic configuration information included in the page development; Determine an execution route corresponding to the logic judgment condition included in the logic configuration information; The logic configuration information and the execution route corresponding to the logic judgment condition are added to the attribute.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Service logic configuration method and configuration system of application software
CN106775617A
Page processing method and related equipment
CN111273907A