Duplicate business transaction detection method and device

By obtaining and comparing business transaction request information and log files, using the Flink computing engine to determine duplicate transactions and feedback alarm information to the business system, the intrusion and performance problems of business transaction re-rechecking in the existing technology on product application software is solved, and efficient and low-invasive duplicate transaction detection is achieved.

CN113516555BActive Publication Date: 2025-02-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110451777.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-26
Publication Date
2025-02-28
Estimated Expiration
2041-04-26

AI Technical Summary

Technical Problem

In the prior art, business transaction re-response inspection is highly invasive to product application software, affecting development efficiency, and some products are restricted in applications, the technology stack is outdated and cannot meet business performance requirements, increasing system operation risks.

Method used

By obtaining the business transaction request information received by the business system and the business transaction log files within the preset time period before the current time, using the Flink computing engine to compare it, determine whether the business transaction request information is a duplicate business transaction, and feedback alarm information to the business system to intercept duplicate transactions.

Benefits of technology

It reduces the intrusion of business transaction heavy-duty detection on product application software, improves development efficiency, and ensures online response performance through an efficient computing engine, reducing system operation risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113516555B_ABST
    Figure CN113516555B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for detecting repeated business transactions, which can be used in the field of artificial intelligence technology. The method includes: obtaining business transaction request information received by a business system; obtaining a business transaction log file of the business system within a preset time period before the current time; comparing the business transaction request information with the business transaction log file to determine whether the business transaction request information is a repeated business transaction. The present invention can reduce the intrusiveness of repeated business transaction detection on application software and improve the development efficiency of product applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of business processing technology, in particular to the field of artificial intelligence technology, and more particularly to a method and device for detecting repeated business transactions. Background Art

[0002] At present, the anti-duplicate function of business transactions is mainly controlled by the business layer based on anti-duplicate factors. Each product application software needs to perform anti-duplicate checks on transactions in the application software business code. In particular, when the accounting system is clearing and transferring funds, it is necessary to compare with the historical data of the day (such as transactions in the past period of time) to avoid the problem of duplicate transfers. However, this anti-duplicate check has high requirements for online transaction performance processing. Each product application software needs to implement this type of exception handling, that is, each product application software needs to implement similar business logic and monitoring functions. Therefore, the current development of the anti-duplicate check function is highly invasive to the product application software, affecting the rapid development and implementation of the product application software business functions. In addition, some product applications are limited by outdated technology stacks, and the anti-duplicate factor check cannot meet business requirements in terms of performance, increasing the risk of system operation. Summary of the invention

[0003] One object of the present invention is to provide a method for detecting duplicate business transactions, reduce the intrusiveness of duplicate business transaction detection on application software, and improve the development efficiency of product applications. Another object of the present invention is to provide a device for detecting duplicate business transactions. Another object of the present invention is to provide a computer device. Another object of the present invention is to provide a readable medium.

[0004] In order to achieve the above objectives, the present invention discloses a method for detecting repeated business transactions, comprising:

[0005] Obtain business transaction request information received by the business system;

[0006] Obtaining a business transaction log file of the business system within a preset time period before the current time;

[0007] The business transaction request information is compared with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

[0008] Preferably, the method further comprises the step of pre-storing a business transaction log file of the business system:

[0009] Collecting business transaction log files generated by the business system through a Fluentd client set in the business system;

[0010] The business transaction log file is transferred to the Fluentd server for storage.

[0011] Preferably, the acquiring of the business transaction log file of the business system within a preset time period before the current time specifically includes:

[0012] The business transaction log of the business system within a preset time period before the current time is obtained from the Fluentd server through the kafka queue.

[0013] Preferably, comparing the business transaction request information with the business transaction log file specifically includes:

[0014] The business transaction request information and the business transaction log file are compared through the Flink computing engine.

[0015] Preferably, comparing the business transaction request information with the business transaction log file specifically includes:

[0016] Determine the current transaction information to be traded according to the business transaction request information;

[0017] Determining historical transaction information of completed transactions based on the business transaction log file;

[0018] The current transaction information is compared with the historical transaction information.

[0019] Preferably, the current transaction information and the historical transaction information at least include the payer's account number, the recipient's account number, the amount and the currency.

[0020] Preferably, further comprising:

[0021] If it is determined that the business transaction request information is a repeated business transaction, an alarm message is generated and the alarm message is transmitted to the business system so that the business system processes the repeated business transaction.

[0022] The present invention also discloses a repeated business transaction detection device, comprising:

