WO2021139437A1 - 事件序列数据的处理方法、装置、电子设备 - Google Patents

事件序列数据的处理方法、装置、电子设备 Download PDF

Info

Publication number
WO2021139437A1
WO2021139437A1 PCT/CN2020/132133 CN2020132133W WO2021139437A1 WO 2021139437 A1 WO2021139437 A1 WO 2021139437A1 CN 2020132133 W CN2020132133 W CN 2020132133W WO 2021139437 A1 WO2021139437 A1 WO 2021139437A1
Authority
WO
WIPO (PCT)
Prior art keywords
event
sequence data
feature vector
occurrence
event sequence
Prior art date
Application number
PCT/CN2020/132133
Other languages
English (en)
French (fr)
Inventor
赖清泉
侯宪龙
徐莎
贾佳
方俊
陈侃
陈知己
曾小英
冯力国
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021139437A1 publication Critical patent/WO2021139437A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • This application relates to the field of machine learning technology, in particular to processing methods, devices, and electronic equipment for event sequence data.
  • Machine learning technology has undergone significant changes in the past decade, from pure academic research in the laboratory to a wide range of applications in various production fields, such as the financial industry, e-commerce retail industry, IT industry, and medical industry.
  • a machine learning model is essentially an algorithm that tries to learn potential patterns and relationships from data, rather than building rigid rules through code.
  • This application provides a method for processing event sequence data.
  • the method includes: respectively generating corresponding initialization feature vectors for each event included in a preset event set; reading the event sequence data sequentially from the event sequence data set, and calculating A co-occurrence matrix corresponding to the read event sequence data; wherein the co-occurrence matrix is a matrix generated based on the co-occurrence probability between the events contained in the event sequence data; and the co-occurrence matrix
  • the co-occurrence probability included in the matrix is used as a constraint, and the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain an input feature vector corresponding to each event included in the event set;
  • the event sequence data is encoded based on the input feature vector corresponding to each event included in the event set; wherein the encoded event sequence data is used as input data to be input to a machine learning model for calculation.
  • the co-occurrence probability is the probability that each target event included in the event sequence data and each other event other than the target event appear together in the event sequence data; the co-occurrence matrix The rows of the co-occurrence matrix correspond to each target event, and the columns of the co-occurrence matrix correspond to other events other than each target event; or, the columns of the co-occurrence matrix correspond to each target event, and the rows of the co-occurrence matrix correspond to each target event. Other events.
  • each target event includes a central event of the sliding window when a sliding window of a preset size is slid in the event sequence data; the method further includes: setting a sliding window of a preset size Slide in the event sequence data, and determine the center event of the sliding window for each sliding; calculate the center event of the sliding window in turn, and each other than the center event contained in the event sequence data Other events, the co-occurrence probability in the event sequence data.
  • the sequential calculation of the co-occurrence probability of the central event of the sliding window and the events other than the central event included in the event sequence data in the event sequence data includes: statistics The event distances between each other event other than each central event included in the event sequence data and the central event; based on the event distance between each other event and the central event, calculate the relationship between each other event and the central event in sequence. State the co-occurrence probability of the central event.
  • the reciprocal of the event distance between the other events and the central event is used to characterize the co-occurrence probability of the other events and the central event.
  • the step of generating a corresponding initialization feature vector for each event included in the preset event set includes: randomly generating a corresponding initialization feature vector for each event included in the preset event set.
  • the co-occurrence probability is used as a constraint
  • the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain the corresponding events included in the event set
  • the input feature vector includes: iteratively execute the following training steps until the input feature vector corresponding to each event contained in the event set is obtained: input the initial feature vector corresponding to the event related to the co-occurrence probability to the
  • the co-occurrence probability is used as a constrained loss function, and the output value of the loss function is calculated; wherein, the loss function characterizes an event related to the co-occurrence probability corresponding to an initial feature vector to approximate the degree of the co-occurrence probability; adjust;
  • the initialization eigenvector solves the minimum value of the output value of the loss function; when the minimum value is solved, the adjusted initialization eigenvector input to the loss function is determined to co-occur with the The probability-related events correspond to the input feature vector.
  • the loss function characterizes the inner product of the initial eigenvector corresponding to the event related to the co-occurrence probability to the degree to which the logarithm of the co-occurrence probability is approximated; and the co-occurrence matrix includes The initialization feature vector corresponding to the event related to the co-occurrence probability is input to the loss function with the co-occurrence probability as a constraint, and the calculation of the output value of the loss function includes: calculating the initialization corresponding to the event related to the co-occurrence probability The inner product of the feature vector is input, and the calculated inner product is input to a loss function with the logarithm of the co-occurrence probability as a constraint, and the output value of the loss function is calculated.
  • the loss function is characterized based on the following formula:
  • J represents the output value of the loss function
  • i and j represent any two events in the event set
  • C(i,j) represents the co-occurrence probability of events i and j in the co-occurrence matrix
  • the value of E is M 2
  • M represents The total number of categories of each event included in the event set
  • f(x) represents a weight function.
  • the f(x) is an interval function with C(i, j) included in the co-occurrence matrix as a variable.
  • the f(x) is characterized based on the following formula:
  • d represents 0 or a minimum value tending to 0
  • S represents a threshold corresponding to C(i, j) contained in the co-occurrence matrix.
  • the encoding each event sequence data in the event sequence data set based on the input feature vector corresponding to the events included in the event set includes: based on each event included in the event set Corresponding input feature vectors are vector-joined according to the sequence of events in the event sequence data to obtain the event sequence vector corresponding to the event sequence data.
  • the event includes a user's operation behavior event for the user account;
  • the machine learning model is a risk identification model that performs risk identification for the user account.
  • the event sequence data set includes a normal event sequence data set and an abnormal event sequence data set; correspondingly, the co-occurrence matrix includes event sequence data read from a normal event sequence data set.
  • the eigenvectors include: for events included in a preset event set, an initialization eigenvector corresponding to the first co-occurrence matrix and an initialization eigenvector corresponding to the second co-occurrence matrix are respectively generated.
  • the co-occurrence probability included in the co-occurrence matrix is used as a constraint
  • the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain
  • the input feature vector corresponding to each event included in the set includes: based on a preset first loss function corresponding to the first co-occurrence matrix, taking the co-occurrence probability contained in the first co-occurrence matrix as a constraint, and Training the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set to obtain a first input feature vector corresponding to each event included in the event set corresponding to the first co-occurrence matrix; Based on a preset second loss function corresponding to the second co-occurrence matrix, the co-occurrence probability contained in the second co-occurrence matrix is used as a constraint, and the co-occurrences included in the event set are constrained
  • the initialization feature vector corresponding to the probability-related event is trained to obtain the second input feature vector corresponding to each event included in the event set corresponding to the second co-occurrence matrix;
  • the splicing the first input feature vector and the second input feature vector to generate an input feature vector corresponding to each event included in the event set includes: combining the first input feature vector and the second input feature vector , Vertical splicing generates input feature vectors corresponding to each event included in the event set.
  • the present application also provides a device for processing event sequence data, the device comprising: a generating module that generates corresponding initialization feature vectors for each event included in a preset event set; a calculation module that reads sequentially from the event sequence data set Take event sequence data, and calculate a co-occurrence matrix corresponding to the read event sequence data; wherein, the co-occurrence matrix is generated based on the co-occurrence probability between events contained in the event sequence data Matrix; a training module that takes the co-occurrence probability contained in the co-occurrence matrix as a constraint, and trains the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set to obtain the event set
  • the co-occurrence probability is the probability that each target event included in the event sequence data and each other event other than the target event co-occur in the event sequence data; the co-occurrence matrix The rows of the co-occurrence matrix correspond to each target event, and the columns of the co-occurrence matrix correspond to other events other than each target event; or, the columns of the co-occurrence matrix correspond to each target event, and the rows of the co-occurrence matrix correspond to each target event. Other events.
  • each target event includes a central event of the sliding window when a sliding window of a preset size is slid in the event sequence data; the calculation module further: a sliding window of a preset size Slide in the event sequence data, and determine the center event of the sliding window for each sliding; calculate the center event of the sliding window in turn, and each other than the center event contained in the event sequence data Other events, the co-occurrence probability in the event sequence data.
  • the calculation module further: counts the event distances between each other event other than the central event included in the event sequence data and the central event; and events based on the other events and the central event Distance, calculate the co-occurrence probability of each other event and the central event in sequence.
  • the reciprocal of the event distance between the other events and the central event is used to characterize the co-occurrence probability of the other events and the central event.
  • the generating module further: randomly generates corresponding initialization feature vectors for each event included in the preset event set.
  • the training module further: iteratively execute the following training steps until the input feature vector corresponding to each event included in the event set is obtained: input the initial feature vector corresponding to the event related to the co-occurrence probability to Use the co-occurrence probability as the constrained loss function to calculate the output value of the loss function; wherein, the loss function characterizes the event corresponding to the co-occurrence probability and initializes the feature vector to approximate the co-occurrence probability. Degree; adjust the initialization eigenvector to solve the minimum value of the output value of the loss function; when the minimum value is solved, the adjusted initialization eigenvector input to the loss function is determined to be the same as the The events related to the co-occurrence probability correspond to the input feature vector.
  • the loss function characterizes the inner product of the initialization feature vector corresponding to the event related to the co-occurrence probability, and the degree to which the logarithm of the co-occurrence probability is approximated; the training module further: calculates the co-occurrence probability Initialize the inner product of the feature vector corresponding to the probability-related event, and input the calculated inner product into a loss function with the logarithm of the co-occurrence probability as a constraint, and calculate the output value of the loss function.
  • the loss function is characterized based on the following formula:
  • J represents the output value of the loss function
  • i and j represent any two events in the event set
  • C(i,j) represents the co-occurrence probability of events i and j in the co-occurrence matrix
  • the value of E is M 2
  • M represents The total number of categories of each event included in the event set
  • f(x) represents a weight function.
  • the f(x) is an interval function with C(i, j) included in the co-occurrence matrix as a variable.
  • the f(x) is characterized based on the following formula:
  • d represents 0 or a minimum value tending to 0
  • S represents a threshold corresponding to C(i, j) contained in the co-occurrence matrix.
  • the encoding module further: based on the input feature vector corresponding to each event included in the event set, perform vector splicing in accordance with the sequence of each event in the event sequence data to obtain the sequence of events.
  • the event sequence vector corresponding to the data is
  • the event includes a user's operation behavior event for the user account;
  • the machine learning model is a risk identification model that performs risk identification for the user account.
  • the event sequence data set includes a normal event sequence data set and an abnormal event sequence data set; correspondingly, the co-occurrence matrix includes event sequence data read from a normal event sequence data set.
  • the corresponding first co-occurrence matrix, and the second co-occurrence matrix corresponding to the event sequence data read from the abnormal event sequence data set; the generating module is further: the events included in the preset event set, respectively An initialization feature vector corresponding to the first co-occurrence matrix and an initialization feature vector corresponding to the second co-occurrence matrix are generated.
  • the training module is further: based on a preset first loss function corresponding to the first co-occurrence matrix, the co-occurrence probability contained in the first co-occurrence matrix is used as a constraint, and the event is The initialization feature vector corresponding to the event related to the co-occurrence probability included in the set is trained to obtain the first input feature vector corresponding to each event included in the event set corresponding to the first co-occurrence matrix; based on a preset The preset second loss function corresponding to the second co-occurrence matrix is subject to the co-occurrence probability contained in the second co-occurrence matrix as a constraint, and the events related to the co-occurrence probability contained in the event set The initialization feature vector corresponding to the event is trained to obtain the second input feature vector corresponding to each event included in the event set corresponding to the second co-occurrence matrix; the first input feature vector and the second input feature vector are spliced An input feature vector corresponding to each event included in the event set is generated.
  • the training module further: vertically splicing the first input feature vector and the second input feature vector to generate an input feature vector corresponding to each event included in the event set.
  • the present application also provides an electronic device, including a communication interface, a processor, a memory, and a bus.
  • the communication interface, the processor, and the memory are connected to each other through a bus; the memory stores machine-readable instructions,
  • the processor executes the above-mentioned method by invoking the machine-readable instruction.
  • the present application also provides a machine-readable storage medium, the machine-readable storage medium stores machine-readable instructions, and the machine-readable instructions implement the above-mentioned method when called and executed by a processor.
  • the corresponding initialization feature vector is generated based on each event included in the preset event set; the event sequence data is sequentially read from the event sequence data set, and the correspondence with the read event sequence data is calculated
  • the co-occurrence matrix wherein the co-occurrence matrix is a matrix generated based on the co-occurrence probability between the events contained in the event sequence data; the co-occurrence probability contained in the co-occurrence matrix is used as a constraint,
  • the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain the input feature vector corresponding to each event included in the event set; based on each event included in the event set
  • the corresponding input feature vector encodes the event sequence data; wherein the encoded event sequence data is used as input data to be input to the machine learning model for calculation; on the one hand, it improves the impact of event coding on the normal and abnormal behaviors of users
  • the information density of the two-layer representation of the sparse coding can overcome the low information density and dimensional disasters caused by sparse
  • Fig. 1 is a flowchart of a method for processing event sequence data according to an exemplary embodiment
  • Fig. 2 is a schematic diagram of a sliding window of event sequence data provided by an exemplary embodiment
  • Fig. 3 is a hardware structure diagram of an electronic device provided by an exemplary embodiment
  • Fig. 4 is a block diagram of a device for processing event sequence data provided by an exemplary embodiment.
  • first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.
  • the user account's operational behavior events (such as: logging in to the Alipay application, changing passwords, withdrawals, etc.) can be recorded and saved by the application backend, so that the application backend can be machine-based Learn the risk identification model built by technology to identify users' risks.
  • the equipped machine learning model is used as a risk identification model for risk identification of user accounts, and model training is performed.
  • the application background performs risk identification based on the trained risk identification model to predict user accounts with abnormal operating behaviors.
  • the operation behavior event of the user account is an oral expression based on human language.
  • the behavior event (hereinafter referred to as “event”) needs to be coded.
  • One-hot encoding is a commonly used, extremely sparse, high-dimensional encoding method.
  • the length of the event code corresponding to the event is the total number of all event categories, and the encoding of a particular event is set to 1 in the corresponding position and 0 in the remaining positions.
  • N categories of events there are N categories of events (user login, password modification, withdrawal, QR code creation, record deletion,..., logout)
  • the length of the event code output based on the One-hot code is N, that is, the number of bits of the event code includes 1, 2, 3,...N.
  • the value of digit 1 of the event code corresponding to the "user login” event as 1, and define the value of digit 2 of the event code corresponding to the "modify password” event as 1, and so on.
  • the corresponding event codes of N categories of events (user login, password modification, withdrawal, QR code creation,..., logout) output based on One-hot encoding please refer to the following table 1 example:
  • [10...000] represents the "user login” event
  • [01...000] represents the "password modification” event
  • [001...00] represents the “withdraw” event
  • [0001...0] represents the “create two” event.
  • "Dimension Code” event [00001...0] represents the "Delete Record” event,..., [00000...1] represents the "Logout” event.
  • the One-hot encoding method has the following three shortcomings.
  • Event sequence such as: user login, modification The context (other events that occurred before and after the single event) in passwords, withdrawals, creation of QR codes, deletion of records,..., logout), therefore, event encoding based on One-hot encoding cannot represent a single event The semantics associated with other events in the sequence of events.
  • Embedding encoding is a calculation method that converts high-dimensional data or discrete data to low-dimensional data or continuous data. It is widely used in natural language processing, bioinformatics and other fields.
  • the core essence of the Embedding encoding method is an encoding method that uses machine learning to learn the low-dimensional and high-density features of each sequence element from the sequence.
  • the event encoding is usually based on the Embedding encoding method
  • the labels corresponding to the event sequence (the label indicates whether the event sequence is a real user behavior, for example, if it is an event sequence of real user behavior, the corresponding label value is 1, otherwise, the corresponding label value is 0), which is input as a training sample
  • the tag value is used as a constraint for training, so as to obtain the event coding based on Embedding coding.
  • the event encoding process based on Embedding encoding described above can greatly reduce the dimension of event encoding and increase the information density of event encoding compared to the event encoding process based on One-hot encoding.
  • there is a normal event sequence based only on the normal behavior of the user.
  • the shortcomings of sampling and coding are that it cannot characterize the characteristics and event associations of the abnormal event sequence corresponding to the user's abnormal behavior; and, there is a problem of low coding efficiency that requires additional machine learning models for indirect learning and output event coding.
  • this specification intends to propose a method based on the event sequence data read from the event sequence data set and the calculated co-occurrence matrix corresponding to the event sequence data, and the corresponding to the events contained in the event set
  • the feature vector is used for vector training and the technical solution of encoding event sequence data, so that the encoded event sequence data with two-layer behavior characteristics that characterize the user's normal and abnormal behavior is used as input data to be input to the machine learning model for rapid Calculation.
  • the corresponding initialization feature vector is generated for each event included in the preset event set; the event sequence data is sequentially read from the event sequence data set, and the total value corresponding to the read event sequence data is calculated.
  • Present matrix wherein, the co-occurrence matrix is a matrix generated based on the co-occurrence probability between the events included in the event sequence data.
  • the co-occurrence probability contained in the co-occurrence matrix is used as a constraint, and the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set is trained to obtain the co-occurrence probability contained in the event set.
  • the event sequence data is encoded based on the input feature vector corresponding to each event included in the event set; wherein the encoded event sequence data is used as input data to be input to a machine learning model for calculation.
  • the corresponding initialization feature vector is generated for each event included in the preset event set; the event sequence data is sequentially read from the event sequence data set, and the event sequence data read is calculated and read.
  • Corresponding co-occurrence matrix wherein, the co-occurrence matrix is a matrix generated based on the co-occurrence probability between events contained in the event sequence data; taking the co-occurrence probability contained in the co-occurrence matrix as a constraint,
  • the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain the input feature vector corresponding to each event included in the event set;
  • the input feature vector corresponding to the event encodes the event sequence data; wherein the encoded event sequence data is used as input data to be input to the machine learning model for calculation; on the one hand, it improves the impact of event encoding on the user’s normal behavior and abnormalities.
  • the information density of the two-layer representation of behavior overcomes the low information density and dimensional disasters brought about by sparse coding; on the other hand, only a small amount of event sequence data can be used for the coding calculation of events and event sequence data, which improves coding efficiency.
  • FIG. 1 is a flowchart of an event sequence data processing method provided by an embodiment of this specification. The method is applied to the event sequence data processing terminal, and the above method executes step 102 to step 108.
  • Step 102 Generate corresponding initialization feature vectors for each event included in the preset event set.
  • Step 104 Read event sequence data sequentially from the event sequence data set, and calculate a co-occurrence matrix corresponding to the read event sequence data; wherein, the co-occurrence matrix is based on the event sequence data included The matrix generated by the co-occurrence probability between each event.
  • Step 106 Using the co-occurrence probability contained in the co-occurrence matrix as a constraint, train the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set to obtain The input feature vector corresponding to each event.
  • Step 108 Encode the event sequence data based on the input feature vector corresponding to each event included in the event set; wherein the encoded event sequence data is used as input data to be input to a machine learning model for calculation.
  • the aforementioned events can include any event type.
  • the above-mentioned event may include an operation behavior event of the user with respect to the user account.
  • the aforementioned events may include any of the following operation behavior events of the user with respect to the user account: user login, password modification, withdrawal, QR code creation, record deletion,..., logout.
  • the aforementioned events may also include operation behavior events performed by the user without logging in to the user account.
  • the types and operation scenarios of the above events are not specifically limited in this specification.
  • the above-mentioned event set refers to a set including the above-mentioned events of different event types.
  • the above event may include any of the following actions of the user with respect to the user account: user login, password modification, withdrawal, QR code creation, deletion of records,..., logout, then the above event set may be ⁇ "User Login”, “Modify Password”, “Withdraw”, “Create QR Code”, “Delete Record”, ..., “Logout” ⁇ .
  • the aforementioned event set is a preset complete set of event types corresponding to the aforementioned events, that is, the event types of multiple aforementioned events included in the aforementioned event set cannot be repeated.
  • the aforementioned event sequence data is an event sequence constructed in any combination and quantity including a plurality of the aforementioned events.
  • the above event sequence data can include a plurality of the above events, an event sequence constructed in any combination and quantity, for example: the above event sequence data can include: [EA, EB], [EA, EB, EC], [EB, EC, ED, EE, EN], [EA, EN] or [EA, EB, EC, ED, EE,..., EN], [EA, ED, EC, EC, EE, EC, Any one of EE].
  • sequence length of the event sequence data that is, the number of events that construct the event sequence data
  • sequence content that is, the permutation and combination of the events that construct the event sequence data
  • the above-mentioned event sequence data set is a set including one or more of the above-mentioned event sequence data.
  • the above event sequence data can be [EA, EB], [EA, EB, EC], [EB, EC, ED, EE, EN], [EA, EN], [EA, EB, EC , ED, EE,..., EN], [EA, ED, EC, EC, EE, EC, EE], the above event sequence data set can be ⁇ [EA, EB] , [EA, EB, EC], [EB, EC, ED, EE, EN], [EA, EN], [EA, EB, EC, ED, EE,..., EN], [EA, ED, EC, EC, EE, EC, EE] ⁇ or a collection of any number of the above event sequence data.
  • the number of collection elements of the event sequence data set that is, the number of event sequence data that constructs the event sequence data set
  • the content of each collection element that is, the number of event sequence data in the event sequence data set
  • the sequence content of each of the above-mentioned event sequence data is not specifically limited in this specification.
  • the foregoing event sequence data set includes a normal event sequence data set and an abnormal event sequence data set
  • the above-mentioned normal event sequence data set refers to the above-mentioned normal event sequence data constructed from the above-mentioned events corresponding to the normal operation behavior of the user with respect to the user account, and the normal event sequence data corresponding to the normal above-mentioned event sequence data is constructed from the normal event sequence data. set;
  • the aforementioned abnormal event sequence data set refers to the construction of the abnormal event sequence data corresponding to the aforementioned events corresponding to the abnormal operation behavior of the user on the user account, and the abnormal event sequence data set corresponding to the abnormal construction of the abnormal event sequence data.
  • the aforementioned event sequence data processing end may include a machine or a cluster of machines that performs event sequence data processing on the aforementioned event sequence data set.
  • the aforementioned event sequence data processing terminal may be a machine or a cluster of machines deployed locally or in the cloud that processes the event sequence data on the aforementioned event sequence data set.
  • the event sequence data processing terminal generates corresponding initialization feature vectors for each event included in the event set
  • the above-mentioned initialization feature vector that is, the event code corresponding to each event included in the above-mentioned event set, respectively.
  • event code corresponding to each event included in the above-mentioned event set
  • the above event set can be ⁇ "User Login", “Modify Password”, “Withdraw”, “Create QR Code”, “Delete Record”, ..., “Logout” ⁇
  • the initialization feature vector corresponding to the events included in the above event set can correspond to the initialization feature vector EA_IV corresponding to "User Login”, the initialization feature vector EB_IV corresponding to "Modify Password”, the initialization feature vector EC_IV corresponding to "Withdraw”,
  • EN_IV corresponding to "Logout.
  • the length of the vector of the initialization feature vector corresponding to each event included in the above-mentioned event set can be set based on user configuration, and is not specifically limited in this specification.
  • the event sequence data processing terminal randomly generates corresponding initialization for each event included in the event set. Feature vector.
  • the event sequence data processing terminal randomly generates corresponding initialization feature vectors for each event included in the event set; wherein, the vector content of each initialization feature vector is a random value.
  • the above event set can be ⁇ "User Login", “Modify Password”, “Withdraw”, “Create QR Code”, “Delete Record”, ..., “Logout” ⁇
  • the initialization feature vector corresponding to each event included in the above event set can correspond to the initialization feature vector EA_IV corresponding to ⁇ "User Login", the initialization feature vector EB_IV corresponding to "Modify Password”, and the initialization feature vector EC_IV corresponding to "Withdraw” , "Create a QR code” corresponding to the initialization feature vector ED_IV, "Delete Record” corresponding to the initialization feature vector EE_IV, ..., “Logout” corresponding to the initialization feature vector EN_IV ⁇ ; where EA_IV, EB_IV, EC_IV, ED_IV , EE_IV,..., and EC_IV, the corresponding vector contents are random values.
  • the aforementioned co-occurrence probability refers to the probability of simultaneous occurrence of any two of the aforementioned events in the aforementioned event set in the aforementioned event sequence data read in the aforementioned event sequence data set.
  • the above event set may be ⁇ EA, EB, EC, ED, EE,..., EN ⁇ ; among them, EA represents the "user login” event, EB represents the “modify password” event, and EC represents “Withdraw” event, ED characterizes “Create QR code” event, EE characterizes "Delete Record” event, ..., EN characterizes "Logout” event;
  • the above event sequence data read in the above event sequence data set can be Including: ⁇ [EA, EB], [EA, EB, EC], [EB, EC, ED, EE, EN], [EA, EN], [EA, EB, EC, ED, EE,..., EN], [EA, ED, EC, EC, EE, EC, EE] ⁇ ; then the above co-occurrence probability is ⁇ EA, EB, EC, ED, EE,..., EN ⁇ event concentration Any two events, the event sequence data read in
  • the above-mentioned co-occurrence probability is the probability that each target event included in the above-mentioned event sequence data and each other event other than the above-mentioned target event appear together in the above-mentioned event sequence data.
  • each target event contained in the above event sequence data may be each event A in the above event sequence data, and each other event other than each of the above target events may be each event other than each event A in the above event sequence data.
  • the above-mentioned co-occurrence probability is the probability that each event A and each other event B appear together in the above-mentioned event sequence data.
  • each target event contained in the above event sequence data can be each event in the event sequence data (EA, ED, EC, EC, EE, EC, EE, EC, EE), when the target event is the leftmost EA in the event sequence data, all events other than the target event include those other than EA Events (ED, EC, EC, EE, EC, EE, EC, EE), the co-occurrence probability of the target event and the events other than the target event is: "the leftmost EA", which is the same as "ED , EC, EC, EE, EC, EE, EC, EE" the probability of each event occurring at the same time;
  • the target event is the leftmost ED in the event sequence data
  • all other events except the target event include events other than ED (EA, EC, EC, EE, EC, EE, EC, EE)
  • the co-occurrence probability of the target event and the events other than the target event is: "The leftmost ED", which is respectively compared with the "EA, EC, EC, EE, EC, EE, EC, EE" The probability of each event occurring at the same time;
  • each event other than the target event includes events other than the EC (EA, ED, the leftmost number in the event sequence data)
  • the co-occurrence probability of other events is: "the leftmost EC", which is the same as "EA, ED, the second EC and EE from the left in the event sequence data, and the third from the left in the event sequence data.
  • EC, EE the probability that each event in the fourth EC, EE from the left in the event sequence data appears at the same time.
  • the target event can be each event (EA, ED, EC, EC, EE, EC, EE, EC, EE) from left to right in the event sequence data
  • the above co-occurrence probability is the event The probability that each target event contained in the sequence data and each other event other than the above-mentioned target events appear together in the event sequence data; the specific process is similar to the above example, and will not be repeated.
  • the aforementioned co-occurrence matrix refers to a co-occurrence matrix that is correspondingly shared with the aforementioned event sequence data read in the aforementioned event sequence data set, and uses the aforementioned co-occurrence probability as a matrix element.
  • the multiple event sequence data MultiEventSeqData read in the event sequence data set: ⁇ [EA, EB], [EA, EB, EC], [EB, EC, ED, EE, EN], [EA, EN], [EA, EB, EC, ED, EE,..., EN], [EA, ED, EC , EC, EE, EC, EE] ⁇ as the basis of the example, then the above co-occurrence matrix, please refer to the example shown in Table 2 below:
  • the rows of Table 2 represent the rows of the aforementioned co-occurrence matrix; the columns of Table 2 represent the columns of the aforementioned co-occurrence matrix.
  • the cell corresponding to the intersection of a row and a column in Table 2 represents the co-occurrence probability of an event of the above co-occurrence matrix and other events simultaneously in MultiEventSeqData, for example: EA&EA co-occurrence probability, which represents EA and EA in MultiEventSeqData
  • EA&EA co-occurrence probability which represents EA and EA in MultiEventSeqData
  • the above event set is ⁇ EA, EB, EC, ED, EE,..., EN ⁇
  • the co-occurrence probability of any two events simultaneously appearing in MultiEventSeqData will not be described in detail.
  • the event sequence data processing terminal sequentially reads the event sequence data from the event sequence data set, and calculates and reads the event sequence data.
  • the co-occurrence matrix corresponding to the event sequence data is the co-occurrence matrix corresponding to the event sequence data.
  • the event sequence data processing terminal sequentially reads the event sequence data from the event sequence data set, and calculates the co-occurrence matrix shown in Table 1 corresponding to the read event sequence data MultiEventSeqDat.
  • the event sequence data processing terminal may correspond to the row of the co-occurrence matrix as each target event contained in the read event sequence data.
  • the columns of the aforementioned co-occurrence matrix correspond to events other than the target events contained in the read event sequence data.
  • the above-mentioned event sequence data processing terminal can correspond to the central event of each event sequence data in the read event sequence data MultiEventSeqData with the rows of the co-occurrence matrix shown in Table 2, as shown in Table 2.
  • the column of the co-occurrence matrix corresponds to each event other than the central event of each event sequence data in the read event sequence data MultiEventSeqData, and the co-occurrence probability is calculated.
  • the event sequence data processing terminal may also use the columns of the co-occurrence matrix as the targets contained in the read event sequence data.
  • the rows of the aforementioned co-occurrence matrix correspond to events other than the target events included in the read event sequence data, and the co-occurrence probability is calculated.
  • the above event sequence data processing terminal can correspond to the column of the co-occurrence matrix shown in Table 2 as the central event of each event sequence data in the read event sequence data MultiEventSeqData, as shown in Table 2.
  • the row of the co-occurrence matrix shown corresponds to each event other than the central event of each event sequence data in the read event sequence data MultiEventSeqData, and the co-occurrence probability is calculated.
  • each of the foregoing target events refers to the target event of each event sequence data contained in the event sequence data read by the event sequence data processing terminal; the other events mentioned above refer to the event sequence data processing terminal. Events other than the target event in each event sequence data contained in the read event sequence data.
  • the main concern is that the event types of the above-mentioned other events and the above-mentioned target events can be the same or different.
  • each of the above-mentioned target events includes the central event of the above-mentioned sliding window when a sliding window of a preset size is slid in the above-mentioned event sequence data.
  • EventSeqData1 in MultiEventSeqData is [EA, ED, EC, EC, EE, EC, EE, EC, EE] as an example.
  • the target event in the event sequence data EventSeqData1 refers to the sliding window of a preset size (for example: the window length is 7) when the event sequence data EventSeqData1 slides, the center event of the sliding window is: the sliding window length is the window center The event corresponding to the location.
  • Fig. 2 is a schematic diagram of a sliding window of event sequence data provided by an exemplary embodiment of the present specification.
  • the event sequence data EventSeqData1 includes [EA, ED, EC, EC, EE, EC, EE, EC, EE]; among them, each sequence element in EventSeqData1 is an event with user operation context; event sequence
  • the sliding window of the data EventSeqData1 is shown in the dashed box shown in FIG. 2, and the window length of the sliding window is 7, that is, the sliding window corresponds to 7 events in the event sequence data EventSeqData1 when sliding.
  • the "sliding direction" shown in FIG. 2 represents that the sliding window slides from the left to the right of the event sequence data EventSeqData1.
  • the event EE of the event sequence data EventSeqData1 corresponding to the middle position of the sliding window is the central event of the sliding window (EE with diagonal lines in FIG. 2).
  • events other than the center event included in the event sequence data refer to events other than the center event of the sliding window included in each sequence data in the read event sequence data MultiEventSeqData.
  • Other events For example: as shown in Figure 2, when the central event of the sliding window of the event sequence data EventSeqData1 is EE (EE with a slash), events other than the central event EE (EE with a slash) include those shown in Figure 2.
  • the events in the sliding window except EE (EE with slash) include: ED, EC, EC on the left side of EE (EE with slash) in the sliding window as shown in Figure 2. Shows EC, EE (EE without slash), EC on the right side of EE (EE with slash) in the sliding window.
  • the event sequence data processing terminal sets a sliding window of a preset size on each event in the event sequence data. Sliding is performed in the sequence data, and the co-occurrence probability of the central event of the sliding window and each other event included in the event sequence data other than the central event in the event sequence data is sequentially calculated.
  • the event sequence data processing terminal slides a sliding window of a preset size on the event sequence data EventSeqData1, and sequentially calculates the central event of the sliding window and the events other than the central event contained in each event sequence data. For each other event, the co-occurrence probability in the event sequence data EventSeqData1.
  • the event sequence data processing terminal counts the event distance between each other event included in the event sequence data and the central event; based on the event distance between each of the other events and the central event, calculates each event in turn.
  • the co-occurrence probability of other events and the above-mentioned central event is the co-occurrence probability of other events and the above-mentioned central event.
  • EventSeqData1 in MultiEventSeqData is [EA, ED, EC, EC, EE, EC, EE, EC, EE] as an example to continue the explanation, please refer to Figure 2.
  • the aforementioned event sequence data processing terminal determines the central event of the sliding window each time the sliding window slides; and, with each event sequence data included Each other event except the above-mentioned central event; then, the event distance between each other event and the central event is calculated; then, based on the event distance between the other event and the central event, the total of the other events and the central event are calculated respectively Now probability.
  • the event sequence data processing terminal Similar to the process of calculating the co-occurrence probability of the event sequence data EventSeqData1 in the above example, the event sequence data processing terminal also performs similar processing on each event sequence data in the read event sequence data MultiEventSeqData, and counts each event sequence data. For each event other than the central event contained in each, the event distance from the central event, based on the event distance between each other event and the central event, respectively calculate the co-occurrence probability of each other event and the central event.
  • event distance refers to the length of each event sequence data of the read event sequence data between each other event and the central event in each event sequence data.
  • the central event is EE (EE with diagonal lines)
  • other events include: EE (slashed EE) left ED, EC (slashed EE left the leftmost EC), EC (slashed EE left to the left next to the left side of the EC), as shown in the figure 2
  • the EC on the right of EE EE with slash
  • EC the EC immediately on the right of EE with slash
  • EE EE without slash
  • EC with slash
  • ED on the left side of EE (EE with slash), EC (leftmost EC on the left of EE with slash), EC (left of EE with slash on the left)
  • the next EC has an event distance of 3, 2, and 1 from the center event (EE with a diagonal line).
  • the EC on the right side of EE (EE with a slash), EE (EE without slash), EC (with the slashed EE), EC (with slashed EE)
  • the distance between the rightmost EC on the right side of the oblique line EE and the central event (the oblique line EE) is 1, 2, and 3 respectively.
  • the event sequence data processing terminal in the process of calculating the co-occurrence probability of each event other than the central event included in the event sequence data with the central event, can use the above
  • the reciprocal of the event distance between other events and the above-mentioned central event represents the co-occurrence probability of the above-mentioned other events and the above-mentioned central event.
  • the EC on the right side of EE (EE with a slash), EE (EE without slash), EC (with the slashed EE), EC (with slashed EE)
  • the rightmost EC on the right side of the slashed EE), the event distances from the central event (the slashed EE) are 1, 2, and 3 respectively, and the reciprocal of the corresponding event distances are 1, 1/2, 1 respectively /3.
  • the event distance between each other event other than the central event included in the above-mentioned event sequence data and the above-mentioned central event is calculated; and the above-mentioned other events are calculated based on the event distance between each other event and the above-mentioned central event.
  • the above-mentioned event sequence data processing terminal may use the sum of the reciprocal of the event distances of the above-mentioned other events and the above-mentioned central event as the above-mentioned each at a sliding position of the sliding window The co-occurrence probability of other events and the above-mentioned central event.
  • the co-occurrence probability of the central event (EE with a diagonal line) and EC is: EC (Including: all 4 ECs in the sliding window)
  • the sum of the reciprocal of the event distance from the center event (EE with diagonal lines) (1+1/2+1+1/3 2.83), that is, the center
  • the co-occurrence probability of the event (EE with slash) and EC (including: all 4 ECs in the sliding window) is 2.83.
  • the co-occurrence probability of the central event (EE with a diagonal line) and ED is: ED (including: all ED in the sliding window) and the central event (with a diagonal line)
  • ED including: all ED in the sliding window
  • the sum of the reciprocal of the event distance of EE) (1/3 0.33), that is, the co-occurrence probability of the central event (EE with diagonal lines) and ED (including all 1 ED in the sliding window) is 0.33.
  • the co-occurrence probability of the central event (EE with a slash) and EE is: EE (including: the EE with a slash in the sliding window)
  • EE including: the EE with a slash in the sliding window
  • the calculated co-occurrence probabilities of all sliding window sliding positions of all sliding window sliding positions in each event sequence data read when the window is sliding are added and summed to obtain each event sequence
  • the aforementioned event sequence data processing terminal takes the co-occurrence probability contained in the aforementioned co-occurrence matrix as a constraint, and centrally includes the aforementioned events
  • the initialization feature vector corresponding to the event related to the above-mentioned co-occurrence probability is trained to obtain the input feature vector corresponding to each event included in the above-mentioned event set.
  • the above-mentioned loss function refers to the above-mentioned event sequence data processing end constructed in advance, with the co-occurrence probability contained in the above-mentioned co-occurrence matrix as a constraint, corresponding to the events related to the above-mentioned co-occurrence probability contained in the above-mentioned event set
  • the aforementioned loss function represents the degree to which events related to the co-occurrence probability contained in the aforementioned co-occurrence matrix correspond to the initialization eigenvectors, and approximate the co-occurrence probability contained in the aforementioned co-occurrence matrix.
  • the loss function represents the inner product of the initial feature vector corresponding to the event related to the co-occurrence probability, which approximates the logarithm of the co-occurrence probability.
  • the above loss function can be characterized based on the following formula:
  • J represents the output value of the loss function
  • i and j represent any two events in the above event set
  • C(i,j) represents the co-occurrence probability of event i and j in the above co-occurrence matrix (for example: the co-occurrence matrix shown in Table 1)
  • the value of E is M 2
  • M represents the total number of categories of events included in the above event set
  • f(x) represents a weight function with C(i,j) as the parameter x; where, the above f(x) is Take the number of C(i,j) contained in the aforementioned co-occurrence matrix as an interval function of the variable.
  • d represents 0 or a minimum value tending to 0
  • S represents the threshold corresponding to the value of C(i,j) contained in the aforementioned co-occurrence matrix.
  • S can be 100.
  • f(C(i,j)) d
  • f(C (i, j)) 1.
  • d and S in the above weight function f(x) are not specifically limited in this specification, and can be preset by the user.
  • the value of the co-occurrence probability in the above co-occurrence matrix can be prevented
  • the event pairs with smaller co-occurrence probability values are concealed, and the initialization feature vector corresponding to the events related to the co-occurrence probability included in the above event set is improved to obtain each event included in the above event set.
  • the information density of the corresponding input feature vector is not specifically limited in this specification, and can be preset by the user.
  • the above loss function is based on the inner product of the initial eigenvectors corresponding to the co-occurrence probability-related events contained in the above co-occurrence matrix, and approximates the logarithm of the co-occurrence probability contained in the above co-occurrence matrix. That is, the formula of the above loss function is based on the above shown.
  • the events related to the co-occurrence probability contained in the aforementioned co-occurrence matrix can also be initialized to the inner product of the eigenvector to approximate the degree of the co-occurrence probability contained in the aforementioned co-occurrence matrix other than the logarithmic function.
  • the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set is trained to obtain the
  • the event sequence data processing terminal iteratively executes the following training steps until it obtains the input feature vector corresponding to each event included in the event set: training step A.
  • the above event sequence The data processing end inputs the co-occurrence probability-related events contained in the co-occurrence matrix into the corresponding initial eigenvectors into the above-mentioned loss function, and calculates the output value of the above-mentioned loss function.
  • the degree of approximation to the logarithm of the co-occurrence probability contained in the co-occurrence matrix is illustrated as an example, that is, when The above loss function is, for example, the above described formula
  • the event sequence data processing terminal calculates the initial eigenvector inner product corresponding to the event corresponding to the co-occurrence probability contained in the co-occurrence matrix, and inputs the calculated inner product into the co-occurrence matrix
  • the logarithm of the co-occurrence probability contained in is used as the constrained loss function J, and the output value of the loss function J is calculated.
  • Training step B The above-mentioned event sequence data processing terminal adjusts the above-mentioned initialization feature vector to solve the minimum value of the above-mentioned loss function.
  • the adjusted initialization eigenvector input to the loss function is determined as the input eigenvector corresponding to the event related to the co-occurrence probability contained in the co-occurrence matrix.
  • the above event sequence data processing terminal can iteratively adjust the above initialization characteristics through any one of the optimization algorithms such as steepest descent method, Newton method, and quasi-Newton method.
  • the vector solves the minimum value of the loss function J, and when the minimum value of the loss function J is solved, the iteratively adjusted initial eigenvector input to the loss function J is determined as the event related to the co-occurrence probability contained in the aforementioned co-occurrence matrix Corresponds to the input feature vector.
  • the above-mentioned machine learning model refers to a risk identification model for risk identification based on the input feature vector corresponding to each event included in the above-mentioned event set obtained by the completion of training, for the operation behavior event of the user account.
  • the above-mentioned machine learning model may include a risk identification model carried by business systems such as Taobao, Tmall, Alipay, and Facebook Cloud for risk identification of user account operation behavior events.
  • a risk identification model carried by business systems such as Taobao, Tmall, Alipay, and Facebook Cloud for risk identification of user account operation behavior events.
  • the event sequence data processing terminal encodes the event sequence data based on the input feature vector corresponding to the event included in the event set ; Wherein, the encoded event sequence data is used as input data to be input to the machine learning model for calculation.
  • the event sequence data processing terminal encodes the event sequence data read from the event sequence data set based on the input feature vector corresponding to the event contained in the event set obtained after the training is completed;
  • the encoded event sequence data is used as input data to be input to the above-mentioned machine learning model for risk prediction and evaluation, and the corresponding risk score or classification of the target user is output, so that the business system can perform further analysis and decision-making, such as: prohibiting the target user As a merchant of the Alipay business system, sign up for Alipay; or restrict the relevant authority of the Alipay merchant who is a contracted merchant of the Alipay business system for the target user.
  • the event sequence data processing end in the process of encoding the event sequence data based on the input feature vector corresponding to the event contained in the event set, the event sequence data processing end will be based on the event sequence data contained in the event set.
  • the input feature vectors corresponding to the events of are vector spliced according to the sequence of the events in the event sequence data to obtain the event sequence vector corresponding to the event sequence data.
  • the input feature vectors of the events ⁇ EA, EB, EC, ED, EE,..., EN ⁇ included in the above event set are ⁇ W EA_Vector , W EB_Vector , WEC_Vector , W ED_Vector , W EE_Vector , ..., W EN_Vector ), one event sequence data EventSeqData1 in the read event sequence data MultiEventSeqData is: [EA, ED, EC, EC, EE, EC, EE, EC, EE]
  • the above event sequence data processing terminal performs vector splicing according to the event sequence of EA->ED->EC->EC->EE->EC->EE->EC->EE
  • the corresponding event sequence data EventSeqData1 is obtained
  • the event sequence vector of, that is, the encoding of the event sequence vector is the sequential splicing of the following vectors (indicated by "+”):
  • the above event sequence data processing terminal will read the input feature vector corresponding to each event in each event sequence data read from the above event sequence data set, according to each event The arrangement order of the events in the sequence data is vector spliced to obtain an event sequence vector corresponding to each event sequence data in all the event sequence data read.
  • the technical solutions described and exemplified above are described based on the event sequence data included in the above event sequence data set corresponding to a type of user behavior.
  • the aforementioned event sequence data set may also include multiple event sequence data sets corresponding to multiple user behavior types.
  • the aforementioned event sequence data set may also include a normal event sequence data set constructed corresponding to the aforementioned event with normal user behavior, and an abnormal event sequence data set constructed corresponding to the aforementioned event with abnormal user behavior;
  • the normal user behavior refers to the normal operation behavior of the user on the user account
  • the abnormal user behavior refers to the abnormal operation behavior of the user on the user account.
  • a normal operation behavior of user A for the Alipay account may include: “log in to Alipay” -> “single transfer to user B" -> “exit payment”; an exception of the user for Alipay account Operational behaviors can include: “Log in to Alipay repeatedly” -> “Transfer to 100 users multiple times within a preset time” -> "Exit payment”.
  • the above-mentioned normal event sequence data set and the above-mentioned abnormal event sequence data set include the number of event sequence data, events and combinations of event sequence data, which are not specifically limited in this specification.
  • the co-occurrence matrix when the event sequence data set includes the normal event sequence data set and the abnormal event sequence data set, correspondingly, includes the same sequence data as the normal event sequence data.
  • the event sequence data processing end may respectively generate events corresponding to the first co-occurrence matrix for the events included in the event set.
  • the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set is trained to obtain
  • the event sequence data processing terminal may be based on a preset first loss function corresponding to the first co-occurrence matrix, and use the co-occurrence probability contained in the first co-occurrence matrix as Constraint, training the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set to obtain the first input feature vector corresponding to each event included in the event set corresponding to the first co-occurrence matrix; and
  • the above-mentioned event sequence data processing terminal may be based on a preset second loss function corresponding to the above-mentioned second co-occurrence matrix, and use the co-occurrence probability contained in the above-mentioned second co-occurrence matrix as a constraint, and limit the collection of events contained in the above-mentioned event.
  • first loss function J1 and the above-mentioned second loss function J2 are similar to the above-described loss function J, and will not be repeated here.
  • the above-mentioned first input feature vector and the above-mentioned second input feature vector are respectively the input feature vectors corresponding to each event included in the above-mentioned event set described above (for example, please refer to the events included in the above-mentioned event set described in the above example ⁇ EA, EB, EC, ED, EE,..., EN ⁇ respectively correspond to the input feature vector ⁇ W EA_Vector , W EB_Vector , WEC_Vector , W ED_Vector , W EE_Vector ,..., W EN_Vector ⁇ ) similar, here No longer.
  • the event sequence data processing terminal combines the first input feature vector and the second input feature vector to generate an input feature vector corresponding to each event included in the event set.
  • the event sequence data processing At the end, the first input feature vector and the second input feature vector are vertically spliced to generate an input feature vector corresponding to each event included in the event set.
  • the first input feature vector corresponding to each event included in the event set obtained by the event sequence data processing terminal is:
  • the second input feature vector corresponding to each event included in the above event set is:
  • the first input feature vector corresponding to each event included in the event set obtained by the event sequence data processing terminal is represented by the following formula 1:
  • i represents each event in the above-mentioned event set
  • the superscript N of w represents the first input feature vector obtained by training corresponding to the above-mentioned first shared matrix as a constraint.
  • the second input feature vector corresponding to each event included in the event set obtained by the event sequence data processing terminal is represented by the following formula 2:
  • i represents each event in the above-mentioned event set
  • the superscript A of w represents the second input feature vector obtained by training corresponding to the above-mentioned second shared matrix as a constraint.
  • the event sequence data processing terminal longitudinally splices the first input feature vector and the second input feature vector to generate an input feature vector corresponding to each event included in the event set; wherein the longitudinal splicing generates an input feature vector corresponding to the event
  • the input feature vector corresponding to each event included in the set is represented by the following formula 3:
  • i represents each event in the above event set
  • w with superscript N represents the first input feature vector corresponding to each event included in the above event set
  • w with superscript A represents each event included in the above event set.
  • the final input feature vector wi corresponding to each event included in the event set finally output by the event sequence data processing terminal is the vertical splicing of the first input feature vector and the second input feature vector corresponding to each event vector.
  • the event sequence data processing terminal finally outputs the input feature vector corresponding to each event included in the event set, or the event sequence data processing terminal combines the first input feature vector and the The above-mentioned second input feature vector is generated by horizontal splicing.
  • the feature vector encodes each event sequence data in the event sequence data set; wherein the encoded event sequence data is used as input data to be input to the machine learning model for calculation.
  • the input feature vector corresponding to the event included in the event set is obtained, and each event sequence data in the event sequence data set is encoded, and
  • the process of encoding the read event sequence data MultiEventSeqData described above is similar to only one co-occurrence matrix, and the details are not repeated here.
  • the statistical information in the event sequence set is fully utilized , Avoid using the method of authenticity sequence discrimination to indirectly learn the co-occurrence feature expression of behavioral events, so that only a small amount of sequence data can achieve the expected effect, and the coding efficiency of event sequence data is improved.
  • the corresponding initialization feature vector is generated for each event included in the preset event set; the event sequence data is sequentially read from the event sequence data set, and the event sequence data read is calculated and read.
  • Corresponding co-occurrence matrix wherein, the co-occurrence matrix is a matrix generated based on the co-occurrence probability between events contained in the event sequence data; taking the co-occurrence probability contained in the co-occurrence matrix as a constraint,
  • the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set is trained to obtain the input feature vector corresponding to each event included in the event set;
  • the input feature vector corresponding to the event encodes the event sequence data; wherein the encoded event sequence data is used as input data to be input to the machine learning model for calculation; on the one hand, it improves the impact of event encoding on the user’s normal behavior and abnormalities.
  • the information density of the two-layer representation of behavior overcomes the low information density and dimensional disasters brought about by sparse coding; on the other hand, only a small amount of event sequence data can be used for the coding calculation of events and event sequence data, which improves coding efficiency.
  • this application also provides an embodiment of a processing device for event sequence data.
  • this specification also provides an embodiment of an event sequence data processing device.
  • the embodiments of the device for processing event sequence data in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • FIG. 3 a hardware structure diagram of the electronic equipment where the event sequence data processing device of this specification is located, except for the processor, memory, network interface, and non-volatile memory shown in Figure 3
  • the electronic device in which the device is located in the embodiment may also include other hardware according to the actual function of the electronic device, which will not be repeated here.
  • Fig. 4 is a block diagram of a device for processing event sequence data shown in an exemplary embodiment of this specification.
  • the device 40 for processing event sequence data can be applied to the electronic device shown in FIG. 3.
  • the device includes: a generating module 401, a calculating module 402, a training module 403 and an encoding module 404.
  • the generating module 401 generates corresponding initialization feature vectors for each event included in the preset event set.
  • the calculation module 402 reads event sequence data sequentially from the event sequence data set, and calculates a co-occurrence matrix corresponding to the read event sequence data; wherein, the co-occurrence matrix is based on the event sequence data Contains the matrix generated by the co-occurrence probability between each event.
  • the training module 403 takes the co-occurrence probability contained in the co-occurrence matrix as a constraint, and trains the initialization feature vector corresponding to the event related to the co-occurrence probability contained in the event set to obtain The input feature vector corresponding to each event of.
  • the encoding module 404 encodes the event sequence data based on the input feature vector corresponding to each event included in the event set; wherein the encoded event sequence data is used as input data to be input to the machine learning model for calculation .
  • the co-occurrence probability is the probability that each target event included in the event sequence data and each other event other than the target event appear together in the event sequence data;
  • the rows of the present matrix correspond to each target event, and the columns of the co-occurrence matrix correspond to each other event except each target event; or, the columns of the co-occurrence matrix correspond to each target event, and the rows of the co-occurrence matrix correspond to each target All other events besides the event.
  • each target event includes the central event of the sliding window when a sliding window of a preset size is slid in the event sequence data; the calculation module 402 further: The sliding window of the sliding window slides in the event sequence data, and the central event of the sliding window is determined for each sliding; the central event of the sliding window is calculated in turn, and the central event contained in the event sequence data The co-occurrence probability of each other event in the event sequence data.
  • the calculation module 402 further: counts the event distances between each other event other than the central event included in the event sequence data and the central event; based on the distance between each other event and the central event For the event distance of the event, the co-occurrence probability of each of the other events and the central event is calculated in sequence.
  • the reciprocal of the event distance between the other events and the central event is used to characterize the co-occurrence probability of the other events and the central event.
  • the generating module 401 further: randomly generates corresponding initialization feature vectors for each event included in the preset event set.
  • the training module 403 further: iteratively executes the following training steps until the input feature vector corresponding to each event included in the event set is obtained: the initial feature vector corresponding to the event related to the co-occurrence probability , Input to the loss function with the co-occurrence probability as the constraint, and calculate the output value of the loss function; wherein, the loss function characterizes the initial feature vector corresponding to the event related to the co-occurrence probability, and approximates the co-occurrence probability. Current probability; adjust the initialization eigenvector to solve the minimum value of the output value of the loss function; when the minimum value is solved, input the adjusted initialization eigenvector of the loss function to determine Input feature vectors for events related to the co-occurrence probability.
  • the loss function characterizes the inner product of the initial feature vector corresponding to the event related to the co-occurrence probability to approximate the logarithm of the co-occurrence probability; the training module 403 further: calculates and The initial feature vector inner product corresponding to the event related to the co-occurrence probability, and the calculated inner product is input to a loss function with the logarithm of the co-occurrence probability as a constraint, and the output value of the loss function is calculated .
  • the loss function is characterized based on the following formula:
  • J represents the output value of the loss function
  • i and j represent any two events in the event set
  • C(i,j) represents the co-occurrence probability of events i and j in the co-occurrence matrix
  • the value of E is M 2
  • M represents The total number of categories of each event included in the event set
  • f(x) represents a weight function.
  • the f(x) is an interval function with C(i, j) included in the co-occurrence matrix as a variable.
  • the f(x) is characterized based on the following formula:
  • d represents 0 or a minimum value tending to 0
  • S represents a threshold corresponding to C(i, j) contained in the co-occurrence matrix.
  • the encoding module 404 further: based on the input feature vector corresponding to each event included in the event set, perform vector splicing in accordance with the sequence of each event in the event sequence data to obtain the The event sequence vector corresponding to the event sequence data.
  • the event includes a user's operation behavior event for the user account;
  • the machine learning model is a risk identification model for risk identification of the user account.
  • the event sequence data set includes a normal event sequence data set and an abnormal event sequence data set; correspondingly, the co-occurrence matrix includes events that are related to events read from the normal event sequence data set.
  • the first co-occurrence matrix corresponding to the sequence data, and the second co-occurrence matrix corresponding to the event sequence data read from the abnormal event sequence data set; the generating module 401 is further: Event, the initialization eigenvector corresponding to the first co-occurrence matrix and the initialization eigenvector corresponding to the second co-occurrence matrix are respectively generated.
  • the training module 403 further: based on a preset first loss function corresponding to the first co-occurrence matrix, taking the co-occurrence probability contained in the first co-occurrence matrix as a constraint, Training the initialization feature vector corresponding to the event related to the co-occurrence probability included in the event set to obtain a first input feature vector corresponding to each event included in the event set corresponding to the first co-occurrence matrix; Based on the preset second loss function corresponding to the second co-occurrence matrix, the co-occurrence probability contained in the second co-occurrence matrix is used as a constraint, and the co-occurrences included in the event set are constrained.
  • the initialization feature vector corresponding to the probability-related event is trained to obtain the second input feature vector corresponding to each event included in the event set corresponding to the second co-occurrence matrix; the first input feature vector and the second input feature Vector, and splicing to generate an input feature vector corresponding to each event included in the event set.
  • the training module 403 further: vertically splices the first input feature vector and the second input feature vector to generate an input feature vector corresponding to each event included in the event set.
  • the relevant part can refer to the part of the description of the method embodiment.
  • the device embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present application. Those of ordinary skill in the art can understand and implement without creative work.
  • the devices, devices, modules, or modules illustrated in the above embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • this specification also provides an embodiment of an electronic device.
  • the electronic device includes a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus.
  • the device may also include an external interface to be able to communicate with other devices or components.
  • the electronic device reads and executes the machine executable instructions corresponding to the processing control logic of the event sequence data corresponding to the foregoing method embodiments stored in the memory, and the processor is prompted to execute the machine executable instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种事件序列数据的处理方法,涉及机器学习技术领域。该方法包括:为预设的事件集中包含的各事件分别生成对应的初始化特征向量(102);从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵(104);将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量(106);基于所述事件集所包含的事件对应的输入特征向量,对所述事件序列数据集合中的各事件序列数据进行编码(108)。

Description

事件序列数据的处理方法、装置、电子设备 技术领域
本申请涉及机器学习技术领域,尤其涉及事件序列数据的处理方法、装置、电子设备。
背景技术
机器学习技术在过去十年中发生了显著的变化,从在实验室的纯粹的学术研究到广泛应用在各个生产领域,比如:金融行业、电商零售行业、IT行业、医疗行业等。机器学习模型本质上就是一种算法,该算法试图从数据中学习潜在模式和关系,而不是通过代码构建一成不变的规则。
伴随互联网以及移动互联网的发展和普及,互联网以及移动互联网的各种应用(比如:APP应用或Web应用)也被广泛使用。用户可以通过在各种应用进行对应的业务操作。例如,用户可以通过支付宝应用,进行支付、转账、商户签约等业务对应的业务操作。
发明内容
本申请提供一种事件序列数据的处理方法,所述方法包括:为预设的事件集中包含的各事件分别生成对应的初始化特征向量;从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
可选的,所述共现概率,为事件序列数据所包含的各目标事件,与所述各目标事件以外的各其它事件,在所述事件序列数据中共同出现的概率;所述共现矩阵的行对应各目标事件,所述共现矩阵的列对应各目标事件以外的各其它事件;或者,所述共现矩阵的列对应各目标事件,所述共现矩阵的行对应各目标事件以外的各其它事件。
可选的,所述各目标事件包括,将预设大小的滑动窗口在所述事件序列数据中进行滑动时,所述滑动窗口的中心事件;所述方法还包括:将预设大小的滑动窗口在所述事件序列数据中进行滑动,并确定每次滑动时所述滑动窗口的中心事件;依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率。
可选的,所述依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率,包括:统计所述事件序列数据中包含的各中心事件以外的各其它事件,与所述中心事件的事件距离;基于所述各其它事件与所述中心事件的事件距离,依次计算所述各其它事件与所述中心事件的共现概率。
可选的,利用所述各其它事件与所述中心事件的事件距离的倒数,表征所述各其它事件与所述中心事件的共现概率。
可选的,所述为预设的事件集中包含的各事件分别生成对应的初始化特征向量,包括:为预设的事件集中包含的各事件分别随机生成对应的初始化特征向量。
可选的,所述将所述共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量,包括:迭代执行以下训练步骤,直到得到与所述事件集中包含的各事件对应的输入特征向量:将所述共现概率相关的事件对应的初始化特征向量,输入至以所 述共现概率作为约束的损失函数,计算所述损失函数的输出值;其中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量,逼近所述共现概率的程度;调整所述初始化特征向量,求解所述损失函数的输出值的最小值;将求解出所述最小值时,输入至所述损失函数的调整后的所述初始化特征向量,确定为与所述共现概率相关的事件对应输入特征向量。
可选的,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量的内积,逼近所述共现概率的对数的程度;所述将所述共现矩阵中包含的共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值,包括:计算与所述共现概率相关的事件对应的初始化特征向量内积,并将计算出的所述内积输入至以所述共现概率的对数作为约束的损失函数,计算所述损失函数的输出值。
可选的,所述损失函数基于以下公式表征:
Figure PCTCN2020132133-appb-000001
其中,J表示损失函数的输出值;i和j表示所述事件集中任意的两个事件;
Figure PCTCN2020132133-appb-000002
表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和j在所述共现矩阵中的共现概率;E的取值大小为M 2;M表示所述事件集包含的各事件的类别总数;f(x)表示权重函数。
可选的,所述f(x)为以所述共现矩阵中包含的C(i,j)为变量的区间函数。
可选的,所述f(x)基于以下公式表征:
Figure PCTCN2020132133-appb-000003
其中,d表示0或者趋于0的极小值;S表示与所述共现矩阵中包含的C(i,j)对应的阈值。
可选的,所述基于所述事件集所包含的事件对应的输入特征向量,对所述事件序列数据集合中的各事件序列数据进行编码,包括:基于与所述事件集所包含的各事件对应的输入特征向量,按照所述事件序列数据中的各事件的排列顺序进行向量拼接,得到与所述事件序列数据对应的事件序列向量。
可选的,所述事件包括用户针对用户账户的操作行为事件;所述机器学习模型为针对用户账户进行风险识别的风险识别模型。
可选的,所述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;相应的,所述共现矩阵包括与从正常的事件序列数据集合中读取到的事件序列数据对应的第一共现矩阵,和与从异常的事件序列数据集合中读取到的事件序列数据对应的第二共现矩阵;所述为预设的事件集中包含的各事件分别生成对应的初始化特征向量,包括:为预设的事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量、与第二共现矩阵对应的初始化特征向量。
可选的,所述将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量,包括:基于预设的与所述第一共现矩阵对应的第一损失函数,以所述第一共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第一共现矩阵对应的所述事件集中包含的各事件对应的第一输入特征向量;基于预设的与所述第二共现矩阵对应预设的第二损失函数,以所述第二共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第二共现矩阵对应的所述事件集中包含的各事件对应的第二输入特征向量;将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特 征向量。
可选的,所述将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量,包括:将第一输入特征向量和第二输入特征向量,纵向拼接生成与所述事件集中包含的各事件对应的输入特征向量。
本申请还提供一种事件序列数据的处理装置,所述装置包括:生成模块,为预设的事件集中包含的各事件分别生成对应的初始化特征向量;计算模块,从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;训练模块,将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;编码模块,基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
可选的,所述共现概率,为事件序列数据所包含的各目标事件,与所述各目标事件以外的各其它事件,在所述事件序列数据中共同出现的概率;所述共现矩阵的行对应各目标事件,所述共现矩阵的列对应各目标事件以外的各其它事件;或者,所述共现矩阵的列对应各目标事件,所述共现矩阵的行对应各目标事件以外的各其它事件。
可选的,所述各目标事件包括,将预设大小的滑动窗口在所述事件序列数据中进行滑动时,所述滑动窗口的中心事件;所述计算模块进一步:将预设大小的滑动窗口在所述事件序列数据中进行滑动,并确定每次滑动时所述滑动窗口的中心事件;依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率。
可选的,所述计算模块进一步:统计所述事件序列数据中包含的各中心事件以外的各其它事件,与所述中心事件的事件距离;基于所述各其它事件与所述中心事件的事件距离,依次计算所述各其它事件与所述中心事件的共现概率。
可选的,利用所述各其它事件与所述中心事件的事件距离的倒数,表征所述各其它事件与所述中心事件的共现概率。
可选的,所述生成模块进一步:为预设的事件集中包含的各事件分别随机生成对应的初始化特征向量。
可选的,所述训练模块进一步:迭代执行以下训练步骤,直到得到与所述事件集中包含的各事件对应的输入特征向量:将所述共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值;其中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量,逼近所述共现概率的程度;调整所述初始化特征向量,求解所述损失函数的输出值的最小值;将求解出所述最小值时,输入至所述损失函数的调整后的所述初始化特征向量,确定为与所述共现概率相关的事件对应输入特征向量。
可选的,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量的内积,逼近所述共现概率的对数的程度;所述训练模块进一步:计算与所述共现概率相关的事件对应的初始化特征向量内积,并将计算出的所述内积输入至以所述共现概率的对数作为约束的损失函数,计算所述损失函数的输出值。
可选的,所述损失函数基于以下公式表征:
Figure PCTCN2020132133-appb-000004
其中,J表示损失函数的输出值;i和j表示所述事件集中任意的两个事件;
Figure PCTCN2020132133-appb-000005
表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和 j在所述共现矩阵中的共现概率;E的取值大小为M 2;M表示所述事件集包含的各事件的类别总数;f(x)表示权重函数。
可选的,所述f(x)为以所述共现矩阵中包含的C(i,j)为变量的区间函数。
可选的,所述f(x)基于以下公式表征:
Figure PCTCN2020132133-appb-000006
其中,d表示0或者趋于0的极小值;S表示与所述共现矩阵中包含的C(i,j)对应的阈值。
可选的,所述编码模块进一步:基于与所述事件集所包含的各事件对应的输入特征向量,按照所述事件序列数据中的各事件的排列顺序进行向量拼接,得到与所述事件序列数据对应的事件序列向量。
可选的,所述事件包括用户针对用户账户的操作行为事件;所述机器学习模型为针对用户账户进行风险识别的风险识别模型。
可选的,所述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;相应的,所述共现矩阵包括与从正常的事件序列数据集合中读取到的事件序列数据对应的第一共现矩阵,和与从异常的事件序列数据集合中读取到的事件序列数据对应的第二共现矩阵;所述生成模块进一步:为预设的事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量、与第二共现矩阵对应的初始化特征向量。
可选的,所述训练模块进一步:基于预设的与所述第一共现矩阵对应的第一损失函数,以所述第一共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第一共现矩阵对应的所述事件集中包含的各事件对应的第一输入特征向量;基于预设的与所述第二共现矩阵对应预设的第二损失函数,以所述第二共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第二共现矩阵对应的所述事件集中包含的各事件对应的第二输入特征向量;将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量。
可选的,所述训练模块进一步:将第一输入特征向量和第二输入特征向量,纵向拼接生成与所述事件集中包含的各事件对应的输入特征向量。
本申请还提供一种电子设备,包括通信接口、处理器、存储器和总线,所述通信接口、所述处理器和所述存储器之间通过总线相互连接;所述存储器中存储机器可读指令,所述处理器通过调用所述机器可读指令,执行上述的方法。
本申请还提供一种机器可读存储介质,所述机器可读存储介质存储有机器可读指令,所述机器可读指令在被处理器调用和执行时,实现上述方法。
通过以上实施例,基于为预设的事件集中包含的各事件分别生成对应的初始化特征向量;从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算;一方面,提高了事件编码对用户正常行为和异常行为的双层表征的信息密度,并克服了稀疏编码带来的低信息密度和维度灾难;另一方面,仅需少量事件序列数据可以进行事件及事件序列数据的编码计算,提高了编码效率。
附图说明
图1是一示例性实施例提供的一种事件序列数据的处理方法的流程图;
图2是一示例性实施例提供的一种事件序列数据的滑动窗口的示意图;
图3是一示例性实施例提供的一种电子设备的硬件结构图;
图4是一示例性实施例提供的一种事件序列数据的处理装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
为了使本技术领域的人员更好地理解本说明书实施例中的技术方案,下面先对本说明书实施例涉及的事件序列数据的处理的相关技术,进行简要说明。
通常在实际应用中,在用户基于应用进行业务操作过程中,用户账户的操作行为事件(比如:登录支付宝应用、修改密码、提现等)可以被应用后台记录并保存,以使应用后台可以基于机器学习技术构建的风险识别模型,对用户进行风险识别。例如,基于搭载的机器学习模型作为对用户账户进行风险识别的风险识别模型,并进行模型训练,应用后台基于训练完成的风险识别模型进行风险识别,从而预测出操作行为异常的用户账户。
然而,用户账户的操作行为事件是一种基于人类语言的口头表达,在其应用于风险识别模型中进行训练和预测前,需要对该行为事件(后续简称“事件”)进行编码。
而目前最常用的一种编码方式为One-hot编码。One-hot编码是一种常用的、极度稀疏的高维度编码方式。
在实现时,在对事件进行One-hot编码时,得到与事件对应的事件编码的长度为所有事件类别的总数,对某一特定事件的编码为对应位置置1其余位置置0。
例如,在实际应用中,有N个类别事件(用户登陆、修改密码、提现、创建二维码、删除记录、...、退出登录),则基于One-hot编码输出的事件编码的长度为N,也即,事件编码的位数包括1、2、3、...N。定义“用户登陆”事件对应的事件编码的位数1的值对应为1,定义“修改密码”事件为对应的事件编码的位数2的值对应为1,以此类推。基于One-hot编码输出的N个类别事件(用户登陆、修改密码、提现、创建二维码、...、退出登录)分别对应的事件编码,请参见以下表1示例:
表1
Figure PCTCN2020132133-appb-000007
Figure PCTCN2020132133-appb-000008
如表1所示,[10…000]表征“用户登陆”事件,[01…000]表征“修改密码”事件,[001…00]表征“提现”事件,[0001…0]表征“创建二维码”事件,[00001…0]表征“删除记录”事件,...,[00000…1]表征“退出登录”事件。
基于以上示出的基于One-hot编码方式进行事件编码的过程可见,One-hot编码方式存在以下三个缺点。
1)维度灾难,由于要保证编码的区分性,One-hot编码的结果长度会和事件集合的总事件数的增加呈线性增长,也即,事件类别数目越多,事件编码的长度就越长,浪费的存储空间就越多,在后续计算中也会增大风险识别模型的输入层的复杂度。
2)信息密度低,从以上示出的One-hot编码过程可见,每一个编码的结果只有一个位置是为1,其余的位置都为0,在事件类别数量极大时,每个编码就只有一位是具有有效值,由此可见,One-hot编码的信息密度是相当低的;
3)无法表征事件关联语义,从以上示出的One-hot编码过程可见,由于One-hot的编码过程中并没有考虑到某单个事件在发生事件序列(事件序列,比如包括:用户登陆、修改密码、提现、创建二维码、删除记录、...、退出登录)中的上下文(该单个事件前后发生的其它事件),因此,基于One-hot编码方式的事件编码,无法表征某单个事件在事件序列中和其他事件的关联语义。
当然,除了One-hot编码进行事件编码外,通常还可以基于Embedding(嵌入)编码方式进行事件编码。Embedding编码方式,是一种把高维数据或离散数据转换至低维数据或连续数据的一种计算方法,其广泛应用在自然语言处理、生物信息学等领域中。Embedding编码方式的核心本质为,一种利用机器学习的方法从序列中学习每一个序列元素的低维高密度特征的编码方法。具体基于Embedding编码方式进行编码的原理过程,请参见Embedding编码方式相关的技术文档,这里不再赘述。
通常基于Embedding编码方式进行事件编码方时,通常需要基于真实的用户事件序列集合构建乱序随机的随机事件序列集合;然后,将用户事件序列集合及随机事件序列集合所分别包含的事件序列,以及,与事件序列分别对应的标签(标签指示事件序列是否为真实用户行为,比如:是真实用户行为的事件序列,则对应标签值为1,否则,对应标签值为0),作为训练样本输入到对应事件编码模型中,并以标签值作为约束进行训练,从而得到基于Embedding编码的事件编码。基于以上描述的基于Embedding编码的事件编码过程相比基于One-hot编码的事件编码过程可以较大地降低事件编码的维度以及提升事件编码的信息密度,然而存在仅基于用户正常行为对应的正常事件序列的进行采样及编码的缺点,无法表征用户异常行为对应的异常事件序列的特征及事件关联;以及,存在需要额外的机器学习模型进行间接学习输出事件编码的编码效率较低的问题。
基于此,而本说明书旨在提出一种,基于从事件序列数据集合中的读取到的事件序列数据和与该事件序列数据对应的计算得到的共现矩阵,对事件集中包含的事件对应的特征向量进行向量训练,并对事件序列数据进行编码的技术方案,以使编码完成的具有表征用户的正常及异常的双层行为特征的事件序列数据用于作为输入数据输入至机 器学习模型进行快速计算。
在实现时,为预设的事件集中包含的各事件分别生成对应的初始化特征向量;从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵。
进一步地,将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;
进一步地,基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
在以上技术方案中,基于为预设的事件集中包含的各事件分别生成对应的初始化特征向量;从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算;一方面,提高了事件编码对用户正常行为和异常行为的双层表征的信息密度,并克服了稀疏编码带来的低信息密度和维度灾难;另一方面,仅需少量事件序列数据可以进行事件及事件序列数据的编码计算,提高了编码效率。
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。
请参考图1,图1是本说明书一实施例提供的一种事件序列数据的处理方法的流程图,所述方法应用于事件序列数据处理端,上述方法执行步骤102~步骤108。
步骤102、为预设的事件集中包含的各事件分别生成对应的初始化特征向量。
步骤104、从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵。
步骤106、将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量。
步骤108、基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
在本说明书中,上述事件,可以包括任何事件类型的事件。
在示出的一种实施方式中,上述事件可以包括用户针对用户账户的操作行为事件。
例如,在实际应用中,上述事件可以包括用户针对用户账户的以下操作行为事件中的任何一种:用户登陆、修改密码、提现、创建二维码、删除记录、...、退出登录。
当然,在实际应用中,上述事件也可以包括用户无需登录用户账户进行的操作行为事件。上述事件的类型及操作场景,在本说明书中不作具体限定。
在本说明书中,上述事件集,是指包括事件类型不同的上述事件的集合。
例如,上述事件可以包括用户针对用户账户的以下操作行为事件中的任何一种:用户登陆、修改密码、提现、创建二维码、删除记录、...、退出登录,则上述事件集可以为{“用户登陆”、“修改密码”、“提现”、“创建二维码”、“删除记录”、...、“退出登录”}。
需要说明的是,上述事件集为预设的、上述事件对应的事件类型的全集,也即,上述事件集所包括的多个上述事件的事件类型不能重复。
在本说明书中,上述事件序列数据,为包括多个上述事件,按任意组合及数量所构建的事件序列。
例如,在实际应用中,当上述事件包括操作行为事件(比如用户登陆EA、修改密码EB、提现EC、创建二维码ED、删除记录EE、...、退出登录EN)中的任何一种时,上述事件序列数据可以包括多个上述事件,按任意组合及数量所构建的事件序列,比如:上述事件序列数据可以包括:[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]或者[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]中的任意一个。
需要说明的是,上述事件序列数据的序列长度(也即,构建上述事件序列数据的上述事件的数量)和序列内容(也即,构建上述事件序列数据的上述事件的排列组合),在本说明书中,不作具体限定。
在本说明书中,上述事件序列数据集合,为包括1个或多个上述事件序列数据的集合。
接着以上示例继续举例,上述事件序列数据可以为[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]、[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]中的任意一个,则上述事件序列数据集合可以为{[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]、[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]}或者任意数量的上述事件序列数据的集合。
需要说明的是,上述事件序列数据集合的集合元素个数(也即,构建上述事件序列数据集合的上述事件序列数据的数量)和每个集合元素内容(也即,上述事件序列数据集合中的每个上述事件序列数据的序列内容),在本说明书中,不作具体限定。
在示出的一种实施方式中,上述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;
其中,上述正常的事件序列数据集合是指,由与用户针对用户账户的正常操作行为对应的上述事件构建对应正常的上述事件序列数据,并由正常的上述事件序列数据构建对应正常的事件序列数据集合;
上述异常的事件序列数据集合是指,由与用户针对用户账户的异常操作行为对应的上述事件构建对应异常的上述事件序列数据,并由异常的上述事件序列数据构建对应异常的事件序列数据集合。
需要说明的是,上述正常的事件序列数据集合和上述异常的事件序列数据的集合的表现形式,与以上示例的事件序列数据集合类似,具体不再赘述。
在本说明书中,上述事件序列数据处理端,可以包括对上述事件序列数据集合进行事件序列数据的处理的机器或机器集群。
例如,在实际应用中,上述事件序列数据处理端可以为对上述事件序列数据集合进行事件序列数据的处理的、部署在本地或云端的机器或机器集群。
在本说明书中,上述事件序列数据处理端为上述事件集中包含的各事件分别生成对应的初始化特征向量;
其中,上述初始化特征向量,也即,与上述事件集中包含的各事件分别对应的事件编码。事件编码的具体概念,请参见前文描述,这里不再赘述。
例如,在实际应用中,上述事件集可以为{“用户登陆”、“修改密码”、“提现”、“创建二维码”、“删除记录”、...、“退出登录”},则与上述事件集中包含的事件分别对应的初始化特征向量,对应可以为{“用户登陆”对应的初始化特征向量EA_IV、“修改密码”对应的初始化特征向量EB_IV、“提现”对应的初始化特征向量EC_IV、 “创建二维码”对应的初始化特征向量ED_IV、“删除记录”对应的初始化特征向量EE_IV、...、“退出登录”对应的初始化特征向量EN_IV}。
需要说明的是,与上述事件集中包含的各事件分别对应的初始化特征向量的向量的长度,可以基于用户配置来设置,在本说明书中不作具体限定。
在示出的一种实施方式中,在为上述事件集中包含的各事件分别生成对应的初始化特征向量的过程中,上述事件序列数据处理端为上述事件集中包含的各事件分别随机生成对应的初始化特征向量。
在实现时,上述事件序列数据处理端为上述事件集中包含的各事件分别随机生成对应的初始化特征向量;其中,每个初始化特征向量的向量内容为随机值。
例如,在实际应用中,上述事件集可以为{“用户登陆”、“修改密码”、“提现”、“创建二维码”、“删除记录”、...、“退出登录”},则与上述事件集中包含的各事件分别对应的初始化特征向量,对应可以为{“用户登陆”对应的初始化特征向量EA_IV、“修改密码”对应的初始化特征向量EB_IV、“提现”对应的初始化特征向量EC_IV、“创建二维码”对应的初始化特征向量ED_IV、“删除记录”对应的初始化特征向量EE_IV、...、“退出登录”对应的初始化特征向量EN_IV};其中,EA_IV、EB_IV、EC_IV、ED_IV、EE_IV、...、及EC_IV,分别对应的向量内容为随机值。
在本说明书中,上述共现概率,是指上述事件集中的任意两个上述事件,在上述事件序列数据集合中读取到的上述事件序列数据中,同时出现的概率。
例如,在实际应用中,上述事件集可以为{EA、EB、EC、ED、EE、...、EN};其中,EA表征“用户登陆”事件、EB表征“修改密码”事件、EC表征“提现”事件、ED表征“创建二维码”事件、EE表征“删除记录”事件、...、EN表征“退出登录”事件;上述事件序列数据集合中读取到的上述事件序列数据可以包括:{[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]、[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]};则上述共现概率为{EA、EB、EC、ED、EE、...、EN}事件集中的任意两个事件,在事件序列数据集合中读取到的事件序列数据:{[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]、[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]}中,同时出现的概率。
在示出的一种实施方式中,上述共现概率,为上述事件序列数据所包含的各目标事件,与上述各目标事件以外的各其它事件,在上述事件序列数据中共同出现的概率。
在实现时,上述事件序列数据所包含的各目标事件可以为上述事件序列数据中的各事件A,与上述各目标事件以外的各其它事件可以为上述事件序列数据中的各事件A以外的各其它事件B,上述共现概率为各事件A与各其它事件B在上述事件序列数据中共同出现的概率。
以事件序列数据为{EA、ED、EC、EC、EE、EC、EE、EC、EE]}进行举例说明,上述事件序列数据所包含的各目标事件可以为该事件序列数据中的每个事件(EA、ED、EC、EC、EE、EC、EE、EC、EE),当目标事件为该事件序列数据中的最左侧的EA时,则该目标事件以外的各其它事件包括除EA以外的事件(ED、EC、EC、EE、EC、EE、EC、EE),该目标事件与该目标事件以外的各其它事件的共现概率为:“最左侧的EA”,分别与“ED、EC、EC、EE、EC、EE、EC、EE”中的每个事件同时出现的概率;
类似地,当目标事件为该事件序列数据中的最左侧的ED时,则该目标事件以外的各其它事件包括除ED以外的事件(EA、EC、EC、EE、EC、EE、EC、EE),该目标事件与该目标事件以外的各其它事件的共现概率为:“最左侧的ED”,分别与“EA、EC、EC、EE、EC、EE、EC、EE”中的每个事件同时出现的概率;
类似地,当目标事件为该事件序列数据中的最左侧的EC时,则该目标事件以外的 各其它事件包括除该EC以外的事件(EA、ED、该事件序列数据中的从左数第二个EC、EE、该事件序列数据中的从左数第三个EC、EE、该事件序列数据中的从左数第四个EC、EE),该目标事件与该目标事件以外的各其它事件的共现概率为:“最左侧的EC”,分别与“EA、ED、该事件序列数据中的从左数第二个EC、EE、该事件序列数据中的从左数第三个EC、EE、该事件序列数据中的从左数第四个EC、EE”中的每个事件同时出现的概率。
需要说明的是,当目标事件可以为该事件序列数据中从左到右的各事件(EA、ED、EC、EC、EE、EC、EE、EC、EE),上述共现概率,为该事件序列数据所包含的各目标事件,与上述各目标事件以外的各其它事件,在该事件序列数据中共同出现的概率;具体过程与以上示例类似,不再赘述。
在本说明书中,上述共现矩阵,是指与上述事件序列数据集合中读取到的上述事件序列数据对应共享的,以上述共现概率作为矩阵元素的共现矩阵。
例如,以上述事件集为{EA、EB、EC、ED、EE、...、EN},上述事件序列数据集合中读取到的多个上述事件序列数据MultiEventSeqData:{[EA、EB]、[EA、EB、EC]、[EB、EC、ED、EE、EN]、[EA、EN]、[EA、EB、EC、ED、EE、...、EN]、[EA、ED、EC、EC、EE、EC、EE、EC、EE]}为基础的背景下进行示例,则上述共现矩阵,请参见如下表2所示示例:
表2
Figure PCTCN2020132133-appb-000009
如表2所示,表2的行代表上述共现矩阵的行;表2的列代表上述共现矩阵的列。表2中的某行与某列交叉对应的单元格表征上述共现矩阵的某个事件与其它事件在MultiEventSeqData中同时出现的共现概率,例如:EA&EA共现概率,表征EA与EA在MultiEventSeqData中同时出现的共现概率,类似地,表2中具有“xx&xx共现概率”样式的其它单元格表征:上述事件集为{EA、EB、EC、ED、EE、...、EN}中的任意两个事件,在MultiEventSeqData中同时出现的共现概率,具体不再赘述。
在本说明书中,在为上述事件集中包含的事件分别生成对应的初始化特征向量后,上述事件序列数据处理端从上述事件序列数据集合中依次读取上述事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵。
接着以上示例继续举例,上述事件序列数据处理端从上述事件序列数据集合中依次读取事件序列数据,并计算与读取到的事件序列数据MultiEventSeqDat对应的如表1所示例的共现矩阵。
在示出的一种实施方式中,在计算生成上述共现矩阵的过程中,上述事件序列数 据处理端可以以上述共现矩阵的行对应为读取到的事件序列数据所包含的各目标事件,上述共现矩阵的列对应为读取到的事件序列数据所包含的各目标事件以外的各其它事件。
接着以上示例继续举例,上述事件序列数据处理端可以以如表2所示的共现矩阵的行对应读取到的事件序列数据MultiEventSeqData中的每个事件序列数据的中心事件,如表2所示的共现矩阵的列对应读取到的事件序列数据MultiEventSeqData中的每个事件序列数据的中心事件以外的各其它事件,进行共现概率计算。
在示出的另一种实施方式中,在计算生成上述共现矩阵的过程中,上述事件序列数据处理端也可以以上述共现矩阵的列为读取到的事件序列数据所包含的各目标事件,上述共现矩阵的行对应为读取到的事件序列数据所包含的各目标事件以外的各其它事件,进行共现概率计算。
接着以上示例继续举例,上述事件序列数据处理端可以以如表2所示的共现矩阵的列对应为读取到的事件序列数据MultiEventSeqData中的每个事件序列数据的中心事件,如表2所示的共现矩阵的行对应为读取到的事件序列数据MultiEventSeqData中的每个事件序列数据的中心事件以外的各其它事件,进行共现概率计算。
需要说明的是,上述各目标事件,是指上述事件序列数据处理端读取到的事件序列数据所包含的每个事件序列数据的目标事件;上述各其它事件,是指上述事件序列数据处理端读取到的事件序列数据所包含的每个事件序列数据中的除目标事件以外的其它事件。重点关注的是,上述各其它事件与上述各目标事件的事件类型可以相同或不同。
在示出的一种实施方式中,上述各目标事件包括,将预设大小的滑动窗口在上述事件序列数据中进行滑动时,上述滑动窗口的中心事件。
接着以上示例描述,以上述读取到的上述事件序列数据为MultiEventSeqData,MultiEventSeqData中的一个事件序列数据EventSeqData1为[EA、ED、EC、EC、EE、EC、EE、EC、EE]为例进行说明,事件序列数据EventSeqData1中的目标事件,是指预设大小(比如:窗口长度为7)的滑动窗口在事件序列数据EventSeqData1进行滑动时,该滑动窗口的中心事件为:该滑动窗口长度为窗口中心位置所对应的事件。
为了更清楚地描述理解,事件序列数据EventSeqData1的滑动窗口和滑动窗口的中心事件,请参见以下图2所示。
图2是本说明书一示例性实施例提供的一种事件序列数据的滑动窗口的示意图。
如图2所示,事件序列数据EventSeqData1包括[EA、ED、EC、EC、EE、EC、EE、EC、EE];其中,EventSeqData1中的每个序列元素为具有用户操作上下文的事件;事件序列数据EventSeqData1的滑动窗口为如图2所示的虚线框所示,该滑动窗口的窗口长度为7,也即,该滑动窗口在滑动时对应事件序列数据EventSeqData1中的7个事件。
如图2所示的“滑动方向”,表征该滑动窗口从事件序列数据EventSeqData1的左侧到右侧进行滑动。当该滑动窗口滑动到如图2的滑动位置时,该滑动窗口的中间位置对应的事件序列数据EventSeqData1的事件EE为滑动窗口的中心事件(如图2中带斜线的EE)。
需要说明的是,上述滑动窗口在读取到的上述事件序列数据中的每个事件序列数据分别进行滑动时,上述滑动窗口的中心事件也在不断变化。
接着以上示例继续举例,当滑动窗口在事件序列数据EventSeqData1的滑动位置从如图2所示滑动位置向右滑动时,则如图2的滑动窗口的中心事件将由EE,变为紧挨EE右侧的EC。
需要说明的是,上述事件序列数据中包含的上述中心事件以外的各其它事件,是指在读取到的上述事件序列数据MultiEventSeqData中的每个序列数据中包含的滑动窗口的中心事件以外的各其它事件。比如:如图2所示,当事件序列数据EventSeqData1的滑动窗口的中心事件为EE(带斜线的EE)时,中心事件EE(带斜线的EE)以外的 其它事件包括如图2所示滑动窗口中的除EE(带斜线的EE)外其它事件,具体包括:如图2所示滑动窗口中的EE(带斜线的EE)左侧的ED、EC、EC,如图2所示滑动窗口中的EE(带斜线的EE)右侧的EC、EE(不带斜线的EE)、EC。
在本说明书,进一步地,在计算计算与读取到的上述事件序列数据对应的共现矩阵的过程中,上述事件序列数据处理端将预设大小的滑动窗口在上述事件序列数据中的各事件序列数据中进行滑动,依次计算上述滑动窗口的中心事件,与上述事件序列数据中包含的上述中心事件以外的各其它事件,在上述事件序列数据中的共现概率。
接着以上示例继续举例,上述事件序列数据处理端将预设大小的滑动窗口在事件序列数据EventSeqData1进行滑动,并依次计算上述滑动窗口的中心事件,与各事件序列数据中包含的上述中心事件以外的各其它事件,在事件序列数据EventSeqData1中的共现概率。
需要说明的是,以上示例仅描述了,滑动窗口在读取到的上述事件序列数据中的一个事件序列数据进行滑动时的一个滑动位置上的,所包括的滑动窗口的中心事件与该中心事件以外的各其它事件,在该事件序列数据中的共现概率。
类似的,针对上述事件序列数据处理端读取到的上述事件序列数据中的每个事件序列数据都分别对应存在与事件序列数据EventSeqData1类似的滑动窗口、滑动窗口的中心事件、滑动窗口的中心事件以外的各其它事件。
在示出的一种实施方式中,在依次计算上述滑动窗口的中心事件,与上述事件序列数据中包含的、上述中心事件以外的各其它事件,在上述事件序列数据中的共现概率的过程中,上述事件序列数据处理端统计上述事件序列数据中包含的各中心事件以外的各其它事件,与上述中心事件的事件距离;基于上述各其它事件与上述中心事件的事件距离,依次计算上述各其它事件与上述中心事件的共现概率。
以读取到的上述事件序列数据为MultiEventSeqData,MultiEventSeqData中的一个事件序列数据EventSeqData1为[EA、ED、EC、EC、EE、EC、EE、EC、EE]为例继续说明,请参见图2,当滑动窗口在事件序列数据EventSeqData1进行从左到右的滑动的过程中,上述事件序列数据处理端在该滑动窗口每次滑动时确定该滑动窗口的中心事件;以及,与各事件序列数据中包含的上述中心事件以外的各其它事件;接着,统计该各其它事件与该中心事件的事件距离;然后,基于该其它事件与该中心事件的事件距离,分别计算该其它事件与该中心事件的共现概率。
与以上示例的事件序列数据EventSeqData1计算共现概率的过程类似,上述事件序列数据处理端对读取到的上述事件序列数据MultiEventSeqData中的每个事件序列数据也进行类似处理,统计每个事件序列数据中各自包含的中心事件以外的各其它事件,与中心事件的事件距离,基于各其它事件与中心事件的事件距离,分别依次计算各其它事件与中心事件的共现概率。
需要说明的是,上述事件距离,是指在读取到的上述事件序列数据的每个事件序列数据中,各其它事件与中心事件在每个事件序列数据中相隔的长度。
例如,在事件序列数据EventSeqData1中,当滑动窗口滑动到如图2所示的滑动位置时,中心事件为EE(带斜线的EE),各其它事件包括:如图2所示滑动窗口中的EE(带斜线的EE)左侧的ED、EC(带斜线的EE左侧的最左侧EC)、EC(带斜线的EE左侧的左侧紧挨着的EC),如图2所示滑动窗口中的EE(带斜线的EE)右侧的EC(带斜线的EE右侧的紧挨着的EC)、EE(不带斜线的EE)、EC(带斜线的EE右侧的最右侧EC)。
如图2所示滑动窗口中的EE(带斜线的EE)左侧的ED、EC(带斜线的EE左侧的最左侧EC)、EC(带斜线的EE左侧的左侧紧挨着的EC),与中心事件(带斜线的EE)的事件距离分别为3、2、1。如图2所示滑动窗口中的EE(带斜线的EE)右侧的EC(带斜线的EE右侧的紧挨着的EC)、EE(不带斜线的EE)、EC(带斜线的EE右 侧的最右侧EC),与中心事件(带斜线的EE)的事件距离分别为1、2、3。
在示出的一种实施方式中,在统计上述事件序列数据中包含的各中心事件以外的各其它事件,与上述中心事件的共现概率的过程中,上述事件序列数据处理端,可以利用上述其它事件与上述中心事件的事件距离的倒数,表征上述其它事件与上述中心事件的共现概率。
接着以上示例继续举例说明,如图2所示滑动窗口中的EE(带斜线的EE)左侧的ED、EC(带斜线的EE左侧的最左侧EC)、EC(带斜线的EE左侧的左侧紧挨着的EC),与中心事件(带斜线的EE)的事件距离分别为3、2、1,则对应的事件距离的倒数分别为1/3、1/2、1。
如图2所示滑动窗口中的EE(带斜线的EE)右侧的EC(带斜线的EE右侧的紧挨着的EC)、EE(不带斜线的EE)、EC(带斜线的EE右侧的最右侧EC),与中心事件(带斜线的EE)的事件距离分别为1、2、3,则对应的事件距离的倒数分别为1、1/2、1/3。
需要说明的是,在统计上述事件序列数据中包含的各中心事件以外的各其它事件,与上述中心事件的事件距离;以及,基于各其它事件与上述中心事件的事件距离,分别计算上述各其它事件与上述中心事件的共现概率的过程中,上述事件序列数据处理端可以以上述各其它事件与上述中心事件的事件距离的倒数之和,作为在上述滑动窗口的一个滑动位置上的上述各其它事件与上述中心事件的共现概率。
例如:针对事件序列数据EventSeqData1,滑动窗口在如图2所述的位置时,中心事件(带斜线的EE)与EC(包括:滑动窗口中的所有4个EC)的共现概率为:EC(包括:滑动窗口中的所有4个EC)分别与中心事件(带斜线的EE)的事件距离的倒数之和(1+1/2+1+1/3=2.83),也即,中心事件(带斜线的EE)与EC(包括:滑动窗口中的所有4个EC)的共现概率为2.83。
类似地,中心事件(带斜线的EE)与ED(包括:滑动窗口中的所有ED)的共现概率为:ED(包括:滑动窗口中的所有ED)分别与中心事件(带斜线的EE)的事件距离的倒数之和(1/3=0.33),也即,中心事件(带斜线的EE)与ED(包括:滑动窗口中的所有1个ED)的共现概率为0.33。
类似地,中心事件(带斜线的EE)与EE(包括:滑动窗口中的除带斜线的EE外的所有EE)的共现概率为:EE(包括:滑动窗口中的除带斜线的EE外的所有EE)分别与中心事件(带斜线的EE)的事件距离的倒数之和(1/2=0.5),也即,中心事件(带斜线的EE)与EE(包括:滑动窗口中的除带斜线的EE外的所有1个EE)的共现概率为0.5。
需要说明的是,由于滑动窗口在上述事件序列数据进行滑动时,会不断切换滑动窗口的中心事件,及与滑动窗口的中心事件对应的其它各事件,所以,上述事件序列数据处理端需要将滑动窗口滑动时计算得到的读取到的上述事件序列数据中的每个事件序列数据中所有滑动窗口滑动位置的事件i与事件j的计算得到的共现概率相加求和,得到每个事件序列数据的事件i与事件j的共现概率1、共现概率2、...、共现概率N;以及,进一步地,将读取到的上述事件序列数据中的每个事件序列数据,计算得到每个事件序列数据的事件i与事件j的所有共现概率(包括共现概率1、共现概率2、...、共现概率N)进行相加,得到事件i与事件j在读取到的上述事件序列数据中的共现概率;其中,事件i与事件j为属于上述事件集的任意事件;进一步地,上述事件序列数据处理端基于计算出的事件i与事件j的共现概率生成与读取到的上述事件序列数据对应的共现矩阵(上述共现矩阵,比如请参见如表1所示)。
在本说明书中,在计算生成与读取到的上述事件序列数据对应的上述共现矩阵后,上述事件序列数据处理端将上述共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练,得到与上述事件集 中包含的各事件对应的输入特征向量。
在本说明书中,上述损失函数,是指上述事件序列数据处理端预先构建的、以上述共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练的损失函数;
其中,上述损失函数表征上述共现矩阵中包含的共现概率相关的事件对应初始化特征向量,逼近上述共现矩阵中包含的共现概率的程度。
在示出的一种实施方式中,上述损失函数表征上述共现概率相关的事件对应初始化特征向量的内积,逼近上述共现概率的对数的程度。
例如,上述损失函数可以基于以下公式表征:
Figure PCTCN2020132133-appb-000010
其中,J表示损失函数的输出值;i和j表示上述事件集中任意的两个事件;
Figure PCTCN2020132133-appb-000011
表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和j在上述共现矩阵(比如:如表1所示的共现矩阵)中的共现概率;E的取值大小为M 2;M表示上述事件集包含的各事件的类别总数;f(x)表示以C(i,j)作为参数x的权重函数;其中,上述f(x)为以上述共现矩阵中包含的C(i,j)的数量为变量的区间函数。
例如,上述f(x)可以基于以下公式表征:
Figure PCTCN2020132133-appb-000012
其中,d表示0或者趋于0的极小值;S表示与上述共现矩阵中包含的C(i,j)的值对应的阈值。比如:S可以为100,当C(i,j)的值小于100时,f(C(i,j))=d;当C(i,j)的值大于或等于100时,f(C(i,j))=1。
需要说明的是,上述权重函数f(x)中的d、S在本说明书中不作具体限定,可以由用户预设设置,通过上述权重函数,可以防止上述共现矩阵中的共现概率的值为较大的事件对,掩盖了共现概率的值为较小的事件对,提高了对上述事件集中包含的共现概率相关的事件对应的初始化特征向量进行训练得到上述事件集中包含的各事件对应的输入特征向量的信息密度。
另外需要说明的是,上述损失函数除了基于以上上述共现矩阵中包含的共现概率相关的事件对应初始化特征向量的内积,逼近上述共现矩阵中包含的共现概率的对数的程度,也即,上述损失函数的公式除了基于以上示出的
Figure PCTCN2020132133-appb-000013
Figure PCTCN2020132133-appb-000014
表征外,还可以以上上述共现矩阵中包含的共现概率相关的事件对应初始化特征向量的内积,逼近上述共现矩阵中包含的共现概率的除对数函数外的其它函数的程度。
在示出的一种实施方式中,在将上述共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练,得到与上述事件集中包含的各事件对应的输入特征向量的过程中,上述事件序列数据处理端迭代执行以下训练步骤,直到得到与上述事件集中包含的各事件对应的输入特征向量:训练步骤A.上述事件序列数据处理端将上述共现矩阵中包含的共现概率相关的事件对应初始化特征向量,输入至以上述损失函数中,计算上述损失函数的输出值。
以上述损失函数为表征共现矩阵中包含的共现概率相关的事件对应初始化特征向量的内积,逼近上述共现矩阵中包含的共现概率的对数的程度进行示例说明,也即,当上述损失函数比如为以上描述公式
Figure PCTCN2020132133-appb-000015
对应的损失函数J时,上述事件序列数据处理端计算上述将共现矩阵中包含的共现概率相关的事件对应初始化特征向量内积,并将计算出的该内积输入至以上述共现矩阵中包含的共现概 率的对数作为约束的损失函数J,计算损失函数J的输出值。
训练步骤B.上述事件序列数据处理端调整上述初始化特征向量,求解上述损失函数的最小值。
训练步骤C.将求解出上述损失函数的最小值时,输入至上述损失函数的调整后的上述初始化特征向量,确定为上述共现矩阵中包含的共现概率相关的事件对应输入特征向量。
针对训练步骤B及训练步骤C,接着以上示例继续举例说明,上述事件序列数据处理端可以通过最速下降法、牛顿法、拟牛顿法等最优化算法中的任意一种,来迭代调整上述初始化特征向量求解损失函数J的最小值,并将求解出损失函数J的最小值时,输入至损失函数J的迭代调整后的初始化特征向量,确定为上述共现矩阵中包含的共现概率相关的事件对应输入特征向量。
在本说明书中,上述机器学习模型,是指基于训练完成得到的上述事件集中包含的各事件对应的输入特征向量,针对用户账户的操作行为事件进行风险识别的风险识别模型。
例如,在实际应用中,上述机器学习模型可以包括淘宝、天猫、支付宝、阿里云等业务系统搭载的针对用户账户的操作行为事件进行风险识别的风险识别模型。
在本说明书中,在训练得到与上述事件集中包含的各事件对应的输入特征向量后,上述事件序列数据处理端基于上述事件集所包含的事件对应的输入特征向量,对上述事件序列数据进行编码;其中,编码完成的上述事件序列数据用于作为输入数据输入至上述机器学习模型进行计算。
接着以上示例继续举例,上述事件序列数据处理端基于训练完成得到的上述事件集所包含的事件对应的输入特征向量,对从上述事件序列数据集合中的读取到的上述事件序列数据进行编码;将编码完成的事件序列数据用于作为输入数据输入至上述机器学习模型进行风险预测及评估,输出与目标用户的对应风险评分或分类,以使业务系统进行进一步分析和决策,比如:禁止目标用户作为支付宝业务系统的商户签约支付宝;或者,限制目标用户作为支付宝业务系统的签约商户的支付宝商户的相关权限等。
在示出的一种实施方式中,在基于上述事件集所包含的事件对应的输入特征向量,对上述事件序列数据进行编码的过程中,上述事件序列数据处理端将基于与上述事件集所包含的各事件对应的输入特征向量,按照上述事件序列数据中的各事件的排列顺序进行向量拼接,得到与上述事件序列数据对应的事件序列向量。
接着以上示例继续举例,上述事件集所包含的事件{EA、EB、EC、ED、EE、...、EN}分别一一对应的输入特征向量为{W EA_Vector、W EB_Vector、W EC_Vector、W ED_Vector、W EE_Vector、...、W EN_Vector),则读取到的事件序列数据MultiEventSeqData中的一个事件序列数据EventSeqData1为:[EA、ED、EC、EC、EE、EC、EE、EC、EE]时,上述事件序列数据处理端按EA->ED->EC->EC->EE->EC->EE->EC->EE的事件排列顺序,进行向量拼接,得到与事件序列数据EventSeqData1对应的事件序列向量,也即,该事件序列向量的编码为以下向量的顺序拼接(用“+”表示):
W EA_Vector+W ED_Vector+W EC_Vector+W EC_Vector+W EE_Vector+W EC_Vector+W EE_Vector+W EC_Vector+W EE_Vector
与以上示例的序列数据EventSeqData1对应的过程类似,上述事件序列数据处理端将从上述事件序列数据集合中的读取到的每个事件序列数据中的各事件对应的输入特征向量,按照每个事件序列数据中的各事件的排列顺序,进行向量拼接,得到与读取到的所有事件序列数据中的每个事件序列数据分别对应的事件序列向量。
需要说明的是,以上描述及示例的技术方案,是以上述事件序列数据集合包括的事件序列数据,对应为一种用户行为类型进行描述的。在实际应用中,上述事件序列数 据集合还可以包括多种用户行为类型分别对应的多个事件序列数据集合。
在本说明书中,上述事件序列数据集合还可以包括以正常用户行为对应上述事件构建的正常的事件序列数据集合、与异常用户行为对应上述事件构建的异常的事件序列数据集合;
其中,正常用户行为是指,用户针对用户账户的正常操作行为;异常用户行为是指,用户针对用户账户的异常操作行为。
例如,以支付宝为例,用户A的针对支付宝账户的一个正常操作行为可以包括:“登录支付宝”->“给用户B单次转账”->“退出支付”;用户的针对支付宝账户的一个异常操作行为可以包括:“反复登录支付宝”->“给100个用户在预设时间内多次转账”->“退出支付”。
需要说明的是,上述正常的事件序列数据集合和上述异常的事件序列数据集合,分别所包括的事件序列数据的个数、事件序列数据的事件及组合,在本说明书中,不作具体限定。
在示出的一种实施方式中,当上述事件序列数据集合包括上述正常的事件序列数据集合和上述异常的事件序列数据集合时,相应的,上述共现矩阵包括与从上述正常的事件序列数据集合中读取到的事件序列数据集合对应的第一共现矩阵,和与从上述异常的事件序列数据集合中读取到的事件序列数据集合对应的第二共现矩阵。
在本说明书中,进一步地,在为上述事件集中包含的事件分别生成对应的初始化特征向量时,上述事件序列数据处理端可以分别为上述事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量和与第二共现矩阵对应的初始化特征向量。
需要的是,上述第一共现矩阵和上述第二共现矩阵,与以上描述的如表1所示的上述共现矩阵类似,这里不作赘述。
在本说明书中,进一步地,在将上述共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练,得到与上述事件集中包含的各事件对应的输入特征向量时,上述事件序列数据处理端可以基于预设的与上述第一共现矩阵对应的第一损失函数,以上述第一共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练,得到与上述第一共现矩阵对应的上述事件集中包含的各事件对应的第一输入特征向量;以及,上述事件序列数据处理端可以基于预设的与上述第二共现矩阵对应预设的第二损失函数,以上述第二共现矩阵中包含的共现概率作为约束,对上述事件集中包含的与上述共现概率相关的事件对应的初始化特征向量进行训练,得到与上述第二共现矩阵对应的上述事件集中包含的各事件对应的第二输入特征向量。
需要说明的是,上述第一损失函数J1和上述第二损失函数J2,与以上描述的损失函数J类似,这里不作赘述。上述第一输入特征向量和上述第二输入特征向量,分别与以上描述的上述事件集中包含的各事件对应的输入特征向量(比如,请参见以上示例描述的上述事件集所包含的事件{EA、EB、EC、ED、EE、...、EN}分别一一对应的输入特征向量为{W EA_Vector、W EB_Vector、W EC_Vector、W ED_Vector、W EE_Vector、...、W EN_Vector})类似,这里不再赘述。
在本说明书中,进一步地,上述事件序列数据处理端将上述第一输入特征向量和上述第二输入特征向量,拼接生成与上述事件集中包含的各事件对应的输入特征向量。
在示出的一种实施方式中,在将上述第一输入特征向量和上述第二输入特征向量,拼接生成与上述事件集中包含的各事件对应的输入特征向量的过程中,上述事件序列数据处理端将上述第一输入特征向量和上述第二输入特征向量,纵向拼接生成与上述事件集中包含的各事件对应的输入特征向量。
接着以上示例继续举例,上述事件序列数据处理端获得的与上述事件集的包含的各事件对应的第一输入特征向量为:
Figure PCTCN2020132133-appb-000016
以及,与上述事件集的包含的各事件对应的第二输入特征向量为:
Figure PCTCN2020132133-appb-000017
为了方便理解和描述,上述事件序列数据处理端获得的与上述事件集的包含的各事件对应的第一输入特征向量,使用以下公式1表征:
公式1:
Figure PCTCN2020132133-appb-000018
其中,i表示上述事件集中的各事件,w的上标N表示是与上述第一共享矩阵为约束对应训练得到的第一输入特征向量。
上述事件序列数据处理端获得的与上述事件集的包含的各事件对应的第二输入特征向量,使用以下公式2表征:
公式2:
Figure PCTCN2020132133-appb-000019
其中,i表示上述事件集中的各事件,w的上标A表示是与上述第二共享矩阵为约束对应训练得到的第二输入特征向量。
进一步地,上述事件序列数据处理端将该第一输入特征向量和该第二输入特征向量,纵向拼接生成与上述事件集中包含的各事件对应的输入特征向量;其中,纵向拼接生成的与上述事件集中包含的各事件对应的输入特征向量,使用以下公式3表征:
公式3:
Figure PCTCN2020132133-appb-000020
其中,i表示上述事件集中的各事件,带上标N的w表示是与上述事件集中包含的各事件对应的第一输入特征向量,带上标A的w表示是与上述事件集中包含的各事件对应的第二输入特征向量。
如公式3所示,上述事件序列数据处理端最终输出的与上述事件集中包含的各事件对应的最终的输入特征向量wi为各事件对应的第一输入特征向量与第二输入特征向量的纵向拼接向量。
需要说明的是,在实际应用中,上述事件序列数据处理端最终输出的与上述事件集中包含的各事件对应的输入特征向量,也可以是上述事件序列数据处理端将上述第一输入特征向量和上述第二输入特征向量横向拼接生成。
在本说明书中,在将上述第一输入特征向量和上述第二输入特征向量,拼接生成与上述事件集中包含的各事件对应的输入特征向量后,基于上述事件集所包含的事件对应的该输入特征向量,对上述事件序列数据集合中的各事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至上述机器学习模型进行计算。
需要说明是,基于上述第一输入特征向量和上述第二输入特征向量得到上述事件集所包含的事件对应的该输入特征向量,对上述事件序列数据集合中的各事件序列数据进行编码过程,与以上描述的读取到的事件序列数据MultiEventSeqData仅对应一个共现矩阵进行编码的过程类似,具体不再赘述。
需要说明的是,通过直接拟合正常用户行为事件及异常用户行为事件各自对应的共现矩阵(上述第一共现矩阵、上述第二共现矩阵),充分地利用事件序列集合中的统计信息,避免使用真伪序列判别的方式来间接学习行为事件的共现特征表达,从而只需要少量序列数据就能达到预期的效果,提高了事件序列数据的编码效率。
在以上技术方案中,基于为预设的事件集中包含的各事件分别生成对应的初始化特征向量;从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作 为输入数据输入至机器学习模型进行计算;一方面,提高了事件编码对用户正常行为和异常行为的双层表征的信息密度,并克服了稀疏编码带来的低信息密度和维度灾难;另一方面,仅需少量事件序列数据可以进行事件及事件序列数据的编码计算,提高了编码效率。
与上述方法实施例相对应,本申请还提供了事件序列数据的处理装置的实施例。
与上述方法实施例相对应,本说明书还提供了一种事件序列数据的处理装置的实施例。本说明书的事件序列数据的处理装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图3所示,为本说明书的事件序列数据的处理装置所在电子设备的一种硬件结构图,除了图3所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
图4是本说明书一示例性实施例示出的一种事件序列数据的处理装置的框图。
请参考图4,所述事件序列数据的处理装置40可以应用在前述图3所示的电子设备中,所述装置包括:生成模块401、计算模块402、训练模块403和编码模块404。
生成模块401,为预设的事件集中包含的各事件分别生成对应的初始化特征向量。
计算模块402,从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵。
训练模块403,将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量。
编码模块404,基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
在本实施例中,所述共现概率,为事件序列数据所包含的各目标事件,与所述各目标事件以外的各其它事件,在所述事件序列数据中共同出现的概率;所述共现矩阵的行对应各目标事件,所述共现矩阵的列对应各目标事件以外的各其它事件;或者,所述共现矩阵的列对应各目标事件,所述共现矩阵的行对应各目标事件以外的各其它事件。
在本实施例中,所述各目标事件包括,将预设大小的滑动窗口在所述事件序列数据中进行滑动时,所述滑动窗口的中心事件;所述计算模块402进一步:将预设大小的滑动窗口在所述事件序列数据中进行滑动,并确定每次滑动时所述滑动窗口的中心事件;依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率。
在本实施例中,所述计算模块402进一步:统计所述事件序列数据中包含的各中心事件以外的各其它事件,与所述中心事件的事件距离;基于所述各其它事件与所述中心事件的事件距离,依次计算所述各其它事件与所述中心事件的共现概率。
在本实施例中,利用所述各其它事件与所述中心事件的事件距离的倒数,表征所述各其它事件与所述中心事件的共现概率。
在本实施例中,所述生成模块401进一步:为预设的事件集中包含的各事件分别随机生成对应的初始化特征向量。
在本实施例中,所述训练模块403进一步:迭代执行以下训练步骤,直到得到与所述事件集中包含的各事件对应的输入特征向量:将所述共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值;其中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量,逼近 所述共现概率的程度;调整所述初始化特征向量,求解所述损失函数的输出值的最小值;将求解出所述最小值时,输入至所述损失函数的调整后的所述初始化特征向量,确定为与所述共现概率相关的事件对应输入特征向量。
在本实施例中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量的内积,逼近所述共现概率的对数的程度;所述训练模块403进一步:计算与所述共现概率相关的事件对应的初始化特征向量内积,并将计算出的所述内积输入至以所述共现概率的对数作为约束的损失函数,计算所述损失函数的输出值。
在本实施例中,所述损失函数基于以下公式表征:
Figure PCTCN2020132133-appb-000021
其中,J表示损失函数的输出值;i和j表示所述事件集中任意的两个事件;
Figure PCTCN2020132133-appb-000022
表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和j在所述共现矩阵中的共现概率;E的取值大小为M 2;M表示所述事件集包含的各事件的类别总数;f(x)表示权重函数。
在本实施例中,所述f(x)为以所述共现矩阵中包含的C(i,j)为变量的区间函数。
在本实施例中,所述f(x)基于以下公式表征:
Figure PCTCN2020132133-appb-000023
其中,d表示0或者趋于0的极小值;S表示与所述共现矩阵中包含的C(i,j)对应的阈值。
在本实施例中,所述编码模块404进一步:基于与所述事件集所包含的各事件对应的输入特征向量,按照所述事件序列数据中的各事件的排列顺序进行向量拼接,得到与所述事件序列数据对应的事件序列向量。
在本实施例中,所述事件包括用户针对用户账户的操作行为事件;所述机器学习模型为针对用户账户进行风险识别的风险识别模型。
在本实施例中,所述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;相应的,所述共现矩阵包括与从正常的事件序列数据集合中读取到的事件序列数据对应的第一共现矩阵,和与从异常的事件序列数据集合中读取到的事件序列数据对应的第二共现矩阵;所述生成模块401进一步:为预设的事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量、与第二共现矩阵对应的初始化特征向量。
在本实施例中,所述训练模块403进一步:基于预设的与所述第一共现矩阵对应的第一损失函数,以所述第一共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第一共现矩阵对应的所述事件集中包含的各事件对应的第一输入特征向量;基于预设的与所述第二共现矩阵对应预设的第二损失函数,以所述第二共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第二共现矩阵对应的所述事件集中包含的各事件对应的第二输入特征向量;将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量。
在本实施例中,所述训练模块403进一步:将第一输入特征向量和第二输入特征向量,纵向拼接生成与所述事件集中包含的各事件对应的输入特征向量。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也 可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的装置、装置、模块或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书还提供了一种电子设备的实施例。该电子设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。该电子设备,通过读取并执行所述存储器存储的与上述方法实施例对应的事件序列数据的处理的控制逻辑对应的机器可执行指令,所述处理器被促使执行该机器可执行指令。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (33)

  1. 一种事件序列数据的处理方法,所述方法包括:
    为预设的事件集中包含的各事件分别生成对应的初始化特征向量;
    从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;
    将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;
    基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
  2. 根据权利要求1所述的方法,所述共现概率,为事件序列数据所包含的各目标事件,与所述各目标事件以外的各其它事件,在所述事件序列数据中共同出现的概率;
    所述共现矩阵的行对应各目标事件,所述共现矩阵的列对应各目标事件以外的各其它事件;或者,所述共现矩阵的列对应各目标事件,所述共现矩阵的行对应各目标事件以外的各其它事件。
  3. 根据权利要求2所述的方法,所述各目标事件包括,将预设大小的滑动窗口在所述事件序列数据中进行滑动时,所述滑动窗口的中心事件;
    所述方法还包括:
    将预设大小的滑动窗口在所述事件序列数据中进行滑动,并确定每次滑动时所述滑动窗口的中心事件;
    依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率。
  4. 根据权利要求3所述的方法,所述依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率,包括:
    统计所述事件序列数据中包含的各中心事件以外的各其它事件,与所述中心事件的事件距离;
    基于所述各其它事件与所述中心事件的事件距离,依次计算所述各其它事件与所述中心事件的共现概率。
  5. 根据权利要求4所述的方法,利用所述各其它事件与所述中心事件的事件距离的倒数,表征所述各其它事件与所述中心事件的共现概率。
  6. 根据权利要求1所述的方法,所述为预设的事件集中包含的各事件分别生成对应的初始化特征向量,包括:
    为预设的事件集中包含的各事件分别随机生成对应的初始化特征向量。
  7. 根据权利要求1所述的方法,所述将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量,包括:
    迭代执行以下训练步骤,直到得到与所述事件集中包含的各事件对应的输入特征向量:
    将所述共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值;其中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量,逼近所述共现概率的程度;
    调整所述初始化特征向量,求解所述损失函数的输出值的最小值;将求解出所述最小值时,输入至所述损失函数的调整后的所述初始化特征向量,确定为与所述共现概率相关的事件对应输入特征向量。
  8. 根据权利要求7所述的方法,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量的内积,逼近所述共现概率的对数的程度;
    所述将所述共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值,包括:
    计算与所述共现概率相关的事件对应的初始化特征向量内积,并将计算出的所述内积输入至以所述共现概率的对数作为约束的损失函数,计算所述损失函数的输出值。
  9. 根据权利要求8所述的方法,所述损失函数基于以下公式表征:
    Figure PCTCN2020132133-appb-100001
    其中,J表示损失函数的输出值;i和j表示所述事件集中任意的两个事件;
    Figure PCTCN2020132133-appb-100002
    表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和j在所述共现矩阵中的共现概率;E的取值大小为M 2;M表示所述事件集包含的各事件的类别总数;f(x)表示权重函数。
  10. 根据权利要求9所述的方法,所述f(x)为以所述共现矩阵中包含的C(i,j)为变量的区间函数。
  11. 根据权利要求10所述的方法,所述f(x)基于以下公式表征:
    Figure PCTCN2020132133-appb-100003
    其中,d表示0或者趋于0的极小值;S表示与所述共现矩阵中包含的C(i,j)对应的阈值。
  12. 根据权利要求1所述的方法,所述基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码,包括:
    基于与所述事件集所包含的各事件对应的输入特征向量,按照所述事件序列数据中的各事件的排列顺序进行向量拼接,得到与所述事件序列数据对应的事件序列向量。
  13. 根据权利要求1所述的方法,所述事件包括用户针对用户账户的操作行为事件;所述机器学习模型为针对用户账户进行风险识别的风险识别模型。
  14. 根据权利要求1所述的方法,所述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;
    相应的,所述共现矩阵包括与从正常的事件序列数据集合中读取到的事件序列数据对应的第一共现矩阵,和与从异常的事件序列数据集合中读取到的事件序列数据对应的第二共现矩阵;
    所述为预设的事件集中包含的各事件分别生成对应的初始化特征向量,包括:
    为预设的事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量、与第二共现矩阵对应的初始化特征向量。
  15. 根据权利要求14所述的方法,所述将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量,包括:
    基于预设的与所述第一共现矩阵对应的第一损失函数,以所述第一共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第一共现矩阵对应的所述事件集中包含的各事件对应的第一输入特征向量;
    基于预设的与所述第二共现矩阵对应预设的第二损失函数,以所述第二共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第二共现矩阵对应的所述事件集中包含的各事件对应的第二输入特征向量;
    将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量。
  16. 根据权利要求15所述的方法,所述将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量,包括:
    将第一输入特征向量和第二输入特征向量,纵向拼接生成与所述事件集中包含的各事件对应的输入特征向量。
  17. 一种事件序列数据的处理装置,所述装置包括:
    生成模块,为预设的事件集中包含的各事件分别生成对应的初始化特征向量;
    计算模块,从事件序列数据集合中依次读取事件序列数据,并计算与读取到的所述事件序列数据对应的共现矩阵;其中,所述共现矩阵为基于所述事件序列数据中包含的各事件之间的共现概率生成的矩阵;
    训练模块,将所述共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述事件集中包含的各事件对应的输入特征向量;
    编码模块,基于与所述事件集所包含的各事件对应的输入特征向量,对所述事件序列数据进行编码;其中,编码完成的事件序列数据用于作为输入数据输入至机器学习模型进行计算。
  18. 根据权利要求17所述的装置,所述共现概率,为事件序列数据所包含的各目标事件,与所述各目标事件以外的各其它事件,在所述事件序列数据中共同出现的概率;
    所述共现矩阵的行对应各目标事件,所述共现矩阵的列对应各目标事件以外的各其它事件;或者,所述共现矩阵的列对应各目标事件,所述共现矩阵的行对应各目标事件以外的各其它事件。
  19. 根据权利要求18所述的装置,所述各目标事件包括,将预设大小的滑动窗口在所述事件序列数据中进行滑动时,所述滑动窗口的中心事件;
    所述计算模块进一步:
    将预设大小的滑动窗口在所述事件序列数据中进行滑动,并确定每次滑动时所述滑动窗口的中心事件;
    依次计算所述滑动窗口的中心事件,与所述事件序列数据中包含的所述中心事件以外的各其它事件,在所述事件序列数据中的共现概率。
  20. 根据权利要求19所述的装置,所述计算模块进一步:
    统计所述事件序列数据中包含的各中心事件以外的各其它事件,与所述中心事件的事件距离;
    基于所述各其它事件与所述中心事件的事件距离,依次计算所述各其它事件与所述中心事件的共现概率。
  21. 根据权利要求20所述的装置,利用所述各其它事件与所述中心事件的事件距离的倒数,表征所述各其它事件与所述中心事件的共现概率。
  22. 根据权利要求17所述的装置,所述生成模块进一步:
    为预设的事件集中包含的各事件分别随机生成对应的初始化特征向量。
  23. 根据权利要求17所述的装置,所述训练模块进一步:
    迭代执行以下训练步骤,直到得到与所述事件集中包含的各事件对应的输入特征向量:
    将所述共现概率相关的事件对应的初始化特征向量,输入至以所述共现概率作为约束的损失函数,计算所述损失函数的输出值;其中,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量,逼近所述共现概率的程度;
    调整所述初始化特征向量,求解所述损失函数的输出值的最小值;
    将求解出所述最小值时,输入至所述损失函数的调整后的所述初始化特征向量,确定为与所述共现概率相关的事件对应输入特征向量。
  24. 根据权利要求23所述的装置,所述损失函数表征,与所述共现概率相关的事件对应初始化特征向量的内积,逼近所述共现概率的对数的程度;
    所述训练模块进一步:
    计算与所述共现概率相关的事件对应的初始化特征向量内积,并将计算出的所述内积输入至以所述共现概率的对数作为约束的损失函数,计算所述损失函数的输出值。
  25. 根据权利要求24所述的装置,所述损失函数基于以下公式表征:
    Figure PCTCN2020132133-appb-100004
    其中,J表示损失函数的输出值;i和j表示所述事件集中任意的两个事件;
    Figure PCTCN2020132133-appb-100005
    表示事件i与事件j分别对应的初始化特征向量的内积;C(i,j)表示事件i和j在所述共现矩阵中的共现概率;E的取值大小为M 2;M表示所述事件集包含的各事件的类别总数;f(x)表示权重函数。
  26. 根据权利要求25所述的装置,所述f(x)为以所述共现矩阵中包含的C(i,j)为变量的区间函数。
  27. 根据权利要求25所述的装置,所述f(x)基于以下公式表征:
    Figure PCTCN2020132133-appb-100006
    其中,d表示0或者趋于0的极小值;S表示与所述共现矩阵中包含的C(i,j)对应的阈值。
  28. 根据权利要求17所述的装置,所述编码模块进一步:
    基于与所述事件集所包含的各事件对应的输入特征向量,按照所述事件序列数据中的各事件的排列顺序进行向量拼接,得到与所述事件序列数据对应的事件序列向量。
  29. 根据权利要求17所述的装置,所述事件包括用户针对用户账户的操作行为事件;所述机器学习模型为针对用户账户进行风险识别的风险识别模型。
  30. 根据权利要求17所述的装置,所述事件序列数据集合包括正常的事件序列数据集合和异常的事件序列数据集合;
    相应的,所述共现矩阵包括与从正常的事件序列数据集合中读取到的事件序列数据对应的第一共现矩阵,和与从异常的事件序列数据集合中读取到的事件序列数据对应的第二共现矩阵;
    所述生成模块进一步:
    为预设的事件集中包含的事件,分别生成与第一共现矩阵对应的初始化特征向量、与第二共现矩阵对应的初始化特征向量。
  31. 根据权利要求30所述的装置,所述训练模块进一步:
    基于预设的与所述第一共现矩阵对应的第一损失函数,以所述第一共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第一共现矩阵对应的所述事件集中包含的各事件对应的第一输入特征向量;
    基于预设的与所述第二共现矩阵对应预设的第二损失函数,以所述第二共现矩阵中包含的共现概率作为约束,对所述事件集中包含的与所述共现概率相关的事件对应的初始化特征向量进行训练,得到与所述第二共现矩阵对应的所述事件集中包含的各事件对应的第二输入特征向量;
    将第一输入特征向量和第二输入特征向量,拼接生成与所述事件集中包含的各事件对应的输入特征向量。
  32. 根据权利要求31所述的装置,所述训练模块进一步:
    将第一输入特征向量和第二输入特征向量,纵向拼接生成与所述事件集中包含的各事件对应的输入特征向量。
  33. 一种电子设备,包括通信接口、处理器、存储器和总线,所述通信接口、所述处理器和所述存储器之间通过总线相互连接;
    所述存储器中存储机器可读指令,所述处理器通过调用所述机器可读指令,执行如权利要求1至16任一项所述的方法。
