Model processing method, electronic device, storage medium, and program product

CN122736740APending Publication Date: 2026-09-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511147833.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0004]然而,在上述方法中,由于训练样本中可能存在大量随机用户,从而导致预测模型的准确度较低

Benefits of technology

[0059] This application provides a model processing method, electronic device, storage medium, and program product. When model processing is required, it can acquire authorized user online behavior data and a first moment corresponding to the behavior data, where the first moment is the time the user arrives at the offline store. The behavior data is processed according to a first model to obtain a second moment, which is the predicted time the user arrives at the offline store. A first parameter corresponding to the behavior data is determined, indicating the change in the prediction error of the first model for the behavior data in different iteration rounds. The first model is updated based on the first moment, the second moment, and the first parameter. In this way, the first model can be updated according to the change in the prediction error of the first model for the behavior data in different iteration rounds, thereby reducing the impact of random user behavior data on the first model, and thus reducing prediction error and improving prediction accuracy in multiple rounds of model iteration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736740A_ABST
    Figure CN122736740A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a model processing method, an electronic device, a storage medium and a program product, relating to the field of artificial intelligence. The method comprises: obtaining behavior data of an authorized user online and a first time corresponding to the behavior data, the first time being a time when the user arrives at an offline store; processing the behavior data according to a first model to obtain a second time, the second time being a predicted time when the user arrives at the offline store; determining a first parameter corresponding to the behavior data, the first parameter being used to indicate a change of a prediction error of the behavior data in different iteration rounds of the first model; and updating the first model according to the first time, the second time and the first parameter. The accuracy of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more particularly to a model processing method, electronic device, storage medium, and program product. Background Technology

[0002] In some scenarios, predictive models can be used to forecast future events. For example, in a banking context, predictive models can be used to predict the date a user will visit a bank branch.

[0003] In related technologies, training samples can be obtained. These training samples may include user authorization behavior information during historical time periods and the actual time when the user arrives at the branch. The training samples are then input into the prediction model, and the prediction model is trained to obtain the predicted time when the user arrives at the branch.

[0004] However, in the above methods, the accuracy of the prediction model is low because there may be a large number of random users in the training samples. Summary of the Invention

[0005] This application provides a model processing method, electronic device, storage medium, and program product to improve the accuracy of prediction models.

[0006] In a first aspect, embodiments of this application provide a model processing method, including:

[0007] Obtain online behavior data of authorized users and the first moment corresponding to the behavior data, wherein the first moment is the moment when the user arrives at the offline store;

[0008] The behavioral data is processed according to the first model to obtain the second time point, which is the predicted time when the user arrives at the offline store;

[0009] A first parameter corresponding to the behavioral data is determined, and the first parameter is used to indicate the change of the prediction error of the first model for the behavioral data in different iteration rounds;

[0010] The first model is updated based on the first time point, the second time point, and the first parameter.

[0011] In one possible design, the first model is updated based on the first time step, the second time step, and the first parameter, including:

[0012] Determine the first difference between the first time point and the second time point;

[0013] Based on the first difference and the first parameter, a loss function is determined, and the first model is updated according to the loss function.

[0014] In one possible design, determining the first parameter corresponding to the behavioral data includes:

[0015] For the Tth iteration;

[0016] The third and fourth time points are obtained. The third time point is the time obtained by the first model processing the behavioral data in the (T-1)th iteration, and the fourth time point is the time obtained by the first model processing the behavioral data in the (T-2)th iteration. T takes the values ​​3, 4, ..., K in sequence, and K is the total number of iterations of the first model.

[0017] Based on the first time point, the third time point, and the fourth time point, determine the first parameter corresponding to the Tth iteration.

[0018] In one possible design, the first parameter corresponding to the T-th iteration is determined based on the first time point, the third time point, and the fourth time point, including:

[0019] Determine the second difference between the first time point and the third time point;

[0020] Determine the third difference between the first time point and the fourth time point;

[0021] The first parameter corresponding to the Tth iteration is determined based on the second difference and the third difference.

[0022] In one possible design, the first parameter corresponding to the T-th iteration is determined based on the second difference and the third difference, including:

[0023] Obtain the square of the second difference and the square of the third difference;

[0024] The ratio of the square of the third difference to the square of the second difference is determined as the first parameter.

[0025] In one possible design, after updating the first model, the method further includes:

[0026] When the loss function in the Tth iteration is less than or equal to the first threshold, a second parameter is determined, which is used to indicate the degree of deflection of the first model.

[0027] When the second parameter is less than or equal to the second threshold, the first model is determined to have completed training.

[0028] In one possible design, determining the second parameter includes:

[0029] Obtain the first fitting curve of the first model in the T-th iteration and the second fitting curve of the first model in the T+1-th iteration;

[0030] The second parameter is determined based on the distance between the first fitted curve and the second fitted curve.

[0031] Secondly, embodiments of this application provide a model processing apparatus, characterized in that it includes: an acquisition module, a processing module, a first determination module, and an update module, wherein,