[0023] An information interception module is used to obtain business transaction request information received by the business system;

[0024] A log acquisition module is used to acquire the business transaction log files of the business system within a preset time period before the current time;

[0025] The business analysis module is used to compare the business transaction request information with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

[0026] The present invention also discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0027] When the processor executes the program, the method described above is implemented.

[0028] The present invention also discloses a computer readable medium having a computer program stored thereon.

[0029] When the program is executed by a processor, the method described above is implemented.

[0030] The duplicate business transaction detection method of the present invention obtains the business transaction request information received by the business system, obtains the business transaction log file of the business system within the preset time period before the current time, and compares the business transaction request information with the business transaction log file to determine whether the business transaction request information is a duplicate business transaction. It can be seen that the duplicate business transaction detection method of the present invention synchronously obtains the transaction request information received by the business system, obtains the historically generated log file according to the business transaction request information, that is, obtains the business transaction log file of the business system within the preset time period before the current time. Therefore, the relevant information of the historical business transaction can be extracted from the historical business transaction log file, and then compared with the current business transaction request information to determine whether the current business transaction request information is a duplicate business transaction. Further, if it is detected that the business transaction request information received by the current business system is a duplicate business transaction, an alarm message can be fed back to the business system, so that the business system can immediately intercept the duplicate business transaction. The present invention can synchronously obtain the business transaction request information of the business system to determine whether the business transaction request information is a duplicate business transaction, thereby eliminating the need to set up relevant anti-duplicate detection functions when developing product application software on the business system, reducing the intrusiveness of duplicate business transaction detection on product application software, improving the development efficiency of product application software, and improving the response speed of the business system to online business transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A structural diagram showing a specific embodiment of the duplicate business transaction detection system of the present invention;

[0033] Figure 2 A flowchart showing a specific embodiment of the method for detecting repeated business transactions of the present invention;

[0034] Figure 3A flowchart showing a specific embodiment S000 of the method for detecting repeated business transactions of the present invention;

[0035] Figure 4 A flowchart showing a specific embodiment S200 of the repeated business transaction detection method of the present invention;

[0036] Figure 5 One of the flow charts showing a specific embodiment S300 of the repeated business transaction detection method of the present invention;

[0037] Figure 6 A second flowchart showing a specific embodiment S300 of the method for detecting repeated business transactions of the present invention;

[0038] Figure 7 A second flowchart showing a specific embodiment S400 of the method for detecting repeated business transactions of the present invention;

[0039] Figure 8 A structural diagram showing a specific embodiment of the repeated business transaction detection device of the present invention;

[0040] Fig. 9 A schematic diagram showing the structure of a computer device suitable for implementing an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] It should be noted that the method and device for detecting duplicate business transactions disclosed in the present application can be used in the field of artificial intelligence technology, and can also be used in any field outside the field of artificial intelligence technology. The application field of the method and device for detecting duplicate business transactions disclosed in the present application is not limited.

[0043] In order to facilitate the understanding of the technical solution provided by the present application, the relevant contents of the technical solution of the present application are first explained below. In view of the shortcomings of each existing product layer application implementing its own business anti-duplicate logic, and in order to solve the problems of the mechanism being highly invasive to the product layer and low online transaction performance, the duplicate business transaction detection method and device provided in the embodiment of the present invention can synchronously obtain the business transaction request information of the business system to determine whether the business transaction request information is a duplicate business transaction, so that the product application software on the business system does not need to set up the relevant anti-duplicate detection function when developing, reducing the invasiveness of duplicate business transaction detection to the product application software, improving the development efficiency of the product application software, and improving the response speed of the business system to online business transactions.

[0044] Figure 1 is a schematic diagram of the structure of a duplicate business transaction detection system provided by an embodiment of the present invention, such as Figure 1 As shown, the duplicate business transaction detection system provided by the embodiment of the present invention includes a business system and a duplicate business transaction detection device.

[0045] Among them, the business system is provided with product application software, and the business system can receive business transaction request information transmitted by external equipment. The product application software on the business system can process the business transaction request information and complete the business transaction.

[0046] The duplicate business transaction detection device can obtain business transaction request information received by the business system, obtain the business transaction log file of the business system within a preset time period before the current time, and compare the business transaction request information with the business transaction log file to determine whether the business transaction request information is a duplicate business transaction.

