Information prediction method, device and computer storage medium
By unifying historical and future features into keys and query vectors through a self-attention mechanism, the problem of inconsistent features in e-commerce product information prediction is solved, thereby improving prediction accuracy and the effectiveness of business decisions.
Patent Information
- Application Number
- CN202211021809.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-08-24
AI Technical Summary
The inconsistency between the historical and future dynamic characteristics of e-commerce products leads to a misalignment between future and historical time-series characteristics, affecting the accuracy of information prediction.
By using a self-attention mechanism, historical sequence features are determined as key vectors, future sequence features as query vectors, and behavioral features as value vectors. Information prediction is then performed based on these vectors to ensure natural feature alignment.
It improves the accuracy of information forecasting, helps businesses to rationally arrange production on the manufacturing side and set up marketing plans on the sales side, reduce inventory risks, and increase potential revenue.
Smart Images

Figure CN115409550B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an information prediction method, device and computer storage medium. Background Technology
[0002] With the rapid development of artificial intelligence technology, many time-series neural networks (neural networks used to process time-series data) have been applied to the field of sales forecasting to improve the cumbersome and inaccurate nature of manual forecasting.
[0003] However, e-commerce products often have inconsistent historical and future dynamic characteristics. For example, some characteristics related to user purchases and browsing (behavioral characteristics) only have historical timelines, while some characteristics related to marketing activities (activity characteristics) have both historical and future timelines. This can easily lead to a misalignment between future and historical timeline characteristics, which reduces the accuracy of predictions when making information predictions based on historical and future dynamic characteristics. Summary of the Invention
[0004] This application provides an information prediction method, device, and computer storage medium that can accurately predict relevant information about a product.
[0005] In a first aspect, embodiments of this application provide an information prediction method, including:
[0006] The dynamic characteristics of the product to be predicted are obtained, including: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0007] Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features;
[0008] The historical sequence features are determined as key vectors corresponding to the self-attention mechanism, the future sequence features are determined as query vectors corresponding to the self-attention mechanism, and the behavioral features are determined as value vectors corresponding to the self-attention mechanism.
[0009] Information prediction is performed based on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted.
[0010] Secondly, embodiments of this application provide an information prediction device, comprising:
[0011] The first acquisition module is used to acquire the dynamic characteristics of the product to be predicted. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0012] The first determining module is used to determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features;
[0013] The first determining module is used to determine the historical sequence features as key vectors corresponding to the self-attention mechanism, the future sequence features as query vectors corresponding to the self-attention mechanism, and the behavioral features as value vectors corresponding to the self-attention mechanism.
[0014] The first processing module is used to perform information prediction based on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted.
[0015] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the information prediction method described in the first aspect above.
[0016] Fourthly, embodiments of the present invention provide a computer storage medium for storing a computer program, which, when executed by a computer, implements the information prediction method described in the first aspect above.
[0017] Fifthly, embodiments of the present invention provide a computer program product, comprising: a computer program that, when executed by a processor of an electronic device, causes the processor to execute the information prediction method described in the first aspect above.
[0018] The information prediction method, device, and computer storage medium provided in this application acquire the dynamic characteristics of the product to be predicted, determine historical sequence features corresponding to historical time points and future sequence features corresponding to future time points based on the activity features; then, determine the historical sequence features as key vectors, the future sequence features as query vectors, and the behavioral features as value vectors; and perform information prediction based on the query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted. This effectively achieves feature natural alignment during information prediction operations by configuring the query vectors and key vectors to have unified source features, thus effectively improving the accuracy of prediction information. After obtaining the prediction information, users can manage, maintain, schedule, and arrange related operations for the product based on the prediction information, which helps reduce inventory risk and increase potential revenue, thereby improving the practicality of the method and facilitating market promotion and application. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic diagram illustrating the principle of an information prediction method provided in an embodiment of this application;
[0021] Figure 2 A flowchart illustrating an information prediction method provided in an embodiment of this application;
[0022] Figure 3 A flowchart illustrating the process of determining historical sequence features corresponding to historical time points and future sequence features corresponding to future time points in the activity features provided in this application embodiment;
[0023] Figure 4 This is a flowchart illustrating the process of obtaining prediction information corresponding to the product to be predicted based on the query vector, the key vector, and the value vector, as provided in an embodiment of this application.
[0024] Figure 5 A schematic diagram illustrating an information prediction method provided in an application embodiment of this application;
[0025] Figure 6 This is a schematic diagram of the structure of an information prediction device provided in an embodiment of this application;
[0026] Figure 7 for Figure 6 A schematic diagram of the electronic device corresponding to the information prediction device shown;
[0027] Figure 8 A flowchart illustrating a method for predicting clothing sales volume provided in an embodiment of this application;
[0028] Figure 9 A schematic diagram of the structure of a clothing sales forecasting device provided in an embodiment of this application;
[0029] Figure 10 for Figure 9 The diagram shows the structure of the electronic device corresponding to the clothing sales forecasting device. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.
[0032] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0033] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0034] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.
[0035] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.
[0036] To facilitate understanding of the specific implementation and effects of the technical solution provided in this embodiment, the relevant technologies are described below:
[0037] For tradable products (such as apparel, electronics, and food), merchants often manually determine the production quantity of a product based on historical sales data and then place orders with factories accordingly. Since there is often a delivery cycle of half a month to a month between order placement and delivery, manual forecasting of sales over a relatively long period is required, which can easily lead to a significant discrepancy between production quantity and actual sales. When production quantity exceeds actual sales, it results in inventory backlog, and inventory and warehousing costs become a huge risk for merchants. When production quantity is less than actual sales, it causes merchants to lose potential revenue. Therefore, more accurate information forecasting is crucial for guiding merchants to rationally arrange production and formulate reasonable production and sales plans on the manufacturing side, reduce inventory risk, and increase potential revenue. Simultaneously, it enables merchants to appropriately set marketing plans on the sales side, especially for the apparel industry, where a coordinated production and sales chain allows for on-demand production, reducing inventory risk.
[0038] With the rapid development of artificial intelligence technology, many temporal neural networks (neural networks for processing time-series data) based on Transformer (an encoder-decoder neural network model based on an attention mechanism) have been applied to the field of information prediction in order to improve the cumbersome and inaccurate status of manual prediction. However, e-commerce products often have inconsistent historical and future dynamic features. For example, some features related to user purchase and browsing behaviors (behavioral features) only have historical time series, while some features related to marketing activities (activity features) have both historical and future time series. This causes the features of the future time series to be unable to align with the features of the historical time series, which in turn affects the accuracy of attention calculation in the original Transformer structure and the model's prediction.
[0039] The following is a brief explanation of the three existing information prediction methods:
[0040] Implementation Method 1: A long-term temporal prediction network based on the Transformer structure, jointly proposed by Beijing University of Aeronautics and Astronautics, UC Berkeley, and other institutions. Specifically, it reduces the time and space complexity of the original attention computation through a ProbSparse attention structure. At the decoder end, it improves the inference speed of long sequence prediction by predicting a series of sequences at once instead of the original step-by-step prediction operation. In general, this solution mainly aims to solve the problems of time and space complexity in long sequence prediction and improve prediction speed, but it does not solve the alignment problem when the sequence dimensions are inconsistent.
[0041] The second implementation, proposed by Tsinghua University, is a Transformer-based neural network model for long-term time series prediction. It primarily integrates sequence decomposition into the network structure through a deep decomposition architecture, enabling end-to-end extraction of more predictive components from complex time series. An auto-correlation mechanism extends the original point-level attention computation to sub-sequence-level attention computation. In summary, this approach mainly addresses the difficulty of accurately capturing long-term dependencies in situations involving multiple complex time series components. It does not address the issue of dynamic feature dimension differences and therefore does not resolve the alignment problem when sequence dimensions are inconsistent.
[0042] The third implementation method, proposed jointly by Oxford University and Google, is a time-series prediction network based on a Transformer structure. This network's input includes both static and dynamic features, and the dynamic features suffer from inconsistencies between historical and future dimensions. This technical solution aims to process and utilize the static and multivariate dynamic features contained in complex time series. Although the dynamic features have dimensional differences, this network directly transforms them into embedding vectors of the same dimension using weight matrices of different sizes before performing attention calculations in the Transformer. Therefore, the physical meaning represented by the embedding vectors cannot be well aligned. For example, if the historical sequence contains x-dimensional features and the future sequence contains y-dimensional features, directly reducing them to n dimensions and calculating the dot product similarity fails to align their physical meanings.
[0043] To address the issue of reduced prediction accuracy in product information prediction (especially for e-commerce apparel) using Transformer-based temporal neural networks, where some features only have historical data, leading to misalignment between historical and future features, this embodiment optimizes the attention calculation mechanism within the network based on the structural characteristics of product features. Specifically, this embodiment provides an information prediction method, device, and computer storage medium. The execution entity of the information prediction method is an information prediction device, which can be implemented as a cloud server. In this case, the information prediction method can be executed in the cloud, where several computing nodes (cloud servers) can be deployed. Each computing node possesses computing and storage resources. Multiple computing nodes can be organized in the cloud to provide a specific service; conversely, a single computing node can provide one or more services. The cloud provides the service through an external service interface, which users call to utilize the service. Service interfaces include Software Development Kits (SDKs) and Application Programming Interfaces (APIs).
[0044] This information prediction device can communicate with a client, such as... Figure 1 As shown, according to the solution provided in this embodiment of the invention, the cloud can provide a service interface for information prediction services. Users can invoke this information prediction service interface through a client / requesting end to trigger a request to the cloud to invoke the information prediction service interface. The cloud determines the computing node that responds to the request and uses the processing resources in the computing node to perform the specific processing operations for information prediction.
[0045] The client / requesting end can be any computing device with a certain data transmission capability. Specifically, the client / requesting end can be a mobile phone, a personal computer (PC), a tablet computer, a configuration application, etc. Furthermore, the basic structure of the client can include at least one processor. The number of processors depends on the client's configuration and type. The client can also include memory, which can be volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, etc., or both types. The memory typically stores the operating system (OS), one or more applications, and may also store program data. In addition to the processing unit and memory, the client also includes some basic configurations, such as a network interface card (NIC) chip, an I / O bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, a mouse, a stylus, a printer, etc. Other peripheral devices are well known in the art and will not be described in detail here.
[0046] An information prediction device refers to a device that can provide information prediction services in a network virtual environment, typically referring to a device that utilizes a network for information planning and prediction operations. In physical implementation, an information prediction device can be any device capable of providing computing services, responding to information prediction requests, and performing information prediction services based on those requests. Examples include cluster servers, conventional servers, cloud servers, cloud hosts, and virtual data centers. The main components of an information prediction device include a processor, hard drive, memory, and system bus, similar to a general computer architecture.
[0047] In the above embodiment, the client / requesting end can establish a network connection with the information prediction device, which can be a wireless or wired network connection. If the client / requesting end and the information prediction device are connected via communication, the mobile network standard can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), WiMax, 5G, 6G, etc.
[0048] In this embodiment, the client / requesting end can obtain an information prediction request. This information prediction request may include dynamic characteristics of the product to be predicted. These dynamic characteristics may include behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to both historical and future time points. Specifically, this embodiment does not limit the specific implementation method of the requesting end obtaining the information prediction request. In some instances, the requesting end is configured with an interactive interface to obtain the execution operation input by the user on the interactive interface. Based on the user's input execution operation, the information prediction request can be obtained. In other instances, the information prediction request can be stored in a third device. The third device is communicatively connected to the requesting end, and the information prediction request can be obtained actively or passively through the third device. After obtaining the information prediction request, it can be sent to an information prediction device so that the information prediction device can perform information prediction operations based on the information prediction request.
[0049] An information prediction device is used to acquire information prediction requests and determine the activity features included in the dynamic features based on the information prediction requests. Then, it determines the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points within the activity features. The historical sequence features are defined as key vectors corresponding to the self-attention mechanism, the future sequence features as query vectors corresponding to the self-attention mechanism, and the behavioral features as value vectors corresponding to the self-attention mechanism. This effectively unifies the source features of the key vectors and query vectors, meaning that the key vectors and query vectors are uniformly derived from the activity features in the dynamic features. Information prediction is then performed based on the query vectors, key vectors, and value vectors, thereby obtaining relatively accurate prediction information corresponding to the product to be predicted, completing a relatively accurate information prediction operation.
[0050] The technical solution provided in this embodiment modifies the query vector, key vector, and value vector in the attention network model, so that the query vector and key vector have unified source features that correspond to future and historical time series. Then, the feature corresponding only to historical time is used as the source of the value vector, ensuring that the features are naturally aligned during information prediction. At this time, when making information prediction based on the query vector, key vector, and value vector, the accuracy of information prediction can be effectively improved. After obtaining the prediction information, users can make reasonable production arrangements and formulate production and sales plans on the manufacturing side, and enable merchants to set appropriate marketing plans on the sales side. This helps to reduce inventory risk and increase potential revenue, thereby improving the practicality of the method and facilitating its market promotion and application.
[0051] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.
[0052] Figure 2 A flowchart illustrating an information prediction method provided in this application embodiment; see attached document. Figure 2 As shown, this embodiment provides an information prediction method, wherein the executing entity of the method can be an information prediction device, wherein the information prediction device can be implemented as software or a combination of software and hardware. Specifically, the information prediction method may include the following steps:
[0053] Step S201: Obtain the dynamic characteristics of the product to be predicted. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0054] Step S202: Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features.
[0055] Step S203: Determine the historical sequence features as key vectors corresponding to the self-attention mechanism, determine the future sequence features as query vectors corresponding to the self-attention mechanism, and determine the behavioral features as value vectors corresponding to the self-attention mechanism.
[0056] Step S204: Based on the query vector, key vector, and value vector, perform information prediction to obtain prediction information corresponding to the product to be predicted.
[0057] The following is a detailed explanation of each of the above steps:
[0058] Step S201: Obtain the dynamic characteristics of the product to be predicted. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0059] The products to be predicted can refer to e-commerce goods that can be legally traded and for which relevant data can be collected or statistically analyzed. Examples include clothing, skincare products, food, shoes, electronics, department store goods, furniture, appliances, and vehicles. For any product, during the sales or promotion process, relevant data is often recorded to better understand sales performance or promotional effectiveness. This data can include dynamic characteristics, which are features that change over time. Examples include user behavior patterns such as purchasing, browsing, and promoting products at specific times.
[0060] For any commodity, since the dynamic characteristics of the commodity can directly affect the information prediction results of the product, it is necessary to obtain the dynamic characteristics of the product to be predicted when performing information prediction operations on a product to be predicted. The dynamic characteristics at this time can include behavioral characteristics corresponding to historical time points and activity characteristics corresponding to historical time points and future time points. Among them, behavioral characteristics often refer to product-related behaviors that have occurred in the past, while activity characteristics often refer to relevant information that has occurred in the past and is expected to occur in the future. In some instances, behavioral characteristics can include at least one of the following: product purchase behavior, product browsing behavior, and product search behavior, while activity characteristics can include at least one of the following: product marketing activities, product promotion activities, and product operation activities.
[0061] It should be noted that behavioral and activity characteristics can include not only the characteristics listed above, but also other similar characteristics. For example, behavioral characteristics can also include product comparison behavior, product viewing behavior, product information clicking behavior, etc.; activity characteristics can also include predicted behavior corresponding to product offline, predicted behavior corresponding to product launch, etc.
[0062] Furthermore, this embodiment does not limit the specific implementation method for obtaining the dynamic features of the product to be predicted. In some instances, the dynamic features can be stored in a preset area, and when information prediction is needed, the dynamic features of the product to be predicted can be obtained by accessing the preset area. Alternatively, the dynamic features can be stored in a third device, and when information prediction is needed, the dynamic features of the product to be predicted can be obtained actively or passively through the third device. In other instances, the dynamic features can be obtained through user input operations. In this case, the information prediction device can display an interactive interface to obtain the feature configuration operations input by the user in the interactive interface, and the dynamic features of the product to be predicted can be obtained based on the feature configuration operations. Of course, those skilled in the art can also use other methods to obtain the dynamic features of the product to be predicted, as long as the accuracy and reliability of obtaining the dynamic features can be guaranteed, which will not be elaborated here.
[0063] Furthermore, the information prediction operation can be initiated by the user. In this case, the information prediction device can receive the user's initiated information prediction request and then obtain the dynamic characteristics of the product to be predicted based on the information prediction request. Alternatively, the information prediction operation can be automatically executed by the sales pre-store device. In this case, the information prediction device is pre-configured with an information prediction cycle (once per month, once per quarter, once per two quarters, etc.), and then actively generates an information prediction request based on the information prediction cycle, and can trigger the corresponding information prediction operation based on the information prediction request.
[0064] Step S202: Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features.
[0065] After obtaining the dynamic features, since the dynamic features include activity features corresponding to historical time points and future time points, while the behavioral features only correspond to historical time points, in order to make the physical meanings of the various features used for information prediction consistent, the activity features can be divided into historical sequence features and future sequence features according to time points. The historical sequence features correspond to historical time points, and the future sequence features correspond to future time points.
[0066] For example, when an activity feature corresponds to a time period [tn, t+n], the activity feature can include features corresponding to any moment within that time period. For instance, the activity feature could include feature a corresponding to moment tn, feature b corresponding to moment t-1, feature c corresponding to moment t, and feature d corresponding to moment t+1. For the current moment t, moments t-1 and tn are historical moments, while moment t+1 is a future moment. Therefore, historical sequence features can be determined based on features a and b, obtained by concatenating features a and b. Similarly, since moment t+1 is a future moment, the current moment can be treated as a future moment during calculation. Therefore, future sequence features can be determined based on features c and d, obtained by concatenating features c and d.
[0067] It should be noted that for dynamic features, the time information corresponding to the dynamic features can be regarded as continuous to a certain extent. However, not all moments will correspond to features with actual or physical meaning. When there is no feature with actual or physical meaning at a certain moment, the feature corresponding to that moment can be marked as null.
[0068] Step S203: Determine the historical sequence features as key vectors corresponding to the self-attention mechanism, determine the future sequence features as query vectors corresponding to the self-attention mechanism, and determine the behavioral features as value vectors corresponding to the self-attention mechanism.
[0069] After obtaining historical sequence features, future sequence features, and behavioral features, based on the principle of attention mechanism calculation, in order to achieve the prediction of future behavior by calculating the similarity between future features and historical features and weighting historical behavioral features based on similarity, the historical sequence features can be determined as the key vector corresponding to the self-attention mechanism, the future sequence features can be determined as the query vector corresponding to the self-attention mechanism, and the behavioral features can be determined as the value vector corresponding to the self-attention mechanism. This ensures that the query vector and key vector originate from the same feature source, and that the physical meanings of the query vector, key vector, and value vector are consistent or aligned.
[0070] Step S204: Based on the query vector, key vector, and value vector, perform information prediction to obtain prediction information corresponding to the product to be predicted.
[0071] After obtaining the query vector, key vector, and value vector, they can be analyzed and processed to perform information prediction operations, thereby obtaining prediction information corresponding to the product to be predicted. Specifically, information prediction operations can include sales prediction, production prediction, quality prediction, etc. This embodiment does not limit the specific implementation method of information prediction. In some instances, information prediction operations can be performed automatically using a pre-trained network model. In this case, information prediction based on the query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted can include: obtaining a pre-trained network model, which can be trained using a deep learning model based on a self-attention mechanism, such as a transformer network; then inputting the query vector, key vector, and value vector into the network model; thereby obtaining the prediction information output by the network model corresponding to the product to be predicted. The time information corresponding to this prediction information corresponds to the future time point corresponding to the future sequence features.
[0072] In other instances, information prediction operations can be obtained by analyzing and processing query vectors, key vectors, and direct sales using a self-attention algorithm. In this case, information prediction based on query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted may include: performing self-attention calculations on query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted.
[0073] The principle of self-attention computation can be summarized as follows: by calculating the similarity between future features and historical features, historical behavioral features are weighted based on similarity to obtain predictions of future behavior. Specifically, based on the above implementation principle, the similarity between each key vector and the query vector can be queried first. Based on the aforementioned similarity, a weighted aggregation operation is performed on the value vectors to obtain prediction information. Since the feature dimensions and physical meanings of the query vector, key vector, and value vector are consistent, the accuracy of similarity calculation is effectively improved. Thus, relatively accurate information prediction operations can be achieved based on similarity.
[0074] The information prediction method provided in this embodiment obtains the dynamic characteristics of the product to be predicted, determines historical sequence features corresponding to historical time points and future sequence features corresponding to future time points based on the activity features, then determines the historical sequence features as key vectors, the future sequence features as query vectors, and the behavioral features as value vectors, and performs information prediction based on the query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted. This effectively achieves feature alignment during information prediction operations by configuring the query vectors and key vectors with unified source features, thus effectively improving the accuracy of prediction information. After obtaining the prediction information, users can manage, maintain, schedule, and generate related plans based on the prediction information, which helps reduce inventory risk and increase potential revenue, thereby improving the practicality of the method and facilitating its market promotion and application.
[0075] Figure 3 This application provides a flowchart illustrating the process of determining historical sequence features corresponding to historical time points and future sequence features corresponding to future time points within the activity characteristics provided in this embodiment; based on the above embodiment, refer to the appendix. Figure 3 As shown, besides directly determining historical and future sequence features based on time information, more accurate historical and future sequence features can be determined by combining context. In this case, determining the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features can include:
[0076] Step S301: Determine the fusion features with context based on the activity features, and the time points of the fusion features correspond one-to-one with the time points of the activity features.
[0077] In this context, since fused features refer to activity features integrated with context, and their corresponding time points correspond one-to-one with the time points of the activity features, fused features can more accurately represent the relevant information of the product to be predicted compared to activity features. Furthermore, this embodiment does not limit the specific method of obtaining fused features; those skilled in the art can set it according to specific application scenarios or application requirements. In some instances, fused features can be obtained based on activity features and their corresponding context. In this case, determining fused features with context based on activity features may include: obtaining the context features corresponding to the activity features; and fusing the activity features and context features to obtain the fused features.
[0078] In other instances, besides obtaining fused features based on activity features and context features, this embodiment can also analyze and process activity features using a preset weight matrix to obtain fused features. In this case, determining fused features with context based on activity features may include: obtaining a randomly initialized weight matrix, which includes learnable parameters; generating an initial query vector, an initial key vector, and an initial value vector based on the weight matrix and activity features; and determining the fused features based on the initial query vector, the initial key vector, and the initial value vector.
[0079] For activity features, a weight matrix is randomly initialized. This weight matrix can include multiple learnable parameters. Specifically, the vector dimension of the weight matrix can be determined based on the vector representation dimension of the activity features. Generally, the vector dimension of the weight matrix is consistent with the vector representation dimension of the activity features. To accurately obtain the fused features, after obtaining the activity features, a randomly initialized weight matrix can be obtained based on the activity features. This weight matrix can be a pre-configured matrix stored in a preset area, in which case the weight matrix can be obtained by accessing the preset area; alternatively, the weight matrix can be stored in a third device, in which case the weight matrix can be obtained actively or passively through the third device; still other options are to generate the weight matrix randomly or automatically based on the activity features.
[0080] After obtaining the weight matrix, initial query vectors, initial key vectors, and initial value vectors can be generated based on the weight matrix and activity features. Specifically, the weight matrix and activity features can be multiplied to accurately obtain the initial query vectors, initial key vectors, and initial value vectors. After obtaining the initial query vectors, initial key vectors, and initial value vectors, they can be analyzed to determine the fusion features. In some instances, the fusion features can be obtained by analyzing the initial query vectors, initial key vectors, and initial value vectors using a pre-trained network model. In this case, determining the fusion features based on the initial query vectors, initial key vectors, and initial value vectors can include: obtaining a pre-trained network model for determining the fusion features, and then inputting the initial query vectors, initial key vectors, and initial value vectors into the network model to stably obtain the fusion features output by the network model.
[0081] In other instances, the fused features can be obtained by analyzing and processing the initial query vector, initial key vector, and initial value vector using a self-attention algorithm. In this case, determining the fused features based on the initial query vector, initial key vector, and initial value vector can include performing self-attention calculations based on the initial query vector, initial key vector, and initial value vector to obtain the fused features, which also ensures the accuracy and reliability of obtaining the fused features.
[0082] Step S302: Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points based on the fusion features.
[0083] Since activity features correspond to historical and future time points, and the time points of fusion features correspond one-to-one with the time points of activity features, fusion features also correspond to historical and future time points. In order to better perform information prediction operations, the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points can be determined based on the time features corresponding to the fusion features. This effectively realizes the acquisition of future and historical sequence features by combining contextual information, improving the accuracy and reliability of acquiring future and historical sequence features.
[0084] In this embodiment, fused features with context are determined based on activity features. Then, historical sequence features corresponding to historical time points and future sequence features corresponding to future time points are determined based on the fused features. This effectively realizes the acquisition of historical sequence features and future sequence features by combining contextual information, improves the accuracy and reliability of acquiring future sequence features and historical sequence features, and helps to improve the accuracy of information prediction.
[0085] Figure 4 This application provides a flowchart illustrating the process of obtaining predictive information corresponding to the product to be predicted based on query vectors, key vectors, and value vectors in an embodiment of this application. Based on the above embodiments, refer to the appendix... Figure 4 As shown, since the information prediction effect of goods with different attributes and from different industries will vary, that is, the static characteristics of the product will also affect the information prediction operation, in order to further improve the accuracy of information prediction, this embodiment provides an implementation method that combines static and dynamic characteristics to perform information prediction operation. In this case, information prediction based on query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted may include:
[0086] Step S401: Obtain the static features of the product to be predicted. The static features will not change over time.
[0087] For any e-commerce product, in order to better understand the sales performance or promotion effect, relevant data is often recorded during the sales or promotion process. This data can include not only dynamic features that have a significant impact on sales, but also static features that have some impact on sales. Static features refer to features that do not change over time. For example, static features can include product name, product identity document (ID) information, product attributes, product category, merchant level, merchant ID information, merchant attributes, etc.
[0088] Because the predictive effectiveness of product information varies across different attributes and industries—for example, in the food category, the predictive effectiveness of meat products differs from that of snack foods—the main reason for this difference lies in the different learnable parameters in the network models trained for products with different attributes. Similarly, in the clothing category, the predictive effectiveness of outerwear differs from that of down jackets; in the electronics category, the predictive effectiveness of computers differs from that of mobile phones. Furthermore, even within the same attribute, the predictive effectiveness of product information can differ between merchants of different levels. For instance, in the food category, the predictive effectiveness of meat products from medium to large-sized merchants differs from that from small-sized merchants; in the clothing category, the predictive effectiveness of outerwear from 1-star merchants differs from that from 3-star merchants, and so on.
[0089] Therefore, in order to perform information prediction operations on the product to be predicted more accurately, the static characteristics of the product to be predicted can be obtained. The specific method of obtaining the static characteristics is similar to that of obtaining the dynamic characteristics mentioned above, and can be referred to the above description, which will not be repeated here.
[0090] Step S402: Based on static features, query vector, key vector and value vector, perform information prediction to obtain prediction information corresponding to the product to be predicted.
[0091] After obtaining static features, information prediction operations can be performed by combining static features, query vectors, key vectors, and value vectors to obtain relatively accurate prediction information. In some instances, information prediction operations can be performed automatically using a pre-trained network model. In this case, information prediction based on static features, query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted can include: obtaining a pre-trained network model, which can be trained using a deep learning model based on a self-attention mechanism, the transformer network; inputting static features, query vectors, key vectors, and value vectors into the network model; and obtaining the prediction information output by the network model corresponding to the product to be predicted. The time information corresponding to this prediction information corresponds to the future time point corresponding to the future sequence features.
[0092] In other instances, prediction operations can be performed separately based on static features and dynamic features, and then the results of these prediction operations can be fused to obtain the final prediction information corresponding to the product to be predicted. In this case, information prediction based on static features, query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted can include: performing information prediction based on query vectors, key vectors, and value vectors to obtain first prediction information corresponding to the product to be predicted; performing information prediction based on static features to obtain second prediction information corresponding to the product to be predicted; and determining the prediction information corresponding to the product to be predicted based on the first and second prediction information.
[0093] The specific implementation method and effect of "performing information prediction based on query vector, key vector, and value vector to obtain the first prediction information corresponding to the product to be predicted" are similar to the specific implementation method and effect of the information prediction operation in the above embodiments. Please refer to the above statements for details, which will not be repeated here. Similarly, the specific implementation method and effect of "performing information prediction based on static features to obtain the second prediction information corresponding to the product to be predicted" and "performing information prediction based on query vector, key vector, and value vector to obtain the first prediction information corresponding to the product to be predicted" are similar to the specific implementation method and effect of the information prediction operation in the above embodiments. Please refer to the above statements for details, which will not be repeated here.
[0094] After obtaining the first and second prediction information, the first and second prediction information can be analyzed and processed to determine the prediction information corresponding to the product to be predicted. In some instances, determining the prediction information corresponding to the product to be predicted based on the first and second prediction information may include: integrating the first and second prediction information to obtain the prediction information corresponding to the product to be predicted.
[0095] The second predictive information is often expressed as quantitative or numerical information (e.g., product sales volume, product output, product quality score, etc.), while the first predictive information can have different forms of expression. For example, the first predictive information can be expressed as quantitative or numerical information, or it can be expressed as a parameter affecting the second predictive information. Specifically, different attributes of the first predictive information can correspond to different integration methods. Therefore, in order to accurately integrate the first and second predictive information, after obtaining the first and second predictive information, we can first identify the attribute information of the first predictive information, then determine the implementation method for integrating the first and second predictive information based on the attribute information, and finally integrate the first and second predictive information based on the determined implementation method to obtain the predicted information.
[0096] In some instances, when both the first and second prediction information are quantitative or numerical information, integrating them to obtain prediction information corresponding to the product to be predicted can include: summing the first and second prediction information to obtain the prediction information corresponding to the product to be predicted. In this case, the prediction information = first prediction information + second prediction information. The first prediction information can be a value greater than 0, less than 0, or equal to 0. When the first prediction information is greater than 0, it indicates that the static feature has a positive impact on the prediction information obtained from the dynamic sequence; when the first prediction information is less than 0, it indicates that the static feature has a negative impact on the prediction information obtained from the dynamic sequence; when the first prediction information is equal to 0, it indicates that the static feature has no impact on the prediction information obtained from the dynamic sequence, and the prediction information in this case is equal to the second prediction information.
[0097] In some other instances, when the first prediction information is represented as an influence parameter on the second prediction information, integrating the first and second prediction information to obtain prediction information corresponding to the product to be predicted may include: multiplying the first and second prediction information to obtain prediction information corresponding to the product to be predicted. In this case, the prediction information = first prediction information * second prediction information. The first prediction information can be a non-zero percentage, which can be greater than 1 or less than 1. When the first prediction information is greater than 1, it indicates that the static feature can have a positive influence on the prediction information obtained from the dynamic sequence; when the first prediction information is less than 1, it indicates that the static feature can have a negative influence on the prediction information obtained from the dynamic sequence.
[0098] In this embodiment, by acquiring the static features of the product to be predicted, and then performing information prediction based on the static features, query vector, key vector, and value vector, relatively accurate prediction information corresponding to the product to be predicted can be obtained. Since this prediction information is obtained by combining static and dynamic features, the obtained prediction information is more accurate. Then, based on the more accurate prediction information, production can be reasonably arranged and production and sales plans can be reasonably formulated on the manufacturing side, while merchants can appropriately set marketing plans on the sales side, further improving the accuracy and reliability of the method.
[0099] In practical applications, this embodiment provides an information prediction method applicable to digital factories. This method enables intelligent management of products produced in digital factories and helps plan production. Specifically, after obtaining relevant predictive information about the products, the digital factory can be flexibly adjusted and controlled based on this information to achieve intelligent manufacturing. (See attached document.) Figure 5 As shown, taking e-commerce apparel products as the product to be predicted, behavioral characteristics as behavioral characteristics, and activity characteristics as activity characteristics as activity characteristics, this application embodiment provides a sales forecasting method. This sales forecasting method may include the following steps:
[0100] Step 1: Obtain the static and dynamic features of e-commerce apparel products.
[0101] For e-commerce apparel products, features can be categorized into static and dynamic features based on whether they change over time. Static features can include inherent attributes corresponding to the product or merchant, such as the product ID, product category, merchant ID, merchant category, and merchant rating. Dynamic features can be further divided into two categories: behavioral features, which relate to user behavior such as purchasing and browsing, and correspond only to historical points in time; and event features, which relate to marketing activities and are often planned in advance, and therefore correspond to both historical and future points in time. Thus, for dynamic features, the historical time-series feature dimension is greater than the future time-series feature dimension.
[0102] Step 2: Obtain the weight matrix used to process the activity features, and perform self-attention calculation on the activity features based on the weight matrix to obtain the model's latent vectors.
[0103] Specifically, the weight matrix can be a randomly initialized matrix containing multiple learnable parameters. After obtaining the weight matrix, it can be multiplied with the activity features to obtain the query vector (Q), key vector (K), and value vector (V). Then, a multi-head attention network is obtained to analyze and process the query vector, key vector, and value vector. The multi-head attention network can include 16 heads and can handle parameters with a dimension of 512. After obtaining the query vector, key vector, and value vector, they can be input into the multi-head attention network for a self-attention calculation to obtain the corresponding model latent vector. The model latent vector is the activity feature after fusing the context, and the time point of the model latent vector corresponds one-to-one with the time point of the activity feature.
[0104] Step 3: Obtain the first vector sequence corresponding to future time points and the second vector sequence corresponding to historical time points from the model's latent vectors. Use the first vector sequence as the new query vector query1(Q1), the second vector sequence as the new key vector key1(K1), and the behavioral features that only correspond to historical time points as the new value vector value1(V1). Then, perform self-attention calculation on the new query vector Q1, the new key vector K1, and the new value vector V1 to obtain component prediction information 1.
[0105] At this point, for the new query vector Q1 and the new key vector K1, Q1 and K1 have the same physical meaning when calculating the similarity between Q1 and K1. Specifically, performing self-attention calculation on the new query vector Q1, the new key vector K1, and the new value vector V1 to obtain component prediction information may include: obtaining a multi-head attention network for implementing sales prediction operations, wherein the multi-head attention network may include 16 heads and can handle parameters of 512 dimensions; after obtaining the new query vector Q1, the new key vector K1, and the new value vector V1, the new query vector Q1, the new key vector K1, and the new value vector V1 can be input into the multi-head attention network for a self-attention calculation to obtain component prediction information 1.
[0106] Step 4: Perform sales forecasting based on static features to obtain component forecasting information 2.
[0107] Specifically, a network model for sales prediction based on static features is pre-trained. After obtaining the static features, the static features are input into the network model to obtain component prediction information.
[0108] Step 5: Based on component prediction information 1 and component prediction information 2, determine the target predicted sales volume of e-commerce apparel products.
[0109] In some instances, the target predicted sales volume = component predicted information 1 + component predicted information 2. Alternatively, in other instances, the target predicted sales volume = component predicted information 1 * component predicted information 2. Or, in still other instances, the target predicted sales volume = component predicted information 1.
[0110] The technical solution provided in this application embodiment proposes a Transformer-based temporal prediction network structure to address the inconsistency in feature dimensions between historical and future time points in temporal input. Specifically, the implementation principle of this technical solution is as follows: by calculating the similarity between future features and historical features, historical behavioral features are weighted based on similarity to obtain predictions of future behaviors. Therefore, the consistency between feature dimensions and physical meaning determines the accuracy of similarity calculation. Based on the above implementation principle, this time-series prediction network structure does not require directly reducing the dimensionality of historical and future time-series inputs with different feature dimensions to vectors of the same dimension before calculating similarity. Instead, it improves the accuracy of similarity by adjusting the sources of query, key, and value vectors to ensure that the feature dimensions and physical meaning represented by the vectors are consistent when calculating similarity. Specifically, by modifying the query, key, and value vectors in the attention-based Transformer network, features that exist in both historical and future time series are used as the source of query and key, while features that exist only in the history are used as the source of value. This ensures that features are naturally aligned during attention calculation, which can effectively improve the accuracy of sales prediction. Furthermore, after obtaining a relatively accurate predicted sales volume, production arrangement and scheduling operations can be carried out based on the predicted sales volume, further improving the practicality of the technical solution and facilitating market promotion and application.
[0111] Figure 6 This is a schematic diagram of the structure of an information prediction device provided in an embodiment of this application; see attached drawing. Figure 6 As shown, this embodiment provides an information prediction device for performing the above-described... Figure 2 The information prediction method shown, specifically, the information prediction device may include:
[0112] The first acquisition module 11 is used to acquire the dynamic characteristics of the product to be predicted. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0113] The first determining module 12 is used to determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features;
[0114] The first determining module 12 is used to determine the historical sequence features as key vectors corresponding to the self-attention mechanism, the future sequence features as query vectors corresponding to the self-attention mechanism, and the behavioral features as value vectors corresponding to the self-attention mechanism.
[0115] The first processing module 13 is used to perform information prediction based on query vector, key vector and value vector to obtain prediction information corresponding to the product to be predicted.
[0116] In some instances, when the first determining module 12 determines the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features, the first determining module 12 is used to perform: determining fused features with context based on the activity features, wherein the time points of the fused features correspond one-to-one with the time points of the activity features; and determining the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points based on the fused features.
[0117] In some instances, when the first determining module 12 determines the fused features with context based on the activity features, the first determining module 12 is used to perform: obtaining a randomly initialized weight matrix, which includes learnable parameters; generating an initial query vector, an initial key vector, and an initial value vector based on the weight matrix and the activity features; and determining the fused features based on the initial query vector, the initial key vector, and the initial value vector.
[0118] In some instances, when the first determining module 12 determines the fusion features based on the initial query vector, initial key vector, and initial value vector, the first determining module 12 is used to perform: self-attention calculation based on the initial query vector, initial key vector, and initial value vector to obtain the fusion features.
[0119] In some instances, when the first processing module 13 performs information prediction based on the query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted, the first processing module 13 is used to perform: self-attention calculation on the query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted.
[0120] In some instances, behavioral characteristics include at least one of the following: product purchase behavior, product browsing behavior, product search behavior; activity characteristics include at least one of the following: product marketing activities, product promotion activities, product operation activities.
[0121] In some instances, when the first processing module 13 performs information prediction based on the query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted, the first processing module 13 is used to perform: obtaining the static features of the product to be predicted, which do not change over time; and performing information prediction based on the static features, query vector, key vector, and value vector to obtain prediction information corresponding to the product to be predicted.
[0122] In some instances, when the first processing module 13 performs information prediction based on static features, query vectors, key vectors, and value vectors to obtain prediction information corresponding to the product to be predicted, the first processing module 13 is used to perform: information prediction based on query vectors, key vectors, and value vectors to obtain first prediction information corresponding to the product to be predicted; information prediction operation based on static features to obtain second prediction information corresponding to the product to be predicted; and prediction information corresponding to the product to be predicted based on the first prediction information and the second prediction information.
[0123] In some instances, when the first processing module 13 determines the prediction information corresponding to the product to be predicted based on the first prediction information and the second prediction information, the first processing module 13 is used to perform: integrating the first prediction information and the second prediction information to obtain the prediction information corresponding to the product to be predicted.
[0124] Figure 6 The device shown can perform Figures 1-5 For the methods shown in the embodiments, the parts not described in detail in this embodiment can be referred to the following: Figures 1-5 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figures 1-5 The descriptions in the illustrated embodiments will not be repeated here.
[0125] In one possible design, Figure 6 The structure of the information prediction device shown can be implemented as an electronic device, which can be various devices such as mobile phones, tablets, and servers. Figure 7 As shown, the electronic device may include a first processor 21 and a first memory 22. The first memory 22 is used to store data executed by the corresponding electronic device. Figures 1-5 In the information prediction method program provided in the illustrated embodiment, the first processor 21 is configured to execute the program stored in the first memory 22.
[0126] The program includes one or more computer instructions, wherein when executed by the first processor 21, the one or more computer instructions can perform the following steps:
[0127] Obtain the dynamic characteristics of the product to be predicted. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0128] Identify the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity characteristics;
[0129] Historical sequence features are defined as key vectors corresponding to the self-attention mechanism, future sequence features are defined as query vectors corresponding to the self-attention mechanism, and behavioral features are defined as value vectors corresponding to the self-attention mechanism.
[0130] Information prediction is performed based on query vectors, key vectors, and value vectors to obtain predictive information corresponding to the product to be predicted.
[0131] Furthermore, the first processor 21 is also used to perform the aforementioned Figures 1-5 All or part of the steps in the illustrated embodiments.
[0132] The structure of the electronic device may also include a first communication interface 23 for communication between the electronic device and other devices or communication networks.
[0133] In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used by an electronic device, which includes instructions for executing the above-described... Figures 1-5 The procedure involved in the information prediction method in the illustrated embodiment.
[0134] Furthermore, this embodiment discloses a computer program product comprising: a computer program that, when executed by a processor of an electronic device, causes the processor to perform the aforementioned... Figures 1-5 The information prediction method is shown in the embodiment of the method.
[0135] Figure 8 A flowchart illustrating a method for predicting clothing sales volume provided in this application embodiment; see attached document. Figure 8 As shown, this embodiment provides a method for predicting clothing sales. The execution entity of this method can be a clothing sales prediction device, which can be software or a combination of software and hardware. Specifically, the method for predicting clothing sales may include the following steps:
[0136] Step S801: Obtain the dynamic characteristics of the clothing product, including: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points;
[0137] Step S802: Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features;
[0138] Step S803: Determine the historical sequence features as key vectors corresponding to the self-attention mechanism, determine the future sequence features as query vectors corresponding to the self-attention mechanism, and determine the behavioral features as value vectors corresponding to the self-attention mechanism.
[0139] Step S804: Based on the query vector, key vector, and value vector, perform information prediction to obtain prediction information corresponding to the clothing products.
[0140] In this embodiment, the specific implementation process and effects of each step are the same as those described above. Figure 2 The specific implementation process and effects of the steps in the illustrated embodiments are similar, and can be referred to the above description for details, which will not be repeated here.
[0141] In addition, this embodiment may also include the above-mentioned Figures 1-5 Other method steps in the illustrated embodiment, and parts not described in detail in this embodiment, can be found in the [reference needed]. Figures 1-5 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figures 1-5 The descriptions in the illustrated embodiments will not be repeated here.
[0142] Figure 9 A schematic diagram of a clothing sales forecasting device provided in this application embodiment; see attached drawing. Figure 9 As shown, this embodiment provides a clothing sales forecasting device, which is used to perform the above-described... Figure 8 The method for predicting clothing sales, as shown, specifically includes a device that can include:
[0143] The second acquisition module 31 is used to acquire the dynamic characteristics of the clothing product. The dynamic characteristics include: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points.
[0144] The second determining module 32 is used to determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features;
[0145] The second determining module 32 is also used to determine the historical sequence features as key vectors corresponding to the self-attention mechanism, determine the future sequence features as query vectors corresponding to the self-attention mechanism, and determine the behavioral features as value vectors corresponding to the self-attention mechanism.
[0146] The second processing module 33 is used to perform information prediction based on query vector, key vector and value vector to obtain prediction information corresponding to clothing products.
[0147] Figure 9 The device shown can perform Figure 8 For the methods shown in the embodiments, the parts not described in detail in this embodiment can be referred to the following: Figure 8 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figure 8 The descriptions in the illustrated embodiments will not be repeated here.
[0148] In one possible design, Figure 9 The structure of the clothing sales forecasting device shown can be implemented as an electronic device, which can be various devices such as mobile phones, tablets, and servers. Figure 10 As shown, the electronic device may include a second processor 41 and a second memory 42. The second memory 42 is used to store data executed by the corresponding electronic device. Figure 8 In the illustrated embodiment, the program for predicting clothing sales is provided, wherein the second processor 41 is configured to execute the program stored in the second memory 42.
[0149] The program includes one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, can perform the following steps:
[0150] The dynamic characteristics of clothing products are obtained, including behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to both historical and future time points.
[0151] Identify the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity characteristics;
[0152] Historical sequence features are defined as key vectors corresponding to the self-attention mechanism, future sequence features are defined as query vectors corresponding to the self-attention mechanism, and behavioral features are defined as value vectors corresponding to the self-attention mechanism.
[0153] Information prediction is performed based on query vectors, key vectors, and value vectors to obtain predictive information corresponding to clothing products.
[0154] Furthermore, the second processor 41 is also used to perform the aforementioned Figure 8 All or part of the steps in the illustrated embodiments.
[0155] The structure of the electronic device may also include a second communication interface 43 for communication between the electronic device and other devices or communication networks.
[0156] In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used by an electronic device, which includes instructions for executing the above-described... Figure 8 The procedure involved in the method for predicting clothing sales in the illustrated embodiment.
[0157] Furthermore, this embodiment discloses a computer program product comprising: a computer program that, when executed by a processor of an electronic device, causes the processor to perform the aforementioned... Figure 8 The method shown in the embodiment is a method for predicting clothing sales.
[0158] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. This application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions may also be loaded onto a computer or other programmable device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0165] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An information prediction method, characterized in that, include: The dynamic characteristics of the product to be predicted are obtained, including: behavioral characteristics corresponding to historical time points, and activity characteristics corresponding to historical time points and future time points. Determine the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features; The historical sequence features are determined as key vectors corresponding to the self-attention mechanism, the future sequence features are determined as query vectors corresponding to the self-attention mechanism, and the behavioral features are determined as value vectors corresponding to the self-attention mechanism. Information prediction is performed based on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted. The determination of the historical sequence features corresponding to historical time points and the future sequence features corresponding to future time points in the activity features includes: Based on the activity features, contextualized fusion features are determined, and the time points of the fusion features correspond one-to-one with the time points of the activity features; Based on the fusion features, historical sequence features corresponding to historical time points and future sequence features corresponding to future time points are determined.
2. The method according to claim 1, characterized in that, Based on the activity features, context-aware fusion features are determined, including: Obtain a randomly initialized weight matrix, which includes learnable parameters; Based on the weight matrix and the activity features, an initial query vector, an initial key vector, and an initial value vector are generated. The fusion features are determined based on the initial query vector, initial key vector, and initial value vector.
3. The method according to claim 2, characterized in that, Based on the initial query vector, initial key vector, and initial value vector, the fusion features are determined, including: Self-attention calculation is performed based on the initial query vector, initial key vector, and initial value vector to obtain the fused features.
4. The method according to claim 1, characterized in that, Information prediction is performed based on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted, including: Self-attention calculation is performed on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted.
5. The method according to claim 1, characterized in that, The behavioral characteristics include at least one of the following: product purchase behavior, product browsing behavior, and product search behavior; The activity features include at least one of the following: product marketing activities, product promotion activities, and product operation activities.
6. The method according to claim 1, characterized in that, Information prediction is performed based on the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted, including: Obtain the static characteristics of the product to be predicted, which do not change over time; Information prediction is performed based on the static features, the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted.
7. The method according to claim 6, characterized in that, Information prediction is performed based on the static features, the query vector, the key vector, and the value vector to obtain prediction information corresponding to the product to be predicted, including: Information prediction is performed based on the query vector, the key vector, and the value vector to obtain first prediction information corresponding to the product to be predicted. Based on the static features, an information prediction operation is performed to obtain second prediction information corresponding to the product to be predicted. Based on the first prediction information and the second prediction information, prediction information corresponding to the product to be predicted is determined.
8. The method according to claim 7, characterized in that, Based on the first prediction information and the second prediction information, prediction information corresponding to the product to be predicted is determined, including: The first prediction information and the second prediction information are integrated to obtain prediction information corresponding to the product to be predicted.
9. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the information prediction method as described in any one of claims 1-8.
10. A computer storage medium, characterized in that, Used to store computer programs that, when executed by a computer, implement the information prediction method as described in any one of claims 1-8.
Citation Information
Patent Citations
Product sales prediction method and device, storage medium and electronic equipment
CN112330358A
Service prediction method and device
CN113469399A