Behavior prediction method, device, equipment and computer-readable storage medium

Through the federated learning training of behavior prediction models, the problem of low prediction efficiency in management of a large number of models and in the existing technology is solved, and fast and accurate customer behavior prediction and store recommendation are achieved, and sales volume is increased.

CN112700281BActive Publication Date: 2025-03-25WEBANK (CHINA)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011644642.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2025-03-25
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

The existing technology requires the management of a large number of models in customer-to-store prediction, which leads to inconvenience in store management and server-side prediction, and requires the call of a large number of models during prediction, which brings serious burden to the system and leads to low prediction efficiency.

Method used

The behavior prediction model is trained by federated learning. By obtaining the sample feature set for training, a trained behavior prediction model is obtained. When receiving the behavior prediction request sent by the user terminal, prediction is made based on the user's characteristics and output the probability of the user going to the destination.

Benefits of technology

It achieves rapid and accurate prediction of target stores for lead customers, reducing the complexity of model management and system burden, improving prediction efficiency and user purchasing experience, thereby increasing sales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112700281B_ABST
    Figure CN112700281B_ABST
Patent Text Reader

Abstract

The present application provides a behavior prediction method, apparatus, device and computer-readable storage medium, which are applied to a first participant in federated learning, wherein the method includes: inputting an acquired sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model; receiving a behavior prediction request sent by a user terminal; obtaining user features of a user to be predicted based on the behavior prediction request; inputting the user features into the trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes the probability of the user to be predicted going to a destination to be predicted; sending the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result, thereby realizing the prediction of the behavior intention of the user to be predicted. When applied to a marketing scenario, it is possible to recommend more suitable stores to users in a targeted manner, thereby improving the user's purchasing experience and thus increasing sales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of machine learning, and relates to but is not limited to a behavior prediction method, apparatus, device, and computer-readable storage medium. Background Art

[0002] With the rapid development of Internet technology, more and more information is obtained by browsing the Internet. In marketing scenarios, the solution for predicting customer visits to stores in related technologies requires training a separate model for each store. The server needs to predict whether the customer will visit the store based on the model of each store, obtain multiple prediction results, and select one of the stores to allocate to customers with purchasing intentions based on multiple prediction results. This method of predicting customer behavior requires the management of a large number of models, which brings inconvenience to store management and server prediction; in addition, a large number of models need to be called during prediction, which brings a serious burden to the system; at the same time, multiple prediction results are output by multiple models, and further integration and comparison are required to obtain the target store, resulting in low prediction efficiency. Summary of the invention

[0003] The embodiments of the present application provide a behavior prediction method, apparatus, device, computer-readable storage medium, and computer program product, which can quickly and accurately predict target stores for lead customers.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application embodiment provides a behavior prediction method, which is applied to a first participant in federated learning, and the method includes:

[0006] Obtaining a sample feature set, and inputting the sample feature set into a pre-built behavior prediction model for training, to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning;

[0007] Receiving a behavior prediction request sent by a user terminal;

[0008] Acquiring user characteristics of the user to be predicted based on the behavior prediction request;

[0009] Inputting the user characteristics into a trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes a probability that the user to be predicted will go to the destination to be predicted;

[0010] The at least one prediction result is sent to the user terminal so that the user terminal outputs the at least one prediction result.

[0011] The present application embodiment provides a behavior prediction device, which is applied to a first participant in federated learning, and the device includes:

[0012] A training module is used to obtain a sample feature set and input the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning;

[0013] A receiving module, used for receiving a behavior prediction request sent by a user terminal;

[0014] A first acquisition module, configured to acquire user characteristics of a user to be predicted based on the behavior prediction request;

[0015] An input module, used to input the user features into a trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes a probability that the user to be predicted will go to a destination to be predicted;

[0016] The sending module is used to send the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result.

[0017] The present application embodiment provides a behavior prediction device, which is applied to a first participant in federated learning, and the device includes:

[0018] A memory for storing executable instructions;

[0019] The processor is used to implement the method provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0020] An embodiment of the present application provides a computer-readable storage medium, on which executable instructions are stored, for causing a processor to execute and implement the method provided in the embodiment of the present application.

[0021] An embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method provided by the embodiment of the present application is implemented.

[0022] The embodiments of the present application have the following beneficial effects:

[0023] In the behavior prediction method provided in the embodiment of the present application, a sample feature set is first obtained, and the sample feature set is input into a pre-built behavior prediction model for training to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning; after receiving a behavior prediction request sent by a user terminal; user features of the user to be predicted are obtained based on the behavior prediction request; the user features are then input into the trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes the probability of the user to be predicted going to the destination to be predicted; finally, the at least one prediction result is sent to the user terminal so that the user terminal outputs the at least one prediction result, thereby realizing the prediction of the behavioral intention of the user to be predicted. When applied to marketing scenarios, it can recommend more suitable stores to users in a targeted manner, thereby improving the user's purchasing experience and thereby increasing sales. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of a network architecture of a behavior prediction method provided in an embodiment of the present application;

