Data processing method, device, equipment, storage medium and program product

By compiling and processing user hierarchical rules and generating function objects to determine user hierarchical information, the problem of low user hierarchical data processing in the e-commerce platform is solved, and an efficient, stable and scalable user hierarchical system is realized.

CN113760406BActive Publication Date: 2025-04-15BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110174911.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-07
Publication Date
2025-04-15
Estimated Expiration
2041-02-07

AI Technical Summary

Technical Problem

With the growth of users of e-commerce platforms and the increase in relationships between item categories and consumers, the amount of data that needs to be processed when users stratify has increased dramatically, and traditional data processing methods are inefficient.

Method used

By responding to the user hierarchical request of the producer object, obtain the target hierarchical rules and the feature data of the target user, compile the target hierarchical rules, generate function objects, and call the function objects based on the feature data to determine the user's hierarchical information.

Benefits of technology

It greatly improves the efficiency and computing performance of user hierarchy, can process large amounts of data and adapt to dynamic changes, and improves the stability and scalability of user hierarchy systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760406B_ABST
    Figure CN113760406B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method, device, equipment, storage medium and program product. The method of the present invention obtains target stratification rules and characteristic data of target users by responding to user stratification request information of a producer object; compiles the target stratification rules to generate function objects corresponding to the target stratification rules, and can automatically compile each rule into a corresponding function object. The function object is called according to the characteristic data of the target user to obtain corresponding stratification information, which greatly improves the efficiency and computing performance of user stratification; even if the stratification rules change dynamically, the corresponding user stratification data processing can be completed by loading new stratification rules, which improves the stability and scalability of the user stratification system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, equipment, storage medium and program product. Background Art

[0002] In the era of the Internet economy, e-commerce platforms need to provide digital intervention processing systems to support the producers of items on the platform (such as manufacturers or brand owners) to continuously acquire new users on the e-commerce platform, push information about newly developed items to users, or push relevant information about items that users may be interested in in a targeted manner.

[0003] E-commerce platforms have a large number of active users, who have different levels of interactive behaviors such as browsing, watching, clicking, acquiring, and sharing with advertisements, content, related activities, display pages, and other materials on the platform. In order to more accurately push information of interest to users, it is necessary to analyze the interactive behavior data between users and the items of the producer object to understand the degree of association between users and the producer object and to stratify the users of the producer object. For example, the 4A user stratification model can divide users into four levels: Aware, Appeal, Act, and Advocate, according to the depth of the user's interactive behavior with a certain producer, and the degree of association gradually increases. Based on the user stratification model, more accurate information push can be performed.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: With the growth of users on the e-commerce platform and the increase in the relationship between item categories and consumers, the amount of data that needs to be processed when stratifying users increases dramatically. The traditional data processing method for user stratification adopts the rule interpretation method, traverses each rule, binds the characteristic variables in the rule for each rule, parses the rule expression, and calculates the Boolean judgment value based on the rule expression. The final stratification information of the user is determined based on the calculation results of all rules, and the efficiency of user stratification is low. Summary of the invention

[0005] The present invention provides a data processing method, device, equipment, storage medium and program product, which are used to solve the problem of low efficiency of traditional data processing methods for user stratification.

[0006] One aspect of the present invention is to provide a data processing method, comprising:

[0007] In response to the user stratification request information of the producer object, obtaining target stratification rules and characteristic data of target users;

[0008] Compiling the target hierarchical rule to generate a function object corresponding to the target hierarchical rule;

[0009] The function object is called according to the characteristic data of the target user to determine the hierarchical information of the target user.

[0010] Another aspect of the present invention is to provide a data processing device, comprising:

[0011] A user feature calculation module, used to obtain feature data of a target user in response to user stratification request information of a producer object;

[0012] A layering rule translation module, used to respond to the user layering request information of the producer object, obtain the target layering rule, compile the target layering rule, and generate a function object corresponding to the target layering rule;

[0013] The user stratification calculation module is used to call the function object according to the characteristic data of the target user to determine the stratification information of the target user.

[0014] Another aspect of the present invention is to provide a data processing device, comprising:

[0015] A processor, a memory, and a computer program stored in the memory and executable on the processor; wherein the processor implements the above-described method when executing the computer program.

[0016] Another aspect of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0017] Another aspect of the present invention is to provide a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of a data processing device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the data processing device executes the method described above.