[0047] The following takes the duplicate business transaction detection device as an example to illustrate the implementation process of the duplicate business transaction detection method provided by the embodiment of the present invention. It is understandable that the execution subject of the duplicate business transaction detection method provided by the embodiment of the present invention includes but is not limited to the duplicate business transaction detection device.

[0048] According to one aspect of the present invention, this embodiment discloses a method for detecting duplicate business transactions. Figure 2 As shown, in this embodiment, the method includes:

[0049] S100: Acquire business transaction request information received by the business system.

[0050] S200: Acquire the business transaction log files of the business system within a preset time period before the current time.

[0051] S300: Compare the business transaction request information with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

[0052] The duplicate business transaction detection method of the present invention obtains the business transaction request information received by the business system, obtains the business transaction log file of the business system within the preset time period before the current time, and compares the business transaction request information with the business transaction log file to determine whether the business transaction request information is a duplicate business transaction. It can be seen that the duplicate business transaction detection method of the present invention synchronously obtains the transaction request information received by the business system, obtains the historically generated log file according to the business transaction request information, that is, obtains the business transaction log file of the business system within the preset time period before the current time. Therefore, the relevant information of the historical business transaction can be extracted from the historical business transaction log file, and then compared with the current business transaction request information to determine whether the current business transaction request information is a duplicate business transaction. Further, if it is detected that the business transaction request information received by the current business system is a duplicate business transaction, an alarm message can be fed back to the business system, so that the business system can immediately intercept the duplicate business transaction. The present invention can synchronously obtain the business transaction request information of the business system to determine whether the business transaction request information is a duplicate business transaction, thereby eliminating the need to set up relevant anti-duplicate detection functions when developing product application software on the business system, reducing the intrusiveness of duplicate business transaction detection on product application software, improving the development efficiency of product application software, and improving the response speed of the business system to online business transactions.

[0053] In a preferred embodiment, Figure 3 As shown, the method further includes a step S000 of pre-storing a business transaction log file of the business system:

[0054] S010: Collecting business transaction log files generated by the business system through a Fluentd client set in the business system.

[0055] S020: Transmit the business transaction log file to the Fluentd server for storage.

[0056] Specifically, Fluentd is an open source data collector for a unified log layer. Fluentd allows unified data collection and use so that data can be better used and understood. Fluentd uses JSON for unified logging, and tries to structure the data as much as possible into JSON, allowing Fluentd to uniformly handle all aspects of log data, including collection, filtering, buffering, and outputting logs across multiple sources and targets (unified log layer). Using JSON makes it easier to process downstream data because it has enough structure and can be accessed while retaining flexible patterns. The data collected by fluentd can be output to Hadoop and Flink through KAFKA, and the data can be used for real-time data calculation and data mining to achieve more valuable goals. Therefore, in this preferred embodiment, in order to further reduce the program intrusion into the product application software, the duplicate business transaction detection system further includes a Fluentd client and a Fluentd server set in the business system. By collecting the business transaction log files of the business system through the Fluentd client, there is no need to set a log collection program for collecting the information required for anti-duplicate detection in the product application software, and only the normal log file generation function in the product application software is retained. Specifically, in actual applications, a Fluentd client for collecting business transaction log files can be set in the business system to collect regular business transaction log files generated by the business system, and the business transaction log files can be transferred to the Fluentd server for storage, so that the duplicate business transaction detection device can obtain the business transaction log files stored in the Fluentd server, and compare the business transaction log files with the business transaction request information to determine whether the business transaction request information is a duplicate business transaction.

[0057] In a preferred embodiment, in order to obtain log files related to anti-duplicate detection, the interference of irrelevant log files is reduced. After the business transaction log files generated by the business system are collected by the Fluentd client set in the business system at S010 and before the business transaction log files are transmitted to the Fluentd server for storage, the business transaction log files can be subjected to business element filtering processing. Specifically, the business transaction log files can be filtered based on the preset business elements to obtain log files related to business transactions. For example, in a specific example, the preset business elements may include elements such as the payer account number, the recipient account number, the amount and the currency of the business transaction. The log files related to the payer account number, the recipient account number, the amount and the currency in the business transaction log file are filtered out to obtain the log files after the business element filtering, and then the log files after the business element filtering can be transmitted to the Fluentd server for storage, and then transmitted to the duplicate business transaction detection device.

[0058] In a preferred embodiment, Figure 4 As shown, the S200 of obtaining the business transaction log file of the business system within a preset time period before the current time specifically includes:

[0059] S210: Obtaining the business transaction log of the business system within a preset time period before the current time from the Fluentd server through the Kafka queue.

