Consumer demand prediction method and device, medium and product

By constructing behavioral link data sets and using base models for training, the efficiency and accuracy of consumer demand prediction in the e-commerce environment with limited computing resources is solved, and efficient and accurate demand prediction is achieved.

CN120146907APending Publication Date: 2025-06-13HANGZHOU DIANZI UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510213233.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

It is difficult for the existing technology to achieve efficient and accurate consumer demand forecasts in the e-commerce environment, especially when computing resources are limited.

Method used

By obtaining consumer behavior datasets, building behavior link datasets, and using dock models (including teacher models and student models) to predict consumer demand. This method includes data preprocessing, behavioral link construction and model training, which enables high-quality consumer demand prediction in a low-resource environment.

Benefits of technology

Improves the accuracy of consumer demand forecasting, reduces computing resource consumption, and enables real-time prediction on low-resource devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146907A_ABST
    Figure CN120146907A_ABST
Patent Text Reader

Abstract

The invention discloses a consumer demand prediction method and device, a medium and a product, and relates to the technical field of language processing, and the method comprises the steps: obtaining a consumer behavior data set, constructing behavior links according to the consumer behavior data set, obtaining a behavior link data set according to all behavior links, and predicting the consumer demand according to the behavior link data set. And training a base model according to the obtained behavior link data set, and obtaining a consumer demand prediction result by adopting the trained base model according to the behavior link of the consumer demand. The consumer demand prediction accuracy can be improved, and the computing resource consumption can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of language processing, and particularly to a method, device, medium and product for predicting consumer demand. Background Art

[0002] In the context of the rapid growth of the data volume and complexity of e-commerce platforms, enterprises have put forward higher requirements for efficient and accurate prediction of consumer demand; and the user behavior patterns of different consumer goods types (such as clothing, electronic products, food) have significant differences. Therefore, how to improve the accuracy of predicting user consumption demand, and then be able to accurately improve the push behavior of enterprises to consumers, is an urgent problem to be solved now.

[0003] In recent years, deep learning models, especially large language models (such as BERT, GPT, etc.), have made remarkable progress in multiple fields. These large models have powerful language understanding and generation capabilities, and can automatically learn rich knowledge and patterns from a large amount of unstructured text data, and are widely used in fields such as natural language processing and recommendation systems.

[0004] However, although large language models can provide extremely high accuracy and powerful reasoning capabilities, their training and reasoning processes often require a large amount of computing resources and storage space, which may be difficult to meet the needs of real-time prediction and low-resource devices in the actual e-commerce environment.

[0005] Therefore, due to the deficiencies of the existing technology, there is an urgent need to provide a new method for predicting consumer demand, which can improve the accuracy of predicting consumer demand and reduce the consumption of computing resources. Summary of the Invention

[0006] The purpose of the present application is to provide a method, device, medium and product for predicting consumer demand, which can improve the accuracy of predicting consumer demand and reduce the consumption of computing resources.

[0007] To achieve the above object, the present application provides the following solutions:

[0008] In the first aspect, the present application provides a method for predicting consumer demand, including:

[0009] Obtain a consumer behavior data set; the consumer behavior data set includes: consumer ID, behavior type, platform name, commodity information, timestamp and page stay duration; the behavior type includes: browsing behavior, search behavior, adding to shopping cart behavior and purchasing behavior; the commodity information includes: commodity name, commodity category and commodity brand;

[0010] Construct a behavior link based on the consumer behavior dataset, and obtain a behavior link dataset according to all the behavior links; the behavior link is the sequence between different behavior types of consumers; the behavior link dataset includes: consumer ID, product information, behavior link, and timestamp of behavior occurrence.

[0011] Train the base model according to the behavior link dataset; the base model includes: a teacher model and a student model.

[0012] Obtain the consumer demand prediction result by using the trained base model according to the behavior link of consumer demand.

[0013] Optionally, after obtaining the consumer behavior dataset, it further includes:

[0014] Preprocess the consumer behavior dataset; the preprocessing includes: eliminating invalid records and eliminating noise data.

[0015] Optionally, the step of constructing a behavior link according to the consumer behavior dataset and obtaining a behavior link dataset specifically includes:

[0016] Sort the behavior types of consumers in the consumer behavior dataset by timestamp, and connect the behaviors of each consumer as behavior nodes; the behavior nodes include: user browsing products, user searching for products, adding to cart, and purchasing products.

[0017] Group the links after connecting the behavior nodes of consumers by product category.

[0018] Use a stage threshold to limit the length of the grouped links to obtain a behavior link.