[0025] Figure 2 It is a schematic diagram of the composition structure of the behavior prediction device provided in the embodiment of the present application;

[0026] Figure 3 A schematic diagram of an implementation flow of the behavior prediction method provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of another implementation flow of the behavior prediction method provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of another implementation flow of the behavior prediction method provided in the embodiment of the present application;

[0029] Figure 6 A schematic diagram of the model training phase provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the prediction stage provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0032] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0033] In the following description, the terms "first\second\third" involved are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0035] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0036] 1) Federated Learning is an emerging basic AI technology designed to carry out efficient machine learning among multiple parties or computing nodes while ensuring information security during big data exchange, protecting terminal data and personal data privacy, and ensuring legality and compliance.

[0037] 2) Vertical Federated Learning: When there is a large overlap in users and a small overlap in user features between two datasets, the datasets are split vertically (i.e., feature dimension) and the data with the same users but different user features are taken out for machine learning training.

[0038] 3) Homomorphic Encryption: Homomorphic encryption is a cryptographic technique based on the computational complexity theory of mathematical problems. The data that has been homomorphically encrypted is processed to obtain an output, and the output is decrypted, and the result is the same as the output obtained by processing the unencrypted original data in the same way.

[0039] 4) Lead customers refer to customers who have purchasing intentions in a marketing scenario.

[0040] The following describes an exemplary application of the apparatus for implementing the embodiment of the present application. The apparatus provided in the embodiment of the present application can be implemented as a behavior prediction device. The following describes an exemplary application covered when the apparatus is implemented as a behavior prediction device.

[0041] Figure 1 A network architecture diagram of a behavior prediction method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the network architecture at least includes a behavior prediction device 100, a network 200, a user terminal 300, and a server 400 for the second participant in federated learning. To support an exemplary application, the behavior prediction device 100 is a device for performing behavior prediction and obtaining prediction results. It can be a server or a terminal device such as a desktop computer or a laptop computer. The user terminal 300 is a terminal that initiates a prediction request, which can be a mobile phone (mobile phone), a tablet computer, a laptop computer, etc. The server 400 is a device for training a behavior prediction model, which can be a server or a terminal device such as a desktop computer or a laptop computer. The behavior prediction device 100 connects the user terminal 300 and the server 400 through the network 200. The network 200 can be a wide area network or a local area network, or a combination of the two, and uses wireless or wired links to realize data transmission.

[0042] First, based on the federated learning training behavior prediction model, the behavior prediction device 100 generates a public key and a private key for homomorphic encryption and decryption, and sends the public key to the server 400. The server 400 encrypts its own second feature based on the public key to obtain a second ciphertext feature, and returns the second ciphertext feature to the behavior prediction device 100. The behavior prediction device 100 decrypts the second ciphertext feature according to the private key to obtain a second coded value Z B At the same time, the behavior prediction device 100 determines the first encoding value Z according to its own first feature A , Z A and Z B Sent to server 400. Server 400 responds to Z B Encode and get the encoding value D B , get D B and Z A After receiving the feature intersection, the behavior prediction device 100 calculates the feature intersection based on the feature intersection and Z A Determine the sample features, and then input the sample features into the behavior prediction model built based on federated learning for training to obtain a trained behavior prediction model.

[0043] After obtaining the trained behavior prediction model, the user behavior can be predicted. The user terminal 300 sends a behavior prediction request to the behavior prediction device 100. The behavior prediction device 100 obtains the user characteristics of the user to be predicted based on the received behavior prediction request, and then inputs the user characteristics into the trained behavior prediction model to obtain the prediction result, which includes the probability of the user to be predicted going to the destination to be predicted. Finally, the prediction result is sent to the user terminal 300, and the user terminal 300 outputs the prediction result. The behavior prediction method provided in the embodiment of the present application can realize the prediction of the behavioral intention of the user to be predicted. When applied to marketing scenarios, it can recommend more suitable stores to users in a targeted manner, improve the user's purchasing experience, and thus increase sales.

[0044] The device provided in the embodiments of the present application may be implemented in the form of hardware or a combination of hardware and software. Various exemplary implementations of the device provided in the embodiments of the present application are described below.

[0045] according to Figure 2 An exemplary structure of a behavior prediction device is shown. Here, the behavior prediction device is shown as behavior prediction device 100. Other exemplary structures of the behavior prediction device can be foreseen. Therefore, the structure described here should not be regarded as limiting. For example, some components described below can be omitted, or components not described below can be added to meet the special needs of certain applications.

[0046] Figure 2 The behavior prediction device 100 shown includes: at least one processor 110, a memory 140, at least one network interface 120 and a user interface 130. Each component in the behavior prediction device 100 is coupled together through a bus system 150. It can be understood that the bus system 150 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 150 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 150 is not used in the example of FIG. Figure 2 Various buses are labeled as bus system 150 .

[0047] The user interface 130 may include a display, a keyboard, a mouse, a touch pad, a touch screen, and the like.

[0048] The memory 140 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM). The volatile memory may be a random access memory (RAM). The memory 140 described in the embodiments of the present application is intended to include any suitable type of memory.