[0060] Specifically, KAFKA is a message queue, which is a storage container for caching upstream and downstream interactive information (text, pictures, audio, emails, etc.), a first-in-first-out data structure, after the upstream application pushes the message to the downstream application cache, it waits for extrapolation or active pull by the downstream application. MQ middleware is widely used in distributed systems, mainly to solve problems such as application coupling, asynchronous messages, and traffic peak shaving. Thus, in this preferred embodiment, the business transaction log file stored by the Fluentd server can be transmitted to the duplicate business transaction detection device through the kafka queue. When it is necessary to compare the business transaction request information received by the business system to determine whether the business transaction request information is a duplicate business transaction, the current time of the business transaction request information that needs to be carried out can be determined according to the business transaction request information, and the business transaction log file of the business system transmitted by the Fluentd server through the kafka queue within the preset time period before the current time can be obtained according to the preset time period and the current time.

[0061] It should be noted that the preset time period in the preferred embodiment can be set according to actual conditions. For example, the preset time period can be a time period such as half an hour or an hour, which can detect whether a business transaction within half an hour or an hour is a repeated business transaction (anti-duplicate detection). In actual applications, those skilled in the art can determine the specific time length of the preset time period according to actual needs, and the present invention does not limit this.

[0062] In a preferred embodiment, Figure 5 As shown, the S300 comparing the business transaction request information with the business transaction log file specifically includes:

[0063] S310: Compare the business transaction request information with the business transaction log file through the Flink computing engine.

[0064] Specifically, the Flink computing engine (Apache Flink) is an open source stream processing framework developed by the Apache Software Foundation. Its core is a distributed stream data flow engine written in Java and Scala. Flink executes any stream data program in a data-parallel and pipelined manner. Flink's pipeline runtime system can execute batch and stream processing programs. In addition, Flink's runtime itself also supports the execution of iterative algorithms.

[0065] As data increases dramatically, big data technology is gaining more and more attention. As one of the representative frameworks for real-time stream computing, Flink's development trend in recent years is undoubtedly amazing. On the one hand, the Flink community is very active, and on the other hand, Flink's excellent performance in big data computing shows us the potential of Flink's application. Today, we will mainly learn about Flink's application scenario analysis.

[0066] Flink was proposed for real-time stream computing, because neither the Hadoop framework nor the Spark framework could be considered a true real-time stream computing processing engine. Only Flink can achieve millisecond-level low-latency real-time stream data computing.

[0067] There are three main application scenarios for Flink: Event-driven Applications, Data Analytics Applications, and Data Pipeline Applications.

[0068] For event-driven applications, the execution process is as follows: the collected data Events can be continuously put into the message queue, and the Flink application will continuously ingest (consume) the data in the message queue. The Flink application maintains the data (state) for a period of time, and will persist the data (Persistent sstorage) after a period of time to prevent the Flink application from dying. Every time the Flink application receives a piece of data, it will process it, and after processing it will trigger an action (Action). At the same time, the processing results can also be written to the external message queue, and then consumed by other Flink applications. Typical event-driven applications include fraud detection, anomaly detection, rule-based alerting, business process monitoring, Web applications (social networks), etc. Data analysis applications include Batch analytics and Streaming analytics. Batch analysis can be understood as periodic query: for example, the Flink application reads yesterday's data from Recorded Events in the early morning, then performs periodic query operations, and finally writes the data to the Database or HDFS, or directly generates reports for the company's top leaders to make decisions. Stream processing analysis can be understood as continuous query: for example, to display the Tmall sales GMV on Double Eleven in real time, the user's order data needs to be written to the message queue in real time, and the Flink application continuously reads the data for real-time calculation, and then continuously updates the data to the Database or K-VStore, and finally displays it on the big screen in real time. Data pipeline ETL includes Periodic ETL and Data Pipeline. Periodic task processing, such as periodically starting a Flink ETL Job every morning, reading data from a traditional database, then doing ETL, and finally writing to the database and file system. For data pipeline tasks (pipeline ETL), such as starting a Flink real-time application, the data in the data source (such as database, Kafka) continuously flows into or appends to the data warehouse (database or file system) or Kafka message queue through the Flink Data Pipeline. In general, Flink's application scenarios are quite broad. There are many Flink applications on Alibaba platforms in China. Flink applications are involved in various advertising recommendation systems and business monitoring systems.