[0032] The acquisition module is used to acquire the online behavior data of authorized users and the first moment corresponding to the behavior data, wherein the first moment is the moment when the user arrives at the offline store;

[0033] The processing module is used to process the behavioral data according to the first model to obtain a second moment, which is the predicted moment when the user arrives at the offline store.

[0034] The first determining module is used to determine a first parameter corresponding to the behavioral data, wherein the first parameter is used to indicate the change of the prediction error of the first model for the behavioral data in different iteration rounds;

[0035] The update module is used to update the first model based on the first time point, the second time point, and the first parameter.

[0036] In one possible design, the update module is specifically used for,

[0037] Determine the first difference between the first time point and the second time point;

[0038] Based on the first difference and the first parameter, a loss function is determined, and the first model is updated according to the loss function.

[0039] In one possible design, the first determining module is specifically used for,

[0040] For the Tth iteration;

[0041] The third and fourth time points are obtained. The third time point is the time obtained by the first model processing the behavioral data in the (T-1)th iteration, and the fourth time point is the time obtained by the first model processing the behavioral data in the (T-2)th iteration. T takes the values ​​3, 4, ..., K in sequence, and K is the total number of iterations of the first model.

[0042] Based on the first time point, the third time point, and the fourth time point, determine the first parameter corresponding to the Tth iteration.

[0043] In one possible design, the first determining module is specifically used for,

[0044] Determine the second difference between the first time point and the third time point;

[0045] Determine the third difference between the first time point and the fourth time point;

[0046] The first parameter corresponding to the Tth iteration is determined based on the second difference and the third difference.

[0047] In one possible design, the first determining module is specifically used for,

[0048] Obtain the square of the second difference and the square of the third difference;

[0049] The ratio of the square of the third difference to the square of the second difference is determined as the first parameter.

[0050] In one possible design, a second determining module is also included.

[0051] The first determining module is used to determine a second parameter when the loss function in the Tth iteration is less than or equal to a first threshold. The second parameter is used to indicate the degree of deflection of the first model.

[0052] When the second parameter is less than or equal to the second threshold, the first model is determined to have completed training.

[0053] In one possible design, the second determining module is specifically used for,

[0054] Obtain the first fitting curve of the first model in the T-th iteration and the second fitting curve of the first model in the T+1-th iteration;

[0055] The second parameter is determined based on the distance between the first fitted curve and the second fitted curve.

[0056] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to perform the model processing method described in the first aspect and various possible designs of the first aspect.

[0057] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the model processing method described in the first aspect and various possible designs of the first aspect.

[0058] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the model processing method described in the first aspect and various possible designs of the first aspect.

[0059] This application provides a model processing method, electronic device, storage medium, and program product. When model processing is required, it can acquire authorized user online behavior data and a first moment corresponding to the behavior data, where the first moment is the time the user arrives at the offline store. The behavior data is processed according to a first model to obtain a second moment, which is the predicted time the user arrives at the offline store. A first parameter corresponding to the behavior data is determined, indicating the change in the prediction error of the first model for the behavior data in different iteration rounds. The first model is updated based on the first moment, the second moment, and the first parameter. In this way, the first model can be updated according to the change in the prediction error of the first model for the behavior data in different iteration rounds, thereby reducing the impact of random user behavior data on the first model, and thus reducing prediction error and improving prediction accuracy in multiple rounds of model iteration. Attached Figure Description

[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0061] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application;

[0062] Figure 2 A schematic flowchart illustrating a model processing method provided in an embodiment of this application;

[0063] Figure 3 A schematic diagram illustrating the prediction error for different iteration rounds provided in the embodiments of this application;

[0064] Figure 4 A schematic diagram illustrating the updating of the first model provided in the embodiments of this application;

[0065] Figure 5 A schematic diagram illustrating the process of determining the first parameter for an embodiment of this application;

[0066] Figure 6This is a schematic diagram illustrating the process of determining the method for completing model training in an embodiment of this application;

[0067] Figure 7 A schematic diagram illustrating the process of using the first model provided in the embodiments of this application;

[0068] Figure 8 This is a schematic diagram of the structure of a model processing device provided in an embodiment of this application;

[0069] Figure 9 This is a schematic diagram of another model processing device provided in an embodiment of this application;

[0070] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[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 used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0074] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0075] It should be noted that the model processing method, electronic device, storage medium, and program product provided in this application can be used in the field of artificial intelligence, or in any field other than artificial intelligence. The application field of the model processing method, electronic device, storage medium, and program product in this application is not limited.

[0076] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0077] To facilitate understanding, the following will be combined with... Figure 1 The system architecture applicable to the embodiments of this application will be described.

[0078] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application. Please refer to [link / reference]. Figure 1 This includes electronic equipment 101 and branch network equipment 102. Electronic equipment 101 can refer to devices with on-device computing capabilities, such as terminal devices or servers. Branch network equipment 102 can refer to equipment within a bank branch used to process customer transactions, such as bank queuing machines or self-service machines. Branch network equipment 102 can obtain the time when a user arrives at the bank branch and send this time to electronic equipment 101. Electronic equipment 101 can then train a prediction model based on the user's behavioral information and the time of arrival at the bank branch.

