CN112232962A - Transaction index processing method, device and equipment - Google Patents

Transaction index processing method, device and equipment Download PDF

Info

Publication number
CN112232962A
CN112232962A CN202011304007.4A CN202011304007A CN112232962A CN 112232962 A CN112232962 A CN 112232962A CN 202011304007 A CN202011304007 A CN 202011304007A CN 112232962 A CN112232962 A CN 112232962A
Authority
CN
China
Prior art keywords
transaction
statistical
index
transaction information
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011304007.4A
Other languages
Chinese (zh)
Inventor
孟柯
陈政
孙明堃
黄国财
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202011304007.4A priority Critical patent/CN112232962A/en
Publication of CN112232962A publication Critical patent/CN112232962A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification

Abstract

The embodiment of the invention provides a transaction index processing method, a transaction index processing device and transaction index processing equipment, wherein transaction information is obtained from a transaction system in real time, and then the real-time transaction information is filtered according to a predetermined filtering rule, so that invalid transaction information which does not meet the requirement can be eliminated, and more valid transaction information can be stored in a memory; and because the target transaction index in the effective transaction information is extracted according to the preset statistical rule, the target transaction index comprises the transaction index of the user in each statistical period. The transaction indexes in each statistical period are obtained by processing the real-time transaction information, when a user wants to obtain the transaction indexes, the user only needs to input the extraction time range in the front-end interface, and the background server automatically carries out statistical processing on the transaction indexes in the statistical period contained in the time range according to the extraction time range, so that the processing efficiency is greatly improved.

Description

