Business processing method, apparatus, device, readable storage medium and program product
Patent Information
- Application Number
- CN202510425606.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]本公开针对现有的方式的缺点,提出一种业务处理方法、装置、设备、计算机可读存储介质及计算机程序产品,用于解决如何提高业务处理效率的问题
接收业务请求端针对业务对象的目标操作请求,目标操作请求中包括业务对象的业务对象标识;基于业务对象标识,确定针对业务对象的业务处理策略集,以基于业务处理策略集执行业务处理操作,得到对应的业务处理结果,并将业务处理结果展示给业务请求端;其中,业务处理策略集中包括至少一个业务处理策略子集合,每个业务处理策略子集合包括业务处理条件和业务处理条件对应的业务处理策略,业务处理策略包括业务处理条件对应的业务执行脚本;业务处理操作包括以下步骤:基于目标操作请求的相关业务数据,从业务处理策略集中确定与相关业务数据相匹配的目标业务处理条件,以由业务请求端通过执行目标业务处理条件对应的业务执行脚本,得到业务处理结果;如此,通过给业务处理策略子集合(业务规则)配置业务执行脚本,进而支持基于匹配到的业务处理策略子集合,动态下发业务执行脚本(跨语言可执行脚本)给业务请求端;通过业务请求端执行业务执行脚本,得到业务处理结果;如此,提高了业务处理的效率。
Smart Images

Figure CN122924883A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a business processing method, apparatus, device, readable storage medium, and program product. Background Technology
[0002] In existing technologies, the working principle of rule engines in business processing scenarios includes: inputting initial data into working memory; comparing each rule in the rule base using the rule engine's matching mode; adding matching rules to the agenda for computation; deleting unmatched rules from the agenda; and outputting the resulting decision. However, the process ends after the decision result flows downstream, thus preventing dynamic instructions to be executed downstream, resulting in low efficiency in business processing. Summary of the Invention
[0003] This disclosure addresses the shortcomings of existing methods by proposing a business processing method, apparatus, device, computer-readable storage medium, and computer program product to solve the problem of how to improve business processing efficiency.
[0004] Firstly, this disclosure provides a business processing method, including: The receiving end receives a target operation request for a business object, which includes the business object identifier of the business object. Based on the business object identifier, determine the set of business processing strategies for the business object, execute business processing operations based on the set of business processing strategies, obtain the corresponding business processing results, and display the business processing results to the business request end. The business processing strategy set includes at least one subset of business processing strategies. Each subset of business processing strategies includes business processing conditions and business processing strategies corresponding to the business processing conditions. The business processing strategies include business execution scripts corresponding to the business processing conditions. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, the target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
[0005] In one embodiment, the business processing strategy further includes a business decision result corresponding to the target business processing condition, which is obtained by the business requesting end through executing the business execution script corresponding to the target business processing condition. The strategy also includes: The business request end displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request. After receiving the confirmation operation of the business request object on the business decision result, the business request end executes the business execution script corresponding to the target business processing condition to obtain the business processing result.
[0006] In one embodiment, based on the relevant business data of the target operation request, target business processing conditions that match the relevant business data are determined from a set of business processing policies, including: The rule engine parses and processes the business processing strategy set to obtain a rule array, which includes the business processing conditions in each business processing strategy subset. The rule engine matches the business processing conditions and related business data in the rule array, and determines the target business processing condition that matches the related business data from each business processing condition.
[0007] In one embodiment, the business processing operation is performed by a server, and after determining the target business processing conditions that match the relevant business data from the business processing policy set, the operation further includes: Send the business decision results and business execution script corresponding to the target business processing conditions to the business requesting end.
[0008] In one embodiment, the business execution script corresponding to the target business processing condition is a script based on a first scripting language. Sending the business execution script corresponding to the target business processing condition to the business requesting end includes: Determine the scripting languages supported by the business requester. If the scripting languages supported by the business requester include the first scripting language, then send the business execution script corresponding to the target business processing condition to the business requester. If the scripting languages supported by the business requesting end do not include the first scripting language, then language conversion processing is performed based on the business execution script corresponding to the target business processing conditions to obtain the updated business execution script, and the updated business execution script is sent to the business requesting end.
[0009] In one embodiment, the business processing operation is executed by the business requester. After determining the set of business processing strategies for the business object, the method further includes: The business processing strategy set is sent to the business request end so that the business request end can perform business processing operations based on the business processing strategy set and obtain the corresponding business processing results.
[0010] In one embodiment, the business requester obtains the business processing result by executing the business execution script corresponding to the target business processing condition, including: After receiving confirmation of the business decision result from the business request object, the business request end executes the business execution script corresponding to the target business processing condition through the script engine in the business request end based on the relevant business data, and obtains the business processing result.
[0011] In one embodiment, the relevant business data for the target operation request is determined in the following way: Based on the business object identifier and the object identifier of the business request object of the target operation request, relevant business data of the target operation request is obtained from the target database. The relevant business data includes the object information of the business request object and the business information of the business object. The target database stores a set of business objects and a set of business request objects. The set of business objects includes the business object identifier and business information of each business object, while the set of business request objects includes the object identifier and object information of each business request object.
[0012] Secondly, this disclosure provides a service processing apparatus, including: The first processing module is used to receive the target operation request for the business object from the business request end. The target operation request includes the business object identifier of the business object. The second processing module is used to determine a set of business processing strategies for a business object based on the business object identifier, execute business processing operations based on the set of business processing strategies, obtain the corresponding business processing results, and display the business processing results to the business requesting end. The business processing strategy set includes at least one subset of business processing strategies. Each subset of business processing strategies includes business processing conditions and business processing strategies corresponding to the business processing conditions. The business processing strategies include business execution scripts corresponding to the business processing conditions. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, the target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
[0013] Thirdly, this disclosure provides an electronic device, including: a processor, a memory, and a bus; A bus is used to connect the processor and memory; Memory, used to store operation instructions; A processor is used to execute the business processing method of the first aspect of this disclosure by invoking operation instructions.
[0014] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that is used to perform the business processing method of the first aspect of this disclosure.
[0015] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the business processing method in the first aspect of this disclosure.
[0016] The technical solutions provided in this disclosure have at least the following beneficial effects: The system receives a target operation request from a business request client for a business object. The target operation request includes a business object identifier. Based on the business object identifier, a set of business processing strategies is determined for the business object. Business processing operations are then executed based on these strategies to obtain the corresponding business processing result, which is then displayed to the business request client. Each business processing strategy set includes at least one subset of business processing strategies. Each subset includes business processing conditions and corresponding business processing strategies. Each business processing strategy includes a corresponding business execution script. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, target business processing conditions matching the relevant business data are determined from the set of business processing strategies. The business request client then executes the business execution script corresponding to the target business processing conditions to obtain the business processing result. By configuring business execution scripts for subsets of business processing strategies (business rules), the system supports dynamically distributing business execution scripts (cross-language executable scripts) to the business request client based on the matched subsets of business processing strategies. The business request client executes the business execution scripts to obtain the business processing result, thus improving the efficiency of business processing. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0018] Figure 1 This is a schematic diagram of the architecture of a business processing system provided in an embodiment of the present disclosure; Figure 2 A flowchart illustrating a business processing method provided in an embodiment of this disclosure; Figure 3 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 4 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 5 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 6A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 7 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 8 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 9 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 10 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 11 A flowchart illustrating a business processing method provided in an embodiment of this disclosure; Figure 12 A flowchart illustrating a business processing method provided in an embodiment of this disclosure; Figure 13 A schematic diagram of the business processing provided in the embodiments of this disclosure; Figure 14 This is a schematic diagram of the structure of a service processing apparatus provided in an embodiment of the present disclosure; Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0019] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “B,” or implementation as “A and B.”
[0021] It is understood that in the specific embodiments of this disclosure, data related to business processing is involved. When the above embodiments of this disclosure are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0022] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0023] This disclosure provides a business processing method for a business processing system, which relates to fields such as business processing.
[0024] To better understand and explain the solutions of the embodiments of this disclosure, some technical terms involved in the embodiments of this disclosure will be briefly explained below.
[0025] Facts: Initial data that describes the relationships between objects and their properties.
[0026] A rule is an abstraction of business logic, consisting of inference statements with conditions and conclusions.
[0027] DRL: DRL (Drools Rule Language, Drools Rule Engine) is a general description language for defining rules.
[0028] DSL: DSL (Domain Specific Language) is a computer language designed to solve problems in a specific domain.
[0029] Rule Engine: A technical solution that decouples business rules from technical code, including DRL and parsing engine.
[0030] Scripts: Scripts include, but are not limited to, scripting languages such as Javascript and Groovy that can be dynamically parsed and executed without compilation.
[0031] Script engine: A script engine is an engine that can dynamically parse and execute scripts. Script engines include, but are not limited to, the V8 engine for parsing JavaScript.
[0032] Advertising landing page: An advertising landing page is a specific webpage designed to guide clickers to perform a specific action, such as purchasing a product, registering for a subscription, or downloading an application. Landing pages typically include a form or other interactive elements to better engage with potential customers.
[0033] Sandbox isolation: Sandbox isolation is a core technology in micro frontend architecture, used to ensure that resources are isolated from each other when multiple sub-applications run on the same page, avoiding conflicts; the core goal of sandbox isolation is to allow each sub-application to run as if it were independent, without interfering with each other.
[0034] HTTP Interface: The HTTP (Hypertext Transfer Protocol) interface is an application layer communication specification based on the Hypertext Transfer Protocol.
[0035] Existing business processing solutions have the following two limitations: (1) It is necessary to select a rule engine implemented in a different language according to the development language used in the business, and it cannot be used across languages; (2) The process ends after the decision results are transferred to the downstream, thus it is no longer possible to dynamically instruct the downstream to execute any instructions.
[0036] Based on this, the present disclosure provides a business processing method, apparatus, device, computer-readable storage medium, and program product, and the specific technical solutions will be described in detail below.
[0037] The solutions provided in this disclosure relate to business processing technology. The technical solutions of this disclosure are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0038] To better understand the solution provided in this disclosure, the solution will be described below in conjunction with a specific application scenario.
[0039] In one embodiment, Figure 1 The diagram illustrates the architecture of a business processing system applicable to embodiments of this disclosure. It is understood that the business processing methods provided in these embodiments can be applied to, but are not limited to, applications such as... Figure 1 In the application scenarios shown.
[0040] In this example, as Figure 1 As shown, the architecture of the business processing system in this example may include, but is not limited to, server 10, terminal 20, and database 30. Server 10, terminal 20, and database 30 can interact with each other via network 40.
[0041] Server 10 receives a target operation request from a business requesting end (e.g., terminal 20) for a business object. The target operation request includes a business object identifier for the business object. Based on the business object identifier, server 10 determines a set of business processing strategies for the business object, executes a business processing operation based on the set of business processing strategies, obtains the corresponding business processing result, and displays the business processing result to the business requesting end. The set of business processing strategies includes at least one subset of business processing strategies. Each subset of business processing strategies includes a business processing condition and a corresponding business processing strategy. The business processing strategy includes a business execution script corresponding to the business processing condition. The business processing operation includes the following steps: Server 10 or the business requesting end determines a target business processing condition matching the relevant business data from the set of business processing strategies based on the relevant business data of the target operation request. The business requesting end then obtains the business processing result by executing the business execution script corresponding to the target business processing condition. The relevant business data is stored in database 30.
[0042] It is understood that the above is only one example, and this embodiment is not limited here.
[0043] Terminals include, but are not limited to, smartphones (such as Android phones, iOS phones, etc.), mobile phone emulators, tablets, laptops, digital broadcast receivers, MIDs (Mobile Internet Devices), PDAs (Personal Digital Assistants), smart voice interaction devices, smart home appliances, and in-vehicle terminals.
[0044] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0045] The aforementioned networks may include, but are not limited to, wired networks and wireless networks. Wired networks include local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). Wireless networks include Bluetooth, Wi-Fi, and other networks that enable wireless communication. Specific details can be determined based on actual application scenario requirements and are not limited here.
[0046] See Figure 2 , Figure 2This illustration shows a flowchart of a business processing method provided by an embodiment of the present disclosure. This method can be executed by any electronic device, such as a server. As an optional implementation, the method can be executed by a server. For ease of description, in the following description of some optional embodiments, execution by a server will be used as an example of the method's execution subject. Figure 2 As shown, the business processing method provided in this embodiment includes the following steps: S201, Receive the target operation request for the business object from the business request end. The target operation request includes the business object identifier of the business object.
[0047] Specifically, the server receives the target operation request for the business object from the business request client. The business request client is the downstream, such as other servers or terminals; the business object is such as a product, stock, or advertising landing page; the business object identifier of the business object is such as the product identifier.
[0048] For example, the requesting end is another server, and the server-side component on that other server sends a request for a target operation on the business object to the server. Alternatively, the requesting end is a terminal, and the browser or application (Mobile Application Service) on the terminal sends a request for a target operation on the business object to the server.
[0049] S202, Based on the business object identifier, determine the business processing strategy set for the business object, execute the business processing operation based on the business processing strategy set, obtain the corresponding business processing result, and display the business processing result to the business request end; The business processing strategy set includes at least one subset of business processing strategies. Each subset of business processing strategies includes business processing conditions and business processing strategies corresponding to the business processing conditions. The business processing strategies include business execution scripts corresponding to the business processing conditions. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, the target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
[0050] Specifically, for example, the server determines a set of business processing strategies for the business object based on the business object identifier; the server determines the target business processing conditions that match the relevant business data from the set of business processing strategies based on the relevant business data of the target operation request; the business request end obtains the business processing result by executing the business execution script corresponding to the target business processing condition; and the business request end displays the business processing result.
[0051] For example, the server determines a set of business processing strategies for the business object based on the business object identifier; the business request end determines the target business processing conditions that match the relevant business data from the set of business processing strategies based on the relevant business data of the target operation request; the business request end obtains the business processing result by executing the business execution script corresponding to the target business processing condition; and the business request end displays the business processing result.
[0052] For example, a set of business processing strategies is a rule protocol, and each subset of business processing strategies is a rule, such as a business rule. Each subset of business processing strategies includes at least one business processing condition and at least one business processing strategy corresponding to the business processing condition. The business processing strategy includes at least one business execution script corresponding to the business processing condition and at least one business decision result corresponding to the business processing condition. The business processing condition is a rule condition, such as gender being male or age being greater than or equal to 18 years old; the business execution script is such as money (discounted price of the product) = money (original price of the product) – 20 (20 yuan); the business decision result is such as a 20 yuan discount coupon. The relevant business data for the target operation request is a fact, such as a user being male and 20 years old, or the original price of a product being 100. In this embodiment, a target operation request for a business object is received from a business requesting end. The target operation request includes a business object identifier of the business object. Based on the business object identifier, a set of business processing strategies for the business object is determined. A business processing operation is executed based on the set of business processing strategies to obtain the corresponding business processing result, and the business processing result is displayed to the business requesting end. The set of business processing strategies includes at least one subset of business processing strategies. Each subset of business processing strategies includes a business processing condition and a corresponding business processing strategy. The business processing strategy includes a business execution script corresponding to the business processing condition. The business processing operation includes the following steps: based on the relevant business data of the target operation request, a target business processing condition matching the relevant business data is determined from the set of business processing strategies. The business requesting end obtains the business processing result by executing the business execution script corresponding to the target business processing condition. Thus, by configuring a business execution script for a subset of business processing strategies (business rules), the system supports dynamically distributing a business execution script (a cross-language executable script) to the business requesting end based on the matched subset of business processing strategies. The business requesting end executes the business execution script to obtain the business processing result. This improves the efficiency of business processing.
[0053] In one embodiment, the business processing strategy further includes a business decision result corresponding to the target business processing condition, which is obtained by the business requesting end through executing the business execution script corresponding to the target business processing condition. The strategy also includes: The business request end displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request. After receiving the confirmation operation of the business request object on the business decision result, the business request end executes the business execution script corresponding to the target business processing condition to obtain the business processing result.
[0054] Specifically, for example, such as Figure 3 As shown, the server includes a form rule editor and a server-side component, while the business request end is the downstream component. The business request end includes an execution engine, which includes at least one of a rule engine and a script engine. The functions of the form rule editor include defining fields, defining rule trees, rule validation, and generating rule protocols. Based on the HTTP interface, the form rule editor transmits the generated rule protocol to the server-side component.
[0055] For example, server A includes a rule editor (e.g., a form rule editor) and server 1, while the business request end is a terminal or server B. The terminal includes a browser or an app, and server B includes server 2. The rule engine can be in server 1 of server A or in the business request end. For example, the rule engine can be in the terminal or server B, which means the rule engine is in the browser, app, or server 2. The script engine is in the business request end, which means the script engine is in the terminal or server B, which means the script engine is in the browser, app, or server 2.
[0056] For example, such as Figure 3 As shown, the form rule editor's functions include defining fields; defining a data dictionary that participates in rule calculations through the form rule editor; the data dictionary includes object properties, which include the field name and data type of the defined field; and placing the object properties participating in rule calculations in the attributes collection, where the attributes collection uses name and type to record the field name and data type of the object property, respectively. For example, the rule calculation for a marketing campaign requires two object properties: age and gender. These two object properties are shown below: Age: The field name is age, and the data type is number. Gender: The field name is sex, and the data type is string. Set the data dictionaries for age and sex in the attributes collection. The generated data dictionary format is as follows: { "attributes": [ {"name": "age", "type": "number"}, / / Age, field name age, numeric type; {"name": "sex", "type": "string"} / / Gender, field name "sex", string type; ] }
[0057] For example, such as Figure 3 As shown, the form rule editor's functions include defining a rule tree; a rule tree represents a rule, and a rule is like... Figure 4 As shown, a rule includes a rule condition expression (rule condition, i.e., business processing condition) and a rule result. The rule condition expression is a logical expression, which includes logical operators and operational expressions. Logical operators include AND, OR, etc., and operational expressions include expression fields, expression operators, field values, etc. Expression fields include entity elements, such as age, gender, room, toilet, etc. Expression operators include >, <, ==, >=, <=, etc. Field values include integer, string, floating-point, etc., and operational expressions include "age>18", where age is an entity element, > is an expression operator, and 18 is a field value. The rule result (business processing strategy) includes the matching result (business decision result) and the executable script (business execution script). For example, there are two rules in a marketing campaign, these two rules (rule 1 and rule 2) are shown below: Rule 1: Males aged 18 and above can receive a 20 yuan discount coupon; Rule 2: Women aged 18 and above are eligible for a 10% discount coupon; These two rules correspond to two rule trees. The pseudocode description of rule 1 is as follows: Rule conditions: ALL sex='male' age>=18, matching result: 20 yuan discount coupon, executable script: money= money – 20; The pseudocode description of rule 2 is as follows: Rule conditions: ALL sex='female' age>=18, matching result: 10% discount coupon, executable script: money =money × 0.9; It should be noted that, for example, for rule 1, the logical expression of the rule condition uses the ALL logical operator; ALL means that the two rule conditions corresponding to the two operation expressions, sex='male' and age>=18, must be satisfied simultaneously in order to obtain the corresponding matching result and executable script.
[0058] For example, a rule tree Figure 5 As shown, a rule tree includes rule conditions, decision results (business decision results), and executable scripts (business execution scripts). ALL indicates that rule condition 1 and rule condition 2 must be satisfied simultaneously to obtain the corresponding decision result and executable script. Rule condition 1 is "sex equals: male", rule condition 2 is "age greater than or equal to: 18", the decision result is "type: discount coupon, discount: 20", and the corresponding execution code of the executable script is: function(fact) {return fact.money – 20}; where the execution code of the executable script represents money = money – 20. For example, money (discounted price of the product) = money (original price of the product) – 20 (20 yuan). If money (original price of the product) is 100, then money (discounted price of the product) = 100 – 20 = 80.
[0059] For example, such as Figure 3 As shown, the form rule editor's functions include rule validation; the page for rule validation is as follows. Figure 6 As shown, the page includes field names such as featureFlag, Room, Toilet, City, and Parking. featureFlag represents the developer's permission to execute the rule. Developers fill in the field values corresponding to the field names. The field value for featureFlag is fe_test, the field value for Room is 1 (1 room), the field value for Toilet is 1 (1 toilet), and the field value for City is false (not in the city). Developers click the "Validate Now" confirmation box on the page to display the rule validation results. The validation results include a matching result of 500, which means the rent for a one-bedroom, one-bathroom room (outside the city) is 500 yuan. The field definitions in the rule protocol for which the rule validation is performed are as follows: { "name":"House for Rent" "attributes":[ { "name": "featureFlag", "type" :"featureFlag" }, { "name":"Room", "type": "number" }, { "name":"Bathroom", "type": "number" }, { "name": "City Area" "type": "boolean"}, ] } It should be noted that "name":"House for Rent" indicates the application scenario, and attributes indicates the field definition; this is done by the developers in... Figure 6 The field values entered in the system are validated for rules, ensuring that each published rule falls within the expected range and avoiding unreasonable or unexpected business decision results (matching results). It also allows for previewing and publishing rule protocols. Furthermore, it enables real-time collection of triggering conditions (rule conditions, i.e., business processing conditions) and corresponding contextual fact data for each business decision result, facilitating business decision result detection. For example, when the business requesting end executes a rule, it uploads data such as the hit rule conditions, matching results, and the execution results of executable scripts in real time. This data can be used by the server to detect in real-time whether the rules triggered by the user meet expectations, allowing for intervention and adjustment.
[0060] For example, such as Figure 3 As shown, the form rule editor's functions include generating rule protocols; the rule protocol is shown below: { "name":"Purchased Items", "attributes":[ {"name": "money", "type": "number"}, {"name": "age", "type": "number"}, {"name": "sex", "type": "string"} ], "decisions": [ / / The rule array (decisions) corresponds to the description of at least one rule tree. { "conditions": { "all": [ { "fact": "fact.sex", / / Retrieves the gender field from contextual fact data. "operator": "equal", / / The conditional operator "equals". "value": "Male" / / Meets the rule condition "Male" }, { "fact": "fact.age", / / Retrieves the age field from contextual fact data. "operator": "greaterThan", / / The conditional operator "greater than" "value": "18" / / Meets the rule condition "18" } ] }, "successCode": "function(fact) {return fact.money - 20;}", / / If the rule condition is met, execute the executable script and return the discounted price fact.money - 20. "failCode": "function(fact) {return fact.money;}" / / If the rule conditions are not met, the code returns the original price fact.money. }, { "conditions": { "all": [ { "fact": "fact.sex", / / Retrieves the gender field from contextual fact data. "operator": "equal", / / The conditional operator "equals". "value": "female" / / Meets the rule condition "female" }, { "fact": "fact.age", / / Retrieves the age field from contextual fact data. "operator": "greaterThan", / / The conditional operator "greater than" "value": "18" / / Meets the rule condition "18" } ] }, "successCode": "function(fact) { return fact.money × 0.9;}", / / If the rule condition is met, execute the executable script and return the discounted price fact.money × 0.9. "failCode": "function(fact) {return fact.money;}" / / If the rule conditions are not met, the code returns the original price fact.money. } ] } It should be noted that "name":"purchased goods" indicates the application scenario, attributes indicate field definitions, decisions indicate the rule array, conditions indicate the rule tree, and the context fact data is Fact; based on the HTTP interface, the form rule editor transmits the generated rule protocol to the server, and the server stores the rule protocol in the database. The rule protocol is based on JSON DSL; the language of the executable script in the rule protocol is a scripting language, such as Python, JavaScript, Ruby, PHP, Perl, Lua, Groovy, etc.
[0061] For example, the business request object is a user, the business object is a product, the business object identifier of the business object is the product identifier of the product, the object identifier of the business request object is the user identifier of the user, the business information of the business object is the product information of the product, and the object information of the business request object is the user information of the user. When a user clicks to confirm an order for a product on the shopping page displayed on the business request end, this triggers the business request end to send a target operation request for that product to the server. The target operation request includes the product identifier of the product and the user identifier of the user. Based on the product identifier of the product and the user identifier of the user, the server retrieves the relevant business data (Fa) of the target operation request from the target database. (ct) The relevant business data includes the product information of the product and the user information of the user. For example, the product information might be that the original price of the product is 100 yuan, and the user information might be that the user is male and 18 years old. The server-side in the server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier. The rule engine in the server-side, based on the relevant business data, determines the rule conditions (target business processing conditions) that match the relevant business data from the rule protocol. For example, if the relevant data shows that the user is male and 18 years old, then rule condition 1 of rule 1 in the rule protocol is sex='male', and rule condition 2 of rule 1 in the rule protocol is age>= 18. The rule conditions that match "the user is male and 18 years old" are rule condition 1 and rule condition 2. That is, the rule that matches "the user is male and 18 years old" is rule 1. The matching result (business decision result) corresponding to rule condition 1 and rule condition 2 is: a 20 yuan discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money - 20. The server in the server sends the matching result and the executable script to the business request end. The business request end displays the matching result to the user. If the user clicks to confirm the matching result, the business request end receives the user's confirmation operation for the matching result. The script engine of the business request end, based on relevant business data (e.g., the original price of the product is 100 yuan), executes the executable script (e.g., money = money - 20 = 100 - 20 = 80) to obtain the business processing result, such as 80 yuan.
[0062] For example, the business request object is a user, the business object is a product, the business object identifier of the business object is the product identifier of the product, the business information of the business object is the product information of the product, and the object information of the business request object is the user's user information; when the user clicks to confirm an order for a product on the shopping page displayed on the business request end, the business request end is triggered to send a target operation request for that product to the server in the server, and the target operation request includes the product identifier of the product; the server in the server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier of the product; the server in the server sends the rule protocol to the business request end; the business request end... Based on the product identifier and the user identifier, relevant business data (Fact) is retrieved from the target database. This data includes product information and user information. For example, the product information might state that the original price is 200 yuan, and the user information might state that the user is female and 20 years old. The rule engine on the business request side then determines the matching rule conditions (target business processing conditions) from the rule protocol based on this relevant business data. For instance, if the relevant data indicates the user is female and 20 years old, then rule condition 3 of rule 2 in the rule protocol is sex='female', and rule condition 4 of rule 2 in the rule protocol is age>= 18. The rules that match "the user is female and 20 years old" are rules 3 and 4, which means that the rule that matches "the user is female and 20 years old" is rule 2. The matching result (business decision result) corresponding to rules 3 and 4 is: a 10% discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money × 0.9. The business request end displays the matching result to the user. If the user clicks to confirm the matching result, the business request end receives the user's confirmation operation for the matching result. The script engine of the business request end, based on relevant business data (e.g., the original price of the product is 200 yuan), executes the executable script (e.g., money = money × 0.9 = 200 × 0.9 = 180) to obtain the business processing result, such as 180 yuan.
[0063] It should be noted that the business request end displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request. The business request object confirms the business decision result. After receiving the confirmation operation of the business request object on the business decision result, the business request end executes the business execution script corresponding to the target business processing condition to obtain the business processing result, thereby improving the efficiency of business processing.
[0064] In one embodiment, based on the relevant business data of the target operation request, target business processing conditions that match the relevant business data are determined from a set of business processing policies, including: The rule engine parses and processes the business processing strategy set to obtain a rule array, which includes the business processing conditions in each business processing strategy subset. The rule engine matches the business processing conditions and related business data in the rule array, and determines the target business processing condition that matches the related business data from each business processing condition.
[0065] Specifically, the business request object is the user, the business object is the product, the business object identifier of the business object is the product identifier of the product, the object identifier of the business request object is the user identifier of the user, the business information of the business object is the product information of the product, and the object information of the business request object is the user information of the user. For example, when a user clicks to confirm an order for a product on a shopping page displayed on the business request end, the business request end is triggered to send a target operation request for that product to the server. The target operation request includes the product identifier of the product and the user identifier of the user. Based on the product identifier of the product and the user identifier of the user, the server retrieves the relevant business data (Fact) of the target operation request from the target database. The relevant business data includes the product information of the product and the user information of the user. For example, the original price of the product is 100 yuan, and the user's information includes, for example, that the user is male and 18 years old. The server-side retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product's identifier. The server-side rule engine parses the rule protocol to obtain a rule array (decisions), which includes the rule conditions (business processing conditions) of each rule (each subset of business processing strategies). Based on the relevant business data, the server-side rule engine determines the rule conditions (target business processing conditions) that match the relevant business data from the rule conditions. For example, if the relevant data shows the user is male and 18 years old, rule condition 1 of rule 1 in the rule protocol is sex='male', and rule condition 2 of rule 1 in the rule protocol is age>= 18. The rule conditions that match "the user is male and 18 years old" are rule condition 1 and rule condition 2. That is, the rule that matches "the user is male and 18 years old" is rule 1. The matching result (business decision result) corresponding to rule condition 1 and rule condition 2 is: 20 yuan discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money – 20.
[0066] For example, the business request object is a user, the business object is a product, the business object identifier of the business object is the product identifier of the product, the business information of the business object is the product information of the product, and the object information of the business request object is the user's user information. When a user clicks to confirm an order for a product on the shopping page displayed on the business request end, this triggers the business request end to send a target operation request for that product to the server. The target operation request includes the product identifier of the product. The server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier of the product. The server sends the rule protocol to the business request end. The business request end retrieves relevant business data (Facts) from the target database based on the product identifier of the product and the user's user identifier. Business data includes product information and user information. For example, the product information might state the original price as 200 yuan, and the user information might state that the user is female and 20 years old. The rule engine on the business request side parses the rule protocol (a set of business processing strategies) to obtain a rule array (decisions). The rule array includes the rule conditions (business processing conditions) of each rule (a subset of each business processing strategy). Based on the relevant business data, the rule engine on the business request side determines the rule conditions (target business processing conditions) that match the relevant business data from the rule conditions. For example, if the relevant data shows the user is female and 20 years old, then rule condition 3 of rule 2 in the rule protocol is sex='female', and rule condition 4 of rule 2 in the rule protocol is age>= 18. The rule conditions that match "the user is female and 20 years old" are rule condition 3 and rule condition 4. That is, the rule that matches "the user is female and 20 years old" is rule 2. The matching result (business decision result) corresponding to rule condition 3 and rule condition 4 is: 10% discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money × 0.9.
[0067] It should be noted that the rule protocol (a set of business processing strategies) and context data (related business data) are injected into the rule engine as input parameters. The rule engine iterates through and matches each rule in the rule array `decisions` of the rule protocol with the context data `Fact`. That is, it iterates through and matches the rule conditions of each rule with the context data `Fact` until all rules have been matched. Multiple rules may be matched, or no rules may be matched. Based on the matched rules, the corresponding business execution script is dynamically sent to the business request end. The business request end executes the business execution script to obtain the business processing result. In this way, the efficiency of business processing is improved.
[0068] In one embodiment, the business processing operation is performed by a server, and after determining the target business processing conditions that match the relevant business data from the business processing policy set, the operation further includes: Send the business decision results and business execution script corresponding to the target business processing conditions to the business requesting end.
[0069] Specifically, the business request object is the user, the business object is the product, the business object identifier of the business object is the product identifier of the product, the object identifier of the business request object is the user identifier of the user, the business information of the business object is the product information of the product, and the object information of the business request object is the user information of the user. For example, when a user clicks to confirm an order for a product on a shopping page displayed on the business request end, the business request end is triggered to send a target operation request for that product to the server in the server. The target operation request includes the product identifier of the product and the user identifier of the user. Based on the product identifier of the product and the user identifier of the user, the server in the server retrieves the relevant business data (Fa) of the target operation request from the target database. The relevant business data includes product information and user information. For example, the product information might state that the original price is 100 yuan, and the user information might state that the user is male and 18 years old. The server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier. The server-side rule engine, based on the relevant business data, determines the rule conditions (target business processing conditions) that match the relevant business data from the rule protocol. For example, if the relevant data states that the user is male and 18 years old, rule 1 of the rule protocol includes rule condition 1 and rule condition 2. Rule condition 1 is sex='male', and rule condition 2 is age>= 18. The rule conditions that match "the user is male and 18 years old" are rule condition 1 and rule condition 2. Both rule condition 1 and rule condition 2 are target business processing conditions. That is, the rule that matches "the user is male and 18 years old" is rule 1. The matching result (business decision result) corresponding to rule condition 1 and rule condition 2 is: 20 yuan discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money - 20. The server in the server sends the matching result and the executable script to the business requesting end.
[0070] It should be noted that, based on the matched rules, the server dynamically sends the corresponding business execution script to the business request end; the business request end executes the business execution script to obtain the business processing result; thus, the efficiency of business processing is improved.
[0071] In one embodiment, the business execution script corresponding to the target business processing condition is a script based on a first scripting language. Sending the business execution script corresponding to the target business processing condition to the business requesting end includes: Determine the scripting languages supported by the business requester. If the scripting languages supported by the business requester include the first scripting language, then send the business execution script corresponding to the target business processing condition to the business requester. If the scripting languages supported by the business requesting end do not include the first scripting language, then language conversion processing is performed based on the business execution script corresponding to the target business processing conditions to obtain the updated business execution script, and the updated business execution script is sent to the business requesting end.
[0072] Specifically, for example, if the scripting language of the business execution script is Groovy and the language (scripting language) supported by the business request end is Python, then the server will convert the scripting language of the business execution script into Python to obtain the updated business execution script; the server will send the updated business execution script to the business request end, or the server will send the rule protocol (business processing strategy set) including the updated business execution script to the business request end.
[0073] For example, such as Figure 3 As shown, if the scripting language of the business execution script is the first scripting language, but the scripting language supported by the business requesting end is not the first scripting language, then based on the business execution script, the server performs language conversion processing through a protocol converter to obtain the updated business execution script; the server sends the updated business execution script to the business requesting end, or the server sends the rule protocol including the updated business execution script to the business requesting end.
[0074] It should be noted that the server performs language conversion on the business execution script, thereby enabling the dynamic distribution of cross-language executable scripts to the business request client; the business processing strategy set is based on sandbox isolation and can meet the requirements of various scripting languages supported by the business request client. That is, the business request client can directly use the business execution script in the business processing strategy set, and the server does not need to perform language conversion on the business execution script.
[0075] In one embodiment, the business processing operation is executed by the business requester. After determining the set of business processing strategies for the business object, the method further includes: The business processing strategy set is sent to the business request end so that the business request end can perform business processing operations based on the business processing strategy set and obtain the corresponding business processing results.
[0076] Specifically, the business request object is the user, the business object is the product, the business object identifier of the business object is the product identifier of the product, the business information of the business object is the product information of the product, and the object information of the business request object is the user's user information. For example, when a user clicks to confirm an order for a product on a shopping page displayed on the business request end, the business request end sends a target operation request for that product to the server in the server. The target operation request includes the product identifier of the product. The server in the server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier of the product. The server in the server sends the rule protocol to the business request end. The client-side retrieves relevant business data (Facts) from the target database based on the product identifier and the user identifier. This data includes product information and user information. For example, the product information might state that the original price is 200 yuan, and the user information might state that the user is female and 20 years old. The client-side rule engine then determines matching rule conditions (target business processing conditions) from the rule protocol based on this relevant business data. For instance, if the relevant data indicates the user is female and 20 years old, then rule condition 3 of rule 2 in the rule protocol would be "sex='female'", and rule condition 4 of rule 2 in the rule protocol would be "age>= 18. The rules that match "the user is female and 20 years old" are rules 3 and 4, which means that the rule that matches "the user is female and 20 years old" is rule 2. The matching result (business decision result) corresponding to rules 3 and 4 is: a 10% discount coupon. The executable script (business execution script) corresponding to the matching result is: money = money × 0.9. The business request end displays the matching result to the user. If the user clicks to confirm the matching result, the business request end receives the user's confirmation operation for the matching result. The script engine of the business request end, based on relevant business data (e.g., the original price of the product is 200 yuan), executes the executable script (e.g., money = money × 0.9 = 200 × 0.9 = 180) to obtain the business processing result, such as 180 yuan.
[0077] It should be noted that the server sends a set of business processing strategies to the business requesting end, that is, dynamically distributes the corresponding business execution scripts to the business requesting end; the business requesting end executes the business execution scripts to obtain the business processing results; thus, the efficiency of business processing is improved.
[0078] In one embodiment, the business requester obtains the business processing result by executing the business execution script corresponding to the target business processing condition, including: After receiving confirmation of the business decision result from the business request object, the business request end executes the business execution script corresponding to the target business processing condition through the script engine in the business request end based on the relevant business data, and obtains the business processing result.
[0079] Specifically, for example, the business request object is a user; the business request end displays the matching result (business decision result) to the user; if the user clicks to confirm the matching result, the business request end receives the user's confirmation operation for the matching result, and the script engine of the business request end, based on relevant business data (for example, the original price of the product is 200 yuan), executes the executable script (for example, money = money × 0.9 = 200 × 0.9 = 180) to obtain the business processing result, such as 180 yuan.
[0080] It should be noted that the business request end displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request. The business request object confirms the business decision result. After receiving the confirmation operation of the business request object on the business decision result, the business request end executes the business execution script corresponding to the target business processing condition to obtain the business processing result, thereby improving the efficiency of business processing.
[0081] In one embodiment, the relevant business data for the target operation request is determined in the following way: Based on the business object identifier and the object identifier of the business request object of the target operation request, relevant business data of the target operation request is obtained from the target database. The relevant business data includes the object information of the business request object and the business information of the business object. The target database stores a set of business objects and a set of business request objects. The set of business objects includes the business object identifier and business information of each business object, while the set of business request objects includes the object identifier and object information of each business request object.
[0082] Specifically, for example, the business request object is a user, the business object is a product, the business object identifier of the business object is the product identifier of the product, the object identifier of the business request object is the user identifier of the user, the business information of the business object is the product information of the product, and the object information of the business request object is the user information of the user. When the user clicks to confirm an order for a product on the shopping page displayed on the business request end, the business request end sends a target operation request for that product to the server in the server. The target operation request includes the product identifier of the product and the user identifier of the user. Based on the product identifier of the product and the user identifier of the user, the server in the server retrieves the relevant business data (Fact) of the target operation request from the target database. The relevant business data includes the product information of the product and the user information of the user. For example, the product information of the product is that the original price of the product is 100 yuan, and the user information of the user is that the user is male and 18 years old.
[0083] For example, the business request object is a user, the business object is a product, the business object identifier of the business object is the product identifier of the product, the business information of the business object is the product information of the product, and the object information of the business request object is the user information of the user. When a user clicks to confirm an order for a product on the shopping page displayed on the business request end, the business request end sends a target operation request for that product to the server in the server. The target operation request includes the product identifier of the product. The server in the server retrieves the corresponding rule protocol (business processing strategy set) from the target database based on the product identifier of the product. The server in the server sends the rule protocol to the business request end. The business request end retrieves relevant business data (Fact) from the target database based on the product identifier of the product and the user identifier of the user. The relevant business data includes the product information of the product and the user information of the user. For example, the product information of the product is that its original price is 200 yuan, and the user information of the user is that the user is female and 20 years old.
[0084] It should be noted that the server obtains relevant business data and matches the corresponding business processing strategy set from the target database based on the relevant business data; or, the business request end obtains relevant business data, matches the corresponding rule based on the relevant business data, and executes the business execution script in the rule based on the relevant business data to obtain the business processing result; thus, the efficiency of business processing is improved.
[0085] Applying the embodiments of this disclosure has at least the following beneficial effects: By configuring business execution scripts for subsets of business processing strategies (business rules), the system can dynamically distribute business execution scripts (cross-language executable scripts) to the business request end based on the matched subsets of business processing strategies. The business request end then executes the business execution scripts to obtain the business processing results, thus improving the efficiency of business processing.
[0086] To better understand the methods provided in the embodiments of this disclosure, the solutions of the embodiments of this disclosure will be further explained below with reference to specific application scenarios.
[0087] In one embodiment, for example, such as Figure 3 As shown, the server includes a form rule editor and a server-side component, with the business request end being the downstream component. The business request end includes an execution engine, which includes at least one of a rule engine and a script engine. The functions of the form rule editor include defining fields, defining rule trees, rule validation, generating rule protocols, publishing rule protocols, and detecting rule triggering. Based on an HTTP interface, the form rule editor transmits the generated rule protocol to the server-side component. The server-side component stores the rule protocol in a database, and the rule protocol is based on a JSON DSL.
[0088] For example, such as Figure 7 The field definitions shown refer to defining fields and defining the data structure of Fact. The data structure includes field types, field names, etc. Field types can support general data types, such as Boolean, Number, String, Array, Object, and custom types. Field names include featureFlag, Room, Toilet, City, Parking Lot, etc. The field type corresponding to featureFlag is FeatureFlag, the field type corresponding to Room is Number, the field type corresponding to Toilet is Number, the field type corresponding to City is Boolean, and the field type corresponding to Parking Lot is String.
[0089] For example, such as Figure 8 The rule tree shown can be used to define multiple rule trees. Each rule tree is a rule. The rule conditions in the rule support all (AND), any (OR), or (OR), etc. If the fact meets the rule conditions, the business execution script corresponding to the decision result (business decision result) will be executed. Figure 8 The four rules shown correspond to 500 yuan, 750 yuan, 1000 yuan, and 1250 yuan respectively. These are the original rent amounts, before any discounts. For example... Figure 9The rule tree shown supports all (AND) conditions in the rules. If the field value corresponding to featureFlag is fe_test, the field value corresponding to room is 1 (i.e., 1 room), the field value corresponding to bathroom is 1 (i.e., 1 bathroom), and the field value corresponding to city area is false (i.e., not city area), meaning all four rule conditions are met, then the decision result (business decision result) is displayed. The decision result includes: type is one-bedroom, one-bathroom (non-city area), rent is 500 yuan, etc. The execution code in the corresponding business execution script includes: obtaining the user ID of the currently logged-in user, obtaining the user information based on the user ID, and executing the rental discount. For example, if the user selects a one-bedroom, one-bathroom (non-city area) house in the rental system (business request end), the rental system displays a rent of 500 yuan; if the user confirms the rental, the business execution script is executed, i.e., the rental discount is executed.
[0090] The page for performing rule validation (validation rules) is as follows: Figure 6 As shown, the page includes field names such as featureFlag, Room, Toilet, City, and Parking. featureFlag represents the developer's permission to execute the rule. Developers fill in the field values corresponding to the field names. The field value for featureFlag is fe_test, the field value for Room is 1 (1 room), the field value for Toilet is 1 (1 toilet), and the field value for City is false (not in the city). Developers click the "Validate Now" confirmation box on the page to display the rule validation results. The validation results include a matching result of 500, which means the rent for a one-bedroom, one-bathroom room (outside the city) is 500 yuan. The field definitions in the rule protocol for which the rule validation is performed are as follows: { "name":"House for Rent" "attributes":[ { "name": "featureFlag", "type" :"featureFlag" }, { "name":"Room", "type": "number" }, { "name":"Bathroom", "type": "number" }, { "name": "City Area" "type": "boolean"}, ] } It should be noted that "name":"House for Rent" indicates the application scenario, and attributes indicates the field definition; this is done by the developers in... Figure 6 By validating the field values entered in the rules, we can ensure that each published rule is within the expected range, thus avoiding the triggering of unreasonable or unexpected business decision results. Figure 6 The generated protocol file represents the generated rules protocol.
[0091] Publishing rules and protocols allows for both previewing and publishing of rules and protocols.
[0092] For example, the detection of rule triggers can collect the triggering conditions (rule conditions, i.e. business processing conditions) and corresponding contextual fact data corresponding to each business decision result in real time, so as to facilitate the detection of business decision results; for example, when the business request end executes the rule, it will upload the hit rule conditions, matching results and execution results of executable scripts in real time. This data can be used by the server to detect in real time whether the rules triggered by the user meet expectations, so as to intervene and adjust accordingly.
[0093] In one embodiment, the business processing method provided in this disclosure can be applied to different application scenarios, such as business marketing, data analysis, and verification rules.
[0094] Business marketing, such as renting a house or shopping, consists of multiple rules, processes, and rewards. If the contextual facts meet the rule conditions, the corresponding reward can be obtained. Data analysis, such as stock analysis, can generate desired data from data through rules designed by analysts. Validation rules, such as data validation rules or advertising landing page validation, consist of multiple rule conditions and return business decision results. These rule conditions are numerous, complex, and frequently changing.
[0095] For example, with the development of mobile internet, there are more and more types of advertising landing pages, and the data field validation rules for each type of advertising landing page are different. These data field validation rules are used to verify whether the advertising landing page is valid; for example, data field validation rules... Figure 10The landing page validation rules shown include rules for mini-programs, direct access applications, official landing pages, and custom landing pages. Mini-program validation rules include mini-program ID (identity identifier) validation rules, mini-program path (page path) validation rules, wildcard validation rules, and multi-path validation rules. Direct access applications validation rules include wildcard validation rules and App ID (mini-program ID) validation rules. Official landing page validation rules include URL (Uniform Resource Locator) validation rules and domain name validation rules. Custom landing page validation rules include URL validation rules and domain name validation rules. By configuring data field validation rules and the instructions executed after validation online, atomic landing page validation rules can be reused more flexibly. For example, both official and custom landing pages need to use URL and domain name validation rules, while mini-program and direct access applications need to use wildcard validation rules. These atomic landing page validation rules can be reused more flexibly. For example, in an ad landing page validation scenario, the ad landing page validation rules are matched with contextual fact data to determine the corresponding business decision results and business execution scripts; Fact: The landing page information entered by the user; Business decision result: The information entered by the user contains illegal characters; Business execution script: window.open (user operation manual); Execution result of the business execution script (business processing result): A pop-up window reminds the user that the entered information is invalid, and the operation manual is opened to guide the user to refer to the manual to fill in the form.
[0096] In a specific application scenario, such as a business processing scenario, see [link to relevant documentation]. Figure 11 This illustrates the processing flow of a business processing method, such as... Figure 11 As shown, the processing flow of the business processing method provided in this embodiment includes the following steps: S501: When a user clicks to confirm an order for a product on the shopping page displayed on the business request side, the business request side is triggered to send a target operation request for that product to the server.
[0097] Specifically, the target operation request includes the product identifier of the product and the user identifier of the user.
[0098] S502, the server retrieves relevant business data of the target operation request from the target database based on the product identifier of the product and the user identifier of the user in the target operation request.
[0099] Specifically, for example, the server in the server retrieves relevant business data (Fact) of the target operation request from the target database based on the product identifier of the product and the user identifier of the user in the target operation request. The relevant business data includes the product information of the product and the user information of the user. For example, the product information is that the original price of the product is 100 yuan, and the user information is that the user is male and 18 years old.
[0100] S503, the server retrieves the corresponding business processing strategy set from the target database based on the product's product identifier.
[0101] Specifically, the business processing strategy set is a rule protocol.
[0102] S504, the server's rule engine parses and processes the business processing strategy set to obtain a rule array.
[0103] Specifically, the rule array includes a subset of business processing strategies, that is, the rule array includes the business processing conditions in each subset of business processing strategies, and the subset of business processing strategies is the rule.
[0104] S505, the server's rule engine, based on relevant business data, determines a subset of business processing strategies that match the relevant business data from each subset of business processing strategies in the rule array. This subset of business processing strategies includes the target business processing conditions. The server then saves this subset of business processing strategies sequentially to the execution area.
[0105] Specifically, if the area to be executed, such as Age, contains three business processing strategy subsets that match the relevant business data, then these three business processing strategy subsets will be saved to the area to be executed in the order of their matching.
[0106] For example, the server-side rule engine in the server determines the target business processing conditions that match the relevant business data from various business processing conditions based on the relevant business data.
[0107] For example, a subset of business processing strategies is defined as rules. The set of business processing strategies and related business data are used as input parameters and injected into the rule engine. The rule engine iterates through and matches each rule in the rule array corresponding to the set of business processing strategies with the related business data. That is, it iterates through and matches the business processing conditions and context data Fact of each rule until all rules are matched. Multiple rules may be matched, or no rules may be matched. If a rule is matched, S506 is executed.
[0108] S506, the server sends the business decision result and business execution script corresponding to the target business processing conditions to the business requesting end.
[0109] Specifically, for example, the subset of business processing strategies (rules) that match the relevant business data includes the target business processing conditions (rule conditions), the business decision results (matching results) corresponding to the target business processing conditions, and the business execution scripts (executable scripts) corresponding to the business decision results.
[0110] For example, the scripting language supported by the business execution script corresponding to the target business processing condition is the first scripting language; if the scripting language supported by the business requesting end includes the first scripting language, the server sends the business execution script corresponding to the target business processing condition to the business requesting end; if the scripting language supported by the business requesting end does not include the first scripting language, the server performs language conversion processing based on the business execution script corresponding to the target business processing condition to obtain an updated business execution script, and sends the updated business execution script to the business requesting end.
[0111] S507: The business requesting end displays the business decision results to the user on the shopping page.
[0112] S508 If the user confirms the business decision result, and the business request end receives the user's confirmation operation for the business decision result, then the script engine of the business request end obtains the business processing result by executing the business execution script based on the relevant business data.
[0113] Specifically, for example, the original price of the product in the relevant business data can be used as the input parameter for the script engine.
[0114] It should be noted that the rules engine is located on the server side, while the script engine is located on the business request side.
[0115] In a specific application scenario, such as a business processing scenario, see [link to relevant documentation]. Figure 12 This illustrates the processing flow of a business processing method, such as... Figure 12 As shown, the processing flow of the business processing method provided in this embodiment includes the following steps: S601: When a user clicks to confirm an order for a product on the shopping page displayed on the business request side, the business request side is triggered to send a target operation request for that product to the server.
[0116] Specifically, the target operation request includes the product identifier of the product.
[0117] S602, the server retrieves the corresponding business processing strategy set from the target database based on the product identifier of the product in the target operation request.
[0118] Specifically, the business processing strategy set is a rule protocol.
[0119] S603, the server sends the business processing strategy set to the business requesting end.
[0120] Specifically, for example, the scripting language supported by the business execution script corresponding to the target business processing condition is the first scripting language; if the scripting language supported by the business requesting end includes the first scripting language, the server sends the business processing strategy set including the business execution script to the business requesting end; if the scripting language supported by the business requesting end does not include the first scripting language, the server performs language conversion processing based on the business execution script corresponding to the target business processing condition to obtain the updated business execution script, and sends the business processing strategy set including the updated business execution script to the business requesting end.
[0121] S604: The business requesting end retrieves relevant business data from the target database based on the product identifier and the user identifier.
[0122] Specifically, for example, the business requesting end retrieves relevant business data (Fact) from the target database based on the product identifier of the product and the user identifier of the user. The relevant business data includes the product information of the product and the user information of the user. For example, the product information of the product is that the original price of the product is 100 yuan, and the user information of the user is that the user is male and 18 years old.
[0123] S605, the rule engine on the business request side parses and processes the business processing strategy set to obtain a rule array.
[0124] Specifically, the rule array includes a subset of business processing strategies, that is, the rule array includes the business processing conditions in each subset of business processing strategies, and the subset of business processing strategies is the rule.
[0125] S606, the rule engine on the business request side determines a subset of business processing strategies that match the relevant business data from each subset of business processing strategies in the rule array. This subset of business processing strategies includes the target business processing conditions, the business decision results corresponding to the target business processing conditions, and the business execution script; and saves this subset of business processing strategies to the execution area in sequence.
[0126] Specifically, if the area to be executed, such as Age, contains three business processing strategy subsets that match the relevant business data, then these three business processing strategy subsets will be saved to the area to be executed in the order of their matching.
[0127] For example, the subset of business processing strategies (rules) that match relevant business data includes the target business processing conditions (rule conditions), the business decision results (matching results) corresponding to the target business processing conditions, and the business execution scripts (executable scripts) corresponding to the business decision results.
[0128] For example, a subset of business processing strategies is defined as rules. The set of business processing strategies and related business data are used as input parameters and injected into the rule engine. The rule engine iterates through and matches each rule in the rule array corresponding to the set of business processing strategies with the related business data. That is, it iterates through and matches the business processing conditions and context data Fact of each rule until all rules are matched. Multiple rules may be matched, or no rules may be matched. If a rule is matched, S607 is executed.
[0129] S607, the business request end displays the business decision results to the user on the shopping page.
[0130] S608, if the user confirms the business decision result, the business request end receives the user's confirmation operation for the business decision result, then the script engine of the business request end obtains the business processing result by executing the business execution script based on the relevant business data.
[0131] Specifically, for example, the original price of the product in the relevant business data can be used as the input parameter for the script engine.
[0132] It should be noted that both the rules engine and the script engine are located on the business request side.
[0133] Applying the embodiments of this disclosure has at least the following beneficial effects: This approach avoids writing excessive if / else statements and other conditional statements, improving the maintainability of code implementing complex logic; it separates business logic from business rules, enabling centralized management, reusability, and extensibility of business rules; it allows for online configuration of business rules and corresponding execution scripts, facilitating rapid response to changing requirements; and it utilizes cross-language scripting (cross-language executable scripts) to achieve greater code portability. For example... Figure 13 As shown, the downstream (business request end) does not require front-end and back-end developers to develop business rules and business execution scripts. Front-end and back-end developers only need to connect to the rule engine and script engine.
[0134] This disclosure also provides a service processing apparatus, the structural schematic diagram of which is shown below. Figure 14 As shown, the business processing device 70 includes a first processing module 701 and a second processing module 702.
[0135] The first processing module 701 is used to receive a target operation request for a business object from the business request end. The target operation request includes the business object identifier of the business object. The second processing module 702 is used to determine a set of business processing strategies for a business object based on the business object identifier, execute business processing operations based on the set of business processing strategies, obtain the corresponding business processing results, and display the business processing results to the business requesting end. The business processing strategy set includes at least one subset of business processing strategies. Each subset of business processing strategies includes business processing conditions and business processing strategies corresponding to the business processing conditions. The business processing strategies include business execution scripts corresponding to the business processing conditions. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, the target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
[0136] In one embodiment, the business processing strategy further includes the business decision result corresponding to the target business processing condition, and the second processing module 702 is further configured to: The business request end displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request. After receiving the confirmation operation of the business request object on the business decision result, the business request end executes the business execution script corresponding to the target business processing condition to obtain the business processing result.
[0137] In one embodiment, the second processing module 702 is specifically used for: The rule engine parses and processes the business processing strategy set to obtain a rule array, which includes the business processing conditions in each business processing strategy subset. The rule engine matches the business processing conditions and related business data in the rule array, and determines the target business processing condition that matches the related business data from each business processing condition.
[0138] In one embodiment, the business processing operation is executed by the server. After determining the target business processing conditions that match the relevant business data from the business processing policy set, the second processing module 702 is further configured to: Send the business decision results and business execution script corresponding to the target business processing conditions to the business requesting end.
[0139] In one embodiment, the business execution script corresponding to the target business processing condition is a script based on a first scripting language, and the second processing module 702 is specifically used for: Determine the scripting languages supported by the business requester. If the scripting languages supported by the business requester include the first scripting language, then send the business execution script corresponding to the target business processing condition to the business requester. If the scripting languages supported by the business requesting end do not include the first scripting language, then language conversion processing is performed based on the business execution script corresponding to the target business processing conditions to obtain the updated business execution script, and the updated business execution script is sent to the business requesting end.
[0140] In one embodiment, the business processing operation is executed by the business requester. After determining the set of business processing strategies for the business object, the second processing module 702 is further configured to: The business processing strategy set is sent to the business request end so that the business request end can perform business processing operations based on the business processing strategy set and obtain the corresponding business processing results.
[0141] In one embodiment, the second processing module 702 is specifically used for: After receiving confirmation of the business decision result from the business request object, the business request end executes the business execution script corresponding to the target business processing condition through the script engine in the business request end based on the relevant business data, and obtains the business processing result.
[0142] In one embodiment, the relevant business data for the target operation request is determined in the following way: Based on the business object identifier and the object identifier of the business request object of the target operation request, relevant business data of the target operation request is obtained from the target database. The relevant business data includes the object information of the business request object and the business information of the business object. The target database stores a set of business objects and a set of business request objects. The set of business objects includes the business object identifier and business information of each business object, while the set of business request objects includes the object identifier and object information of each business request object.
[0143] Applying the embodiments of this disclosure has at least the following beneficial effects: The system receives a target operation request from a business request client for a business object. The target operation request includes a business object identifier. Based on the business object identifier, a set of business processing strategies is determined for the business object. Business processing operations are then executed based on these strategies to obtain the corresponding business processing result, which is then displayed to the business request client. Each business processing strategy set includes at least one subset of business processing strategies. Each subset includes business processing conditions and corresponding business processing strategies. Each business processing strategy includes a corresponding business execution script. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, target business processing conditions matching the relevant business data are determined from the set of business processing strategies. The business request client then executes the business execution script corresponding to the target business processing conditions to obtain the business processing result. By configuring business execution scripts for subsets of business processing strategies (business rules), the system supports dynamically distributing business execution scripts (cross-language executable scripts) to the business request client based on the matched subsets of business processing strategies. The business request client executes the business execution scripts to obtain the business processing result, thus improving the efficiency of business processing.
[0144] This disclosure also provides an electronic device, the structural schematic diagram of which is shown below. Figure 15 As shown, Figure 15 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this disclosure.
[0145] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0146] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0147] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0148] The memory 4003 is used to store computer programs that execute embodiments of the present disclosure, and is controlled by the processor 4001 to execute them. The processor 4001 is used to execute the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0149] Electronic devices include, but are not limited to, servers.
[0150] Applying the embodiments of this disclosure has at least the following beneficial effects: The system receives a target operation request from a business request client for a business object. The target operation request includes a business object identifier. Based on the business object identifier, a set of business processing strategies is determined for the business object. Business processing operations are then executed based on these strategies to obtain the corresponding business processing result, which is then displayed to the business request client. Each business processing strategy set includes at least one subset of business processing strategies. Each subset includes business processing conditions and corresponding business processing strategies. Each business processing strategy includes a corresponding business execution script. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, target business processing conditions matching the relevant business data are determined from the set of business processing strategies. The business request client then executes the business execution script corresponding to the target business processing conditions to obtain the business processing result. By configuring business execution scripts for subsets of business processing strategies (business rules), the system supports dynamically distributing business execution scripts (cross-language executable scripts) to the business request client based on the matched subsets of business processing strategies. The business request client executes the business execution scripts to obtain the business processing result, thus improving the efficiency of business processing.
[0151] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0152] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0153] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0154] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A business processing method, characterized in that, include: The service requester receives a target operation request for a service object, wherein the target operation request includes the service object identifier of the service object; Based on the business object identifier, a set of business processing strategies for the business object is determined, and business processing operations are performed based on the set of business processing strategies to obtain the corresponding business processing results, and the business processing results are displayed to the business requesting end. The business processing strategy set includes at least one subset of business processing strategies, each subset of business processing strategies includes a business processing condition and a business processing strategy corresponding to the business processing condition, and the business processing strategy includes a business execution script corresponding to the business processing condition. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
2. The method according to claim 1, characterized in that, The business processing strategy also includes the business decision result corresponding to the target business processing condition, and the step of obtaining the business processing result by the business requesting end through executing the business execution script corresponding to the target business processing condition further includes: The business request terminal displays the business decision result corresponding to the target business processing condition to the business request object of the target operation request, so that after receiving the confirmation operation of the business request object for the business decision result, the business request terminal executes the business execution script corresponding to the target business processing condition to obtain the business processing result.
3. The method according to claim 1 or 2, characterized in that, The step of determining target business processing conditions that match the relevant business data from the business processing strategy set based on the relevant business data of the target operation request includes: The business processing strategy set is parsed and processed by the rule engine to obtain a rule array, which includes the business processing conditions in each business processing strategy subset; The rule engine matches each business processing condition in the rule array with the relevant business data, and determines the target business processing condition that matches the relevant business data from the business processing conditions.
4. The method according to claim 3, characterized in that, The business processing operation is executed by the server. After determining the target business processing conditions that match the relevant business data from the business processing policy set, the method further includes: The business decision result and business execution script corresponding to the target business processing conditions are sent to the business requesting end.
5. The method according to claim 4, characterized in that, The business execution script corresponding to the target business processing condition is a script based on a first scripting language. Sending the business execution script corresponding to the target business processing condition to the business requesting end includes: Determine the scripting languages supported by the business requesting end. If the scripting languages supported by the business requesting end include the first scripting language, then send the business execution script corresponding to the target business processing condition to the business requesting end. If the scripting language supported by the service requesting end does not include the first scripting language, then language conversion processing is performed based on the service execution script corresponding to the target service processing condition to obtain an updated service execution script, and the updated service execution script is sent to the service requesting end.
6. The method according to claim 1, characterized in that, The business processing operation is executed by the business requesting end. After determining the business processing strategy set for the business object, the method further includes: The business processing strategy set is sent to the business requesting end so that the business requesting end can perform business processing operations based on the business processing strategy set and obtain the corresponding business processing result.
7. The method according to claim 2, characterized in that, The process of obtaining the business processing result by the business requesting end through executing the business execution script corresponding to the target business processing conditions includes: After receiving confirmation from the business request object regarding the business decision result, the business request terminal executes the business execution script corresponding to the target business processing condition through the script engine in the business request terminal based on relevant business data, thereby obtaining the business processing result.
8. The method according to claim 1, characterized in that, The relevant business data for the target operation request is determined in the following way: Based on the business object identifier and the object identifier of the business request object of the target operation request, relevant business data of the target operation request is obtained from the target database. The relevant business data includes the object information of the business request object and the business information of the business object. The target database stores a set of business objects and a set of business request objects. The set of business objects includes a business object identifier for each business object and business information for each business object. The set of business request objects includes an object identifier for each business request object and object information for each business request object.
9. A business processing device, characterized in that, include: The first processing module is used to receive a target operation request for a business object from the business request client, wherein the target operation request includes the business object identifier of the business object. The second processing module is used to determine a set of business processing strategies for the business object based on the business object identifier, perform business processing operations based on the set of business processing strategies, obtain the corresponding business processing results, and display the business processing results to the business requesting end. The business processing strategy set includes at least one subset of business processing strategies, each subset of business processing strategies includes a business processing condition and a business processing strategy corresponding to the business processing condition, and the business processing strategy includes a business execution script corresponding to the business processing condition. The business processing operation includes the following steps: Based on the relevant business data of the target operation request, target business processing conditions that match the relevant business data are determined from the business processing strategy set, so that the business request end can obtain the business processing result by executing the business execution script corresponding to the target business processing conditions.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.