Transaction data processing model training method and device, medium and electronic equipment
By iteratively training the transaction data processing model and combining time series and text information, the time series data encoding network was optimized, which solved the problem of insufficient prediction accuracy of existing models and improved the accuracy and efficiency of transaction data prediction.
Patent Information
- Application Number
- CN202411613257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing machine learning models lack sufficient prediction accuracy when processing time-series transaction data, resulting in poor data prediction and impacting the accuracy of inventory management and marketing strategies.
By acquiring a dataset of historical time periods for items, preprocessing it, and dividing it into a training dataset and a label set, the original transaction data processing model is iteratively trained using the training dataset. The parameters of the time-series data encoding network are updated, and multi-dimensional learning is performed by combining text information to optimize the model's time-series data processing performance.
It improves the prediction accuracy of the transaction data processing model, reduces the input of data, computing power and human resources, lowers operating costs, and enhances the model's performance in processing time series data.
Smart Images

Figure CN119539122B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a training method for a transaction data processing model, a training device for a transaction data processing model, a computer-readable storage medium, and an electronic device. Background Technology
[0002] With the rapid development and advancement of big data and artificial intelligence technologies, the field of data processing is also constantly innovating and progressing. Transaction data prediction, as an important part of this field, is of great significance for enterprises' inventory management, supply chain optimization, and marketing strategy formulation.
[0003] In related technologies, machine learning models can be used to predict transaction data of related items. However, these machine learning models have poor performance when processing time-series data, which affects the prediction accuracy of the output data.
[0004] Therefore, there is an urgent need in this field to develop a new training method and apparatus for transaction data processing models.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure. Summary of the Invention
[0006] The purpose of this disclosure is to provide a training method, a training device, a computer-readable storage medium, and an electronic device for a transaction data processing model, thereby overcoming, to at least a certain extent, the technical problem of insufficient data prediction accuracy caused by limitations in related technologies.
[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0008] According to a first aspect of this disclosure, a method for training a transaction data processing model is provided, comprising:
[0009] A dataset of multiple items within a historical time period is obtained, and the dataset is divided into a training dataset and a training label set according to time segmentation points. The dataset contains item description text for each item corresponding to the historical time period and historical transaction time series data for each item within the historical time period.
[0010] The original transaction data processing model is invoked; the original transaction data processing model consists of multiple networks.
[0011] The original transaction data processing model is iteratively trained using the training dataset and the training label set to update the network parameters of a portion of the multiple networks, thereby obtaining a trained transaction data processing model; wherein, the portion of the specified networks includes a time-series data encoding network.
[0012] In an exemplary embodiment of this disclosure, the item description text includes at least one of the following:
[0013] The basic information of each item, the transaction market information of each item within the historical period, and the characteristic description information corresponding to the historical transaction time series data.
[0014] In an exemplary embodiment of this disclosure, after obtaining an item dataset of multiple items within a historical time period, the method further includes:
[0015] The item datasets of the multiple items within a historical time period are preprocessed to obtain preprocessed item datasets;
[0016] The preprocessing includes at least one of the following: outlier removal, missing value imputation, and data standardization.
[0017] In an exemplary embodiment of this disclosure, dividing the item dataset into a training dataset and a training label set according to time segmentation points includes:
[0018] The historical period is divided into a first period and a second period according to the time segmentation points to obtain a training dataset corresponding to the first period and a training label set corresponding to the second period;
[0019] The first time period starts at the beginning time of the historical time period and ends at the time segmentation point; the training dataset contains the first item description text corresponding to the first time period for each item and the first transaction time sequence data of each item within the first time period;
[0020] The second time period starts at the time segmentation point and ends at the end time of the historical time period; the training label set contains the second item description text corresponding to the second time period for each item and the second transaction time sequence data of each item within the second time period.
[0021] In an exemplary embodiment of this disclosure, the step of iteratively training the original transaction data processing model using the training dataset and the training label set to update the network parameters of a specified portion of multiple networks includes:
[0022] The training sample set is input into the original transaction data processing model, and the original transaction data processing model outputs the predicted transaction time series data for each item corresponding to the second time period.
[0023] Based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period, a first loss value of the original transaction data processing model is determined.
[0024] The network parameters of a portion of the plurality of networks are updated based on the first loss value.
[0025] In an exemplary embodiment of this disclosure, the plurality of networks includes a text information encoding network, a time-series data encoding network, and a decoding network;
[0026] The step of inputting the training sample set into the original transaction data processing model and outputting the predicted transaction time series data for each item corresponding to the second time period through the original transaction data processing model includes:
[0027] The first item description text corresponding to the first time period is encoded by the text information encoding network to obtain the word embedding vector corresponding to each item;
[0028] The time-series data of the first transaction of each item in the first time period is encoded by the time-series data encoding network to obtain the time-series embedding vector corresponding to each item;
[0029] The word embedding vector and the temporal embedding vector corresponding to each item are concatenated to obtain a concatenated vector;
[0030] The concatenation vector corresponding to each item is decoded by the decoding network to obtain the predicted transaction time series data for each item corresponding to the second time period.
[0031] In an exemplary embodiment of this disclosure, the step of encoding the first item description text corresponding to a first time period for each item through the text information encoding network to obtain the word embedding vector corresponding to each item includes:
[0032] The text information encoding network is used to segment the first item description text corresponding to the first time period for each item to obtain multiple target words.
[0033] Match the standard word vector corresponding to each target word from the standard vocabulary to obtain the word embedding vector corresponding to each item.
[0034] In an exemplary embodiment of this disclosure, encoding the first transaction time-series data of each item within the first time period using the time-series data encoding network to obtain the time-series embedding vector corresponding to each item includes:
[0035] The time-series data of the first transaction for each item within the first time period are segmented using a segmentation function to obtain multiple sub-sequences;
[0036] Each sub-sequence is sequence-encoded using an embedding function to obtain each sub-vector;
[0037] Based on the multiple sub-vectors corresponding to the multiple sub-sequences, determine the temporal embedding vector corresponding to each item.
[0038] In an exemplary embodiment of this disclosure, after obtaining the predicted transaction time series data for each item corresponding to the second time period, the method further includes:
[0039] Based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period, a first loss value of the original transaction data processing model is determined.
[0040] The second loss value of the original transaction data processing model is determined based on the similarity between each sub-vector associated with each item and each standard word vector in the standard vocabulary.
[0041] Based on the first loss value and the second loss value, determine the comprehensive loss value of the original transaction data processing model;
[0042] The network parameters of a portion of the multiple networks are updated based on the comprehensive loss value.
[0043] In an exemplary embodiment of this disclosure, the partially designated network further includes a decoding network.
[0044] In an exemplary embodiment of this disclosure, after obtaining the trained transaction data processing model, the method further includes:
[0045] The item datasets of the multiple items within the historical time period are input into the trained transaction data processing model;
[0046] The trained transaction data processing model predicts the future transaction time series data of each item in the future time period based on the item dataset of the multiple items in the historical time period.
[0047] According to a second aspect of this disclosure, a training apparatus for a transaction data processing model is provided, comprising:
[0048] The data acquisition module is used to acquire a dataset of multiple items within a historical time period, and divide the dataset into a training dataset and a training label set according to time division points; the dataset contains item description text for each item corresponding to the historical time period and historical transaction time series data for each item within the historical time period;
[0049] The model invocation module is used to invoke the original transaction data processing model; the original transaction data processing model consists of multiple networks.
[0050] The model training module is used to iteratively train the original transaction data processing model using the training dataset and the training label set, so as to update the network parameters of a portion of the multiple networks and obtain a trained transaction data processing model; wherein, the portion of the specified networks includes a time series data encoding network.
[0051] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the training method for the transaction data processing model described in the first aspect above.
[0052] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a training method for a transaction data processing model as described in the first aspect by executing the executable instructions.
[0053] As can be seen from the above technical solutions, the training method for the transaction data processing model, the training device for the transaction data processing model, the computer-readable storage medium, and the electronic device in the exemplary embodiments of this disclosure have at least the following advantages and positive effects:
[0054] In some embodiments of this disclosure, the technical solutions involve acquiring a dataset of multiple items within a historical time period, and dividing the dataset into a training dataset and a training label set according to time segmentation points. The item dataset contains item-related text information corresponding to each historical time period, item description text, and historical transaction time-series data for each item within that period. An original transaction data processing model is invoked; this model consists of multiple networks. The original transaction data processing model is iteratively trained using the training dataset and training label set to update the network parameters of a specified portion of the multiple networks (including the time-series data encoding network), thereby obtaining a well-trained model. The transaction data processing model, on the one hand, enables the model to learn the characteristics of items from multiple dimensions by combining time-series transaction data with unstructured text information, thus capturing the characteristics of items more comprehensively and improving data utilization efficiency, which helps to improve the model's prediction accuracy. Furthermore, it can maximize the use of the parameter configuration of existing large models, avoiding the need to train a time series inference model with a matching parameter scale from scratch, thereby reducing the investment of data, computing power and human resources, and lowering operating costs. On the other hand, it can focus on iterative training of the time-series data encoding network, thereby enhancing the performance of the large model in processing time-series data, and further ensuring the model's prediction accuracy.
[0055] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0057] Figure 1 A flowchart illustrating the training method of the transaction data processing model in an embodiment of this disclosure is shown.
[0058] Figure 2 This illustration shows a flowchart of how to update network parameters of a specified network in an embodiment of the present disclosure;
[0059] Figure 3 This illustration shows a flowchart of how the original transaction data processing model outputs the predicted transaction time series data for each item corresponding to the second time period in an embodiment of this disclosure.
[0060] Figure 4This illustration shows a flowchart of how, in an embodiment of this disclosure, the first transaction time series data of each item in a first time period is encoded using a time series data encoding network to obtain the time series embedding vector corresponding to each item.
[0061] Figure 5 This illustration shows another flowchart of how to update network parameters of a specified network in an embodiment of this disclosure;
[0062] Figure 6 This diagram illustrates the overall network architecture of the transaction data processing model in this embodiment of the present disclosure.
[0063] Figure 7 This diagram illustrates the overall training process of the transaction data processing model in this embodiment of the present disclosure.
[0064] Figure 8 A schematic diagram of the structure of a training apparatus for a transaction data processing model in an exemplary embodiment of this disclosure is shown.
[0065] Figure 9 A schematic diagram of the structure of an electronic device in an exemplary embodiment of this disclosure is shown. Detailed Implementation
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0067] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0068] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0069] In the process of automating and intelligentizing many goods trading scenarios, time series forecasting of goods transaction volume plays a crucial role. For example, on some online shopping websites, the transaction volume of each type of item over a future period is a variable that needs to be considered in a series of intelligent decisions (such as inventory preparation and promotions). Therefore, the forecasting capabilities ultimately have a significant impact on sales revenue, inventory costs, and other metrics. Meanwhile, large online shopping websites can sell up to millions of items simultaneously, and large-scale time series data presents new challenges to modern time series forecasting technologies.
[0070] Existing methods for predicting transaction volume primarily utilize traditional statistical methods and machine learning models. These methods analyze historical sales data, combined with information such as market trends, seasonal factors, and promotional activities, to predict future sales. With the advancement of big data and computing power, these technologies have significantly improved in both prediction accuracy and efficiency.
[0071] With the rise and widespread application of Large Language Models (LLMs), these models, leveraging deep learning algorithms and advanced natural language processing techniques, have demonstrated remarkable capabilities in understanding and processing massive amounts of text data. This not only provides a powerful tool for analyzing and interpreting complex language patterns but also opens up new perspectives and possibilities for completing time-series related reasoning tasks.
[0072] Although existing trading volume prediction technologies have improved the efficiency and accuracy of predictions to some extent, the following problems still exist:
[0073] First, traditional statistical and machine learning models often rely on expert experience and human intervention. For example, when dealing with product brands, categories, and attributes, the common approach is to process the data into qualitative or quantitative features, making the data processing complex and time-consuming. These models require extensive data preprocessing and feature engineering, thus increasing system complexity and maintenance costs. Although these methods can improve prediction accuracy, they still require professionals to perform tedious feature selection and parameter tuning.
[0074] Second, while open-source large language models perform well in text generation and reasoning, they are primarily designed for processing text data, and their performance is often unsatisfactory when directly applied to the prediction of time series data.
[0075] Given the aforementioned problems, existing inventory management methods often fall short in terms of forecasting accuracy, adaptability, cumbersome data processing, and real-time performance when dealing with rapid changes in the market environment. Therefore, there is an urgent need to develop a smarter, more efficient, and more flexible transaction volume forecasting method and system to overcome the limitations of existing technologies and meet the needs of relevant online shopping platforms and users.
[0076] In the embodiments of this disclosure, a training method for a transaction data processing model is first provided, which at least to some extent overcomes the deficiency of insufficient prediction accuracy in related technologies.
[0077] Figure 1 The diagram shows a flowchart of a training method for a transaction data processing model in an embodiment of this disclosure. The execution entity of the training method for the transaction data processing model can be a server that trains the transaction data processing model.
[0078] refer to Figure 1 The training method for a transaction data processing model according to an embodiment of the present disclosure includes the following steps:
[0079] Step S110: Obtain item datasets for multiple items within historical time periods, and divide the item datasets into training datasets and training label sets according to time segmentation points; the item datasets contain item description text for each item corresponding to a historical time period and historical transaction time series data for each item within the historical time period;
[0080] Step S120: Invoke the original transaction data processing model; the original transaction data processing model consists of multiple networks;
[0081] Step S130: Iteratively train the original transaction data processing model using the training dataset and the training label set to update the network parameters of a portion of the multiple networks and obtain the trained transaction data processing model; wherein, the portion of the specified networks includes a time-series data encoding network.
[0082] exist Figure 1In the technical solution provided by the illustrated embodiment, multiple item datasets within a historical time period are acquired, and the item datasets are divided into a training dataset and a training label set according to time segmentation points. The item datasets contain item-related text information (item description text) for each item corresponding to the historical time period, and historical transaction time-series data for each item within the historical time period. An original transaction data processing model is invoked; the original transaction data processing model consists of multiple networks. The original transaction data processing model is iteratively trained using the training dataset and the training label set to update the network parameters of a specified portion of the multiple networks (including the time-series data encoding network). By obtaining a well-trained transaction data processing model, on the one hand, the model can learn the characteristics of items from multiple dimensions by combining time-series transaction data with unstructured text information, thus capturing the characteristics of items more comprehensively and improving data utilization efficiency, which helps to improve the model's prediction accuracy. Furthermore, it can maximize the use of the parameter configuration of existing large models, avoiding the need to train a time series inference model with a matching parameter scale from scratch, thereby reducing the investment of data, computing power and human resources, and lowering operating costs. On the other hand, it can focus on iteratively training the time-series data encoding network, thereby enhancing the performance of the large model in processing time-series data, and further ensuring the model's prediction accuracy.
[0083] The following are Figure 1 The specific implementation process of each step in the process will be explained in detail:
[0084] In step S110, multiple item datasets within historical time periods are obtained, and the item datasets are divided into training datasets and training label sets according to time segmentation points.
[0085] In this step, multiple item datasets can be obtained within a historical time period. The item dataset can contain item description text for each item corresponding to the historical time period and historical transaction time series data for each item within the historical time period.
[0086] The aforementioned historical period can be the past two years, and can be set according to the actual situation. This disclosure does not impose any special restrictions on it.
[0087] The above item description text includes at least one of the following: basic item information for each item, transaction market information for each item within a historical period, and characteristic description information corresponding to historical transaction time series data.
[0088] The aforementioned basic item information refers to the most fundamental information related to the item. This data forms the most basic elements for understanding and analyzing the item's characteristics, and is the foundation for various data analyses, modeling, and decision-making processes. For example, the basic item information may include the following:
[0089] ①Item Basics: The name of the item displayed on the e-commerce platform, such as "Smartphone A1", "Smartphone A2", etc.;
[0090] ② Category: The category to which the item belongs, such as "electronic products - mobile phones";
[0091] ③ Brand: The brand of an item, such as "Brand X";
[0092] ④ Attributes: Other specific attributes of the item, such as: color: "black", size: "6.5 inches", storage capacity: "128GB", processor: "octa-core processor", battery capacity: "4000mAh".
[0093] The historical transaction time series data for each item within the historical period can be compiled by arranging the daily transaction volume of each item over the past two years. The daily transaction volume of each item over the past two years can be found in Table 1.
[0094] Table 1
[0095]
[0096] The characteristic description information corresponding to the aforementioned historical transaction time series data can be used to describe the data characteristics of the historical transaction time series data. For example, please refer to Table 2, which shows an example table of characteristic description information corresponding to historical transaction time series data:
[0097] Table 2
[0098]
[0099]
[0100] The transaction market information for each item in the historical period refers to the summary of transaction activities and related information for each item within a historical period. This information can help analyze the item's market performance, consumer behavior, and market trends. For example, market information could include the daily promotional discount prices of various mobile phones over the past two years. Table 3 provides an example of the aforementioned market information.
[0101] Table 3
[0102] date mobile phone model Original price (unit: yuan) Promotional discount price (unit: yuan) 2022-01-01 Smartphone A1 5000 4500 2022-01-01 Smartphone A2 4000 3600 2022-01-02 Smartphone A1 3500 3200
[0103] After obtaining the item datasets of the above-mentioned multiple items within a historical period, this disclosure can further preprocess the item datasets of the multiple items within a historical period to obtain preprocessed item datasets.
[0104] The above preprocessing includes at least one of the following: outlier removal, missing value imputation, and data standardization.
[0105] Outliers are data points in a dataset that deviate significantly from other observations. These data points may be due to measurement errors, data entry errors, or other reasons. Therefore, outliers can be identified and removed from the item dataset based on the experience or expertise of domain specialists, ensuring data accuracy and reducing the impact of outliers on the analysis results.
[0106] Missing values are data points in a dataset where some observations are missing. These missing values may affect subsequent analysis and modeling. Therefore, methods such as interpolation, taking the mean or median, and data prediction can be used to impute missing values to ensure the integrity and usability of the dataset.
[0107] Data standardization refers to the process of converting data into a form with the same scale, usually to eliminate the dimensional differences between different features, making the data more suitable for modeling.
[0108] After preprocessing the item dataset, it can be divided into a training dataset and a training label set according to the time segmentation point. Specifically, the historical period can be divided into a first period and a second period according to the time segmentation point t0 to obtain the training dataset corresponding to the first period and the training label set corresponding to the second period. For example, if the historical period is represented as (1, ..., t1), then the first period can be represented as (1, ..., t0), and the second period can be represented as (t0, ..., t1). That is, the first period starts with the start time 1 of the historical period and ends with the time segmentation point t0, and the second period starts with the time segmentation point t0 and ends with the end time of the aforementioned historical period.
[0109] Therefore, the training dataset can contain the first item description text corresponding to the first time period and the first transaction time series data of each item in the first time period; while the training label set can contain the second item description text corresponding to the second time period and the second transaction time series data of each item in the second time period.
[0110] After obtaining the above training dataset and the above training label set, the following steps S120 can be performed.
[0111] In step S120, the original transaction data processing model is invoked.
[0112] In this step, the original transaction data processing model can be invoked. This original data processing model can be a transaction data processing model that already has a rudimentary form within an existing framework. This original transaction data processing model can consist of multiple networks, which may include a text information encoding network, a time-series data encoding network, and a decoding network. The specific processing procedures for each network are explained in step S130 below.
[0113] In step S130, the original transaction data processing model is iteratively trained using the training dataset and training label set to update the network parameters of some specified networks in multiple networks, thereby obtaining the trained transaction data processing model.
[0114] In this step, the original transaction data processing model can be iteratively trained using the aforementioned training dataset and training label set to update the network parameters of certain specified networks among multiple networks, thereby obtaining a trained transaction data processing model. Specifically, this disclosure can freeze the network parameters of the aforementioned text information encoding network, thus only iterating the parameters of the aforementioned time-series data encoding network and the aforementioned decoding network, thereby maximizing the use of the existing model framework, improving the model's training efficiency, and also enabling targeted optimization of the time-series data processing performance of large models, thereby improving the processing performance of large models for time-series data.
[0115] In the first alternative implementation, refer to Figure 2 , Figure 2 This illustration shows a flowchart of how to update network parameters of a portion of a plurality of networks according to an embodiment of the present disclosure, including steps S201-S203:
[0116] In step S201, the training sample set is input into the original transaction data processing model, and the original transaction data processing model outputs the predicted transaction time series data for each item corresponding to the second time period.
[0117] In this step, the above training sample set can be input into the original transaction data processing model, and the original transaction data processing model can output the predicted transaction time series data for each item corresponding to the second time period.
[0118] Specifically, you can refer to Figure 3 , Figure 3 This embodiment of the present disclosure illustrates how the original transaction data processing model outputs predicted transaction time series data for each item corresponding to the second time period, including steps S301-S304:
[0119] In step S301, the first item description text corresponding to the first time period for each item is encoded by a text information encoding network to obtain the word embedding vector corresponding to each item.
[0120] In this step, a text information encoding network can be used to encode the first item description text corresponding to the first time period for each item, obtaining an M-dimensional word embedding vector for each item. Word embedding is a technique that maps words in text to a multi-dimensional vector space. Each word (or "token") has a corresponding vector representation in the word embedding space. These vectors not only reflect the semantic information of the words themselves, but also the relationships between words.
[0121] Specifically, the text description text corresponding to the first item in the first time period can be segmented using the aforementioned text information encoding network to obtain multiple target segmentation tokens. Then, the standard word vector corresponding to each target segmentation can be matched from the standard vocabulary to obtain the word embedding vector for each item. For example, taking the original transaction data processing model as GPT-2-small, its standard vocabulary can contain 50257 tokens, each token having a corresponding standard word vector with a dimension of 768. Therefore, each target segmentation can correspond to a word vector with a dimension of 768.
[0122] In step S302, the first transaction time series data of each item in the first time period is encoded by a time series data encoding network to obtain the time series embedding vector corresponding to each item.
[0123] In this step, the first transaction time series data of each item in the first time period can be encoded using the aforementioned time series data encoding network to obtain the time series embedding vector corresponding to each item.
[0124] For details, please refer to Figure 4 , Figure 4 This illustration shows a flowchart of how, in this embodiment of the present disclosure, the first transaction time series data of each item within a first time period is encoded using a time series data encoding network to obtain the time series embedding vector corresponding to each item, including steps S401-S403:
[0125] In step S401, each first transaction time series data is segmented to obtain multiple sub-sequences.
[0126] In this step, the time-series data encoding network can segment each of the first transaction time-series data using the segmentation function F(s): x→s, dividing it into K (K is an integer greater than 1) non-overlapping subsequences. Here, x represents each first transaction time-series data corresponding to each item, and s represents each subsequence after the segmentation. F(s) is usually a sliding window, each segment A list consisting of time points (t) i and tj This represents the endpoint time corresponding to the subsequence after splitting, 1≤t i ≤t j ≤T, where T represents the total number of time points.
[0127] In step S402, each sub-sequence is sequence encoded using an embedding function to obtain each sub-vector.
[0128] In this step, the embedding function F can be used. e :s k ∈R D×T →e k ∈R M Sequence encoding is performed on each subsequence to obtain each M-dimensional subvector e. k ,
[0129] The aforementioned embedding function can be a fully connected neural network model whose parameters are to be trained, with an input dimension of D*T (D represents the total number of items) and an output dimension of M.
[0130] In step S403, the temporal embedding vector corresponding to each item is determined based on the multiple sub-vectors corresponding to the multiple sub-sequences.
[0131] In this step, for example, multiple sub-vectors e corresponding to multiple sub-sequences can be processed. k The vectors are concatenated to determine the temporal embedding vector corresponding to each item.
[0132] After obtaining the word embedding vector and the temporal embedding vector, you can then refer to... Figure 3 In step S303, the word embedding vector and temporal embedding vector corresponding to each item are concatenated to obtain the concatenated vector.
[0133] In this step, the word embedding vector and temporal embedding vector corresponding to each item can be concatenated to obtain the concatenated vector.
[0134] In step S304, the concatenation vector corresponding to each item is decoded by the decoding network to obtain the predicted transaction time series data for each item corresponding to the second time period.
[0135] In this step, the decoding module can be a fully connected neural network model to be trained, with an input dimension of M and an output dimension of D*H (H is the total length of the time points included in the second time period to be predicted). Thus, the decoding network can decode the spliced vector corresponding to each item to remap the spliced vector back to the D*H dimension, thereby obtaining the predicted transaction time series data for each item corresponding to the second time period.
[0136] Next, refer to Figure 2 In step S202, the first loss value of the original transaction data processing model is determined based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period.
[0137] In this step, the first loss value lossA of the original transaction data processing model can be determined based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period.
[0138] Specifically, given that the predicted transaction time series data is composed of multiple predicted transaction data, and the second transaction time series data is composed of multiple second transaction data, and the number of predicted transaction data and second transaction data is the same, the first loss value lossA can be calculated based on the following formula 1:
[0139]
[0140] Where θ represents the network parameters corresponding to the specified part of the network that needs to be trained, D represents the total number of items, and T represents the total number of prediction time points included in the second time period that needs to be predicted. This represents the degree of difference between the predicted transaction data and the corresponding second transaction data for each predicted time point for each item.
[0141] In step S203, the network parameters of a portion of the specified networks among the multiple networks are updated based on the first loss value.
[0142] In this step, based on the first loss value, the gradient descent algorithm can be used to update the network parameters corresponding to the time series data encoding network and the decoding network. When the first loss value tends to converge (e.g., less than or equal to the preset loss value), the final network parameters corresponding to the time series data encoding network and the decoding network can be determined to obtain the trained transaction data processing model.
[0143] In the second alternative implementation, after obtaining the first loss value, reference can be made to... Figure 5 , Figure 5 This illustration shows another flowchart of how to update network parameters of a portion of a plurality of networks in an embodiment of the present disclosure, including steps S501-S503:
[0144] In step S501, a second loss value for the original transaction data processing model is determined based on the similarity between each sub-vector associated with each item and each standard word vector in the standard vocabulary.
[0145] In this step, each subvector e associated with each item can be used as a reference. k The word embeddings of each standard word in the standard vocabulary included in the original transaction data processing model described above are compared to the word embeddings of each standard word. j The degree of similarity between the two is used to determine the second loss value of the original transaction data processing model. For example, the second loss value lossB can be calculated based on the following formula 2:
[0146]
[0147] Where K represents the total number of subsequences obtained after splitting the historical transaction time-series data of each item, and P represents the total number of standard word vectors contained in the above standard vocabulary.
[0148] sim(e k word_embedding j ) represents the sub-vector e corresponding to each sub-sequence. k and each standard word embedding j The degree of similarity between them, for example, can be calculated using cosine similarity.
[0149] In step S502, the comprehensive loss value of the original transaction data processing model is determined based on the first loss value and the second loss value.
[0150] In this step, a comprehensive loss value, lossC, can be determined based on the first and second loss values mentioned above. Specifically, the comprehensive loss value can be calculated based on the following formula 3:
[0151]
[0152] Where λ is the weighting parameter, which is a rational number greater than 0. This disclosure makes e k Compared with standard word embedding j The similarity is the highest, which can force the sub-vectors corresponding to the sub-sequences to align with the standard word vectors. It can improve the similarity between the text describing word vectors such as large, small, rising, falling, stable, and fluctuating and the specific numerical vectors.
[0153] In step S503, the network parameters of a portion of the specified networks among the multiple networks are updated based on the comprehensive loss value.
[0154] In this step, based on the above-mentioned comprehensive loss value, the network parameters corresponding to the above-mentioned time-series data encoding network and the above-mentioned decoding network can be updated using the gradient descent algorithm. When the above-mentioned comprehensive loss value tends to converge (for example, less than or equal to the preset loss value), the final network parameters corresponding to the above-mentioned time-series data encoding network and the above-mentioned decoding network can be determined to obtain the trained transaction data processing model.
[0155] After obtaining a trained transaction data processing model, this disclosure can input a dataset of multiple items within a historical period into the trained transaction data processing model; and use the trained transaction data processing model to predict the future transaction time series data of multiple items in a future period based on the dataset of multiple items within a historical period.
[0156] Specifically, the text information encoding network of the pre-trained transaction data processing model can encode the item description text corresponding to the historical time period for each item, obtaining the word embedding vector for each item; the time series data encoding network of the pre-trained transaction data processing model can encode the historical transaction time series data of each item within the historical time period, obtaining the time series embedding vector for each item; then, the word embedding vector and the time series embedding vector for each item are concatenated to obtain the concatenated vector; and then the decoding network decodes the concatenated vector for each item to obtain the future transaction time series data for each item in the future time period.
[0157] refer to Figure 6 , Figure 6 This diagram illustrates the overall network architecture of the transaction data processing model in this embodiment of the disclosure, such as... Figure 6 As shown:
[0158] The transaction data processing model includes a text information encoding network (the parameters are frozen and do not need to be updated), a time series data encoding network, and a decoding network. The text information encoding network is used to encode the item description text to obtain word embedding vectors. The time series data encoding network is used to encode historical transaction time series data to obtain time series embedding vectors. The decoding network is used to concatenate the word embedding vectors and time series embedding vectors in dimensions, and decode the concatenated vectors to obtain the predicted transaction time series data for each item corresponding to the future period.
[0159] refer to Figure 7 , Figure 7 This diagram illustrates the overall training process of the transaction data processing model in this embodiment, including steps S701-S706:
[0160] In step S701, begin;
[0161] In step S702, item data is collected;
[0162] In step S703, data preprocessing (i.e., outlier removal, missing value imputation, and data standardization) is performed.
[0163] In step S704, the model training process;
[0164] In step S705, the trained transaction data processing model is obtained;
[0165] In step S706, the process ends.
[0166] Based on the technical solution in this disclosure, this disclosure can achieve at least the following technical effects:
[0167] First, it enhances time series prediction capabilities and reduces training costs: In response to the shortcomings of existing open-source large language models in time series data analysis, this disclosure strengthens the performance of these models on time series data by dividing time series data into subsequences, avoiding the need to train a large time series inference model with matching parameter scale from scratch, thereby significantly reducing the investment of data, computing power and human resources.
[0168] Second, it simplifies data processing and feature engineering: by converting time-series data into input suitable for large language models, it can maximize the reuse of parameter weights of existing large models, thereby using the text reasoning capabilities of existing open-source large models to generate prediction results, reducing the need for manual intervention in complex data processing and feature engineering. This not only improves the system's operating efficiency but also reduces the system's complexity and maintenance costs.
[0169] Third, improve prediction accuracy: the model can make more accurate data predictions by integrating basic information about the item, historical transaction volume, promotional activity information, etc.
[0170] Therefore, this disclosure can improve the efficiency and accuracy of transaction volume prediction based on large-scale models, reduce operating costs, improve the overall stability and responsiveness of the supply chain, and bring significant competitive advantages to enterprises.
[0171] This disclosure also provides a training apparatus for a transaction data processing model. Figure 8 This diagram illustrates the structure of a training apparatus for a transaction data processing model in an exemplary embodiment of this disclosure; as shown below. Figure 8 As shown, the training device 800 for the transaction data processing model may include a data acquisition module 810, a model invocation module 820, and a model training module 830. Wherein:
[0172] The data acquisition module 810 is used to acquire an item dataset of multiple items within a historical time period, and divide the item dataset into a training dataset and a training label set according to time segmentation points; the item dataset contains item description text for each item corresponding to the historical time period and historical transaction time series data of each item within the historical time period;
[0173] The model invocation module 820 is used to invoke the original transaction data processing model; the original transaction data processing model consists of multiple networks.
[0174] The model training module 830 is used to iteratively train the original transaction data processing model using the training dataset and the training label set to update the network parameters of a portion of the multiple networks and obtain a trained transaction data processing model; wherein, the portion of the specified networks includes a time series data encoding network.
[0175] In an exemplary embodiment of this disclosure, the item description text includes at least one of the following:
[0176] The basic information of each item, the transaction market information of each item within the historical period, and the characteristic description information corresponding to the historical transaction time series data.
[0177] In an exemplary embodiment of this disclosure, after acquiring a dataset of multiple items over a historical period, the data acquisition module 810 is configured to:
[0178] The item datasets of the multiple items within a historical time period are preprocessed to obtain preprocessed item datasets;
[0179] The preprocessing includes at least one of the following: outlier removal, missing value imputation, and data standardization.
[0180] In an exemplary embodiment of this disclosure, the data acquisition module 810 divides the item dataset into a training dataset and a training label set according to time division points, including:
[0181] The historical period is divided into a first period and a second period according to the time segmentation points to obtain a training dataset corresponding to the first period and a training label set corresponding to the second period;
[0182] The first time period starts at the beginning time of the historical time period and ends at the time segmentation point; the training dataset contains the first item description text corresponding to the first time period for each item and the first transaction time sequence data of each item within the first time period;
[0183] The second time period starts at the time segmentation point and ends at the end time of the historical time period; the training label set contains the second item description text corresponding to the second time period for each item and the second transaction time sequence data of each item within the second time period.
[0184] In an exemplary embodiment of this disclosure, the model training module 830 uses the training dataset and the training label set to iteratively train the original transaction data processing model to update the network parameters of a portion of specified networks among multiple networks, including:
[0185] The training sample set is input into the original transaction data processing model, and the original transaction data processing model outputs the predicted transaction time series data for each item corresponding to the second time period.
[0186] Based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period, a first loss value of the original transaction data processing model is determined.
[0187] The network parameters of a portion of the plurality of networks are updated based on the first loss value.
[0188] In an exemplary embodiment of this disclosure, the plurality of networks includes a text information encoding network, a time-series data encoding network, and a decoding network;
[0189] The model training module 830 inputs the training sample set into the original transaction data processing model, and outputs the predicted transaction time series data for each item corresponding to the second time period through the original transaction data processing model, including:
[0190] The first item description text corresponding to the first time period is encoded by the text information encoding network to obtain the word embedding vector corresponding to each item;
[0191] The time-series data of the first transaction of each item in the first time period is encoded by the time-series data encoding network to obtain the time-series embedding vector corresponding to each item;
[0192] The word embedding vector and the temporal embedding vector corresponding to each item are concatenated to obtain a concatenated vector;
[0193] The concatenation vector corresponding to each item is decoded by the decoding network to obtain the predicted transaction time series data for each item corresponding to the second time period.
[0194] In an exemplary embodiment of this disclosure, the model training module 830 encodes the first item description text corresponding to the first time period for each item through the text information encoding network to obtain the word embedding vector corresponding to each item, including:
[0195] The text information encoding network is used to segment the first item description text corresponding to the first time period for each item to obtain multiple target words.
[0196] Match the standard word vector corresponding to each target word from the standard vocabulary to obtain the word embedding vector corresponding to each item.
[0197] In an exemplary embodiment of this disclosure, the model training module 830 encodes the first transaction time series data of each item within the first time period through the time series data encoding network to obtain a time series embedding vector corresponding to each item, including:
[0198] The time-series data of the first transaction for each item within the first time period are segmented using a segmentation function to obtain multiple sub-sequences;
[0199] Each sub-sequence is sequence-encoded using an embedding function to obtain each sub-vector;
[0200] Based on the multiple sub-vectors corresponding to the multiple sub-sequences, determine the temporal embedding vector corresponding to each item.
[0201] In an exemplary embodiment of this disclosure, after obtaining the predicted transaction time series data for each item corresponding to the second time period, the model training module 830 is configured to:
[0202] Based on the degree of difference between the predicted transaction time series data of each item corresponding to the second time period and the second transaction time series data of each item in the second time period, a first loss value of the original transaction data processing model is determined.
[0203] The second loss value of the original transaction data processing model is determined based on the similarity between each sub-vector associated with each item and each standard word vector in the standard vocabulary.
[0204] Based on the first loss value and the second loss value, determine the comprehensive loss value of the original transaction data processing model;
[0205] The network parameters of a portion of the multiple networks are updated based on the comprehensive loss value.
[0206] In an exemplary embodiment of this disclosure, the partially designated network further includes a decoding network.
[0207] In an exemplary embodiment of this disclosure, after obtaining the trained transaction data processing model, the model application module (not shown in the figure) is configured as follows:
[0208] The item datasets of the multiple items within the historical time period are input into the trained transaction data processing model;
[0209] The trained transaction data processing model predicts the future transaction time series data of each item in the future time period based on the item dataset of the multiple items in the historical time period.
[0210] The specific details of each module in the training device of the above-mentioned transaction data processing model have been described in detail in the training method of the corresponding transaction data processing model, so they will not be repeated here.
[0211] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0212] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0213] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0214] This disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device.
[0215] Computer-readable storage media can be, for example—but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0216] A computer-readable storage medium can be sent, propagated, or transmitted for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0217] A computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0218] Furthermore, this disclosure also provides an electronic device capable of implementing the above-described method.
[0219] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0220] The following reference Figure 9 To describe an electronic device 900 according to such an embodiment of the present disclosure. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0221] like Figure 9 As shown, the electronic device 900 is presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processor 910, at least one memory 920, a bus 930 connecting different system components (including memory 920 and processor 910), and a display 940.
[0222] The memory stores program code that can be executed by the processor 910, causing the processor 910 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processor 910 can perform actions such as... Figure 1 As shown: Step S110, acquire item datasets for multiple items within a historical time period, and divide the item datasets into a training dataset and a training label set according to time segmentation points; the item datasets contain item description text for each item corresponding to a historical time period and historical transaction time series data for each item within the historical time period; Step S120, call the original transaction data processing model; the original transaction data processing model consists of multiple networks; Step S130, use the training dataset and the training label set to iteratively train the original transaction data processing model to update the network parameters of a portion of the multiple networks, thereby obtaining a trained transaction data processing model; wherein, the portion of the specified networks includes a time series data encoding network.
[0223] The memory 920 may include a readable medium in the form of volatile storage, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.
[0224] The memory 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, including but not limited to: an operating system, 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.
[0225] Bus 930 can represent one or more of several types of bus structures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or a local bus using any of the various bus structures.
[0226] Electronic device 900 can also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0227] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for training a transaction data processing model, characterized in that, The method comprises: obtaining a plurality of item data sets in a historical period, and dividing the item data sets into a training data set corresponding to a first period and a training label set corresponding to a second period according to a time segmentation point; the item data set contains item description text corresponding to each item in the historical period and historical transaction time series data of each item in the historical period; calling an original transaction data processing model; the original transaction data processing model is composed of a plurality of networks; the plurality of networks include a text information encoding network, a time series data encoding network and a decoding network; iteratively training the original transaction data processing model using the training data set and the training label set to update the network parameters of part of the specified networks in the plurality of networks, to obtain a trained transaction data processing model; wherein the part of the specified networks includes the time series data encoding network; the iteratively training the original transaction data processing model using the training data set and the training label set to update the network parameters of part of the specified networks in the plurality of networks comprises: inputting the training data set into the original transaction data processing model, and outputting the predicted transaction time series data of each item corresponding to the second period through the original transaction data processing model; after obtaining the predicted transaction time series data of each item corresponding to the second period, determining a first loss value of the original transaction data processing model according to the difference between the predicted transaction time series data of each item corresponding to the second period and the second transaction time series data of each item in the second period; determining a second loss value of the original transaction data processing model according to the similarity between each subvector associated with each item and each standard word vector in a standard word table; determining a comprehensive loss value of the original transaction data processing model according to the first loss value and the second loss value; updating the network parameters of part of the specified networks in the plurality of networks according to the comprehensive loss value; wherein each subvector associated with each item is determined by: segmenting the first transaction time series data of each item in the first period through a segmentation function to obtain a plurality of sub-sequences; obtaining each subvector by sequence encoding each sub-sequence through an embedding function.
2. The method of claim 1, wherein, The item description text contains at least one of the following: the item basic information of each item, the transaction market information of each item in the historical period, and the characteristic description information corresponding to the historical transaction time series data.
3. The method of claim 2, wherein, After obtaining the item data set of a plurality of items in a historical period, the method further comprises: preprocessing the item data set of the plurality of items in the historical period to obtain a preprocessed item data set; the preprocessing includes at least one of the following: outlier rejection processing, missing value filling processing and data standardization processing.
4. The method according to claim 1 or 3, characterized in that, the dividing the item data set into a training data set corresponding to a first period and a training label set corresponding to a second period according to a time segmentation point comprises: dividing the historical period into the first period and the second period according to the time segmentation point, to obtain a training data set corresponding to the first period and a training label set corresponding to the second period; the first period starts at the start time of the historical period and ends at the time segmentation point; the training data set includes first item description text corresponding to the first period for each item and first transaction time series data of the each item within the first period; the second period starts at the time segmentation point and ends at the end time of the historical period; the training label set includes second item description text corresponding to the second period for the each item and second transaction time series data of the each item within the second period.
5. The method of claim 1, wherein, the inputting of the training data set into the original transaction data processing model includes: encoding the first item description text corresponding to the first period for the each item through the text information encoding network to obtain a word embedding vector corresponding to the each item; encoding the first transaction time series data of the each item within the first period through the time series data encoding network to obtain a time series embedding vector corresponding to the each item; splicing the word embedding vector and the time series embedding vector corresponding to the each item to obtain a splicing vector; decoding the splicing vector corresponding to the each item through the decoding network to obtain predicted transaction time series data of the each item corresponding to the second period.
6. The method of claim 5, wherein, the encoding of the first item description text corresponding to the first period for the each item through the text information encoding network to obtain a word embedding vector corresponding to the each item includes: performing word segmentation processing on the first item description text corresponding to the first period for the each item through the text information encoding network to obtain a plurality of target words; matching a standard word vector corresponding to each target word from a standard word table to obtain a word embedding vector corresponding to the each item.
7. The method of claim 5, wherein, the time series embedding vector corresponding to the each item is determined by: determining the time series embedding vector corresponding to the each item according to a plurality of sub-vectors corresponding to a plurality of sub-sequences.
8. The method of claim 1, wherein, the partial specification network further includes a decoding network.
9. The method of claim 1, wherein, after obtaining the trained transaction data processing model, the method further includes: inputting an item data set of the plurality of items within the historical period into the trained transaction data processing model; predicting future transaction time series data of each item within a future period based on the item data set of the plurality of items within the historical period through the trained transaction data processing model. 10.A training device of a transaction data processing model, characterized in that, includes: a data acquisition module, configured to acquire a plurality of item data sets of a plurality of items in a historical period, and divide the item data sets into a training data set corresponding to a first period and a training label set corresponding to a second period according to a time segmentation point; the item data sets include item description texts corresponding to the historical period of each item and historical transaction time series data of the each item in the historical period; a model calling module, configured to call an original transaction data processing model; the original transaction data processing model is composed of a plurality of networks; the plurality of networks include a text information encoding network, a time series data encoding network and a decoding network; a model training module, configured to perform iterative training on the original transaction data processing model by using the training data set and the training label set, to update network parameters of a part of specified networks in the plurality of networks, and to obtain a trained transaction data processing model; wherein the part of specified networks include the time series data encoding network; the model training module is further configured to input the training data set into the original transaction data processing model, and output predicted transaction time series data of the each item corresponding to the second period by the original transaction data processing model; after obtaining the predicted transaction time series data of the each item corresponding to the second period, a first loss value of the original transaction data processing model is determined according to a difference degree between the predicted transaction time series data of the each item corresponding to the second period and second transaction time series data of the each item in the second period; a second loss value of the original transaction data processing model is determined according to a similarity degree between each sub vector associated with the each item and each standard word vector in a standard word table; a comprehensive loss value of the original transaction data processing model is determined according to the first loss value and the second loss value; network parameters of a part of specified networks in the plurality of networks are updated according to the comprehensive loss value; wherein each sub vector associated with the each item is determined by: obtaining a plurality of sub sequences by segmenting first transaction time series data of the each item in the first period by a segmentation function; obtaining each sub vector by performing sequence encoding on each of the sub sequences by an embedding function.
11. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by a processor to implement the transaction data processing model training method of any one of claims 1-9.
12. An electronic device, comprising: comprise: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the transaction data processing model training method of any one of claims 1-9 by executing the executable instructions.
Citation Information
Patent Citations
Full-automatic quantitative transaction method and device based on improved DETR model
CN116894731A