[0079] In related technologies, electronic devices can acquire training samples, which may include user authorization behavior information during historical time periods and the actual time of user arrival at the service point. These training samples are then input into a prediction model to train the model, thereby obtaining the predicted user arrival time at the service point. However, in this method, because the training samples may contain a large number of random users—meaning that the behavior of random users arriving at the service point is temporary and random, and has little correlation with historical behavior information—the quality of the training samples is poor. This fails to eliminate the influence of random user data on the prediction of regular user arrivals, resulting in low accuracy of the prediction model.

[0080] To address the aforementioned technical issues, in this embodiment, when model processing is required, authorized user online behavior data and a first moment corresponding to the behavior data can be obtained. The first moment is the time when the user arrives at the offline store. The behavior data is processed according to the first model to obtain a second moment, which is the predicted time when the user arrives at the offline store. A first parameter corresponding to the behavior data is determined, which indicates the change in the prediction error of the first model for the behavior data in different iterations. A first difference between the first moment and the second moment is determined. Based on the first difference and the first parameter, a loss function is determined, and the first model is updated according to the loss function. In this way, the loss function of the model can be determined through the first difference and the first parameter, and the model can be updated through the loss function, thereby reducing prediction error and improving prediction accuracy.

[0081] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0082] Figure 2 This is a flowchart illustrating a model processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 As shown, the method may include the following steps:

[0083] S201. Obtain the online behavior data of authorized users, and the first moment corresponding to the behavior data.

[0084] The execution subject in this application embodiment can be an electronic device, which can be any device with on-device computing capabilities, such as a computer, server, etc., or a model processing device installed in the electronic device. The model processing device can be implemented by software or by a combination of software and hardware.

[0085] Behavioral data can refer to user behavior data collected by electronic devices over a historical period, such as the past week or the past month. For example, behavioral data can refer to user behavior data collected over the past month.

[0086] Behavioral data can refer to users' online behavior data. For example, behavioral data can be the duration of a user's access to mobile banking within a historical period, or the content accessed by a user while using mobile banking within a historical period.

[0087] Optionally, behavioral data can also refer to users' offline behavior. For example, behavioral data can be the frequency with which users visit offline outlets during historical periods, or the types of services users conduct at offline outlets during historical periods.

[0088] For example, behavioral data could refer to the amount of time a user spends accessing mobile banking over the past week.

[0089] Behavioral data can be obtained in the following ways: a user's terminal can record the user's behavioral data and send the behavioral data to an electronic device, where the user's terminal can refer to the user's mobile phone, tablet, computer, or other devices; after receiving the behavioral data, the electronic device can store the behavioral data in the electronic device's database; when the electronic device is training a model, it can use the acquired behavioral data from the database as samples for training.

[0090] Optionally, behavioral data can also be preset sample data stored in a database. When an electronic device is training a model, it can obtain behavioral data from the database as samples for training.

[0091] The first moment can be the moment when the user arrives at the offline store.

[0092] For example, if a user accesses mobile banking on December 1st and then arrives at a physical store on December 3rd, then December 3rd can be considered the first moment; if a user accesses mobile banking on December 1st and then arrives at a physical store at 10:00 AM on December 3rd, then 10:00 AM on December 3rd can be considered the first moment.

[0093] Understandably, the first moment can also refer to two moments, that is, the first moment can also indicate the time when the user arrives at the offline store. For example, if the user arrives at the offline store at 9:30 am on December 3, then the first moment can be 9:00 am on December 3 and 10:00 am on December 3, that is, the time when the user arrives at the offline store is from 9:00 am to 10:00 am on December 3.

[0094] For example, the first moment can be obtained as follows: the branch equipment of a bank's offline stores can record the time when a user arrives at the offline store. The branch equipment can refer to electronic devices such as bank queuing machines and self-service machines. The first moment can be the time when the user uses the branch equipment. For example, assuming that a user queues up to get a number at the queuing machine of a bank's offline store at 3 pm on October 12, then 3 pm on October 12 can be determined as the first moment.

[0095] S202. Process the behavioral data according to the first model to obtain the second moment.

[0096] The first model can refer to a model used to predict when a user will arrive at a physical store. Behavioral data can be input into the first model, which processes the input data and outputs the predicted time. The predicted time can be a date (e.g., January 14th), a specific time (e.g., 3 PM on January 14th), or two times (e.g., 3 PM and 4 PM on January 14th). Understandably, two times can indicate a time period, i.e., the predicted time period when a user will arrive at the physical store.

[0097] For example, assuming the behavioral data is the duration of a user's mobile banking access from March 1st to March 7th, the behavioral data can be input into the first model. The first model processes the input behavioral data and outputs the predicted time. The predicted time can be a date, such as March 9th, or a specific time, such as 9:00 AM on March 9th, or two times, such as 10:00 AM and 11:00 AM on March 8th.

[0098] The second moment can be the time when the electronic device predicts the time when the user arrives at the offline store, and the second moment can be the time when the first model outputs the behavioral data after processing it.