[0049] The memory 140 in the embodiment of the present application can store data to support the operation of the behavior prediction device 100. Examples of such data include: any computer program used to operate on the behavior prediction device 100, such as an operating system and an application program. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program can include various applications.

[0050] As an example of the method provided in the embodiment of the present application being implemented by software, the method provided in the embodiment of the present application can be directly embodied as a combination of software modules executed by the processor 110. The software module can be located in a storage medium, and the storage medium is located in the memory 140. The processor 110 reads the executable instructions included in the software module in the memory 140, and completes the method provided in the embodiment of the present application in combination with the necessary hardware (for example, including the processor 110 and other components connected to the bus 150).

[0051] As an example, the processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0052] The behavior prediction method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the behavior prediction device provided in the embodiment of the present application.

[0053] Figure 3 A schematic diagram of an implementation flow of the behavior prediction method provided in the embodiment of the present application, which is applied to Figure 1 The behavior prediction device of the network architecture shown will be combined with Figure 3 The steps shown are explained.

[0054] Step S301, obtaining a sample feature set, and inputting the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model.

[0055] Here, the behavior prediction model is a model based on federated learning training.

[0056] In the federated model of marketing scenario store prediction, multiple store attempts are involved, that is, for a potential customer, there may be multiple cities and multiple stores that can meet the customer's needs. The behavior prediction method in related technologies requires the management of a large number of models, which brings inconvenience to store management and server-side prediction; and a large number of models need to be called during prediction, which brings a serious burden to the system; at the same time, multiple prediction results are output by multiple models, and further integration and comparison are required to obtain the target store, resulting in low prediction efficiency.

[0057] In order to solve the problems existing in the related art, the embodiment of the present application provides a behavior prediction method. When a user conducts a purchase search on his terminal, the user can be considered as a user with purchase intention. Combined with the user portrait, the most suitable store can be recommended for the user, which can greatly improve the user's consumption experience and increase sales. The following example is used to illustrate the scenario of marketing vehicles.

[0058] Before making behavior predictions, a sample feature set is first obtained to train a behavior prediction model. The embodiment of the present application obtains sample features of the first participant and the second participant to form a sample feature set based on federated learning (such as vertical federated learning), which can ensure the security of the privacy information of each participant.

[0059] Step S302: receiving a behavior prediction request sent by a user terminal.

[0060] When a user searches and browses a certain brand of vehicle on the browser of his terminal, the user is considered to be a user who may purchase the vehicle. The terminal sends a behavior prediction request to the behavior prediction device so as to show the user stores that meet his vehicle purchase requirements.

[0061] Step S303: obtaining user features of the user to be predicted based on the behavior prediction request.

[0062] After receiving the behavior prediction request sent by the user terminal, the behavior prediction device parses the prediction request to obtain the identification information of the user to be predicted, and determines the user characteristics of the user to be predicted based on the identification information.

[0063] In an embodiment of the present application, the user characteristics include at least one of the following: searching for stores, searching for car models, age, gender, living city, main activity area, purchasing power determined based on historical consumption habits, shopping preferences determined based on historical shopping information, etc.

[0064] Step S304: input the user features into a trained behavior prediction model to obtain at least one prediction result.

[0065] Here, the prediction result includes the probability of the to-be-predicted user going to the to-be-predicted destination.

[0066] In an embodiment of the present application, before making a behavior prediction, the behavior prediction device has pre-trained the constructed behavior prediction model, that is, the behavior prediction model has been trained based on federated learning. After determining the user characteristics of the user to be predicted, the user characteristics are input into the trained behavior prediction model to obtain the user's willingness to visit each store. Here, the willingness to visit the store can be a probability of visiting the store. The more a store matches the user's characteristics, that is, the more the vehicles in the store meet the user's needs, the greater the user's willingness to visit the store, that is, the greater the probability of the user visiting the store.

[0067] After the user characteristics are determined, the user characteristics are input into the trained behavior prediction model to obtain at least one prediction result, that is, the user's willingness to visit each store is obtained.

[0068] Step S305: Send the at least one prediction result to the user terminal, so that the user terminal outputs the at least one prediction result.

[0069] After calculating the store visit intention of each store based on the behavior prediction model, the calculation result is returned to the user terminal so that the user can determine the prediction result of each store through the prediction result output by the terminal.

[0070] It should be noted that the user terminal mentioned in the embodiment of the present application may be a terminal of a user who needs to purchase a vehicle. The user who is the buyer can determine which store to go to to buy a vehicle that best meets his or her requirements based on the prediction results. The user terminal mentioned in the embodiment of the present application may also be a terminal of a user who is the seller of the vehicle. The user who is the seller can determine which store the user who is the buyer is most likely to go to to buy a vehicle that meets his or her requirements based on the prediction results, so that a more suitable store can be recommended to the user in a targeted manner, thereby improving the user's purchasing experience and thus increasing sales.