[0018] The data processing method, apparatus, device, storage medium and program product provided by the present invention obtain target stratification rules and characteristic data of target users by responding to user stratification request information of producer objects; compile and process the target stratification rules to generate function objects corresponding to the target stratification rules, and can automatically compile and process each rule into a corresponding function object, and call the function object according to the characteristic data of the target user to obtain the corresponding stratification information, which greatly improves the efficiency and computing performance of user stratification; even if the stratification rules change dynamically, the corresponding user stratification data processing can be completed by loading new stratification rules, which improves the stability and scalability of the user stratification system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of the user stratification system architecture provided by an embodiment of the present invention;

[0020] Figure 2 A flow chart of a method for data processing provided in Embodiment 1 of the present invention;

[0021] Figure 3 A flow chart of a method for data processing provided in Embodiment 2 of the present invention;

[0022] Figure 4 A flowchart of the compilation process of user stratification rules provided in the second embodiment of the present invention;

[0023] Figure 5 A schematic diagram of the structure of a data processing device provided in Embodiment 3 of the present invention;

[0024] Figure 6 This is a schematic diagram of the structure of a data processing device provided in Embodiment 5 of the present invention.

[0025] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0027] First, the terms involved in the present invention are explained:

[0028] Apache Hive: is an open source large-scale data warehouse software.

[0029] Apache Spark: is an open source large-scale distributed data computing framework.

[0030] Spark DataFrame: It is a data organization and storage method within Spark. It organizes and stores application data in the form of rows and columns.

[0031] MySQL: is an open source relational database.

[0032] Java: is a programming language.

[0033] Spring Boot: is a Java-based service development framework.

[0034] Scala: It is a functional programming language. Apache Spark is written in Scala.

[0035] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0036] The data processing method provided by the present invention can be applied to Figure 1 The user-layered system architecture shown in Figure 1 As shown, the user stratification system includes: user stratification model management and scheduling services, user stratification rule services, data processing devices for user stratification, and data warehouses and other components. Among them, the user stratification model management and scheduling services are used to manage different types of user stratification models in the system. Each user stratification model has different user stratification rules, which can be a service program developed in Java based on the Spring Boot framework. The user stratification rule service is used to store user stratification rules used in the user stratification model, and can be a service program written in Java based on the Spring Boot framework. The data processing device for user stratification is used to determine the user's stratification information based on the user's contact behavior data, and can store the user stratification information in the data warehouse. The data processing device for user stratification may include multiple program modules developed in the Scala language on the Spark data computing framework, such as Figure 1The user feature calculation module, user stratification calculation module, and stratification rule compilation module shown in . The data warehouse is used to store user behavior data, feature data, stratification information, etc., and can be a relational database such as Apache Hive or MySQL.

[0037] The data processing method for user stratification provided in this embodiment can be applied to at least the following scenarios after determining the stratification information of the target user:

[0038] One application scenario is: according to the hierarchical information of the target users of the producer object, information is pushed in batches to users with the same hierarchical information.

[0039] Another application scenario is: according to the hierarchical information of the target users of the producer object, personalized information is pushed to users with different hierarchical information.

[0040] Another application scenario is: for a user who has no association with a certain producer object A, if there is a producer object B, and the categories of items provided by producer object B are similar to those of producer object A, then according to the hierarchical information of the target users of producer object B, the target users whose hierarchical information is greater than the set threshold are regarded as potential users of producer object A, and the relevant information of producer object A is pushed to these potential users. The set threshold can be set and adjusted according to the actual application scenario, and is not specifically limited here.

[0041] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0042] Embodiment 1

[0043] Figure 2 A flow chart of a method for data processing provided in Embodiment 1 of the present invention. The method in this embodiment is applied to a data processing device for user stratification, which may be a mobile terminal such as a smart phone or a tablet, or a server, etc. In other embodiments, the method may also be applied to other devices, and this embodiment is schematically described using a data processing device as an example.

[0044] like Figure 2 As shown, the specific steps of this method are as follows:

[0045] Step S101, in response to the user stratification request information of the producer object, obtain the target stratification rules and the characteristic data of the target user.

[0046] Among them, the producer object refers to the provider or owner of the items on the e-commerce platform, which can be the brand, manufacturer, etc. of the items. The producer object provides items to the e-commerce platform, and users can browse, watch, click, buy, share, and other interactive behaviors through the advertisements, content, activities, display pages, and other materials of the items on the e-commerce platform. The depth of the user's interactive behavior with the items provided by the producer object reflects the closeness of the relationship between the user and the producer object. For example, the closer the relationship between the user and the brand, the stronger the user's interest and willingness in the brand's items.