[0099] Understandably, the first moment is the actual time the user arrives at the offline store, and the second moment is the predicted time the user will arrive at the offline store based on behavioral data from the electronic device. When the first and second moments are the same, it means that the actual time the user arrives at the offline store and the predicted time based on behavioral data are the same, i.e., the prediction is accurate; when the first and second moments are different, it means that the actual time the user arrives at the offline store and the predicted time based on behavioral data are different, i.e., the prediction is inaccurate.

[0100] S203. Determine the first parameter corresponding to the behavioral data.

[0101] The first parameter can be used to indicate how the prediction error of the first model changes across different iterations of the behavioral data. The first model can be trained multiple times on training data, which can refer to multiple behavioral data sets, such as the behavioral data of multiple users across multiple historical time periods. For example, the first parameter can indicate the change in prediction between the third and fourth iterations.

[0102] The first parameter can be determined as follows: obtain the prediction error of the current iteration and the prediction error of the previous iteration, and determine the ratio of the prediction error of the current iteration to the prediction error of the previous iteration as the first parameter.

[0103] For example, assuming the prediction error of the current iteration is prediction error a, and the prediction error of the previous iteration is prediction error b, then the first parameter is prediction error b divided by prediction error a. Optionally, assuming the prediction error of the current iteration is prediction error a, and the prediction error of the previous n iterations is prediction error c, then the first parameter is prediction error c divided by prediction error a.

[0104] Prediction error can refer to the difference between the prediction time output by the first model and the first time.

[0105] For example, for the same behavioral data, assuming the first time step is A, the predicted time step output in the fifth iteration is B, and the predicted time step output in the sixth iteration is C, then the prediction error in the fifth iteration is BA, and the prediction error in the sixth iteration is CA. The prediction error can be the average of the prediction error in the fifth iteration and the prediction error in the sixth iteration.

[0106] For example, for multiple behavioral data, a first prediction error can be determined for each behavioral data. The prediction error can be the average of multiple first prediction errors. That is, assuming the prediction error of the first behavioral data is A, the prediction error of the second behavioral data is B, and the prediction error of the third behavioral data is C, then the prediction error can be the average of A, B, and C.

[0107] The following specific examples illustrate the prediction error for different iteration rounds.

[0108] Figure 3 This diagram illustrates the prediction error for different iteration rounds provided in the embodiments of this application. Please refer to... Figure 3 In the Mth iteration, the prediction error obtained for behavior data 1 is prediction error a, the prediction error obtained for behavior data 2 is prediction error b, the prediction error obtained for behavior data 3 is prediction error c, and the prediction error obtained for behavior data 4 is prediction error d. In the Kth iteration, the prediction error obtained for behavior data 1 is prediction error e, the prediction error obtained for behavior data 2 is prediction error f, the prediction error obtained for behavior data 3 is prediction error j, and the prediction error obtained for behavior data 4 is prediction error h. Therefore, the prediction error can be the average of the differences between prediction errors a and e, the differences between prediction errors b and f, the differences between prediction errors c and g, and the differences between prediction errors d and h.

[0109] Understandably, changes in prediction error can reflect the effectiveness of the first model's training. That is, if the prediction error between the Kth iteration and the (K+1)th iteration is smaller than the prediction error between the Kth iteration and the (K-1)th iteration, it indicates a positive change in prediction error, meaning the first model's training is effective, causing it to gradually converge to the optimal solution.

[0110] S204. Update the first model based on the first time point, the second time point, and the first parameters.

[0111] Updating the first model can refer to updating the first model by determining the loss function.

[0112] The first model can be updated as follows: determine the first difference between the first time step and the second time step; determine the loss function based on the first difference and the first parameter; and update the first model based on the loss function.

[0113] For example, assuming the first time is 3 o'clock and the second time is 6 o'clock, then the first difference between the first time and the second time is 3.

[0114] Assume N is the total number of samples and T is the current iteration round. This represents the true value of the i-th sample (the moment a user arrives at the offline store). Let A be the predicted value of the i-th sample (the electronic device predicts the second moment when the user arrives at the offline store), and A be the first parameter. Then the loss function is... It can be represented as:

[0115]

[0116] The following example illustrates the process of updating the first model.

[0117] Figure 4 This is a schematic diagram illustrating the updating of the first model provided in an embodiment of this application. Please refer to... Figure 4 The sample is input into the first model to obtain the second time step output by the first model. The sample can refer to the online behavior data of authorized users and the first time step corresponding to the behavior data. The loss function can be determined based on the second time step, and the first model can be updated based on the loss function.

[0118] In this embodiment, when the model needs to be processed, authorized user online behavior data and the corresponding first moment can be obtained. The behavior data is then processed according to a first model to obtain a second moment. The first model can refer to a model used to predict the moment a user arrives at an offline store, and the second moment can be the moment an electronic device predicts the user's arrival at the offline store. A first parameter corresponding to the behavior data is determined. This first parameter can indicate the change in the prediction error of the first model for the behavior data in different iterations. A first difference is determined based on the difference between the first and second moments. A loss function is determined based on the first difference and the first parameter. The first model is then updated based on the loss function. Thus, by determining the loss function through the difference between the predicted and actual values ​​(i.e., the first difference) and the first parameter indicating the change in prediction error, the prediction accuracy of the first model can be optimized, thereby improving the accuracy of the first model's predictions. Furthermore, with each iteration of the first model, the loss function can be dynamically adjusted, making the updated first model more accurate and adaptable to more sample data, thus improving the flexibility of the first model.