[0019] Optionally, the step of training the base model according to the behavior link dataset specifically includes:

[0020] Train the teacher model according to the product information and behavior link in the behavior link dataset to obtain a trained teacher model; the trained teacher model is used to output an answer and an explanation of the answer; the answer includes: product information to be pushed to consumers; the explanation of the answer is the reason for pushing the corresponding product information to consumers.

[0021] Determine a new behavior link dataset according to the product information, behavior link in the behavior link dataset, and the answer and explanation of the answer output by the trained teacher model; and use the new behavior link dataset to train the student model to obtain a trained student model; the trained student model is used to output the consumer demand prediction result.

[0022] Optionally, the trained teacher model specifically includes:

[0023] Use the formula Interp, AnswerTEA = TEA(P, S) to determine the output of the trained teacher model;

[0024] Among them, Interp is the explanation of the answer output by the teacher model, P is the commodity information, S is the behavior link, TEA is the teacher model, and AnswerTEA is the answer output by the teacher model.

[0025] Optionally, the trained student model specifically includes:

[0026] Use the formula Rationtext, Elabel = STU(Data) to determine the consumer demand prediction result;

[0027] Among them, STU is the student model, Data is the new behavior link data set, Rationtext is the explanation of the answer output by the student model, and Elabel is the answer output by the student model.

[0028] Optionally, the loss function of the trained student model is a multi-task loss function:

[0029] lossInterp = θ(STU(xi), Interp);

[0030] lossAnswer = θ(STU(xi), Answer);

[0031] loss = α * lossAnswer + β * lossInterp;

[0032] Among them, lossAnswer is the loss function value of consumer demand prediction, lossInterp is the loss function value of the explanation output by the student model, α and β are both parameter coefficients, θ is the loss function, loss is the loss function value based on lossAnswer and lossInterp, STU is the small model, xi is the new behavior link data set, Interp is the explanation output by the teacher model, and Answer is the explanation answer output by the teacher model.

[0033] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the consumer demand prediction method described above.

[0034] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the consumer demand prediction method described above are implemented.

[0035] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the consumer demand prediction method described above are implemented.

[0036] According to the specific embodiments provided by the present application, the present application has the following technical effects:

[0037] The present application provides a consumer demand prediction method, device, medium and product. By constructing a behavior link according to the consumer behavior data set, obtaining a behavior link data set according to all the behavior links, and training a base model according to the behavior link data set, the accuracy of consumer demand prediction can be improved. According to the behavior link of consumer demand, using the trained base model to obtain the consumer demand prediction result can solve the problem of text content generation in the low-resource situation with high quality, and realize a new exploration of the consumer demand prediction method. By training the base model with the behavior link data set and obtaining the consumer demand prediction result according to the behavior link of consumer demand and the trained base model, the accuracy of consumer demand prediction can be improved and the consumption of computing resources can be reduced. Description of the Drawings

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0039] Figure 1 It is a flowchart of a consumer demand prediction method in an embodiment of the present application;

[0040] Figure 2 It is a schematic structural diagram of a computer device provided in an embodiment of the present application. Detailed Embodiments

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0042] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] In an exemplary embodiment, as Figure 1 shown, a consumer demand prediction method is provided. This method is executed by a computer device and includes the following S101 to S104. Among them:

[0044] S101: Obtain a consumer behavior data set; the consumer behavior data set includes: consumer ID, behavior type, platform name, product information, timestamp, and page stay duration; the behavior type includes: browsing behavior, search behavior, adding to cart behavior, and purchase behavior; the product information includes: product name, product category, and product brand.

[0045] In practical applications, obtain a user behavior data set G (i.e., the behavior data of the user on different e-commerce platforms). The user behavior data set G includes user ID, behavior type (browsing, searching, adding to cart, purchasing, etc.), platform name, product information (name, category, brand, etc.), timestamp, and page stay duration.

[0046] S102: Construct a behavior link based on the consumer behavior data set, and obtain a behavior link data set based on all the behavior links; the behavior link is the sequence between different consumer behavior types; the behavior link data set includes: consumer ID, product information, behavior link, and the timestamp when the behavior occurs.

[0047] S103: Train a base model according to the behavior link data set; the base model includes: a teacher model and a student model.

[0048] Specifically, the trained teacher model uses the formula Interp, AnswerTEA = TEA(P, S) to determine the output of the trained teacher model; where Interp is the explanation of the answer output by the teacher model, P is the product information, S is the behavior link, TEA is the teacher model, and AnswerTEA is the answer output by the teacher model.

