Rule tree-based page configuration method and related device
The page configuration method using a rule tree addresses the inflexibility of existing systems by allowing configuration parameters to be matched with predefined rule tree nodes, facilitating flexible and scalable page content generation with enhanced maintainability.
Patent Information
- Application Number
- CN202411042272.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-31
AI Technical Summary
Existing business systems lack dynamic configuration mechanisms for rule tree pages, leading to complex and inflexible page structures that are difficult to modify and maintain, causing unpredictable errors and poor maintainability.
A page configuration method based on a rule tree, where rule tree data is predefined in a backend server, allowing configuration parameters to be input on a front-end interface, matched with nodes in the rule tree, and executed to generate page content, enabling flexible and scalable configuration without requiring entire page reconstruction.
Enables dynamic page content generation across different scenarios with low configuration difficulty, allowing easy expansion and modification of rule hierarchies, ensuring high maintainability and meeting business needs.
Smart Images

Figure CN119226646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dynamic page configuration, and in particular to a page configuration method based on a rule tree and related devices. Background Art
[0002] In modern enterprise operations, business systems, as the core support platform, carry important functions such as daily operations, management decisions, and business processes of enterprises. Dynamic pages, as an important part of the business system, play a vital role. Dynamic pages can generate and display content in real time based on user requests and background data. They can provide personalized user experience and can be flexibly configured and displayed according to business needs.
[0003] However, in existing business systems, the rule configurations and rule execution processes of different business systems are different. The existing business systems on the market have few dynamic configuration mechanisms for rule tree pages, and the configuration is complex, making it difficult to meet the flexibility and scalability requirements of different business scenarios. Once the dynamic page configuration is completed and put into use, due to the complex page structure, modifying a node or condition may cause changes in the entire page logic, and even lead to unpredictable errors, making subsequent modifications and maintenance work more troublesome to handle, and the maintainability is poor, which cannot meet business needs. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a page configuration method based on a rule tree and related devices.
[0005] The technical solution provided in this application is described below:
[0006] The first aspect of the present application provides a page configuration method based on a rule tree, the method comprising:
[0007] Obtaining rule tree data, where the rule tree data is configuration data of a rule tree predefined in a backend server;
[0008] After the rule tree data is loaded on the front-end interface, the configuration parameters input by the user on the front-end interface are obtained;
[0009] Sending the configuration parameters to a backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes the operations defined by the matching nodes to obtain execution results;
[0010] Generate page content according to the configuration parameters and the received execution result.
[0011] Optionally, the obtaining rule tree data includes:
[0012] Send the call request to the backend server;
[0013] After receiving the call request interface sent by the backend server, the rule tree data is acquired according to the request interface, and the rule tree data is the configuration data of the rule tree predefined in the backend server.
[0014] Optionally, obtaining configuration parameters input by the user in the front-end interface includes:
[0015] Obtaining the operation instruction of the user on the front-end interface;
[0016] The configuration parameters are acquired according to the operation instruction.
[0017] Optionally, obtaining configuration parameters according to the operation instruction includes:
[0018] Acquire a threshold value according to the operation instruction;
[0019] Determining whether the threshold includes four arithmetic operations or function operations;
[0020] If yes, the threshold is configured with a custom condition, wherein the custom condition configuration includes an indicator filter item, an operator, a comparison operator and a custom content;
[0021] Combining the configurations of the custom conditions to generate a tag group;
[0022] The variables, the comparison operator and the tag group are acquired according to the operation instruction.
[0023] Optionally, the configuration parameters are matched with nodes in the rule tree, and the matched nodes obtained include:
[0024] Matching an index value and a threshold value according to the configuration parameters, the index value is obtained through calculation, and the threshold value is a numerical value, condition object or condition field input by a user;
[0025] Generate a Boolean expression based on the relational operator, the indicator value and the threshold value;
[0026] Verifying the feasibility of the Boolean expression;
[0027] After determining that the Boolean expression passes the verification, a result of the Boolean expression is obtained.
[0028] Optionally, executing the operation defined by the matched node to obtain an execution result includes:
[0029] The backend server obtains the execution result according to the operation defined by the result of the Boolean expression, and the operation includes updating the database, calling the external API and calculating the logic.
[0030] Optionally, after generating page content according to the configuration parameters and the received execution result, the method further includes:
[0031] Determine whether the page content meets the preset requirements;
[0032] If not, the subsequent steps are executed in sequence starting from obtaining the configuration parameters entered by the user on the front-end interface until the page meets the preset requirements.
[0033] A second aspect of the present application provides a page configuration system based on a rule tree, the system comprising:
[0034] A first acquisition unit, configured to acquire rule-tree data, wherein the rule-tree data is configuration data of a rule-tree predefined in a backend server;
[0035] A second acquisition unit, configured to acquire configuration parameters input by a user on the front-end interface after the rule tree data is loaded on the front-end interface;
[0036] A sending unit, configured to send the configuration parameters to a backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes operations defined by the matching nodes to obtain execution results;
[0037] A generating unit generates page content according to the configuration parameters and the received execution result.
[0038] A third aspect of the present application provides an electronic device, the electronic device comprising:
[0039] Processor, memory, input-output unit, and bus;
[0040] The processor is connected to the memory, the input and output unit, and the bus;
[0041] The memory stores a program, and the processor calls the program to execute the method described in the first aspect and any optional method in the first aspect.
[0042] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the method described in the first aspect and any optional method in the first aspect is executed.
[0043] It can be seen from the above technical solutions that this application has the following advantages:
[0044] In the page configuration method based on the rule tree of the present application, firstly, the rule tree data is obtained, which is the configuration data of the rule tree predefined in the back-end server. Then, after the rule tree data is loaded on the front-end interface, the configuration parameters input by the user on the front-end interface are obtained, and then the configuration parameters are sent to the back-end server, so that the back-end server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains the matching nodes, executes the operations defined by the matching nodes to obtain the execution results, and finally generates the page content according to the configuration parameters and the received execution results.
[0045] Based on the above, it can be seen that this application can display different page contents according to different scenarios and business types, with low configuration difficulty, flexibility and easy expansion. And when the rule hierarchy and logic change, the rule tree configuration page can be expanded by modifying the rule tree or data structure without the need for entire reconstruction, which is highly maintainable and can meet business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A schematic diagram of an embodiment of a page configuration method based on a rule tree provided in the present application;
[0048] Figure 2 A flowchart of another embodiment of the rule-tree-based page configuration method provided by the present application;
[0049] Figure 3 A flowchart of another embodiment of the rule-tree-based page configuration method provided by the present application;
[0050] Figure 4 A flowchart of another embodiment of the rule-tree-based page configuration method provided by the present application;
[0051] Figure 5 A flowchart of another embodiment of a rule-tree-based page configuration system provided by the present application;
[0052] Figure 6 A flowchart of another embodiment of the rule-tree-based page configuration device provided in the present application. DETAILED DESCRIPTION
[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0054] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0055] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, left, right, front, back, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0056] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0057] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution. In addition, the identification of specific steps below does not represent a limitation on the order of steps and execution logic, and the execution order and execution logic between each step should be understood and inferred with reference to the contents described in the embodiment.
[0058] It should be noted that the page configuration method based on the rule tree provided in this application can be applied to a terminal, a system, or a server. For example, the terminal can be a computer, a tablet computer, a portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, this application uses the terminal as an example for explanation.
[0059] See also Figure 1 , Figure 1 A schematic flow chart of an embodiment of a rule-tree-based page configuration method provided in the present application, the method comprising:
[0060] Step S101, obtaining Rule Tree data, where the Rule Tree data is configuration data of a Rule Tree predefined in a backend server;
[0061] Step S102: after the rule tree data is loaded on the front-end interface, the configuration parameters input by the user on the front-end interface are obtained;
[0062] Step S103: Send the configuration parameters to the backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes the operations defined by the matching nodes to obtain execution results;
[0063] Step S104: Generate page content according to the configuration parameters and the received execution result.
[0064] In the page configuration method based on the rule tree of the present application, rule tree data is first obtained, and the rule tree data is the configuration data of the rule tree predefined in the back-end server. Then, after the rule tree data is loaded on the terminal interface, the configuration parameters input by the user on the terminal interface are further obtained, and then the configuration parameters are sent to the back-end server, so that the back-end server traverses the nodes in the rule tree, wherein each node in the rule tree represents a rule, and the connection between the nodes represents the logical relationship between the rules. The configuration parameters are matched with the nodes in the rule tree to obtain matching nodes, and the operations defined by the matching nodes are executed to obtain execution results. Finally, the page content is generated according to the configuration parameters and the received execution results.
[0065] Different page contents can be displayed through different scenarios and business types. The page configuration is easy and can be flexibly configured and expanded. When the generated page content is modified, the expansion is achieved by modifying the rule tree or data structure. There is no need to reorganize the overall page content structure, and it is highly maintainable, thus meeting business needs.
[0066] In step S101, the rule tree data is obtained. The rule tree data is the configuration data of the rule tree predefined in the backend server. The rule tree is a hierarchical data structure that organizes rules in the form of a tree. In the rule tree, each rule node can represent a rule, a conditional judgment or an action. Through the connection relationship between the nodes, complex rule logic can be formed.
[0067] The rule tree data is pre-defined in the backend server. The rules or conditions can be simple, such as "the amount is greater than 18", or complex, such as "the amount is greater than 18 and within one month". The rule tree structure combines these rules in a tree structure to form rule tree data with logical judgment.
[0068] In step S102, after obtaining the rule tree data, the terminal further obtains the user's operation and obtains configuration parameters based on the operation, wherein the configuration parameters are conditions or setting values, etc. After obtaining the configuration parameters, the terminal further sends the obtained configuration parameters to the back-end server so that the back-end server executes step S103.
[0069] In step S103, the backend server receives configuration parameters sent from the terminal interface, which are data entered or selected by the user on the terminal interface and are used to match nodes in the rule tree. The backend server then starts traversing the nodes in the rule tree, which is a predefined data structure containing multiple nodes, each of which defines a specific condition or operation.
[0070] The traversal process usually starts from the root node, and then recursively visits each child node until the entire rule tree is traversed. During the traversal process, the backend server matches the configuration parameters with each node. If the configuration parameters meet the conditions of the node, for example, the parameter value is equal to the value defined in the node, then it is considered that a matching node is found. Once a matching node is found, the backend server will perform the operation defined by the node. It should be noted that the defined operation can be any predefined task, such as calculation, data retrieval, calling external services, etc.
[0071] After the operation is executed, the backend server will obtain an execution result, which is data, status information or any other form of output, which is not specifically limited here.
[0072] In step S104, the terminal interface first receives the execution result sent back from the backend server. The execution result is obtained after matching the configuration parameters with the rule tree and executing the corresponding node operation. The terminal will parse the received execution result to understand its result type, data structure and specific information contained. The parsing process may include converting JSON or other format data into JavaScript objects or data structures that can be operated by the terminal.
[0073] When generating page content, the terminal needs to consider not only the execution result, but also the configuration parameters previously input by the user. The configuration parameters are used to determine certain aspects of the page content, such as layout, style, displayed information, etc. Based on the parsed execution result and configuration parameters, the terminal starts to generate page content. When the page content is generated, the terminal displays the page content to the user. The page content may be a form, report, data visualization, or any other type of page content, which is not specifically limited here.
[0074] During the display process, if the page content does not meet the preset requirements, the subsequent steps will be executed in sequence starting from obtaining the configuration parameters entered by the user on the terminal interface until the page meets the preset requirements. That is, if the rules or configuration parameters need to be adjusted, the process can be re-triggered, and the rule tree can be modified or copied. Starting from the step entered by the user, the backend server will re-execute the rule matching and execution process based on user feedback and new input data to achieve dynamic update of the rule tree.
[0075] Specifically, for the implementation of this solution, please refer to the following examples:
[0076] Personalized promotion dynamic page generation for e-commerce platforms
[0077] background:
[0078] Suppose there is an e-commerce platform that often holds various promotional activities, such as full-reduction, discounts, and gifts. In order to improve the user experience, the platform hopes to provide each user with a personalized promotion dynamic page to show the products they are interested in and the promotions they can enjoy.
[0079] Implementation steps:
[0080] A rule tree is predefined, containing rules for various promotion activities. For example:
[0081] Node 1: If the user has purchased electronic products in the last 30 days, then relevant electronic products are recommended.
[0082] Node 2: If the user is a VIP member and the purchase amount exceeds 500 yuan, he / she will enjoy a 10% discount.
[0083] Node 3: If the user has browsed the page of a certain category of products more than 5 times, then the products of this category will be added to the recommendation list.
[0084] After the user logs in to the platform, the terminal collects the user's shopping behavior data, such as purchase history, browsing history, membership level, etc., and sends this data to the back-end server for processing. The back-end server matches in the rule tree according to the user's configuration parameters. For example, it is found that the user recently purchased electronic products and is a VIP member, and the purchase amount exceeds 500 yuan. According to these matching rules, the back-end performs corresponding data operations, such as querying relevant electronic product information and calculating the price after a 10% discount.
[0085] The back-end server returns the processed data and the report's display content, style, and interactive logic information to the terminal. The terminal dynamically generates a personalized promotion report dynamic page based on the data and display information returned by the back-end server.
[0086] The dynamic page content includes: information about the electronic products that the user has recently purchased; information about a 10% discount based on VIP membership and purchase amount; and a list of recommended related electronic products.
[0087] Please refer to Figure 2 According to some embodiments of the present invention, obtaining rule tree data in step S101 may specifically include, but is not limited to, the following:
[0088] Step S201, sending the call request to the backend server;
[0089] Step S202: after receiving the call request interface sent by the backend server, obtaining the rule tree data according to the request interface, the rule tree data is the configuration data of the rule tree predefined in the backend server.
[0090] In an embodiment of the present application, before calling the rule tree data, the terminal needs to first construct a call request and send the call request to the back-end server. After receiving the call request, the back-end server performs further processing and response according to the call request. Specifically, the back-end server calls the specified interface according to the call request, and sends the called call interface to the terminal, so that the terminal calls the predefined rule tree data according to the request interface.
[0091] Please refer to Figure 3 According to some embodiments of the present invention, the configuration parameters input by the user on the terminal interface in step S102 may specifically include, but are not limited to, the following:
[0092] Step S301, obtaining the operation instruction of the user on the terminal interface;
[0093] Step S302: acquiring configuration parameters according to the operation instruction.
[0094] In an embodiment of the present application, when a user performs an operation, the terminal will capture these operation instructions, which include the button logo clicked by the user, the text content entered, and the selected options, etc. The terminal will parse the captured operation instructions to determine the user's intention and the operation to be performed. According to the user's operation instructions, the terminal will extract variables for rule tree matching, and the variables come from the user's input and previous calculation results. The terminal will determine the comparison operator used according to the user's operation instructions, such as equal to, not equal to, contains, etc. And the corresponding threshold value will be obtained according to the user's operation instructions. The threshold value is a reference value for comparison with the variable. The threshold value may be a text string, a number, or a time value.
[0095] After extracting the variables, determining the comparator, and obtaining the threshold, the terminal combines this information into a configuration parameter set, which will be used for subsequent matching with nodes in the rule tree.
[0096] Among them, the obtained threshold may include the four arithmetic operations or function operations. In this case, the threshold is first obtained according to the operation instruction, and then it is determined whether the threshold includes the four arithmetic operations or function operations; if so, the threshold is configured with custom conditions, and the configuration of the custom conditions includes indicator filter items, operators, comparison operators and custom content. Then, the configuration of the custom conditions is combined to generate a label group, and finally the variables, comparison operators and label groups are obtained according to the operation instruction.
[0097] Please refer to Figure 4 According to some embodiments of the present invention, in step S103, the configuration parameters are matched with nodes in the rule tree to obtain matching nodes, which may specifically include, but are not limited to, the following:
[0098] Step S401: Matching an index value and a threshold value according to the configuration parameters, wherein the index value is obtained through calculation, and the threshold value is a numerical value, condition object or condition field input by a user;
[0099] Step S402: Generate a Boolean expression according to the relational operator, the index value and the threshold value;
[0100] Step S403, verifying the feasibility of the Boolean expression;
[0101] Step S404: After determining that the Boolean expression passes the verification, obtain the result of the Boolean expression.
[0102] In step 401, the indicator value and the threshold are matched according to the configuration parameters. The configuration parameters include variables, comparison operators and threshold values. These parameters together define the matching conditions. The variable represents a variable quantity. The value of the variable comes from the user's input or other data sources. The threshold value is a fixed value or condition used to compare with the value of the variable. Specifically, the comparison operator in the configuration parameters is used to compare the indicator value with the threshold value. The comparison result will determine whether the relationship between the indicator value and the threshold value meets the specific conditions.
[0103] In step 402, a Boolean expression is generated according to the relational operator, the indicator value and the threshold value, and a Boolean expression is constructed using the relational operator, the indicator value and the threshold value. A Boolean expression is a logical expression whose result is true or false. A Boolean expression usually has the form of "indicator value comparison operator threshold value", such as "temperature>30". In this example, "temperature" is the indicator value, ">" is the comparison operator, and "30" is the threshold value. Boolean expressions are used to express the logical relationship between indicator values and threshold values. Verify whether the Boolean expression is valid, that is, whether it can be calculated in the actual data and computing environment. Verify whether the indicator values and threshold values used in the expression are available, ensure that these values can be obtained from the corresponding data sources, test the Boolean expression in the actual data and computing environment, and ensure that the expression can calculate the result correctly and no errors or exceptions will be generated.
[0104] In step 404, after determining that the Boolean expression passes the verification, the Boolean expression is executed, and the result of the Boolean expression is calculated using the actual data and operations. The result of the Boolean expression is a Boolean value, that is, true or false. Depending on the result of the Boolean expression, the terminal can perform different operations or make different decisions.
[0105] Furthermore, the backend server obtains the execution result according to the operation defined by the result of the Boolean expression. Specifically, the operation includes updating the database, calling the external API, and executing the calculation logic. After executing the operation, the backend server will obtain the execution result and perform further processing as needed. The execution result may appear in different forms, such as confirmation of successful database update, response of the external API, or output of the calculation logic, etc., which are not specifically limited here. The obtained execution result is sent to the terminal so that the terminal generates the page content according to the configuration parameters and the execution result.
[0106] See also Figure 5 The present application also provides a system for page configuration based on a rule tree, the system comprising:
[0107] A first acquisition unit 501 is used to acquire Rule-tree data, where the Rule-tree data is configuration data of a Rule-tree predefined in a backend server;
[0108] A second acquisition unit 502 is used to acquire configuration parameters input by a user on the front-end interface after the rule tree data is loaded on the front-end interface;
[0109] A sending unit 503 is used to send the configuration parameters to a backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes the operations defined by the matching nodes to obtain execution results;
[0110] The generating unit 504 generates page content according to the configuration parameters and the received execution result.
[0111] Optionally, the first acquiring unit 501 is specifically configured to:
[0112] Send the call request to the backend server;
[0113] After receiving the call request interface sent by the backend server, the rule tree data is acquired according to the request interface, and the rule tree data is the configuration data of the rule tree predefined in the backend server.
[0114] Optionally, the second acquiring unit 502 is used to:
[0115] Obtaining the operation instruction of the user on the front-end interface;
[0116] Configuration parameters are obtained according to the operation instructions, and the configuration parameters include variables, comparison operators and thresholds. The variables include values derived, queried or calculated according to input parameters; the comparison operators include equal to, not equal to, contain, belong to, greater than and less than; the thresholds include text, numbers and time.
[0117] The acquisition unit 502 is further specifically used for:
[0118] Acquire a threshold value according to the operation instruction;
[0119] Determining whether the threshold includes four arithmetic operations or function operations;
[0120] If yes, the threshold is configured with a custom condition, wherein the custom condition configuration includes an indicator filter item, an operator, a comparison operator and a custom content;
[0121] Combining the configurations of the custom conditions to generate a tag group;
[0122] The variables, the comparison operator and the tag group are acquired according to the operation instruction.
[0123] Optionally, the sending unit 503 is specifically configured to:
[0124] Matching an index value and a threshold value according to the configuration parameters, the index value is obtained through calculation, and the threshold value is a numerical value, condition object or condition field input by a user;
[0125] Generate a Boolean expression based on the relational operator, the indicator value and the threshold value;
[0126] Verifying the feasibility of the Boolean expression;
[0127] After determining that the Boolean expression passes the verification, a result of the Boolean expression is obtained.
[0128] The sending unit 503 is further specifically configured to:
[0129] The backend server obtains the execution result according to the operation defined by the result of the Boolean expression, and the operation includes updating the database, calling the external API and calculating the logic.
[0130] Optionally, after the generating unit 504, the system further includes:
[0131] A determination unit 505 is used to determine whether the dynamic page meets the preset requirements;
[0132] The execution unit 506 is configured to execute subsequent steps starting from the second acquisition unit 502 in sequence when the determination unit determines that the dynamic page does not meet the preset requirement, until the dynamic page meets the preset requirement.
[0133] See also Figure 6 The present application also provides a device for page configuration based on a rule tree, the device comprising:
[0134] Processor 601, memory 602, input and output unit 603, bus 604;
[0135] The processor 601 is connected to the memory 602, the input and output unit 603 and the bus 604;
[0136] The memory 602 stores a program, and the processor 601 calls the program to execute the following steps: Figure 1-4 The method shown in any embodiment.
[0137] The present application also relates to a computer-readable storage medium, on which a program is stored, and when the program is run on a computer, the computer executes the following Figure 1-4 The method shown in any embodiment.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0139] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A page configuration method based on a rule tree, characterized in that: The method comprises: Obtaining rule tree data, where the rule tree data is configuration data of a rule tree predefined in a backend server; After the rule tree data is loaded on the front-end interface, the configuration parameters input by the user on the front-end interface are obtained; Sending the configuration parameters to a backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes the operations defined by the matching nodes to obtain execution results; Generate page content according to the configuration parameters and the received execution result.
2. The page configuration method based on rule tree according to claim 1, characterized in that: Obtaining rule tree data includes: Send the call request to the backend server; After receiving the call request interface sent by the backend server, the rule tree data is acquired according to the request interface, and the rule tree data is the configuration data of the rule tree predefined in the backend server.
3. The page configuration method based on rule tree according to claim 1, characterized in that: Obtain the configuration parameters entered by the user in the front-end interface, including: Obtaining the operation instruction of the user on the front-end interface; The configuration parameters are acquired according to the operation instruction.
4. The page configuration method based on rule tree according to claim 3, characterized in that: Acquiring configuration parameters according to the operation instruction includes: Acquire a threshold value according to the operation instruction; Determining whether the threshold includes four arithmetic operations or function operations; If yes, the threshold is configured with a custom condition, wherein the custom condition configuration includes an indicator filter item, an operator, a comparison operator and a custom content; Combining the configurations of the custom conditions to generate a tag group; The variables, the comparison operator and the tag group are acquired according to the operation instruction.
5. The page configuration method based on rule tree according to claim 1, characterized in that: The configuration parameters are matched with nodes in the rule tree, and the matched nodes obtained include: Matching an index value and a threshold value according to the configuration parameters, the index value is obtained through calculation, and the threshold value is a numerical value, condition object or condition field input by a user; Generate a Boolean expression based on the relational operator, the indicator value and the threshold value; Verifying the feasibility of the Boolean expression; After determining that the Boolean expression passes the verification, a result of the Boolean expression is obtained.
6. The page configuration method based on rule tree according to claim 5, characterized in that: Execute the operation defined by the matched node to obtain an execution result, including: The backend server obtains the execution result according to the operation defined by the result of the Boolean expression, and the operation includes updating the database, calling the external API and calculating the logic.
7. The page configuration method based on rule tree according to claim 1, characterized in that: After generating page content according to the configuration parameters and the received execution result, the method further includes: Determine whether the page content meets the preset requirements; If not, the subsequent steps are executed in sequence starting from obtaining the configuration parameters input by the user on the front-end interface until the page meets the preset requirements.
8. A page configuration system based on a rule tree, characterized in that: The system comprises: A first acquisition unit, configured to acquire rule-tree data, wherein the rule-tree data is configuration data of a rule-tree predefined in a backend server; A second acquisition unit, configured to acquire configuration parameters input by a user on the front-end interface after the rule tree data is loaded on the front-end interface; A sending unit, configured to send the configuration parameters to a backend server, so that the backend server traverses the nodes in the rule tree, matches the configuration parameters with the nodes in the rule tree, obtains matching nodes, and executes operations defined by the matching nodes to obtain execution results; A generating unit generates page content according to the configuration parameters and the received execution result.
9. A page configuration device based on a rule tree, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Resource allocation method and device, storage medium and electronic device
CN111340542A
Natural language-like-based rule configuration and analysis method, system and device
CN111966342A
Equipment control method based on rule engine
CN114356918A
System and method for configuring marketing activities of online car-hailing platform based on multi-way tree
CN117853210A
Straddling systolic ruletree
US10268668B1