[0119] exist Figure 5 Based on the embodiments shown, the following, in conjunction with Figure 5 The method for the terminal device to obtain the first parameter corresponding to the behavioral data in the above model processing method is explained in detail. Since the training of the first model is a multi-round iterative training, therefore, in Figure 5 In the embodiment shown, the current round is taken as the Tth iteration for illustration.

[0120] Figure 5 This is a schematic diagram illustrating the process of determining the first parameter for an embodiment of this application. Figure 5 In the described embodiment, the first model is the Tth iteration; please refer to [link to previous document]. Figure 5 ,include:

[0121] S501, Obtain the third and fourth time points.

[0122] The third moment can be the moment obtained by the first model processing the behavioral data in the (T-1)th iteration.

[0123] For example, for the same behavioral data, assuming the current iteration is the fifth iteration, the predicted time when the user arrives at the offline store is obtained from the fourth iteration, and this predicted time is determined as the third time.

[0124] The fourth moment can be the moment obtained by the first model processing the behavioral data in the (T-2)th iteration.

[0125] For example, for the same behavioral data, assuming the current iteration is the fifth iteration, the predicted time when the user arrives at the offline store obtained in the third iteration is obtained, and this predicted time is determined as the fourth time.

[0126] The value of T can be 3, 4, ..., K, where K is the total number of iterations of the first model.

[0127] The total number of iterations K for the first model can be determined based on the loss function. For example, when the loss function is less than a first preset value, the first model can be considered to be converging, meaning that the predicted time output by the first model is close to the actual time. If the loss function of the 10th iteration is less than the first preset value, then the total number of iterations of the first model can be determined to be 10, that is, K can be taken as 10.

[0128] The total number of iterations K for the first model can also be determined based on the prediction error. For example, when the prediction error of the first model is less than the second preset value, it can be considered that the first model is converging, that is, the predicted time output by the first model is close to the actual time. If the prediction error between the 15th iteration and the 14th iteration is less than the second preset value, then the total number of iterations of the first model can be determined to be 15, that is, K can be taken as 15.

[0129] S502. Based on the first time point, the third time point, and the fourth time point, determine the first parameter corresponding to the Tth iteration.

[0130] The first parameter corresponding to the Tth iteration can be determined as follows: determine the second difference between the first time step and the third time step; determine the third difference between the first time step and the fourth time step; and determine the first parameter corresponding to the Tth iteration based on the second difference and the third difference.

[0131] For example, the first parameter corresponding to the Tth iteration can refer to the ratio of the difference between the predicted arrival time and the actual arrival time obtained in the (T-1)th iteration to the difference between the predicted arrival time and the actual arrival time obtained in the Tth iteration.

[0132] The second difference can be the difference between the first time point and the third time point. For example, if the first time point is 5 o'clock and the third time point is 4 o'clock, then the second difference is 1.

[0133] The third difference can be the difference between the first time point and the fourth time point. For example, if the first time point is 5 o'clock and the fourth time point is 7 o'clock, then the third difference is 2.

[0134] The first parameter corresponding to the Tth iteration can be determined based on the second and third differences. The first parameter can be the ratio of the second and third differences.

[0135] Optionally, the first parameter can also be determined by obtaining the square of the second difference and the square of the third difference; the ratio of the square of the third difference to the square of the second difference is determined as the first parameter.

[0136] Assume that T is the current iteration round, and i refers to the i-th sample. This represents the true value of the i-th sample (e.g., the actual time when the i-th sample arrives at the store). This is the prediction result of the first model in the T-1 iteration (e.g., the user arrival time predicted by the i-th sample in the T-1 iteration). Let A be the difference between the prediction result of the first model in the T-2 iterations and the actual value (e.g., the difference between the predicted arrival time of the user and the actual arrival time of the user for the i-th sample in the T-2 iterations). Then the first parameter A can be expressed as:

[0137]

[0138] Based on the description of the above embodiments, it is assumed that N is the total number of samples and T is the current iteration round. This represents the true value of the i-th sample (e.g., the actual time when the i-th sample arrives at the store). Let be the predicted value for the i-th sample (e.g., the predicted time of customer arrival for the i-th sample in round T), where i is the i-th sample. This is the prediction result of the first model in the T-1 iteration (e.g., the user arrival time predicted by the i-th sample in the T-1 iteration). The loss function in this application is the difference between the prediction result of the first model in the T-2 iterations and the true value (e.g., the difference between the predicted user arrival time and the actual user arrival time for the i-th sample in the T-2 iterations). It can be represented as:

[0139]