[0049] The trained student model uses the formula Rationtext, Elabel = STU(Data) to determine the consumer demand prediction result; where STU is the student model, Data is the new behavior link data set, Rationtext is the explanation of the answer output by the student model, and Elabel is the answer output by the student model.

[0050] In an exemplary embodiment, a base model in the field of text generation is collected, and based on existing text generation evaluation metrics, the base model is selected from multiple open-source platforms. Among them, the criteria for existing text generation evaluation metrics are as follows: Considering that the larger the model parameters, the stronger the emergence ability, so a model as large as possible is selected as the teacher model; considering the resource consumption of model deployment, a small model as small as possible and ensuring the effect is selected as the student model. Among them, the multiple open-source platforms include but are not limited to: the github platform, the huggingface platform, and the modelscope platform.

[0051] S104: According to the behavior chain of consumer demands, use the trained base model to obtain the consumer demand prediction result.

[0052] In another exemplary embodiment of the present application, before the above step 102, the method may further include the following steps. Among them:

[0053] Preprocess the consumer behavior dataset; the preprocessing includes: eliminating invalid records and eliminating noise data.

[0054] In an exemplary embodiment, invalid records (such as abnormal timestamps, duplicate records) and noise data (such as crawler operation records) are eliminated from the user behavior dataset. If the user's stay time on a certain product page is extremely short (for example, less than 1 second), it may indicate that the user did not really pay attention to the product, but was a misoperation or browsed too quickly. These behaviors can be regarded as noise data and should be deleted; when the user clicks on multiple product pages frequently within a short period of time, but the stay time on each page is very short (for example, within 1 second), it can be considered that this behavior belongs to invalid clicks and these data should be deleted; if the user repeatedly clicks on the same product or stays on the same page for too long within the same time period, it may belong to misoperation or invalid behavior and should be excluded.

[0055] Specifically, S102 includes:

[0056] S1021: Sort the behavior types of consumers in the consumer behavior dataset according to timestamps, and connect the behaviors of each consumer as behavior nodes; the behavior nodes include: user browsing products, user searching for products, adding to the shopping cart, and purchasing products.

[0057] S1022: Group the links of the consumer behavior nodes according to product categories. Classify according to the categories in the product information, and separate the user behavior links of each category for processing. For example, the behavior link of users for clothing products should be independent of the behavior link of electronic products.

[0058] S1023: Limit the length of the grouped links using a phase threshold to obtain behavior links. The behavior links of a user may be very long. Therefore, a reasonable length needs to be set during link construction. Generally speaking, an overly long link length will lead to too high a computational complexity. Therefore, a suitable truncation threshold should be set according to specific business requirements and computing resources (for example, retain links including at most 5 behavior events).

[0059] In another exemplary embodiment of this application, the above S103 is replaced by the following S1031 to S1032:

[0060] S1031: Train a teacher model based on the product information and behavior links in the behavior link dataset to obtain a trained teacher model; the trained teacher model is used to output answers and explanations for the answers; the answers include: product information pushed to consumers; the explanation for the answer is the reason for pushing the corresponding product information to consumers.

[0061] S1032: Determine a new behavior link dataset based on the product information, behavior links in the behavior link dataset, and the answers and explanations for the answers output by the trained teacher model; and use the new behavior link dataset to train a student model to obtain a trained student model; the trained student model is used to output consumer demand prediction results.

[0062] In an exemplary embodiment, the trained student model is trained with the new behavior link dataset as the input and the consumer demand prediction result corresponding to the new behavior link dataset as the output, specifically including: using the new behavior link dataset as the input and the consumer demand prediction result corresponding to the new behavior link dataset as the output, and training the student model using a multi-task loss function to obtain the trained student model.

[0063] Specifically, the loss function of the trained student model is a multi-task loss function:

[0064] lossInterp = θ(STU(xi), Interp);

[0065] lossAnswer = θ(STU(xi), Answer);

[0066] loss = α * lossAnswer + β * lossInterp;

[0067] Among them, lossAnswer is the loss function value of consumer demand prediction, lossInterp is the loss function value of the interpretation output by the student model, both α and β are parameter coefficients, θ is the loss function, loss is the loss function value based on lossAnswer and lossInterp, STU is the small model, xi is the new behavior link data set, Interp is the interpretation output by the teacher model, and Answer is the interpretation answer output by the teacher model.

[0068] This application extracts background knowledge from a large language model and is guided by the inference logic of the large language model. The large language model can not only determine the answer based on the user behavior data set, but also determine the explanation for obtaining the answer. Therefore, a teacher model and a student model are collected, and the student model is constructed using knowledge distillation. The student model learns the inference ability of the teacher model, improving the accuracy of consumer demand prediction, and can solve the problem of text content generation in low-resource situations with high quality, realizing a new exploration of consumer demand prediction methods.

