Data processing method, device and system
Through the combination of state machine and stream computing engine, user feature vectors are updated in real time and marketing rules are matched, which solves the problem of data processing delay in the prior art, real-time response and efficient data processing are realized.
Patent Information
- Application Number
- CN202311332496.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
AI Technical Summary
Existing digital marketing technologies cannot achieve real-time data processing, resulting in delayed response to marketing strategies and inability to update user profiles and marketing rules in a timely manner.
By obtaining pre-configured rules, generating execution scripts, determining the execution logic of the state machine instance, updating the feature vector in response to user behavior events, and transmitting it to the stream computing engine for matching and disposal policy execution.
Real-time response to user behavior events is achieved, meet business needs, and improve data processing efficiency and timeliness of marketing strategies.
Smart Images

Figure CN119829637A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital marketing technology, and in particular to a data processing method, device and system. Background Art
[0002] In the current digital marketing scenario, the server configures various marketing rules to match the user portraits formed by big data mining, and then executes corresponding marketing strategies such as sending reminders and issuing coupons. Due to the need to process massive amounts of user data and the constraints of data processing efficiency, this marketing method cannot be processed in real time and generally requires one or more days of calculation to complete. In addition, updates to marketing rules and user portraits cannot be responded to in a timely manner in marketing strategies for similar reasons, and require a delay of one or more days, resulting in an inability to meet business needs. Summary of the invention
[0003] In view of this, embodiments of the present invention provide a data processing method, device and system, which can respond to user behavior events in real time to meet business needs.
[0004] To achieve the above objective, according to one aspect of the present invention, a data processing method is provided.
[0005] The data processing method of an embodiment of the present invention includes: obtaining pre-configured rules including trigger conditions and disposal strategies, generating an execution script corresponding to the rules, and using the execution script to determine the execution logic of a preset state machine instance corresponding to the rules; in response to monitoring a behavior event of a target user, transmitting the behavior event and a pre-stored historical feature vector of the target user to the state machine instance, updating the historical feature vector of the target user to a current feature vector based on the state machine instance and the behavior event, and transmitting the current feature vector to a preset stream computing engine; matching the current feature vector with the trigger condition in the rule based on the stream computing engine; and in the event of a successful match, executing the disposal strategy in the matching rule on the target user.
[0006] Optionally, the trigger condition is a discriminant for user portrait data and user behavior data, and the historical feature vector of the target user is stored in a preset first cache module; and the method further includes: constructing portrait data of multiple users based on an offline data warehouse that stores user data, screening out the target user from the multiple users according to the portrait data, and determining the portrait feature dimension and the behavior feature dimension of the target user according to the trigger condition; obtaining the historical behavior data of the target user from a preset second cache module, determining the values of the target user in the portrait feature dimension and the behavior feature dimension using the obtained historical behavior data and the portrait data of the target user, obtaining the initial feature vector of the target user and storing it in the first cache module.
[0007] Optionally, the user behavior type included in the trigger condition is consistent with the type of the behavior event; and in response to monitoring the behavior event of the target user, the behavior event and the pre-stored historical feature vector of the target user are transmitted to the state machine instance, including: transmitting the behavior event and the historical feature vector to the state machine instance corresponding to the rule whose trigger condition includes the type of the behavior event.
[0008] Optionally, updating the historical feature vector of the target user to a current feature vector based on the state machine instance and the behavior event includes: changing the value of the behavior feature dimension corresponding to the behavior event in the historical feature vector according to the behavior event to obtain the current feature vector.
[0009] Optionally, the rule is stored in a preset third cache module after being configured; and the matching of the current feature vector with the trigger condition in the rule based on the stream computing engine includes: obtaining a corresponding rule from the third cache module according to a pre-received rule identifier to perform the matching.
[0010] Optionally, the method further includes: in response to monitoring a change in any rule, synchronizing the changed rule in a third cache module; generating an execution script corresponding to the changed rule, and using the execution script to determine the execution logic of the state machine instance corresponding to the changed rule; adjusting the behavioral feature dimension based on the changed rule and the state machine instance corresponding to the changed rule, and determining the current feature vector of the target user according to the adjusted behavioral feature dimension.
[0011] Optionally, the method further comprises: in response to monitoring a change in the portrait data of any target user, adjusting a current feature vector of the target user based on the state machine instance and the changed portrait data.
[0012] Optionally, generating the execution script corresponding to the rule includes: generating the execution script using a pre-written script template; the trigger condition represents at least one of the following judgments: whether the user has preset portrait data, whether the user has performed a preset behavior within a preset time period, whether the user has performed a preset behavior sequence within a preset time period, and whether the user's behavior statistics within the preset time period meet preset requirements.
[0013] To achieve the above objective, according to another aspect of the present invention, a data processing device is provided.
[0014] The data processing device of an embodiment of the present invention may include: a state machine validation unit, used to obtain pre-configured rules including trigger conditions and disposal strategies, generate an execution script corresponding to the rules, and use the execution script to determine the execution logic of a preset state machine instance corresponding to the rules; a feature vector calculation unit, used to: in response to monitoring a behavior event of a target user, transmit the behavior event and a pre-stored historical feature vector of the target user to the state machine instance, update the historical feature vector of the target user to a current feature vector based on the state machine instance and the behavior event, and transmit the current feature vector to a preset stream computing engine; a matching unit, used to match the current feature vector with the trigger condition in the rule based on the stream computing engine; and in case of a successful match, execute the disposal strategy in the matching rule on the target user.
[0015] To achieve the above objective, according to another aspect of the present invention, a data processing system is provided.
[0016] The data processing system of an embodiment of the present invention may include: a rule management platform, a script generation module, at least one state machine instance and a stream computing engine; wherein the rule management platform executes the configuration of rules including trigger conditions and disposal strategies, and transmits the configured rules to the script generation module; the script generation module generates an execution script corresponding to the rule and transmits it to the state machine instance corresponding to the rule, and the state machine instance uses the execution script to determine the execution logic; after receiving the behavior event of the target user, the state machine instance obtains the historical feature vector of the target user, updates the historical feature vector of the target user to the current feature vector based on the behavior event and transmits it to the stream computing engine; the stream computing engine matches the current feature vector with the trigger condition in the rule; if the match is successful, the disposal strategy in the matching rule is executed on the target user.
[0017] To achieve the above objective, according to another aspect of the present invention, an electronic device is provided.
[0018] An electronic device of the present invention comprises: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method provided by the present invention.
[0019] To achieve the above objective, according to yet another aspect of the present invention, a computer-readable storage medium is provided.
[0020] A computer-readable storage medium of the present invention stores a computer program, which implements the data processing method provided by the present invention when executed by a processor.
[0021] According to the technical solution of the present invention, the embodiments of the above invention have the following advantages or beneficial effects:
[0022] After obtaining the rules configured by the staff, the server uses the script template to generate the execution script corresponding to the rule and then uses the execution script to determine the execution logic of the corresponding state machine instance. After that, after monitoring the specific behavior event of the target user, the server transmits the behavior event and the historical feature vector of the target user to the above state machine instance. The state machine instance updates the historical feature vector of the target user to the current feature vector according to the above behavior event and transmits it to the stream computing engine. The stream computing engine matches the current feature vector with the trigger condition in the rule, and executes the disposal strategy in the matching rule for the target user if the match is successful. Through the system architecture with the state machine and the stream computing engine as the main body, the initialization configuration of the state machine instance by the execution script, the real-time calculation of the user feature vector of the state machine instance and the rule matching of the stream computing engine, the server has efficient data processing capabilities and the ability to respond quickly to user behavior. When facing massive user data, it can calculate user features in real time or quasi-real time and complete rule matching to achieve business purposes. When the rules or user portraits are updated, they can also respond to the user feature calculation and rule matching process in real time or quasi-real time, thereby meeting the business requirements for real-time performance and improving business execution effects.
[0023] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0025] Figure 1 It is a schematic diagram of the main steps of the data processing method in an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of specific execution steps of the data processing method in an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of execution steps under rule changes in an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of components of a data processing device in an embodiment of the present invention;
[0029] Figure 5 is a schematic diagram of the architecture of a data processing system in an embodiment of the present invention;
[0030] Figure 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
[0031] Figure 7 It is a schematic diagram of the structure of an electronic device used to implement the data processing method in the embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0033] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.
[0034] Figure 1 It is a schematic diagram of main steps of the data processing method according to an embodiment of the present invention.
[0035] like Figure 1 As shown, the data processing method of the embodiment of the present invention can be specifically performed according to the following steps:
[0036] Step S101: obtaining pre-configured rules including trigger conditions and disposal strategies, generating execution scripts corresponding to the rules, and using the execution scripts to determine the execution logic of the preset state machine instance corresponding to the rules.
[0037] In an embodiment of the present invention, an operator can manually configure rules in a preset interface, and the rules can be stored in a preset third cache module after being configured. The rules may include trigger conditions and disposal rules, and the trigger conditions are discriminants for user portrait data and user behavior data, which can characterize at least one of the following discriminants: whether the user has preset portrait data, whether the user has performed preset behaviors (such as browsing, searching, adding to a shopping cart, submitting an order, etc.) in a preset time period, whether the user has performed a preset behavior sequence (such as browsing, searching, adding to a shopping cart in sequence) in a preset time period, and whether the user's behavior statistics in a preset time period meet the preset requirements (such as whether to search three times, whether to search for a specific keyword, and whether the time span between two searches is less than a threshold). The disposal strategy can be a certain action for the user, such as issuing coupons, sending reminder messages, etc. The above execution script is an automated running program formed based on the corresponding rules. In actual applications, the server can generate an execution script corresponding to any rule based on a pre-written script template.
[0038] In this step, the state machine instance is used to perform the automatic generation and update of massive user feature vectors, and the state machine is a finite state machine. In the field of computer technology, a finite state machine can control the state transfer through the relationship between state, event and action, where the state refers to a condition of an object in its life cycle, and an object in a specific state must meet certain conditions, perform certain actions or wait for certain events. Events occupy a certain position in time and space, and have a specific meaning for finite state machines. Events usually cause state changes, prompting the state machine to transfer from one state to another. Actions refer to atomic operations that can be executed in a state machine (i.e., operations that will not be interrupted by the thread scheduling mechanism).
[0039] The relationship between state machine instances and rules can be one-to-one, one-to-many, many-to-one, many-to-many, etc. State machine instances can be classified according to the rules they carry. After any rule configuration is completed, the server can generate a corresponding execution script and use the execution script to determine the execution logic of the corresponding state machine instance, so that the state machine instance can execute the execution logic consistent with the corresponding rule. The above execution logic refers to the state machine's state transfer method, event handling method, and action implementation method.
[0040] Step S102: In response to monitoring a behavior event of a target user, the behavior event and a pre-stored historical feature vector of the target user are transmitted to a state machine instance, the historical feature vector of the target user is updated to a current feature vector based on the state machine instance and the behavior event, and the current feature vector is transmitted to a preset stream computing engine.
[0041] In this step, the behavior event refers to some specific user behaviors, and the type of the behavior event is consistent with the type of user behavior involved in the trigger condition in the rule. Before executing this step to calculate the user's current feature vector, the server can first perform the following steps to obtain the user's initial feature vector, and subsequent user feature vectors can be obtained based on the initial feature vector.
[0042] The server first constructs the portrait data of multiple users based on the offline data warehouse that stores user data, and selects the target user from multiple users according to the portrait data to form the user range for executing subsequent steps, and then determines the portrait feature dimension and behavior feature dimension of the target user according to the trigger condition, that is, determines the portrait feature dimension according to the user portrait data in the trigger condition, and determines the behavior feature dimension according to the user behavior data in the trigger condition. Thereafter, the server obtains the historical behavior data of the target user from the preset second cache module, and uses the obtained historical behavior data and the portrait data of the target user to determine the values of the target user in the portrait feature dimension and the behavior feature dimension, thereby obtaining the initial feature vector of the target user and storing it in the first cache module. The first cache module, the second cache module, and the third cache module can be implemented based on Redis and the like. In actual applications, the state machine can obtain the user's latest historical feature vector from the first cache module, and after updating it based on the obtained historical feature vector, synchronize the updated current feature vector in the first cache module.
[0043] In step S102, after monitoring the behavior event of the target user, the server obtains the latest historical feature vector of the target user from the first cache module, and transmits the behavior event and the above historical feature vector to the state machine instance, that is, the behavior event and the historical feature vector are transmitted to the state machine instance corresponding to the rule whose trigger condition includes the type of the above behavior event. Thereafter, the state machine instance updates the historical feature vector of the target user to the current feature vector based on the above behavior event, and transmits the current feature vector to the preset stream computing engine. Preferably, after receiving the above behavior event and the historical feature vector of the target user, the state machine instance can change the value of the behavior feature dimension corresponding to the behavior event in the historical feature vector according to the behavior event, thereby obtaining the current feature vector of the target user. Thereafter, the state machine instance synchronizes the current feature vector of the target user to the first cache module.
[0044] Step S103: Match the current feature vector with the trigger condition in the rule based on the stream computing engine; if the match is successful, execute the disposal strategy in the matching rule for the target user.
[0045] In this step, the stream computing engine (which can be implemented based on frameworks such as Flink and Spark-Streaming) matches the current feature vector of the target user with the trigger condition in the rule; if the match is successful, the disposal strategy in the matching rule is executed on the target user, thereby completing the entire data processing process. In actual applications, the stream computing engine obtains the corresponding rule from the third cache module according to the pre-received rule identifier to perform the above matching.
[0046] In a specific application, when the server detects that any rule has been changed, the changed rule will be synchronized in the third cache module, an execution script corresponding to the changed rule will be generated, and the execution script will be used to determine the execution logic of the state machine instance corresponding to the changed rule. Thereafter, the corresponding state machine adjusts the behavioral feature dimension based on the changed rule and the state machine instance corresponding to the changed rule, determines the current feature vector of the target user based on the adjusted behavioral feature dimension, and the stream computing engine matches the adjusted user's current feature vector with the rule. When the server detects that the portrait data of any target user has been changed, the state machine instance uses the changed portrait data to adjust the current feature vector of the target user, and the stream computing engine matches the adjusted user's current feature vector with the rule.
[0047] Figure 2 is a schematic diagram of specific execution steps of the data processing method in an embodiment of the present invention, see Figure 2 In step S201, the server constructs user portrait data based on the offline data warehouse; in step S202, the server screens the target user based on the user portrait data; in step S203, the server determines the target user's portrait feature dimensions and behavior feature dimensions based on the triggering conditions of each rule; in step S204, the server obtains the target user's historical behavior data; in step S205, the server uses the target user's historical behavior data and portrait data to adjust the target user's values in each dimension; in step S206, the server obtains the target user's initial feature vector and caches it; in step S207, the server The end obtains the configured rules and generates a corresponding execution script; in step S208, the server uses the execution script to determine the execution logic of the corresponding state machine instance; in step S209, the server monitors the behavior events of the target user; in step S210, the server obtains the historical feature vector of the target user; in step S211, the state machine instance adjusts the historical vector of the target user according to the behavior events of the target user to obtain the current vector of the target user; in step S212, the stream computing engine matches the rules with the user's current feature vector; in step S213, when the match is successful, the server executes the corresponding disposal strategy.
[0048] Figure 3is a schematic diagram of the execution steps under the rule change in the embodiment of the present invention, see Figure 3 In step S301, the server monitors that the rule has been changed; in step S302, the server synchronizes the changed rule to the cache; in step S303, the server generates an execution script corresponding to the changed rule; in step S304, the server uses the execution script to determine the execution logic of the corresponding state machine instance; in step S305, the state machine instance adjusts the value of the target user in the behavior feature dimension based on the changed rule; in step S306, the state machine instance determines the current feature vector of the target user according to the adjusted behavior feature dimension value.
[0049] In the technical solution of the embodiment of the present invention, after obtaining the rules configured by the staff, the server generates the execution script corresponding to the rules using the script template and then determines the execution logic of the corresponding state machine instance using the execution script. After that, after monitoring the specific behavior event of the target user, the server transmits the behavior event and the historical feature vector of the target user to the above state machine instance. The state machine instance updates the historical feature vector of the target user to the current feature vector according to the above behavior event and transmits it to the stream computing engine. The stream computing engine matches the current feature vector with the trigger condition in the rule, and executes the disposal strategy in the matching rule for the target user in the case of successful matching. Through the system architecture with the state machine and the stream computing engine as the main body and the initialization configuration of the state machine instance by the execution script, the real-time calculation of the user feature vector of the state machine instance and the rule matching of the stream computing engine, the server has efficient data processing capabilities and rapid response capabilities to user behaviors. When facing massive user data, it can calculate user features in real time or quasi-real time and complete rule matching to achieve business purposes, and when the rules or user portraits are updated, it can also respond to the user feature calculation and rule matching process in real time or quasi-real time, thereby meeting the real-time requirements of the business and improving the business execution effect.
[0050] It should be noted that in the technical solution of the present invention, the collection, collection, update, analysis, processing, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Take necessary measures for user personal information to prevent illegal access to user personal information data and maintain user personal information security, network security and national security. The server can only collect data such as user behavior events in order to better provide services based on the technical solution of the present invention after obtaining the user's consent. If the user does not agree to the server collecting its relevant data, the server will not perform data collection.
[0051] For the above-mentioned method embodiments, for the convenience of description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, and some steps can actually be performed in other orders or simultaneously. In addition, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary to implement the present invention.
[0052] In order to better implement the above-mentioned solution of the embodiment of the present invention, relevant devices for implementing the above-mentioned solution are also provided below.
[0053] See also Figure 4 As shown, the data processing device 400 provided by the embodiment of the present invention may include: a state machine validation unit 401, a feature vector calculation unit 402 and a matching unit 403.
[0054] Among them, the state machine validation unit 401 can be used to obtain pre-configured rules including trigger conditions and disposal strategies, generate an execution script corresponding to the rule, and use the execution script to determine the execution logic of the preset state machine instance corresponding to the rule; the feature vector calculation unit 402 can be used to: in response to monitoring the behavior event of the target user, transmit the behavior event and the pre-stored historical feature vector of the target user to the state machine instance, update the historical feature vector of the target user to the current feature vector based on the state machine instance and the behavior event, and transmit the current feature vector to the preset stream computing engine; the matching unit 403 can be used to match the current feature vector with the trigger condition in the rule based on the stream computing engine; in the case of successful matching, execute the disposal strategy in the matching rule on the target user.
[0055] In an embodiment of the present invention, the trigger condition is a discriminant for user portrait data and user behavior data, and the historical feature vector of the target user is stored in a preset first cache module; and the device 400 may further include: an initial calculation unit, used to: construct portrait data of multiple users based on an offline data warehouse storing user data, filter out the target user from the multiple users according to the portrait data, and determine the portrait feature dimension and behavior feature dimension of the target user according to the trigger condition; obtain the historical behavior data of the target user from a preset second cache module, use the obtained historical behavior data and the portrait data of the target user to determine the values of the target user in the portrait feature dimension and the behavior feature dimension, obtain the initial feature vector of the target user and store it in the first cache module.
[0056] In a specific application, the user behavior type included in the trigger condition is consistent with the type of the behavior event; and the feature vector calculation unit 402 can be further used to: transmit the behavior event and the historical feature vector to the state machine instance corresponding to the rule whose trigger condition includes the type of the behavior event.
[0057] In practical applications, the feature vector calculation unit 402 may be further configured to: modify the value of the behavior feature dimension corresponding to the behavior event in the historical feature vector according to the behavior event to obtain the current feature vector.
[0058] Preferably, the rules are stored in a preset third cache module after being configured; and the matching unit 403 may be further configured to: obtain corresponding rules from the third cache module according to the pre-received rule identifier to perform the matching.
[0059] As a preferred solution, the device 400 may further include: an update processing unit, used to: in response to monitoring a change in any rule, synchronize the changed rule in the third cache module; generate an execution script corresponding to the changed rule, and use the execution script to determine the execution logic of the state machine instance corresponding to the changed rule; adjust the behavior feature dimension based on the changed rule and the state machine instance corresponding to the changed rule, and determine the current feature vector of the target user according to the adjusted behavior feature dimension.
[0060] In one embodiment, the update processing unit may be further configured to: in response to monitoring a change in the portrait data of any target user, adjust the current feature vector of the target user based on the state machine instance and the changed portrait data.
[0061] In addition, in an embodiment of the present invention, the state machine validation unit 401 can be further used to: generate the execution script using a pre-written script template; the trigger condition represents at least one of the following judgments: whether the user has preset portrait data, whether the user has performed a preset behavior within a preset time period, whether the user has performed a preset behavior sequence within a preset time period, and whether the user's behavior statistics within the preset time period meet preset requirements.
[0062] According to the technical solution of the embodiment of the present invention, after obtaining the rules configured by the staff, the server generates the execution script corresponding to the rules using the script template and then uses the execution script to determine the execution logic of the corresponding state machine instance. After that, after monitoring the specific behavior event of the target user, the server transmits the behavior event and the historical feature vector of the target user to the above state machine instance. The state machine instance updates the historical feature vector of the target user to the current feature vector according to the above behavior event and transmits it to the stream computing engine. The stream computing engine matches the current feature vector with the trigger condition in the rule, and executes the disposal strategy in the matching rule for the target user in the case of successful matching. Through the system architecture with the state machine and the stream computing engine as the main body and the initialization configuration of the state machine instance by the execution script, the real-time calculation of the user feature vector of the state machine instance and the rule matching of the stream computing engine, the server has efficient data processing capabilities and rapid response capabilities to user behaviors. When facing massive user data, it can calculate user features in real time or quasi-real time and complete rule matching to achieve business purposes, and when the rules or user portraits are updated, it can also respond to the user feature calculation and rule matching process in real time or quasi-real time, thereby meeting the real-time requirements of the business and improving the business execution effect.
[0063] Figure 5 is a schematic diagram of the architecture of the data processing system in an embodiment of the present invention, see Figure 5 .
[0064] The data processing system of an embodiment of the present invention may include: a rule management platform, a script generation module, at least one state machine instance and a stream computing engine; wherein the rule management platform executes the configuration of rules including trigger conditions and disposal strategies, and transmits the configured rules to the script generation module; the script generation module generates an execution script corresponding to the rule and transmits it to the state machine instance corresponding to the rule, and the state machine instance uses the execution script to determine the execution logic; after receiving the behavior event of the target user, the state machine instance obtains the historical feature vector of the target user, updates the historical feature vector of the target user to the current feature vector based on the behavior event and transmits it to the stream computing engine; the stream computing engine matches the current feature vector with the trigger condition in the rule; if the match is successful, the disposal strategy in the matching rule is executed on the target user.
[0065] In an embodiment of the present invention, the trigger condition is a discriminant for user portrait data and user behavior data, and the historical feature vector of the target user is stored in a preset first cache module; and the server constructs portrait data of multiple users based on an offline data warehouse storing user data, screens out the target user from the multiple users according to the portrait data, and determines the portrait feature dimension and the behavior feature dimension of the target user according to the trigger condition; the stream computing engine obtains the historical behavior data of the target user from the preset second cache module, uses the obtained historical behavior data and the portrait data of the target user to determine the values of the target user in the portrait feature dimension and the behavior feature dimension, obtains the initial feature vector of the target user and stores it in the first cache module.
[0066] In a specific application, the user behavior type included in the trigger condition is consistent with the type of the behavior event; and after monitoring the behavior event of the target user, the server transmits the behavior event and the historical feature vector to the state machine instance corresponding to the rule whose trigger condition includes the type of the behavior event. The state machine instance changes the value of the behavior feature dimension corresponding to the behavior event in the historical feature vector according to the behavior event to obtain the current feature vector.
[0067] In actual application, the rules are stored in a preset third cache module after being configured; and the stream computing engine obtains the corresponding rules from the third cache module according to the pre-received rule identifier to perform the matching.
[0068] Preferably, after the rule management platform detects that any rule has been changed, the changed rule is synchronized in the third cache module; the script generation model generates an execution script corresponding to the changed rule, and uses the execution script to determine the execution logic of the state machine instance corresponding to the changed rule; the state machine instance adjusts the behavior feature dimension based on the changed rule and the state machine instance corresponding to the changed rule, and determines the current feature vector of the target user according to the adjusted behavior feature dimension.
[0069] As a preferred solution, the rule management platform notifies the state machine instance after detecting that the portrait data of any target user has changed, and the state machine instance adjusts the current feature vector of the target user according to the changed portrait data.
[0070] In addition, in an embodiment of the present invention, the script generation module generates the execution script using a pre-written script template; the trigger condition represents at least one of the following judgments: whether the user has preset portrait data, whether the user has performed a preset behavior within a preset time period, whether the user has performed a preset behavior sequence within a preset time period, and whether the user's behavior statistics within the preset time period meet preset requirements.
[0071] exist Figure 5 In the process, the user portrait data stored in the offline data warehouse enters ES for query by the rule management platform. On the one hand, user behavior events enter TIDB for caching and query. The user behavior data of TIDB is later stored in the second cache module. On the other hand, user behavior events enter the message queue (such as KAFKA) for classification in order to determine the corresponding state machine instance.
[0072] The rule management platform consists of two parts: the front-end and the back-end. The front-end is used to configure the execution rules, and the back-end is used to screen the target users, transmit the initial or updated user portrait data to the stream computing engine or the state machine instance, and transmit the initial or updated rules and rule identifiers to the stream computing engine or the state machine instance. The script generation module is used to generate the execution script corresponding to the rule based on the script template, and at the same time execute the data transfer from the rule management platform to the state machine instance or the stream computing engine. The state machine instance is used to obtain the historical feature vector of the target user from the first cache module and then adjust it according to the user behavior event to generate the user's current feature vector. The stream computing engine is used to match the current feature vector of the target user with the rule, and output it to the target user according to the corresponding disposal strategy when the match is successful.
[0073] The following combination Figure 5 A specific embodiment of the present invention is described.
[0074] In current marketing scenarios, since it is often necessary to process massive amounts of user data and the data processing efficiency is low, it takes one or more days to locate suitable users and form a usable marketing strategy, and it is impossible to achieve real-time marketing that follows user behavior events.
[0075] In this embodiment, the operator first configures various rules at the front desk of the rule management platform. The triggering conditions of the rules can perform the following judgments: whether the user has preset portrait data, whether the user has performed preset behaviors in a preset time period, whether the user has performed a preset behavior sequence in a preset time period, and whether the user's behavior statistics in the preset time period meet the preset requirements, thereby meeting the actual business scenario. The rules can also be configured with start and end time, disposal method (such as whether to execute the disposal strategy immediately after the trigger condition is met or after a certain period of time), operation goals, etc. After the rule configuration is completed, the rule management platform can store the rules in the third cache module. The configured rules enter the script generation module to automatically form an execution script. After the execution script enters the corresponding state machine instance, the execution logic of the state machine instance is adjusted.
[0076] Before monitoring user behavior events, the rule management module obtains user portrait data from ES, uses the user portrait data to screen target users, and transmits the target user's portrait data to the stream computing engine. The stream computing engine calculates the target user's initial feature vector based on the user portrait data and the user's historical behavior data in the second cache module and stores it in the first cache module.
[0077] After monitoring the user behavior event, the state machine instance obtains the latest historical feature vector of the target user from the first cache module, uses the user behavior event to convert the historical feature vector into the current feature vector and sends it to the stream computing engine. The stream computing engine matches the current feature vector of the target user with the rule and executes the corresponding disposal strategy when the match is successful, such as sending a coupon or a reminder message to the target user.
[0078] When a rule change is detected, the rule management platform sends the changed rule to the script generation module to update the corresponding execution script, and the execution logic of the corresponding state machine instance will also be updated accordingly. After that, the state machine instance adjusts the dimension of the target user according to the changed rule and then adjusts the current feature vector of the target user. When the user portrait is detected to change regularly or irregularly, the rule management platform sends the changed user portrait data to the corresponding state machine instance, and the state machine instance adjusts the current feature vector of the target user according to the changed user portrait data. After the current feature vector of the target user is adjusted, the stream computing engine can perform its re-matching with the rule and corresponding disposal.
[0079] Figure 6 An exemplary system architecture 600 is shown to which the data processing method or data processing device according to the embodiment of the present invention can be applied.
[0080] like Figure 6As shown, the system architecture 600 may include terminal devices 601, 602, 603, a network 604 and a server 605 (this architecture is only an example, and the components included in the specific architecture may be adjusted according to the specific circumstances of the invention). The network 604 is used to provide a medium for a communication link between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0081] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various client applications, such as e-commerce applications (only as an example), can be installed on the terminal devices 601, 602, 603.
[0082] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0083] The server 605 may be a server that provides various services, such as a backend server (only an example) that provides support for e-commerce applications operated by users using the terminal devices 601, 602, and 603. The backend server may process the received user behavior events and feed back the processing results (such as the corresponding handling strategy - only an example) to the terminal devices 601, 602, and 603.
[0084] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the data processing device is generally disposed in the server 605 .
[0085] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0086] The present invention also provides an electronic device. The electronic device of an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method provided by the present invention.
[0087] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of an electronic device suitable for implementing an embodiment of the present invention. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0088] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0089] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0090] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the main step diagram. In the above embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit 701, the above functions defined in the system of the present invention are executed.
[0091] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0092] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0093] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, may be described as: a processor including a state machine validation unit, a feature vector calculation unit, and a matching unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the feature vector calculation unit may also be described as a "unit that provides the user's current feature vector to the matching unit".
[0094] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the steps executed by the device include: obtaining pre-configured rules including trigger conditions and disposal strategies, generating execution scripts corresponding to the rules, and using the execution scripts to determine the execution logic of the preset state machine instance corresponding to the rules; in response to monitoring the behavior event of the target user, transmitting the behavior event and the pre-stored historical feature vector of the target user to the state machine instance, updating the historical feature vector of the target user to the current feature vector based on the state machine instance and the behavior event, and transmitting the current feature vector to the preset stream computing engine; matching the current feature vector with the trigger condition in the rule based on the stream computing engine; and executing the disposal strategy in the matching rule for the target user if the match is successful.
[0095] In the technical solution of the embodiment of the present invention, after obtaining the rules configured by the staff, the server generates the execution script corresponding to the rules using the script template and then determines the execution logic of the corresponding state machine instance using the execution script. After that, after monitoring the specific behavior event of the target user, the server transmits the behavior event and the historical feature vector of the target user to the above state machine instance. The state machine instance updates the historical feature vector of the target user to the current feature vector according to the above behavior event and transmits it to the stream computing engine. The stream computing engine matches the current feature vector with the trigger condition in the rule, and executes the disposal strategy in the matching rule for the target user in the case of successful matching. Through the system architecture with the state machine and the stream computing engine as the main body and the initialization configuration of the state machine instance by the execution script, the real-time calculation of the user feature vector of the state machine instance and the rule matching of the stream computing engine, the server has efficient data processing capabilities and rapid response capabilities to user behaviors. When facing massive user data, it can calculate user features in real time or quasi-real time and complete rule matching to achieve business purposes, and when the rules or user portraits are updated, it can also respond to the user feature calculation and rule matching process in real time or quasi-real time, thereby meeting the real-time requirements of the business and improving the business execution effect.
[0096] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: include: Obtaining pre-configured rules including trigger conditions and disposal strategies, generating execution scripts corresponding to the rules, and using the execution scripts to determine the execution logic of the preset state machine instance corresponding to the rules; In response to monitoring a behavior event of a target user, transmitting the behavior event and a pre-stored historical feature vector of the target user to the state machine instance, updating the historical feature vector of the target user to a current feature vector based on the state machine instance and the behavior event, and transmitting the current feature vector to a preset stream computing engine; Matching the current feature vector with the trigger condition in the rule based on the stream computing engine; In case of successful matching, the handling strategy in the matching rule is executed on the target user.
2. The method according to claim 1, characterized in that The trigger condition is a discriminant for user portrait data and user behavior data, and the historical feature vector of the target user is stored in a preset first cache module; And, the method further comprises: Building portrait data of multiple users based on an offline data warehouse storing user data, screening out the target user from the multiple users according to the portrait data, and determining the portrait feature dimension and behavior feature dimension of the target user according to the trigger condition; The historical behavior data of the target user is obtained from the preset second cache module, and the values of the target user in the portrait feature dimension and the behavior feature dimension are determined using the obtained historical behavior data and the portrait data of the target user, and the initial feature vector of the target user is obtained and stored in the first cache module.
3. The method according to claim 2, characterized in that The user behavior type included in the trigger condition is consistent with the type of the behavior event; and in response to monitoring the behavior event of the target user, transmitting the behavior event and a pre-stored historical feature vector of the target user to the state machine instance, including: The behavior event and the historical feature vector are transmitted to a state machine instance corresponding to a rule whose trigger condition includes the type of the behavior event.
4. The method according to claim 2, characterized in that: The updating the historical feature vector of the target user to the current feature vector based on the state machine instance and the behavior event includes: The value of the behavior feature dimension corresponding to the behavior event in the historical feature vector is changed according to the behavior event to obtain the current feature vector.
5. The method according to claim 1, characterized in that The rules are stored in a preset third cache module after being configured; And, matching the current feature vector with the trigger condition in the rule based on the stream computing engine includes: According to the pre-received rule identifier, the corresponding rule is obtained from the third cache module to perform the matching.
6. The method according to claim 5, characterized in that The method further comprises: In response to monitoring that any rule has been changed, synchronizing the changed rule in the third cache module; generating an execution script corresponding to the changed rule, and using the execution script to determine the execution logic of the state machine instance corresponding to the changed rule; The behavior feature dimension is adjusted based on the modified rule and the state machine instance corresponding to the modified rule, and the current feature vector of the target user is determined according to the adjusted behavior feature dimension.
7. The method according to claim 2, characterized in that: The method further comprises: In response to monitoring that the portrait data of any target user is changed, the current feature vector of the target user is adjusted based on the state machine instance and the changed portrait data.
8. The method according to any one of claims 1 to 7, characterized in that: Generating the execution script corresponding to the rule includes: generating the execution script using a pre-written script template; The trigger condition represents at least one of the following judgments: whether the user has preset portrait data, whether the user has performed preset behavior in a preset time period, whether the user has performed a preset behavior sequence in a preset time period, and whether the user's behavior statistics data in a preset time period meet preset requirements.
9. A data processing device, characterized in that: include: A state machine validation unit, used to obtain pre-configured rules including trigger conditions and disposal strategies, generate execution scripts corresponding to the rules, and use the execution scripts to determine the execution logic of the preset state machine instance corresponding to the rules; a feature vector calculation unit, configured to: in response to monitoring a behavior event of a target user, transmit the behavior event and a pre-stored historical feature vector of the target user to the state machine instance, update the historical feature vector of the target user to a current feature vector based on the state machine instance and the behavior event, and transmit the current feature vector to a preset stream computing engine; A matching unit, configured to match the current feature vector with a trigger condition in the rule based on the stream computing engine; In case of successful matching, the handling strategy in the matching rule is executed on the target user.
10. A data processing system, characterized in that: include: A rule management platform, a script generation module, at least one state machine instance and a stream computing engine; wherein, The rule management platform executes configuration of rules including trigger conditions and disposal strategies, and transmits the configured rules to the script generation module; The script generation module generates an execution script corresponding to the rule and transmits it to the state machine instance corresponding to the rule, and the state machine instance determines the execution logic using the execution script; After receiving the behavior event of the target user, the state machine instance obtains the historical feature vector of the target user, updates the historical feature vector of the target user to the current feature vector based on the behavior event, and transmits the current feature vector to the stream computing engine; The stream computing engine matches the current feature vector with the trigger condition in the rule; if the match is successful, the handling strategy in the matching rule is executed on the target user.
11. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Visual flow arrangement method for e-commerce marketing
CN121900769A
Visual process orchestration method for e-commerce marketing
CN121900769B