[0069] Therefore, in this preferred embodiment, the business transaction request information and the business transaction log file are compared by the Flink computing engine, so that the business transaction log file can be received conveniently and quickly, and the business transaction log file can be compared with the business transaction request information to determine whether the business transaction request information is a repeated business transaction. For example, in a specific example, the product application software set on the business system can call a preset public method every time a business transaction request information is received during an online transaction, and call the Flink computing engine to perform anti-duplicate detection on the current business transaction request information. The Flink computing engine automatically obtains the historical business transaction log file to perform anti-duplicate detection on the business transaction request information, and determines whether the current business transaction request information is a repeated business transaction.

[0070] In a preferred embodiment, Figure 6 As shown, the step S300 of comparing the business transaction request information with the business transaction log file may specifically include:

[0071] S321: Determine the current transaction information to be traded according to the business transaction request information.

[0072] S322: Determine historical transaction information of completed transactions according to the business transaction log file.

[0073] S323: Compare the current transaction information with the historical transaction information.

[0074] Specifically, the current transaction information to be processed can be obtained by analyzing the business transaction request information, and the historical transaction information of the completed transaction can be determined based on the business transaction log file. Then, the text or data of the same business elements in the current transaction information and the historical transaction information are compared one by one to determine whether the current transaction information and the historical transaction information are the same business transaction, that is, the business transaction request information received by the business system is a repeated business transaction. For example, in a specific example, the current transaction information at least includes the payer's account number, the recipient's account number, the amount and the currency. The historical transaction information also at least includes the payer's account number, the recipient's account number, the amount and the currency. The values ​​of the payer's account number, the recipient's account number, the amount and the currency in the current transaction information and the historical transaction information are compared one by one to determine whether the corresponding business elements in the current transaction information and the historical transaction information are consistent. If they are consistent, it means that the business transaction request information corresponding to the current transaction information is a repeated business transaction.

[0075] It should be noted that the business elements included in the current transaction information and historical transaction information respectively extracted from the business transaction request information and the business transaction log file preferably include at least the payer account, the recipient account, the amount and the currency. In actual applications, technical personnel in this field can set the business elements extracted from the business transaction request information and the business transaction log file according to actual needs, and the present invention is not limited to this.

[0076] In a preferred embodiment, Figure 7 As shown, the method further comprises:

[0077] S400: If it is determined that the business transaction request information is a repeated business transaction, an alarm message is generated and the alarm message is transmitted to the business system so that the business system processes the repeated business transaction.

[0078] Specifically, in order to enable the business system to intercept and process repeated business transactions in a timely manner to ensure the property safety of users. In this preferred embodiment, if the business transaction request information is detected to be a repeated business transaction, an alarm message can be generated and sent to the business system. Therefore, the business system can process the business transaction request information according to the alarm message, such as intercepting the business transaction request information, to prevent repeated deductions caused by repeated transactions. Among them, the alarm message may include information such as the current transaction information in the business transaction request information and the repeated business transaction detection results.

[0079] In summary, the present invention provides a method for detecting duplicate business transactions. By collecting and analyzing the business transaction request information and log files of the business system, it is determined whether the current business transaction request information is a duplicate business transaction. This greatly reduces the intrusiveness of business transaction anti-duplicate detection on product applications, improves the efficiency of system product application software development, and at the same time ensures online response performance through an efficient computing engine.

[0080] Based on the same principle, this embodiment also discloses a repeated business transaction detection device. Figure 8 As shown, in this embodiment, the device includes an information interception module 11, a log acquisition module 12 and a business analysis module 13.

[0081] The information interception module 11 is used to obtain the business transaction request information received by the business system.

[0082] The log acquisition module 12 is used to acquire the business transaction log files of the business system within a preset time period before the current time.

[0083] The business analysis module 13 is used to compare the business transaction request information with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

[0084] The duplicate business transaction detection method of the present invention obtains the business transaction request information received by the business system, obtains the business transaction log file of the business system within the preset time period before the current time, and compares the business transaction request information with the business transaction log file to determine whether the business transaction request information is a duplicate business transaction. It can be seen that the duplicate business transaction detection method of the present invention synchronously obtains the transaction request information received by the business system, obtains the historically generated log file according to the business transaction request information, that is, obtains the business transaction log file of the business system within the preset time period before the current time. Therefore, the relevant information of the historical business transaction can be extracted from the historical business transaction log file, and then compared with the current business transaction request information to determine whether the current business transaction request information is a duplicate business transaction. Further, if it is detected that the business transaction request information received by the current business system is a duplicate business transaction, an alarm message can be fed back to the business system, so that the business system can immediately intercept the duplicate business transaction. The present invention can synchronously obtain the business transaction request information of the business system to determine whether the business transaction request information is a duplicate business transaction, thereby eliminating the need to set up relevant anti-duplicate detection functions when developing product application software on the business system, reducing the intrusiveness of duplicate business transaction detection on product application software, improving the development efficiency of product application software, and improving the response speed of the business system to online business transactions.