[0140] exist Figure 5In the illustrated embodiment, when the model needs to be processed, the first parameter corresponding to the behavioral data can be obtained. For the T-th iteration, the third and fourth time points are obtained. The third time point can be the time obtained by the first model processing the behavioral data in the (T-1)-th iteration, and the fourth time point can be the time obtained by the first model processing the behavioral data in the (T-2)-th iteration. A second and third difference are determined. The second difference can be the difference between the first and third time points, and the third difference can be the difference between the first and fourth time points. The first parameter can be the ratio of the second and third difference, or it can be the ratio of the square of the third difference to the square of the second difference. Thus, for a given behavioral data point, the first parameter can be used as a weight in the loss function. That is, when the second difference is large (i.e., the predicted value differs significantly from the true value), the sample indicated by the behavioral data can be considered a random sample. Since random samples affect the accuracy of the first model, the weight of this sample is reduced by setting the first parameter, i.e., the first parameter is reduced, thereby reducing the impact of random samples on the first model.

[0141] Based on any of the above embodiments, the above model processing method further includes a method for determining whether the model has completed training. Below, in conjunction with... Figure 6 The method for determining the completion of model training is explained in detail.

[0142] Figure 6 This is a schematic diagram illustrating the process of determining the method for completing model training in an embodiment of this application. Please refer to... Figure 6 ,include:

[0143] S601. When the loss function in the Tth iteration is less than or equal to the first threshold, determine the second parameter.

[0144] The second parameter can be used to indicate the degree of deflection of the first model.

[0145] The degree of deflection refers to the difference between the first fitted curve obtained in the T-th iteration and the second fitted curve obtained in the (T-1)-th iteration. Understandably, the presence of random samples can cause deflection in the fitted curve. For example, suppose some users do not have any data indicating they might visit the store, but due to the randomness of user behavior, they still arrive at the physical store; such random samples will cause deflection in the fitted curve.

[0146] Here, the first fitted curve can refer to the function curve of the first model obtained in the T-th iteration, and the second fitted curve can refer to the function curve of the first model obtained in the (T-1)-th iteration. For example, the first fitted curve can be used to describe the relationship between user behavior data and the predicted user arrival time in the (T-1)-th iteration. The second fitted curve can be used to describe the relationship between user behavior data and the predicted user arrival time in the (T-2)-th iteration.

[0147] The first threshold can be a value that the user has preset in the electronic device; for example, the first threshold can be 10.

[0148] When the loss function in the Tth iteration is less than or equal to the first threshold, the current loss function can be considered sufficiently small, meaning the predicted value obtained by the first model is close enough to the true value, and the first model is close to convergence. For example, when the user's predicted arrival time and the user's actual arrival time are sufficiently close, the first model can be considered close to convergence.

[0149] The second parameter can be determined as follows: obtain the first fitting curve of the first model in the Tth iteration and the second fitting curve of the first model in the T+1th iteration; determine the second parameter based on the distance between the first fitting curve and the second fitting curve.

[0150] The first fitted curve can be determined in the following ways: the electronic device can determine the fitting model, such as a linear regression model or a quadratic regression model; determine the fitting method, such as the least squares method or the gradient descent method; and evaluate multiple fitted curves based on the fitting model, the fitting method, and the prediction time, such as the mean square error method or the residual analysis method, to determine multiple fitted curves and obtain the optimal first fitted curve.

[0151] The second fitted curve can be determined in the following ways: the electronic device can determine the fitting model, such as a linear regression model or a quadratic regression model; determine the fitting method, such as the least squares method or the gradient descent method; based on the fitting model, the fitting method, and the prediction time, multiple fitted curves can be determined, and the multiple fitted curves can be evaluated, such as by the mean square error method or the residual analysis method, to obtain the optimal second fitted curve.

[0152] The distance between the first and second fitted curves can be determined as follows: determine the slope of the first and second fitted curves, and use the difference between the slopes of the first and second fitted curves as the distance between them, i.e., the second parameter.

[0153] The distance between the first and second fitted curves can also be determined as follows: determine the shortest distance between the first and second fitted curves, and set the shortest distance as the distance between the first and second fitted curves, i.e., the second parameter.

[0154] The distance between the first and second fitted curves can also be determined as follows: multiple first sampling points are determined on the first fitted curve, and multiple second sampling points are determined on the second fitted curve, with the ordinates of the multiple first sampling points and the multiple second sampling points corresponding one-to-one; the first and second sampling points with the same ordinate are determined as a sampling group, the difference in the abscissa of each sampling group is determined, and the average of the multiple differences is determined as the distance between the first and second fitted curves, i.e., the second parameter.

[0155] Understandably, the larger the second parameter, the greater the distance between the first and second fitted curves, indicating a greater difference in the function determined by the first model in the two iterations; the smaller the second parameter, the smaller the distance between the first and second fitted curves, indicating a smaller difference in the function determined by the first model in the two iterations, meaning the first model is gradually converging to the optimal solution.

[0156] Assume that N is the total number of samples, T is the current iteration round, and i is the i-th sample. This is the prediction result of the first model in the (T-1)th iteration (e.g., the user arrival time predicted by the i-th sample in the (T-1)th iteration). Given the prediction result of the first model in T iterations (e.g., the predicted arrival time of the user for the i-th sample in the T-th iteration), then the second parameter... It can be represented as:

[0157]

[0158] It should be noted that since T takes values ​​of 3, 4, ..., K sequentially (i.e., T starts from 3), let's assume N is the total number of samples and M is the current iteration number, with M taking the value 1 or 2. This represents the true value of the i-th sample (e.g., the actual time when the i-th sample arrives at the store). For the predicted value of the i-th sample (e.g., the predicted time of the user's arrival in the store for the i-th sample in round T), the loss functions for the first and second iterations are... It can be represented as:

[0159]

[0160] S602. When the second parameter is less than or equal to the second threshold, determine that the first model has completed training.

[0161] The second threshold can be a value that the user has preset in the electronic device. For example, the second threshold can be 5.

[0162] When the second parameter is less than or equal to the second threshold, the first model can be considered to have a smaller degree of deflection. That is, the fitting curves obtained in the two iterations are close to each other, meaning that the first model is close to the optimal solution, and the training of the first model can be considered complete.

[0163] exist Figure 6 In the illustrated embodiment, when model processing is required, the method for completing model training needs to be determined. When the loss function in the Tth iteration is less than or equal to a first threshold, a second parameter is determined. This second parameter can be used to indicate the degree of deviation of the first model. When the second parameter is less than or equal to the second threshold, the first model is considered to have completed training. Thus, when the loss function is sufficiently small, the degree of deviation between the first and second fitted curves is judged. If the deviation tends to stabilize, the current first model is determined to be the optimal solution, and the first model is considered to have completed training. This double-checking approach improves the accuracy of the first model.

[0164] Based on any of the above embodiments, after the first model has been trained, the embodiments of this application also include a method for using the first model. Below, in conjunction with... Figure 7 The method of using the first model will be explained.

[0165] Figure 7 This is a schematic diagram illustrating the process of using the first model provided in an embodiment of this application. Please refer to... Figure 7 ,include:

[0166] S701, Obtain behavioral data of multiple users during historical time periods.

[0167] S702. Input the behavioral data of multiple users into the first model to obtain multiple prediction times output by the first model.

[0168] S703. Determine the shift schedule based on multiple predicted times.

[0169] For example, if the first model outputs multiple predicted times indicating that a large number of users will arrive at offline stores on January 3, then the number of staff on duty on January 3 can be increased in advance, or related business activities can be held on January 3.

[0170] If the multiple predicted times output by the first model indicate that fewer people will arrive at offline stores on January 3, then the number of staff on duty on January 3 can be reduced in advance to save human resources.

[0171] exist Figure 7In the illustrated embodiment, behavioral data of multiple users over historical time periods can be acquired and input into a first model to obtain multiple predicted times output by the first model. Based on these predicted times, if a large number of users are expected to arrive at the offline store at a certain time, the number of staff on duty can be increased; conversely, if a large number of users are expected to arrive at the offline store at a certain time, the number of staff on duty can be reduced. In this way, through the predictions of the first model, the arrival status of users can be anticipated in advance, allowing offline stores to arrange staffing or prepare business activities ahead of time, thereby improving the efficiency of personnel utilization and the effectiveness of events.

[0172] Figure 8 This is a schematic diagram of a model processing device provided in an embodiment of this application. Please refer to... Figure 8 The model processing device 10 includes: an acquisition module 11, a processing module 12, a first determination module 13, and an update module 14, wherein,

[0173] The acquisition module 11 is used to acquire the online behavior data of the authorized user and the first moment corresponding to the behavior data, wherein the first moment is the moment when the user arrives at the offline store;

[0174] The processing module 12 is used to process the behavioral data according to the first model to obtain a second time, which is the predicted time when the user arrives at the offline store.

[0175] The first determining module 13 is used to determine a first parameter corresponding to the behavioral data, wherein the first parameter is used to indicate the change of the prediction error of the first model for the behavioral data in different iteration rounds;

[0176] The update module 14 is used to update the first model based on the first time point, the second time point, and the first parameter.

[0177] The model processing method provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0178] In one possible design, the update module 14 is specifically used for,

[0179] Determine the first difference between the first time point and the second time point;

[0180] Based on the first difference and the first parameter, a loss function is determined, and the first model is updated according to the loss function.

[0181] In one possible design, the first determining module 13 is specifically used for,

[0182] For the Tth iteration;

[0183] The third and fourth time points are obtained. The third time point is the time obtained by the first model processing the behavioral data in the (T-1)th iteration, and the fourth time point is the time obtained by the first model processing the behavioral data in the (T-2)th iteration. T takes the values ​​3, 4, ..., K in sequence, and K is the total number of iterations of the first model.

[0184] Based on the first time point, the third time point, and the fourth time point, determine the first parameter corresponding to the Tth iteration.

[0185] In one possible design, the first determining module 13 is specifically used for,

[0186] Determine the second difference between the first time point and the third time point;

