Data processing method and device, electronic equipment, storage medium and program product
By determining the target historical time period based on special events and combining the first and second training data, the problem of prediction accuracy of the risk control model during special periods such as statutory holidays was solved, and the prediction accuracy and recognition ability of the model during these periods were improved.
Patent Information
- Application Number
- CN202511730664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-13
AI Technical Summary
In existing technologies, risk control models based on machine learning have low prediction accuracy during special periods such as statutory holidays, mainly because the selection of training data fails to fully consider significant changes in user call behavior, location movement patterns, and social characteristics.
Based on the time period to be predicted and special events, the target historical time period is determined, and the first training data and the second training data are obtained from the dataset. The first training data and the second training data are combined to form the target training data to train the risk control model.
It improves the predictive accuracy of risk control models during special periods and enhances the ability of telecommunications operators to identify risks during statutory holidays or social events.
Smart Images

Figure CN121524633A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, and in particular, to a data processing method and device, an electronic device, a computer readable storage medium, and a computer program product. BACKGROUND
[0002] With the continuous upgrading of telecommunication fraud means, a risk control system based on machine learning has become a core defense tool for a telecommunication operator. The core of the risk control system based on machine learning is a risk control model. In the related art, the risk control model is trained using training data of a fixed time window. This selection of training data results in low prediction accuracy of the risk control model in special time periods such as statutory holidays. SUMMARY
[0003] The present disclosure provides a data processing method and device, an electronic device, a computer readable storage medium, and a computer program product.
[0004] In a first aspect, the present disclosure provides a data processing method, which includes: obtaining first training data from a data set according to a first time period to be predicted and a required amount of data for training a risk control model, the training data in the data set including user historical communication data; in a case where the first time period includes a special event, determining a target historical time period according to the special event, the special event including a statutory holiday or a social event, the social event being determined according to public opinion information of a second time period; obtaining second training data from the data set according to the target historical time period; and determining target training data according to the first training data and the second training data, the target training data being used to train the risk control model used in the first time period.
[0005] In a second aspect, the present disclosure provides a data processing device, which includes: a first data obtaining module configured to obtain first training data from a data set according to a first time period to be predicted and a required amount of data for training a risk control model, the training data in the data set including user historical communication data; a historical time period determining module configured to, in a case where the first time period includes a special event, determine a target historical time period according to the special event, the special event including a statutory holiday or a social event, the social event being determined according to public opinion information of a second time period; a second data obtaining module configured to obtain second training data from the data set according to the target historical time period; and a target data determining module configured to determine target training data according to the first training data and the second training data, the target training data being used to train the risk control model used in the first time period.
[0006] In a third aspect, the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the data processing method described above.
[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the data processing method described above.
[0008] In a fifth aspect, the present disclosure provides a computer program product comprising computer readable code, or a non-transitory computer-readable storage medium carrying computer readable code, which, when run in a processor of an electronic device, causes the processor in the electronic device to perform the data processing method described above.
[0009] The data processing method provided by the embodiments of the present disclosure can obtain first training data from a data set according to a first time period to be predicted and a required amount of training data; in a case where the first time period includes a special event, a target historical time period is determined according to the special event, and second training data is obtained from the data set according to the target historical time period; and then target training data is determined according to the first training data and the second training data, so that in a case where the first time period to be predicted includes a special event (such as a statutory holiday or a social event), the first training data as the basic training data and the second training data as the historical similar data can be combined to determine the target training data, and the matching degree of the target training data and the first time period to be predicted is improved. The target training data obtained by using the data processing method of the embodiments of the present disclosure can be used to train a risk control model used by a telecom operator in the first time period to be predicted, and the prediction accuracy of the risk control model in the first time period can be improved.
[0010] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0011] The accompanying drawings are included to provide a further understanding of the present disclosure and constitute a part of the specification, which together with the embodiments of the present disclosure serve to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent from the detailed description of the exemplary embodiments with reference to the drawings, in which:
[0012] Figure 1An application scenario diagram of the data processing method and apparatus provided by the embodiments of the present disclosure is provided.
[0013] Figure 2 A flowchart of the data processing method provided by the embodiments of the present disclosure is provided.
[0014] Figure 3 A schematic diagram of the data processing method provided by the embodiments of the present disclosure is provided.
[0015] Figure 4 A block diagram of the data processing apparatus provided by the embodiments of the present disclosure is provided.
[0016] Figure 5 A block diagram of the electronic device provided by the embodiments of the present disclosure is provided. DETAILED DESCRIPTION
[0017] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to be clear and concise, the description below omits the description of well-known functions and structures.
[0018] The embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0019] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0020] The terms used herein are only used to describe specific embodiments, and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the terms "comprise" and / or "consist of, when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The terms "connected" or "coupled" and / or similar terms are not limited to a physical or mechanical connection, but can include an electrical connection, whether direct or indirect.
[0021] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.
[0022] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solutions comply with relevant laws and regulations and do not violate public order and good customs. The use of user data in the technical solutions complies with relevant national laws and regulations (for example, "Information Security Technology Personal Information Security Specification" and the like). For example, appropriate measures are taken for personal information access control; restrictions are given to the display of personal information; the use purpose of personal information does not exceed the direct or reasonably related range; the use of personal information eliminates explicit identity pointing and avoids precise positioning to a specific individual.
[0023] As described above, the risk control model is the core of the risk control system of the telecom operator. In the related art, the training data of a fixed time window (for example, 30 days, 45 days, 60 days, etc. before the training start date) is usually used to train the risk control model. This selection method of training data fails to fully consider the significant changes in user call behavior, location movement mode and social characteristics during statutory holidays, resulting in low prediction accuracy of the risk control model in special periods such as statutory holidays.
[0024] Embodiments of the present disclosure provide a data processing method, which comprises: obtaining first training data from a data set according to a first time period to be predicted and a required amount of data for training a risk control model, wherein the training data in the data set comprises user historical communication data; in the case that the first time period comprises a special event, determining a target historical time period according to the special event, wherein the special event comprises a statutory holiday or a social event, and the social event is determined according to public opinion information of a second time period; obtaining second training data from the data set according to the target historical time period; and determining target training data according to the first training data and the second training data, wherein the target training data is used to train the risk control model used in the first time period.
[0025] According to the data processing method provided in the embodiments of the present disclosure, the first training data can be obtained from the data set according to the first time period to be predicted and the required amount of training data, and in the case that the first time period includes a special event, the target historical time period is determined according to the special event, and the second training data is obtained from the data set according to the target historical time period, and then the target training data is determined according to the first training data and the second training data, so that in the case that the first time period to be predicted includes a special event (for example, a statutory holiday or a social event), the first training data as the basic training data and the second training data as the historical similar data are combined to determine the target training data, and the matching degree of the target training data and the first time period to be predicted is improved. The target training data obtained by using the data processing method provided in the embodiments of the present disclosure is used to train the risk control model used by the telecom operator in the first time period to be predicted, and the prediction accuracy of the risk control model in the first time period is improved.
[0026] Figure 1 An application scenario diagram of the data processing method and device provided in the embodiments of the present disclosure is shown.
[0027] As shown in Figure 1 , the application scenario of the embodiments of the present disclosure can include a terminal device 101, a network 103 and a server 102. The network 103 is a medium for providing a communication link between the terminal device 101 and the server 102. The network 103 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0028] The user can use the terminal device 101 to interact with the server 102 through the network 103 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0029] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.
[0030] The server 102 can be a server providing various services, such as a background management server supporting the website browsed by the user using the terminal device 101 (only as an example). The background management server can analyze and process the received user request data, etc., and feed back the processing result (such as a webpage, information or data, etc. obtained or generated according to the user request) to the terminal device.
[0031] It should be noted that the data processing method and device provided by the embodiments of the present disclosure can be executed by the server 102. Correspondingly, the data processing method and device provided by the embodiments of the present disclosure can be arranged in the server 102. The data processing method and device provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 102 and capable of communicating with the terminal device 101 and / or the server 102. Correspondingly, the data processing method and device provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 102 and capable of communicating with the terminal device 101 and / or the server 102.
[0032] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned system is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
[0033] Figure 2 A flowchart of a data processing method provided by the embodiments of the present disclosure is shown in FIG. 2. Referring to FIG. 2, Figure 2 The method comprises the following steps:
[0034] In step S21, first training data is obtained from a data set according to a first time period to be predicted and a required amount of data for training a risk control model, wherein the training data in the data set comprises user historical communication data.
[0035] In step S22, in the case that the first time period comprises a special event, a target historical time period is determined according to the special event, wherein the special event comprises a statutory holiday or a social event, and the social event is determined according to public opinion information of a second time period.
[0036] In step S23, second training data is obtained from the data set according to the target historical time period.
[0037] In step S24, target training data is determined according to the first training data and the second training data, wherein the target training data is used to train the risk control model used for the first time period.
[0038] The first time period to be predicted is a future time period in which a risk control model is used by a telecom operator to predict a risk event (such as telecom fraud, abnormal event, etc.). The specific time of the first time period can be set by the telecom operator according to the actual situation, and the present disclosure does not limit this.
[0039] In some possible implementation manners, the first training data can be obtained from the data set according to the first time period to be predicted and a required amount of data for training of the risk control model in step S21. The required amount of data for training of the risk control model can be represented by days or months. For example, the required amount of data for training of the risk control model is an amount of data for 30 days, or the required amount of data for training of the risk control model is an amount of data for 2 months. The starting date and the ending date for obtaining the first training data from the data set can be determined according to the first time period to be predicted. For example, assuming that the required amount of data for training of the risk control model is an amount of data for 30 days, and the first time period is [D, D+7], D representing the starting date of the first time period, the starting date for obtaining the first training data from the data set can be determined as D-32, and the ending date can be determined as D-2; and then the first training data can be obtained from the data set according to the starting date and the ending date.
[0040] The data set refers to a training data set of the risk control model of the telecommunication operator. The training data in the data set includes user historical communication data, which can include user historical call data, user historical location information, user historical social information, and the like. The user historical call data includes historical call duration, historical call time period (daytime period or nighttime period), historical call opposite party's place of origin, historical daily call frequency, and the like of the user. The user historical location information includes historical activity area of the user, stay duration of the user in the historical activity area, position moving speed of the user in the historical activity area, and the like. The user historical social information includes interaction time period (daytime period or nighttime period), interaction time interval, interaction direction, and the like of the user and historical social objects. The user historical communication data can also include other historical communication data, such as historical short message sending and receiving amount, historical traffic consumption amount, historical access point, and the like. The specific content of the user historical communication data can be set by those skilled in the art according to actual conditions, and the disclosure does not limit this. It should be noted that the user historical communication data in the data set is obtained after obtaining authorization consent of the user.
[0041] In some possible implementation manners, it can be judged in step S22 whether the first time period includes a special event. The special event includes statutory holidays or social events. The statutory holidays can be determined according to the information of national statutory holidays. The social events can include online shopping festivals (for example, 618 online shopping festival, double 11 online shopping festival, etc.), natural disasters (for example, earthquake, typhoon, etc.), sports meeting and other social hot events. A second time period located before the first time period and close to the first time period can be determined, for example, the second time period is 2 days before the starting date of the first time period. Then, the public opinion information about the events such as natural disasters, sports meeting and online shopping festival, the discussion heat and range, etc. can be automatically captured from the social forum (for example, microblog, forum, etc.) platform, and the natural language analysis processing technology is used to process the captured public opinion information, so as to determine whether the second time period includes a social event. Since the second time period is close to the first time period, it can be considered that the social event occurring in the second time period will continue to the first time period. Therefore, in the case that the second time period includes a social event, it can be considered that the first time period also includes a social event.
[0042] In the case that the first time period includes a special event (statutory holiday or social event), the target historical time period can be determined according to the special event. The target historical time period refers to the historical time period in which an event similar to the special event (for example, historical statutory holiday or historical social event) occurs. The target historical time period can be one or more. For example, in the case that the special event is the National Day holiday in 2025, the time period in which the National Day holiday in the last three years (the current year is 2025, and the last three years are 2024, 2023 and 2022) occurs can be determined as the target historical time period. For another example, in the case that the special event is the 618 online shopping festival in 2025, the time period in which the 618 online shopping festival in the last five years (the current year is 2025, and the last five years are 2024, 2023, 2022, 2021 and 2020) occurs can be determined as the target historical time period. For another example, in the case that the special event is a typhoon, the time period in which the last five similar typhoons occur can be determined as the target historical time period.
[0043] In some possible implementation manners, after the target historical time period is determined, the second training data can be obtained from the data set according to the target historical time period in step S23. That is, the second training data is the training data in the data set located in the target historical time period, and the second training data can be regarded as the historical similar data of the first time period.
[0044] In some possible implementation manners, the target training data can be determined according to the first training data and the second training data in step S24. The first training data and the second training data can be directly combined to obtain the target training data. The second training data can also be sampled, and the sampled second training data and the first training data can be combined to obtain the target training data. Other manners can also be used to determine the target training data according to the first training data and the second training data, which are not limited in the present disclosure. After the target training data is obtained, the target training data can be used to train the risk control model used by the telecom operator in the first period, so as to improve the prediction accuracy of the risk control model in the first period.
[0045] According to the data processing method provided in the embodiments of the present disclosure, the first training data can be obtained from the data set according to the first period to be predicted and the required data quantity for training. In the case that the first period includes a special event, the target historical period is determined according to the special event, and the second training data is obtained from the data set according to the target historical period. Then, the target training data is determined according to the first training data and the second training data, so that in the case that the first period to be predicted includes a special event (for example, a statutory holiday or a social event), the first training data as the basic training data and the second training data as the historical similar data can be combined to determine the target training data, and the matching degree of the target training data and the first period to be predicted is improved. The target training data obtained by using the data processing method provided in the embodiments of the present disclosure is used to train the risk control model used by the telecom operator in the first period to be predicted, and the prediction accuracy of the risk control model in the first period can be improved.
[0046] The data processing method according to the embodiments of the present disclosure is described below.
[0047] In some possible implementation manners, step S21 can include: determining a time window parameter of data acquisition according to a required data quantity for training of the risk control model; determining a third period before the first period to be predicted according to the first period to be predicted and the time window parameter; and obtaining the first training data from the data set according to the third period.
[0048] The time window parameter for obtaining data can be determined according to the required amount of data for training the risk control model in a preset or adaptive learning manner. The time window parameter includes a first parameter and a second parameter. The first parameter is used to indicate the interval days between the starting date of the window and the starting date of the first period, and the second parameter is used to indicate the interval days between the ending date of the window and the starting date of the first period. Then, according to the first period to be predicted and the time window parameter, a third period before the first period is determined. For example, assuming that the first parameter is 31 and the second parameter is 1, and the first period is from November 1, 2025 to November 20, 2025, the third period can be determined as from October 1, 2025 (31 days apart from November 1, 2025) to October 31, 2025 (1 day apart from November 1, 2025). Then, the training data in the third period can be obtained from the data set, and the obtained training data is determined as the first training data.
[0049] In the embodiments of the present disclosure, the time window parameter for obtaining data can be determined according to the required amount of data for training the risk control model, and then the third period before the first period to be predicted is determined according to the first period and the time window parameter, and the first training data is obtained from the data set according to the third period. Therefore, the third period can be slid with the starting date of the first period, the proximity between the third period where the first training data is located and the first period is improved, and the timeliness of the risk control model is improved, which facilitates the risk control model to capture the latest data distribution trend.
[0050] In some possible implementation manners, the step S22 can include: determining a plurality of candidate historical periods according to the special event; respectively determining the similarity between each candidate historical period and the first period; and selecting a target historical period from the plurality of candidate historical periods according to the similarity between each candidate historical period and the first period and a preset quantity threshold of the target historical period.
[0051] A plurality of candidate historical periods can be determined according to the special event. In the case that the special event is a statutory holiday, the plurality of candidate historical periods can be the periods including the statutory holiday in the preset historical years. For example, assuming that the special event is the May Day holiday in 2026, and the preset historical years are from 2020 to 2025, then the period where the May Day holiday in 2020 is located, the period where the May Day holiday in 2021 is located, the period where the May Day holiday in 2022 is located, the period where the May Day holiday in 2023 is located, the period where the May Day holiday in 2024 is located, and the period where the May Day holiday in 2025 is located can be determined as the plurality of candidate historical periods.
[0052] In a case where the special event is a social event, the candidate historical time periods can be time periods in which the social event or an event similar to the social event occurred in history. The number of the candidate historical time periods is multiple. For example, assuming that the social event is the National Games, and the preset number is 3, time periods in which the National Games were held in the last three times in history can be determined as the multiple candidate historical time periods.
[0053] After the multiple candidate historical time periods are determined, the similarity between each candidate historical time period and the first time period to be predicted can be calculated. The similarity can be calculated in a cosine similarity manner, a Euclidean distance manner, or the like. The specific calculation manner of the similarity is not limited in the present disclosure.
[0054] Then, the target historical time period is selected from the multiple candidate historical time periods according to the similarity between each candidate historical time period and the first time period and the preset number threshold of the target historical time period. The multiple candidate historical time periods can be sorted in descending order of the similarity to the first time period, and then the target historical time period can be selected from the sorted multiple candidate historical time periods according to the number threshold of the target historical time period. For example, the number threshold of the target historical time period is 3, and the first three candidate historical time periods (i.e., the three candidate historical time periods with the highest similarity to the first time period) in the sorted multiple candidate historical time periods can be determined as the target historical time period.
[0055] In the embodiments of the present disclosure, the multiple candidate historical time periods can be determined according to the special event, and the similarity between each candidate historical time period and the first time period can be determined respectively. Then, the target historical time period can be selected from the multiple candidate historical time periods according to the similarity and the number threshold of the target historical time period, so that the target historical time period can be selected from the multiple candidate historical time periods based on the similarity between each candidate historical time period and the first time period, and the similarity between the target historical time period and the first time period is improved.
[0056] In some possible implementation manners, the similarity between each candidate historical time period and the first time period is determined respectively, including: for any candidate historical time period, determining multi-dimensional feature information of the candidate historical time period and multi-dimensional feature information of the first time period, the multi-dimensional feature information including time period duration, time period position information in a year, time period starting day week number, and interval days between the time period and an adjacent rest day; and determining the similarity between the candidate historical time period and the first time period according to the multi-dimensional feature information of the candidate historical time period and the multi-dimensional feature information of the first time period.
[0057] For any candidate historical period, when calculating the similarity between the candidate historical period and the first period, the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period can be determined first. The multi-dimensional feature information can include the duration of the period, the position information of the period in the year, the day of the week of the start date of the period, and the interval days between the period and the adjacent holiday. Among them, the duration of the period can be the duration of the period in days. The position information of the period in the year can be the serial number of the month in which the period is located (the months can be sorted in 1-12) or the quarter serial number of the quarter in which the period is located (the quarters can be sorted in 1-4). The day of the week of the start date of the period refers to the day of the week corresponding to the start date of the period, for example, if the start date of the period corresponds to Wednesday, then the day of the week of the start date of the period can be determined as 3. The interval days between the period and the adjacent holiday refer to the interval days between the end date of the period and the next holiday.
[0058] Then the similarity between the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period can be calculated by cosine similarity, Euclidean distance, etc., so as to obtain the similarity between the candidate historical period and the first period.
[0059] In the embodiments of the present disclosure, for any candidate historical period, the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period can be determined, and then the similarity between the candidate historical period and the first period can be determined according to the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period, so that when calculating the similarity between the candidate historical period and the first period, the duration of the period, the position in the year, and other multi-dimensional information can be considered comprehensively, the accuracy of the similarity calculation is improved, and the accuracy of the selected second training data is further improved.
[0060] In some possible implementation manners, the determining the similarity between the candidate historical period and the first period according to the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period includes: determining a time similarity between the candidate historical period and the first period according to the duration of the candidate historical period and the duration of the first period; determining an annual position similarity between the candidate historical period and the first period according to the position information of the candidate historical period in the year and the position information of the first period in the year; determining a start date similarity between the candidate historical period and the first period according to the day of the week of the start date of the candidate historical period and the day of the week of the start date of the first period; determining an interval similarity between the candidate historical period and the first period according to the interval days between the candidate historical period and the adjacent holiday and the interval days between the first period and the adjacent holiday; and determining the similarity between the candidate historical period and the first period according to the time similarity, the annual position similarity, the start date similarity, the interval similarity, and a preset weight.
[0061] According to the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period, when determining the similarity between the candidate historical period and the first period, for the time period duration in the multi-dimensional feature information, the time similarity between the candidate historical period and the first period can be determined according to the duration of the candidate historical period and the duration of the first period; for the position information of the time period in the year in the multi-dimensional feature information, the annual position similarity between the candidate historical period and the first period can be determined according to the position information of the candidate historical period in the year and the position information of the first period in the year; for the starting day of the week of the time period in the multi-dimensional feature information, the starting day similarity between the candidate historical period and the first period can be determined according to the starting day of the week of the candidate historical period and the starting day of the week of the first period; for the interval days between the time period and the adjacent rest day in the multi-dimensional feature information, the interval similarity between the candidate historical period and the first period can be determined according to the interval days between the candidate historical period and the adjacent rest day and the interval days between the first period and the adjacent rest day.
[0062] Then, the time similarity, the annual position similarity, the starting day similarity, and the interval similarity between the candidate historical period and the first period can be weighted and summed according to preset weights to obtain the similarity between the candidate historical period and the first period. The preset weights include a first weight corresponding to the time similarity, a second weight corresponding to the annual position similarity, a third weight corresponding to the starting day similarity, and a fourth weight corresponding to the interval similarity. The preset weights can be determined and optimized by using a preset machine learning algorithm (such as a grid search algorithm, a Bayesian optimization algorithm, etc.). The preset weights can also be set by a person skilled in the art according to field knowledge. The specific values and determination methods of the preset weights are not limited in the present disclosure.
[0063] In the embodiments of the present disclosure, the similarity between the candidate historical period and the first period in each dimension feature information can be calculated respectively, and then the similarity between the candidate historical period and the first period in each dimension feature information can be weighted and summed according to preset weights to obtain the similarity between the candidate historical period and the first period, so as to improve the accuracy of the similarity between the candidate historical period and the first period.
[0064] In some possible implementation ways, the determining the similarity between the candidate historical period and the first period according to the time similarity, the annual position similarity, the starting day similarity, the interval similarity, and the preset weights comprises: determining a decay coefficient according to the interval years between the year in which the candidate historical period is located and the year in which the first period is located; and determining the similarity between the candidate historical period and the first period according to the time similarity, the annual position similarity, the starting day similarity, the interval similarity, the preset weights, and the decay coefficient.
[0065] When determining the similarity between the candidate historical period and the first period, a decay coefficient can also be introduced. The year in which the candidate historical period is located and the year in which the first period is located can be determined, and the interval years between the two years can be calculated, for example, the year in which the candidate historical period is located is 2023, and the year in which the first period is located is 2025, so the interval years are 2; then the decay coefficient is determined according to the interval years. The decay coefficient is negatively correlated with the interval years, that is, the larger the interval years, the smaller the decay coefficient. For example, the decay coefficient can be set as wherein, represents the interval years.
[0066] Then, the time similarity, the annual position similarity, the starting day similarity, and the interval similarity between the candidate historical period and the first period are weighted and summed according to the preset weight, and then multiplied by the decay coefficient to obtain the similarity between the candidate historical period and the first period.
[0067] The similarity between the candidate historical period and the first period can be calculated by the following formula (1) :
[0068] (1)
[0069] In formula (1), represents the time similarity between the candidate historical period and the first period, represents the first weight corresponding to the time similarity in the preset weight; represents the annual position similarity between the candidate historical period and the first period; represents the second weight corresponding to the annual position similarity in the preset weight; represents the starting day similarity between the candidate historical period and the first period; represents the third weight corresponding to the starting day similarity in the preset weight; represents the interval similarity between the candidate historical period and the first period; represents the fourth weight corresponding to the interval similarity in the preset weight; represents the decay coefficient; represents the interval years.
[0070] In the embodiments of the present disclosure, the decay coefficient can be determined according to the interval years between the year in which the first period is located and the year in which the candidate historical period is located, and then the similarity between the candidate historical period and the first period can be determined according to the time similarity, the annual position similarity, the starting day similarity, the interval similarity, the preset weight, and the decay coefficient, so that when determining the similarity between the candidate historical period and the first period, the decay coefficient related to time can be introduced to balance the similarity and timeliness, and the accuracy of the similarity between the candidate historical period and the first period is improved.
[0071] In some possible implementation manners, the step S24 can include: determining target training data according to the first training data and the second training data, including: in a case where a duration of a target historical period corresponding to the second training data is greater than a duration of the first period, selecting third training data from the second training data; and determining target training data according to the first training data and the third training data.
[0072] In the determination of the target training data, the duration (i.e., the number of days) of the target historical period corresponding to the second training data and the duration of the first period can be determined first, and then it is determined whether the duration of the target historical period corresponding to the second training data is greater than the duration of the first period. In a case where the duration of the target historical period corresponding to the second training data is less than or equal to the duration of the first period, the second training data is directly combined with the first training data to obtain the target training data.
[0073] In a case where the duration of the target historical period corresponding to the second training data is greater than the duration of the first period, third training data can be selected from the second training data, and the duration of a period corresponding to the third training data is the same as the duration of the first period. That is, the same number of days of training data as the duration of the first period can be cut from the second training data as the third training data. In a case where the duration of the target historical period corresponding to the second training data is greater than the duration of the first period, the second training data can also be sampled to reduce the amount of data to obtain the third training data. After obtaining the third training data, the first training data and the third training data can be combined to obtain the target training data.
[0074] In the embodiments of the present disclosure, in a case where the duration of the target historical period corresponding to the second training data is greater than the duration of the first period, the third training data can be selected from the second training data, and the target training data can be determined according to the first training data and the third training data, so as to balance and integrate the first training data as the basic training data and the second training data as the historical similar data in the target training data. Training the risk control model using the target training data not only enables the risk control model to learn the latest user behavior patterns, but also enables the risk control model to obtain experience in dealing with special events, thereby improving the prediction accuracy of the risk control model.
[0075] Figure 3 A schematic diagram of a data processing method provided by an embodiment of the present disclosure is shown in FIG. 1. Referring to FIG. 1, Figure 3 The data processing method includes:
[0076] In step S301, first training data is obtained from the data set according to a first time period to be predicted and a required amount of data for training of the risk control model;
[0077] In step S302, national statutory holiday information and public opinion information of a second time period are obtained.
[0078] In step S303, it is determined whether the first time period includes a special event, the special event including a statutory holiday or a social event.
[0079] In a case where the first time period does not include a special event, step S304 is performed to determine the first training data as target training data.
[0080] In a case where the first time period includes a special event, the following steps are performed.
[0081] In step S305, a plurality of candidate historical time periods are determined according to the special event.
[0082] In step S306, multi-dimensional feature information of each candidate historical time period and multi-dimensional feature information of the first time period are respectively determined, the multi-dimensional feature information including time period duration, time period position information in a year, time period starting day week number and interval days of the time period and an adjacent rest day.
[0083] In step S307, similarity of each candidate historical time period and the first time period is determined according to the multi-dimensional feature information of each candidate historical time period and the multi-dimensional feature information of the first time period.
[0084] In step S308, a target historical time period is selected from the plurality of candidate historical time periods according to the similarity of each candidate historical time period and the first time period and a preset quantity threshold of the target historical time period.
[0085] In step S309, second training data is obtained from the data set according to the target historical time period.
[0086] In step S310, target training data is determined according to the first training data and the second training data.
[0087] The data processing method provided by the embodiments of the present disclosure can obtain first training data from a data set according to a first time period to be predicted and a required amount of data for training; in the case that the first time period includes a special event, a target historical time period is determined according to the special event, and second training data is obtained from the data set according to the target historical time period; and then, the target training data is determined according to the first training data and the second training data, so that in the case that the first time period to be predicted includes a special event (for example, a statutory holiday or a social event), the first training data serving as basic training data and the second training data serving as historical similar data can be combined to determine the target training data, and the matching degree of the target training data and the first time period to be predicted is improved. The target training data obtained by using the data processing method according to the embodiments of the present disclosure can be used to train a risk control model used by a telecom operator in the first time period to be predicted, and the prediction accuracy of the risk control model in the first time period can be improved.
[0088] The target training data obtained by using the data processing method according to the embodiments of the present disclosure can be used to train a risk control model of a telecom operator, and the accuracy and generalization ability of the risk control model in a time period including a special event can be improved.
[0089] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form combined embodiments without deviating from the principle logic. Limited by the length, the present disclosure will not be repeated. It can be understood by those skilled in the art that the specific execution order of each step in the above-mentioned method should be determined according to its function and possible internal logic.
[0090] In addition, the present disclosure also provides a data processing apparatus, an electronic device and a computer readable storage medium, which can be used to implement any one of the data processing methods provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding description in the method part, and will not be repeated.
[0091] Figure 4 A block diagram of a data processing apparatus provided by the embodiments of the present disclosure is shown.
[0092] With reference to Figure 4 The data processing apparatus provided by the embodiments of the present disclosure includes:
[0093] The first data acquisition module 41 is configured to obtain first training data from a data set according to a first time period to be predicted and a required amount of data for training a risk control model, and the training data in the data set includes user historical communication data.
[0094] The historical period determination module 42 is configured to determine a target historical period according to the special event when the first period includes the special event, the special event including a statutory holiday or a social event, the social event being determined according to public opinion information of a second period.
[0095] The second data acquisition module 43 is configured to acquire second training data from the data set according to the target historical period.
[0096] The target data determination module 44 is configured to determine target training data according to the first training data and the second training data, the target training data being used to train the risk control model used for the first period.
[0097] In some possible implementation manners, the historical period determination module 42 is configured to determine a plurality of candidate historical periods according to the special event, determine a similarity between each candidate historical period and the first period respectively, and select the target historical period from the plurality of candidate historical periods according to the similarity between each candidate historical period and the first period and a preset quantity threshold of the target historical period.
[0098] In some possible implementation manners, the similarity between each candidate historical period and the first period is determined respectively, including: determining multi-dimensional feature information of the candidate historical period and multi-dimensional feature information of the first period for any candidate historical period, the multi-dimensional feature information including a period duration, position information of the period in a year, a period start day week number, and a period interval day number from an adjacent rest day; and determining the similarity between the candidate historical period and the first period according to the multi-dimensional feature information of the candidate historical period and the multi-dimensional feature information of the first period.
[0099] In some possible implementation manners, the determining the similarity between the candidate historical time period and the first time period according to the multi-dimensional feature information of the candidate historical time period and the multi-dimensional feature information of the first time period comprises: determining a time similarity between the candidate historical time period and the first time period according to a duration of the candidate historical time period and a duration of the first time period; determining an annual position similarity between the candidate historical time period and the first time period according to position information of the candidate historical time period in an annual period and position information of the first time period in the annual period; determining a start day similarity between the candidate historical time period and the first time period according to a start day of the week of the candidate historical time period and a start day of the week of the first time period; determining an interval similarity between the candidate historical time period and the first time period according to an interval day number of the candidate historical time period from a neighboring rest day and an interval day number of the first time period from a neighboring rest day; and determining the similarity between the candidate historical time period and the first time period according to the time similarity, the annual position similarity, the start day similarity, the interval similarity, and preset weights.
[0100] In some possible implementation manners, the determining the similarity between the candidate historical time period and the first time period according to the time similarity, the annual position similarity, the start day similarity, the interval similarity, and preset weights comprises: determining a decay coefficient according to an interval year number of an annual period in which the candidate historical time period is located and an annual period in which the first time period is located; and determining the similarity between the candidate historical time period and the first time period according to the time similarity, the annual position similarity, the start day similarity, the interval similarity, the preset weights, and the decay coefficient.
[0101] In some possible implementation manners, the determining the target training data according to the first training data and the second training data comprises: in a case where a duration of a target historical time period corresponding to the second training data is greater than the duration of the first time period, selecting third training data from the second training data; and determining the target training data according to the first training data and the third training data.
[0102] In some possible implementation manners, the obtaining the first training data from the data set according to the first time period to be predicted and a required data amount for training of the risk control model comprises: determining a time window parameter for data acquisition according to the required data amount for training of the risk control model; determining a third time period before the first time period according to the first time period to be predicted and the time window parameter; and obtaining the first training data from the data set according to the third time period.
[0103] Each of the modules in the data processing apparatus can be implemented wholly or partially by software, hardware, and a combination thereof. The modules can be embedded in or independent of a processor in the computer device in hardware form, or stored in a memory in the computer device in software form, so as to be invoked and executed by the processor to perform the operations corresponding to the modules.
[0104] Figure 5 A block diagram of an electronic device is provided for the embodiments of the present disclosure.
[0105] With reference to Figure 5 The embodiments of the present disclosure provide an electronic device, which comprises: at least one processor 701; at least one memory 702, and one or more I / O interfaces 703 connected between the processor 701 and the memory 702; wherein the memory 702 stores one or more computer programs executable by the at least one processor 701, and the one or more computer programs are executed by the at least one processor 701 to enable the at least one processor 701 to perform the data processing method described above.
[0106] Each of the modules in the electronic device can be implemented wholly or partially by software, hardware, and a combination thereof. The modules can be embedded in or independent of a processor in the computer device in hardware form, or stored in a memory in the computer device in software form, so as to be invoked and executed by the processor to perform the operations corresponding to the modules.
[0107] The embodiments of the present disclosure further provide a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data processing method described above. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium.
[0108] The embodiments of the present disclosure further provide a computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is run in a processor of an electronic device, the processor in the electronic device performs the data processing method described above.
[0109] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0110] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0111] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0112] Computer readable program instructions for carrying out operations of the present disclosure can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or any combination of one or more of the above in any combination, written in any combination of one or more programming languages, including object oriented programming languages such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0113] The computer program product described herein can be embodied in a specific manner by hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), and the like.
[0114] The various aspects of the present disclosure are described herein with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer readable program instructions.
[0115] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data storage cycles that change state. The instructions can be executed by one or more processors of a computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions which execute via the one or more processors of the computer or other programmable data processing devices create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0116] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0117] The flow and block diagrams in the drawings show architectural, functional, and operational aspects of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of instructions which comprise one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may
[0118] Example embodiments have been disclosed herein and, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described with respect to a particular embodiment can be used, combined, and / or modified in alternative embodiments, unless otherwise clearly indicated otherwise. Accordingly, it will be understood by those skilled in the art that various changes in form and details can be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A data processing method, characterized in that, include: Based on the first time period to be predicted and the amount of data required for training the risk control model, the first training data is obtained from the dataset, which includes user historical communication data. If the first time period includes special events, a target historical time period is determined based on the special events, including statutory holidays or social events, and the social events are determined based on public opinion information from the second time period; Based on the target historical time period, obtain second training data from the dataset; Based on the first training data and the second training data, target training data is determined, which is used to train the risk control model used in the first time period.
2. The method according to claim 1, characterized in that, The process of determining the target historical time period based on the specific event includes: Based on the aforementioned special events, multiple candidate historical time periods are determined; The similarity between each candidate historical time period and the first time period is determined separately; Based on the similarity between each candidate historical period and the first historical period and the preset threshold for the number of target historical periods, the target historical period is selected from the multiple candidate historical periods.
3. The method according to claim 2, characterized in that, The step of determining the similarity between each candidate historical time period and the first time period includes: For any candidate historical period, determine the multidimensional feature information of the candidate historical period and the multidimensional feature information of the first period. The multidimensional feature information includes the duration of the period, the location information of the period in the year, the weekday number of the start date of the period, and the number of days between the period and the adjacent rest day. Based on the multidimensional feature information of the candidate historical time period and the multidimensional feature information of the first time period, the similarity between the candidate historical time period and the first time period is determined.
4. The method according to claim 3, characterized in that, The step of determining the similarity between the candidate historical time period and the first time period based on the multidimensional feature information of the candidate historical time period and the multidimensional feature information of the first time period includes: Based on the duration of the candidate historical period and the duration of the first period, the temporal similarity between the candidate historical period and the first period is determined; Based on the location information of the candidate historical period in the year and the location information of the first period in the year, the annual location similarity between the candidate historical period and the first period is determined. The similarity between the starting date of the candidate historical period and the starting date of the first period is determined based on the weekday number of the starting date of the candidate historical period and the weekday number of the starting date of the first period. The similarity of the intervals between the candidate historical time period and the adjacent rest day is determined based on the number of days between the candidate historical time period and the adjacent rest day and the number of days between the first time period and the adjacent rest day. The similarity between the candidate historical time period and the first time period is determined based on the time similarity, the annual location similarity, the start date similarity, the interval similarity, and the preset weight.
5. The method according to claim 4, characterized in that, The step of determining the similarity between the candidate historical time period and the first time period based on the time similarity, the annual location similarity, the start date similarity, the interval similarity, and a preset weight includes: The attenuation coefficient is determined based on the number of years between the year in which the candidate historical period is located and the year in which the first period is located; The similarity between the candidate historical time period and the first time period is determined based on the time similarity, the annual location similarity, the start date similarity, the interval similarity, the preset weight, and the attenuation coefficient.
6. The method according to claim 1, characterized in that, The step of determining the target training data based on the first training data and the second training data includes: If the duration of the target historical period corresponding to the second training data is greater than the duration of the first period, then a third training data is selected from the second training data. The target training data is determined based on the first training data and the third training data.
7. The method according to claim 1, characterized in that, The step of obtaining the first training data from the dataset based on the first time period to be predicted and the amount of data required for training the risk control model includes: Determine the time window parameters for acquiring data based on the amount of data required to train the risk control model. Based on the first time period to be predicted and the time window parameters, determine the third time period before the first time period; According to the third time period, the first training data is obtained from the dataset.
8. A data processing apparatus, characterized in that, include: The first data acquisition module is used to acquire first training data from the dataset based on the first time period to be predicted and the amount of data required for training the risk control model. The training data in the dataset includes user historical communication data. The historical period determination module is used to determine a target historical period based on a special event when the first period includes such an event. The special event includes statutory holidays or social events, and the social events are determined based on public opinion information from the second period. The second data acquisition module is used to acquire second training data from the dataset according to the target historical time period; The target data determination module is used to determine target training data based on the first training data and the second training data, wherein the target training data is used to train the risk control model used in the first time period.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the data processing method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1-7.