[0047] In this embodiment, when the producer object needs to know the degree of association between each user and itself, it can submit user stratification request information to the data processing device for user stratification.

[0048] In response to the user stratification request information of the producer object, the data processing device can obtain the target stratification rules required for user stratification and the characteristic data of the target users for which user stratification is required.

[0049] The target user's characteristic data refers to the characteristic data obtained by data analysis based on the interaction behavior data between the target user and the items provided by the producer object. For example, the number of times a user browses, obtains, and follows items of various categories of a certain brand in the recent period of time.

[0050] Step S102: compile the target hierarchical rule to generate a function object corresponding to the target hierarchical rule.

[0051] The target hierarchical rules include at least one rule, and each rule structure includes a predicate expression and hierarchical information.

[0052] For example, expr represents the predicate expression and layer_val represents the layer information. A rule can be expressed as: {expr:“D30_SKU_VIEW>2”, layer_val:2}. This rule indicates that the corresponding layer information is 2 for users who have browsed the product at least twice in the past 30 days.

[0053] After obtaining the target hierarchical rules, each rule in the target hierarchical rules is automatically converted into code and compiled to generate a function object corresponding to the rule.

[0054] Step S103: calling the function object according to the characteristic data of the target user to determine the hierarchical information of the target user.

[0055] After obtaining the target user's characteristic data and the function object corresponding to the target stratification rule, each function object is called according to the target user's characteristic data, and the function object is run to obtain the return result as the user stratification information.

[0056] The return result of a function object is the hierarchical information of the target user determined based on the corresponding rule of the function object. According to the return results of all function objects, the final hierarchical information of the target user can be determined.

[0057] The embodiment of the present invention obtains target stratification rules and characteristic data of target users by responding to user stratification request information of producer objects; compiles the target stratification rules to generate function objects corresponding to the target stratification rules, and can automatically compile each rule into a corresponding function object. The function object is called according to the characteristic data of the target user to obtain the corresponding stratification information, which greatly improves the efficiency and computing performance of user stratification; even if the stratification rules change dynamically, the corresponding user stratification data processing can be completed by loading new stratification rules, which improves the stability and scalability of the user stratification system.

[0058] Embodiment 2

[0059] Figure 3 A flow chart of the method for data processing provided for the second embodiment of the present invention. Based on the above-mentioned embodiment one, in this embodiment, the characteristic data of the target user obtained can be the aggregate characteristic data of multiple contact behavior characteristics of the target user, and the aggregate characteristic data includes the mapping information of the characteristic identification code and the characteristic value of each contact behavior characteristic; the aggregate characteristic data of multiple contact behavior characteristics of the target user can be converted into a characteristic vector of the characteristic values ​​of multiple contact behavior characteristics, which can support dynamic function calls and can adapt to the function objects of all different hierarchical rules. On this basis, the function objects of all target hierarchical rules are called one by one according to the characteristic vector of the target user to obtain the corresponding hierarchical information.

[0060] like Figure 3 As shown, the specific steps of this method are as follows:

[0061] Step S201: In response to the user stratification request information of the producer object, obtain the target stratification rules and the characteristic data of the target user.

[0062] The producer object refers to the provider or owner of the items on the e-commerce platform, which can be the brand, manufacturer, etc. of the items. The producer object provides items to the e-commerce platform, and users can browse, watch, click, buy, share, and other interactive behaviors through the advertisements, content, activities, display pages, and other materials of the items on the e-commerce platform. The depth of the user's interactive behavior with the items provided by the producer object reflects the closeness of the relationship between the user and the producer object. For example, the closer the relationship between the user and the brand, the stronger the user's interest and willingness in the brand's items.

[0063] When the producer object needs to know the degree of association between each user and itself, it can submit user stratification request information to the data processing device for user stratification.

[0064] In response to the user stratification request information of the producer object, the data processing device can obtain the target stratification rules required for user stratification and the characteristic data of the target users for which user stratification is required.

[0065] In this embodiment, multiple user stratification models and user stratification rules corresponding to each user stratification model can be pre-defined and configured, and provided to the producer object for selection and use. When the producer object sends a user stratification request to the data processing device, it can select and specify any user stratification model as the target stratification model used when performing user stratification according to its own needs.

[0066] Each rule structure includes a predicate expression and a hierarchical information.