[0085] In a preferred embodiment, the device is further used to pre-store business transaction log files of the business system: collect business transaction log files generated by the business system through a Fluentd client set in the business system, and transmit the business transaction log files to a Fluentd server for storage.

[0086] Specifically, Fluentd is an open source data collector for a unified log layer. Fluentd allows unified data collection and use so that data can be better used and understood. Fluentd uses JSON for unified logging, and tries to structure the data as much as possible into JSON, allowing Fluentd to uniformly handle all aspects of log data, including collection, filtering, buffering, and outputting logs across multiple sources and targets (unified log layer). Using JSON makes it easier to process downstream data because it has enough structure and can be accessed while retaining flexible patterns. The data collected by fluentd can be output to Hadoop and Flink through KAFKA, and the data can be used for real-time data calculation and data mining to achieve more valuable goals. Therefore, in this preferred embodiment, in order to further reduce the program intrusion into the product application software, the duplicate business transaction detection system further includes a Fluentd client and a Fluentd server set in the business system. By collecting the business transaction log files of the business system through the Fluentd client, there is no need to set a log collection program for collecting the information required for anti-duplicate detection in the product application software, and only the normal log file generation function in the product application software is retained. Specifically, in actual applications, a Fluentd client for collecting business transaction log files can be set in the business system to collect regular business transaction log files generated by the business system, and the business transaction log files can be transferred to the Fluentd server for storage, so that the duplicate business transaction detection device can obtain the business transaction log files stored in the Fluentd server, and compare the business transaction log files with the business transaction request information to determine whether the business transaction request information is a duplicate business transaction.

[0087] In a preferred embodiment, in order to obtain log files related to anti-duplicate detection, the interference of irrelevant log files is reduced. After the business transaction log files generated by the business system are collected by the Fluentd client set in the business system and before the business transaction log files are transmitted to the Fluentd server for storage, the business transaction log files can be subjected to business element filtering processing. Specifically, the business transaction log files can be filtered based on the preset business elements to obtain log files related to business transactions. For example, in a specific example, the preset business elements may include elements such as the payer account number, the recipient account number, the amount and the currency of the business transaction. The log files related to the payer account number, the recipient account number, the amount and the currency in the business transaction log file are filtered out to obtain the log files after the business element filtering, and then the log files after the business element filtering can be transmitted to the Fluentd server for storage, and then transmitted to the duplicate business transaction detection device.

[0088] In a preferred embodiment, the log acquisition module 12 is specifically used to obtain the business transaction log of the business system within a preset time period before the current time from the Fluentd server through a kafka queue.

[0089] Specifically, KAFKA is a message queue, which is a storage container for caching upstream and downstream interactive information (text, pictures, audio, emails, etc.), a first-in-first-out data structure, after the upstream application pushes the message to the downstream application cache, it waits for extrapolation or active pull by the downstream application. MQ middleware is widely used in distributed systems, mainly to solve problems such as application coupling, asynchronous messages, and traffic peak shaving. Thus, in this preferred embodiment, the business transaction log file stored by the Fluentd server can be transmitted to the duplicate business transaction detection device through the kafka queue. When it is necessary to compare the business transaction request information received by the business system to determine whether the business transaction request information is a duplicate business transaction, the current time of the business transaction request information that needs to be carried out can be determined according to the business transaction request information, and the business transaction log file of the business system transmitted by the Fluentd server through the kafka queue within the preset time period before the current time can be obtained according to the preset time period and the current time.

[0090] It should be noted that the preset time period in the preferred embodiment can be set according to actual conditions. For example, the preset time period can be a time period such as half an hour or an hour, which can detect whether a business transaction within half an hour or an hour is a repeated business transaction (anti-duplicate detection). In actual applications, those skilled in the art can determine the specific time length of the preset time period according to actual needs, and the present invention does not limit this.

[0091] In a preferred implementation, the business analysis module 13 is specifically configured to compare the business transaction request information with the business transaction log file through a Flink computing engine.

