A device label recognition method and device based on sequence characteristics and electronic equipment
By using a device tag identification method based on sequence features, which integrates the dynamic and static features of devices, the problem of missing user device tags is solved, thereby improving the accuracy of device profiling and data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the lack of user device tags is a serious problem, resulting in inaccurate device profiles and affecting personalized services and data security on internet platforms.
The device tag identification method based on sequence features utilizes sequence models and embedding layers to process the application sequence and device features of the target device, and integrates dynamic and static features to identify the target tag.
It improved the accuracy of device tag recognition, enhanced the user experience, and ensured platform data security.
Smart Images

Figure CN115795358B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text processing technology, and more specifically, to a device tag identification method, apparatus, electronic device, and computer-readable medium based on sequence features. Background Technology
[0002] With the development of the internet, various internet service platforms have emerged, such as online shopping platforms, ride-hailing platforms, sharing platforms, maps, music, and so on. These platforms provide services to a wide variety of user devices via the internet. Therefore, accurate and comprehensive user device profiles can make these platforms' services more tailored to users' personalized needs. At the same time, user device profiles can also identify security risks within the platform, ensuring data security.
[0003] Among them, user device profiles are mainly built through multi-dimensional tags. However, in reality, most device tags are missing. Therefore, it is particularly important to mine and identify device tags using existing information. Summary of the Invention
[0004] In view of this, the main objective of the present invention is to provide a device tag identification method, apparatus, electronic device and computer-readable medium based on sequence features, in order to at least partially solve at least one of the above-mentioned technical problems.
[0005] To address the aforementioned technical problems, the first aspect of this invention proposes a device tag identification method based on sequence features, the method comprising:
[0006] Obtain the application sequence and device characteristics of the target device respectively;
[0007] Input the application sequence into the sequence model, and filter the key features in the application sequence based on the time series of application review;
[0008] The device features are input into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature.
[0009] The first feature and the second embedding vector are input into the attention layer for processing to obtain the context features;
[0010] The context features and the second embedding vector are concatenated into the concatenation layer to obtain the concatenated features;
[0011] The spliced features are input into a label classifier of the target type to identify the target label of the target device.
[0012] According to a preferred embodiment of the present invention, the sequence model includes: a first embedding layer, a position encoder, and a gated attention unit, and the application sequence includes: an application review sequence and a corresponding application review time sequence;
[0013] The application sequence is input into a sequence model, and key features in the application sequence are filtered based on the time series of the application review, including:
[0014] The application review sequence is input into the first embedding layer for processing to obtain the first embedding vector, and the first embedding vector is input into the position encoder to obtain the position code corresponding to the first embedding vector; the position encoder is constructed based on the application review time sequence.
[0015] The first embedding vector and the corresponding positional encoding are input into a gated attention unit for processing to obtain the first feature.
[0016] According to a preferred embodiment of the present invention, the position encoder is a rotary position encoder, and the step of inputting the first embedding vector into the position encoder to obtain the position code corresponding to the first embedding vector includes:
[0017] Extract the query vector and key vector from the first embedding vector, respectively;
[0018] The i-th query vector and the i-th key vector are input into the rotary position encoder to obtain the relative position code of the i-th query vector and the relative position code of the i-th key vector.
[0019] According to a preferred embodiment of the present invention, the gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding position encoding to obtain the first feature.
[0020] According to a preferred embodiment of the present invention, after inputting the application review sequence into the first embedding layer for processing to obtain the first embedding vector, the method further includes:
[0021] The first embedding vector is input into a linear mapping layer to adjust its dimensions, resulting in a first embedding vector of a specified dimension.
[0022] Correspondingly, the device features are input into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature, including:
[0023] The device features are input into the second embedding layer for processing to obtain the second embedding vector;
[0024] The second embedding vector is input into the linear mapping layer to adjust the dimensions, resulting in a second embedding vector of the specified dimensions.
[0025] To address the aforementioned technical problems, a second aspect of the present invention provides a device tag identification apparatus based on sequence features, the apparatus comprising:
[0026] The acquisition module is used to acquire the application sequence and device characteristics of the target device, respectively.
[0027] The first processing module is used to input the application sequence into a sequence model, filter the key features in the application sequence according to the time series of application review, and obtain the first feature;
[0028] The second processing module is used to input the device features into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature.
[0029] The attention processing module is used to input the first feature and the second embedding vector into the attention layer for processing to obtain context features;
[0030] The concatenation module is used to concatenate the context features and the second embedding vector into the concatenation layer to obtain concatenated features;
[0031] The identification module is used to input the spliced features into a target type label classifier to identify the target label of the target device.
[0032] According to a preferred embodiment of the present invention, the sequence model includes: a first embedding layer, a position encoder, and a gated attention unit; the application sequence includes: an application review sequence and a corresponding application review time sequence; and the first processing module includes:
[0033] The vector processing module is used to input the application review sequence into the first embedding layer for processing to obtain a first embedding vector, and input the first embedding vector into the position encoder to obtain the position code corresponding to the first embedding vector; the position encoder is constructed based on the application review time sequence.
[0034] The gate attention processing module is used to input the first embedding vector and the corresponding position code into the gate attention unit for processing to obtain the first feature.
[0035] According to a preferred embodiment of the present invention, the position encoder is a rotary position encoder, and the vector processing module includes:
[0036] An extraction module is used to extract the query vector and the key vector from the first embedded vector, respectively;
[0037] The rotational position encoding module is used to input the i-th query vector and the i-th key vector into the rotational position encoder respectively to obtain the relative position encoding of the i-th query vector and the relative position encoding of the i-th key vector.
[0038] According to a preferred embodiment of the present invention, the gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding position encoding to obtain the first feature.
[0039] According to a preferred embodiment of the present invention, the apparatus further includes:
[0040] The first adjustment module is used to input the first embedding vector into the linear mapping layer to adjust the dimension, so as to obtain the first embedding vector of the specified dimension.
[0041] Correspondingly, the second processing module includes:
[0042] An embedding processing module is used to input the device features into a second embedding layer for processing to obtain a second embedding vector;
[0043] The second adjustment module is used to input the second embedding vector into the linear mapping layer to adjust the dimension, so as to obtain a second embedding vector of a specified dimension.
[0044] To solve the above-mentioned technical problems, a third aspect of the present invention provides an electronic device, comprising:
[0045] Processor; and
[0046] A memory storing computer-executable instructions, which, when executed, cause the processor to perform the method described in any of the preceding descriptions.
[0047] To address the aforementioned technical problems, a fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs that, when executed by a processor, implement the above-described method.
[0048] This invention processes application sequences using a sequence model to obtain a first feature that characterizes the temporal changes in the application behavior of a target device. The device feature is then processed through a second embedding layer to obtain a second embedding vector that characterizes the static attribute information of the target device. The first feature and the second embedding vector are then processed by an attention layer to obtain a context feature that integrates the temporal changes in the target device's application behavior and its static attribute information. The context feature and the second embedding vector are then concatenated and input into a target type label classifier to identify the target device's target label. This invention uses the application sequence of the target device as a dynamic feature and the device feature as a static feature. By analyzing and fusing the dynamic and static features of the target device through a sequence model, a second embedding layer, an attention layer, and a concatenation layer, a concatenated feature that implicitly contains the temporal changes in the target device's application behavior and attribute information is obtained. This comprehensive approach, combining the temporal changes in application behavior and attribute information, mines and identifies device labels, improving the accuracy of label identification, making device profiles more accurate, enhancing user experience, and ensuring platform data security. Attached Figure Description
[0049] To make the technical problems solved by this invention, the technical means adopted, and the technical effects achieved clearer, specific embodiments of this invention will be described in detail below with reference to the accompanying drawings. However, it should be noted that the drawings described below are merely drawings of exemplary embodiments of this invention. Those skilled in the art can obtain drawings of other embodiments based on these drawings without any creative effort.
[0050] Figure 1 This is a flowchart illustrating a device tag identification method based on sequence features according to an embodiment of the present invention;
[0051] Figure 2 This is a schematic diagram of the sequence model according to an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of the processing procedure of the device tag identification method based on sequence features according to an embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram of the structural framework of a device tag identification device based on sequence features according to an embodiment of the present invention;
[0054] Figure 5 This is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention;
[0055] Figure 6 This is a schematic diagram of an embodiment of a computer-readable medium according to the present invention. Detailed Implementation
[0056] Exemplary embodiments of the invention will now be described more fully with reference to the accompanying drawings. While these exemplary embodiments can be implemented in various specific ways, they should not be construed as limiting the invention to the embodiments set forth herein. Rather, these exemplary embodiments are provided to make the content of the invention more complete and to facilitate a full communication of the inventive concept to those skilled in the art.
[0057] Please see Figure 1 , Figure 1 This invention provides a device tag identification method based on sequence features, such as... Figure 1 As shown, the method includes:
[0058] S1. Obtain the application sequence and device characteristics of the target device respectively;
[0059] The application sequence can be a chronological sequence of historical application information from the target device to the platform for products or services. This application information may include: application time, name and / or quantity of the requested product or service, name and / or quantity of approved products or services, and name and / or quantity of unapproved products or services. The device characteristics may include the device type selected by the user, device user information, and device usage information. The device user information includes, but is not limited to, gender, age, region, and occupation. Device usage information includes, but is not limited to, the apps installed on the device and the websites visited by the device.
[0060] S2. Input the application sequence into the sequence model, and filter the key features in the application sequence according to the time series of application review to obtain the first feature;
[0061] In this embodiment, the sequence model is used to process sequence features to obtain latent feature vectors in a high-dimensional space. For example, such as... Figure 2 The sequence model includes: a first embedding layer, a position encoder, and a gated attention unit. The application sequence may include: an application review sequence and a corresponding application review time sequence, wherein: the application review sequence includes: the name and / or quantity of products or services that have passed the review, and the name and / or quantity of products or services that have not passed the review. The application review time sequence is arranged according to the time difference between the time when the target device's application is reviewed and the current time. The step of inputting the application sequence into the sequence model for processing to obtain the first feature includes:
[0062] S21. The application review sequence is input into the first embedding layer for processing to obtain the first embedding vector, and the first embedding vector is input into the position encoder to obtain the position code corresponding to the first embedding vector.
[0063] The first embedding layer encodes the application review sequence and maps it to a first embedding vector in a high-dimensional space. To facilitate subsequent fusion processing of the application sequence and device features, the first embedding vector corresponding to the application sequence and the second embedding vector corresponding to the device features need to be adjusted to embedding vectors of the same dimension. Therefore, the sequence model may also include a linear mapping layer, such as... Figure 3 After obtaining the first embedding vector, it can be input into a linear mapping layer to adjust its dimensions, resulting in a first embedding vector of the specified dimensions. Subsequent processing is all based on this first embedding vector of the specified dimensions.
[0064] In this embodiment, the position encoder is constructed based on the application review time sequence. The position encoder can sort the first embedded vector according to the review time to obtain the position code corresponding to the first embedded vector. The position code can be a relative position code or an absolute position code. The position encoder can encode the first embedded vector using sinusoidal position coding, learned position vectors, relative position representation, etc. Preferably, the position encoder sorts the first embedded vector according to the application review time sequence, i.e., the time difference between the time the target device's application is reviewed and the current time, to obtain a position code that represents the relative position of each first embedded vector. In this case, the position encoder is a rotary position encoder. The step of inputting the first embedded vector into the position encoder to obtain the position code corresponding to the first embedded vector includes:
[0065] Extract the query vector Q and the key vector K from the first embedding vector, respectively;
[0066] The i-th query vector and the i-th key vector are input into the rotary position encoder to obtain the relative position code of the i-th query vector and the relative position code of the i-th key vector.
[0067] Assume that Q and K both have dimensions n*d, where n is the sequence length and d is the dimension of the query vector and key vector, respectively. Taking the i-th query vector as an example, the i-th query vector q = (q0, q1, ..., qk). d-1 ) T The rotational position code of q obtained by inputting the rotary position encoder is:
[0068]
[0069] Where: m is the time difference corresponding to q in the application review time series, θ i =10000 -2i / d d is the dimension of the query vector Q and the key vector K.
[0070] S22. The first embedding vector and the corresponding position code are input into the gated attention unit for processing to obtain the first feature.
[0071] The gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding positional encoding to obtain the first feature.
[0072] For example, the gated attention unit processes the first embedding vector X, the query vector Q, and the key vector K using the following formula:
[0073] The input X∈R of the gated attention unit n×d W u W v ∈R d×e W z ∈R d×s W o ∈R e×d Then we can get U = φ u (XW u V = φ v (XW v Z = φ Z (XW Z ), where R n×d R is the n×d dimension weight coefficient matrix of the sequence model. d ×e R is the weight coefficient matrix of the sequence model with dimensions d×e. d×s R is the weight coefficient matrix of the sequence model with dimensions d×S. e×d Here, φ is the e×d dimension weight coefficient matrix of the sequence model, and φ is the activation function. Specifically, φ u φ v φ Z Let f(x) be the silu activation function, and its formula is as follows: f(x) = x * sigmoid(x);
[0074] The output of the gated attention unit is in, Represents the Hadamard product of U and AV;
[0075] in,
[0076] Where: Q = Q(Z), K = K(Z), Q() and K() represent affine transformation functions, Z is transformed by Q() to obtain the query vector Q, and Z is transformed by K() to obtain the key vector K; W u W v W z W o These are the weight coefficient matrices of the sequence model; S is the dimension of the transformed query vector Q and key vector K. TThe attention score is essentially calculated by pairwise calculation of the inner product of each pair of query vectors Q and key vectors K. The scaling factor is used to ensure the numerical stability of gradient calculations. Specifically, it is used to prevent variance inflation in the inner product calculation results, which could lead to saturation of the softmax result and cause gradient vanishing.
[0077] S3. Input the device features into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature;
[0078] Specifically, the second embedding layer encodes device features and maps them to a second embedding vector in a high-dimensional space. To ensure that the second embedding vector has the same dimension as the first embedding vector, the second embedding vector is input into a linear mapping layer to adjust its dimension, resulting in a second embedding vector of the specified dimension. Thus, both the first and second embedding vectors are embedding vectors of the specified dimension.
[0079] S4. Input the first feature and the second embedding vector into the attention layer for processing to obtain the context features;
[0080] Where: the output of the gated attention unit is the first feature X, and the output of the second embedding vector after adjustment by the linear mapping layer is the vector qs, where: X∈R n×d ,qs∈R d Then the context features are:
[0081]
[0082] Where: X T Let X represent the transpose of the first feature X, Ф be the softmax normalization function, and R be the value of X. n×d R is the n×d dimension weight coefficient matrix of the sequence model. d The sequence of weight coefficients in the d-dimensional sequence model.
[0083] S5. The context features and the second embedding vector are concatenated into the concatenation layer to obtain the concatenated features;
[0084] For example, the splicing layer can splice the context features and the second embedding vector according to the weights, or it can directly add the two together to obtain the spliced features.
[0085] S6. Input the splicing features into the target type label classifier to identify the target label of the target device.
[0086] In this embodiment, different types of label classifiers can be pre-trained, such as: a label classifier for identifying age, a label classifier for identifying data security, a label classifier for identifying purchase intention, a label classifier for identifying income, and so on. Then, this step can determine the target type of label classifier based on the label category, and input the spliced features into the target type of label classifier to identify the target label of the target device.
[0087] Furthermore, after obtaining the target tag of the target device, the device can be classified according to the target tag, personalized information can be pushed to the device according to the target tag, and the data security of the device can be identified according to the target tag, etc.
[0088] In addition, multi-dimensional target device profiles can be built based on different types of tags for the target device, and information can be pushed to the target device based on the target device profile, and the data security of the target device can be identified based on the target device profile, etc.
[0089] Among them, the label classifier can be a multilayer perceptron (MLP).
[0090] Figure 4 This invention relates to a device tag identification device based on sequence features, such as... Figure 4 As shown, the device includes:
[0091] Module 41 is used to acquire the application sequence and device characteristics of the target device, respectively.
[0092] The first processing module 42 is used to input the application sequence into the sequence model, filter the key features in the application sequence according to the time series of application review, and obtain the first feature;
[0093] The second processing module 43 is used to input the device features into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature.
[0094] Attention processing module 44 is used to input the first feature and the second embedding vector into the attention layer for processing to obtain context features;
[0095] The splicing module 45 is used to splice the context features and the second embedding vector into the splicing layer to obtain spliced features;
[0096] The identification module 46 is used to input the spliced features into the target type label classifier to identify the target label of the target device.
[0097] In one embodiment, the sequence model includes: a first embedding layer, a position encoder, and a gated attention unit; the application sequence includes: an application review sequence and a corresponding application review time sequence; the first processing module 42 includes:
[0098] The vector processing module is used to input the application review sequence into the first embedding layer for processing to obtain a first embedding vector, and input the first embedding vector into the position encoder to obtain the position code corresponding to the first embedding vector; the position encoder is constructed based on the application review time sequence.
[0099] The gate attention processing module is used to input the first embedding vector and the corresponding position code into the gate attention unit for processing to obtain the first feature.
[0100] Furthermore, the position encoder is a rotary position encoder, and the vector processing module includes:
[0101] The extraction module is used to extract the query vector Q and the key vector K from the first embedding vector, respectively;
[0102] The rotational position encoding module is used to input the i-th query vector and the i-th key vector into the rotational position encoder respectively to obtain the relative position encoding of the i-th query vector and the relative position encoding of the i-th key vector.
[0103] The gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding positional encoding to obtain the first feature.
[0104] Furthermore, the device also includes:
[0105] The first adjustment module is used to input the first embedding vector into the linear mapping layer to adjust the dimension, so as to obtain the first embedding vector of the specified dimension.
[0106] Correspondingly, the second processing module includes:
[0107] An embedding processing module is used to input the device features into a second embedding layer for processing to obtain a second embedding vector;
[0108] The second adjustment module is used to input the second embedding vector into the linear mapping layer to adjust the dimension, so as to obtain a second embedding vector of a specified dimension.
[0109] The attention layer obtains contextual features using the following formula:
[0110]
[0111] Where: X TLet X denote the transpose of the first characteristic X, and Φ be the normalization function, X∈R. n×d ,qs∈R d X is the first feature, qs is the second embedding vector of a specified dimension, and R n×d R is the n×d dimension weight coefficient matrix of the sequence model. d The sequence of weight coefficients in the d-dimensional sequence model.
[0112] Those skilled in the art will understand that the modules in the above-described device embodiments can be distributed throughout the device as described, or they can be modified accordingly and distributed in one or more devices different from the above embodiments. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0113] Figure 5 This is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0114] like Figure 5 As shown, the electronic device 400 of this exemplary embodiment is manifested in the form of a general data processing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different electronic device components (including storage unit 520 and processing unit 510), a display unit 540, etc.
[0115] The storage unit 520 stores a computer-readable program, which may be source code or read-only code. The program can be executed by the processing unit 510, causing the processing unit 510 to perform the steps of various embodiments of the present invention. For example, the processing unit 510 can perform actions such as... Figure 1 The steps are shown.
[0116] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) unit 5201 and / or a cache memory unit 5202, and may further include a read-only memory unit (ROM) unit 5203. The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: operating electronic devices, one or more application programs, other program modules, and program data; each or some combination of these examples may include an implementation of a network environment.
[0117] Electronic device 500 can also communicate with one or more external devices 100, enabling users to interact with it via these external devices 100. This communication can be performed via input / output (I / O) interface 550, or via network adapter 560 to one or more networks. Network adapter 560 can communicate with other modules of electronic device 500 via bus 530. Figure 6 This is a schematic diagram of a computer-readable medium embodiment of the present invention. Figure 6 As shown, the computer program can be stored on one or more computer-readable media. When the computer program is executed by one or more data processing devices, the computer-readable media enables the implementation of the above-described method of the present invention, namely: acquiring the application sequence and device features of the target device respectively; inputting the application sequence into a sequence model, filtering key features in the application sequence according to the time series of application review, and obtaining a first feature; inputting the device features into a second embedding layer for processing, and obtaining a second embedding vector with the same dimension as the first feature; inputting the first feature and the second embedding vector into an attention layer for processing, and obtaining a context feature; inputting the context feature and the second embedding vector into a concatenation layer for concatenation, and obtaining a concatenated feature; inputting the concatenated feature into a target type label classifier to identify the target label of the target device.
[0118] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the present invention is not inherently related to any specific computer, virtual device, or electronic device, and various general-purpose devices can also implement the present invention. The above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A device tag identification method based on sequence features, characterized in that, The method includes: The application sequence and device characteristics of the target device are obtained respectively; the application sequence includes: the application review sequence and the corresponding application review time sequence; The application review sequence is input into the first embedding layer for processing to obtain the first embedding vector. Query vector Q and key vector K are extracted from the first embedding vector. The i-th query vector and the i-th key vector are input into a rotary position encoder to obtain the relative position code of the i-th query vector and the relative position code of the i-th key vector. The first embedding vector and the corresponding position code are input into a gating attention unit for processing to obtain a first feature capable of characterizing the temporal changes in the target device's application behavior. Wherein: the relative position code of q obtained by inputting the i-th query vector into the rotary position encoder is: Where: m is the time difference corresponding to q in the application review time series, θ i =10000 -2i / d d is the dimension of the query vector Q and the key vector K, and the dimensions of Q and K are both n*d, where n is the sequence length and d is the dimension of the query vector and the key vector; the rotary position encoder is constructed based on the application review time series; The device features are input into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature, which can characterize the static attribute information of the target device. The first feature and the second embedding vector are input into the attention layer for processing to obtain context features that integrate the temporal change information of the target device's application behavior and static attribute information. The context features and the second embedding vector are concatenated into the concatenation layer to obtain the concatenated features; The spliced features are input into a label classifier of the target type to identify the target label of the target device.
2. The method according to claim 1, characterized in that, The gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding positional encoding to obtain the first feature.
3. The method according to claim 1, characterized in that, After inputting the application review sequence into the first embedding layer for processing to obtain the first embedding vector, the method further includes: The first embedding vector is input into a linear mapping layer to adjust its dimensions, resulting in a first embedding vector of a specified dimension. Correspondingly, the device features are input into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature, including: The device features are input into the second embedding layer for processing to obtain the second embedding vector; The second embedding vector is input into the linear mapping layer to adjust the dimensions, resulting in a second embedding vector of the specified dimensions.
4. A device tag identification device based on sequence features, characterized in that, The device includes: The acquisition module is used to acquire the application sequence and device characteristics of the target device, respectively; the application sequence includes: an application review sequence and a corresponding application review time sequence; The first processing module is used to input the application review sequence into the first embedding layer for processing to obtain a first embedding vector, and to extract a query vector Q and a key vector K from the first embedding vector. The i-th query vector and the i-th key vector are then input into a rotary position encoder to obtain the relative position encoding of the i-th query vector and the relative position encoding of the i-th key vector. The first embedding vector and the corresponding position encoding are then input into a gating attention unit for processing to obtain a first feature capable of characterizing the temporal changes in the application behavior of the target device. Wherein: the i-th query vector q = (q0, q1…q ... d-1 ) T The relative position code of q obtained by inputting the rotary position encoder is: Where: m is the time difference corresponding to q in the application review time series, θ i =10000 -2i / d d is the dimension of the query vector Q and the key vector K, and the dimensions of Q and K are both n*d, where n is the sequence length and d is the dimension of the query vector and the key vector; the rotary position encoder is constructed based on the application review time series; The second processing module is used to input the device features into the second embedding layer for processing to obtain a second embedding vector with the same dimension as the first feature, which can characterize the static attribute information of the target device. The attention processing module is used to input the first feature and the second embedding vector into the attention layer for processing to obtain context features that integrate the temporal change information of the target device's application behavior and static attribute information. The concatenation module is used to concatenate the context features and the second embedding vector into the concatenation layer to obtain concatenated features; The identification module is used to input the spliced features into a target type label classifier to identify the target label of the target device.
5. The apparatus according to claim 4, characterized in that, The gated attention unit integrates the attention mechanism and the gated linear unit into a unified network layer to process the first embedding vector and the corresponding positional encoding to obtain the first feature.
6. The apparatus according to claim 4, characterized in that, The device further includes: The first adjustment module is used to input the first embedding vector into the linear mapping layer to adjust the dimension, so as to obtain the first embedding vector of the specified dimension. Correspondingly, the second processing module includes: An embedding processing module is used to input the device features into a second embedding layer for processing to obtain a second embedding vector; The second adjustment module is used to input the second embedding vector into the linear mapping layer to adjust the dimension, so as to obtain a second embedding vector of a specified dimension.
7. An electronic device, comprising: processor; as well as A memory storing computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 3.
8. A computer-readable storage medium, wherein, The computer-readable storage medium stores one or more programs that, when executed by a processor, implement the method of any one of claims 1 to 3.
Citation Information
Patent Citations
Data processing method and device
CN113762992A