Methods and apparatus for fusing tabular and sequence data
By concatenating tabular and sequence data and performing self-attention processing, the problem of poor data fusion processing in existing technologies is solved, and effective retrieval or classification of target objects is achieved.
Patent Information
- Application Number
- CN202310500448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-05-04
AI Technical Summary
In existing technologies, the fusion processing schemes for tabular data and sequence data cannot effectively achieve the retrieval or classification of target objects.
The table embedding vector is obtained by inputting tabular data into the table encoder, and the initial embedding matrix is obtained by inputting sequence data into the sequence encoder. After target concatenation processing, the matrix is input into the self-attention layer to obtain the fused embedding matrix. The data is fused using the self-attention mechanism, and finally classified or retrieved through a multilayer perceptron.
It enables effective retrieval or classification of target objects, improving the effectiveness of data fusion processing.
Smart Images

Figure CN116578579B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computers, and more particularly to methods and apparatus for fusion processing of tabular data and sequence data. Background Technology
[0002] Currently, neural network models are often used to retrieve or classify target objects based on their feature data. This feature data is typically tabular. However, with the increasing maturity of algorithms and engineering solutions for neural networks based on sequence data, adding sequence data to the tabular data for joint modeling has become a preferred approach. It's important to note that the target object's feature data may be sensitive information and needs to be protected from disclosure.
[0003] In existing technologies, the schemes for fusing tabular and sequence data cannot achieve good results in retrieving or classifying target objects. Summary of the Invention
[0004] This specification describes one or more embodiments of a method and apparatus for fusing tabular and sequence data, which enables effective retrieval or classification of target objects.
[0005] Firstly, a method for fusing tabular and sequence data is provided, the method including:
[0006] Input the tabular data of the target object into the table encoder to obtain the table embedding vector;
[0007] The sequence data of the target object is input into the sequence encoder to obtain an initial embedding matrix. The sequence data includes event data of t events related to the target object and arranged in chronological order. The initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order.
[0008] The table embedding vector and the initial embedding matrix are concatenated to obtain a concatenated embedding matrix; the concatenated embedding matrix is composed of the concatenated event embedding vectors corresponding to m events arranged in the time sequence.
[0009] The concatenated embedding matrix is input into the self-attention layer to obtain the fusion embedding matrix; the fusion embedding matrix is composed of fusion event embedding vectors corresponding to m events arranged in the time sequence; the fusion event embedding vectors are obtained based on the self-attention mechanism; the fusion embedding matrix is used to retrieve or classify the target object.
[0010] In one possible implementation, the tabular data includes attribute feature data of the target object itself and / or statistical feature data reflected by the historical behavior data of the target object.
[0011] In one possible implementation, m equals t; the concatenated event embedding vector is obtained by concatenating the table embedding vector and the initial event embedding vector.
[0012] In one possible implementation, m equals t+1; the m events include the t events and the newly added event; the concatenated event embedding vector corresponding to any of the t events is the same as the initial event embedding vector of that event; the concatenated event embedding vector corresponding to the newly added event is the table embedding vector.
[0013] Furthermore, the method also includes:
[0014] The table embedding vector and the fusion embedding matrix are subjected to a secondary fusion process to obtain a secondary fusion matrix; the secondary fusion matrix is composed of the secondary fusion embedding vectors corresponding to n events arranged in the time sequence.
[0015] The secondary fusion matrix is input into a multilayer perceptron, and its output is the result of retrieval or classification of the target object.
[0016] Furthermore, the secondary fusion process includes:
[0017] The table embedding vector and the fused embedding matrix are then subjected to the target concatenation process.
[0018] In one possible implementation, the table encoder, the sequence encoder, and the self-attention layer together constitute a neural network model; the neural network model is obtained through multiple rounds of iterative training. In each round of iteration, the table encoder is tuned based on a first learning rate, and the sequence encoder is tuned based on a second learning rate, so that the difference between the rounds in which the table encoder converges and the rounds in which the sequence encoder converges is within a preset range.
[0019] Furthermore, the first learning rate is greater than the second learning rate.
[0020] In one possible implementation, the fused event embedding vector is obtained based on a self-attention mechanism, including:
[0021] For the first event among m events, determine its attention score relative to the other events.
[0022] Based on each attention score, the concatenated event embedding vectors corresponding to the m events are weighted and summed to obtain the fused event embedding vector corresponding to the first event.
[0023] Secondly, an apparatus for fusing tabular data and sequence data is provided, comprising:
[0024] The table embedding unit is used to input the table data of the target object into the table encoder to obtain the table embedding vector;
[0025] A sequence embedding unit is used to input the sequence data of the target object into a sequence encoder to obtain an initial embedding matrix. The sequence data includes event data of t events related to the target object and arranged in chronological order. The initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order.
[0026] The splicing unit is used to perform target splicing processing on the table embedding vector obtained by the table embedding unit and the initial embedding matrix obtained by the sequence embedding unit to obtain a spliced embedding matrix; the spliced embedding matrix is formed by arranging the spliced event embedding vectors corresponding to m events according to the time sequence;
[0027] The self-attention unit is used to input the splicing embedding matrix obtained by the splicing unit into the self-attention layer to obtain the fusion embedding matrix; the fusion embedding matrix is composed of fusion event embedding vectors corresponding to m events arranged in the time sequence; the fusion event embedding vectors are obtained based on the self-attention mechanism; the fusion embedding matrix is used to retrieve or classify the target object.
[0028] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first aspect.
[0029] Fourthly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of the first aspect.
[0030] The method and apparatus provided in the embodiments of this specification first input tabular data of the target object into a tabular encoder to obtain a tabular embedding vector; then, the sequence data of the target object is input into a sequence encoder to obtain an initial embedding matrix, wherein the sequence data includes event data of t events related to the target object and arranged in chronological order, and the initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in the chronological order; next, the tabular embedding vector and the initial embedding matrix are subjected to target concatenation processing to obtain a concatenated embedding matrix; the concatenated embedding matrix is formed by arranging the concatenated event embedding vectors corresponding to m events in the chronological order; finally, the concatenated embedding matrix is input into a self-attention layer to obtain a fused embedding matrix; the fused embedding matrix is formed by arranging the fused event embedding vectors corresponding to m events in the chronological order; the fused event embedding vectors are obtained based on a self-attention mechanism; the fused embedding matrix is used for retrieving or classifying the target object. As can be seen from the above, in this embodiment, the table embedding vectors corresponding to the table data and the initial embedding matrices corresponding to the sequence data are first subjected to target concatenation processing to obtain a concatenated embedding matrix. Then, the concatenated embedding matrix is input into a self-attention layer to obtain a fused embedding matrix, which is used for retrieving or classifying the target object. This scheme utilizes the self-attention layer of a neural network model to fuse table data and sequence data, enabling good results in retrieving or classifying the target object. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;
[0033] Figure 2 A flowchart illustrating a method for fusing tabular data and sequence data according to one embodiment is shown.
[0034] Figure 3 This diagram illustrates in-event fusion according to one embodiment;
[0035] Figure 4 A schematic diagram of intra-sequence fusion according to one embodiment is shown;
[0036] Figure 5 This diagram illustrates a secondary fusion process according to one embodiment.
[0037] Figure 6 A schematic block diagram of an apparatus for fusing tabular data and sequence data according to one embodiment is shown. Detailed Implementation
[0038] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0039] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification. This implementation scenario involves the fusion processing of tabular data and sequence data. In this embodiment, the tabular data can be several feature data of a target object summarized from expert experience; these feature data typically do not have a temporal relationship. (Refer to...) Figure 1 The tabular data may include, but is not limited to, the attribute characteristics of the target object itself and / or the statistical characteristics reflected by the target object's historical behavior data. For example, the target object represents user A, and user A's occupation, city, number of articles liked, and number of followers constitute the tabular data. Among them, occupation and city can be regarded as the aforementioned attribute characteristics, and the number of articles liked and the number of followers can be regarded as the aforementioned statistical characteristics.
[0040] In this embodiment of the specification, the sequence data includes event data of t events related to the target object and arranged in chronological order. (Refer to...) Figure 1 In sequence data, each row has a time index, and each time index corresponds to an event. Each event has attribute values corresponding to several attributes, which constitute the event data. Different events can have the same or different attribute values for the same attribute. For example, time index 1 corresponds to event 1, and the attribute value for event 1 corresponding to attribute A is A1; time index 2 corresponds to event 2, and the attribute value for event 2 corresponding to attribute A is A2. If both event 1 and event 2 represent click events, and attribute A represents the clicked page, then the clicked pages in the two click events can be the same or different. It can be understood that the time index identifies the chronological order of events, thus establishing a temporal relationship between events, and correspondingly, a temporal relationship between the event data.
[0041] Tabular data and sequence data can be considered as two different modalities. This specification provides embodiments that propose solutions for the fusion processing of tabular and sequence data, aiming to achieve better results in retrieving or classifying target objects.
[0042] Figure 2 This diagram illustrates a method for fusing tabular and sequence data according to one embodiment. The method can be based on... Figure 1 The implementation scenario is shown. For example... Figure 2As shown, the method for fusing tabular and sequence data in this embodiment includes the following steps: Step 21, inputting the tabular data of the target object into a tabular encoder to obtain a tabular embedding vector; Step 22, inputting the sequence data of the target object into a sequence encoder to obtain an initial embedding matrix, wherein the sequence data includes event data of t events related to the target object and arranged in chronological order, and the initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order; Step 23, performing target concatenation processing on the tabular embedding vector and the initial embedding matrix to obtain a concatenated embedding matrix; the concatenated embedding matrix is formed by arranging the concatenated event embedding vectors corresponding to m events in chronological order; Step 24, inputting the concatenated embedding matrix into a self-attention layer to obtain a fused embedding matrix; the fused embedding matrix is formed by arranging the fused event embedding vectors corresponding to m events in chronological order; the fused event embedding vector is obtained based on a self-attention mechanism; the fused embedding matrix is used for retrieval or classification of the target object. The specific execution method of each of the above steps is described below.
[0043] First, in step 21, the tabular data of the target object is input into the table encoder to obtain the table embedding vector. It is understood that the table embedding vector can have a preset dimension, such as k dimensions.
[0044] In one example, the tabular data includes attribute data of the target object itself and / or statistical characteristic data reflected by the target object's historical behavior data.
[0045] It is understood that tabular data consists of several feature data items that are not sequentially related to each other. The embodiments in this specification do not limit the meaning of the feature data contained in the tabular data.
[0046] Then, in step 22, the sequence data of the target object is input into a sequence encoder to obtain an initial embedding matrix. The sequence data includes event data of t events related to the target object and arranged in chronological order. The initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order. It can be understood that each event has attribute values corresponding to several attributes, and these attribute values constitute the event data. The initial event embedding vectors can have a preset dimension, such as q dimensions.
[0047] In the embodiments of this specification, the initial event embedding vector can be set to have the same dimension as the table embedding vector, in which case q = k; or the initial event embedding vector can be set to have a different dimension than the table embedding vector, in which case q ≠ k.
[0048] For example, the initial event embedding vectors corresponding to t events are used as column vectors and arranged from left to right according to the time sequence to obtain the initial embedding matrix.
[0049] Next, in step 23, the table embedding vector and the initial embedding matrix are subjected to target concatenation processing to obtain a concatenated embedding matrix; the concatenated embedding matrix is composed of the concatenated event embedding vectors corresponding to m events arranged in the time sequence. It can be understood that the above target concatenation processing method can affect the value of m.
[0050] In one example, m equals t; the concatenated event embedding vector is obtained by concatenating the table embedding vector and the initial event embedding vector.
[0051] The target splicing processing method corresponding to this example can be called in-event fusion. Figure 3 A schematic diagram of in-event fusion according to one embodiment is shown. (Refer to...) Figure 3 The table embedding vector is a q-dimensional column vector, or a q-row, 1-column vector. The initial embedding matrix is a k-row, t-column matrix, and the initial event embedding vector is a k-dimensional column vector. Intra-event fusion concatenates the initial event embedding vector for each event with the table embedding vector to obtain a concatenated event embedding vector, which is a (q+k)-dimensional column vector. The number of events remains unchanged. The dimension q of the table embedding vector can be equal to or different from k.
[0052] In another example, m equals t+1; the m events include the t events and the newly added event; the concatenated event embedding vector corresponding to any of the t events is the same as the initial event embedding vector of that event; the concatenated event embedding vector corresponding to the newly added event is the table embedding vector.
[0053] The target splicing process corresponding to this example can be called intra-sequence fusion. Figure 4 A schematic diagram of intra-sequence fusion according to one embodiment is shown. (Refer to...) Figure 4 The table embedding vector is a k-dimensional column vector, or a k-row, 1-column vector. That is, q = k, the initial embedding matrix is a k-row, t-column matrix, and the initial event embedding vector is a k-dimensional column vector. Intra-sequence fusion uses the table embedding vector as the concatenated event embedding vector corresponding to the newly added event, adding this concatenated event embedding vector as a new column to the initial embedding matrix to obtain the concatenated embedding matrix.
[0054] Finally, in step 24, the concatenated embedding matrix is input into the self-attention layer to obtain the fused embedding matrix. The fused embedding matrix is composed of fused event embedding vectors corresponding to m events arranged in the temporal order. The fused event embedding vectors are obtained based on a self-attention mechanism. The fused embedding matrix is used for retrieval or classification of the target object. It can be understood that the concatenated embedding matrix contains information from both tabular and sequential data. Inputting the concatenated embedding matrix into the self-attention layer allows for the fusion processing of tabular and sequential data.
[0055] In one example, based on the aforementioned intra-sequence fusion, the method may further include:
[0056] The table embedding vector and the fusion embedding matrix are subjected to a secondary fusion process to obtain a secondary fusion matrix; the secondary fusion matrix is composed of the secondary fusion embedding vectors corresponding to n events arranged in the time sequence.
[0057] The secondary fusion matrix is input into a multilayer perceptron, and its output is the result of retrieval or classification of the target object.
[0058] In this example, after obtaining the fusion embedding matrix, the table embedding vector and the fusion embedding matrix are fused again to obtain a secondary fusion matrix, which can achieve better fusion of table data and sequence data, thereby further improving the accuracy of the retrieval or classification results of the target object.
[0059] Figure 5 A schematic diagram of a secondary fusion process according to one embodiment is shown. (Refer to...) Figure 5 First, the concatenated embedding matrix is input into the attention layer to obtain the fused embedding matrix. The attention layer performs the initial fusion processing of tabular and sequential data. Then, the tabular embedding vector and the fused embedding matrix undergo a second fusion processing to obtain a second fusion matrix. This second fusion processing further fuses the tabular and sequential data. Through multiple fusion processes performed at different network layers of the neural network model, a thorough fusion of tabular and sequential data can be achieved.
[0060] Furthermore, the secondary fusion process includes:
[0061] The table embedding vector and the fused embedding matrix are then subjected to the target concatenation process.
[0062] It is understood that the target splicing process may include, but is not limited to, the aforementioned intra-event fusion or intra-sequence fusion.
[0063] In one example, the table encoder, the sequence encoder, and the self-attention layer together constitute a neural network model; the neural network model is obtained through multiple rounds of iterative training. In each round of iteration, the table encoder is tuned based on a first learning rate, and the sequence encoder is tuned based on a second learning rate, so that the difference between the rounds in which the table encoder converges and the rounds in which the sequence encoder converges is within a preset range.
[0064] In this example, during multiple rounds of iterative training of the neural network model, the table encoder and sequence encoder can be tuned based on different learning rates to avoid the sequence encoder overfitting while the table encoder underfits. By adjusting the learning rate, both the table encoder and sequence encoder can converge simultaneously.
[0065] Furthermore, the first learning rate is greater than the second learning rate.
[0066] Research has shown that, at the same learning rate, the convergence speed of a sequence encoder can be dozens of times faster than that of a table encoder. Therefore, by setting the first learning rate to be greater than the second learning rate, both the table encoder and the sequence encoder can converge simultaneously.
[0067] In one example, the fused event embedding vector is obtained based on a self-attention mechanism and includes:
[0068] For the first event among m events, determine its attention score relative to the other events.
[0069] Based on each attention score, the concatenated event embedding vectors corresponding to the m events are weighted and summed to obtain the fused event embedding vector corresponding to the first event.
[0070] In this example, the self-attention mechanism is used to process the splicing event embedding vector, which enables the fusion processing of tabular data and sequence data.
[0071] The method provided in the embodiments of this specification first inputs tabular data of the target object into a tabular encoder to obtain a tabular embedding vector; then, it inputs sequence data of the target object into a sequence encoder to obtain an initial embedding matrix, wherein the sequence data includes event data of t events related to the target object and arranged in chronological order, and the initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order; next, it performs target concatenation processing on the tabular embedding vector and the initial embedding matrix to obtain a concatenated embedding matrix; the concatenated embedding matrix is formed by arranging the concatenated event embedding vectors corresponding to m events in chronological order; finally, it inputs the concatenated embedding matrix into a self-attention layer to obtain a fused embedding matrix; the fused embedding matrix is formed by arranging the fused event embedding vectors corresponding to m events in chronological order; the fused event embedding vectors are obtained based on a self-attention mechanism; the fused embedding matrix is used to retrieve or classify the target object. As can be seen from the above, in this embodiment, the table embedding vectors corresponding to the table data and the initial embedding matrices corresponding to the sequence data are first subjected to target concatenation processing to obtain a concatenated embedding matrix. Then, the concatenated embedding matrix is input into a self-attention layer to obtain a fused embedding matrix, which is used for retrieving or classifying the target object. This scheme utilizes the self-attention layer of a neural network model to fuse table data and sequence data, enabling good results in retrieving or classifying the target object.
[0072] According to another embodiment, an apparatus for fusing tabular data and sequence data is also provided, the apparatus being used to perform the operations provided in the embodiments of this specification. Figure 2 The method shown. Figure 6 A schematic block diagram of an apparatus for fusing tabular data and sequence data according to one embodiment is shown. Figure 6 As shown, the device 600 includes:
[0073] The table embedding unit 61 is used to input the table data of the target object into the table encoder to obtain the table embedding vector;
[0074] The sequence embedding unit 62 is used to input the sequence data of the target object into the sequence encoder to obtain an initial embedding matrix. The sequence data includes event data of t events related to the target object and arranged in chronological order. The initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order.
[0075] The splicing unit 63 is used to perform target splicing processing on the table embedding vector obtained by the table embedding unit 61 and the initial embedding matrix obtained by the sequence embedding unit 62 to obtain a splicing embedding matrix; the splicing embedding matrix is formed by arranging the splicing event embedding vectors corresponding to m events according to the time sequence.
[0076] Self-attention unit 64 is used to input the splicing embedding matrix obtained by splicing unit 63 into self-attention layer to obtain fusion embedding matrix; the fusion embedding matrix is composed of fusion event embedding vectors corresponding to m events arranged in the time sequence; the fusion event embedding vectors are obtained based on self-attention mechanism; the fusion embedding matrix is used to retrieve or classify the target object.
[0077] Optionally, as an embodiment, the table data includes attribute feature data of the target object itself and / or statistical feature data reflected by the historical behavior data of the target object.
[0078] Optionally, as an example, m equals t; the concatenated event embedding vector is obtained by concatenating the table embedding vector and the initial event embedding vector.
[0079] Optionally, as an embodiment, m equals t+1; the m events include the t events and the newly added event; the concatenated event embedding vector corresponding to any of the t events is the same as the initial event embedding vector of that event; the concatenated event embedding vector corresponding to the newly added event is the table embedding vector.
[0080] Furthermore, the device also includes:
[0081] The secondary fusion unit is used to perform secondary fusion processing on the table embedding vector and the fusion embedding matrix to obtain a secondary fusion matrix; the secondary fusion matrix is formed by arranging the secondary fusion embedding vectors corresponding to n events according to the time sequence.
[0082] The input unit is used to input the secondary fusion matrix obtained by the secondary fusion unit into the multilayer perceptron, and its output is the result of retrieval or classification of the target object.
[0083] Furthermore, the secondary fusion unit is specifically used to perform the target splicing process on the table embedding vector and the fusion embedding matrix.
[0084] Optionally, as an embodiment, the table encoder, the sequence encoder, and the self-attention layer together constitute a neural network model; the neural network model is obtained through multiple rounds of iterative training. In each round of iteration, the table encoder is tuned based on a first learning rate, and the sequence encoder is tuned based on a second learning rate, so that the difference between the round in which the table encoder converges and the round in which the sequence encoder converges is within a preset range.
[0085] Furthermore, the first learning rate is greater than the second learning rate.
[0086] Optionally, as an embodiment, the self-attention unit 64 includes:
[0087] Determine a sub-unit, which is used to determine the attention score of the first event among m events, relative to the other events;
[0088] The summation subunit is used to perform a weighted summation of the spliced event embedding vectors corresponding to the m events based on the attention scores obtained from the determination subunit, so as to obtain the fused event embedding vector corresponding to the first event.
[0089] Using the apparatus provided in the embodiments of this specification, firstly, the table embedding unit 61 inputs the table data of the target object into the table encoder to obtain a table embedding vector; then, the sequence embedding unit 62 inputs the sequence data of the target object into the sequence encoder to obtain an initial embedding matrix, wherein the sequence data includes event data of t events related to the target object and arranged in chronological order, and the initial embedding matrix is formed by arranging the initial event embedding vectors corresponding to the t events in chronological order; next, the splicing unit 63 performs target splicing processing on the table embedding vector and the initial embedding matrix to obtain a spliced embedding matrix; the spliced embedding matrix is formed by arranging the spliced event embedding vectors corresponding to m events in chronological order; finally, the self-attention unit 64 inputs the spliced embedding matrix into the self-attention layer to obtain a fused embedding matrix; the fused embedding matrix is formed by arranging the fused event embedding vectors corresponding to m events in chronological order; the fused event embedding vectors are obtained based on a self-attention mechanism; the fused embedding matrix is used to retrieve or classify the target object. As can be seen from the above, in this embodiment, the table embedding vectors corresponding to the table data and the initial embedding matrices corresponding to the sequence data are first subjected to target concatenation processing to obtain a concatenated embedding matrix. Then, the concatenated embedding matrix is input into a self-attention layer to obtain a fused embedding matrix, which is used for retrieving or classifying the target object. This scheme utilizes the self-attention layer of a neural network model to fuse table data and sequence data, enabling good results in retrieving or classifying the target object.
[0090] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 The method described.
[0091] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 The method described.
[0092] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0093] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for fusion processing of table data and sequence data, the method comprising: inputting table data of a target object into a table encoder to obtain a table embedding vector; inputting sequence data of the target object into a sequence encoder to obtain an initial embedding matrix, the sequence data comprising event data of t events related to the target object and arranged in a time sequence, the initial embedding matrix being formed by initial event embedding vectors corresponding to the t events and arranged in the time sequence; performing target splicing processing on the table embedding vector and the initial embedding matrix to obtain a spliced embedding matrix; the spliced embedding matrix being formed by spliced event embedding vectors corresponding to m events and arranged in the time sequence; inputting the spliced embedding matrix into a self-attention layer to obtain a fusion embedding matrix; the fusion embedding matrix being formed by fusion event embedding vectors corresponding to the m events and arranged in the time sequence, the fusion event embedding vectors being obtained based on a self-attention mechanism; the fusion embedding matrix being used for retrieval or classification of the target object.
2. The method of claim 1, wherein, the table data comprising attribute feature data of the target object itself and / or statistical feature data reflected by historical behavior data of the target object.
3. The method of claim 1, wherein, m is equal to t; the spliced event embedding vectors are obtained by splicing the table embedding vector and the initial event embedding vectors.
4. The method of claim 1, wherein, m is equal to t+1; the m events comprise the t events and a new event; the spliced event embedding vector corresponding to any event of the t events is the same as the initial event embedding vector of the event; the spliced event embedding vector corresponding to the new event is the table embedding vector.
5. The method of claim 4, wherein, the method further comprising: performing secondary fusion processing on the table embedding vector and the fusion embedding matrix to obtain a secondary fusion matrix; the secondary fusion matrix being formed by secondary fusion embedding vectors corresponding to n events and arranged in the time sequence; inputting the secondary fusion matrix into a multilayer perceptron, an output of the multilayer perceptron being a result of retrieval or classification of the target object.
6. The method of claim 5, wherein, the secondary fusion processing comprising: performing the target splicing processing on the table embedding vector and the fusion embedding matrix.
7. The method of claim 1, wherein, the table encoder, the sequence encoder and the self-attention layer jointly constitute a neural network model; the neural network model is obtained through multiple rounds of iterative training, in each round of iteration, the table encoder is parameterized based on a first learning rate, the sequence encoder is parameterized based on a second learning rate, so that a difference between a round of iteration in which the table encoder converges and a round of iteration in which the sequence encoder converges is within a preset range.
8. The method of claim 7, wherein, the first learning rate is greater than the second learning rate.
9. The method of claim 1, wherein, the fusion event embedding vectors are obtained based on the self-attention mechanism, comprising: determining attention scores respectively corresponding to a first event of the m events and other events; performing weighted summation on the spliced event embedding vectors corresponding to the m events based on the attention scores to obtain a fusion event embedding vector corresponding to the first event.
10. An apparatus for fusion processing of table data and sequence data, the apparatus comprising: a table embedding unit, configured to input table data of a target object into a table encoder to obtain a table embedding vector; a sequence embedding unit, configured to input sequence data of the target object into a sequence encoder to obtain an initial embedding matrix, the sequence data comprising event data of t events related to the target object and arranged in a time sequence, and the initial embedding matrix being arranged in the time sequence by initial event embedding vectors corresponding to the t events respectively; a concatenation unit, configured to perform target concatenation processing on the table embedding vector obtained by the table embedding unit and the initial embedding matrix obtained by the sequence embedding unit to obtain a concatenated embedding matrix; the concatenated embedding matrix being arranged in the time sequence by concatenated event embedding vectors corresponding to m events respectively; a self-attention unit, configured to input the concatenated embedding matrix obtained by the concatenation unit into a self-attention layer to obtain a fusion embedding matrix; the fusion embedding matrix being arranged in the time sequence by fusion event embedding vectors corresponding to the m events respectively; and the fusion event embedding vectors being obtained based on a self-attention mechanism; the fusion embedding matrix being used for searching or classifying the target object. 11.A computer readable storage medium having stored thereon a computer program, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-9. 12.A computing device comprising a memory and a processor, the memory having stored therein executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-9.
Citation Information
Patent Citations
Service prediction method based on an event sequence and neural network model and device
CN113255908A
Push data acquisition method and device based on attention model, equipment and medium
CN113868542A