[0067] For example, expr represents the predicate expression and layer_val represents the layer information. A rule can be expressed as: {expr:“D30_SKU_VIEW>2”, layer_val:2}. This rule indicates that the corresponding layer information is 2 for users who have browsed the product at least twice in the past 30 days.

[0068] In this step, the user stratification request information of the producer object contains the target stratification model information specified by the producer object. The target stratification rules are obtained in the following ways:

[0069] According to the target hierarchical model information, the corresponding target hierarchical rules are obtained.

[0070] The target hierarchical model information may be identification information of the target hierarchical model specified by the user, and may be a model name, the number of model hierarchies, etc. Based on the identification information, a user hierarchical model may be uniquely determined.

[0071] In this embodiment, the characteristic data of the target user refers to the characteristic data obtained by data analysis based on the interactive behavior data between the target user and the items provided by the producer object, for example, the number of times the user browses, obtains, and follows items of various categories of a certain brand in the recent period of time.

[0072] Optionally, in response to the user stratification request information of the producer object, data processing of user stratification may be performed based on all users on the e-commerce platform. In this step, feature data of all users are obtained.

[0073] Optionally, in response to the user stratification request information of the producer object, feature data of the target user associated with the producer object may be obtained, which may be specifically implemented in the following manner:

[0074] According to the user stratification request information, the target user associated with the producer object is obtained; the aggregated feature data of multiple contact behavior features of the target user is obtained, and the aggregated feature data includes mapping information between the feature identification code and the feature value of each contact behavior feature.

[0075] In this embodiment, multiple touch point behavior features are predefined to describe the interaction behavior between the user and the object. The user's feature data can be stored in a feature data table.

[0076] Exemplarily, a corresponding feature identification code may be set for each contact behavior feature to uniquely identify a contact behavior feature.

[0077] Optionally, the feature identification code corresponding to the contact behavior feature may include a feature short code name and / or a feature code, wherein the feature short code name is a string type, which is easy to understand and correspond to the contact behavior feature. The feature code is a regular integer, which is easy to store.

[0078] For example, the feature identification code of the touch point behavior feature may be as shown in Table 1 below:

[0079] Table 1

[0080] Feature short code name Feature Encoding meaning D30_SKU_VIEW 400100110 Number of items viewed by users in the past 30 days D365_SKU_PURCHASE 400200110 Number of items purchased by the user in the past 365 days SKU_LIKE_STATUS 400300110 Whether the user is interested in the item … … …

[0081] For example, a feature data table for storing user feature data may be a data table object (such as a SparkDataFrame object). For example, the structure of a feature data table of a certain brand may be as shown in Table 2:

[0082] Table 2

[0083]

[0084] As shown in Table 2, the user's feature data may include the time when the behavior occurred, the brand code, the item category code, the user code, and the aggregate feature data of the user's multiple touch behavior features. The aggregate feature data may be stored in a MAP, where the key is the feature code of the touch behavior feature, the value is the feature value of the touch behavior feature, and the data types of the key and value are both integer (INT).

[0085] Optionally, the characteristic data of the target user can be obtained based on the log data of the user's contact behavior combined with the user's own attribute information. Specifically, it can be implemented by using the method of analyzing user behavior characteristics in the prior art, which will not be described in detail here.

[0086] For example, a producer object can Figure 1 The user stratification model management and scheduling service shown submits user stratification request information to the data processing device used for user stratification. The user stratification model management and scheduling service is used to store and manage user stratification models, provide functions such as adding, modifying and deleting user stratification models, and can display user stratification models and corresponding stratification rule introductions to producer objects through the front-end page for producer objects to select and use. The user stratification model management and scheduling service can be deployed separately or on the same device as the data processing device, which is not specifically limited here.

[0087] For example, the data processing device may be Figure 1 The target hierarchical rules corresponding to the target hierarchical model are obtained from the user hierarchical rule service shown. The user hierarchical rule service user stores and manages the user hierarchical rules, and provides functions such as adding, modifying and deleting user hierarchical rules. The user hierarchical rule service can be deployed separately or on the same device as the data processing device, which is not specifically limited here.

[0088] In this embodiment, after the target hierarchical rule is obtained, the target hierarchical rule can be compiled and processed through the following steps S202-S203 to generate a function object corresponding to the target hierarchical rule.

[0089] Step S202: Convert each rule in the target hierarchical rule into a corresponding function code.

[0090] Specifically, this step can be implemented in the following ways:

[0091] Obtain a rule function template corresponding to each rule, the rule function template including codes for implementing the corresponding rule; replace the feature identification code in the rule function template with a reference variable to the feature value corresponding to the feature identification code, and obtain the function code corresponding to the rule.

[0092] The rule function template corresponding to each rule can be pre-edited and stored. The rule function template is a code implemented according to the processing logic of the rule, including the feature identification code of the contact behavior feature involved in the rule.

[0093] In this embodiment, in order to speed up the data processing speed of user stratification and reduce the time consumption of feature value addressing, the comparison table of feature short code name and feature code in the feature identification code shown in Table 1 can be used to convert the MAP of joint_feature shown in Table 2 into<INT,INT> Storage method, converted to Array <int>The feature vector (feature_vector) stored in the array is consistent with the total number of predefined touch behavior features; the order of feature values ​​in the array is consistent with the preset order of each touch behavior feature. The preset order can be configured according to the actual application scenario and is not specifically limited here.

[0094] For example, in the case of<INT,INT> The aggregate feature data stored in the form of an Array <int>In the process of storing feature vectors in this way, an empty array is first generated, and the corresponding feature codes are found one by one according to the feature short code names of the contact behavior features in a preset order; according to the corresponding feature codes, the corresponding feature values ​​are found in the aggregated feature data, and the corresponding feature values ​​are filled into the corresponding positions in the array.

[0095] The input of the rule function template is a feature vector, which can be a feature vector formed by arranging the feature values ​​of each contact behavior feature in a preset order. The structure of the feature vector can be an integer array (which can be represented as Array <int>). The output of the rule function template is the hierarchical information, which is an integer value.

[0096] In this step, the entire rule can be translated into a section of function code by replacing the feature identification code in the rule function template with a reference to the feature value corresponding to the feature identification code at the corresponding position in the feature vector.

[0097] Optionally, the feature identification code in the rule function template may be a feature short code name of the contact behavior feature, so as to facilitate the user to understand and edit the rule function template.

[0098] For example, feature_vector represents a feature vector. For a feature identification code "D30_SKU_VIEW", according to the predefined contact behavior features in the set order, the position i of the feature value corresponding to the feature identification code in the feature vector can be determined, and the "D30_SKU_VIEW" in the rule function template can be replaced with "feature_vector[i]", which means referencing the i-th value in feature_vector.

[0099] Optionally, in the function code corresponding to each rule, if the input parameter satisfies the predicate expression of the rule, the corresponding hierarchical information is output; if the input parameter does not satisfy the predicate expression of the rule, the output hierarchical information is a preset hierarchical value. The preset hierarchical value can be 0, or the preset hierarchical value can be set according to the actual application scenario, which is not specifically limited here.

[0100] Step S203: compile the function code to obtain the function object corresponding to the function code.

[0101] In this step, each function code is dynamically compiled into a corresponding function object by calling a compiler function.

[0102] Exemplarily, the function code is compiled into a Scala function object FunctionObject by calling a compiler function in Scala.reflection.tools in Scala.

[0103] Optionally, the function code can be compiled into function objects of other languages ​​(such as phson) by calling other compiler functions.

[0104] After the function code corresponding to each rule is compiled into the corresponding function object, the obtained function reference forms a function object vector, which can be stored in the function object array.

[0105] Combine the following Figure 4 The process of compiling all user stratification rules in the target stratification rules into corresponding function objects is exemplarily described as follows: Figure 4 As shown, the specific steps are as follows:

[0106] Step S41: Obtain uncompiled user stratification rules.

[0107] Step S42: Replace the feature identification code in the rule function template with a reference variable to the feature value corresponding to the feature identification code to obtain the function code corresponding to the rule.

[0108] Step S43: Call the compiler function to compile the function code into a function object.

[0109] Step S44: determine whether there are any uncompiled user stratification rules.

[0110] If there is an uncompiled user stratification rule, step S41 is executed to obtain the next uncompiled user stratification rule; if there is no uncompiled user stratification rule, step S45 is executed.

[0111] Step S45: Obtain function objects corresponding to all user stratification rules.

[0112] In this embodiment, after the function objects corresponding to all target user stratification rules are obtained, the following steps S204-S206 are performed to call the function objects according to the characteristic data of the target users to determine the stratification information of the target users.

[0113] In another implementation of this embodiment, all user stratification rules can be compiled in advance to obtain and store function objects corresponding to all user stratification rules. When a user stratification request is received, the function object corresponding to the target user stratification rule is directly loaded, which can omit the processing of steps S202-S203 and improve the efficiency of user stratification.