Transaction index processing method, device and equipment
Technical Field
The embodiment of the invention relates to the technical field of financial technology (Fintech), in particular to a transaction index processing method, a device and equipment.
Background
With the development of computer technology, more and more technologies are applied in the financial field, the traditional financial industry is gradually changing to financial technology (fintech), and the technology of counterfeit detection is no exception, but due to the requirements of security and real-time performance of the financial industry, higher requirements are also put forward on the technology. For example, when a user makes an online transaction or makes an offline purchase of goods for electronic payment over a network. Payment tools (payment two-dimensional codes, credit cards, bank cards and the like) for users to carry out transactions can be illegally stolen, and abnormal financial transactions are carried out. Therefore, it is necessary for the technician to perform counterfeit detection on the transaction data to detect those abnormal financial transactions. Usually, transaction indexes, such as transaction times and transaction amount, are counted according to transaction information of a user, and abnormal financial transactions are detected according to the transaction indexes.
In the related art, a statistical method of transaction indexes generally stores transaction information of a latest period of time (for example, 6 hours) in a database, and if the transaction times or transaction amounts of a customer in a preset period of time (for example, the latest 5 minutes) need to be counted, all transaction information in the preset period of time is extracted, then filtering is performed, indexes which do not meet statistical requirements are removed, and transaction indexes in the preset period of time are obtained through calculation.
However, the existing method needs to store all transaction information of the user, and all transaction information may contain invalid transaction information, such as information of transaction failure and transaction information that a technician does not need to count. Because the invalid transaction information occupies a large amount of storage space, the storage space can only store the transaction information within a limited time range recently, and further, the range of the technical staff for processing the transaction indexes is limited, and the transaction indexes within the limited time range can only be processed. If the technician wants to obtain the transaction index within a longer time range, the technician needs to process all the stored transaction information at intervals, and the transaction index obtaining and processing efficiency is reduced.
Disclosure of Invention
The embodiment of the invention provides a transaction index processing method, a transaction index processing device and transaction index processing equipment, and aims to solve the problem that in the prior art, the transaction index acquisition processing efficiency is low.
A first aspect of an embodiment of the present invention provides a transaction index processing method, including:
acquiring transaction information from a transaction system in real time;
filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information;
extracting target transaction indexes in the effective transaction information according to a preset statistical rule, wherein the target transaction indexes comprise transaction indexes of the user in each statistical period;
receiving an extraction time range input by a target person;
performing statistical processing on the transaction indexes in all statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range;
and sending the transaction index to a display terminal for display.
Optionally, the filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information includes:
extracting the transaction product type and the transaction scene identification in the transaction information;
matching corresponding filtering rules in a filtering rule table according to the transaction product types and the transaction scene identifications;
and filtering the transaction information according to corresponding filtering rules.
Optionally, the filtering rule includes at least one filtering condition, each filtering condition includes a corresponding matching field;
the filtering the transaction information according to the corresponding filtering rule includes:
and comparing the matching fields in each filtering condition in the corresponding filtering rule with the corresponding fields in the transaction information respectively to judge whether the matching fields in each filtering condition exist in the transaction information or not, and if so, determining the transaction information as effective transaction information.
Optionally, the statistical rule includes a statistical cycle type, a statistical manner and a statistical field, and the extracting the target transaction index in the valid transaction information according to a preset statistical rule includes:
determining the statistical period to which each piece of effective transaction information belongs according to the statistical period type and the transaction time in the effective transaction information;
extracting field information corresponding to the statistical field in each piece of effective transaction information;
and according to the statistical mode, carrying out statistics on field information in the effective transaction information belonging to the same statistical period to obtain the transaction index of each user in each statistical period.
Optionally, the statistical manner is a summation manner, the field information is a transaction amount, and the method further includes:
extracting a user identification in each effective transaction information;
according to the statistical mode, field information in the valid transaction information belonging to the same statistical period is counted to obtain a transaction index of each user in each statistical period, and the method comprises the following steps:
judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period;
if the transaction amount exists, adding the value of the transaction index corresponding to the user identification of the current user to the transaction amount in the effective transaction information to be counted;
and if the transaction amount does not exist, determining the transaction amount in the effective transaction information to be counted as a transaction index of the current user in the current counting period.
Optionally, the statistical method is a counting method, and the method further includes:
extracting a user identification in each effective transaction information;
according to the statistical mode, field information in the valid transaction information belonging to the same statistical period is counted to obtain a transaction index of each user in each statistical period, and the method comprises the following steps:
judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period;
if yes, judging whether the statistical record needs to exclude the transaction index repeatedly counted according to the effective transaction information to be counted, if yes, determining the transaction index corresponding to the user identifier of the current user existing in the statistical record as the transaction index of the current user in the current statistical period, and if not, increasing the value of the transaction index corresponding to the user identifier of the current user existing by 1;
and if not, determining the value of the transaction index of the current user in the current statistical period as 1.
Optionally, the method further includes:
receiving an index modification request input by a target person, wherein the index modification request comprises a time range;
acquiring a modified statistical rule according to the index modification request;
carrying out offline statistics again on the effective transaction information in the time range according to the modified statistical rule;
and replacing the transaction index with the wrong statistics index with a new transaction index with offline statistics.
Optionally, before obtaining the modified statistical rule according to the index modification request, the method further includes:
receiving statistical rule modification information input by a target person;
and modifying the corresponding statistical rule according to the modification information.
Optionally, the receiving of the extraction time range input by the target person includes:
receiving an index extraction request input by a target person;
and analyzing the index extraction request to obtain an extraction time range.
Optionally, the method further includes:
judging whether abnormal transaction information exists in the transaction information of each user according to the transaction index of each user in the statistical duration range;
and sending the abnormal transaction information to the display terminal.
A second aspect of an embodiment of the present invention provides a transaction index processing apparatus, including:
the acquisition module is used for acquiring transaction information from a transaction system in real time;
the filtering module is used for filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information;
the extraction module is used for extracting a target transaction index in the effective transaction information according to a preset statistical rule, wherein the target transaction index comprises a transaction index of a user in each statistical period;
the receiving module is used for receiving the extraction time range input by the target person;
the processing module is used for carrying out statistical processing on the transaction indexes in all the statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range;
and the sending module is used for sending the transaction index to a display terminal for displaying.
A third aspect of an embodiment of the present invention provides a computer apparatus, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory, so that the at least one processor performs the transaction indicator processing method provided by the first aspect of the embodiments of the present invention.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where a computer executing instruction is stored, and when a processor executes the computer executing instruction, the transaction index processing method provided in the first aspect of the embodiments of the present invention is implemented.
The embodiment of the invention provides a transaction index processing method, a transaction index processing device and transaction index processing equipment, wherein transaction information is obtained from a transaction system in real time, and then the real-time transaction information is filtered according to a predetermined filtering rule, so that invalid transaction information which does not meet requirements can be eliminated, the invalid transaction information does not need to be stored in a memory, and therefore the occupation of memory resources is saved, and more valid transaction information can be stored in the memory; and because the target transaction index in the effective transaction information is extracted according to the preset statistical rule, the target transaction index comprises the transaction index of the user in each statistical period. The transaction indexes in each statistical period are obtained by processing the real-time transaction information, when a user wants to obtain the transaction indexes, the user only needs to input the extraction time range in the front-end interface, and the background server automatically carries out statistical processing on the transaction indexes in the statistical period contained in the time range according to the extraction time range, so that the processing efficiency is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram illustrating an application scenario of a transaction index processing method according to an exemplary embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a transaction indicator processing method according to an exemplary embodiment of the invention;
FIG. 3 is a schematic illustration of an operator interface display according to an exemplary embodiment of the present invention;
FIG. 4 is a flow diagram illustrating a transaction indicator processing method according to another exemplary embodiment of the invention;
FIG. 5 is a flow diagram illustrating a transaction indicator processing method according to another exemplary embodiment of the invention;
FIG. 6 is a flow diagram illustrating a transaction indicator processing method according to another exemplary embodiment of the invention;
FIG. 7 is a flow diagram illustrating a transaction indicator processing method according to another exemplary embodiment of the invention;
FIG. 8 is a schematic diagram of a transaction indicator processing arrangement according to an exemplary embodiment of the present invention;
FIG. 9 is a schematic illustration of an operator interface display according to another exemplary embodiment of the present invention;
fig. 10 is a schematic structural diagram of a computer device according to an exemplary embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
At present, with the development of computer technology, more and more technologies are applied in the financial field, the traditional financial industry is gradually changing to financial technology (Finteh), and the technology of counterfeit detection is not an exception, but due to the requirements of security and real-time performance of the financial industry, higher requirements are also put forward on the technology. For example, when a user makes an online transaction or makes an offline purchase of goods for electronic payment over a network. Payment tools (payment two-dimensional codes, credit cards, bank cards and the like) for users to carry out transactions can be illegally stolen, and abnormal financial transactions are carried out. Therefore, it is necessary for the technician to perform counterfeit detection on the transaction data to detect those abnormal financial transactions. Usually, transaction indexes, such as transaction times and transaction amount, are counted according to transaction information of a user, and abnormal financial transactions are detected according to the transaction indexes.
In the related art, a statistical method of transaction indexes generally stores transaction information of a latest period of time (for example, 6 hours) in a database, and if the transaction times or transaction amounts of a customer in a preset period of time (for example, the latest 5 minutes) need to be counted, all transaction information in the preset period of time is extracted, then filtering is performed, indexes which do not meet statistical requirements are removed, and transaction indexes in the preset period of time are obtained through calculation. However, the existing method needs to store all transaction information of the user, and all transaction information may contain invalid transaction information, such as information of transaction failure and transaction information that a technician does not need to count. Because the invalid transaction information occupies a large amount of storage space, the storage space can only store the transaction information within a limited time range recently, and further, the range of the technical staff for processing the transaction indexes is limited, and the transaction indexes within the limited time range can only be processed. If the technician wants to obtain the transaction index within a longer time range, the technician needs to process all the stored transaction information at intervals, for example, if the storage module of the transaction system can only store the transaction information of the last six hours, if the technician wants to obtain the transaction information of the last two days, the technician needs to process all the transaction information in the memory once every six hours and continuously process the transaction information for two days, otherwise, the transaction information before six hours cannot be obtained, and the processing efficiency for obtaining the transaction index is reduced.
Aiming at the defect, the technical concept of the technical scheme of the invention mainly comprises the following steps: the transaction information is acquired in real time, and then the real-time transaction information is filtered according to a predetermined filtering rule, so that the transaction information which does not meet the statistical requirement can be eliminated, and effective transaction information is obtained, so that all transaction information does not need to be stored in a memory database, and the occupation of memory resources is saved; and then extracting target transaction indexes in the effective transaction information according to a preset statistical rule, wherein the target transaction indexes comprise transaction indexes of the user in each statistical period. The transaction indexes in each statistical period are obtained by processing the real-time transaction information, when a user wants to obtain the transaction indexes, the user only needs to input the extraction time range in the front-end interface, and the background server automatically carries out statistical processing on the transaction indexes in the statistical period contained in the time range according to the extraction time range, so that the processing efficiency is greatly improved.
Fig. 1 is an application scenario diagram of a transaction index processing method according to an exemplary embodiment of the present invention.
As shown in fig. 1, the basic architecture of the application scenario provided by this embodiment mainly includes: a payment tool 101, a transaction system 102, a background server 103 and a display terminal 104; the payment tool may be, but is not limited to, a credit card, a bank card, a payment two-dimensional code, and the like. When a user uses a payment tool to perform a payment operation, the payment tool or payment information of the user may be stolen, and a person who steals the information may steal cash in a credit card or a bank card of the user by using the payment tool or the payment information. The background server acquires transaction information in the transaction system, counts the acquired transaction information to obtain transaction indexes such as transaction times, transaction amount and the like in a period of time, analyzes the transaction index information to detect whether abnormal financial transactions occur, and sends a statistical result and the detected abnormal transaction information to the display terminal for displaying.
Fig. 2 is a flowchart illustrating a transaction index processing method according to an exemplary embodiment of the present invention, and an execution subject of the method provided in this embodiment may be a server in the embodiment illustrated in fig. 1.
As shown in fig. 2, the method provided by the present embodiment may include the following steps.
S201, transaction information is obtained from the transaction system in real time.
Specifically, when a transaction comes in the transaction system, the background server reads the real-time transaction information in the transaction system, such as the information of the transaction client ID, the transaction time, the transaction product type, the transaction amount, the transaction result, the transaction amount, and the like.
S202, filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information.
Specifically, when a customer uses the two-dimensional code in the transaction system for payment, the transaction may fail due to a network reason, that is, although one piece of transaction information is also stored in the transaction system, the transaction result in the transaction information is the transaction failure, and the customer needs to re-transact. Therefore, when there is a real-time transaction, the real-time transaction information needs to be filtered and classified, for example, if the number of successful transactions needs to be counted, only the transaction result is the transaction information with successful transaction, and then the transaction information with successful transaction result is valid transaction information. For another example, if the product type is to be counted as a food type, the real-time transaction information needs to be filtered, and when the transaction product type in the transaction information is the food type, the transaction information is valid transaction information; filtering out the type of the transaction product as non-food.
It should be noted that the filtering rule includes a plurality of filtering conditions, such as product types, transaction scenarios, transaction results, and the like, and during filtering, the transaction information meeting these filtering conditions is filtered out, and specifically, which filtering conditions are selected can be determined according to statistical needs.
For example, unlike the filtering of the existing statistical intermediate variables, the method using SQL filtering such as SPARKSQL uses a filter using JSONPATH, for example, if the scene of a transaction is successful, assuming that the field for determining success failure is "TRADE _ RESULT", the specific filter expression is "[ TRADE _ RESULT ] ═ SUCC'", and multi-level field filtering is supported, such as "$. For example, as shown in table 1 below, the function of the filter is to filter out the transaction information that the product category is "DCP", the transaction scenario is "CASH", and the transaction result is "SUCC".
TABLE 1
Figure BDA0002787735900000081
Figure BDA0002787735900000091
S203, extracting target trading indexes in the effective trading information according to preset statistical rules, wherein the target trading indexes comprise trading indexes of the user in each statistical period.
Specifically, after the effective transaction information is obtained through filtering in the previous step, the effective transaction information is counted according to a preset counting rule to obtain a transaction index of each user in each counting period, where the transaction index may be the transaction frequency of the user in each counting period, or the transaction amount of the user in each counting period.
The statistical period may be every minute, every hour, etc., and how long the specific statistical period is may be set in advance in the statistical rule. Assuming that the statistical period is minutes, the final transaction count per minute or transaction amount per minute for each user is obtained.
Illustratively, the transaction time included in the transaction information is 14 digits, for example, "20200801053056" indicates that the transaction time of the transaction is 30 minutes and 56 seconds at 1 st 8 th 2020, and the user identifier in the transaction information may be a customer ID, a merchant ID, or the like, which may uniquely identify a statistical subject, such as an identification number of the user. Suppose that the transaction times in the six valid transaction information having the user identity ID of "0999960000011356" are "20200801053012", "20200801053018", "20200801053024", "20200801053039", "20200801053056", and "20200801053240", respectively. If the type of the statistical period set in the statistical rule is minute, the statistical result obtained after the statistics of the valid transaction information is shown in table 2 below, which indicates that the customer with ID "0999960000011356" has 5 total transactions at 8/1/5/30, that is, the number of transactions of the customer in the statistical period is 5.
TABLE 2
Statistical rule ID Statistical marking Statistical period Statistical results
DCP_CUST_CASH_SUCC_CNT_MIN 0999960000011356 202008010530 5
Similarly, the transaction index of the user in each statistical period can be obtained.
It will be appreciated that the transaction metrics for each user over each statistical period are obtained and stored in the database. So as to be called in the following statistics.
And S204, receiving the extraction time range input by the target person.
S205, carrying out statistical processing on the transaction indexes in all the statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range.
Specifically, when a statistical request input by a target person is received, the statistical request is analyzed to obtain a time range to be extracted, which statistical periods the time range includes is determined, and target transaction indexes in the included statistical periods are aggregated to obtain final transaction indexes in the extraction time range.
For example, referring to fig. 3, the user customizes the statistical start time and end time on the display interface of the operation terminal, and may also directly select the extraction durations such as "last 5 minutes", "last 1 hour", "last three months", and the like. Assuming that the user ID is ' 123 ' selected by the target person, the transaction index of the latest 5 minutes is selected and counted, and the current time is 6 o ' clock 30 min at 7/1/2020, the server obtains the latest five minutes of the counting time length, and then reads the transaction indexes of the user in each minute of the latest five minutes, namely the transaction index of 30 o ' clock 30 at 7/1/2020, the transaction index of 29 o ' clock 29 at 7/1/2020, the transaction index of 28 o ' clock 6 at 7/1/6/27/2020, the transaction index of 26 o ' clock 6 at 7/1/2020, and if the transaction indexes are transaction amounts, the transaction amounts in the five counting periods are added, so that the transaction amount of the latest user in the latest five minutes can be obtained.
And S206, sending the transaction index to a display terminal for display.
In the embodiment, the transaction information is acquired from the transaction system in real time, and then the real-time transaction information is filtered according to the predetermined filtering rule, so that invalid transaction information which does not meet the requirement can be eliminated, and the invalid transaction information does not need to be stored in the memory, so that the occupation of memory resources is saved, and more valid transaction information can be stored in the memory; and because the target transaction index in the effective transaction information is extracted according to the preset statistical rule, the target transaction index comprises the transaction index of the user in each statistical period. The transaction indexes in each statistical period are obtained and stored by processing the real-time transaction information, when a user wants to obtain the transaction indexes, the user only needs to input the extraction time range in the front-end interface, and the background server automatically carries out statistical processing on the transaction indexes in the statistical period contained in the extraction time range, so that the processing efficiency is greatly improved.
For a better understanding of the present application, the steps in the embodiment shown in fig. 2 will be explained in detail below.
Fig. 4 is a flowchart illustrating a transaction index processing method according to another exemplary embodiment of the present invention, and the method provided in this embodiment is based on the embodiment illustrated in fig. 2, and a specific implementation process of filtering transaction information according to a filtering rule is described.
As shown in fig. 4, the method provided by the present embodiment may include the following steps.
S401, traversing the filtering rule table according to the transaction product type and the transaction scene identification in the transaction information to obtain the corresponding filtering rule identification.
The transaction information may include, but not limited to, a customer identification ID, a merchant ID, a transaction time, a transaction product type, a transaction scenario, a transaction amount, a transaction result, a transaction amount, and the like.
Specifically, the relevant technicians predetermine a plurality of matching rules, and store the identifier of each matching rule in the filtering rule table, where the filtering rule identifier includes the transaction product type and the transaction scenario, so as to facilitate matching of the corresponding filtering rule when filtering the transaction information. And after the transaction information is obtained, the transaction product type and the transaction scene in the transaction information are extracted, and then the filtering rule table is traversed to match with the corresponding filtering rule identification.
Illustratively, the transaction product type in the extracted transaction information is DCP, the transaction scene is CASH, and the matched filtering rule is identified as DCP _ CASH.
S402, judging whether a filtering rule corresponding to the filtering rule identifier exists in a database, if so, executing a step S403; if not, continuously traversing the filtering statistical table to obtain the filtering rule ID again.
S403, obtaining a filtering rule corresponding to the filtering rule ID, wherein the filtering rule comprises a plurality of filtering conditions, and each filtering condition comprises a matching field.
S404, traversing the filtering conditions in the filtering rule, and comparing the matching fields in each filtering condition with the corresponding fields in the transaction information.
Specifically, after a filtering rule identifier corresponding to the transaction information is obtained, a corresponding filter is found out according to the filtering rule identifier, and the filter is provided with a filtering rule and comprises a plurality of filtering conditions. For example, referring to table 1 above, assuming that the transaction product type is DCP and the transaction scenario is CASH, the matched filtering rule is identified as DCP _ CASH, so as to find out the filter information in the corresponding filter, as shown in table 1, where the filtering rule includes four filtering conditions, respectively: transaction product type, transaction scenario, transaction type, and transaction result. Then, extracting the matching fields in the four filtering conditions, wherein the matching fields are respectively a transaction product type 'DCP', a transaction scene 'CASH', a transaction type 'PLUS' and a transaction result 'SUCC'.
S405, judging whether the matching fields in each filtering condition exist in the transaction information, if so, executing the step S406; if not, go to step S407.
S406, determining the transaction information as valid transaction information.
S407, new transaction information is acquired, and the process returns to step S401.
Specifically, according to the matching field in each filtering condition, the corresponding field in the transaction information is extracted. For example, the four matching fields in the four filter conditions extracted in the above example are the transaction product type "DCP", the transaction scenario "CASH", the transaction type "PLUS", and the transaction result "SUCC", respectively, and then the fields of the transaction product type, the transaction scenario, the transaction type, and the transaction result in the transaction information are also extracted. And then, JSONPATH is used for comparing the field values of the fields, and the comparison of the fields in all the filtering conditions in the filter is completed. If all the fields are successfully matched, namely whether the matched fields in each filtering condition exist in the transaction information or not, the transaction information is valid, otherwise, the transaction information does not meet the statistical requirement, the next transaction information is obtained again, and the filtering is continued.
In the embodiment, the real-time transaction information is filtered according to the predetermined filtering rule, the transaction information which does not meet the requirement can be filtered, only the effective transaction information which meets the requirement is left, and the occupation of the memory space is reduced because the irrelevant transaction information does not need to be stored.
Fig. 5 is a flowchart illustrating a transaction index processing method according to another exemplary embodiment of the present invention, and the method provided in this embodiment is based on the embodiment illustrated in fig. 2, and a specific implementation process of counting a target transaction index according to a preset statistical rule is described.
It should be noted that, if the filter is used to filter out the valid transaction information meeting the conditions, the intermediate variable can be processed by configuring the statistical rule, and the intermediate variable is the transaction index of each user in each statistical period. Wherein, the statistical rule mainly includes: the statistical period type refers to an index of whether the index is minute or hour, the statistical key represents what dimension the statistics are performed on, and may be a customer ID, a merchant ID, and an ID field that generally identifies a statistical subject, the statistical function is generally an aggregation function of summing, counting, and the like, and the statistical field refers to which field the index is counted by, such as transaction amount, and the like.
Illustratively, as shown in table 3, the statistical rule is to count the amount of money per minute taken by a client, the statistical period type is "mi" minutes, the statistical key is that the unique identifier of the client is "ECIF _ NO", the identifier may be a field of the ID, the statistical function is "SUM", and the statistical field is the transaction amount "TRNAS _ AMT".
TABLE 3
Figure BDA0002787735900000121
Figure BDA0002787735900000131
As shown in fig. 5, the method provided by the present embodiment may include the following steps.
And S51, determining the current statistical period of the effective transaction information according to the statistical period type.
Specifically, 14-bit transaction time in the valid transaction information is extracted, if the statistical period type is minute, the first 12-bit numbers between transactions are intercepted, if the statistical period type is hour, the first 10-bit numbers of the transaction time are intercepted, and if the statistical period type is daily, the first 8-bit numbers of the transaction time are intercepted. For example, the transaction time in the valid transaction information is "20200801053023", which means that the transaction time of the valid transaction information is 5 o' clock 30 min 23 sec at 8 month 1 day 2020, and if the type of the statistical period is minute, the first 12 digits "202008010530" are intercepted as the current statistical period of the valid transaction information; if the type of the statistical period is small, the top 10 digits "2020080105" are intercepted as the current statistical period of the valid transaction message.
S52, determining a statistical function, and if the statistical function is the Count, executing the step S531; if the statistical function is Sum, then step S532 is performed.
It should be noted that the transaction index may be the transaction frequency or the transaction amount, and if the transaction frequency is counted, the statistical function to be selected is the count; if the transaction amount is counted, the statistical function to be selected is summation.
S531, judging whether a statistical record corresponding to the user identifier in the effective transaction information exists in a statistical table in the current statistical period, if so, executing the step S541; if not, step S542 is executed.
S541, judging whether the indexes which are repeated with the effective transaction information in the statistical table need to be eliminated, if not, executing the step S551; if necessary, step S552 is executed.
S542, judging whether the index which is repeated with the effective transaction information in the statistical table needs to be eliminated, if not, executing the step S553; if necessary, step S554 is executed.
S551, updating the statistical result corresponding to the user identification in the statistical table, and adding 1 to the current statistical result.
S552, keeping the statistical result corresponding to the user identifier in the statistical table unchanged.
And S553, inserting a statistical result corresponding to the user identifier into the statistical table, wherein the value of the statistical result is 1.
S554, keeping the statistical result corresponding to the user identification in the statistical table unchanged.
Specifically, under the condition that the statistical function is a counting function, assuming that the statistical period type is minutes, the corresponding statistical table includes transaction indexes (transaction times) of a plurality of users in each minute, for example, as shown in table 4.1, transaction times of user 1 and user 2 in two periods "202008010529" and "202008010530" are included.
TABLE 4.1
User 1 User 2
202008010529 2 4
202008010530 3 0
If the user identifier in the valid transaction information is "user 2" and the transaction time is "20200801052936", the current statistical period of the valid transaction information is 202008010529, and it can be known through judgment that the statistical record corresponding to the user 2 exists in the statistical table.
Further, it is determined whether the number of transactions of user 2 in the statistical period of 202008010529, which are repeatedly counted, needs to be excluded. Specifically, if the current valid transaction information is not counted, the re-ranking operation is not required, the transaction frequency of the user 2 in the statistical period of 202008010529 is increased by 1, and the updated statistical table is shown in table 4.2. If the current valid transaction information is already counted, a re-ordering operation is required, that is, the valid transaction information is not counted any more, and the transaction number of the user 2 in the counting period of 202008010529 is kept unchanged, which is still 2 times in table 4.1.
TABLE 4.2
User 1 User 2
202008010529 2 5
202008010530 3 0
If the user identifier in the valid transaction information is "user 2" and the transaction time is "20200801053126", the current statistical period of the valid transaction information is 202008010531, and it can be determined that the statistical record corresponding to the user 3 does not exist in the statistical table 4.1.
Further, it is determined whether the transaction frequency of the user 3 in the statistical period of 202008010531, which is repeatedly counted, needs to be excluded, if not, it indicates that the valid transaction information is not counted, the transaction frequency of the user 3 in the statistical period of 202008010531 is inserted into the statistical table, and the value of the transaction frequency is 1, and the updated statistical table is shown in table 4.3. If necessary, the number of transactions by user 3 in the statistical period of 202008010531 is inserted into the statistical table, and the value of the number of transactions is set to 0, as shown in table 4.4.
TABLE 4.3
User 1 User 2 User 3
202008010529 2 4
202008010530 3 0
202008010531 1
TABLE 4.4
User 1 User 2 User 3
202008010529 2 4
202008010530 3 0
202008010531 0
S532, judging whether a statistical record corresponding to the user identification in the effective transaction information exists in a statistical table in the current statistical period, if so, executing the step S543; if not, go to step S544.
And S543, updating the statistical result corresponding to the user identifier in the statistical table, and adding the current statistical result and the transaction amount in the effective transaction information.
And S544, inserting a statistical result corresponding to the user identifier into the statistical table, wherein the statistical result is the transaction amount in the effective transaction information.
Specifically, under the condition that the statistical function is a summation function, assuming that the type of the statistical period is minutes, the corresponding statistical table includes transaction indexes (transaction amounts) of a plurality of users in each minute, for example, as shown in table 5.1, transaction amounts of user 1 and user 2 in two periods "202008010529" and "202008010530" are included.
TABLE 5.1
User 1 User 2
202008010529 100 200
202008010530 60 80
If the user identifier in the valid transaction information is "user 2", the transaction time is "20200801052936", and the transaction amount is 30 yuan, the current statistical period of the valid transaction information is 202008010529, and it can be known through judgment that the statistical record corresponding to the user 2 exists in the statistical table. The transaction amount of user 2 in the statistical mark in the statistical period of 202008010529 is increased by 30 and the updated statistical table is shown in table 5.2.
TABLE 5.2
User 1 User 2
202008010529 100 230
202008010530 60 80
If the user identifier in the valid transaction information is "user 3", the transaction time is "20200801052936", and the transaction amount is 30 yuan, the current statistical period of the valid transaction information is 202008010529, and it can be determined that the statistical record corresponding to the user 3 does not exist in the statistical table. The transaction amount for user 3 during the statistical period of 202008010529 is inserted into the statistical table and the updated statistical table is shown in table 5.3.
TABLE 5.3
User 1 User 2 User 3
202008010529 100 230 30
202008010530 60 80
And S56, finally obtaining the transaction index of each user in each statistical period.
Specifically, the transaction index of each user in each minute can be obtained by counting all valid transaction information according to the statistical rule.
It is understood that if the statistical period is hourly or daily, the trading index of each user in each hour or each day can be obtained by the statistical method.
Further, after obtaining the transaction index of each user in each statistical period, when receiving a statistical request input by a target person, obtaining a statistical time range which the target person wants to input, and performing statistics on the transaction indexes in all statistical periods in the statistical time range according to a preset statistical mode to obtain the transaction index of each user in the statistical time range.
Illustratively, the target person requests to count the transaction amount of the user 1 in the last five minutes, and the last five minutes comprise five statistical periods (each statistical period is 1 minute), and the transaction amounts in the five statistical periods of the user are added to obtain the transaction amount of the user in the last 5 minutes.
In this embodiment, the valid transaction information is processed in real time, and the current statistical period is determined when one valid transaction information is obtained, so as to update the statistical result in the statistical table in real time, and finally obtain the transaction index (transaction frequency or transaction amount) of each user in each statistical period. The method has the advantages that all effective transaction information is firstly split into the single statistical periods to carry out the statistics of the transaction indexes, the transaction indexes of each user in each statistical period can be obtained, the statistical period can be every minute, every hour, every day and the like, when the transaction indexes in a longer time range need to be counted, only the transaction indexes in all the statistical periods contained in the time range need to be aggregated, and the statistical efficiency is greatly improved.
It should be noted that, in the present solution, all valid transaction information can be split into a single statistical period according to a preset statistical rule to perform statistics on the transaction index, so as to obtain the transaction index of each user in each statistical period. However, if the statistical rule setting is wrong, the statistical error of the transaction index of a single statistical period may be caused, and then all the data of the transaction index used in the statistical period will be wrong subsequently.
Specifically, all data of the background server are from an upstream transaction system, and the background server is responsible for counting real-time indexes, but the upstream transaction system counts the transaction data in the daytime to the data warehouse platform HIVE, then performs offline data processing of key data, performs account checking with the real-time processing data of the background server, and performs alarm display on a front-end page corresponding to the background server if the data are different. Developers check related data, and if the statistical rules in the background server are configured wrongly, data restoration needs to be carried out on transaction indexes in a single statistical period.
It can be understood that a wrong configuration of the statistical rules of the index will result in a wrong calculation of the transaction index in all the individual statistical periods before correction, and if the error is not corrected timely and quickly, the final index may be wrong even if the statistical rules are corrected later, for example, the number of transaction strokes in 20200801 days is 5, but the wrong calculation is 6, then the transaction indexes required to be used in the period in the latest index are wrong later, and if the data difference is large, misjudgment on the risk of the client is likely to be caused. Therefore, another embodiment of the present invention provides an automatic number trimming method based on the above embodiment.
Fig. 6 is a schematic flow chart of a transaction index processing method according to another exemplary embodiment of the present invention, and a method for repairing an index is further described based on the foregoing method embodiment of the method provided in this embodiment.
As shown in fig. 6, the method provided by the present embodiment may include the following steps.
S601, receiving an index modification request input by a target person, wherein the index modification request comprises a time range.
Specifically, the target person may input an index modification request through the operation terminal, where the index modification request includes a statistical rule to be modified and a corresponding modification time range, where the modification time range is mainly to select a modified start time, and errors may occur in the transaction indexes counted after the start time.
It should be noted that the modification start time may be a set time of the statistical rule that needs to be modified, for example, if the statistical index that needs to be modified is 0 minutes 0 seconds at 0 point of 10 months and 17 days in 2019, the modification start time is also 0 minutes 0 seconds at 0 point of 10 months and 17 days in 2019, and the modification end time may be a current time or a last use time of the statistical index that needs to be modified.
For example, assuming that the statistical rule ID to be modified selected by the target person is "1-MS-transm tamt-H", the selected task state is processing completion, the start time is 2019, 10 and 17 days, and the end time is 2019, 10 and 20 days, a modification task is generated, and the display interface is as shown in fig. 9.
S602, obtaining the modified statistical rule according to the index modification request.
Specifically, after the background server obtains a modification request input by a user, the modified statistical rule is read.
It should be noted that before the modified statistical rule is acquired according to the index modification request, the wrong statistical rule needs to be modified, and in specific implementation, the target person may modify the wrong statistical rule on the front-end page, and after the background server acquires the new statistical rule, replace the corresponding wrong statistical rule in the database.
Illustratively, if the reconciliation alarm finds that the successful transaction number of yesterday of the client is 6, and the statistical result of the background server on the real-time transaction data is 100, the data investigation is started, the finding reason is that the statistical function of the statistical rule is wrong, the statistical function is supposed to be the Count, and the mistake is configured to be the Sum function Sum, so that the transaction amount of 6 pens is summed up to 100 and is not in accordance with the actual data. Then, the target person completes the modification of the statistical rule, and then selects a modification time range and the modified statistical rule on a front-end display interface.
And S603, carrying out offline statistics again on the effective transaction information in the time range according to the modified statistical rule.
Specifically, after the background server obtains the modified statistical rule, the statistical rule and the related transaction information are generated into a Structured Query Language (SQL) after the HIVE processing, and then the transaction indexes in the related statistical period are processed off-line again in the HIVE library.
In some embodiments, referring to fig. 7, the process of offline statistics in this step is specifically as follows:
and S6031, reading the modified statistical rule.
S6032, extracting a statistical period type from the modified statistical rule.
And S6033, intercepting the transaction time in the transaction information according to the type of the statistical period to obtain the statistical period corresponding to each transaction information.
S6034, the statistical period corresponding to each transaction information and the user identification in each transaction information are converted into GROUPBY conditions of HIVESQL.
S6035, the filtering rule corresponding to the modified statistical rule is converted into a WHERE condition of HIVESSQL.
And S6036, converting the statistical function in the modified statistical rule into a packet aggregation function of HIVESSQL.
And S6037, converting the modification time range into HIVE partitions to obtain the statistical period needing to be modified.
And S6038, splicing the SQL sentences obtained above to obtain the final SQL.
Illustratively, after the background server first obtains the modified statistical rule, it knows that the statistical dimension is the customer ID (e.g. identity number) by parsing the statistical rule, adds the identity number to the group by condition, and the type of the statistical period is day, then truncates 8 bits of the 14-bit transaction time in the transaction information (e.g. truncates the first eight bits of 20200901103025 to be 20200901) and also adds the group by condition. If the index of transaction success is to be counted, the relevant filter needs to be parsed out, and the filtering condition of successful transaction is that the matching field TRANS _ RESULT is "SUCC", so "TRANS _ RESULT is" SUCC "added to the WHERE condition. If the time required to be modified is from 6 th to 6 th month 3, all the partitions from 6 th to 3 th month are calculated as "20200601", "20200602" and "20200603", respectively, and these three statistical period information are added to the IN condition as the filtering partition. The final statistical function is the corresponding statistical function, if the number of successful transactions needs to be counted, the statistical function is Count, and the final SQL is approximately as follows:
SELECT ID_NO,COUNT(1)FROM TM_BASIC_FRAUD WHERE TRANS_RESULT=‘SUCC’GROUP BY ID_NO,SUBSTR(REQUEST_TIME,0,8)AND ds IN(‘20200601’,‘20200602’,‘20200603’)
s604, the transaction index with the wrong statistics is replaced by a new transaction index with offline statistics.
Specifically, after the background server converts the statistical rules and the relevant data in the transaction information into relevant HIVESQL, when an index modification request is received, the HIVESQL is analyzed, a correct index runs out from the HIVE library, the correct transaction index is pushed to the database of the application system, an incorrect intermediate variable is covered, and the error index is repaired.
In the embodiment, only the related counting personnel need to input the statistical rules and the modification requests to be modified on the front-end display interface, the background server can automatically complete the repair of the error indexes according to the modification requests, the operation is simple, the risk is reduced, and the accuracy of index statistics is improved.
In a possible embodiment, the method further comprises: judging whether abnormal transaction information exists in the transaction information of each user according to the transaction index of each user in the statistical duration range; and sending the abnormal transaction information to a display terminal for display.
Specifically, the background server compares the transaction index with a preset threshold value after the transaction index of each user within the statistical duration range is obtained through statistics, and if the transaction index is larger than the preset threshold value, it indicates that abnormal financial transactions exist in the transaction information of the user.
For example, assuming that the preset transaction amount threshold value per day is 8 ten thousand yuan, the preset transaction number threshold value is 1030 times, and the transaction amount of the customer a on the day of 8/1/2020 is counted to be 10 ten thousand yuan, it is indicated that abnormal financial transaction exists.
Fig. 8 is a schematic diagram of a structure of a transaction index processing apparatus according to an exemplary embodiment of the present invention.
As shown in fig. 8, the apparatus provided in this embodiment includes: an acquisition module 801, a filtering module 802, an extraction module 803, a receiving module 804 and a processing module 805; the acquiring module 801 is used for acquiring real-time transaction information; a filtering module 802, configured to filter the transaction information according to a predetermined filtering rule to obtain effective transaction information; an extracting module 803, configured to extract a target transaction index in the valid transaction information according to a preset statistical rule, where the target transaction index includes a transaction index of a user in each statistical period; a receiving module 804, configured to receive an extraction time range input by a target person; the processing module 805 is configured to perform statistical processing on the transaction indexes in all the statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range.
Further, the filtering module includes:
the first extraction unit is used for extracting the transaction product type and the transaction scene identification in the transaction information;
the matching unit is used for matching corresponding filtering rules in a filtering rule table according to the transaction product types and the transaction scene identifications;
and the filtering unit is used for filtering the transaction information according to the corresponding filtering rule.
Further, the filtering rule includes at least one filtering condition, each filtering condition includes a corresponding matching field, and the filtering unit is specifically configured to: and comparing the matching fields in each filtering condition in the corresponding filtering rule with the corresponding fields in the transaction information respectively to judge whether the matching fields in each filtering condition exist in the transaction information or not, and if so, determining the transaction information as effective transaction information.
Further, the statistical rule includes a statistical period type, a statistical manner and a statistical field, and the extraction module includes:
the determining unit is used for determining the statistical period to which each piece of effective transaction information belongs according to the statistical period type and the transaction time in the effective transaction information;
the second extraction unit is used for extracting field information corresponding to the statistical field in each piece of effective transaction information;
and the calculation unit is used for counting the field information in the effective transaction information belonging to the same counting period according to the counting mode to obtain the transaction index of each user in each counting period.
Further, the statistical method is a summation method, the field information is a transaction amount, and the second extracting unit is further configured to: extracting a user identification in each effective transaction information; the computing unit is specifically configured to: judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period; if the transaction amount exists, adding the value of the transaction index corresponding to the user identification of the current user to the transaction amount in the effective transaction information to be counted; and if the transaction amount does not exist, determining the transaction amount in the effective transaction information to be counted as a transaction index of the current user in the current counting period.
Further, the statistical method is a counting method, and the second extracting unit is further configured to: extracting a user identification in each effective transaction information; the computing unit is specifically configured to: judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period; if yes, judging whether the statistical record needs to exclude the transaction index repeatedly counted according to the effective transaction information to be counted, if yes, determining the transaction index corresponding to the user identifier of the current user existing in the statistical record as the transaction index of the current user in the current statistical period, and if not, increasing the value of the transaction index corresponding to the user identifier of the current user existing by 1; and if not, determining the value of the transaction index of the current user in the current statistical period as 1.
Further, the apparatus provided in this embodiment further includes: a modification module 806 to: receiving an index modification request input by a target person, wherein the index modification request comprises a time range; acquiring a modified statistical rule according to the index modification request; carrying out offline statistics again on the effective transaction information in the time range according to the modified statistical rule; and replacing the transaction index with the wrong statistics index with a new transaction index with offline statistics.
Further, the modification module is further configured to: receiving statistical rule modification information input by a target person before acquiring the modified statistical rule according to the index modification request; and modifying the corresponding statistical rule according to the modification information.
Further, the apparatus provided in this embodiment further includes: a detecting module 807, configured to determine whether there is abnormal transaction information in the transaction information of each user according to a transaction index of each user within the statistical duration range; the sending module is also used for sending the abnormal transaction information to a display terminal for displaying.
Further, the apparatus provided in this embodiment further includes: and the sending module 809 is configured to send the transaction index to a display terminal for display.
For detailed functional description of each module in this embodiment, reference is made to the description of the embodiment of the method, and the detailed description is not provided herein.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
Fig. 10 is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. As shown in fig. 10, the present embodiment provides a computer apparatus 100 including: at least one processor 1001 and memory 1002. The processor 1001 and the memory 1002 are connected to each other via a bus 1003.
In a specific implementation process, the at least one processor 1001 executes the computer-executable instructions stored in the memory 1002, so that the at least one processor 1001 executes the transaction index processing method in the foregoing method embodiment.
For a specific implementation process of the processor 1001, reference may be made to the above method embodiments, which have similar implementation principles and technical effects, and details of this embodiment are not described herein again.
In the embodiment shown in fig. 10, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
Another embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the transaction index processing method in the above method embodiment is implemented.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (13)