[0071] The behavior prediction method provided in the embodiment of the present application is applied to the first participant of federated learning, and the method includes: obtaining a sample feature set, and inputting the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning; receiving a behavior prediction request sent by a user terminal; obtaining user features of a user to be predicted based on the behavior prediction request; inputting the user features into the trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes the probability of the user to be predicted going to a destination to be predicted; sending the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result, thereby realizing the prediction of the behavior intention of the user to be predicted. When applied to a marketing scenario, it can recommend more suitable stores to users in a targeted manner, thereby improving the user's purchasing experience and thus increasing sales.

[0072] In some embodiments, Figure 3 In the illustrated embodiment, step S301 of “obtaining a sample feature set, and inputting the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model” can be implemented by the following steps:

[0073] Step S3011, obtaining at least one first feature of the first participant.

[0074] Here, the first feature is a feature of the first party itself.

[0075] Step S3012, generate a public key for homomorphic encryption and a private key for homomorphic decryption.

[0076] In an embodiment of the present application, the behavior prediction device generates a public key and a private key for homomorphic encryption and decryption, so that each participant does not need to send its original data to other participants, thereby protecting the privacy of the original data of each participant.

[0077] Homomorphic encryption is a cryptographic technology based on the computational complexity theory of mathematical problems. The homomorphic encrypted data is processed to obtain an output, and the output is decrypted, and the result is the same as the output obtained by processing the unencrypted original data in the same way. The generated first public key and first private key can be used for any of the homomorphic encryptions, such as additive homomorphic encryption, multiplicative homomorphic encryption, hybrid multiplicative homomorphic encryption, subtractive homomorphic encryption, division homomorphic encryption, algebraic homomorphic encryption (also known as full homomorphic encryption) and arithmetic homomorphic encryption. Here, the full homomorphic encryption refers to the encryption function that satisfies both additive homomorphism and multiplicative homomorphism.

[0078] In some embodiments, the behavior prediction device may generate a public key and a private key for additive homomorphic encryption and decryption, or the behavior prediction device may generate a public key and a private key for multiplicative homomorphic encryption and decryption, or the behavior prediction device may generate a public key and a private key for fully homomorphic encryption and decryption. Compared with generating a public key and a private key for fully homomorphic encryption and decryption, generating a public key and a private key for additive homomorphic encryption and decryption can improve computing efficiency.

[0079] Step S3013: Based on the public key and the private key, align the at least one first feature and the at least one second feature of the second party to obtain a sample feature set.

[0080] Training based on the SecureBoost model can be divided into two steps. The first step is to align the data to obtain a sample feature set; the second step is to construct a Boost tree, that is, the behavior prediction model constructed in step S13.

[0081] The difficulty of data alignment lies in how to achieve data alignment without exposing private information. For example, if participant A has XA :{x1,x2,x3,x4} four data, participant B has X B : There are four data {x1,x2,x3,x5}. If participants A and B do not know each other's data, they are required to find the union of {x1,x2,x3}.

[0082] In an embodiment of the present application, the implementation method for determining sample features may be: the behavior prediction device may first determine at least one second coding value based on the public key, the private key and at least one second feature of the second participant, and at the same time determine at least one first coding value based on the at least one first feature. Then, the at least one first coding value and the at least one second coding value are sent to the second participant, so that the second participant determines the feature intersection based on the at least one first coding value and the at least one second coding value. Finally, the behavior prediction device determines the sample feature set based on the feature intersection and the at least one first coding value.

[0083] Step S3014: input the sample feature set into a behavior prediction model constructed based on federated learning for training to obtain a trained behavior prediction model.

[0084] The embodiment of the present application generates a private key and a public key through homomorphic encryption and decryption, and can train the constructed behavior prediction model without leaking the original data of the first participant and the second participant to obtain a trained behavior prediction model.

[0085] In some embodiments, the above step S3013 “based on the public key and the private key, aligning the at least one first feature and the at least one second feature of the second party to obtain a sample feature set” can be implemented by the following steps:

[0086] Step S131: Determine each second coding value corresponding to each second feature based on the public key, the private key and each second feature.

[0087] Determining each second coding value can be achieved as follows: the behavior prediction device sends the public key to the second participant. The second participant encrypts each second feature based on the public key to obtain the corresponding second ciphertext features, and then the second participant sends each second ciphertext feature to the behavior prediction device, and the behavior prediction device decrypts each second ciphertext feature according to the private key to obtain each second coding value corresponding to each second feature.

[0088] Step S132: Based on each first feature, determine each first coding value corresponding to the first feature.

[0089] The behavior prediction device determines at least one first coding value which can be implemented as follows: encoding each of the first features respectively to obtain each first feature coding value corresponding to the first feature, and then decrypting each of the first feature coding values ​​according to the private key to obtain each first feature decrypted value; and then encoding each of the first feature decrypted values ​​to obtain each first coding value corresponding to the first feature.

[0090] In the embodiment of the present application, the encoding method can be hash encoding.

[0091] Step S133: Send each of the first coding values ​​and each of the second coding values ​​to the second participant.