[0187] Determine the third difference between the first time point and the fourth time point;

[0188] The first parameter corresponding to the Tth iteration is determined based on the second difference and the third difference.

[0189] In one possible design, the first determining module 13 is specifically used for,

[0190] Obtain the square of the second difference and the square of the third difference;

[0191] The ratio of the square of the third difference to the square of the second difference is determined as the first parameter.

[0192] Figure 9 This is a schematic diagram of another model processing device provided in an embodiment of this application. Figure 8 Based on what is shown, please refer to Figure 9 The model processing device 10 further includes: a second determining module 15.

[0193] The second determining module 15 is used to determine a second parameter when the loss function in the Tth iteration is less than or equal to a first threshold. The second parameter is used to indicate the degree of deflection of the first model.

[0194] When the second parameter is less than or equal to the second threshold, the first model is determined to have completed training.

[0195] In one possible design, the second determining module 15 is specifically used for,

[0196] Obtain the first fitting curve of the first model in the T-th iteration and the second fitting curve of the first model in the T+1-th iteration;

[0197] The second parameter is determined based on the distance between the first fitted curve and the second fitted curve.

[0198] The model processing method provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0199] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device 20 may include: a transceiver 21, a processor 22, and a memory 23.

[0200] Processor 22 executes computer execution instructions stored in memory, causing processor 22 to perform the scheme in the above embodiments. Processor 22 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0201] The memory 23 is connected to the processor 22 via the system bus and completes communication between them. The memory 23 is used to store computer program instructions.

[0202] Transceiver 21 can be used to obtain the task to be run and the configuration information of the task to be run.

[0203] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0204] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.

[0205] This application also provides a chip for executing instructions, which is used to execute the technical solution of the model processing method in the above embodiments.

[0206] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the model processing method described in the above embodiments.

[0207] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the model processing method in the above embodiments.

[0208] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0209] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0210] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0211] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0212] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0213] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0214] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0215] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0216] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.

[0217] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0218] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A model processing method characterized by comprising: include: Obtain online behavior data of authorized users and the first moment corresponding to the behavior data, wherein the first moment is the moment when the user arrives at the offline store; The behavioral data is processed according to the first model to obtain the second time point, which is the predicted time when the user arrives at the offline store; A first parameter corresponding to the behavioral data is determined, and the first parameter is used to indicate the change of the prediction error of the first model for the behavioral data in different iteration rounds; The first model is updated based on the first time point, the second time point, and the first parameter.

2. The method of claim 1, wherein, The first model is updated based on the first time point, the second time point, and the first parameter, including: Determine the first difference between the first time point and the second time point; Based on the first difference and the first parameter, a loss function is determined, and the first model is updated according to the loss function.

3. The method of claim 1, wherein, Determining the first parameter corresponding to the behavioral data includes: For the Tth iteration; The third and fourth time points are obtained. The third time point is the time obtained by the first model processing the behavioral data in the (T-1)th iteration, and the fourth time point is the time obtained by the first model processing the behavioral data in the (T-2)th iteration. T takes the values ​​3, 4, ..., K in sequence, and K is the total number of iterations of the first model. Based on the first time point, the third time point, and the fourth time point, determine the first parameter corresponding to the Tth iteration.

4. The method of claim 3, wherein, Based on the first time point, the third time point, and the fourth time point, the first parameter corresponding to the Tth iteration is determined, including: Determine the second difference between the first time point and the third time point; Determine the third difference between the first time point and the fourth time point; The first parameter corresponding to the Tth iteration is determined based on the second difference and the third difference.

5. The method of claim 4, wherein, Based on the second difference and the third difference, the first parameter corresponding to the Tth iteration is determined, including: Obtain the square of the second difference and the square of the third difference; The ratio of the square of the third difference to the square of the second difference is determined as the first parameter.

6. The method according to any one of claims 1 to 4, characterized in that, After updating the first model, the method further includes: When the loss function in the Tth iteration is less than or equal to the first threshold, a second parameter is determined, which is used to indicate the degree of deflection of the first model; When the second parameter is less than or equal to the second threshold, the first model is determined to have completed training.

7. The method of claim 6, wherein, Determine the second parameter, including: Obtain the first fitting curve of the first model in the T-th iteration and the second fitting curve of the first model in the T+1-th iteration; The second parameter is determined based on the distance between the first fitted curve and the second fitted curve.

8. A model processing apparatus characterized by comprising: include: The module comprises an acquisition module, a processing module, a first determination module, and an update module, among which, The acquisition module is used to acquire the online behavior data of authorized users and the first moment corresponding to the behavior data, wherein the first moment is the moment when the user arrives at the offline store; The processing module is used to process the behavioral data according to the first model to obtain a second moment, which is the predicted moment when the user arrives at the offline store. The first determining module is used to determine a first parameter corresponding to the behavioral data, wherein the first parameter is used to indicate the change of the prediction error of the first model for the behavioral data in different iteration rounds; The update module is used to update the first model based on the first time point, the second time point, and the first parameter.

9. An electronic device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.

11. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.