PCT/CN2020/132133 2020-01-06 2020-11-27 事件序列数据的处理方法、装置、电子设备 WO2021139437A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010011446.X 2020-01-06
CN202010011446.XA CN111242312B (zh) 2020-01-06 2020-01-06 事件序列数据的处理方法、装置、电子设备

Publications (1)

Publication Number Publication Date
WO2021139437A1 true WO2021139437A1 (zh) 2021-07-15

Family

ID=70870721

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132133 WO2021139437A1 (zh) 2020-01-06 2020-11-27 事件序列数据的处理方法、装置、电子设备

Country Status (2)

Country Link
CN (1) CN111242312B (zh)
WO (1) WO2021139437A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242312B (zh) * 2020-01-06 2021-08-17 支付宝(杭州)信息技术有限公司 事件序列数据的处理方法、装置、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069955A1 (en) * 2004-09-10 2006-03-30 Japan Science And Technology Agency Sequential data examination method
CN109284372A (zh) * 2018-09-03 2019-01-29 平安证券股份有限公司 用户操作行为分析方法、电子装置及计算机可读存储介质
CN109873812A (zh) * 2019-01-28 2019-06-11 腾讯科技(深圳)有限公司 异常检测方法、装置及计算机设备
CN110191113A (zh) * 2019-05-24 2019-08-30 新华三信息安全技术有限公司 一种用户行为风险评估方法及装置
CN111242312A (zh) * 2020-01-06 2020-06-05 支付宝(杭州)信息技术有限公司 事件序列数据的处理方法、装置、电子设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786823B (zh) * 2014-12-19 2019-06-28 日本电气株式会社 用于多维时序数据分析的系统和方法
CN107402921B (zh) * 2016-05-18 2021-03-30 创新先进技术有限公司 识别用户行为的事件时序数据处理方法、装置及系统
CN107609589A (zh) * 2017-09-12 2018-01-19 复旦大学 一种复杂行为序列数据的特征学习方法
CN110457595B (zh) * 2019-08-01 2023-07-04 腾讯科技(深圳)有限公司 突发事件报警方法、装置、系统、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069955A1 (en) * 2004-09-10 2006-03-30 Japan Science And Technology Agency Sequential data examination method
CN109284372A (zh) * 2018-09-03 2019-01-29 平安证券股份有限公司 用户操作行为分析方法、电子装置及计算机可读存储介质
CN109873812A (zh) * 2019-01-28 2019-06-11 腾讯科技(深圳)有限公司 异常检测方法、装置及计算机设备
CN110191113A (zh) * 2019-05-24 2019-08-30 新华三信息安全技术有限公司 一种用户行为风险评估方法及装置
CN111242312A (zh) * 2020-01-06 2020-06-05 支付宝(杭州)信息技术有限公司 事件序列数据的处理方法、装置、电子设备

