Data processing method and device, nonvolatile storage medium and electronic equipment
By screening and inputting historical statistical cycle data into the neural network model and integrating consumption characteristics, the problem of large data volume when the neural network model predicts consumption amount is solved, and the prediction speed and computing resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202410923289.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, neural network models require a large amount of data as input when predicting consumption amounts, resulting in problems such as high computing resource usage, slow prediction speed, and long prediction time that have not been effectively solved.
By receiving query requests, the historical consumption data of the target object is obtained, filtered and input into the prediction model. The consumption data contained in multiple historical statistical periods before the current statistical period is used as training data. The trained prediction model is integrated into the consumption characteristics. Reduce the amount of training data and increase prediction speed.
On the basis of ensuring the accuracy of prediction results, it reduces the waste of computing resources, improves the training speed, and solves the problem of slow prediction speed.
Smart Images

Figure CN118798958A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular, to a data processing method and device, a non-volatile storage medium, and an electronic device. Background Art
[0002] In the related art, the use of random forest algorithm to train a neural network model for predicting consumption amounts requires a large amount of data as training data. For example, all data related to the consumption amount that can be collected is usually used as training data. Therefore, a large amount of computing resources is required, and there may be lags in the model training process, resulting in long training time and slow training speed.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device, a non-volatile storage medium, and an electronic device to at least solve the technical problems of wasting computing resources, slow prediction speed, and long prediction time caused by the need to use a large amount of data as input data when using a neural network model to predict the consumption amount in the related technology.
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, including: receiving a query request, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in an interactive interface; in response to the query request, obtaining a first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in a time interval before the current time interval, and the second category of historical consumption data contained in a statistical period before the current statistical period, wherein the current statistical period includes multiple time intervals; determining data to be input in the first category of historical consumption data, and inputting the data to be input into a prediction model for analysis to obtain a predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model using consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than a preset time interval.
[0006] Optionally, determining the data to be input in the first category of historical consumption data includes: obtaining the timestamp of each second category of historical consumption data, wherein each timestamp is used to indicate the generation time of each second category of historical consumption data; filtering the second category of consumption data in the second category of historical consumption data according to the timestamp, and determining the second category of consumption data and the first category of consumption data as the data to be input.
[0007] Optionally, the second category of consumption data is filtered out from the second category of historical consumption data based on the timestamp, including: classifying the second category of historical consumption data corresponding to timestamps belonging to the same time interval into a data set to obtain multiple data sets; determining a target data set corresponding to the target time interval from the multiple data sets, wherein the target time interval and the current time interval are the same time interval in different statistical periods; and determining the data in the target data set as the second category of consumption data.
[0008] Optionally, before inputting the data to be input into the prediction model, the method includes: determining a target parameter based on the training data, wherein the target parameter is used to indicate whether to call the prediction model; comparing the target parameter with a preset value to obtain a first comparison result; when the first comparison result indicates that the numerical value corresponding to the target parameter is less than or equal to the preset value, determining to call the prediction model; when the first comparison result indicates that the numerical value corresponding to the target parameter is greater than the preset value, refusing to call the prediction model, and returning a first type of prompt information indicating query failure to the target object.
[0009] Optionally, after obtaining the predicted consumption amount, the method further includes: obtaining the disposable pension amount of the target object, and comparing the disposable pension amount with the predicted consumption amount to obtain a second comparison result; and performing an operation corresponding to the second comparison result.
[0010] Optionally, when the second comparison result indicates that the disposable pension amount is greater than the predicted consumption amount, an operation corresponding to the second comparison result is performed, including: obtaining a number series corresponding to the consumption type, wherein different consumption types correspond to different number series, and the number series contains multiple coefficients corresponding to different consumption types; generating a predicted consumption details based on the number series and the predicted consumption amount, wherein the predicted consumption details include: the consumption amount corresponding to each consumption category, the difference between the disposable pension amount and the predicted consumption amount, and the consumption categories include at least: food consumption, shopping consumption and transportation consumption.
[0011] Optionally, when the second comparison result indicates that the disposable pension amount is less than or equal to the predicted consumption amount, an operation corresponding to the second comparison result is performed, including: outputting a second type of prompt information to the target object for prompting a change in the consumption type, and information prompting the target object to avoid consumption on a preset consumption type, wherein the preset consumption types include: shopping consumption and entertainment consumption.
[0012] According to another aspect of an embodiment of the present application, a data processing device is also provided, including: a receiving module, used to receive a query request, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in an interactive interface; a response module, used to respond to the query request and obtain a first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; a determination module, used to determine the data to be input in the first category of historical consumption data, and input the data to be input into a prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model using the consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than a preset time interval.
[0013] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, in which a computer program is stored, wherein the above-mentioned data processing method is executed by running the computer program on a device where the non-volatile storage medium is located.
[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned data processing method through the computer program.
[0015] According to another aspect of an embodiment of the present application, a computer program product is also provided, including computer instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.
[0016] In an embodiment of the present application, a query request is received, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in the interactive interface; in response to the query request, a first category of historical consumption data of the target object is obtained, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; data to be input is determined in the first category of historical consumption data, and the data to be input is input into the prediction model for analysis to obtain a predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model using consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than a preset time interval, and by analyzing The consumption data of the application object is used to determine the consumption characteristics of the application object. The consumption characteristics of the application object are integrated into the training process of the prediction model to obtain a prediction model with seasonal characteristics. During the training process, the prediction model only uses the consumption data generated within a certain time interval from the current prediction moment as training data, thereby achieving the purpose of reducing the amount of data that needs to be processed during the model training process. Since the consumption characteristics of the application object are also integrated, even if the amount of training data is reduced, the accuracy of the prediction results can still be guaranteed not to be reduced. This achieves the technical effect of reducing the amount of data that needs to be processed in the training process to reduce the waste of computing resources while ensuring that the accuracy of the prediction results output by the prediction model is not reduced, thereby improving the training speed. This further solves the technical problems of consuming computing resources, slow prediction speed, and long prediction time caused by the need to use a large amount of data as input data when using a neural network model to predict the consumption amount in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a data processing method according to an embodiment of the present application;
[0019] Figure 2 is a flowchart of a method for processing data according to an embodiment of the present application;
[0020] Figure 3 is a structural diagram of a data processing device according to an embodiment of the present application;
[0021] Figure 4It is a workflow diagram of a data processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] In the related art, when using the model to predict the consumption amount, a lot of consumption data needs to be analyzed, and the amount of data is large. Therefore, there are problems such as occupying a lot of computing resources, slow prediction speed, and long prediction time. In order to solve this problem, the embodiments of the present application provide relevant solutions, which are described in detail below.
[0025] According to an embodiment of the present application, a method embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a data processing method. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0027] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned data processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0031] The present application embodiment provides a data processing method that can be run in the above-mentioned operating environment. Figure 2 is a flowchart of the steps of the data processing method provided in the embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0032] Step S202, receiving a query request, wherein the query request is used to request a predicted consumption amount corresponding to selection information, and the selection information is a consumption type selected by the target object in the interactive interface.
[0033] The prediction model provided by the embodiment of the present application can be applied to various software or hardware related to the application scenario of predicting the consumption amount. For example, it can be applied to banking software. In step S202, the software / hardware running the prediction model receives a query request, wherein the query request is used to query the predicted consumption amount corresponding to the consumption type input by the user (i.e., the target object), and the predicted consumption amount corresponding to different consumption types may be different, and the selection type is input by the user (i.e., the target object) on the interactive interface before the query request is generated. The interactive interface is the interactive interface of the hardware running the prediction model, or the interactive interface of the device where the software running the prediction model is located. The consumption type is an option displayed on the interactive interface. There are multiple consumption types, for example, it can be comfortable, refined, and noble, wherein the consumption type contained in the predicted consumption amount corresponding to different consumption types and the predicted amount corresponding to different consumption types are different. The above query request can be input again by the user after selecting the consumption type on the interactive interface, or it can be automatically triggered by the program after the user selects the consumption type on the interactive interface.
[0034] Step S204, in response to the query request, obtain the first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals.
[0035] In step S204, the prediction model responds to the query request and obtains the consumption data (i.e., the first type of historical consumption data) generated by the user (i.e., the target object) in the previous interval of the current time interval, and obtains the consumption data (i.e., the second type of historical consumption data) generated by the user in the previous statistical period of the current statistical period, wherein the duration of a time interval is less than the duration of a statistical period. The user's consumption data (the first type of historical consumption data, the second type of historical consumption data, and the consumption data generated in real time) is stored in the storage / storage area of the software / hardware running the prediction model, wherein the first type of historical data, the second type of historical data, and the consumption data generated in real time can be stored in different storage areas, for example, the first type of historical consumption data and the second type of historical consumption data are stored in the first and second storage areas, respectively, and the capacity of the second storage area should be greater than the capacity of the first storage area. When the first category of historical data and the second category of historical data are stored in different storage areas respectively, the consumption data are stored in sequence according to the time of generation. For the first storage area, when the duration corresponding to the stored data is greater than the duration of a time interval, it is deleted or dumped to the second storage area; for the second storage area, when the duration corresponding to the stored data is greater than the duration of a statistical period, it is deleted or compressed and dumped to other storage areas of the device running the storage model. The duration corresponding to the data stored in each of the above storage areas can be determined by the timestamp of the data.
[0036] Step S206, determining the data to be input in the first category of historical consumption data, and inputting the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training the neural network model with the consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than the preset time interval.
[0037] In step S206, the software program / hardware device running the prediction model extracts the input data for inputting the prediction model from the first category of historical consumption data obtained, and inputs the data into the prediction model to obtain the predicted consumption amount output by the prediction model; the prediction model is obtained by training the neural network model with the consumption data contained in multiple historical statistical periods before the current statistical period as training data. The above-mentioned historical statistical period containing training data should be a statistical period with a time interval less than the preset time interval with the current statistical period. In this way, the amount of training data can be reduced, and the waste of computing resources caused by too much training data and the excessive training time can be avoided. In addition, since only a small amount of training data is used during training, when the prediction model is used, the input data to be input into the prediction model is also a small amount of data, for example, the consumption data contained in multiple historical statistical periods with a time interval with the current statistical period being the above-mentioned preset time interval.
[0038] Optionally, determining the data to be input in the first category of historical consumption data includes: obtaining the timestamp of each second category of historical consumption data, wherein each timestamp is used to indicate the generation time of each second category of historical consumption data; filtering the second category of consumption data in the second category of historical consumption data according to the timestamp, and determining the second category of consumption data and the first category of consumption data as the data to be input.
[0039] Before training the prediction model, the method provided in the embodiment of the present application uses the software / hardware running the prediction model to analyze the user's consumption data and derives that the user's consumption as a whole has seasonal characteristics, that is, the consumption data generated by the user in the same time period in different statistical periods has a correlation relationship. For example, the user's consumption amount in a certain quarter of a year has a linear correlation with the consumption amount in the same quarter of the previous year. Therefore, when integrating this feature into the training process of the prediction model, the consumption data generated at a preset time interval away from the prediction time is used as the training data. For example, the current time is the time to query the predicted consumption amount, and the preset time interval is three years, then the consumption data of the past three years is used as the training data. The seasonality of consumption data can be calculated by the formula y t =a4×y t-4 +ε t In the embodiment of the present application, one year is used as a statistical period, and one quarter is used as the time interval t, then t represents the time when the query request is obtained, y trepresents the predicted consumption amount, (t-4) represents the time interval that is 4 time intervals away from the time interval to which the current time t belongs. Since one year is used as the statistical period and one quarter is used as the time interval t in the embodiment of the present application, (t-4) is a time interval in the previous statistical period of the current statistical period, and the position of the time interval in the previous statistical period is the same as the position of the current time interval in the current statistical period, wherein the same position means that the order of the time intervals in the statistical period is the same. For example, the statistical period is one year and each time interval is a quarter. The first quarter of the current year (current statistical period) is in the current position, which is the same as the position of the first quarter of the previous year (previous statistical period) in the previous year; y t-4 represents the consumption data generated by the user in the time interval (t-4) (i.e., the second type of consumption data), and a4 is y t-4 The corresponding coefficient, ε t is the residual error term, which is normally distributed with the statistical period. However, when the software / hardware running the prediction model traverses the user's consumption data, it is found that the user's consumption data still contains non-seasonal sequences (data that do not meet seasonal characteristics). Therefore, in the method provided in the implementation example of this application, the training data is used in combination with the formula y t =a1×y t-1 +a4×y t-4 +ε t Train the neural network model. This formula combines seasonal and non-seasonal characteristics. The prediction model obtained also follows the formula y t =a1×y t-1 +a4×y t-4 +ε t To predict the consumption amount, y t-1 represents the consumption data generated in the previous time interval (t-1) of the user's current time interval t (i.e., the first type of consumption data), and a1 is y t-1 The corresponding parameters. The prediction model follows the formula y t =a1×y t-1 +a4×y t-4 +ε t Predicted consumption amount. It can be seen that the input data used to input the prediction model and be analyzed by the prediction model to output the predicted consumption amount include y t-1 and t-4 These two types of data are both included in the first type of historical consumption data. In this embodiment, the software / hardware running the prediction model can use the timestamp as a basis to extract the input data from the first type of historical consumption data, wherein the timestamp marked on each data is used to record the time when each data was generated.
[0040] According to an optional embodiment of the present application, second-category consumption data is screened from second-category historical consumption data based on timestamps, including: classifying the second-category historical consumption data corresponding to timestamps belonging to the same time interval into a data set to obtain multiple data sets; determining a target data set corresponding to a target time interval from the multiple data sets, wherein the target time interval and the current time interval are the same time interval in different statistical periods; and determining the data in the target data set as second-category consumption data.
[0041] When selecting the data to be input from the first category of historical consumption data, firstly, the first category of historical consumption data is divided into two categories according to the timestamp: the consumption data contained in the previous time interval (t-1) of the current time interval t (i.e., the first category of consumption data) and the consumption data belonging to the historical statistical period before the current statistical period (i.e., the second category of historical consumption data), and then the data to be input is further extracted from the consumption data belonging to the historical statistical period (i.e., the second category of historical consumption data) according to the timestamp. In this embodiment, when extracting the data to be input from the consumption data belonging to the historical statistical period (i.e., the second category of historical consumption data), firstly, according to the timestamp, the data belonging to the same time interval are classified into a data set, and in this way, the consumption data belonging to the historical statistical period (i.e., the second category of historical consumption data) is divided into multiple data sets, and then, according to the time interval corresponding to the data set, the same time interval (i.e., the target time interval) belonging to a different statistical period as the current time interval is determined, for example, it can belong to the previous statistical period; the consumption data (i.e., the second category of consumption data) contained in the data set indicated by the target time interval is used as the data to be input into the prediction model for analysis and processing.
[0042] Optionally, before inputting the data to be input into the prediction model, the method includes: determining a target parameter based on the training data, wherein the target parameter is used to indicate whether to call the prediction model; comparing the target parameter with a preset value to obtain a first comparison result; when the first comparison result indicates that the numerical value corresponding to the target parameter is less than or equal to the preset value, determining to call the prediction model; when the first comparison result indicates that the numerical value corresponding to the target parameter is greater than the preset value, refusing to call the prediction model, and returning a first type of prompt information indicating query failure to the target object.
[0043] When the prediction model predicts the consumption amount for different users, it is necessary to obtain the consumption data generated by the user in multiple historical statistical periods with a preset time interval from the current statistical period, so as to train the prediction model with the consumption data, wherein the training result includes various parameters of the prediction model. Specifically, for the user following the formula y t =a1×y t-1 +a4×y t-4 +εt The prediction model for prediction, the parameters included in the training results are: a1, a4 and ε t (i.e., target parameter). In this embodiment, each time a query request is received, before the prediction model is called, the ε in the training result is t (i.e., target parameter) is compared with the preset parameter value (i.e., preset value). If ε t If the value is greater than the preset parameter value (i.e., the preset value), it means that the prediction model is not suitable for the user. This may be because the user's consumption data does not have seasonal characteristics. If the prediction model is still called to predict the user's consumption amount, the accuracy of the prediction result is also low. Therefore, the prediction model is rejected. At this time, in order to make the user aware of the input operation, a prompt message indicating query failure (i.e., the first type of prompt message) is returned to the user. If ε t If it is less than or equal to the preset parameter value (i.e., the preset value), it means that the user's consumption data has seasonal characteristics, and the prediction model is suitable for the user. The prediction model is called, and after the prediction model completes the prediction, the predicted consumption amount will be returned to the user.
[0044] When calling the prediction model, the prediction model can be loaded into the memory of the software / hardware running the prediction model. For example, the raw data of the prediction model can be loaded from the non-volatile memory into the volatile memory so that the processor can run the prediction model. The raw data of the prediction model refers to the unprocessed data, which usually includes the parameters and structural data of the neural network model before training as the prediction model. The structural data can be a calculation relationship based on the parameters, such as the forward propagation calculation relationship between the intermediate layers and the neurons. Specifically, the structural data can include the code related to the structure of the neural network model, such as the code for performing related calculations between the intermediate layers and the neurons.
[0045] In one embodiment, an area for loading the prediction model can be divided in the memory, which may include a structure data storage area and a parameter storage area. The structure data storage area is used to store structure-related codes, and the parameters referenced by it can point to the address of a specific parameter in the parameter storage area through a pointer. During the training process of the prediction model, it may be necessary to frequently update the parameters, and the parameter values in the parameter storage area can be updated.
[0046] According to another optional embodiment of the present application, after obtaining the predicted consumption amount, it also includes: obtaining the disposable pension amount of the target object, and comparing the disposable pension amount with the predicted consumption amount to obtain a second comparison result; performing an operation corresponding to the second comparison result.
[0047] The prediction model in the embodiment of the present application is suitable for users with fixed consumption habits, such as the elderly. On this basis, the method provided in the embodiment of the present application can also be used for early warning; for example, in this embodiment, after the prediction model outputs the result (i.e., the predicted consumption amount), the user's disposable pension amount is obtained, and based on the comparison result between the predicted consumption amount and the disposable pension amount (i.e., the second comparison result), it is determined whether to issue an early warning, and operations corresponding to the (second) comparison result are performed.
[0048] According to some optional embodiments of the present application, when the second comparison result indicates that the disposable pension amount is greater than the predicted consumption amount, an operation corresponding to the second comparison result is performed, including: obtaining a number series corresponding to the consumption type, wherein different consumption types correspond to different number series, and the number series contains multiple coefficients corresponding to different consumption types; generating a predicted consumption details according to the number series and the predicted consumption amount, wherein the predicted consumption details include: the consumption amount corresponding to each consumption category, the difference between the disposable pension amount and the predicted consumption amount, and the consumption categories include at least: food consumption, shopping consumption and transportation consumption.
[0049] In some embodiments, if it is determined according to the second comparison result that the predicted consumption amount is greater than the disposable pension amount, the operation corresponding to the second comparison result is: generating predicted consumption details according to the predicted consumption amount and outputting it. When the predicted consumption amount does not exceed the disposable pension amount, only detailed consumption data (i.e., predicted consumption details) need to be fed back to the user. Specifically, a sequence / matrix corresponding to the consumption type selected by the user is obtained, and the coefficients corresponding to different consumption types are recorded in the sequence / matrix, and the coefficients represent the proportion of the consumption generated by the user in different consumption types to the total predicted consumption amount; the predicted consumption details are jointly generated by combining the predicted consumption amount and the coefficient sequence / matrix, wherein the predicted consumption details output to the user may include multiple consumption types, such as food consumption, shopping consumption, and transportation consumption, and shopping consumption may also be further classified into luxury consumption and daily necessities consumption according to the amount / consumption scenario, and the predicted consumption amounts corresponding to various consumption types, wherein the predicted consumption amounts corresponding to various consumption types = the product of the predicted consumption amount output by the model and the coefficient corresponding to the consumption type, and the surplus amount, wherein the surplus amount is the difference between the predicted consumption amount output by the model and the disposable pension amount.
[0050] According to other optional embodiments of the present application, when the second comparison result indicates that the disposable pension amount is less than or equal to the predicted consumption amount, an operation corresponding to the second comparison result is performed, including: outputting a second type of prompt information for prompting the target object to change the consumption type, and information prompting the target object to avoid consumption on the preset consumption type, wherein the preset consumption types include: shopping consumption and entertainment consumption.
[0051] In other embodiments, if it is determined according to the second comparison result that the predicted consumption amount is less than or equal to the disposable pension amount, the operation corresponding to the second comparison result is: warning operation. When the predicted consumption amount exceeds the disposable pension amount, or is equal to the disposable pension amount, it means that the consumption type selected by the user (i.e., the target object) in the interactive interface is inappropriate. At this time, the user is warned by outputting a prompt message (i.e., the second type of prompt message) to prompt the user to change the consumption type. At the same time, a recommendation to reduce or cancel some consumption types (i.e., the preset consumption types) can also be given, for example, it is recommended to reduce the consumption of shopping consumption types and reduce the consumption of entertainment types.
[0052] Through the above steps, it is possible to integrate the user's consumption habits characteristics (such as seasonality) determined by analyzing the user's consumption data into the model training process, and transform the accuracy of the model's prediction results that is supported by a large amount of data in the traditional model training process into support by the user's consumption data characteristics. Therefore, less training data can be used in the training process, which ensures that the speed of model training is improved without reducing the accuracy of the prediction results, thereby reducing the waste of computing resources.
[0053] Figure 3 is a structural diagram of a data processing device provided according to an embodiment of the present application, such as Figure 3 As shown, the data processing device includes: a receiving module 30, which is used to receive a query request, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in the interactive interface; a response module 32, which is used to respond to the query request and obtain a first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; a determination module 34, which is used to determine the data to be input in the first category of historical consumption data, and input the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model with consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than the preset time interval.
[0054] Figure 4 It is the workflow diagram of the data processing device, such as Figure 4As shown, the data processing device starts to work, and receives a query request from a user (i.e., a target object) through the receiving module 30, and the query request is used to request to query the predicted consumption amount corresponding to the consumption type (i.e., selection information) selected by the user on the interactive interface; after receiving the query request, the software / hardware running the prediction model identifies the user / account that inputs the query request, collects consumption-related data from the data related to the user / account corresponding to the query request stored in the storage device, and uses the data whose generation time and the time when the query request is input The time difference does not exceed a preset time interval as training data, and based on the training data, combined with formula y t =a1×y t-1 +a4×y t-4 +ε t Train the neural network model to obtain the seasonal time series model (i.e., prediction model) corresponding to the user / account, where y t is the output of the prediction model, y t-1 and t-4 is the training data, which are the consumption data generated by users / accounts in different time intervals; a1, a4 and ε t is a parameter updated in the process. If after training ε t If the amount is less than or equal to the preset value, the prediction model is called. After determining that the prediction model is to be called, the response module 34 extracts the input data for inputting into the prediction model from the consumption data (i.e., the first type of historical consumption data) generated by the user / account before the current statistical period, and the input data is input into the seasonal time series model (i.e., the prediction model) through the determination module 34 to obtain the predicted consumption amount output by the prediction model. At the same time, after obtaining the predicted consumption amount, the data processing device can also compare the predicted consumption amount with the user's disposable pension amount, and, when the predicted consumption amount exceeds the disposable pension amount, select the high-end consumption in the predicted consumption amount and recommend the user to reduce or cancel it.
[0055] It should be noted that Figure 3 The preferred implementation of the illustrated embodiment can be found in Figure 2 The relevant description of the illustrated embodiment will not be repeated here.
[0056] An embodiment of the present application further provides a non-volatile storage medium, in which a computer program is stored, wherein the above data processing method is executed by running the computer program on a device where the non-volatile storage medium is located.
[0057] The above-mentioned non-volatile storage medium is used to store programs that perform the following functions: receiving a query request, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in the interactive interface; in response to the query request, obtaining a first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; determining the data to be input in the first category of historical consumption data, and inputting the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model using the consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than a preset time interval.
[0058] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above data processing method through the computer program.
[0059] The processor in the above-mentioned electronic device is used to run a program that performs the following functions: receiving a query request, wherein the query request is used to request a query for a predicted consumption amount corresponding to selection information, and the selection information is the consumption type selected by the target object in the interactive interface; in response to the query request, obtaining a first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; determining the data to be input in the first category of historical consumption data, and inputting the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model using the consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each historical statistical period and the current statistical period is less than a preset time interval.
[0060] The embodiment of the present application also provides a computer program product, including computer instructions, which implement the steps of the above data processing method when executed by a processor.
[0061] It should be noted that the various modules in the above-mentioned data processing device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.
[0062] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0063] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0064] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0065] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0066] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0067] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0068] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method, It is characterized in that include: Receiving a query request, wherein the query request is used to request a predicted consumption amount corresponding to the selection information, and the selection information is the consumption type selected by the target object in the interactive interface; In response to the query request, obtaining the first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; Determine the data to be input in the first category of historical consumption data, and input the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model with consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each of the historical statistical periods and the current statistical period is less than a preset time interval.
2. The method according to claim 1, It is characterized in that Determine the data to be input in the first category of historical consumption data, including: Obtaining a timestamp of each of the second-category historical consumption data, wherein each of the timestamps is used to indicate a generation time of each of the second-category historical consumption data; The second category of consumption data is screened from the second category of historical consumption data according to the timestamp, and the second category of consumption data and the first category of consumption data are determined as the data to be input.
3. The method according to claim 2, It is characterized in that Filtering the second category of consumption data from the second category of historical consumption data according to the timestamp includes: Classifying the second-category historical consumption data corresponding to the timestamps belonging to the same time interval into a data set, to obtain a plurality of the data sets; Determining a target data set corresponding to a target time interval from the plurality of data sets, wherein the target time interval and the current time interval are the same time interval in different statistical periods; The data in the target data set is determined as the second-category consumption data.
4. The method according to claim 1, It is characterized in that Before inputting the data to be input into the prediction model, the method includes: Determining a target parameter according to the training data, wherein the target parameter is used to indicate whether to call the prediction model; Comparing the target parameter with a preset value to obtain a first comparison result; When the first comparison result indicates that the numerical value corresponding to the target parameter is less than or equal to a preset value, determining to call the prediction model; When the first comparison result indicates that the numerical value corresponding to the target parameter is greater than the preset value, the prediction model is refused to be called, and a first type of prompt information indicating query failure is returned to the target object.
5. The method according to claim 1, It is characterized in that After obtaining the predicted consumption amount, the method further includes: Acquiring the disposable pension amount of the target object, and comparing the disposable pension amount with the predicted consumption amount to obtain a second comparison result; An operation corresponding to the second comparison result is performed.
6. The method according to claim 5, It is characterized in that When the second comparison result indicates that the disposable pension amount is greater than the predicted consumption amount, performing an operation corresponding to the second comparison result includes: Obtaining a number sequence corresponding to the consumption type, wherein different consumption types correspond to different number sequences, and the number sequence includes a plurality of coefficients corresponding to different consumption types; Generate predicted consumption details based on the number series and the predicted consumption amount, wherein the predicted consumption details include: the consumption amount corresponding to each consumption category, the difference between the disposable pension amount and the predicted consumption amount, and the consumption categories include at least: food consumption, shopping consumption and transportation consumption.
7. The method according to claim 5, It is characterized in that When the second comparison result indicates that the disposable pension amount is less than or equal to the predicted consumption amount, performing an operation corresponding to the second comparison result includes: Outputting to the target object the second type of prompt information for prompting the target object to change the consumption type, and information prompting the target object to avoid consuming on a preset consumption type, wherein the preset consumption type includes: shopping consumption and entertainment consumption.
8. A data processing device, It is characterized in that include: A receiving module, configured to receive a query request, wherein the query request is used to request a predicted consumption amount corresponding to the selection information, and the selection information is the consumption type selected by the target object in the interactive interface; a response module, configured to obtain, in response to the query request, the first category of historical consumption data of the target object, wherein the first category of historical consumption data includes: the first category of consumption data contained in the previous time interval of the current time interval, and the second category of historical consumption data contained in the previous statistical period of the current statistical period, wherein the current statistical period includes multiple time intervals; A determination module is used to determine the data to be input in the first category of historical consumption data, and input the data to be input into the prediction model for analysis to obtain the predicted consumption amount output by the prediction model, wherein the prediction model is obtained by training a neural network model with the consumption data contained in multiple historical statistical periods before the current statistical period as training data, and the time interval between each of the historical statistical periods and the current statistical period is less than a preset time interval.
9. A non-volatile storage medium, It is characterized in that The non-volatile storage medium stores a computer program, wherein the data processing method according to any one of claims 1 to 7 is executed by running the computer program on the device where the non-volatile storage medium is located.
10. An electronic device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and the processor is configured to execute the data processing method according to any one of claims 1 to 7 through the computer program.
11. A computer program product comprising computer instructions, It is characterized in that When the computer instructions are executed by a processor, the steps of the data processing method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Intelligent computing center computing power resource garbage deletion method and device oriented to common computing power
CN119759591A