[0114] Furthermore, when the user stratification rules need to be updated, after the user stratification rules are adjusted, it is necessary to recompile to obtain the corresponding function objects and repackage the application.

[0115] Step S204: converting the aggregated feature data of the target user's multiple touch-point behavior features into a feature vector of feature values ​​of the multiple touch-point behavior features.

[0116] In this embodiment, the input of the rule function template is a feature vector, which can be a feature vector formed by arranging the feature values ​​of each contact behavior feature in a preset order. The structure of the feature vector can be an integer array (which can be represented as Array <int>). The output of the rule function template is the hierarchical information, which is an integer value.

[0117] In order to speed up the data processing speed of user stratification and reduce the time consumption of feature value addressing, the comparison table of feature short code names and feature codes in the feature identification code shown in Table 1 can be used to convert the aggregated feature data of multiple contact behavior features of the target user into a feature vector of the feature values ​​of the contact behavior features. The length of the feature vector is consistent with the total number of predefined contact behavior features, and the order of feature values ​​in the feature vector is consistent with the preset order of each contact behavior feature.

[0118] Exemplarily, first generate an empty array, the size of which is consistent with the total number of predefined contact behavior features; fill in the elements of the corresponding positions of each contact behavior feature in the array one by one according to the preset arrangement order of each contact behavior feature: find the corresponding feature code according to the feature short code name of the contact behavior feature; find the corresponding feature value in the aggregated feature data according to the corresponding feature code, and fill the corresponding feature value into the corresponding position in the array. If the corresponding feature value is not found in the aggregated feature data, the corresponding position in the array is filled with the preset value. The preset value can be 0, or it can also be set according to the actual application scenario, which is not specifically limited this time.

[0119] Step S205: Use the feature vector as an input parameter of each function object, call the function object, and obtain hierarchical information corresponding to the function object.

[0120] In this embodiment, the compiled function object is an internal object and can be directly input and referenced.

[0121] In this step, for each target user, the feature data of the user is converted into a feature vector, which is used as an input parameter of the function object corresponding to each rule. Each function object is called to obtain the hierarchical information of the user corresponding to each rule.

[0122] Optionally, the feature vector may be used as an input parameter of each function object, and multiple function objects may be called in parallel to achieve parallel processing of multiple user stratification rules, thereby improving data processing efficiency.

[0123] Step S206: Determine the hierarchical information of the user according to the hierarchical information corresponding to each function object.

[0124] After obtaining the hierarchical information corresponding to each function object of the target user, the hierarchical information corresponding to each function object may be integrated to determine the final hierarchical information of the target user.

[0125] Optionally, the maximum value in the hierarchical information corresponding to the function object is used as the final hierarchical information of the target user. Exemplarily, the hierarchical information corresponding to the function object can be sorted, and the maximum value in the hierarchical information corresponding to the function object is determined according to the sorting result, and the maximum value in the hierarchical information corresponding to the function object is used as the final hierarchical information of the target user.

[0126] Optionally, the hierarchical information that appears most frequently in the hierarchical information corresponding to the function object can be used as the final hierarchical information of the target user. In addition, the final hierarchical information of the target user can be determined by synthesizing the hierarchical information corresponding to each function object in other ways, which are not specifically limited here.

[0127] Exemplarily, each row in the feature data table corresponds to feature data of a user. In this embodiment, each row of user feature data can be converted into a corresponding feature vector, and the feature vector is used as an input parameter to call the function object corresponding to each rule in the target hierarchical rule to obtain the hierarchical information corresponding to each rule, sort the hierarchical information corresponding to each rule and determine the maximum value therein, and use the maximum value therein as the final hierarchical information of the user.

[0128] In another implementation of this embodiment, if an error occurs during the compilation of the target stratification rules in steps S202-S203, and the function objects corresponding to all the target stratification rules cannot be correctly generated, an interpreted user stratification method or any other user stratification method can be used to perform user stratification processing. That is, the method provided by the present invention is compatible with other user stratification methods and can improve system stability.

[0129] The embodiment of the present invention provides an extensible compilation and execution architecture for user stratification rules, which can compile different user stratification rules into Spark function objects according to the structure of input user feature data, and can be embedded in Spark applications for execution; the user stratification rules are converted into Scala code by positioning the rule function template and feature identification code, and then the code is compiled into Scala function objects using the dynamic compiler embedded in Scala; further, the aggregated feature data of users in the Spark data table is converted into feature vectors that support dynamic function calls, which can adapt to function objects of different rules. On this basis, the efficiency of user stratification can be further improved by calculating the user's stratification information by calling multiple function objects in parallel.