[0092] The behavior prediction device sends the determined at least one first coding value and at least one second coding value to the second participant, and the second participant encodes the at least one second coding value to obtain at least one second feature coding value, and intersects the at least one second feature coding value with the at least one first coding value to obtain a feature intersection. The second participant sends the obtained feature intersection to the behavior prediction device.

[0093] Step S134: receiving a feature intersection sent by the second participant, wherein the feature intersection is determined based on the first coding values ​​and the second coding values.

[0094] Step S135: determine the intersection of the feature intersection and the intersection of each first encoding value as the sample feature set.

[0095] The behavior prediction device determines the intersection of the feature intersection and each first code value as a sample feature set by comparing each first code value with the feature intersection.

[0096] In some embodiments, the behavior prediction device may also send the sample feature set to the second party.

[0097] Through the embodiments of the present application, data alignment can be achieved and sample features can be obtained without leaking the original data of each participant and ensuring that the privacy information of each participant is not exposed.

[0098] In the embodiment of the present application, the granularity of the user features obtained is related to the number of prediction results obtained. Since one store prediction obtains one prediction result, in general, for the same user to be predicted, the larger the granularity, the more prediction results are obtained, that is, the larger the prediction range, the more shopping stores the user can choose; conversely, the smaller the granularity, the fewer the prediction results are obtained, that is, the smaller the prediction range, the fewer shopping stores the user can choose. When the granularity is not limited, the user can shop at any store among all stores; when the granularity is limited to "city", the user can shop at any store in the city; when the granularity is limited to "store", there is only one prediction result, and the user can only shop at this store.

[0099] Based on this, when the user features are divided into three granularities, the above step S303 can be implemented in at least the following three ways according to the granularity of the user features:

[0100] The first method: when only the user is limited and the granularity is not limited, the above step S303 "obtaining the user characteristics of the user to be predicted based on the behavior prediction request" can be implemented as follows:

[0101] Step S303a1, parsing the prediction request to obtain identification information of the user to be predicted.

[0102] Step S303a2: determining the identification information as the user feature of the user to be predicted.

[0103] In the second way, when the regional granularity is limited, the above step S303 "obtaining the user characteristics of the user to be predicted based on the behavior prediction request" can be implemented as follows:

[0104] Step S303b1, parsing the prediction request to obtain identification information of the user to be predicted.

[0105] Step S303b2: acquiring at least one area to be predicted according to the identification information.

[0106] Step S303b3: determine the identification information and the at least one to-be-predicted area as at least one user feature of the to-be-predicted user.

[0107] In the third way, when the destination granularity is limited, the above step S303 "obtaining the user characteristics of the user to be predicted based on the behavior prediction request" can be implemented as follows:

[0108] Step S303c1, parsing the prediction request to obtain identification information of the user to be predicted.

[0109] Step S303c2: acquiring at least one area to be predicted according to the identification information.

[0110] Step S303c3: acquiring at least one destination to be predicted according to the at least one area to be predicted.

[0111] Step S303c4: determining the identification information, the at least one area to be predicted and the at least one destination to be predicted as at least one user feature of the user to be predicted.

[0112] Table 1 is an example of the prediction results of the user U1 to be predicted. As shown in Table 1, the user feature obtained in the first way is U1, and the prediction results obtained at this time are P1 to P5. The user feature obtained in the second way is (U1, city A), and the prediction results obtained at this time are P1 to P3. The user feature obtained in the third way is (U1, city A, store 2), and the prediction result obtained is P2.

[0113] Table 1 Example of prediction results for the user U1 to be predicted

[0114]

[0115] In the embodiment of the present application, by changing the granularity of user features, diverse prediction results can be output.

[0116] Based on the above embodiments, the present application further provides a behavior prediction method. Figure 4 Another implementation flow diagram of the behavior prediction method provided in the embodiment of the present application is as follows: Figure 4 As shown, the behavior prediction method includes the following steps:

[0117] Step S401, obtaining a sample feature set, and inputting the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model.

[0118] Here, the behavior prediction model is a model based on federated learning training.

[0119] Step S402: receiving a behavior prediction request sent by a user terminal.

[0120] Step S403: obtaining user features of the user to be predicted based on the behavior prediction request.

[0121] Step S404: input the user features into a trained behavior prediction model to obtain at least one prediction result.

[0122] Here, the prediction result includes the probability of the to-be-predicted user going to the to-be-predicted destination.

[0123] Steps S401 to S404 correspond to steps S301 to S304 respectively, and their implementation methods refer to the descriptions of steps S301 to S304 respectively.

[0124] Step S405: sort the at least one prediction result according to a preset sorting method to obtain an ordered prediction result.

[0125] Step S406: sending the ordered prediction result to the user terminal so that the user terminal outputs the ordered prediction result.

[0126] When there are multiple prediction results, the multiple prediction results can be sorted according to the probability of the predicted user going to the multiple predicted destinations, for example, from large to small, or from small to large, so as to obtain ordered prediction results. The user terminal outputs the ordered prediction results for user viewing.

[0127] Based on the above embodiments, the present application further provides a behavior prediction method, which is applied to Figure 1 The network architecture shown, Figure 5 A schematic diagram of another implementation flow of the behavior prediction method provided in the embodiment of the present application is shown as follows: Figure 5 As shown, the behavior prediction method includes the following steps:

[0128] Step S501: The behavior prediction device obtains at least one first feature of a first participant.

[0129] Step S502: The behavior prediction device generates a public key for homomorphic encryption and a private key for homomorphic decryption.

[0130] Step S503: The behavior prediction device sends the public key to the server.

[0131] Step S504: The server encrypts each second feature based on the public key to obtain each second ciphertext feature.

[0132] Step S505: The server sends each of the second ciphertext features to the behavior prediction device.

[0133] Step S506: The behavior prediction device decrypts each of the second ciphertext features according to the private key to obtain each second encoded value corresponding to each of the second features.

[0134] Step S507: The behavior prediction device encodes each of the first features respectively to obtain each first feature encoding value corresponding to the first feature.

[0135] Step S508: The behavior prediction device decrypts each of the first feature encoding values ​​according to the private key to obtain each of the first feature decrypted values.

[0136] Step S509: The behavior prediction device encodes the first feature decryption values ​​to obtain first encoded values ​​corresponding to the first features.

[0137] Step S510: The behavior prediction device sends the first coding values ​​and the second coding values ​​to the server.

[0138] Step S511: The server encodes each of the second coding values ​​to obtain each of the second characteristic coding values.

[0139] Step S512: the server obtains a feature intersection of each of the first coding values ​​and each of the second feature coding values.

[0140] Step S513: the server sends the feature intersection to the behavior prediction device.

[0141] Step S514: The behavior prediction device determines the intersection of the feature set and the intersection of each of the first coding values ​​as the sample feature set.

[0142] In step S515, the behavior prediction device inputs the sample feature set into a behavior prediction model constructed based on federated learning for training, thereby obtaining a trained behavior prediction model.

[0143] Here, the behavior prediction model is a model based on federated learning training.

[0144] Step S516: The behavior prediction device receives a behavior prediction request sent by the user terminal.

[0145] Step S517: The behavior prediction device obtains user characteristics of the user to be predicted based on the behavior prediction request.

[0146] Step S518: The behavior prediction device inputs the user features into a trained behavior prediction model to obtain at least one prediction result.

[0147] Here, the prediction result includes the probability of the to-be-predicted user going to the to-be-predicted destination.

[0148] Step S519: The behavior prediction device sends the at least one prediction result to the user terminal.

[0149] Step S520: The user terminal outputs the at least one prediction result.

[0150] In the behavior prediction method provided in the embodiment of the present application, the behavior prediction device first obtains a sample feature set, and inputs the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning; after receiving a behavior prediction request sent by a user terminal; obtaining user features of the user to be predicted based on the behavior prediction request; inputting the user features into the trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes the probability of the user to be predicted going to the destination to be predicted; sending the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result, thereby realizing the prediction of the behavioral intention of the user to be predicted. When applied to marketing scenarios, it can recommend more suitable stores to users in a targeted manner, thereby improving the user's purchasing experience and thus increasing sales.

[0151] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.

[0152] The essence of the model requirement is to predict the conversion of customer leads (car purchase intention) to store visit intention. Usually dealers will obtain lead customers who may have potential car purchase intention through some channels. By tracking and visiting these customers, they can obtain records of whether the customers finally visit the store. Based on the leads, store visit records as labels, and more data provided by the data source as features, a model is trained to predict whether other lead customers will visit the store.

[0153] In the model of store visit prediction in marketing scenarios, multiple store visits of lead customers are involved, that is, for a potential customer, there may be multiple cities and multiple stores that can meet the customer's needs. According to the solution in the relevant technology, a model needs to be trained for each store, and the server needs to predict the prediction result (score) of whether the customer will visit the store based on the model of each store, compare multiple prediction scores, and select the store with the highest score to allocate the lead to the store. This method requires the management of a large number of models, which brings inconvenience to store management and server-side prediction; in addition, a large number of models need to be called during prediction, which brings a serious burden to the system; at the same time, the final prediction result is also the output of multiple models, which needs to be further integrated and compared.

[0154] In the prediction process of the related technology, only one prediction is made for a customer identification number (ID, Identity Document). The prediction request is sent through the client (Guest) (i.e. the user terminal mentioned above), and the two parties (including the first participant and the second participant mentioned above) calculate the scores respectively and then summarize them on the Guest side and return them. In this solution, for the same ID, several predictions will be made according to the city and store that need to be predicted. The host side (Host) (i.e. the behavior prediction device mentioned above) only calculates once, and the Guest side will predict multiple times in the model according to different conditions, and return the corresponding score values ​​in sequence.

[0155] In the embodiment of the present application, due to the changes in the online module, the training module also needs to be adjusted and modified accordingly: the city and store information needs to be introduced during the training process and input into the training model for training.

[0156] In the traditional prediction process, only one prediction is made for one ID. The prediction request is sent by the guest, and the scores are calculated by both parties and then aggregated and returned on the guest side.

[0157] In the embodiment of the present application, for the same ID, several predictions will be made according to the cities and stores that need to be predicted. The host side will only calculate once, and the guest side will predict multiple times in the model according to different conditions, and return the corresponding score values ​​in sequence.

[0158] Figure 6 For a schematic diagram of the model training phase provided in the embodiment of the present application, see Figure 6 In the training stage, the feature "city" and the feature "store" in the client side 601 are used as virtual variables. The features included in the client side 601 and the features included in the host side 602 are trained based on the Secureboost model of federated learning to obtain the behavior prediction model 603. In the method provided in the embodiment of the present application, only one model needs to be trained for multiple stores in multiple urban clusters, and lossless prediction of the store visit intention of existing and incremental user leads nationwide can be achieved based on a small number of models.

[0159] Figure 7 For a schematic diagram of the prediction stage provided in the embodiment of the present application, see Figure 7, for a customer with ID U1, the probability of his visiting store 1 to store 5 in city A and city B will be predicted. According to the traditional model, 5 different models need to be trained and managed. When calling online, the 5 models need to be called separately for calculation and the results need to be manually integrated. In the embodiment of the present application, only the corresponding features, i.e. (city, store) need to be included in the prediction module to obtain the corresponding store visit intention P1 to P5. When predicting, the customer side 701 has a list of customer's intended city and store combinations, and obtains the store visit intention of multiple city and store combinations (corresponding to the prediction results above). The user can select the city-store combination with the highest probability as the target store.

[0160] The prediction method provided by the embodiment of the present application can reduce the number of online models, reduce the maintenance time and cost of model management. When calling online, there is no need to manually match the store corresponding model. The model can directly return the probability value calculated according to the conditions, so as to select the appropriate store.

[0161] The following is a description of an exemplary structure of a behavior prediction device provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the behavior prediction device 80 of the memory 140 may include:

[0162] A training module 81 is used to obtain a sample feature set and input the sample feature set into a pre-built behavior prediction model for training to obtain a trained behavior prediction model, wherein the behavior prediction model is a model trained based on federated learning;

[0163] A receiving module 82, configured to receive a behavior prediction request sent by a user terminal;

[0164] A first acquisition module 83, configured to acquire user characteristics of a user to be predicted based on the behavior prediction request;

[0165] An input module 84, configured to input the user characteristics into a trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes a probability that the user to be predicted will go to a destination to be predicted;

[0166] The sending module 85 is used to send the at least one prediction result to the user terminal, so that the user terminal outputs the at least one prediction result.

[0167] In some embodiments, the training module 81 is further used to:

[0168] Acquire at least one first characteristic of the first participant;

[0169] Generate a public key for homomorphic encryption and a private key for homomorphic decryption;

[0170] Based on the public key and the private key, aligning the at least one first feature and the at least one second feature of the second participant to obtain a sample feature set;

[0171] The sample feature set is input into a behavior prediction model constructed based on federated learning for training to obtain a trained behavior prediction model.

[0172] In some embodiments, the training module 81 is further used to:

[0173] Based on the public key, the private key and the second features, determining the second encoding values ​​corresponding to the second features;

[0174] Based on each first feature, determining each first coding value corresponding to the each first feature;

[0175] sending the respective first coded values ​​and the respective second coded values ​​to the second party;

[0176] receiving a feature intersection sent by the second participant, wherein the feature intersection is determined based on the respective first coding values ​​and the respective second coding values;

[0177] The intersection of the feature intersection and the first encoding values ​​is determined as the sample feature set.

[0178] In some embodiments, the training module 81 is further used to:

[0179] sending the public key to a second party;

[0180] receiving each second ciphertext feature sent by the second participant, where the second ciphertext feature is obtained by the second participant encrypting the second feature based on the public key;

[0181] The second ciphertext features are decrypted according to the private key to obtain second encoding values ​​corresponding to the second features.

[0182] In some embodiments, the training module 81 is further used to:

[0183] Encode each of the first features respectively to obtain each first feature encoding value corresponding to the first feature;

[0184] Decrypting each of the first characteristic encoding values ​​according to the private key to obtain each of the first characteristic decrypted values;

[0185] The first characteristic decryption values ​​are encoded to obtain first encoding values ​​corresponding to the first characteristics.

[0186] In some embodiments, the first acquisition module 83 is further used to:

[0187] Parsing the prediction request to obtain identification information of the user to be predicted;

[0188] Determining the identification information as the user feature of the user to be predicted;

[0189] or,

[0190] Parsing the prediction request to obtain identification information of the user to be predicted;

[0191] Acquire at least one area to be predicted according to the identification information;

[0192] Determining the identification information and the at least one to-be-predicted area as at least one user feature of the to-be-predicted user;

[0193] or,

[0194] Parsing the prediction request to obtain identification information of the user to be predicted;

[0195] Acquire at least one area to be predicted according to the identification information;

[0196] Acquire at least one destination to be predicted according to the at least one area to be predicted;

[0197] The identification information, the at least one area to be predicted, and the at least one destination to be predicted are determined as at least one user feature of the user to be predicted.

[0198] In some embodiments, the behavior prediction device 80 further includes:

[0199] A sorting module, used to sort the at least one prediction result according to a preset sorting method to obtain an ordered prediction result;

[0200] Correspondingly, the sending module 85 is also used for:

[0201] The ordered prediction result is sent to the user terminal so that the user terminal outputs the ordered prediction result.

[0202] It should be noted here that the description of the above behavior prediction device embodiment is similar to the above method description and has the same beneficial effects as the method embodiment. For technical details not disclosed in the behavior prediction device embodiment of this application, those skilled in the art should refer to the description of the method embodiment of this application for understanding.

[0203] The present application embodiment provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the present application embodiment, for example, Figures 3 to 5 The method shown.

[0204] In some embodiments, the storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.

[0205] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0206] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0207] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0208] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A behavior prediction method, characterized in that: Applied to a first participant in federated learning, the method includes: Acquire at least one first characteristic of the first participant; Generate a public key for homomorphic encryption and a private key for homomorphic decryption; Based on the public key and the private key, align the at least one first feature and the at least one second feature of the second participant to obtain a sample feature set; Inputting the sample feature set into a behavior prediction model constructed based on federated learning for training to obtain a trained behavior prediction model; Receiving a behavior prediction request sent by a user terminal; Acquiring user characteristics of the user to be predicted based on the behavior prediction request; Inputting the user characteristics into a trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes a probability that the user to be predicted will go to the destination to be predicted; Sending the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result; The step of aligning the at least one first feature and the at least one second feature of the second party based on the public key and the private key to obtain a sample feature set includes: sending the public key to a second party; receiving each second ciphertext feature sent by the second participant, where the second ciphertext feature is obtained by the second participant encrypting the second feature based on the public key; Decrypting each of the second ciphertext features according to the private key to obtain each second encoding value corresponding to each of the second features; Based on each first feature, determining each first coding value corresponding to the each first feature; sending each of the first encoded values ​​and each of the second encoded values ​​to the second party, the second party encoding at least one of the second encoded values; receiving a feature intersection sent by the second participant, wherein the feature intersection is determined based on the respective first coding values ​​and the respective second coding values; The intersection of the feature intersection and the first encoding values ​​is determined as the sample feature set.

2. The method according to claim 1, characterized in that The obtaining the user characteristics of the user to be predicted based on the behavior prediction request includes: Parsing the prediction request to obtain identification information of the user to be predicted; Determining the identification information as the user feature of the user to be predicted; or, Acquire at least one area to be predicted according to the identification information; Determining the identification information and the at least one to-be-predicted area as at least one user feature of the to-be-predicted user; Acquire at least one destination to be predicted according to the at least one area to be predicted; The identification information, the at least one area to be predicted, and the at least one destination to be predicted are determined as at least one user feature of the user to be predicted.

3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: Sorting the at least one prediction result according to a preset sorting method to obtain an ordered prediction result; Accordingly, sending the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result includes: The ordered prediction result is sent to the user terminal so that the user terminal outputs the ordered prediction result.

4. A behavior prediction device, characterized in that: Applied to a first participant in federated learning, the device comprises: A training module is used to obtain at least one first feature of the first participant; generate a public key for homomorphic encryption and a private key for homomorphic decryption; based on the public key and the private key, align the at least one first feature and the at least one second feature of the second participant to obtain a sample feature set; input the sample feature set into a behavior prediction model constructed based on federated learning for training to obtain a trained behavior prediction model; the training module is also used to determine, based on the public key, the private key and each second feature, each second coding value corresponding to the second feature; based on each first feature, determine each first coding value corresponding to the first feature; align the first coding value with the first feature The second coded value is sent to the second participant, and the second participant encodes at least one second coded value; the feature intersection sent by the second participant is received, and the feature intersection is determined based on the respective first coded values ​​and the respective second coded values; the intersection of the feature intersection and the respective first coded values ​​is determined as the sample feature set; the training module is also used to send the public key to the second participant; receive the respective second ciphertext features sent by the second participant, and the second ciphertext features are obtained by the second participant encrypting the second feature based on the public key; decrypt the respective second ciphertext features according to the private key to obtain the respective second coded values ​​corresponding to the respective second features; A receiving module, used for receiving a behavior prediction request sent by a user terminal; A first acquisition module, configured to acquire user characteristics of a user to be predicted based on the behavior prediction request; An input module, used to input the user features into a trained behavior prediction model to obtain at least one prediction result, wherein the prediction result includes a probability that the user to be predicted will go to a destination to be predicted; The sending module is used to send the at least one prediction result to the user terminal so that the user terminal outputs the at least one prediction result.

5. A behavior prediction device, characterized in that: A first participant applied to federated learning, the device comprising: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 3 when executing the executable instructions stored in the memory.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores executable instructions for causing a processor to execute the instructions to implement the method according to any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Federated product recommendation method, device and equipment and computer storage medium

    CN111553744A

  • Data processing method, device, equipment and medium

    CN111898767A

  • Federal neural network model training method, device and equipment and storage medium

    CN112149171A