Also Published As

Publication number Publication date
CN111242312B (zh) 2021-08-17
CN111242312A (zh) 2020-06-05

Similar Documents

Publication Publication Date Title
TWI788529B (zh) 基於lstm模型的信用風險預測方法及裝置
EP3627759B1 (en) Method and apparatus for encrypting data, method and apparatus for training machine learning model, and electronic device
CN112732911B (zh) 基于语义识别的话术推荐方法、装置、设备及存储介质
CN111352965B (zh) 序列挖掘模型的训练方法、序列数据的处理方法及设备
WO2021120677A1 (zh) 一种仓储模型训练方法、装置、计算机设备及存储介质
CN112395979B (zh) 基于图像的健康状态识别方法、装置、设备及存储介质
CN111954860B (zh) 对细粒度对抗性多队员运动进行预测的系统和方法
WO2022105117A1 (zh) 一种图像质量评价的方法、装置、计算机设备及存储介质
CN110110012A (zh) 用户预期价值评估方法、装置、电子设备及可读介质
WO2023116111A1 (zh) 一种磁盘故障预测方法及装置
CN112418059B (zh) 一种情绪识别的方法、装置、计算机设备及存储介质
US11500992B2 (en) Trusted execution environment-based model training methods and apparatuses
WO2020192307A1 (zh) 基于深度学习的答案抽取方法、装置、计算机设备和存储介质
CN113128287A (zh) 训练跨域人脸表情识别模型、人脸表情识别的方法及系统
CN113032001B (zh) 一种智能合约分类方法及装置
CN112995414B (zh) 基于语音通话的行为质检方法、装置、设备及存储介质
JP7430816B2 (ja) 異常行為検出方法、装置、電子機器及びコンピュータプログラム
CN111259157A (zh) 一种基于混合双向循环胶囊网络模型的中文文本分类方法
CN106997484A (zh) 一种优化用户信用模型建模过程的方法及装置
CN115050064A (zh) 人脸活体检测方法、装置、设备及介质
CN113221983A (zh) 迁移学习模型的训练方法及装置、图像处理方法及装置
WO2021139437A1 (zh) 事件序列数据的处理方法、装置、电子设备
WO2019223082A1 (zh) 客户类别分析方法、装置、计算机设备和存储介质
US20220233963A1 (en) Computer Program For Performing Drawing-Based Security Authentication
CN115797041A (zh) 基于深度图半监督学习的金融信用评估方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912293

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912293

Country of ref document: EP

Kind code of ref document: A1