[0130] Embodiment 3

[0131] Figure 5 The structure diagram of the data processing device provided in the third embodiment of the present invention is shown in FIG. The data processing device provided in the embodiment of the present invention can execute the processing flow provided in the data processing method embodiment. Figure 5 As shown, the data processing device 30 includes: a user feature calculation module 301, a layer rule translation module 302 and a user layer calculation module 303.

[0132] Specifically, the user feature calculation module 301 is used to obtain feature data of a target user in response to user stratification request information of a producer object.

[0133] The layering rule translation module 302 is used to respond to the user layering request information of the producer object, obtain the target layering rule, compile the target layering rule, and generate a function object corresponding to the target layering rule.

[0134] The user stratification calculation module 303 is used to call a function object according to the characteristic data of the target user to determine the stratification information of the target user.

[0135] The device provided in the embodiment of the present invention can be specifically used to execute the method embodiment provided in the above-mentioned embodiment 1, and the specific functions will not be repeated here.

[0136] The embodiment of the present invention obtains target stratification rules and characteristic data of target users by responding to user stratification request information of producer objects; compiles the target stratification rules to generate function objects corresponding to the target stratification rules, and can automatically compile each rule into a corresponding function object. The function object is called according to the characteristic data of the target user to obtain the corresponding stratification information, which greatly improves the efficiency and computing performance of user stratification; even if the stratification rules change dynamically, the corresponding user stratification data processing can be completed by loading new stratification rules, which improves the stability and scalability of the user stratification system.

[0137] Embodiment 4

[0138] On the basis of the above-mentioned embodiment 3, in this embodiment, the hierarchical rule translation module is further used for:

[0139] The request information includes the target hierarchical model information specified by the producer object, and the corresponding target hierarchical rules are obtained according to the target hierarchical model information.

[0140] Optionally, the user feature calculation module is further used for:

[0141] According to the request information, the target user associated with the producer object is obtained; the aggregated feature data of multiple contact behavior features of the target user is obtained, and the aggregated feature data includes mapping information between a feature identification code and a feature value of each contact behavior feature.

[0142] Optionally, the hierarchical rule translation module is further used to:

[0143] Convert each rule in the target hierarchical rule into a corresponding function code; compile the function code to obtain a function object corresponding to the function code.

[0144] Optionally, the hierarchical rule translation module is further used to:

[0145] Obtain a rule function template corresponding to each rule, the rule function template including codes for implementing the corresponding rule; replace the feature identification code in the rule function template with a reference variable to the feature value corresponding to the feature identification code, and obtain the function code corresponding to the rule.

[0146] Optionally, the hierarchical rule translation module is further used to:

[0147] Call the compiler function to compile each function code into the corresponding function object.

[0148] Optionally, the user stratification calculation module is further used for:

[0149] The aggregated feature data of multiple contact behavior features of the target user are converted into a feature vector of feature values ​​of the multiple contact behavior features; the feature vector is used as an input parameter of each function object, the function object is called, and the hierarchical information corresponding to the function object is obtained; and the hierarchical information of the user is determined according to the hierarchical information corresponding to each function object.

[0150] Optionally, the user stratification calculation module is further used for:

[0151] The maximum value of the hierarchical information corresponding to the function object is used as the hierarchical information of the user.

[0152] The device provided in the embodiment of the present invention can be specifically used to execute the method embodiment provided in the above-mentioned embodiment 2, and the specific functions will not be repeated here.

[0153] The embodiment of the present invention provides an extensible compilation and execution architecture for user stratification rules, which can compile different user stratification rules into Spark function objects according to the structure of input user feature data, and can be embedded in Spark applications for execution; the user stratification rules are converted into Scala code by positioning the rule function template and feature identification code, and then the code is compiled into Scala function objects using the dynamic compiler embedded in Scala; further, the aggregated feature data of users in the Spark data table is converted into feature vectors that support dynamic function calls, which can adapt to function objects of different rules. On this basis, the efficiency of user stratification can be further improved by calculating the user's stratification information by calling multiple function objects in parallel.

[0154] Embodiment 5

[0155] Figure 6 This is a schematic diagram of the structure of a data processing device provided in Embodiment 5 of the present invention. Figure 6 As shown, the data processing device 100 includes: a processor 1001 , a memory 1002 , and a computer program stored in the memory 1002 and executable on the processor 1001 .

[0156] The processor 1001 implements the data processing method provided by any of the above method embodiments when running the computer program.

[0157] The embodiment of the present invention obtains target stratification rules and characteristic data of target users by responding to user stratification request information of producer objects; compiles the target stratification rules to generate function objects corresponding to the target stratification rules, and can automatically compile each rule into a corresponding function object. The function object is called according to the characteristic data of the target user to obtain the corresponding stratification information, which greatly improves the efficiency and computing performance of user stratification; even if the stratification rules change dynamically, the corresponding user stratification data processing can be completed by loading new stratification rules, which improves the stability and scalability of the user stratification system.

[0158] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided by any of the above method embodiments is implemented.

[0159] An embodiment of the present invention also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of a data processing device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the data processing device executes the method provided by any of the above method embodiments.

[0160] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0163] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0164] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0165] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0166] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.< / int> < / int> < / int> < / int>

Claims

1. A method for data processing, characterized in that: include: In response to the user stratification request information of the producer object, obtaining target stratification rules and characteristic data of target users; Compiling the target hierarchical rule to generate a function object corresponding to the target hierarchical rule; Calling the function object according to the characteristic data of the target user to determine the hierarchical information of the target user; The compiling the target hierarchical rule to generate a function object corresponding to the target hierarchical rule includes: Convert each rule in the target hierarchical rule into a corresponding function code; Compile the function code to obtain a function object corresponding to the function code; The converting each rule in the target hierarchical rule into a corresponding function code includes: Obtain a rule function template corresponding to each rule, wherein the rule function template includes a code for implementing the corresponding rule; The feature identification code in the rule function template is replaced with a reference variable to a feature value corresponding to the feature identification code to obtain a function code corresponding to the rule.

2. The method according to claim 1, characterized in that The step of obtaining target stratification rules and target user feature data in response to the user stratification request information of the producer object includes: The request information includes the target hierarchical model information specified by the producer object, and the corresponding target hierarchical rules are obtained according to the target hierarchical model information.

3. The method according to claim 1, characterized in that The step of obtaining target stratification rules and target user feature data in response to the user stratification request information of the producer object includes: According to the request information, obtaining the target user associated with the producer object; Aggregate feature data of multiple contact behavior features of the target user is obtained, where the aggregate feature data includes mapping information between a feature identification code and a feature value of each of the contact behavior features.

4. The method according to claim 1, characterized in that: The compiling the function code to obtain a function object corresponding to the function code includes: The compiler function is called to compile each of the function codes into a corresponding function object.

5. The method according to claim 3, characterized in that: The calling of the function object according to the characteristic data of the target user to determine the hierarchical information of the target user includes: Converting aggregated feature data of multiple contact behavior features of the target user into a feature vector of feature values ​​of the multiple contact behavior features; Taking the feature vector as an input parameter of each function object, calling the function object, and obtaining hierarchical information corresponding to the function object; The hierarchical information of the user is determined according to the hierarchical information corresponding to each of the function objects.

6. The method according to claim 5, characterized in that The step of determining the hierarchical information of the user according to the hierarchical information corresponding to each of the function objects includes: The maximum value in the hierarchical information corresponding to the function object is used as the hierarchical information of the user.

7. A data processing device, characterized in that: include: A user feature calculation module, used to obtain feature data of a target user in response to user stratification request information of a producer object; A layering rule translation module, used to respond to the user layering request information of the producer object, obtain the target layering rule, compile the target layering rule, and generate a function object corresponding to the target layering rule; A user stratification calculation module, used to call the function object according to the characteristic data of the target user to determine the stratification information of the target user; The hierarchical rule translation module is specifically used to convert each rule in the target hierarchical rule into a corresponding function code; compile the function code to obtain a function object corresponding to the function code; The hierarchical rule translation module is also specifically used to obtain a rule function template corresponding to each rule, wherein the rule function template includes a code for implementing the corresponding rule; the feature identification code in the rule function template is replaced by a reference variable to a feature value corresponding to the feature identification code to obtain a function code corresponding to the rule.

8. A data processing device, characterized in that: include: A processor, a memory, and a computer program stored on the memory and executable on the processor; Wherein, when the processor runs the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that A computer program is included which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and device, storage medium and electronic equipment

    CN111241382A

  • Recommendation engine design method and device, server and storage medium

    CN111399818A