[0092] Specifically, the Flink computing engine (Apache Flink) is an open source stream processing framework developed by the Apache Software Foundation. Its core is a distributed stream data flow engine written in Java and Scala. Flink executes any stream data program in a data-parallel and pipelined manner. Flink's pipeline runtime system can execute batch and stream processing programs. In addition, Flink's runtime itself also supports the execution of iterative algorithms.

[0093] As data increases dramatically, big data technology is gaining more and more attention. As one of the representative frameworks for real-time stream computing, Flink's development trend in recent years is undoubtedly amazing. On the one hand, the Flink community is very active, and on the other hand, Flink's excellent performance in big data computing shows us the potential of Flink's application. Today, we will mainly learn about Flink's application scenario analysis.

[0094] Flink was proposed for real-time stream computing, because neither the Hadoop framework nor the Spark framework could be considered a true real-time stream computing processing engine. Only Flink can achieve millisecond-level low-latency real-time stream data computing.

[0095] There are three main application scenarios for Flink: Event-driven Applications, Data Analytics Applications, and Data Pipeline Applications.

[0096] For event-driven applications, the execution process is as follows: the collected data Events can be continuously put into the message queue, and the Flink application will continuously ingest (consume) the data in the message queue. The Flink application maintains the data (state) for a period of time, and will persist the data (Persistent sstorage) after a period of time to prevent the Flink application from dying. Every time the Flink application receives a piece of data, it will process it, and after processing it will trigger an action (Action). At the same time, the processing results can also be written to the external message queue, and then consumed by other Flink applications. Typical event-driven applications include fraud detection, anomaly detection, rule-based alerting, business process monitoring, Web applications (social networks), etc. Data analysis applications include Batch analytics and Streaming analytics. Batch analysis can be understood as periodic query: for example, the Flink application reads yesterday's data from Recorded Events in the early morning, then performs periodic query operations, and finally writes the data to the Database or HDFS, or directly generates reports for the company's top leaders to make decisions. Stream processing analysis can be understood as continuous query: for example, to display the Tmall sales GMV on Double Eleven in real time, the user's order data needs to be written to the message queue in real time, and the Flink application continuously reads the data for real-time calculation, and then continuously updates the data to the Database or K-VStore, and finally displays it on the big screen in real time. Data pipeline ETL includes Periodic ETL and Data Pipeline. Periodic task processing, such as periodically starting a Flink ETL Job every morning, reading data from a traditional database, then doing ETL, and finally writing to the database and file system. For data pipeline tasks (pipeline ETL), such as starting a Flink real-time application, the data in the data source (such as database, Kafka) continuously flows into or appends to the data warehouse (database or file system) or Kafka message queue through the Flink Data Pipeline. In general, Flink's application scenarios are quite broad. There are many Flink applications on Alibaba platforms in China. Flink applications are involved in various advertising recommendation systems and business monitoring systems.

[0097] Therefore, in this preferred embodiment, the business transaction request information and the business transaction log file are compared by the Flink computing engine, so that the business transaction log file can be received conveniently and quickly, and the business transaction log file can be compared with the business transaction request information to determine whether the business transaction request information is a repeated business transaction. For example, in a specific example, the product application software set on the business system can call a preset public method every time a business transaction request information is received during an online transaction, and call the Flink computing engine to perform anti-duplicate detection on the current business transaction request information. The Flink computing engine automatically obtains the historical business transaction log file to perform anti-duplicate detection on the business transaction request information, and determines whether the current business transaction request information is a repeated business transaction.

[0098] In a preferred embodiment, the business analysis module 13 is specifically used to determine the current transaction information to be traded according to the business transaction request information, determine the historical transaction information of completed transactions according to the business transaction log file, and compare the current transaction information with the historical transaction information.

[0099] Specifically, the current transaction information to be processed can be obtained by analyzing the business transaction request information, and the historical transaction information of the completed transaction can be determined based on the business transaction log file. Then, the text or data of the same business elements in the current transaction information and the historical transaction information are compared one by one to determine whether the current transaction information and the historical transaction information are the same business transaction, that is, the business transaction request information received by the business system is a repeated business transaction. For example, in a specific example, the current transaction information at least includes the payer's account number, the recipient's account number, the amount and the currency. The historical transaction information also at least includes the payer's account number, the recipient's account number, the amount and the currency. The values ​​of the payer's account number, the recipient's account number, the amount and the currency in the current transaction information and the historical transaction information are compared one by one to determine whether the corresponding business elements in the current transaction information and the historical transaction information are consistent. If they are consistent, it means that the business transaction request information corresponding to the current transaction information is a repeated business transaction.