1. A transaction index processing method is characterized by comprising the following steps:
acquiring transaction information from a transaction system in real time;
filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information;
extracting target transaction indexes in the effective transaction information according to a preset statistical rule, wherein the target transaction indexes comprise transaction indexes of the user in each statistical period;
receiving an extraction time range input by a target person;
performing statistical processing on the transaction indexes in all statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range;
and sending the transaction index to a display terminal for display.
2. The method of claim 1, wherein filtering the transaction information according to predetermined filtering rules to obtain valid transaction information comprises:
extracting the transaction product type and the transaction scene identification in the transaction information;
matching corresponding filtering rules in a filtering rule table according to the transaction product types and the transaction scene identifications;
and filtering the transaction information according to corresponding filtering rules.
3. The method of claim 2, wherein the filter rule comprises at least one filter condition, each filter condition comprising a respective match field;
the filtering the transaction information according to the corresponding filtering rule includes:
and comparing the matching fields in each filtering condition in the corresponding filtering rule with the corresponding fields in the transaction information respectively to judge whether the matching fields in each filtering condition exist in the transaction information or not, and if so, determining the transaction information as effective transaction information.
4. The method according to claim 1, wherein the statistical rule includes a statistical period type, a statistical manner and a statistical field, and the extracting the target transaction index from the valid transaction information according to a preset statistical rule includes:
determining the statistical period to which each piece of effective transaction information belongs according to the statistical period type and the transaction time in the effective transaction information;
extracting field information corresponding to the statistical field in each piece of effective transaction information;
and according to the statistical mode, carrying out statistics on field information in the effective transaction information belonging to the same statistical period to obtain the transaction index of each user in each statistical period.
5. The method of claim 4, wherein the statistical method is a summation method, the field information is a transaction amount, and the method further comprises:
extracting a user identification in each effective transaction information;
according to the statistical mode, field information in the valid transaction information belonging to the same statistical period is counted to obtain a transaction index of each user in each statistical period, and the method comprises the following steps:
judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period;
if the transaction amount exists, adding the value of the transaction index corresponding to the user identification of the current user to the transaction amount in the effective transaction information to be counted;
and if the transaction amount does not exist, determining the transaction amount in the effective transaction information to be counted as a transaction index of the current user in the current counting period.
6. The method of claim 4, wherein the statistical method is a counting method, the method further comprising:
extracting a user identification in each effective transaction information;
according to the statistical mode, field information in the valid transaction information belonging to the same statistical period is counted to obtain a transaction index of each user in each statistical period, and the method comprises the following steps:
judging whether a transaction index corresponding to the user identification of the current user exists in the statistical record of the current statistical period;
if yes, judging whether the statistical record needs to exclude the transaction index repeatedly counted according to the effective transaction information to be counted, if yes, determining the transaction index corresponding to the user identifier of the current user existing in the statistical record as the transaction index of the current user in the current statistical period, and if not, increasing the value of the transaction index corresponding to the user identifier of the current user existing by 1;
and if not, determining the value of the transaction index of the current user in the current statistical period as 1.
7. The method of any one of claims 1-6, further comprising:
receiving an index modification request input by a target person, wherein the index modification request comprises a time range;
acquiring a modified statistical rule according to the index modification request;
carrying out offline statistics again on the effective transaction information in the time range according to the modified statistical rule;
and replacing the transaction index with the wrong statistics index with a new transaction index with offline statistics.
8. The method of claim 7, wherein before obtaining the modified statistical rule according to the indicator modification request, the method further comprises:
receiving statistical rule modification information input by a target person;
and modifying the corresponding statistical rule according to the modification information.
9. The method of any one of claims 1-6, wherein receiving the target person input extraction time range comprises:
receiving an index extraction request input by a target person;
and analyzing the index extraction request to obtain an extraction time range.
10. The method of any one of claims 1-6, further comprising:
judging whether abnormal transaction information exists in the transaction information of each user according to the transaction index of each user in the statistical duration range;
and sending the abnormal transaction information to the display terminal.
11. A transaction index processing apparatus, comprising:
the acquisition module is used for acquiring transaction information from a transaction system in real time;
the filtering module is used for filtering the transaction information according to a predetermined filtering rule to obtain effective transaction information;
the extraction module is used for extracting a target transaction index in the effective transaction information according to a preset statistical rule, wherein the target transaction index comprises a transaction index of a user in each statistical period;
the receiving module is used for receiving the extraction time range input by the target person;
the processing module is used for carrying out statistical processing on the transaction indexes in all the statistical periods in the extraction time range to obtain the transaction indexes of the user in the extraction time range;
and the sending module is used for sending the transaction index to a display terminal for displaying.
12. A computer device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the transaction index processing method of any of claims 1-10.
13. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the transaction index processing method of any of claims 1-10.
CN202011304007.4A 2020-11-19 2020-11-19 Transaction index processing method, device and equipment Pending CN112232962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011304007.4A CN112232962A (en) 2020-11-19 2020-11-19 Transaction index processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011304007.4A CN112232962A (en) 2020-11-19 2020-11-19 Transaction index processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN112232962A true CN112232962A (en) 2021-01-15

