A feature extraction method, device, apparatus, and storage medium
By extracting behavioral habit features from user behavior sequences, the problem of unclean and disordered data is solved, the accuracy and precision of the model are improved, and the effect of personalized services is enhanced.
Patent Information
- Application Number
- CN202210996416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-08-18
AI Technical Summary
Existing technologies lack effective data preprocessing methods before model building, resulting in unclean and disordered data, which affects the model's feature construction and expression capabilities, thereby reducing the model's accuracy and precision.
By acquiring user behavior sequences, we can extract information about the relationships and patterns between behaviors. Then, using association rule mining and sequence pattern mining algorithms, we can extract behavioral habit features from user behavior data, including the fusion of association rules and sequence patterns, to form more accurate behavioral habit features.
It improves the expressive power of data, enhances the precision and accuracy of model processing, and strengthens the effectiveness of personalized services and behavioral habit-related applications.
Smart Images

Figure CN115391421B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer data processing technology, and more particularly to the field of artificial intelligence technology. Background Technology
[0002] Before building a model, the data to be input into the model usually needs to be preprocessed to obtain clean, well-organized, and accurate data. Then, model features are built based on the preprocessed data, and derived variables generated by the business scenario are combined to improve the data's expressive power, thereby improving model performance. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, and storage medium for feature extraction.
[0004] According to one aspect of this disclosure, a method for feature extraction is provided, comprising: obtaining a behavior sequence for each user based on user behavior data, the behavior sequence including at least one behavior arranged in chronological order; and extracting relationship information and / or pattern information between the behaviors based on the behavior sequence to obtain behavioral habit features for each user.
[0005] According to another aspect of this disclosure, a feature extraction apparatus is provided, comprising: a behavior sequence acquisition module, configured to acquire a behavior sequence of each user based on user behavior data, the behavior sequence including at least one behavior arranged in chronological order; and a behavior habit feature extraction module, configured to extract relationship information and / or pattern information between behaviors based on the behavior sequence to obtain behavior habit features of each user.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the aforementioned feature extraction method.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to perform the above-described feature extraction method.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described feature extraction method.
[0009] This disclosure provides a method, apparatus, device, and storage medium for feature extraction. The method extracts behavioral habit features for each user by extracting relationship information and / or pattern information from the user's behavior sequence. These extracted behavioral habit features can more accurately represent the user's behavioral habits, helping to improve the expressive power of the data and thus enhancing the accuracy and precision of subsequent model processing.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0012] Figure 1 A schematic diagram illustrating the feature extraction method of the first embodiment of this disclosure;
[0013] Figure 2 A schematic diagram illustrating the process of acquiring user behavior habits according to the second embodiment of this disclosure;
[0014] Figure 3 This disclosure presents a schematic diagram of the system architecture used in the third embodiment of extracting user behavior habit features based on behavior sequences;
[0015] Figure 4 This disclosure presents a schematic diagram of the system architecture used in the fourth embodiment to extract user behavior habit features based on behavior sequences;
[0016] Figure 5 This disclosure presents a schematic diagram of the system architecture used in the fifth embodiment to extract user behavior habit features based on behavior sequences;
[0017] Figure 6 The sixth embodiment of this disclosure presents a causal judgment model with model features and a causal relationship inference diagram of the set results;
[0018] Figure 7 A schematic diagram of the structure of the feature extraction apparatus according to an embodiment of this disclosure;
[0019] Figure 8 This is a block diagram of an electronic device used to implement the feature extraction method of the embodiments of this disclosure. Detailed Implementation
[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] Figure 1 A flowchart illustrating a method for feature extraction according to an embodiment of this disclosure is shown. Figure 1 As shown, the method includes:
[0022] Operation S110: Based on user behavior data, obtain the behavior sequence of each user, the behavior sequence including at least one behavior arranged in chronological order;
[0023] User behavior data includes user actions and the time when those actions occurred. It can come from log files that record user operations, or from communication records between the user's client and the server.
[0024] User behavior includes the actions performed by the user, the objects of those actions, and the results of those actions. In the simplest case, user behavior may only include the actions performed by the user, or only the objects of those actions.
[0025] When obtaining the behavior sequence of each user, you can first obtain the user behavior data corresponding to each user, obtain the behavior of each user and the time when the behavior occurred from the user behavior data corresponding to each user, and then sort the user's behavior according to the time when the behavior occurred to form the behavior sequence of each user.
[0026] For example, from a log file like the one shown below:
[0027] [User 1] [January 1, 2022, 5:10 PM] [Viewed] [Item x1];
[0028] [User 1] [January 1, 2022, 5:15 PM] [Viewed] [2 Items];
[0029] [User 2] [January 1, 2022, 5:20 PM] [Viewed] [3 Items];
[0030] [User 1] [January 1, 2022, 5:25 PM] [Added to Cart] [Item x2];
[0031] [User 2] [January 1, 2022, 5:20 PM] [Viewed] [Item x1];
[0032] [User 1] [January 1, 2022, 5:30 PM] [Purchased] [Item x2];
[0033] [User 2] [January 1, 2022, 5:35 PM] [Purchased] [Item x1];
[0034] available:
[0035] User 1's action sequence {"[Browse][Product x1]", "[Browse][Product x3]", "[Add to Cart][Product x2]", "[Purchase][Product x2]"};
[0036] User 2's action sequence {"[Browse][Product x3]", "[Browse][Product x1]", "[Purchase][Product x1]"}.
[0037] The order in which a person performs a series of actions often depends on the inherent connections between the actions (e.g., sequential and causal relationships) or the individual's behavioral habits. A temporal sequence of actions, precisely through the arrangement of these actions, preserves potential information such as the inherent connections between the actions or the individual's behavioral habits.
[0038] Therefore, by analyzing user behavior sequences, we can further uncover the intrinsic connections between behaviors and user behavior patterns. If a certain behavior pattern appears repeatedly, it can be inferred that the behavior pattern has become a user's habit.
[0039] For example, if a user's behavior sequence always includes the action of "adding to cart" between the actions of "browsing" and "purchasing", it can be inferred that the user has a consumption habit of "adding to cart after browsing and then purchasing the product"; if a user's behavior sequence only includes the action of "browsing" before the action of "purchasing" and rarely includes the action of "adding to cart", it can be inferred that the user has a consumption habit of "purchasing the product directly after browsing".
[0040] Therefore, compared to discrete behavioral data, behavioral sequences are more likely to reveal clues about user behavior habits and are also more likely to extract user behavior characteristics.
[0041] Operation S120 extracts information about the relationships and / or patterns between behaviors based on the behavior sequence to obtain the behavioral habit characteristics of each user.
[0042] Among them, extracting information about the relationships between behaviors refers to extracting information from the sequence of behaviors that can represent the inherent relationships between user behaviors.
[0043] Extracting pattern information between behaviors refers to extracting time-related features from the behavior sequence that can represent the order of occurrence and arrangement of each behavior.
[0044] As mentioned earlier, users' behavioral habits are closely related to the order of occurrence, arrangement patterns, and intrinsic connections between behaviors in the sequence.
[0045] Therefore, by following the sequence of actions:
[0046] Extract information about the relationships between behaviors, or,
[0047] Extracting pattern information between behaviors, or
[0048] Extracting information about the relationships and patterns between behaviors yields more representative and interpretable user behavior characteristics, which can further improve the expressive power of these characteristics.
[0049] In this embodiment, operation 110 acquires the behavior sequence of each user; then, operation 120 extracts the relationship information and / or temporal information between the behaviors from the user's behavior sequence, and uses this as the user's behavioral habit features to characterize the user's behavioral habits. The behavioral habit features extracted in this way can more accurately characterize the user's behavioral habits, helping to improve the expressive power of the data, thereby enhancing the accuracy and precision of subsequent model processing.
[0050] Figure 2 This disclosure illustrates a process for obtaining user behavior habits according to another embodiment. Figure 2 In the embodiments of this disclosure shown, user behavior data includes session information, and each user behavior occurs within a specific session.
[0051] Since the behaviors within the same session are more closely related, when obtaining the behavior sequence of each user, this embodiment of the disclosure will further refine the behavior sequence according to the session, that is, obtain the behavior sequence of each user in each session based on user behavior data.
[0052] Specifically, such as Figure 2 As shown, the user behavior data 201 of this embodiment includes various behaviors of multiple users in multiple sessions. When obtaining the behavior sequence of each user in each session based on the user behavior data, the user behavior data is first divided into three dimensions 202: user (e.g., user 1, user 2, and user 3), session (e.g., session 1, session 2, and session 3), and behavior (e.g., behavior 1, behavior 2, and user 3). Then, the behavior of each user in each session is determined based on the user and session, and the behavior is sorted in chronological order to obtain the behavior sequence of each user in each session as shown in the behavior sequence data 203.
[0053] The resulting behavioral sequences have closer relationships between the behaviors, making it easier to discover representative and valuable relational and pattern information. The behavioral habit features extracted from these sequences are also more accurate.
[0054] Furthermore, refining the behavior sequence based on the session can shorten the behavior sequence, which helps to simplify computation and save computational resources.
[0055] Figure 3 This disclosure illustrates a system architecture used in another embodiment of the present disclosure to extract user behavior habit features based on behavior sequences.
[0056] exist Figure 3 In the embodiment of this disclosure shown, the association rule mining model 302 is used to mine association rules for the behavior sequence 301 to obtain at least one association rule 303 between behaviors, and then the behavior association rule 303 is determined as the behavior habit feature of each user.
[0057] Association rule mining is a rule-based machine learning algorithm that can discover interesting data relationships in big data. Its purpose is to use some metrics to identify strong rules in the database.
[0058] Specifically, in this embodiment of the disclosure, the Apriori algorithm is used to construct an association rule mining model 302, which includes: taking each behavior and the combination of behaviors in the behavior sequence as an item, discovering frequent itemsets from the behavior sequence according to a set first minimum support (minimum item support); and then determining at least one strong association rule between behaviors according to the frequent itemsets and the set minimum confidence.
[0059] Suppose that the behavior sequence of a certain user obtained from user data is shown in Table 1 below:
[0060] Table 1
[0061] Session ID Behavioral sequence 10 A, C, D 20 B, C, E 30 A, B, C, E 40 B, E
[0062] The minimum support is counted as 2.
[0063] First, with k=1, calculate the support count of an item set. The results are shown in Table 2.
[0064] Where k represents the number of frequent terms.
[0065] Table 2
[0066] item Item support {A} 2 {B} 3 {C} 3 {D} 1 {E} 3
[0067] Item support refers to the number of times an item appears in the original dataset.
[0068] As can be seen, the support count of itemset {D} is less than 2. According to the prior principle, anything containing {D} can be ignored. Therefore, {D} can be removed, resulting in one frequent itemset as shown in Table 3.
[0069] Table 3
[0070]
[0071]
[0072] The second step is to calculate the support count of the binary itemset with k=2. The results are shown in Table 4.
[0073] Table 4
[0074] item Item support {A, B} 1 {A, C} 2 {A, E} 1 {B, C} 2 {B, E} 3 {C, E} 2
[0075] After removing itemsets with a support count less than 2, we obtain the binomial frequent itemsets shown in Table 5.
[0076] Table 5
[0077] item Item support {A, C} 2 {B, C} 2 {B, E} 3 {C, E} 2
[0078] The third step is to calculate the support count of the three-item set with k=3, and obtain the three-item frequent itemsets as shown in Table 6.
[0079] The connection of three or more itemsets follows these rules:
[0080] If we connect {A, C} and {B, C}, and the last item of both itemsets is crossed out, leaving different items, then they cannot be connected.
[0081] If we connect {B, C} and {B, E}, and remove the last item from both itemsets, leaving the same remaining items, we can connect them to form {B, C, E}.
[0082] By connecting them one by one, we can obtain the result.
[0083] Table 6
[0084]
[0085]
[0086] Fourth step, k=4, calculate the support count of the four itemsets.
[0087] However, if the four itemsets are empty, the algorithm terminates, and the frequent itemsets in the third step become the final result.
[0088] Among them, the one-item frequent itemsets shown in Table 3, the two-item frequent itemsets shown in Table 5, and the three-item frequent itemsets shown in Table 6, obtained through the above calculation process, are all association rules of behavior sequences.
[0089] To further improve the efficiency of the algorithm, frequent itemsets can be discovered by restricting the generation of candidates.
[0090] Restricting candidate generation refers to setting certain conditions and selecting items that meet these conditions from all permutations and combinations of frequent items as candidates for generating frequent items. For example, when interested in purchasing habits, only actions such as browsing, adding to cart, or purchasing are considered as candidates.
[0091] The fifth step is to determine at least one strong association rule between behaviors based on the set minimum confidence level.
[0092] In this context, confidence level refers to the degree of credibility or reliability of a conclusion drawn based on a given condition. For example, the degree of reliability in deriving the conclusion "action B will also occur" from the condition "action B will occur" is the confidence level of the association rule {B, E}.
[0093] The confidence level of an association rule can be calculated using statistically obtained probabilities, for example, through the probability t-function (the higher the probability, the higher the confidence level).
[0094] If the minimum confidence level is set to 60%, then association rules with a confidence level greater than or equal to 60% are considered strong association rules.
[0095] It should be noted that the above examples are merely illustrative and are not intended to limit the implementation of the embodiments of this disclosure.
[0096] Implementers can also use any other applicable association rule mining algorithm, such as the FP-Growth algorithm, to perform association rule mining and obtain at least one association rule between behaviors.
[0097] In this embodiment of the disclosure, association rules can be mined from behavior sequences to identify concurrent relationships between user behaviors, i.e., which behaviors always occur together. These consistently occurring behaviors are likely rooted in certain user habits. Therefore, by mining association rules from behavior sequences and using these rules as characteristics of user behavior habits, it is possible to characterize behavioral habits that are consistently characterized by multiple behaviors occurring together.
[0098] Figure 4 This disclosure illustrates a system architecture used in another embodiment of the present disclosure to extract user behavior habit features based on behavior sequences.
[0099] exist Figure 4 In the embodiment of this disclosure shown, the sequence pattern mining model 402 is used to mine the sequence pattern of the behavior sequence 401 to obtain the sequence pattern 403 of the behavior sequence, and then the association rule 403 is determined as the behavioral habit feature of each user.
[0100] Sequence pattern mining mainly refers to mining patterns that occur more frequently within a relative time period or compared to other patterns.
[0101] Specifically, in this embodiment of the disclosure, a pattern mining model 402 is constructed using a generalized sequence pattern mining algorithm (GSP), including: determining frequent subsequences from the behavior sequence whose support is greater than or equal to the second minimum support according to a set second minimum support (minimum sequence support); and determining the sequence pattern of the behavior sequence from the frequent subsequences.
[0102] Here, a subsequence refers to a subsequence of a sequence of actions, which maintains the original order and sequence relationship in the sequence of actions. For example, if the sequence of actions is {A, B, C}, then the subsequences of actions are: {A}, {B}, {C}, {A, B}, {B, C}, {A, C}, {A, B, C}.
[0103] Given a sequence S and a sequence dataset DT, the support of sequence S is the percentage of tuples of S that appear in DT relative to the entire dataset.
[0104] The process of discovering frequent subsequences is similar to that of discovering frequent terms, and will not be repeated here.
[0105] GSP introduces time constraints, sliding time windows, and classification hierarchy techniques, increasing scanning constraints and effectively reducing the number of candidate sequences that need to be scanned. This is practical and reduces the generation of unnecessary and useless patterns. Furthermore, GSP uses hash trees to store candidate sequences, further reducing the number of sequences that need to be scanned. It also transforms the representation of the data sequences, thus effectively identifying whether a candidate sequence is a subsequence of the data sequence.
[0106] It should be noted that the above examples are merely illustrative and are not intended to limit the implementation of the embodiments of this disclosure.
[0107] Implementers can also use any other applicable sequence pattern mining algorithm, such as the PrefixSpan algorithm, to perform sequence pattern mining and obtain the learned sequence patterns of behavioral sequences.
[0108] In this embodiment of the disclosure, sequence patterns can be mined from behavior sequences to identify the sequential relationship between user behaviors, i.e., which behaviors always occur successively. These consistently sequential behaviors are likely derived from certain user habits. Therefore, by mining sequence patterns from behavior sequences and identifying these patterns as user behavioral habit features, it is possible to characterize behavioral habits that always manifest as multiple behaviors occurring successively.
[0109] Figure 5 This disclosure illustrates a system architecture used in another embodiment of the present disclosure to extract user behavior habit features based on behavior sequences.
[0110] exist Figure 5 In the embodiment of this disclosure shown, the behavioral habit model 502 is used to perform sequence pattern mining on the behavioral sequence 501 to obtain behavioral habit features 503. The behavioral habit model 502 includes:
[0111] Using an association rule mining algorithm 5021 (e.g., Apriori algorithm, FP-Growth algorithm, etc.), association rules are mined based on the behavior sequence 501 to obtain at least one association rule between behaviors;
[0112] The sequence pattern mining algorithm 5022 is used to mine sequence patterns based on behavior sequences (e.g., GSP algorithm, PrefixSpan algorithm, etc.) to obtain the sequence patterns of behavior sequences.
[0113] By fusing association rules and sequence patterns, the behavioral characteristics of each user are obtained.
[0114] The fusion method can be: splicing, weighted summation, or fusing association rules and sequence patterns through any applicable function.
[0115] Sequence pattern mining identifies the sequential order of data within a sequence dataset; association rules identify concurrent relationships between data within a dataset. Association rule mining does not focus on the sequential order of transactions, while sequence pattern mining does consider the sequential order of sequences. Therefore, association rules and sequence patterns can complement each other.
[0116] In this embodiment of the disclosure, the behavioral habit features extracted in the above manner include both the association rules between each behavior in the behavioral sequence and the sequence pattern of the behavioral sequence. Therefore, more comprehensive information related to user behavioral habits can be obtained, thereby making the behavioral habit features richer and more comprehensive.
[0117] Based on the user habit characteristics obtained, these characteristics can be further applied to personalized services, evaluations, or applications related to user behavior, significantly improving the user experience.
[0118] For example, when constructing application models such as personalized recommendation models and models analyzing the impact of behavioral habits on a specific time period, user behavioral habit characteristics are also included as one of the model features. In the actual application of the model, the aforementioned feature extraction methods are used to extract user behavioral habit characteristics from user behavior data. Then, these behavioral habit characteristics are input into the application model to obtain the output results. The relationship between the output results of behavioral habit characteristics is analyzed to obtain the degree of influence of user behavioral habit characteristics on the model results.
[0119] Figure 6 This illustration demonstrates another embodiment of the present disclosure, in which user habit features extracted by the above method are applied to the model features and causal relationship inference graph of a user retention causal judgment model. In this embodiment, the causal judgment model attempts to collect user attributes, such as age, gender, and city level, as basic model features, and add some features of user usage of product modules. Finally, it determines which of the above features have a causal relationship with the user retention outcome when a certain function of the product changes, i.e., which features will lead the user to continue using the product (retention).
[0120] in, Figure 6 The left side shows a causal relationship inference diagram using static attributes such as "whether the user is a search user" and "whether the user is a novel user" as model features. The causal results obtained using this inference method cannot explain why "whether the user is a novel user" or "whether the user is a search user" affects user retention. For example, when the novel product module undergoes operational changes, even among "novel users," those who only register as novel users but don't frequently use the app will be almost unaffected, while those who frequently use the app may be affected. Furthermore, among frequent novel users, for those whose operational changes align with their usage habits, the change is a positive factor; conversely, for those whose operational changes contradict their usage habits, the change is a negative factor.
[0121] Therefore, in this embodiment of the disclosure, user behavior habit features such as "whether one is accustomed to using search" and "whether one is accustomed to reading novels" are used to replace the aforementioned static features as model features, such as... Figure 6 The causal relationship inference diagram shown on the right better explains why, when the novel product module undergoes operational changes, some users remain (the operational changes align with user behavior habits), while others churn (the operational changes contradict user behavior habits).
[0122] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0123] According to embodiments of this disclosure, this disclosure also provides a feature extraction apparatus, such as... Figure 7 As shown, the device 70 includes: a behavior sequence acquisition module 701, used to acquire the behavior sequence of each user based on user behavior data, the behavior sequence including at least one behavior arranged in chronological order; and a behavior habit feature determination module 702, used to extract the relationship information and / or pattern information between behaviors based on the behavior sequence to obtain the behavior habit features of each user.
[0124] According to one embodiment of this disclosure, the user behavior data includes session information, and accordingly, the behavior sequence acquisition module 701 is specifically used to acquire the behavior sequence of each user in each session based on the user behavior data.
[0125] According to one embodiment of this disclosure, the behavior habit feature determination module 702 includes: an association rule mining submodule, used to perform association rule mining on the behavior sequence to obtain at least one association rule between behaviors; and a behavior habit feature determination submodule, used to determine the association rule as the behavior habit feature of each user.
[0126] According to one embodiment of this disclosure, the association rule mining submodule includes: a frequent itemset discovery unit, used to discover frequent itemsets from the behavior sequence by taking each behavior and the combination of behaviors in the behavior sequence as items and according to a set first minimum support; and a strong association rule discovery unit, used to determine at least one strong association rule between behaviors based on the frequent itemsets and the set minimum confidence.
[0127] According to one embodiment of this disclosure, the behavior habit feature determination module 702 includes: a sequence pattern mining submodule, used to mine the sequence pattern of the behavior sequence to obtain the sequence pattern of the behavior sequence; and a behavior habit feature determination submodule, used to determine the sequence pattern as the behavior habit feature of each user.
[0128] According to one embodiment of this disclosure, the sequence pattern mining submodule includes: a frequent subsequence discovery unit, configured to determine frequent subsequences from the behavior sequence whose support is greater than or equal to the second minimum support, based on a set second minimum support; and a sequence pattern determination unit, configured to determine the frequent subsequences as sequence patterns of the behavior sequence.
[0129] According to an embodiment of this disclosure, the behavior habit feature determination module 702 includes: an association rule mining submodule, used to mine association rules based on a behavior sequence to obtain at least one association rule between behaviors; a sequence pattern mining submodule, used to mine sequence patterns based on a behavior sequence to obtain a sequence pattern of the behavior sequence; and a behavior habit feature fusion submodule, used to fuse the association rules and sequence patterns to obtain the behavior habit features of each user.
[0130] According to an embodiment of the present disclosure, the apparatus 70 further includes: a behavior habit feature application module, used to input behavior habit features into an application model and obtain an output result, wherein the model features of the application model include behavior habit features.
[0131] According to an embodiment of the apparatus disclosed herein, the behavioral habit feature application module is specifically used to input behavioral habit features into a causal relationship inference model to obtain the causal relationship between the behavioral habit features and a specified result.
[0132] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0133] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0134] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0135] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0136] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the feature extraction method of the embodiments of this disclosure. For example, in some embodiments, the feature extraction method of the embodiments of this disclosure may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the feature extraction method of the embodiments of this disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the feature extraction method of the embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0137] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0138] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0139] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0141] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0142] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0143] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A feature extraction method, comprising: Based on user behavior data, obtain a behavior sequence for each user, the behavior sequence including at least one behavior arranged in chronological order; Based on the behavior sequence, association rules are mined to obtain association rules between the at least one behavior; Based on the behavior sequence, sequence pattern mining is performed to obtain the sequence pattern of the behavior sequence; The association rules and the sequence patterns are fused to obtain the behavioral habit characteristics of each user.
2. The method according to claim 1, wherein, The user behavior data includes session information. Accordingly, obtaining the behavior sequence of each user based on user behavior data includes: Based on user behavior data, obtain the behavior sequence of each user in each session.
3. The method according to claim 1, wherein, The association rule mining is performed on the behavior sequence to obtain the association rules between the at least one behavior, including: Each behavior and combination of behaviors in the behavior sequence is taken as an item, and frequent itemsets are found from the behavior sequence according to the set first minimum support. Based on the frequent itemsets and the set minimum confidence level, a strong association rule between the at least one behavior is determined.
4. The method according to claim 1, wherein, The step of mining the sequence pattern of the behavior sequence to obtain the sequence pattern of the behavior sequence includes: Based on the set second minimum support, determine the frequent subsequences from the behavior sequence whose support is greater than or equal to the second minimum support; The frequent subsequences are used to determine the sequence pattern of the behavioral sequence.
5. The method according to claim 1, further comprising: The behavioral habit features are input into the application model to obtain the output results. The model features of the application model include the behavioral habit features.
6. The method according to claim 1, wherein, The behavioral habit features are input into the application model to obtain the output results, including: The behavioral habit features are input into the causal relationship inference model to obtain the causal relationship between the behavioral habit features and the specified result.
7. A feature extraction apparatus, comprising: The behavior sequence acquisition module is used to acquire the behavior sequence of each user based on user behavior data, wherein the behavior sequence includes at least one behavior arranged in chronological order. A behavior habit feature determination module, comprising: an association rule mining submodule, used to mine association rules based on the behavior sequence to obtain association rules between the at least one behavior; The sequence pattern mining submodule is used to mine sequence patterns based on the behavior sequence to obtain the sequence patterns of the behavior sequence; the behavior habit feature fusion submodule is used to fuse the association rules and the sequence patterns to obtain the behavior habit features of each user.
8. The apparatus according to claim 7, wherein, User behavior data includes session information. Accordingly, the behavior sequence acquisition module is specifically used to acquire the behavior sequence of each user in each session based on the user behavior data.
9. The apparatus according to claim 7, wherein, The association rule mining submodule includes: The frequent itemset discovery unit is used to take each behavior and the combination of behaviors in the behavior sequence as an item, and discover frequent itemsets from the behavior sequence according to a set first minimum support. A strong association rule discovery unit is used to determine strong association rules between the at least one behavior based on the frequent itemsets and a set minimum confidence level.
10. The apparatus according to claim 7, wherein, The sequence pattern mining submodule includes: A frequent subsequence discovery unit is used to determine frequent subsequences from the behavior sequence whose support is greater than or equal to the second minimum support, based on a set second minimum support. A sequence pattern determination unit is used to determine the sequence pattern of the behavior sequence from the frequent subsequences.
11. The apparatus according to claim 7, further comprising: The behavioral habit feature application module is used to input the behavioral habit features into the application model and obtain the output results. The model features of the application model include the behavioral habit features.
12. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Patent Citations
Smart home user manipulation behavior recommendation method based on temporal causality analysis
CN109542944A