[0069] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 2 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a consumer demand prediction method.

[0070] Those skilled in the art can understand that Figure 2 the structure shown in

[0071] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0072] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0073] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0074] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0075] In each of the embodiments provided in the present application, the database involved may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., and is not limited thereto. In each of the embodiments provided in the present application, the processor may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., and is not limited thereto.

[0076] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0077] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for predicting consumer demand, characterized in that: The consumer demand forecasting method comprises: Obtain a consumer behavior data set; the consumer behavior data set includes: consumer ID, behavior type, platform name, product information, timestamp and page dwell time; the behavior type includes: browsing behavior, search behavior, adding to shopping cart behavior and purchase behavior; the product information includes: product name, product category and product brand; A behavior link is constructed according to the consumer behavior data set, and a behavior link data set is obtained according to all the behavior links; the behavior link is the sequence between different types of consumer behaviors; the behavior link data set includes: consumer ID, product information, behavior link and timestamp of the behavior; According to the behavior link data set, a base model is trained; the base model includes: a teacher model and a student model; According to the behavioral chain of consumer demand, the trained base model is used to obtain the consumer demand prediction results.

2. The method for predicting consumer demand according to claim 1, characterized in that: The step of obtaining a consumer behavior dataset further includes: The consumer behavior data set is preprocessed; the preprocessing includes: removing invalid records and removing noise data.

3. The method for predicting consumer demand according to claim 1, characterized in that: The step of constructing a behavior link according to the consumer behavior data set and obtaining a behavior link data set according to all the behavior links specifically includes: Sort the behavior types of consumers in the consumer behavior data set by timestamp, and connect each consumer's behavior as a behavior node; the behavior nodes include: user browsing products, user searching products, adding to shopping carts, and purchasing products; Group the links after consumers’ behavior nodes are connected by product category; The stage threshold is used to limit the length of the grouped links to obtain the behavior links.

4. The method for predicting consumer demand according to claim 1, characterized in that: The training of the base model according to the behavior link data set specifically includes: According to the commodity information and the behavior link in the behavior link data set, the teacher model is trained to obtain a trained teacher model; the trained teacher model is used to output answers and explanations of the answers; the answers include: commodity information pushed to consumers; the explanations of the answers are the reasons for pushing the corresponding commodity information to consumers; A new behavior link data set is determined based on the product information, behavior links in the behavior link data set, and the answers output by the trained teacher model and the explanation of the answers; and the student model is trained using the new behavior link data set to obtain a trained student model; the trained student model is used to output consumer demand prediction results.

5. The method for predicting consumer demand according to claim 4, characterized in that: The trained teacher model specifically includes: Determine the output of the trained teacher model using the formula Interp, AnswerTEA = TEA(P, S); Among them, Interp is the explanation of the answer output by the teacher model, P is the product information, S is the behavior link, TEA is the teacher model, and AnswerTEA is the answer output by the teacher model.

6. The method for predicting consumer demand according to claim 4, characterized in that: The trained student model specifically includes: Use the formula Rationtext, Elabel = STU (Data) to determine the consumer demand forecast results; Among them, STU is the student model, Data is the new behavior link dataset, Rationtext is the explanation of the answer output by the student model, and Elabel is the answer output by the student model.

7. The method for predicting consumer demand according to claim 4, characterized in that: The loss function of the trained student model is a multi-task loss function: lossInterp=θ(STU(xi),Interp); lossAnswer=θ(STU(xi),Answer); loss=α*lossAnswer+β*lossInterp; Among them, lossAnswer is the loss function value of consumer demand prediction, lossInterp is the loss function value of the explanation output by the student model, α and β are parameter coefficients, θ is the loss function, loss is the loss function value based on lossAnswer and lossInterp, STU is the small model, xi is the new behavior link dataset, Interp is the explanation output by the teacher model, and Answer is the explanation answer output by the teacher model.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the consumer demand forecasting method described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the consumer demand forecasting method described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the consumer demand forecasting method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Recommendation model training method and device, electronic equipment and storage medium

    CN112541122A

  • Content recommendation model training method, content recommendation method and related equipment

    CN113360777A

  • Recommendation model training method and device based on knowledge distillation and storage medium

    CN116911956A

  • Recommendation model training method, resource object pushing method, device and equipment

    CN116955812A

  • Method for training student model, behavior prediction method and device

    CN116975686A