Family

ID=74123727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011304007.4A Pending CN112232962A (en) 2020-11-19 2020-11-19 Transaction index processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN112232962A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806416A (en) * 2021-03-12 2021-12-17 京东科技控股股份有限公司 Method and device for realizing real-time data service and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563645A (en) * 2017-09-04 2018-01-09 杭州云算信达数据技术有限公司 A kind of Financial Risk Analysis method based on big data
CN111625413A (en) * 2020-04-23 2020-09-04 平安科技(深圳)有限公司 Index abnormality analysis method, index abnormality analysis device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563645A (en) * 2017-09-04 2018-01-09 杭州云算信达数据技术有限公司 A kind of Financial Risk Analysis method based on big data
CN111625413A (en) * 2020-04-23 2020-09-04 平安科技(深圳)有限公司 Index abnormality analysis method, index abnormality analysis device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
任立男;段桂华;谭荻;王建新;: "面向银行业务的交易监控可视化系统设计与实现", 中南大学学报(自然科学版), no. 10, pages 2490 - 2497 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806416A (en) * 2021-03-12 2021-12-17 京东科技控股股份有限公司 Method and device for realizing real-time data service and electronic equipment
CN113806416B (en) * 2021-03-12 2023-11-03 京东科技控股股份有限公司 Method and device for realizing real-time data service and electronic equipment

