Data screening method and device, electronic equipment and storage medium
By using primary key associations to filter out eligible accounts from the data table before deploying the filtering rules, the risk of excessive data volume in the production environment was resolved, and the accuracy of data volume estimation and the rationality of the rules were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-03-16
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies, after deploying preset filtering rules in the production environment, judge the effectiveness of the filtering rules in risk assessment based on the number of data that meet the filtering rules in the production environment. This can easily lead to excessive data volume, causing data warehouse capacity and business processing risks.
By acquiring preset filtering rules, including time periods and filtering conditions, and using primary key association, target accounts that meet the filtering conditions within the time period are filtered from the first and second data tables in the production environment, and the amount of data that meets the filtering rules is accurately estimated in advance.
Before deploying filtering rules in the production environment, accurately estimate the amount of data to avoid excessive data volume, reduce the risk to data warehouse capacity and business processing, and ensure the rationality of the filtering rules.
Smart Images

Figure CN116362750B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data intelligent analysis technology, and in particular to a data filtering method, apparatus, electronic device and storage medium. Background Technology
[0002] Currently, in order to conduct risk assessments on user accounts, such as determining whether a user has engaged in fraudulent activities, pre-set filtering rules can be used to filter the business data of each user account in a real production environment, thereby identifying user accounts that meet the filtering rules as risky accounts.
[0003] Due to the fluidity and immediacy of real-time data, most existing technologies are limited to deploying pre-set filtering rules in the production environment and then judging the effectiveness of those rules for risk assessment based on the amount of data matching the rules in the production environment. This can easily lead to situations where the amount of data matching the filtering rules in the production environment is too large, posing risks to data warehouse capacity and business processing. Therefore, a method is needed that can estimate the amount of data matching the filtering rules in advance before they are deployed to the production environment. Summary of the Invention
[0004] This application provides a data filtering method, apparatus, electronic device, and storage medium to address the problem in the prior art where, after deploying preset filtering rules in a production environment, the effectiveness of the filtering rules for risk assessment is judged based on the number of data that meets the filtering rules in the production environment. This can easily lead to situations where the amount of data that meets the filtering rules in the production environment is too large, thereby posing risks to data warehouse capacity and business processing.
[0005] In a first aspect, this application provides a data filtering method, comprising: obtaining preset filtering rules, the filtering rules including a time period and preset filtering conditions; obtaining a first data table in a production environment related to the filtering conditions, the first data table including first historical business data corresponding to multiple accounts within any time period; obtaining a second data table in the production environment related to the filtering conditions, the second data table including the arbitrary time period and second historical business data corresponding to multiple accounts within the time period preceding the arbitrary time period; and, based on the first data table and the second data table, filtering target accounts that meet the filtering conditions within the time period from the first data table by means of primary key association.
[0006] Secondly, this application provides a data filtering device, comprising: a first acquisition module for acquiring preset filtering rules, the filtering rules including a time period and preset filtering conditions; a second acquisition module for acquiring a first data table in a production environment related to the filtering conditions, the first data table including first historical business data corresponding to multiple accounts within any time period; a third acquisition module for acquiring a second data table in the production environment related to the filtering conditions, the second data table including the arbitrary time period and second historical business data corresponding to multiple accounts within the time period preceding the arbitrary time period; and a filtering module for filtering target accounts that meet the filtering conditions within the time period from the first data table based on the first data table and the second data table, using a primary key association method.
[0007] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described in the first aspect.
[0008] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0009] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0010] The data filtering method, apparatus, electronic device, and storage medium provided in this application obtain preset filtering rules, including time periods and preset filtering conditions. They then obtain a first data table related to the filtering conditions in the production environment, containing first historical business data for multiple accounts within any given time period. Finally, they obtain a second data table related to the filtering conditions in the production environment, containing second historical business data for multiple accounts within any given time period and time periods preceding that period. Based on the first and second data tables, and through primary key association, they filter out target accounts within the time period that meet the filtering conditions from the first data table. This allows for accurate estimation of the amount of data conforming to the filtering rules before deployment in the production environment, thus avoiding situations where the amount of data conforming to the filtering rules is too large, preventing risks to data warehouse capacity and business processing. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0012] Figure 1 The flow of the data filtering method provided in the embodiments of this application Figure 1 ;
[0013] Figure 2 The flow of the data filtering method provided in the embodiments of this application Figure 2 ;
[0014] Figure 3 The flow of the data filtering method provided in the embodiments of this application Figure 3 ;
[0015] Figure 4 A schematic diagram of the structure of the data filtering device provided in the embodiments of this application;
[0016] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0017] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0018] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0019] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.
[0020] To clearly understand the technical solutions proposed in this application, the technical names in the embodiments of this application will be explained first.
[0021] A filtering rule is a logical method for judging an event based on multiple conditions.
[0022] The time period refers to the time span covered by the filtering rules.
[0023] A test environment is an environment used to simulate production and is independent of the production environment.
[0024] The production environment is the environment used for actual production; it is a real environment and is independent of the testing environment.
[0025] Real-time data refers to data generated within the current time period in the production environment.
[0026] Historical data refers to data generated within a historical time period in a production environment.
[0027] Understandably, due to the fluidity and immediacy of real-time data, related technologies are mostly limited to deploying pre-set filtering rules in the production environment and judging the effectiveness of the filtering rules for risk assessment based on the number of data that meets the filtering rules in the production environment. This can easily lead to situations where the amount of data that meets the filtering rules in the production environment is too large, thereby posing risks to data warehouse capacity and business processing.
[0028] To address the aforementioned issues, relevant technologies can employ the following data slicing method: Select historical data related to the filtering rules from multiple time periods within the production environment, filter the historical data within each time period according to the filtering rules, and then take the average of the filtering results for each time period. This allows for the estimation of the amount of data that meets the filtering rules before the set filtering rules are deployed in the production environment.
[0029] For example, taking the following filtering rule as an example: filtering accounts that have N or more transactions with other payees within T hours and whose total transaction amount exceeds M, we can select historical data related to the filtering rule in 5 time periods in the production environment. For each time period, we can filter accounts that have N or more transactions with other payees within T hours and whose total transaction amount exceeds M, resulting in 5 filtering results. Then, we can calculate the average of the 5 filtering results and use the average as the estimated amount of data that meets the filtering rule.
[0030] This method can only provide a rough estimate of the amount of data for simple filtering rules. Using slicing to calculate the flow data will result in a large error and the estimated amount of data that meets the filtering rules will be inaccurate.
[0031] This application addresses the problem in related technologies where, after deploying pre-defined screening rules in a production environment, the effectiveness of the screening rules for risk assessment is judged based on the number of data items that meet the screening rules in the production environment. This often results in situations where the amount of data matching the screening rules in the production environment is too large, thus posing risks to data warehouse capacity and business processing. The following technical concept is proposed to address this issue:
[0032] Obtain preset filtering rules, which include time periods and preset filtering conditions; obtain a first data table related to the filtering conditions in the production environment, which includes first historical business data corresponding to multiple accounts within any time period; obtain a second data table related to the filtering conditions in the production environment, which includes second historical business data corresponding to multiple accounts within any time period and time periods prior to any time period; based on the first and second data tables, filter out target accounts that meet the filtering conditions within the time period from the first data table through primary key association.
[0033] Therefore, it is possible to accurately estimate the amount of data that meets the filtering rules before deploying them in the production environment. This avoids situations where the amount of data meeting the filtering rules in the production environment is too large, thus preventing risks to data warehouse capacity and business processing. For risk prediction scenarios, accurately estimating the amount of data that meets the filtering rules before deploying them in the production environment allows for the development of more suitable filtering rules.
[0034] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0035] First, combine Figure 1 The data filtering method provided in the embodiments of this application will be described. Figure 1 The flow of the data filtering method provided in the embodiments of this application Figure 1 .
[0036] It should be noted that the data filtering method provided in this application embodiment can be executed by a data filtering device, which can be an electronic device or configured in an electronic device to accurately estimate the amount of data that meets the filtering rules in advance before the set filtering rules are deployed in the production environment, thereby avoiding situations such as the amount of data that meets the filtering rules being too large in the production environment, and avoiding risks to data warehouse capacity and business processing.
[0037] Among them, electronic devices can be any device with computing capabilities, such as personal computers, mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, etc.
[0038] like Figure 1 As shown, this data filtering method includes the following steps:
[0039] S101. Obtain the preset filtering rules, which include the time period and preset filtering conditions.
[0040] This includes filtering rules that include a time period and preset filtering conditions, used to filter accounts that meet the filtering conditions within the time period. The time period and preset filtering conditions can be set according to the actual application scenario, and this application does not impose any restrictions on them.
[0041] For example, assuming the time period is T hours (T is a number greater than 0), the filtering conditions can include the number of transactions greater than or equal to N (N is an integer greater than 0) and the total transaction amount exceeding M (M is a number greater than 0). The filtering rules can include: filtering accounts that have more than or equal to N transactions with other payees within T hours and whose total transaction amount exceeds M. According to this filtering rule, accounts that have more than or equal to N transactions with other payees within T hours and whose total transaction amount exceeds M can be filtered out.
[0042] Alternatively, assuming the time period is T, the filtering criteria can include the number of transactions greater than or equal to N and the total transaction amount exceeding M. The filtering rules can include: filtering accounts that have more than or equal to N transactions with other payees and a total transaction amount exceeding M within T hours of a change of address. According to this filtering rule, accounts that have more than or equal to N transactions with other payees and a total transaction amount exceeding M within T hours of a change of address can be filtered out.
[0043] Alternatively, assuming the time period is T, the filtering criteria can include the number of times personal information has been changed greater than or equal to N, and the filtering rules can include: filtering accounts whose personal information has been changed greater than or equal to N within T hours. According to this filtering rule, accounts whose personal information has been changed greater than or equal to N within T hours can be filtered out.
[0044] It should be noted that the above screening rules are merely illustrative and should not be construed as limiting the screening rules of this application. Those skilled in the art can set screening rules as needed, as long as the screening rules include a time period and screening conditions.
[0045] S102. Obtain the first data table related to the filtering conditions in the production environment. The first data table includes the first historical business data corresponding to multiple accounts within any time period.
[0046] The "any time period" refers to any time period before the current time, which can be set as needed. For example, it can be set to 0:00 on January 1st to 24:00 on January 30th, 0:00 on January 1st to 24:00, 13:00 on January 2nd to 14:00, etc.
[0047] Taking the filtering criteria including the number of transactions greater than or equal to N, the total transaction amount exceeding M, and any time period from 0:00 to 24:00 on January 11 as an example, the first data table related to the filtering criteria in the production environment can be obtained. The first data table can include the historical transaction data of multiple accounts from 0:00 to 24:00 on January 11, including the transaction amount and transaction time of transactions with others.
[0048] Taking the filtering criteria including the number of times personal information has been changed greater than or equal to N, and any time period being from 0:00 to 24:00 on January 11 as an example, a first data table related to the filtering criteria can be obtained in the production environment. This first data table can include the information change data of multiple accounts from 0:00 to 24:00 on January 11, where the information change data includes the information change time, the type of information to which the change belongs, etc.
[0049] S103. Obtain the second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to multiple accounts within any time period and the time period before any time period.
[0050] The "arbitrary time period" is the same as the "arbitrary time period" in step S102, and the "time period" is the time period included in the filtering rules. The time period preceding the "arbitrary time period" is the time period adjacent to the start time of the "arbitrary time period". For example, assuming the "arbitrary time period" is from 0:00 to 24:00 on January 11, and the time period is one week, then the time period preceding the "arbitrary time period" is from 0:00 on January 4 to 24:00 on January 10.
[0051] Taking the filtering criteria as including the number of transactions greater than or equal to N, the total transaction amount exceeding M, and any time period from 0:00 to 24:00 on January 11, with a time period of one week, as an example, a second data table related to the filtering criteria can be obtained in the production environment. This second data table can include the historical transaction data of multiple accounts from 0:00 on January 4 to 24:00 on January 11, where the historical transaction data includes the transaction amount and transaction time of transactions with others.
[0052] Taking the filtering criteria as including the number of times personal information has been changed greater than or equal to N, with any time period from 0:00 to 24:00 on January 11th and a time period of one week as an example, a second data table related to the filtering criteria can be obtained in the production environment. This second data table can include the information change data of multiple accounts from 0:00 on January 4th to 24:00 on January 11th, where the information change data includes the information change time, the type of information to which the change belongs, etc.
[0053] S104. Based on the first data table and the second data table, target accounts that meet the filtering conditions within the time period are filtered out from the first data table by means of primary key association.
[0054] In this embodiment of the application, both the first data table and the second data table may include primary keys for distinguishing accounts, such as account number, ID card number of the user to whom the account belongs, mobile phone number of the user to whom the account belongs, etc. The first data table can be used as the main table. The second data table is associated with the primary key in the first data table to obtain the data associated with each primary key value of the primary key in the second data table and the primary key in the first data table. The data associated with each primary key value includes the historical business data corresponding to the primary key value within the time period. Then, the data is filtered according to the data associated with each primary key value of the primary key in the first data table to obtain the target accounts that meet the filtering conditions within the time period in the first data table.
[0055] For example, taking the filtering criteria as including the number of transactions greater than or equal to N, the total transaction amount exceeding M, and any time period from 0:00 to 24:00 on January 11th, with a time period of one week, and the filtering rules including filtering accounts that have made transactions with other payees greater than or equal to N and whose total transaction amount exceeds M within one week, the first data table can include the historical transaction data of multiple accounts from 0:00 to 24:00 on January 11th, where the historical transaction data includes the transaction amount and transaction time of transactions with others, etc., and the second data table can include the historical transaction data of multiple accounts from 0:00 on January 4th to 24:00 on January 11th, where the historical transaction data includes the transaction amount and transaction time of transactions with others, etc.
[0056] Assuming the first data table includes historical transaction data for each of accounts 1, 2, 3, and 4, and the second data table includes historical transaction data for each of accounts 1, 2, 3, 4, 5, 6, 7, and 8, the first data table can be used as the main table. By using the primary key (e.g., account number) in the first data table to distinguish accounts, the second data table can be linked to obtain the data associated with the primary key values corresponding to accounts 1, 2, 3, and 4 in the second data table. For example, the data associated with the primary key value corresponding to account 1 includes the historical transaction data of account 1 within one week.
[0057] Then, based on the filtering rules, the data associated with the primary key values of Account 1, Account 2, Account 3 and Account 4 can be filtered to obtain the target accounts in the first data table that have a transaction count of greater than or equal to N with other payees within a week and a total transaction amount exceeding M.
[0058] By slicing the data and using primary key association, the historical business data corresponding to each primary key value in the first data table within a time period is obtained. Then, target accounts that meet the filtering conditions within the time period are filtered out from the first data table according to the filtering conditions. This truly restores the processing logic of the filtering rules, so that the amount of data that meets the filtering rules can be accurately estimated in advance before the set filtering rules are deployed to the production environment.
[0059] The data filtering method provided in this application involves obtaining preset filtering rules, which include time periods and preset filtering conditions. A first data table related to the filtering conditions in the production environment is obtained, containing first historical business data corresponding to multiple accounts within any given time period. A second data table related to the filtering conditions in the production environment is also obtained, containing second historical business data corresponding to multiple accounts within any given time period and time periods preceding that period. Based on the first and second data tables, target accounts meeting the filtering conditions within the given time period are filtered from the first data table using primary key association. This allows for accurate estimation of the amount of data conforming to the filtering rules before deployment in the production environment, preventing situations where the amount of data conforming to the filtering rules is too large and thus avoiding risks to data warehouse capacity and business processing. For risk prediction scenarios, accurately estimating the amount of data conforming to the filtering rules before deployment in the production environment leads to more suitable filtering rules.
[0060] The following is combined with Figure 2 The present application provides a further explanation of the process by which the data filtering method, based on a first data table and a second data table, filters out target accounts that meet the filtering criteria within a time period from the first data table through a primary key association.
[0061] Figure 2 The flow of the data filtering method provided in the embodiments of this application Figure 2 .like Figure 2 As shown, this data filtering method includes the following steps:
[0062] S201. Obtain the preset filtering rules, which include the time period and preset filtering conditions.
[0063] S202. Obtain the first data table related to the filtering conditions in the production environment. The first data table includes the first historical business data corresponding to multiple accounts within any time period.
[0064] S203. Obtain the second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to multiple accounts within any time period and the time period before any time period.
[0065] It should be noted that the relevant descriptions of steps S201-S203 can be found in other embodiments, and will not be repeated here.
[0066] S204. Using the first data table as the main table, the second data table is associated with the first primary key used to distinguish accounts in the first data table, so as to obtain the first target data associated with each primary key value of the first primary key.
[0067] The first target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value associated with the first primary key. The business processing time included in the second historical business data in the first target data falls within a time period preceding the business processing time corresponding to the primary key value of the associated first primary key. Furthermore, the first target data associated with each primary key value of the first primary key may include second historical business data corresponding to one or more accounts.
[0068] The primary key is used to distinguish accounts. For example, it can be the account number, the ID number of the user to whom the account belongs, or the mobile phone number of the user to whom the account belongs. This application does not impose any restrictions on this.
[0069] The primary key value of the first primary key is the specific account identifier of the account, such as a specific account number, a specific ID number, a specific mobile phone number, etc.
[0070] The processing time refers to the time during which the business is processed. For example, for transaction business, the processing time is the transaction time; for information modification business, the processing time is the information modification time, and so on.
[0071] The business processing time included in a certain second historical business data is the time when the user corresponding to the second historical business data processed the business; the business processing time corresponding to the primary key value of the first primary key is the time when the user corresponding to the primary key value in the first data table processed the business.
[0072] In this embodiment, a first data table can be used as the master table. A second data table is associated with a first primary key in the first data table used to distinguish accounts. When associating the second data table, restrictions can be placed on second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated first primary key. This restriction applies to business transactions occurring within a time period preceding the transaction time corresponding to the primary key value of the associated first primary key. Thus, for each primary key value of the first primary key in the first data table, associated first target data can be obtained. The first target data associated with each primary key value of the first primary key includes historical business data within a specific time period corresponding to that primary key value.
[0073] For example, let's take the filtering criteria as including the number of transactions greater than or equal to N, the total transaction amount exceeding M, and any time period from 0:00 to 24:00 on January 11th, with a time period of one week. The filtering rules include filtering accounts that have had transactions with other payees greater than or equal to N and a total transaction amount exceeding M within one week. The first data table can include the historical transaction data of multiple accounts from 0:00 to 24:00 on January 11th, where the historical transaction data includes the transaction amount and transaction time of transactions with others. The second data table can include the historical transaction data of multiple accounts from 0:00 on January 4th to 24:00 on January 11th, where the historical transaction data includes the transaction amount and transaction time of transactions with others.
[0074] Assuming the first data table includes historical transaction data for accounts 1, 2, 3, and 4, and the second data table includes historical transaction data for accounts 1, 2, 3, 4, 5, 6, 7, and 8, the first data table can be used as the main table. By using the primary key (e.g., account number) in the first data table to distinguish accounts, the second data table can be linked to retrieve the first target data associated with each primary key value in the second data table and the primary key value in the first data table. For example, taking account 1 as an example, the first target data associated with the primary key value of account 1 can include at least one historical transaction record for account 1 in the second data table, and this at least one historical transaction record includes transactions completed within a time period prior to the transaction completion time for account 1 in the first data table. For instance, if the first data table includes the transaction amount for a transaction made by account 1 at 1 PM on January 11th, then the first target data associated with the primary key value of account 1 can include the transaction time and transaction amount for transactions made by account 1 between 1 PM on January 4th and 1 PM on January 11th in the second data table. Therefore, the first target data associated with the primary key value of account 1 includes the historical transaction data of account 1 within one week.
[0075] S205. Based on the filtering conditions, filter the first target data associated with each primary key value of the first primary key to obtain the target accounts in the first data table that meet the filtering conditions within the time period.
[0076] In one possible implementation, the filtering criteria may include both the number of transactions exceeding a threshold and the transaction amount exceeding a threshold. Accordingly, step S205 can be implemented in the following way:
[0077] For each primary key value of the first primary key, based on the second historical business data in the associated first target data, the number of business transactions and the transaction amount corresponding to the primary key value within the time period are determined. The primary key values of the first primary key whose corresponding number of business transactions exceeds a threshold and whose corresponding transaction amount exceeds a threshold within the time period are determined as the first target primary key values. The accounts corresponding to the first target primary key values are determined as target accounts that meet the filtering conditions within the time period. Therefore, for filtering conditions including a number of business transactions exceeding the threshold and a transaction amount exceeding the threshold, target accounts that meet the filtering conditions within the time period can be accurately selected.
[0078] For example, continuing the previous example, suppose the filtering criteria include a transaction count greater than or equal to N and a total transaction amount exceeding M, with any time period from 00:00 to 24:00 on January 11th, and a time period of one week. The filtering rules include filtering accounts that have a transaction count greater than or equal to N with other payees within a week and a total transaction amount exceeding M. Since the historical transaction data for each account in the first data table can be obtained through the above steps, the transaction count and total transaction amount within a week can be determined for each account. Therefore, target accounts with a transaction count greater than or equal to N with other payees within a week and a total transaction amount exceeding M can be filtered out.
[0079] In another possible implementation, the filtering criteria may include a number of business transactions exceeding a threshold. Accordingly, step S205 can be implemented as follows: For each primary key value of the first primary key, based on the second historical business data in the associated first target data, determine the number of business transactions corresponding to the primary key value within the time period; among the primary key values of the first primary key, the primary key values whose number of business transactions within the time period exceeds the threshold are determined as the first target primary key values; the accounts corresponding to the first target primary key values are determined as the target accounts that meet the filtering criteria within the time period. Thus, for filtering criteria including a number of business transactions exceeding the threshold, target accounts that meet the filtering criteria within the time period can be accurately selected.
[0080] For example, suppose the filtering criteria include N or more changes to personal information, with any time period from 00:00 to 24:00 on January 11th, and a time period of one week. The filtering rule includes filtering accounts that have N or more changes to personal information within a week. Since the information change data for each account in the first data table can be obtained through the above steps, the number of personal information changes within a week for each account can be determined, and thus the target accounts with N or more personal information changes within a week can be filtered out.
[0081] Therefore, after slicing the data, the historical business data corresponding to each primary key value in the first data table within a time period can be obtained through primary key association. Then, target accounts that meet the filtering conditions within the time period can be filtered out from the first data table according to the filtering conditions. This truly restores the processing logic of the filtering rules, so that the amount of data that meets the filtering rules can be accurately estimated in advance before the set filtering rules are deployed in the production environment. This avoids situations such as the amount of data that meets the filtering rules being too large in the production environment, thus avoiding risks to data warehouse capacity and business processing.
[0082] As can be seen from the above analysis, in this embodiment of the application, the filtering rules may include a time period and filtering conditions. For filtering rules that do not include triggering events, the first data table can be used as the main table. The first primary key in the first data table, used to distinguish accounts, is used to associate with the second data table to obtain the first target data associated with each primary key value. Then, according to the filtering conditions, the first target data associated with each primary key value is filtered to obtain the target accounts in the first data table that meet the filtering conditions within the time period. In one possible implementation, the filtering rules may also include triggering events. This type of filtering rule is used to filter out accounts that meet the filtering conditions within the time period after the triggering event occurs. Accordingly, step S104 may include: based on the first and second data tables, using primary key association, filtering out target accounts that meet the filtering conditions within the time period after the triggering event occurs from the first data table. Therefore, for filtering rules that include filtering conditions, time periods, and triggering events, the amount of data conforming to the filtering rules can be accurately estimated in advance before the set filtering rules are deployed in the production environment, thereby avoiding situations such as excessively large amounts of data conforming to the rules and avoiding risks to data warehouse capacity and business processing.
[0083] The following section addresses the aforementioned filtering rules, including time periods, preset filtering conditions, and triggering events, in conjunction with... Figure 3 The data filtering method provided in the embodiments of this application will be further explained.
[0084] Figure 3 The flow of the data filtering method provided in the embodiments of this application Figure 3 .like Figure 3 As shown, this data filtering method includes the following steps:
[0085] S301. Obtain the preset filtering rules, which include the time period, preset filtering conditions, and triggering events.
[0086] This includes a time period, preset filtering conditions, and filtering rules for trigger events, used to filter accounts that meet the filtering conditions within a time period after the trigger event occurs. The trigger event, time period, and preset filtering conditions can be set according to the actual application scenario, and this application does not impose any restrictions on them.
[0087] Among them, the triggering events can be, for example, address changes, phone number changes, etc.
[0088] For example, assuming the triggering event is an address change and the time period is T, the filtering conditions can include the number of transactions greater than or equal to N and the total transaction amount exceeding M. The filtering rules can include: filtering accounts that have more than or equal to N transactions with other payees and a total transaction amount exceeding M within T hours of the address change. According to this filtering rule, accounts that have more than or equal to N transactions with other payees and a total transaction amount exceeding M within T hours of the address change can be filtered out.
[0089] S302. Obtain the first data table related to the filtering conditions in the production environment. The first data table includes the first historical business data corresponding to multiple accounts within any time period.
[0090] S303. Obtain the second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to multiple accounts within any time period and the time period before any time period.
[0091] It should be noted that the relevant descriptions of steps S301-S303 can be found in other embodiments, and will not be repeated here.
[0092] S304. Obtain the third data table related to the triggering event in the production environment. The third data table includes the occurrence time of the triggering event for each of the multiple accounts within any time period and the time period before that time period.
[0093] In step S304, the "arbitrary time period" is the same as the "arbitrary time period" in steps S302-S303, and this time period is the time period included in the filtering rules. The time period preceding the "arbitrary time period" is the time period adjacent to the start time of the "arbitrary time period". For example, assuming the "arbitrary time period" is from 0:00 to 24:00 on January 11, and the time period is one week, then the time period preceding the "arbitrary time period" is from 0:00 on January 4 to 24:00 on January 10.
[0094] Taking the address change as the triggering event, with any time period from 0:00 to 24:00 on January 11th, and a time period of one week as an example, we can obtain a third data table related to the triggering event in the production environment. This third data table can include the address change time of multiple accounts from 0:00 on January 4th to 24:00 on January 11th.
[0095] S305. Using the first data table as the main table, the third data table is linked through the first primary key in the first data table used to distinguish accounts to obtain the fourth data table.
[0096] The fourth data table includes first historical business data whose corresponding primary key value in the first data table is the same as the primary key value of the second primary key used to distinguish accounts in the third data table, and target occurrence time associated with the first historical business data whose corresponding primary key value is the same as the primary key value of the second primary key. The target occurrence time is the earliest occurrence time among the occurrence times of the triggering events in the third data table whose corresponding primary key value is the same as the corresponding primary key value of the associated first historical business data.
[0097] The primary key is used to distinguish accounts. For example, it can be the account number, the ID number of the user to whom the account belongs, or the mobile phone number of the user to whom the account belongs. This application does not impose any restrictions on this.
[0098] The primary key value of the first primary key is the specific account identifier of the account, such as a specific account number, a specific ID number, a specific mobile phone number, etc.
[0099] The second primary key is used to distinguish accounts. For example, it can be the account number, the ID number of the user to whom the account belongs, or the mobile phone number of the user to whom the account belongs. This application does not impose any restrictions on this.
[0100] The primary key value of the secondary primary key is the specific account identifier, such as a specific account number, a specific ID number, or a specific mobile phone number.
[0101] The first primary key and the second primary key can be the same or different, and this application does not impose any restrictions on this.
[0102] For example, using address change as the triggering event, the filtering criteria include the number of transactions greater than or equal to N and the total transaction amount exceeding M, with any time period from 0:00 to 24:00 on January 11th, and a time period of one week. The filtering rules include filtering accounts that have had more than or equal to N transactions with other payees and a total transaction amount exceeding M within one week after the address change. The first data table can include the historical transaction data of multiple accounts from 0:00 to 24:00 on January 11th, including the transaction amount and transaction time with others. The third data table can include the address change time of multiple accounts from 0:00 on January 4th to 24:00 on January 11th.
[0103] Assuming the first data table includes the historical transaction data of accounts 1, 2, 3, and 4 from 0:00 to 24:00 on January 11, and the third data table includes the address change times of accounts 1, 2, 4, 5, 6, and 7 from 0:00 on January 4 to 24:00 on January 11, the first data table can be used as the main table. By using the primary key (e.g., account number) in the first data table to distinguish accounts, the third data table can be linked to obtain the fourth data table.
[0104] Since the primary key values corresponding to Account 1, Account 2, and Account 4 in the first data table are the same as those in the third data table, the fourth data table includes the historical transaction data corresponding to Account 1, Account 2, and Account 4 from 0:00 to 24:00 on January 11th in the first data table, as well as the target occurrence time associated with the historical transaction data corresponding to Account 1, Account 2, and Account 4. Specifically, the target occurrence time associated with the historical transaction data corresponding to Account 1 is the earliest address change time corresponding to Account 1 from 0:00 on January 4th to 24:00 on January 11th in the third data table; the target occurrence time associated with the historical transaction data corresponding to Account 2 is the earliest address change time corresponding to Account 2 from 0:00 on January 4th to 24:00 on January 11th in the third data table; and the target occurrence time associated with the historical transaction data corresponding to Account 3 is the earliest address change time corresponding to Account 3 from 0:00 on January 4th to 24:00 on January 11th in the third data table.
[0105] Taking account 1 as an example, assuming that the first data table includes the transaction amount of account 1's transaction at 13:00 on January 11, and the fourth data table includes account 1 changing its address to address 1 at 10:00 on January 10, changing its address to address 2 at 14:00 on January 9, and changing its address to address 3 at 15:00 on January 5, then the target occurrence time associated with the historical transaction data of account 1 is 15:00 on January 5.
[0106] Therefore, we can obtain the historical transaction data of a portion of the accounts in the first data table within any time period. These accounts are those that have experienced triggering events within any time period and the time period before any time period, and we can obtain the earliest time when the triggering events occurred for these accounts within any time period and the time period before any time period.
[0107] S306. Based on the fourth and second data tables, target accounts that meet the filtering conditions within the time period after the triggering event occur are filtered from the first data table through primary key association.
[0108] By using the first data table as the main table, and linking it to the third data table via the primary key used to distinguish accounts, a fourth data table is obtained. Based on the fourth and second data tables, and through the primary key association, target accounts that meet the filtering criteria within the time period following the occurrence of a triggered event are filtered from the first data table. This allows for accurate estimation of the amount of data matching the filtering rules before deployment in the production environment, thus avoiding situations where the amount of data matching the filtering rules is too large in the production environment, and preventing risks to data warehouse capacity and business processing. For risk prediction scenarios, accurately estimating the amount of data matching the filtering rules before deployment in the production environment allows for the development of more suitable filtering rules.
[0109] In some embodiments, step S306 can be implemented as shown in steps a1-a2:
[0110] a1. Using the fourth data table as the main table, the third primary key in the fourth data table, used to distinguish accounts, is linked to the second data table to obtain the second target data associated with each primary key value of the third primary key; wherein, the second target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated third primary key, and the business processing time included in the second historical business data in the second target data is before the business processing time corresponding to the primary key value of the associated third primary key, and within the time period after the target occurrence time;
[0111] a2. Based on the filtering criteria, filter the second target data associated with each primary key value of the third primary key to obtain the target accounts in the first data table that meet the filtering criteria within the time period after the triggering event.
[0112] The second target data associated with each primary key value of the third primary key may include second historical business data corresponding to one or more accounts.
[0113] The third primary key is used to distinguish accounts. For example, it can be the account number, the ID number of the user to whom the account belongs, or the mobile phone number of the user to whom the account belongs. This application does not impose any restrictions on this.
[0114] The primary key value of the third primary key is the specific account identifier, such as a specific account number, a specific ID number, or a specific mobile phone number.
[0115] The processing time refers to the time during which the business is processed. For example, for transaction business, the processing time is the transaction time; for information modification business, the processing time is the information modification time, and so on.
[0116] The transaction processing time included in a certain second historical transaction data is the time when the user corresponding to the second historical transaction data processed the transaction; the transaction processing time corresponding to the primary key value of the third primary key is the time when the user corresponding to the primary key value in the fourth data table processed the transaction.
[0117] In this embodiment, a fourth data table can be used as the main table. A second data table is associated with a third primary key in the fourth data table used to distinguish accounts. When associating with the second data table, restrictions can be placed on second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated third primary key. This second historical data includes business processing times that are before the business processing time corresponding to the primary key value of the associated third primary key and within a time period after the target occurrence time. Therefore, for each primary key value of the third primary key in the fourth data table, associated second target data can be obtained. The second target data associated with each primary key value of the third primary key includes historical business data corresponding to that primary key value within a time period after the target occurrence time.
[0118] For example, continuing the above example, taking the address change as the triggering event, the filtering conditions include the number of transactions greater than or equal to N, the total transaction amount exceeding M, and any time period from 0:00 to 24:00 on January 11, with a time period of one week. The filtering rules include filtering accounts that have more than or equal to N transactions with other payees within one week after the address change and whose total transaction amount exceeds M. The fourth data table can include the historical transaction data corresponding to accounts 1, accounts 2 and accounts 4 from 0:00 to 24:00 on January 11 in the first data table, as well as the target occurrence time associated with the historical transaction data corresponding to accounts 1, accounts 2 and accounts 4 from 0:00 on January 4 to 24:00 on January 11.
[0119] Assume the second data table includes historical transaction data for accounts 1, 2, 3, 4, 5, 6, 7, and 8 from 00:00 on January 4th to 24:00 on January 11th. The fourth data table can be used as the main table. The second data table is linked using a third primary key (e.g., account number) in the fourth data table to distinguish accounts, thereby retrieving the second target data associated with each primary key value in the second data table corresponding to the third primary key. For example, taking account 1, the second target data associated with the primary key value of account 1 can include at least one historical transaction record for account 1 in the second data table. This at least one historical transaction record must have a transaction processing time before the transaction processing time for account 1 in the fourth data table and within a time period after the target occurrence time for account 1. For example, if the fourth data table includes the transaction amount of a transaction made by account 1 at 1 PM on January 11th and the target occurrence time: 3 PM on January 5th, then the second target data associated with the primary key value corresponding to account 1 can include the transaction time and transaction amount of transactions made by account 1 before 1 PM on January 11th and within one week after 3 PM on January 5th, that is, the transaction time and transaction amount of transactions made between 3 PM on January 5th and 1 PM on January 11th. Therefore, the second target data associated with the primary key value corresponding to account 1 includes the historical transaction data of account 1 within one week after the address change.
[0120] In one possible implementation, the filtering criteria may include both the number of transactions exceeding a threshold and the transaction amount exceeding a threshold. Accordingly, step a2 can be implemented in the following way:
[0121] For each primary key value of the third primary key, based on the second historical business data in the associated second target data, the number of business transactions and the corresponding business amount corresponding to the primary key value within the time period after the triggering event are determined. Among the primary key values of the first primary key, the primary key values whose corresponding number of business transactions is greater than a threshold and whose corresponding business amount is greater than a threshold within the time period after the triggering event are determined as the second target primary key values. The accounts corresponding to the second target primary key values are determined as target accounts that meet the filtering conditions within the time period after the triggering event. Therefore, for filtering conditions including a number of business transactions greater than the threshold and a business amount greater than the threshold, target accounts that meet the filtering conditions within the time period after the triggering event can be accurately selected.
[0122] For example, continuing the previous example, suppose the triggering event is an address change. The filtering criteria include a transaction count greater than or equal to N and a total transaction amount exceeding M. The time period is from 00:00 to 24:00 on January 11th, with a time period of one week. The filtering rules include filtering accounts that have had a transaction count greater than or equal to N with other recipients and a total transaction amount exceeding M within one week after the address change. Since the historical transaction data for each account in the fourth data table can be obtained through the above steps, the transaction count and total transaction amount within one week after the address change can be determined for each account. Therefore, the target accounts that have had a transaction count greater than or equal to N with other recipients and a total transaction amount exceeding M within one week after the address change can be filtered out.
[0123] In another possible implementation, assuming the triggering event is an address change, the filtering criteria can include a number of business transactions exceeding a threshold. Accordingly, step a2 can be implemented as follows: For each primary key value of the third primary key, based on the second historical business data in the associated second target data, determine the number of business transactions corresponding to the primary key value within the time period following the triggering event; determine the primary key values of the third primary key whose number of business transactions exceeds the threshold within the time period following the triggering event as the second target primary key values; determine the accounts corresponding to the second target primary key values as target accounts that meet the filtering criteria within the time period following the triggering event. Therefore, for the filtering criteria including a number of business transactions exceeding the threshold, target accounts that meet the filtering criteria within the time period following the triggering event can be accurately selected.
[0124] For example, suppose the triggering event is an address change, and the filtering criteria include the number of personal information changes being greater than or equal to N, with any time period being from 00:00 to 24:00 on January 11th, and a time period of one week. The filtering rules include filtering accounts whose personal information has been changed more than or equal to N within one week of the address change. Since the information change data for each account in the fourth data table can be obtained through the above steps, the number of personal information changes within one week of the address change for each account can be determined, thus allowing the filtering of target accounts whose personal information has been changed more than or equal to N within one week of the address change.
[0125] Therefore, after slicing the data, the historical business data corresponding to each primary key value in the fourth data table within the time period after the triggering event can be obtained through primary key association. Then, target accounts that meet the filtering conditions within the time period after the triggering event can be filtered from the fourth data table according to the filtering conditions. This truly restores the processing logic of the filtering rules, so that the amount of data that meets the filtering rules can be accurately estimated in advance before the set filtering rules are deployed in the production environment. This avoids situations such as the amount of data that meets the filtering rules being too large in the production environment, thus avoiding risks to data warehouse capacity and business processing.
[0126] It should be noted that for filtering rules that combine multiple triggering events, such as filtering accounts that changed their phone number T hours after an address change, and whose number of transactions with others is greater than or equal to N hours after the phone number change X hours later, with a total transaction amount exceeding M, the data filtering method provided in this solution can also be used. This allows for accurate estimation of the amount of data matching the filtering rules before they are deployed in the production environment. The specific implementation process is similar to the aforementioned embodiments and will not be repeated here.
[0127] Figure 4 This is a schematic diagram of the data filtering device provided in an embodiment of this application. Figure 4 As shown, the data filtering device 400 includes: a first acquisition module 410, a second acquisition module 420, a third acquisition module 430, and a filtering module 440.
[0128] The first acquisition module 410 is used to acquire preset filtering rules, which include a time period and preset filtering conditions.
[0129] The second acquisition module 420 is used to acquire a first data table related to the filtering conditions in the production environment. The first data table includes first historical business data corresponding to multiple accounts within any time period.
[0130] The third acquisition module 430 acquires a second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to multiple accounts within any time period and the time period before any time period.
[0131] The filtering module 440 is used to filter target accounts that meet the filtering conditions within a time period from the first data table based on the first data table and the second data table through primary key association.
[0132] It should be noted that the data filtering device 400 provided in this application embodiment can execute the data filtering method in the foregoing embodiment. The data filtering device can be an electronic device or can be configured within an electronic device to accurately estimate the amount of data conforming to the filtering rules before the set filtering rules are deployed in the production environment. This avoids situations where the amount of data conforming to the filtering rules selected in the production environment is too large, thus preventing risks to data warehouse capacity and business processing.
[0133] Among them, electronic devices can be any device with computing capabilities, such as personal computers, mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, etc.
[0134] In some embodiments, the filtering module 440 includes:
[0135] The association unit is used to use the first data table as the master table, and associate the second data table through the first primary key in the first data table used to distinguish accounts, to obtain the first target data associated with each primary key value of the first primary key; wherein, the first target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated first primary key, and the business processing time included in the second historical business data in the first target data is within the time period before the business processing time corresponding to the primary key value of the associated first primary key;
[0136] The first filtering unit is used to filter the first target data associated with each primary key value of the first primary key according to the filtering conditions, so as to obtain the target accounts in the first data table that meet the filtering conditions within the time period.
[0137] In some embodiments, the filtering criteria include a number of business transactions exceeding a threshold.
[0138] The first filtering unit is specifically used for:
[0139] For each primary key value of the first primary key, the number of business transactions corresponding to the primary key value within the time period is determined based on the second historical business data in the associated first target data.
[0140] Among the primary key values of the first primary key, the primary key value whose corresponding number of business transactions within the time period is greater than the number of transactions threshold is determined as the first target primary key value;
[0141] The account corresponding to the primary key value of the first target is identified as the target account that meets the filtering criteria within the time period.
[0142] In some embodiments, the filtering rules also include triggering events;
[0143] Filtering module 440 includes:
[0144] The second filtering unit is used to filter target accounts that meet the filtering conditions within a time period after the triggering event occurs, based on the first data table and the second data table, through a primary key association.
[0145] In some embodiments, the second filtering unit includes:
[0146] The acquisition sub-unit is used to acquire the third data table related to the triggering event in the production environment. The third data table includes the occurrence time of the triggering event for each of the multiple accounts within any time period and the time period before the arbitrary time period.
[0147] The association subunit is used to use the first data table as the main table, and associate the third data table with the first primary key in the first data table used to distinguish accounts to obtain the fourth data table. The fourth data table includes first historical business data whose corresponding primary key value in the first data table is the same as the primary key value of the second primary key in the third data table used to distinguish accounts, and the target occurrence time associated with the first historical business data whose corresponding primary key value is the same as the primary key value of the second primary key. The target occurrence time is the earliest occurrence time among the occurrence times of the triggering events in the third data table whose corresponding primary key value is the same as the corresponding primary key value of the associated first historical business data.
[0148] The filtering sub-unit is used to filter target accounts that meet the filtering criteria within a time period after the triggering event occurs, based on the fourth and second data tables and through primary key association.
[0149] In some embodiments, the filtering subunit is specifically used for:
[0150] Using the fourth data table as the main table, the third primary key in the fourth data table, used to distinguish accounts, is linked to the second data table to obtain the second target data associated with each primary key value of the third primary key. The second target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated third primary key. The business processing time included in the second historical business data in the second target data is before the business processing time corresponding to the primary key value of the associated third primary key and within the time period after the target occurrence time.
[0151] Based on the filtering criteria, the second target data associated with each primary key value of the third primary key are filtered to obtain the target accounts in the first data table that meet the filtering criteria within the time period after the triggering event occurs.
[0152] In some embodiments, the filtering criteria include the number of business transactions being greater than a number threshold and the amount of business transactions being greater than an amount threshold.
[0153] The filtering sub-unit is also used for:
[0154] For each primary key value of the third primary key, the number of business transactions and the corresponding business amount within the time period are determined based on the second historical business data in the associated second target data.
[0155] Among the primary key values of the third primary key, the primary key value whose corresponding number of business transactions within the time period is greater than the number threshold and whose corresponding business amount is greater than the amount threshold is determined as the second target primary key value;
[0156] The account corresponding to the second target primary key value is identified as the target account that meets the filtering criteria within the time period after the triggering event occurs.
[0157] The data filtering device provided in this application embodiment can be used to execute the technical solution of the data filtering method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0158] The data filtering device provided in this application embodiment acquires preset filtering rules, which include time periods and preset filtering conditions. It acquires a first data table related to the filtering conditions in the production environment, which includes first historical business data corresponding to multiple accounts within any time period. It also acquires a second data table related to the filtering conditions in the production environment, which includes second historical business data corresponding to multiple accounts within any time period and a time period preceding that time period. Based on the first and second data tables, and through primary key association, it filters out target accounts that meet the filtering conditions within the time period from the first data table. Therefore, it can accurately estimate the amount of data conforming to the filtering rules before deploying them in the production environment, thereby avoiding situations where the amount of data conforming to the filtering rules in the production environment is too large, and preventing risks to data warehouse capacity and business processing.
[0159] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the filtering module 440 can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its function can be called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0160] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device may include: transceiver 121, processor 122, and memory 123.
[0161] Processor 122 executes computer execution instructions stored in memory, causing processor 122 to perform the scheme in the above embodiments. Processor 122 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0162] The memory 123 is connected to the processor 122 via the system bus and completes communication between them. The memory 123 is used to store computer program instructions.
[0163] Transceiver 121 can be used to obtain the task to be run and its configuration information.
[0164] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0165] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.
[0166] This application also provides a chip for executing instructions, which is used to execute the data filtering method described in the above embodiments.
[0167] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the data filtering method described in the above embodiments.
[0168] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the data filtering method in the above embodiments.
[0169] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0170] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A data filtering method, characterized in that, include: Obtain preset filtering rules, which include time periods and preset filtering conditions; Obtain a first data table related to the filtering conditions in the production environment. The first data table includes first historical business data corresponding to multiple accounts within any time period. Obtain a second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to each of the multiple accounts within the time period before the arbitrary time period. Based on the first data table and the second data table, target accounts that meet the filtering conditions within the time period are filtered out from the first data table by means of primary key association; The step of filtering target accounts that meet the filtering conditions within the time period from the first data table based on the first data table and the second data table, through primary key association, includes: Using the first data table as the main table, the second data table is associated with the first primary key used to distinguish accounts in the first data table to obtain the first target data associated with each primary key value of the first primary key; wherein, the first target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated first primary key, and the business processing time included in the second historical business data in the first target data is within the time period before the business processing time corresponding to the primary key value of the associated first primary key; Based on the filtering criteria, the first target data associated with each primary key value of the first primary key is filtered to obtain the target accounts in the first data table that meet the filtering criteria within the time period.
2. The method according to claim 1, characterized in that, The filtering criteria include a number of business transactions exceeding a threshold. The step of filtering the first target data associated with each primary key value of the first primary key according to the filtering conditions to obtain the target accounts in the first data table that meet the filtering conditions within the time period includes: For each primary key value of the first primary key, the number of business transactions corresponding to the primary key value within the time period is determined based on the second historical business data in the associated first target data. Among the primary key values of the first primary key, the primary key value whose corresponding number of business transactions within the time period is greater than the number threshold is determined as the first target primary key value; The account corresponding to the first target primary key value is identified as the target account that meets the filtering conditions within the time period.
3. The method according to claim 1, characterized in that, The filtering rules also include triggering events; The step of filtering target accounts that meet the filtering conditions within the time period from the first data table based on the first data table and the second data table, through primary key association, includes: Based on the first data table and the second data table, target accounts that meet the filtering conditions within the time period after the triggering event occur are filtered from the first data table by means of primary key association.
4. The method according to claim 3, wherein filtering target accounts that meet the filtering conditions within the time period after the occurrence of the triggering event, based on the first data table and the second data table and through primary key association, includes: Obtain a third data table related to the triggering event in the production environment. The third data table includes the occurrence time of the triggering event for each of the multiple accounts within the time period preceding the arbitrary time period. Using the first data table as the main table, and linking it to the third data table through the first primary key used to distinguish accounts in the first data table, a fourth data table is obtained. The fourth data table includes first historical business data whose corresponding primary key value in the first data table is the same as the primary key value of the second primary key used to distinguish accounts in the third data table, and target occurrence times associated with the first historical business data whose corresponding primary key value is the same as the primary key value of the second primary key. The target occurrence time is the earliest occurrence time among the occurrence times of the triggering events in the third data table whose corresponding primary key value is the same as the corresponding primary key value of the associated first historical business data. Based on the fourth data table and the second data table, target accounts that meet the filtering conditions within the time period after the triggering event are filtered from the first data table by means of primary key association.
5. The method according to claim 4, characterized in that, The step of filtering target accounts that meet the filtering conditions within the time period after the triggering event occurs, based on the fourth data table and the second data table and through primary key association, includes: Using the fourth data table as the main table, and linking it to the second data table through the third primary key used to distinguish accounts, we obtain the second target data associated with each primary key value of the third primary key; wherein, the second target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated third primary key, and the business processing time included in the second historical business data in the second target data is before the business processing time corresponding to the primary key value of the associated third primary key, and within the time period after the target occurrence time; Based on the filtering criteria, the second target data associated with each primary key value of the third primary key are filtered to obtain the target accounts in the first data table that meet the filtering criteria within the time period after the triggering event occurs.
6. The method according to claim 5, characterized in that, The filtering criteria include the number of business transactions exceeding a threshold and the transaction amount exceeding a threshold. The step of filtering the second target data associated with each primary key value of the third primary key according to the filtering conditions to obtain the target accounts in the first data table that meet the filtering conditions within the time period after the triggering event occurs includes: For each primary key value of the third primary key, based on the second historical business data in the associated second target data, determine the number of business transactions and the corresponding business amount corresponding to the primary key value within the time period after the occurrence of the triggering event; Among the primary key values of the third primary key, the primary key value whose number of business transactions within the time period after the triggering event is greater than the number threshold and whose corresponding business amount is greater than the amount threshold is determined as the second target primary key value; The account corresponding to the second target primary key value is determined as the target account that meets the filtering conditions within the time period after the triggering event occurs.
7. A data filtering device, characterized in that, include: The first acquisition module is used to acquire preset filtering rules, which include a time period and preset filtering conditions. The second acquisition module is used to acquire a first data table related to the filtering conditions in the production environment. The first data table includes first historical business data corresponding to multiple accounts within any time period. The third acquisition module acquires a second data table related to the filtering conditions in the production environment. The second data table includes the second historical business data corresponding to each of the multiple accounts within the time period before the arbitrary time period. The filtering module is used to filter target accounts that meet the filtering conditions within the time period from the first data table based on the first data table and the second data table by means of primary key association; The filtering module includes: The association unit is used to use the first data table as the main table, and associate the second data table with the first primary key in the first data table used to distinguish accounts, to obtain the first target data associated with each primary key value of the first primary key; wherein, the first target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated first primary key, and the business processing time included in the second historical business data in the first target data is within the time period before the business processing time corresponding to the primary key value of the associated first primary key; The first filtering unit is used to filter the first target data associated with each primary key value of the first primary key according to the filtering conditions, so as to obtain the target accounts in the first data table that meet the filtering conditions within the time period.
8. The apparatus according to claim 7, characterized in that, The filtering criteria include a number of business transactions exceeding a threshold. The first filtering unit is specifically used for: For each primary key value of the first primary key, the number of business transactions corresponding to the primary key value within the time period is determined based on the second historical business data in the associated first target data; Among the primary key values of the first primary key, the primary key value whose corresponding number of business transactions within the time period is greater than the number threshold is determined as the first target primary key value; The account corresponding to the first target primary key value is identified as the target account that meets the filtering conditions within the time period.
9. The apparatus according to claim 7, characterized in that, The filtering rules also include triggering events; The filtering module includes: The second filtering unit is used to filter target accounts that meet the filtering conditions within the time period after the triggering event occurs, based on the first data table and the second data table, by means of primary key association.
10. The apparatus according to claim 9, wherein the second screening unit comprises: The acquisition subunit is used to acquire a third data table related to the triggering event in the production environment. The third data table includes the occurrence time of the triggering event for each of the multiple accounts within the time period before the arbitrary time period. The association subunit is used to use the first data table as the main table, and associate the third data table with the first primary key in the first data table used to distinguish accounts to obtain a fourth data table; wherein, the fourth data table includes first historical business data whose corresponding primary key value in the first data table is the same as the primary key value of the second primary key in the third data table used to distinguish accounts, and target occurrence time associated with the first historical business data whose corresponding primary key value is the same as the primary key value of the second primary key, wherein the target occurrence time is the earliest occurrence time among the occurrence times of the triggering events in the third data table whose corresponding primary key value is the same as the corresponding primary key value of the associated first historical business data; The filtering subunit is used to filter target accounts that meet the filtering conditions within the time period after the triggering event occurs, based on the fourth data table and the second data table, through primary key association.
11. The apparatus according to claim 10, characterized in that, The filtering subunit is specifically used for: Using the fourth data table as the main table, and linking it to the second data table through the third primary key used to distinguish accounts, we obtain the second target data associated with each primary key value of the third primary key; wherein, the second target data includes second historical business data in the second data table whose corresponding primary key value is the same as the primary key value of the associated third primary key, and the business processing time included in the second historical business data in the second target data is before the business processing time corresponding to the primary key value of the associated third primary key, and within the time period after the target occurrence time; Based on the filtering criteria, the second target data associated with each primary key value of the third primary key are filtered to obtain the target accounts in the first data table that meet the filtering criteria within the time period after the triggering event occurs.
12. The apparatus according to claim 11, characterized in that, The filtering criteria include the number of business transactions exceeding a threshold and the transaction amount exceeding a threshold. The filtering subunit is also used for: For each primary key value of the third primary key, the number of business transactions and the corresponding business amount within the time period are determined based on the second historical business data in the associated second target data. Among the primary key values of the third primary key, the primary key value whose corresponding number of business transactions within the time period is greater than the number threshold and whose corresponding business amount is greater than the amount threshold is determined as the second target primary key value; The account corresponding to the second target primary key value is determined as the target account that meets the filtering conditions within the time period after the triggering event occurs.
13. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.
15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-6.