Model training system and method based on time series and computer program product
Through a time series-based model training system, users' behavior data and browsing time for different time periods are collected and processed, time series data is generated, and the LSTM model is trained, which solves the problem that the existing technology cannot effectively capture user behavior changes and associated information, and improves the accuracy of violation recognition and platform information security.
Patent Information
- Application Number
- CN202411987961.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
When the prior art identifies users who threaten the information security of the platform, it is impossible to effectively capture changes in user behavior and related information, which affects the accuracy of identification of violations.
A time series-based model training system is adopted. By configuring the time window and sub-time period, users' behavior data and browsing time in each sub-time period are collected, discrete processing and combination are performed, the first time series data is generated, and they are input into the LSTM model to train and recognize the model.
This method can better understand the evolution process of user behavior, capture the long-term dependence of user behavior, improve the accuracy of identification of violations, and ensure the security of platform information.
Smart Images

Figure CN119939154A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a time series-based model training system, method and computer program product. Background Art
[0002] With the popularity of smart phones, the number of users of various Internet service platforms (such as online shopping platforms, short video platforms, online car-hailing platforms, financial platforms, etc.) is increasing, and various users who threaten the information security of the platforms have also emerged. These users seriously affect the information security of the platforms by stealing platform data, changing platform data, fraud, breach of contract and other illegal behaviors.
[0003] In order to identify these users who threaten the information security of the platform, historical data related to platform users is usually collected at a certain point in time as a training set to train the recognition model, and the trained recognition model is used to identify violations. In fact, user behavior changes over time, and their behaviors at different time points are interrelated. Obviously, using only user data at a certain point in time cannot capture these user behavior changes and related information, which will affect the accuracy of identifying violations and affect the information security of the platform. Summary of the invention
[0004] In view of this, the main purpose of the present invention is to propose a time series-based model training system, method and computer program product, in order to at least partially solve at least one of the above-mentioned technical problems.
[0005] In order to solve the above technical problems, the first aspect of the present invention proposes a model training system based on time series, the system comprising:
[0006] Configuration module, used to configure time windows and sub-time periods;
[0007] The first collection module is used to collect the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries;
[0008] A processing module, used to discretize the browsing time of the user on the platform in each sub-time period to obtain the browsing value in each sub-time period;
[0009] A adding module, used for adding each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data;
[0010] The training module is used to input the first time series data into the LSTM model to train the recognition model.
[0011] According to a preferred embodiment of the present invention, the processing module comprises:
[0012] Sub-configuration module, used to configure the unit browsing time;
[0013] The sub-processing module is used to take the browsing time of the user on the platform in each sub-time period including the number of the unit browsing time as the browsing value in the corresponding sub-time period.
[0014] According to a preferred embodiment of the present invention, the system further comprises:
[0015] A second collection module is used to collect second behavior data of the user in each sub-time period within the time window; the second behavior data includes: at least one of the number of user browsing, the number of clicks, the number of favorites, and the number of logins;
[0016] The second training module is used to input the second behavior data into the LSTM model to train the demand model.
[0017] According to a preferred embodiment of the present invention, the system further comprises:
[0018] A second adding module, used for adding each browsing value to the second behavior data in the corresponding sub-time period to obtain second time series data;
[0019] The second training module is used to input the second time series data into the LSTM model to train the demand model.
[0020] According to a preferred embodiment of the present invention, the system further comprises:
[0021] A third collection module is used to collect the second behavior data of the current user in each sub-time period within the time window, and input the second time series data into the trained demand model to obtain a user demand index;
[0022] The push module is used to push corresponding information to the user according to the user demand index.
[0023] In order to solve the above technical problems, the second aspect of the present invention provides a model training method based on time series, the method comprising:
[0024] Configure time windows and sub-time periods;
[0025] Collecting the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries;
[0026] Discretize the browsing time of users on the platform in each sub-time period to obtain the browsing value in each sub-time period;
[0027] Add each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data;
[0028] The first time series data is input into the LSTM model to train the recognition model.
[0029] According to a preferred embodiment of the present invention, the browsing time of the user on the platform in each sub-time period is discretized to obtain the browsing value in each sub-time period, which includes:
[0030] Configure the unit browsing time;
[0031] The browsing time of the user on the platform in each sub-time period including the number of the unit browsing time is taken as the browsing value in the corresponding sub-time period.
[0032] According to a preferred embodiment of the present invention, the method further comprises:
[0033] Collecting second behavior data of the user in each sub-time period within the time window; the second behavior data includes: at least one of the number of user browsing, the number of clicks, the number of favorites, and the number of logins;
[0034] The second behavior is input as data into the LSTM model to train the demand model.
[0035] According to a preferred embodiment of the present invention, before inputting the second behavior data into the LSTM model to train the demand model, the method further includes:
[0036] Add each browsing value to the second behavior data in the corresponding sub-time period to obtain second time series data;
[0037] The second time series data is input into the LSTM model to train the demand model.
[0038] According to a preferred embodiment of the present invention, the method further comprises:
[0039] Collecting second behavior data of the current user in each sub-time period within the time window, and inputting the second time series data into the trained demand model to obtain a user demand index;
[0040] Corresponding information is pushed to the user according to the user demand index.
[0041] In order to solve the above technical problems, the third aspect of the present invention provides an electronic device, including:
[0042] Processor; and
[0043] A memory storing computer executable instructions, which when executed cause the processor to perform any of the methods described above.
[0044] In order to solve the above technical problem, the fourth aspect of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements any of the methods described above.
[0045] In summary, the present invention configures a time window and multiple sub-time periods to collect the first behavior data of the user in each sub-time period of the time window and the browsing time of the user on the platform; at the same time, the browsing time of the user on the platform in each sub-time period is discretely processed to obtain the browsing value in each sub-time period; each browsing value is added to the first behavior data in the corresponding sub-time period to obtain the first time series data; the user behaviors in each sub-time period of the time window are interrelated, and therefore, the processed first time series data can reflect the correlation between the user behaviors in each sub-time period, and the changing trend of the user behaviors over time, then the recognition model trained based on the first time series data can capture the long-term dependency of the user's first behavior, so as to better understand the evolution process of the user's first behavior, so as to reflect the changes in user behavior and the trend of endangering the security of the platform and its data information, thereby improving the accuracy of identifying illegal behaviors and ensuring the information security of the platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects achieved more clearly, the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, it should be noted that the drawings described below are only drawings of exemplary embodiments of the present invention, and those skilled in the art can obtain drawings of other embodiments based on these drawings without creative work.
[0047] Figure 1 It is a schematic diagram of the structural framework of a time series-based model training system provided by an embodiment of the present invention;
[0048] Figure 2 It is a flowchart of a time series-based model training method provided by an embodiment of the present invention;
[0049] Figure 3 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention;
[0050] Figure 4 is a schematic diagram of an embodiment of a computer readable medium of the present invention. DETAILED DESCRIPTION
[0051] Under the premise of conforming to the technical concept of the present invention, the structure, performance, effect or other characteristics described in a specific embodiment may be combined with one or more other embodiments in any appropriate manner.
[0052] In the process of introducing specific embodiments, the detailed description of the structure, performance, effect or other features is to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can implement the present invention with a technical solution that does not contain the above-mentioned structure, performance, effect or other features under certain circumstances. The figures in the accompanying drawings are only an exemplary demonstration, and do not mean that the solution of the present invention must include all the contents, operations and steps in the figures, nor do they mean that they must be executed in the order shown in the figures.
[0053] refer to Figure 1 , Figure 1 FIG. 1 is a schematic diagram of a structural framework of a time series-based model training system provided by an embodiment of the present invention. Figure 1 As shown, the system comprises:
[0054] Configuration module 11, used to configure time windows and sub-time periods;
[0055] The first collection module 12 is used to collect the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries;
[0056] Processing module 13, used to discretize the browsing time of the user on the platform in each sub-time period to obtain the browsing value in each sub-time period;
[0057] An adding module 14, configured to add each browsing value to the first behavior data in the corresponding sub-time period to obtain first time series data;
[0058] The training module 15 is used to input the first time series data into the LSTM model to train a recognition model or a recognition model for behavioral security prediction, such as a security recognition model. The model predicts the performance of the behavioral data according to the time series to identify whether it has the potential to endanger the security of the platform and its data information, and then determine the size of the possibility of such security hazard.
[0059] In a specific implementation, the processing module 13 includes:
[0060] Sub-configuration module, used to configure the unit browsing time;
[0061] The sub-processing module is used to take the browsing time of the user on the platform in each sub-time period including the number of the unit browsing time as the browsing value in the corresponding sub-time period.
[0062] Furthermore, the system also includes:
[0063] A second collection module is used to collect second behavior data of the user in each sub-time period within the time window; the second behavior data includes: at least one of the number of user browsing, the number of clicks, the number of favorites, and the number of logins;
[0064] The second training module is used to input the second behavior data into the LSTM model to train the demand model.
[0065] A second adding module, used for adding each browsing value to the second behavior data in the corresponding sub-time period to obtain second time series data;
[0066] The second training module is used to input the second time series data into the LSTM model to train the demand model.
[0067] In a specific embodiment, the system further comprises:
[0068] A third collection module is used to collect the second behavior data of the current user in each sub-time period within the time window, and input the second time series data into the trained demand model to obtain a user demand index;
[0069] The push module is used to push corresponding information to the user according to the user demand index.
[0070] based on Figure 1 The time series-based model training system, an embodiment of the present invention further provides a business risk control system, the system comprising:
[0071] An acquisition module, configured to respond to a service request of the current user and acquire the first behavior data of the current user in each sub-time period within the time window and the browsing time of the current user on the platform;
[0072] The data processing module is used to discretize the browsing time of the current user on the platform in each sub-time period to obtain the browsing value in each sub-time period; and add each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data;
[0073] an identification module, used for inputting the first time series data into a pre-trained risk identification model, so as to identify the security prediction result of the user, that is, whether there is an identification result that endangers data security, according to the output result of the identification model; the identification model is trained by any of the model training methods described above;
[0074] The execution module is used to perform further control processing for data security according to the identification result, such as risk control business operations.
[0075] based on Figure 1 The model training system based on time series, the embodiment of the present invention also provides a model training method based on time series, such as Figure 2 As shown, the time series-based model training method includes:
[0076] S1. Configure time windows and sub-time periods;
[0077] In this embodiment, the time window of the activity can be configured according to actual needs, such as the last three months, the last year, etc. The time window can be divided into a plurality of interconnected sub-time periods, such as each month in three months can be used as a sub-time period.
[0078] S2, collecting the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform;
[0079] The first behavior data may reflect situations where users are overdue, fraudulent, or violate regulations, which endanger the security of the platform and its data information. It may include: at least one of the number of accounts opened on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries that the user chooses to make public or anonymize. The other platforms of the same type refer to platforms with the same business type as the current platform. For example: if the current platform is an online shopping platform, then other platforms of the same type are also online shopping platforms; if the current platform is a rental platform, then other platforms of the same type are also rental platforms.
[0080] S3, discretizing the browsing time of the user on the platform in each sub-time period to obtain the browsing value in each sub-time period;
[0081] In this embodiment, it is considered that the browsing time of normal users on the platform is roughly the same in different time periods, while bad / abnormal users may not browse the platform at ordinary times or rarely browse the platform, but may suddenly browse the platform for a long time in certain time periods; therefore, the browsing time of users in different sub-time periods can be used to reflect the situation of users' overdue, fraud, violation and other hazards to data information security. For example: users only browse the platform in a certain sub-time period, but not in other sub-time periods; or, users suddenly browse the platform for a longer time than a threshold in a certain sub-time period, then these users are more likely to have the above-mentioned hazards. Based on this, the present invention processes the above-mentioned first behavior data and the browsing time of users on the platform into a time series as training data to train the recognition model, or it is called a security recognition model or a security prediction model.
[0082] Since the collected first behavior data is discrete data, and the browsing time of the user on the platform is continuous data, in order to facilitate the subsequent merging of the two, this step needs to perform discrete processing on the browsing time. Exemplarily, this step may include:
[0083] S31, configure unit browsing time;
[0084] The unit browsing time can be configured according to actual needs, such as: 1S, 3S, etc.
[0085] S32: The browsing time of the user on the platform in each sub-time period including the number of the unit browsing time is taken as the browsing value in the corresponding sub-time period.
[0086] Considering that a user may browse the platform multiple times in a sub-period, all browsing values in the sub-period can be added together to obtain the total browsing value in the sub-period.
[0087] S4, adding each browsing value to the first behavior data in the corresponding sub-time period to obtain first time series data;
[0088] For example, if a time window is divided into 5 sub-time periods, the sequence data of each sub-time period includes: the first behavior data Q in the sub-time period and the platform browsing value q of the user in the sub-time period. The first time series data is {Qi, qi}, where i is the sub-time period number.
[0089] S5. Input the first time series data into the LSTM model to train the recognition model.
[0090] Long Short Term Memory (LSTM) is a deep learning model for processing sequence data. It can maintain the flow of information in long sequences, capture and understand complex dependencies in long sequences, and can be widely used in the processing of time series.
[0091] The present invention inputs the processed first time series data into the LSTM model to train the recognition model. Since the processed first time series data can reflect the correlation between user behaviors in each sub-time period and the changing trend of user behaviors over time, and LSTM can capture the long-term dependencies in the sequence data, the recognition model trained based on the first time series data can capture the long-term dependencies of the user's first behavior, so as to better understand the evolution process of the user's first behavior, so as to reflect the user's behavior changes and the degree and trend of endangering data security, thereby improving the accuracy of prediction and identification of behavioral operations and information that endanger data information security, and ensuring platform security.
[0092] Furthermore, the present invention can also collect second behavior data related to the user's purchase or rental demand on the platform, and train the demand model through the second behavior data, so as to predict the user's demand index for platform products. Therefore, after step S3, the method can also include:
[0093] S6. Collect the second behavior data of the user in each sub-time period within the time window, and input the second behavior data into the LSTM model to train the demand model.
[0094] The second behavior data may reflect the user's demand for platform products, and may include at least one of the following: the number of user views, the number of clicks, the number of favorites, and the number of logins, which the user chooses to make public or after desensitization processing;
[0095] Furthermore, considering that the browsing time of normal users in different time periods on the platform can reflect the user's demand for platform products; therefore, the browsing time of users in different sub-time periods can be used to reflect the user's demand for platform products. After obtaining the second behavior data, each browsing value can be added to the second behavior data in the corresponding sub-time period to obtain the second time series data; the second time series data is input into the LSTM model to train the demand model, thereby avoiding the singleness of the model training data and improving the accuracy of model recognition.
[0096] Furthermore, after the demand model is trained, different promotion information can be pushed to the user according to the user demand index output by the model to promote the user to purchase or rent the product, and the method further includes:
[0097] S7. Collect the second behavior data of the current user in each sub-time period within the time window, and input the second time series data into the trained demand model to obtain a user demand index; and push corresponding information to the user according to the user demand index.
[0098] In this embodiment, push information corresponding to different demand index intervals can be pre-configured, and after obtaining the user demand index, the push information corresponding to the user can be determined and pushed according to the interval where the user demand index is located. The push information can be: red envelopes, coupons, etc.
[0099] Those skilled in the art will appreciate that the modules in the above device embodiments may be distributed in the device as described, or may be changed accordingly and distributed in one or more devices different from the above embodiments. The modules in the above embodiments may be combined into one module, or may be further split into multiple submodules.
[0100] The electronic device embodiment of the present invention is described below, and the electronic device can be regarded as a physical implementation of the method and device embodiments of the present invention described above. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.
[0101] Figure 3 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0102] like Figure 3 As shown, the electronic device 300 of this exemplary embodiment is in the form of a general data processing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 3320, a bus 330 connecting different electronic device components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.
[0103] The storage unit 320 stores a computer-readable program, which may be a source program or a code of a read-only program. The program may be executed by the processing unit 310, so that the processing unit 310 performs the steps of various embodiments of the present invention. For example, the processing unit 310 may perform the following steps: Figure 2 Steps shown.
[0104] Bus 330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0105] The electronic device 300 may also communicate with one or more external devices 100 (e.g., keyboard, display, network device, Bluetooth device, etc.) so that a user can interact with the electronic device 300 via these external devices 100, and / or the electronic device 300 can communicate with one or more other data processing devices (e.g., router, modem, etc.). Such communication may be performed through an input / output (I / O) interface 350, and may also be performed through a network adapter 360 with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network. The network adapter 360 may communicate with other modules of the electronic device 300 through the bus 330.
[0106] Figure 4 Schematic diagram of a computer readable medium embodiment of the present invention. Figure 4As shown, the computer program can be stored on one or more computer-readable media. The computer-readable medium can be a readable signal medium or a readable storage medium. When the computer program is executed by one or more data processing devices, the computer-readable medium can implement the above method of the present invention, namely: configure the time window and sub-time period; collect the first behavior data of the user in each sub-time period within the time window and the user's browsing time on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries; discretize the browsing time of the user on the platform in each sub-time period to obtain the browsing value in each sub-time period; add each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data; input the first time series data into the LSTM model to train the recognition model.
[0107] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, Figure 2 The method described.
[0108] In summary, the present invention can be implemented by a method, device, system, electronic device or computer readable medium that executes a computer program. In practice, a general data processing device such as a microprocessor or a digital signal processor (DSP) can be used to implement some or all of the functions of the present invention.
[0109] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A time series based model training system, characterized in that: The system comprises: Configuration module, used to configure time windows and sub-time periods; The first collection module is used to collect the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries; A processing module, used to discretize the browsing time of the user on the platform in each sub-time period to obtain the browsing value in each sub-time period; A adding module, used for adding each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data; The training module is used to input the first time series data into the LSTM model to train the recognition model.
2. The system according to claim 1, characterized in that The processing module comprises: Sub-configuration module, used to configure the unit browsing time; The sub-processing module is used to take the browsing time of the user on the platform in each sub-time period including the number of the unit browsing time as the browsing value in the corresponding sub-time period.
3. The system according to claim 1, characterized in that The system further comprises: A second collection module is used to collect second behavior data of the user in each sub-time period within the time window; the second behavior data includes: at least one of the number of user browsing, the number of clicks, the number of favorites, and the number of logins; The second training module is used to input the second behavior data into the LSTM model to train the demand model.
4. The system according to claim 3, characterized in that The system further comprises: A second adding module, used for adding each browsing value to the second behavior data in the corresponding sub-time period to obtain second time series data; The second training module is used to input the second time series data into the LSTM model to train the demand model.
5. The system according to claim 3 or 4, characterized in that: The system further comprises: A third collection module is used to collect the second behavior data of the current user in each sub-time period within the time window, and input the second time series data into the trained demand model to obtain a user demand index; The push module is used to push corresponding information to the user according to the user demand index.
6. A model training method based on time series, characterized in that: The method comprises: Configure time windows and sub-time periods; Collecting the first behavior data of the user in each sub-time period within the time window and the browsing time of the user on the platform; the first behavior data includes: at least one of the number of accounts opened by the user on other platforms of the same type, the number of rentals, the number of on-time returns, the number of untimely returns, and the number of credit inquiries; Discretize the browsing time of users on the platform in each sub-time period to obtain the browsing value in each sub-time period; Add each browsing value to the first behavior data in the corresponding sub-time period to obtain the first time series data; The first time series data is input into the LSTM model to train the recognition model.
7. The method according to claim 6, characterized in that The browsing time of the user on the platform in each sub-time period is discretely processed to obtain the browsing value in each sub-time period, including: Configure the unit browsing time; The browsing time of the user on the platform in each sub-time period including the number of the unit browsing time is taken as the browsing value in the corresponding sub-time period.
8. The method according to claim 6, characterized in that The method further comprises: Collecting second behavior data of the user in each sub-time period within the time window; the second behavior data includes: at least one of the number of user browsing, the number of clicks, the number of favorites, and the number of logins; The second behavior is input as data into the LSTM model to train the demand model.
9. The method according to claim 8, characterized in that Before inputting the second behavior data into the LSTM model to train the demand model, the method further includes: Add each browsing value to the second behavior data in the corresponding sub-time period to obtain second time series data; The second time series data is input into the LSTM model to train the demand model.
10. The method according to claim 8 or 9, characterized in that: The method further comprises: Collecting second behavior data of the current user in each sub-time period within the time window, and inputting the second time series data into the trained demand model to obtain a user demand index; Corresponding information is pushed to the user according to the user demand index.
11. An electronic device, comprising: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 6 to 10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 6 to 10 is implemented.