[0100] It should be noted that the business elements included in the current transaction information and historical transaction information respectively extracted from the business transaction request information and the business transaction log file preferably include at least the payer account, the recipient account, the amount and the currency. In actual applications, technical personnel in this field can set the business elements extracted from the business transaction request information and the business transaction log file according to actual needs, and the present invention is not limited to this.

[0101] In a preferred embodiment, the device is further configured to generate alarm information if it is determined that the business transaction request information is a repeated business transaction and transmit the alarm information to the business system so that the business system processes the repeated business transaction.

[0102] Specifically, in order to enable the business system to intercept and process repeated business transactions in a timely manner to ensure the property safety of users. In this preferred embodiment, if the business transaction request information is detected to be a repeated business transaction, an alarm message can be generated and sent to the business system. Therefore, the business system can process the business transaction request information according to the alarm message, such as intercepting the business transaction request information, to prevent repeated deductions caused by repeated transactions. Among them, the alarm message may include information such as the current transaction information in the business transaction request information and the repeated business transaction detection results.

[0103] In summary, the present invention provides a method for detecting duplicate business transactions. By collecting and analyzing the business transaction request information and log files of the business system, it is determined whether the current business transaction request information is a duplicate business transaction. This greatly reduces the intrusiveness of business transaction anti-duplicate detection on product applications, improves the efficiency of system product application software development, and at the same time ensures online response performance through an efficient computing engine.

[0104] Since the principle of solving the problem by the device is similar to that of the above method, the implementation of the device can refer to the implementation of the method and will not be repeated here.

[0105] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer device, and specifically, the computer device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0106] In a typical example, the computer device specifically includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method executed by the client as described above is implemented; or, when the processor executes the program, the method executed by the server as described above is implemented.

[0107] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer device 600 suitable for implementing an embodiment of the present application.

[0108] like Fig. 9As shown, the computer device 600 includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0109] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal feedback device (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed as needed as the storage section 608.

[0110] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from the removable medium 611.

[0111] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0112] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0113] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0117] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0118] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0119] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0120] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for detecting repeated business transactions, characterized in that: include: Acquiring business transaction request information received by the business system; wherein the product application software on the business system can process the business transaction request information to complete the business transaction; Obtaining a business transaction log file of the business system within a preset time period before the current time; The business transaction request information is compared with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

2. The method for detecting repeated business transactions according to claim 1, characterized in that: The method further comprises the steps of pre-storing the business transaction log files of the business system: Collecting business transaction log files generated by the business system through a Fluentd client set in the business system; The business transaction log file is transferred to the Fluentd server for storage.

3. The method for detecting repeated business transactions according to claim 2, characterized in that: The step of obtaining the business transaction log file of the business system within a preset time period before the current time specifically includes: The business transaction log of the business system within a preset time period before the current time is obtained from the Fluentd server through the kafka queue.

4. The method for detecting repeated business transactions according to claim 1, characterized in that: The comparing the business transaction request information with the business transaction log file specifically includes: The business transaction request information and the business transaction log file are compared through the Flink computing engine.

5. The method for detecting repeated business transactions according to claim 1 or 4, characterized in that: The comparing the business transaction request information with the business transaction log file specifically includes: Determine the current transaction information to be traded according to the business transaction request information; Determining historical transaction information of completed transactions based on the business transaction log file; The current transaction information is compared with the historical transaction information.

6. The method for detecting repeated business transactions according to claim 5, characterized in that: The current transaction information and the historical transaction information at least include the payer's account number, the recipient's account number, the amount and the currency.

7. The method for detecting repeated business transactions according to claim 1, characterized in that: Further including: If it is determined that the business transaction request information is a repeated business transaction, an alarm message is generated and the alarm message is transmitted to the business system so that the business system processes the repeated business transaction.

8. A repeated business transaction detection device, characterized in that: include: An information interception module is used to obtain business transaction request information received by the business system; wherein the product application software on the business system can process the business transaction request information to complete the business transaction; A log acquisition module, used to acquire business transaction log files of the business system within a preset time period before the current time; The business analysis module is used to compare the business transaction request information with the business transaction log file to determine whether the business transaction request information is a repeated business transaction.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Repeated transaction risk monitoring method and device and computer readable storage medium

    CN110135856A