Similar Documents

Publication Publication Date Title
US9569528B2 (en) Detection of confidential information
US5134564A (en) Computer aided reconfiliation method and apparatus
CN107274291B (en) Cross-platform valuation table analysis method, storage medium and application server
CN109934268B (en) Abnormal transaction detection method and system
US20150221045A1 (en) System and method of normalizing vendor data
CN110766275A (en) Data verification method and device, computer equipment and storage medium
CN114840527A (en) Data processing method, device and computer readable storage medium
CN109242658B (en) Suspicious transaction report generation method, suspicious transaction report generation system, suspicious transaction report generation computer device and suspicious transaction report storage medium
US20140317066A1 (en) Method of analysing data
CN112232962A (en) Transaction index processing method, device and equipment
CN111311276B (en) Identification method and device for abnormal user group and readable storage medium
CN109324963B (en) Method for automatically testing profit result and terminal equipment
CN110942066A (en) Bill checking method and device
CN113240508A (en) Intelligent processing system for bank assembly line
CN114511314A (en) Payment account management method and device, computer equipment and storage medium
CN113254352A (en) Test method, device, equipment and storage medium for test case
CN110673888B (en) Verification method and device for configuration file
CN110956552A (en) Insurance problem processing method, device, equipment and storage medium
CN112862493B (en) Intelligent Pompe deception detection method, device, terminal and storage medium
CN116957785A (en) Channel account checking method, device, electronic equipment and computer program product
CN117035433B (en) Illegal funds transfer customer identification method and device
CN113360491B (en) Data quality inspection method, device, electronic equipment and storage medium
CN116843437A (en) Data generation method and device and terminal equipment
CN113689248A (en) Method for accurately inputting value-added tax invoice information, electronic equipment and storage medium
CN116737593A (en) Method and device for clearing repeated test cases

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination