Data processing method and device, computer equipment and readable storage medium
By acquiring business behavior data of the target object and generating recommended action instructions using pre-configured rule sets and models, the problem of poor accuracy of recommended actions caused by hard-coded static rules is solved, and more accurate recommended action decisions are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 湖南长银五八消费金融股份有限公司
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, hard-coded static rules result in poor accuracy in recommending actions based on user behavior data.
By acquiring business behavior data of the target object, determining its characteristics, selecting pre-configured rule sets and models according to event types, and combining the rule output results and model output results to generate recommended action instructions, the interpretability of the rule set and the predictive ability of the model are integrated.
It improves the accuracy of recommended actions by combining the determinism of the rule set with the predictive power of the model to generate recommended action instructions that are more suitable for the target object.
Smart Images

Figure CN121883147A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, apparatus, computer equipment, and readable storage medium. Background Technology
[0002] As digital transformation deepens, enterprises are collecting user behavior data within their products by deploying technologies such as front-end tracking. This data is crucial for understanding users, optimizing products, and achieving precise operations.
[0003] Related technologies typically employ hard-coded static rules to quickly determine user behavior data and derive corresponding recommended actions. However, while hard-coded static rules offer strong determinism, their rigidity leads to poor accuracy in recommending actions. Summary of the Invention
[0004] Therefore, it is necessary to provide a data processing method, apparatus, computer equipment, and readable storage medium that can improve the accuracy of recommended actions in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a data processing method, including:
[0006] Obtain business behavior data of the target object and determine the business behavior characteristics of the target object;
[0007] Based on the event type corresponding to the business behavior data, select the corresponding pre-configured rule set and pre-configured model;
[0008] The business behavior characteristics are input into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results.
[0009] Based on the rule output and model output, generate recommended action instructions and execute them.
[0010] In one embodiment, determining the business behavior characteristics of the target object includes:
[0011] Generate real-time behavioral characteristics based on business behavior data;
[0012] Obtain long-term behavioral characteristics of the target object. These long-term behavioral characteristics are used to describe the characteristics of the target object's business behavior within a predetermined time period.
[0013] Business behavior characteristics are determined based on real-time and long-term behavioral characteristics.
[0014] In one embodiment, real-time behavioral features are generated based on business behavior data, including:
[0015] Business behaviors are extracted from business behavior data, and these behaviors are sorted to obtain a behavior sequence.
[0016] Determine the behavior weight of a business behavior based on its behavior type;
[0017] Based on the behavior weight, each business behavior in the behavior sequence is weighted to obtain real-time behavior characteristics.
[0018] In one embodiment, determining the behavior weight of a business behavior based on its behavior type includes:
[0019] Determine the initial weight of the business behavior based on its behavior type;
[0020] The initial weights are decayed based on the freshness of the business behavior to obtain the behavior weights of the business behavior. The magnitude of the decay is negatively correlated with the freshness.
[0021] In one embodiment, recommended action instructions are generated based on the rule output and the model output, including:
[0022] Obtain the predetermined rule weights and model weights;
[0023] Based on the rule weights and model weights, the rule outputs and model outputs are weighted to obtain a comprehensive result.
[0024] Based on the comprehensive results, recommended action instructions are generated.
[0025] In one embodiment, generating recommended action instructions based on the rule output and the model output further includes:
[0026] If the rule output indicates a rejection, a recommended action instruction is generated based on the rule output.
[0027] In one embodiment, generating recommended action instructions based on the rule output and the model output further includes:
[0028] If the probability score of the model output is higher than a predetermined probability threshold, a recommended action instruction is generated based on the model output.
[0029] Secondly, this application also provides a data processing apparatus, comprising:
[0030] The acquisition module is used to acquire business behavior data of the target object and determine the business behavior characteristics of the target object;
[0031] The selection module is used to select the corresponding pre-configured rule set and pre-configured model based on the event type corresponding to the business behavior data;
[0032] The output module is used to input business behavior features into the pre-configured rule set and the pre-configured model respectively, and obtain the rule output results and the model output results.
[0033] The decision module is used to generate recommended action instructions based on the rule output and model output, and then execute the recommended action instructions.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] Obtain business behavior data of the target object and determine the business behavior characteristics of the target object;
[0036] Based on the event type corresponding to the business behavior data, select the corresponding pre-configured rule set and pre-configured model;
[0037] The business behavior characteristics are input into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results.
[0038] Based on the rule output and model output, generate recommended action instructions and execute them.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] Obtain business behavior data of the target object and determine the business behavior characteristics of the target object;
[0041] Based on the event type corresponding to the business behavior data, select the corresponding pre-configured rule set and pre-configured model;
[0042] The business behavior characteristics are input into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results.
[0043] Based on the rule output and model output, generate recommended action instructions and execute them.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] Obtain business behavior data of the target object and determine the business behavior characteristics of the target object;
[0046] Based on the event type corresponding to the business behavior data, select the corresponding pre-configured rule set and pre-configured model;
[0047] The business behavior characteristics are input into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results.
[0048] Based on the rule output and model output, generate recommended action instructions and execute them.
[0049] The aforementioned data processing method, apparatus, computer equipment, and readable storage medium acquire business behavior data of a target object and determine its business behavior characteristics. Based on the event type corresponding to the business behavior data, they select a pre-configured rule set and a pre-configured model. The business behavior characteristics are input into the pre-configured rule set and the pre-configured model, respectively, to obtain rule output results and model output results. Based on the rule output results and model output results, recommended action instructions are generated and executed. This application utilizes rule sets and models configured according to different event types to process the business behavior characteristics of the target object in parallel. This allows for decision-making by combining rule output results and model output results, enabling the generated recommended action instructions to integrate the interpretability and determinism of the rule set with the predictive and discovery capabilities of the model, thereby improving the accuracy of the recommended actions. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a diagram illustrating the application environment of a data processing method in one embodiment.
[0052] Figure 2 This is a flowchart illustrating a data processing method in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the data processing method in another embodiment;
[0054] Figure 4 This is a flowchart illustrating the data processing method in yet another embodiment;
[0055] Figure 5 This is a flowchart illustrating the data processing method in another embodiment;
[0056] Figure 6 This is a system architecture diagram related to an embodiment of the data processing method of this application;
[0057] Figure 7This is a schematic diagram of a scenario involving an embodiment of the data processing method of this application;
[0058] Figure 8 This is a structural block diagram of a data processing device in one embodiment;
[0059] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0062] The data processing method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 can collect business behavior data of target objects on terminal 102, determine the business behavior characteristics of the target objects, select the corresponding pre-configured rule set and pre-configured model based on the event type corresponding to the business behavior data, input the business behavior characteristics into the pre-configured rule set and pre-configured model respectively, obtain rule output results and model output results, generate recommended action instructions based on the rule output results and model output results, and execute the recommended action instructions. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0063] In one exemplary embodiment, such as Figure 2 As shown, a data processing method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S110 to S140. Wherein:
[0064] Step S110: Obtain the business behavior data of the target object and determine the business behavior characteristics of the target object;
[0065] The target object is the entity from which the recommendation action is expected. This target object can be a specific user, or it can refer to objects such as terminal devices or accounts. Business behavior data refers to the behavioral data of the target object in carrying out business activities, which can include behavioral data generated from at least one business activity such as shopping, loans, or wealth management. Business behavior features are the behavioral characteristics of the target object related to business activities. Business behavior features include at least features generated based on business behavior data, and may also include features generated based on the target object's historical behavioral data, such as the target object's user profile and the target object's category preferences for products.
[0066] For example, this embodiment can obtain business behavior data of the target object by collecting behavioral information of the target object in a business system, where the business system provides services such as shopping, loans, and financial management. This embodiment can generate business behavior features of the target object based on the business behavior data. For example, it can generate real-time behavior features based on the business behavior data and obtain long-term behavior features of the target object. The long-term behavior features describe the characteristics of the target object's business behavior within a predetermined time period. Based on the real-time and long-term behavior features, the business behavior features are determined. This embodiment can transmit the business behavior data to a predetermined feature server, so that the predetermined feature server can generate real-time behavior features based on the business behavior data and obtain long-term behavior features of the target object. The long-term behavior features describe the characteristics of the target object's business behavior within a predetermined time period. Based on the real-time and long-term behavior features, the business behavior features are determined, and the predetermined feature server can store the business behavior features for later retrieval. This embodiment can retrieve the target object's business behavior features from the predetermined feature server. This embodiment utilizes a predetermined feature server for feature generation and storage, enabling feature information to be reused by different services and ensuring the consistency of feature information. It avoids the need to regenerate the business behavior features of the target object every time they are obtained. For some feature information that does not change in a short period of time (such as user profiles, preferences for categories, etc.), effective reuse can be achieved, while not affecting the generation of real-time features (the number of clicks by users in the last minute, the session duration of users today, etc.).
[0067] Step S120: Select the corresponding pre-configured rule set and pre-configured model according to the event type corresponding to the business behavior data;
[0068] Among them, the event type is the target of the desired recommendation action, such as shopping cart abandonment recovery, loan application, etc.
[0069] For example, this embodiment can form a mapping relationship between event types and pre-configured rule sets and machine learning models based on pre-configured rule sets and models for different event types. This embodiment can parse business behavior data to obtain the event types corresponding to the business behavior data. For example, if user_123 adds product_A (worth 500 yuan) to their shopping cart, the business behavior data of user_123 is collected, and the event type corresponding to the business behavior data is identified as "shopping cart abandonment recovery". If user_123 submits a loan application, the business behavior data of user_123 is collected, and the event type corresponding to the business behavior data is identified as "loan application". Furthermore, this embodiment can select the corresponding pre-configured rule set and pre-configured model based on the event type corresponding to the business behavior data to adapt to the event type for which a recommendation action is expected.
[0070] Step S130: Input the business behavior features into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results;
[0071] The pre-configured rule set is a collection of rules pre-configured for each event type, and includes at least one rule. The pre-configured rule set can take the form of rule chains or scorecards. Example of a rule chain: Rule A (determines if it's a new user) - Rule B (determines the source channel) - ... - trigger action. Example of a scorecard: Each rule has a different weight; the total score obtained after judging by all rules determines the triggered action and its intensity (e.g., coupon value). The pre-configured model is a pre-configured machine learning model trained for each event type. For example, if the event type is a loan application, a model predicting fraud risk or credit risk could be selected.
[0072] This embodiment allows business behavior characteristics to be input into a pre-configured rule set and a pre-configured model, respectively, to obtain rule output results and model output results. For example, taking the event type "shopping cart abandonment recovery" as an example, the corresponding pre-configured rule set may include the following rules:
[0073] / / Rule 1: Basic discounts for high-value users.
[0074] rule"high_value_base_coupon"
[0075] when{
[0076] user_segment=="VIP"&&cart_value>300
[0077] then{
[0078] base_coupon_value=20; / / VIP users with a shopping cart value > 300 receive a basic discount of 20 yuan.
[0079] }
[0080] }
[0081] / / Rule 2: Frequent users who forgo limited benefits.
[0082] rule"frequent_abandon_restriction"{when{
[0083] today_cart_abandon_count>=3
[0084] then{
[0085] restrict_coupon=true; / / If more than 3 coupons are forfeited today, coupon issuance will be restricted.
[0086] }
[0087] This embodiment can perform feature alignment on business behavior features, transform them into input feature vectors for a pre-configured model, and then input the input feature vectors into the pre-configured model to obtain the model output results.
[0088] Step S150: Based on the rule output and model output, generate recommended action instructions and execute the recommended action instructions.
[0089] For example, this embodiment can pre-set corresponding rule weights and model weights for the rule output and model output. Then, based on the rule weights and model weights, the rule output and model output are weighted to obtain a comprehensive result, and a recommended action instruction is generated based on the comprehensive result. In another example, this embodiment can also generate a recommended action instruction based on the rule output if the rule output indicates a rejection. In yet another example, this embodiment can also generate a recommended action instruction based on the model output if the probability score of the model output is higher than a predetermined probability threshold.
[0090] In the aforementioned data processing method, business behavior data of the target object is acquired, and the business behavior characteristics of the target object are determined. Based on the event type corresponding to the business behavior data, a corresponding pre-configured rule set and pre-configured model are selected. The business behavior characteristics are input into the pre-configured rule set and pre-configured model respectively to obtain rule output results and model output results. Based on the rule output results and model output results, recommended action instructions are generated and executed. This application utilizes rule sets and models configured according to different event types to process the business behavior characteristics of the target object in parallel. This allows for decision-making by combining rule output results and model output results, enabling the generated recommended action instructions to integrate the interpretability and determinism of the rule set with the predictive and discovery capabilities of the model, thereby improving the accuracy of the recommended actions.
[0091] In one exemplary embodiment, such as Figure 3 As shown, the business behavior characteristics of the target object are determined, including steps S210 to S230. Wherein:
[0092] Step S210: Generate real-time behavioral features based on business behavior data;
[0093] Step S220: Obtain the long-term behavioral characteristics of the target object. The long-term behavioral characteristics are used to describe the characteristics of the target object's business behavior within a predetermined time period.
[0094] Step S230: Determine business behavior characteristics based on real-time and long-term behavior characteristics.
[0095] Among them, long-term behavioral characteristics are used to describe the characteristics of the target object's business behavior within a predetermined period of time, such as the click rate of items added to the shopping cart in the last 7 days and the average order value of users in the last 30 days.
[0096] This embodiment can generate real-time behavioral features based on business behavior data. For example, this embodiment can perform statistical calculations on each business behavior in the business behavior data according to predetermined real-time behavioral statistical indicators to obtain real-time behavioral statistical indicators and their values as real-time behavioral features. This embodiment can also extract business behaviors from the business behavior data, sort the business behaviors to obtain a behavior sequence, and generate real-time behavioral features based on the behavior sequence. Long-term behavioral features can be determined based on the target object's historical behavior data within a predetermined time period. For example, this embodiment can perform statistical calculations on each historical behavior in the historical behavior data within the predetermined time period according to predetermined long-term behavioral statistical indicators to obtain long-term behavioral statistical indicators and their values as long-term behavioral features. This embodiment can also extract each historical behavior from the historical behavior data within the predetermined time period, sort the historical behaviors to obtain a historical sequence, and generate long-term behavioral features based on the historical sequence. Since long-term behavioral features are not easily changed in a short period, this embodiment directly obtains these long-term behavioral features during the process of determining the target object's business behavior features, realizing the reuse of long-term behavioral features while ensuring the real-time nature of real-time behavioral features, which is beneficial to improving the efficiency of obtaining features from multiple dimensions. Furthermore, this embodiment can use real-time behavioral features and long-term behavioral features as business behavioral features. This embodiment can also obtain user profiles and interest preferences (such as users' preference for specified categories) of the target object, and use the object-related features, real-time behavioral features and long-term behavioral features as business behavioral features.
[0097] In some embodiments, real-time behavioral characteristics are generated based on business behavior data, including:
[0098] Step S211: Extract business behaviors from business behavior data, sort the business behaviors, and obtain a behavior sequence;
[0099] Step S212: Determine the behavior weight of the business behavior based on its behavior type;
[0100] Step S213: According to the behavior weight, the business behaviors in the behavior sequence are weighted to obtain real-time behavior features.
[0101] For pre-configured models, to improve the accuracy of model output, this embodiment extracts business behaviors from business behavior data and sorts them to obtain a behavior sequence during the generation of real-time behavioral features. Then, based on the behavior type of each business behavior, its weight is determined. For example, this embodiment can pre-set corresponding behavior weights for different behavior types, forming a mapping relationship between behavior types and behavior weights. Then, based on the behavior type of a business behavior, the mapping relationship between behavior type and behavior weight can be queried to obtain the behavior weight of the business behavior. According to the behavior weight, each business behavior in the behavior sequence is weighted to obtain the real-time behavioral features.
[0102] It should also be noted that this embodiment can also extract historical behaviors from historical behavior data within a predetermined time period, sort the historical behaviors, and obtain a historical sequence. Then, based on the behavior type of the historical behaviors, the behavior weight of the historical behaviors is determined, and the historical behaviors in the historical sequence are weighted according to the behavior weights to obtain long-term behavior characteristics.
[0103] In this embodiment, real-time behavioral features are generated based on business behavior data to obtain long-term behavioral features of the target object. These long-term behavioral features describe the characteristics of the target object's business behavior over a predetermined period. Based on the real-time and long-term behavioral features, the business behavior characteristics are determined. Since long-term behavioral features are unlikely to change significantly in a short period, this embodiment directly obtains these long-term behavioral features during the determination of the target object's business behavior characteristics. This enables the reuse of long-term behavioral features while ensuring the real-time nature of the real-time behavioral features, thus improving the efficiency of obtaining features across multiple dimensions.
[0104] In one exemplary embodiment, such as Figure 4 As shown, the behavior weight of a business behavior is determined based on its behavior type, including steps S310 to S320. Wherein:
[0105] Step S310: Determine the initial weight of the business behavior based on its behavior type;
[0106] Step S320: Based on the freshness of the business behavior, the initial weight is decayed to obtain the behavior weight of the business behavior. The decay rate is negatively correlated with the freshness.
[0107] For real-time behavioral features, not only the type of business behavior affects the prediction results, but also the timeliness (freshness) of the business behavior. Therefore, to further improve the accuracy of the model output, this embodiment can determine the initial weight of the business behavior based on its behavior type, and then decay the initial weight based on the freshness of the business behavior to obtain the behavior weight. The decay rate is negatively correlated with freshness; that is, the higher the freshness of the business behavior (the closer it is to the current time), the smaller the decay rate of the initial weight, thus retaining a higher weight for behaviors closer to the current time. For example, this embodiment can introduce a time decay function (such as exponential decay) to decay the initial weight, so that the behavior weight is higher when the freshness is higher (the closer it is to the current time). For example, interest score = Σ(behavior weight * e^(-λ * time difference)), where e^() is an exponential function and λ is a specified coefficient value. This reflects the current interest of the target object better than the "number of views in the past 30 days" obtained by simple statistics.
[0108] It should also be noted that this embodiment can also extract historical behaviors from historical behavior data within a predetermined time period, sort the historical behaviors, and obtain a historical sequence. Then, based on the behavior type of the historical behaviors, an initial weight is determined. Next, based on the freshness of the historical behaviors, the initial weights of the historical behaviors are attenuated to obtain the behavior weights of the historical behaviors; the attenuation rate is negatively correlated with freshness. According to the behavior weights of the historical behaviors, each historical behavior in the historical sequence is weighted to obtain long-term behavioral characteristics.
[0109] In this embodiment, the initial weight of a business behavior is determined based on its behavior type, and then the initial weight is decayed based on the freshness of the business behavior to obtain the behavior weight of the business behavior. The decay rate is negatively correlated with the freshness, which can further improve the accuracy of the model output results.
[0110] In one exemplary embodiment, such as Figure 5 As shown, recommended action instructions are generated based on the rule output and model output, including steps S410 to S430. Wherein:
[0111] Step S410: Obtain the predetermined rule weights and model weights;
[0112] Step S420: Based on the rule weights and model weights, the rule output and model output are weighted to obtain a comprehensive result;
[0113] Step S430: Generate recommended action instructions based on the comprehensive results.
[0114] Among them, the rule weight is the weight set in advance for the rule output result, and the model weight is the weight set in advance for the model output result.
[0115] This embodiment can obtain predetermined rule weights and model weights, and then perform weighted processing on the rule output and model output based on the rule weights and model weights to obtain a comprehensive result. Based on the comprehensive result, a recommendation action instruction is generated. For example, in a coupon recommendation scenario, the rule output is base_coupon_value=20 (i.e., a basic coupon of 20 yuan). This 20 is normalized to the range of 0 to 1. For example, assuming the maximum coupon amount is 100 yuan, the normalized result is normalized=20 / 100=0.2. The model output is {purchase_intent_score:0.78} (predicting a 78% probability that the user will pay at this time). The predetermined rule weight is 0.3, and the model weight is 0.7. The rule output and model output are weighted to obtain a comprehensive result: final_score = (0.78 * 0.7) + (0.2 * 0.3) = 0.546 + 0.06 = 0.606. Mapping this comprehensive score to the coupon amount final_score * 100, coupon_value = 0.606 * 100 ≈ 60 (rounded). This generates the corresponding decision instruction: {action:"send_push", user_id:"user_123", coupon_value: 60, message: "Your added items are awaiting checkout! An exclusive 60 yuan coupon has been issued..."}. This executes the recommendation action instruction, issuing a 60 yuan coupon to user user_123 and pushing the message "Your added items are awaiting checkout! An exclusive 60 yuan coupon has been issued...".
[0116] In some embodiments, generating recommended action instructions based on the rule output and the model output further includes:
[0117] Step S510: If the rule output result indicates a rejection, generate a recommended action instruction based on the rule output result.
[0118] Among them, the rule output result represents rejection, which means that the rule output result is a rejection result for the event type.
[0119] Because the pre-configured rule set is deterministic, meaning that feasibility and rejection are clear, this embodiment can generate a recommended action instruction based on the rule output result if the rule output result indicates rejection. Taking the event type of shopping cart abandonment recovery as an example, if the rule output result is "restrict coupon issuance," it means the rule output result indicates rejection. This embodiment can then generate a recommended action instruction to refuse to issue coupons to the target object based on the rule output result of "restrict coupon issuance." Similarly, taking the event type of loan application as an example, if the rule output result is "loan rejection," it means the rule output result indicates rejection. This embodiment can then generate a recommended action instruction to refuse to grant loans to the target object based on the rule output result of "loan rejection."
[0120] In some embodiments, generating recommended action instructions based on the rule output and the model output further includes:
[0121] Step S610: If the probability score of the model output is higher than a predetermined probability threshold, generate recommended action instructions based on the model output.
[0122] While pre-configured rule sets possess determinism and interpretability, they are also relatively fixed. Therefore, in this embodiment, if the rule output does not indicate rejection, the probability score of the model output can be obtained. If the probability score of the model output is higher than a predetermined probability threshold, a recommended action instruction is generated based on the model output. Thus, this embodiment directly uses the model output to generate recommended action instructions when the confidence level of the model output is high, making the recommended action instructions more closely aligned with the business behavior characteristics of the target object.
[0123] like Figure 6 As shown, Figure 6 This is a system structure diagram of an embodiment of the data processing method of this application. Figure 6 A system architecture diagram of a computer device executing the data processing method of this application is described in one embodiment. The computer device system includes a data acquisition layer, a data processing layer, an intelligent operation layer, and a business application layer.
[0124] The data acquisition layer is used for end-to-end, standardized, and comprehensive data collection. It includes a front-end SDK (Software Development Kit), a back-end SDK, ETL / ELT (Extract Transform Load / Extract Load Transform) tools, and data lineage and governance. The front-end SDK (Web / App) automatically collects data such as page views, clicks, impressions, and performance metrics from the Web / App; defines custom business events; generates unique session IDs (IdentityDocument) to track user visits and manage user sessions; and performs data preprocessing, including basic field completion (such as URL (Uniform Resource Locator) parsing and device information) and data compression and encryption. The back-end SDK (Java / Go) is used for business event collection, focusing on events strongly related to server-side business logic, such as "payment successful" and "API (Application Programming Interface) call failed." The backend SDK also compensates for data loss or inaccuracies caused by network issues, caching, and other factors, ensuring data accuracy. It carries information difficult for the frontend to obtain, such as inventory status, coupon redemption results, and risk control results, enriching the business context. ETL / ELT tools can employ DataX or CDC (ChangeDataCapture) technologies to incrementally or fully synchronize data from business databases such as MySQL and PostgreSQL to the data warehouse, supporting various data sources including log files and third-party APIs, thus supporting heterogeneous data sources. CDC can also achieve real-time data synchronization by parsing database logs (such as MySQL binlog), ensuring low latency. Data lineage and governance can be achieved by recording the source, format, meaning, and lifecycle of data for metadata management; by tracing the complete data chain from generation to consumption to form a data lineage, facilitating fault location and impact analysis; by defining data quality rules (such as deduplication and non-empty statements) and conducting regular audits to achieve data quality monitoring; and by de-identifying and authorizing access to manage sensitive data.
[0125] The data processing layer is used for data storage and processing in various scenarios. It includes user behavior event streams, user profile libraries, feature libraries, data warehouses, real-time computing engines, batch computing engines, machine learning platforms, and a unified query engine.
[0126] User behavior event streams can utilize distributed message streaming platforms such as Kafka or Pulsar. As a unified access point for all real-time events, the user behavior event stream decouples the system and acts as a data hub. It can handle traffic peaks, protect downstream systems, and perform buffering and peak shaving. The user behavior event stream supports data replay by offset for code debugging or data recalculation, enabling data backtracking. The user profile library can use wide tables or tags. It integrates user data from various channels to form a 360° profile, providing a unified user view. The user profile library can store calculated user tags (such as "high-value user" or "maternal and infant preference"), enabling tag storage. It supports quick querying of all tags and attributes based on user ID, enabling fast lookup. The feature library can include real-time and offline features. It stores feature data prepared for machine learning models, serving as a machine learning feature center. The feature library avoids redundant feature calculations, ensuring consistency between online and offline features and enabling feature reuse. Real-time features can be stored in Redis for millisecond-level access; offline features can be stored in Hive / data warehouses for model training. The data warehouse can utilize Hive or ClickHouse, storing all historical data and supporting large-scale batch analysis. It constructs subject-domain data models (such as traffic, transactions, and users) based on dimensional modeling theory and supports flexible and complex SQL analysis. The real-time computing engine can be Flink, consuming Kafka data in real-time with processing latency in the millisecond to second range, enabling streaming processing. It supports real-time ETL, session generation, real-time aggregation (such as UV (Unique Visitors) in the past hour), and CEP (Complex Event Processing). It maintains intermediate states (such as window counts and the latest user session) to ensure computational accuracy and manage setup and execution. The batch computing engine can be Spark, processing T+1 full datasets. It handles complex calculations and large data volumes, enabling batch processing. It performs historical data aggregation, user tag calculation, machine learning feature engineering, and model training sample preparation. The batch computing engine can collaborate with the real-time computing engine to correct minor errors in real-time calculations. The machine learning platform may include feature engineering, providing a graphical interface for feature extraction, transformation, and filtering. Model training supports distributed training and hyperparameter tuning across multiple frameworks (TensorFlow, PyTorch, XGBoost); model management handles version control and performance evaluation; and model services deploy models as highly available API services (online inference).The unified query engine can be either Presto or Trino. It provides a unified SQL interface that can query multiple data sources such as Hive, ClickHouse, and MySQL simultaneously without data movement, enabling federated queries. It can also meet the needs of data analysts and data scientists to flexibly explore data and achieve ad-hoc analysis.
[0127] The intelligent operations layer is used to productize and service data capabilities, directly empowering business applications. The intelligent operations layer includes a decision engine, a real-time API gateway, a workflow engine, and data product APIs. The decision engine, as the system's brain, can monitor real-time events in Kafka (such as "user adds to cart") to achieve event-driven operations; it can obtain real-time user context from feature and profile libraries to achieve feature queries; it can execute pre-configured rule sets ("IF...THEN...") and call machine learning models for prediction to achieve intelligent decision-making; it can synthesize rule outputs and model outputs to make a final decision (such as "issue a 10 yuan coupon"), achieving result arbitration. The real-time API gateway, as the data exit point, provides low-latency data query interfaces for front-end applications; it can receive a request from the front end, call multiple underlying services in parallel (such as user profiles and recommendation results), merge the results, and return them to achieve query aggregation; the real-time API gateway can ensure data security and service stability through authentication and rate limiting. Workflow engines can orchestrate and schedule complex, multi-step operational actions, enabling task orchestration, such as "successful user registration - immediately issue new user gift pack - if no order is placed after 24 hours - send reminder SMS". Workflow engines can ensure the reliable execution of long-cycle tasks through persistence and retries. Data product APIs can package data capabilities into independent, reusable API products, such as user tag APIs, product recommendation APIs, and similar user group APIs.
[0128] The business application layer comprises the end-user applications that directly generate business value. This layer includes real-time personalized recommendations, an automated marketing platform, a customer service system, and a data insight platform. Real-time personalized recommendations display personalized content (products, news, videos) to users on the App / Web page in real time. The automated marketing platform automatically executes marketing campaigns, such as reaching dormant users and distributing coupons. The customer service system allows customer service personnel to quickly understand user information and historical behavior when communicating with users. The data insight platform generates data reports and dashboards, supporting self-service analysis by business personnel.
[0129] like Figure 7 As shown, Figure 7This is a schematic diagram illustrating a scenario involved in an embodiment of the data processing method of this application. Taking a shopping cart abandonment recovery event as an example, the business scenario is that after a user adds an item to their shopping cart, if they do not pay within a certain period of time (e.g., 30 minutes), the system automatically determines whether to push a coupon and what denomination of coupon to push, in order to promote conversion.
[0130] S1. Event Triggering:
[0131] User user_123 added product_A (worth 500 yuan) to their shopping cart, and the front end reported the add_to_cart event to Kafka.
[0132] The real-time computing engine (Flink) consumes the event and sets a 30-minute delay trigger (using Flink's TimerService).
[0133] Thirty minutes later, Flink generates a timer_trigger:cart_abandonment event containing information such as user_id=user_123, product_id=product_A, and cart_value=500, and sends it back to Kafka.
[0134] S2. Decision engine starts:
[0135] The event listener detects the timer_trigger:cart_abandonment event, identifies its type as "cart abandonment recovery", and routes it to the predefined cart_abandonment_flow decision process.
[0136] S3. Parallel Feature Acquisition:
[0137] (1) After receiving the event, the decision arbitrator initiates a parallel request to the unified feature service to obtain the business behavior features of user_123:
[0138] Real-time feature: last_30min_active (whether the user has been active in the last 30 minutes - retrieved from Redis, in milliseconds).
[0139] Near-line feature: today_cart_abandon_count (number of times a user abandoned their shopping cart today - ClickHouse query, in seconds).
[0140] Offline features:
[0141] user_segment(user value level, such as "VIP" - Hive / feature library).
[0142] historical_purchase_rate_after_coupon (user's historical purchase conversion rate after using coupons - feature library).
[0143] product_category (the category of product_A - product database).
[0144] product_profit_margin(profit margin of product_A - product database).
[0145] (2) The feature service queries different storage in parallel and returns the merged results to the arbitrator.
[0146] S4. Parallel Inference: The decision arbitrator simultaneously sends feature data to two units:
[0147] (1) Rule execution unit:
[0148] Select the pre-configured rule set cart_recovery_rules_v2 corresponding to the shopping cart abandonment recovery event.
[0149] Rule output: {base_coupon_value:20, restrict_coupon:false}.
[0150] (2) Model reasoning unit:
[0151] Invoke the pre-configured model corresponding to the shopping cart abandonment and recovery event, and use the purchase intent prediction model service (purchase_intent_model_v3).
[0152] Send the feature vectors (e.g., user_segment=VIP, cart_value=500, historical_purchase_rate_after_coupon=0.65, ...) to the model service.
[0153] Model output: {purchase_intent_score: 0.78} (The model predicts that the probability of the user making payment at this time is 78%).
[0154] S5. Decision Arbitration:
[0155] (1) The decision arbitrator receives the rule output results from the rule unit and the model output results from the model unit.
[0156] (2) Weighted arbitration strategy:
[0157] final_score=(purchase_intent_score*0.7)+(rule_base_coupon_value_normalized*0.3).
[0158] The base_coupon_value=20 of the rule output is normalized to the range of 0-1 (for example, if the maximum coupon is 100 yuan, then normalized=20 / 100=0.2).
[0159] final_score=(0.78*0.7)+(0.2*0.3)=0.546+0.06=0.606.
[0160] (3) Threshold rule:
[0161] IF final_score>=0.6THENaction="send_coupon"ANDcoupon_value=final_score*100 (Map the score to the coupon amount).
[0162] coupon_value = 0.606 * 100 ≈ 60 (rounded to the nearest integer).
[0163] (4) Check the restriction rules of the pre-configured rule set: restrict_coupon=false, therefore there is no restriction.
[0164] (5) Final decision: {action:"send_push", user_id:"user_123", coupon_value:60, message:"The items you added to your cart are waiting for settlement! Your exclusive 60 yuan coupon has been issued..."}.
[0165] S6. Closed-loop execution:
[0166] The decision engine publishes the final recommended action instructions to the marketing_actions topic in Kafka.
[0167] The automated marketing platform subscribes to this topic and, upon receiving the instruction, immediately invokes the push service to send a push notification with a 60 yuan coupon to user_123.
[0168] Taking a loan application as an example, the business scenario involves comprehensively assessing the fraud risk and credit risk of a user after the user submits a loan application, and then deciding whether to approve the loan and the amount approved.
[0169] S1. Event Triggering:
[0170] User user_456 submitted a loan application of 10,000 yuan on the App. The event loan_application was reported to Kafka, including user_id, loan_amount, device_id, ip_address, etc.
[0171] S2. Decision engine starts:
[0172] The event listener listens for the loan_application event, identifies its high timeliness requirement, and routes it to the loan_approval_flow decision process (with a timeout set, such as 800ms).
[0173] S3. Parallel Feature Acquisition:
[0174] The decision arbitrator initiates parallel feature requests:
[0175] Real-time features: current_ip_risk_level (risk score of the current IP - real-time risk control system), device_velocity (number of recent requests for this device - Redis counter).
[0176] Near-line / offline features: user_credit_score (user credit score - credit reporting system / feature library), user_historical_default_rate (user historical default rate - data warehouse), blacklist_check (whether the user is on the blacklist - risk control database).
[0177] S4. Parallel Reasoning:
[0178] (1) Rule execution unit:
[0179] Execute loan_risk_rules_v1. Example rule (strong rule / veto):
[0180] Assuming the user is not on the blacklist, the IP risk is moderate, but the device request count is 15, the rule engine outputs: {risk_flag:"HIGH_DEVICE_VELOCITY"} (no rejection triggered).
[0181] (2) Model reasoning unit:
[0182] Two pre-configured models (fraud prediction model + credit assessment model) are invoked in parallel:
[0183] Fraud prediction model: Input features such as device_velocity=15, current_ip_risk_level="MEDIUM", device_id_history, etc.
[0184] The fraud prediction model output is: fraud_probability=0.25 (fraud probability 25%).
[0185] Credit assessment model: Input features such as user_credit_score=650, loan_amount=10000, user_income (if any), user_historical_default_rate=0.05.
[0186] The credit assessment model outputs: default_probability=0.08 (8% probability of default) and recommended_amount=8000 (recommended credit limit of 8000 yuan).
[0187] S5. Decision Arbitration:
[0188] (1) The decision arbitrator receives all rule outputs and model outputs.
[0189] (2) Applying a tiered arbitration strategy:
[0190] First layer: Strong rule filtering: Check if the rule output has decision="REJECT"?, that is, whether the rule output indicates rejection. If not, proceed to the next layer.
[0191] Second layer: Fraud risk assessment:
[0192] Configuration strategy: IF fraud_probability > 0.3 THENREJECT. In this example, 0.25 < 0.3, so it is not rejected. However, fraud_probability = 0.25 and risk_flag = HIGH_DEVICE_VELOCITY indicate a high risk.
[0193] Third layer: Credit risk and credit limit decision:
[0194] Core objective: To maximize success rate and returns while controlling risk (default_probability).
[0195] Arbitration strategy:
[0196] Basic credit limit = Model recommended credit limit (8000).
[0197] The recommended amount is adjusted based on the output of the fraud prediction model: final_amount = base_amount * (1 - fraud_probability * risk_weight).
[0198] Assuming risk_weight=0.5, then final_amount=8000*(1-0.25*0.5)=8000*0.875=7000.
[0199] Check if final_amount (final recommended amount) meets the minimum loan amount requirement (e.g., if a user applies for 10,000, but final_amount=7,000 > minimum amount 5,000), then approve the application but reduce the amount.
[0200] (3) Final decision: {decision:"APPROVE", approved_amount:7000, reason:"Approved with amount reduction due to elevated device risk"}, grant a loan of 7000 yuan to user_456.
[0201] S6. Closed-loop execution:
[0202] The decision engine returns the approval result {APPROVE, 7000} directly to the loan application submission interface via a real-time API gateway (users typically see the result within a few seconds).
[0203] At the same time, decision logs are written to the database and Kafka for subsequent auditing, model monitoring and optimization.
[0204] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0205] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.
[0206] In one exemplary embodiment, such as Figure 8 As shown, a data processing apparatus is provided, including: an acquisition module 710, a selection module 720, an output module 730, and a decision module 740, wherein:
[0207] The acquisition module 710 is used to acquire the business behavior data of the target object and determine the business behavior characteristics of the target object;
[0208] Select module 720, which is used to select the corresponding pre-configured rule set and pre-configured model based on the event type corresponding to the business behavior data;
[0209] The output module 730 is used to input business behavior features into the pre-configured rule set and the pre-configured model respectively, and obtain the rule output results and the model output results.
[0210] The decision module 740 is used to generate recommended action instructions based on the rule output results and model output results, and to execute the recommended action instructions.
[0211] In some embodiments, the acquisition module 710 is further configured to:
[0212] Based on business behavior data, real-time behavior features are generated, and long-term behavior features of the target object are obtained. Long-term behavior features are used to describe the characteristics of the target object's business behavior within a predetermined time period. Based on real-time behavior features and long-term behavior features, business behavior features are determined.
[0213] In some embodiments, the acquisition module 710 is further configured to:
[0214] Business behaviors are extracted from business behavior data, sorted to obtain a behavior sequence, and the behavior weights of the business behaviors are determined according to their behavior types. The business behaviors in the behavior sequence are then weighted according to their weights to obtain real-time behavior features.
[0215] In some embodiments, the acquisition module 710 is further configured to:
[0216] Based on the behavior type of the business behavior, the initial weight of the business behavior is determined. Based on the freshness of the business behavior, the initial weight is decayed to obtain the behavior weight of the business behavior. The decay rate is negatively correlated with the freshness.
[0217] In some embodiments, the decision module 740 is further configured to:
[0218] Obtain the predetermined rule weights and model weights. Based on the rule weights and model weights, perform weighted processing on the rule output and model output to obtain a comprehensive result. Based on the comprehensive result, generate recommended action instructions.
[0219] In some embodiments, the decision module 740 is further configured to:
[0220] If the rule output indicates a rejection, a recommended action instruction is generated based on the rule output.
[0221] In some embodiments, the decision module 740 is further configured to:
[0222] If the probability score of the model output is higher than a predetermined probability threshold, a recommended action instruction is generated based on the model output.
[0223] Each module in the aforementioned data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0224] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores business behavior characteristics. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.
[0225] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0226] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the embodiments described above.
[0227] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above embodiments.
[0228] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above embodiments.
[0229] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0230] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0231] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0232] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data processing method, characterized in that, The method includes: Obtain business behavior data of the target object and determine the business behavior characteristics of the target object; Based on the event type corresponding to the business behavior data, select the corresponding pre-configured rule set and pre-configured model; The business behavior features are input into the pre-configured rule set and the pre-configured model respectively to obtain the rule output results and the model output results; Based on the rule output and the model output, a recommended action instruction is generated and executed.
2. The method according to claim 1, characterized in that, Determining the business behavior characteristics of the target object includes: Based on the aforementioned business behavior data, real-time behavioral characteristics are generated; Obtain long-term behavioral characteristics of the target object, which are used to describe the characteristics of the target object's business behavior within a predetermined time period; Based on the real-time behavioral characteristics and the long-term behavioral characteristics, business behavioral characteristics are determined.
3. The method according to claim 2, characterized in that, The generation of real-time behavioral features based on the business behavior data includes: Business behaviors are extracted from the business behavior data, and the business behaviors are sorted to obtain a behavior sequence; The behavior weight of the business behavior is determined based on the behavior type of the business behavior; According to the stated behavior weights, each business behavior in the behavior sequence is weighted to obtain real-time behavior features.
4. The method according to claim 3, characterized in that, Determining the behavior weight of a business behavior based on its behavior type includes: Determine the initial weight of the business behavior based on its behavior type; Based on the freshness of the business behavior, the initial weight is decayed to obtain the behavior weight of the business behavior, and the magnitude of the decay is negatively correlated with the freshness.
5. The method according to claim 1, characterized in that, The step of generating recommended action instructions based on the rule output results and the model output results includes: Obtain the predetermined rule weights and model weights; Based on the rule weights and the model weights, the rule output and the model output are weighted to obtain a comprehensive result; Based on the comprehensive results, recommended action instructions are generated.
6. The method according to any one of claims 1 to 5, characterized in that, The step of generating recommended action instructions based on the rule output results and the model output results further includes: If the rule output indicates a rejection, a recommended action instruction is generated based on the rule output.
7. The method according to claim 6, characterized in that, The step of generating recommended action instructions based on the rule output results and the model output results further includes: If the probability score of the model output is higher than a predetermined probability threshold, a recommended action instruction is generated based on the model output.
8. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire business behavior data of the target object and determine the business behavior characteristics of the target object; The selection module is used to select the corresponding pre-configured rule set and pre-configured model based on the event type corresponding to the business behavior data; The output module is used to input the business behavior features into the pre-configured rule set and the pre-configured model respectively, and obtain the rule output results and the model output results; The decision module is used to generate recommended action instructions based on the rule output results and the model output results, and to execute the recommended action instructions.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. 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 to 7.