Data report generation method and device, storage medium and electronic equipment

By integrating, verifying, cleaning and formatting multiple data reports, the accurate data report is generated, which solves the problem of long and error-prone data report generation in the prior art, and achieves fast and accurate data processing and report generation.

CN119830868AActive Publication Date: 2025-04-15CHINA CONSTRUCTION BANK

Patent Information

Application Number
CN202411792304.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-15
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

In the prior art, data reports cannot be accurately generated, resulting in long data processing time and prone to data errors.

Method used

By obtaining multiple data reports within the target time period, performing data integration, verification, cleaning and format conversion operations, generating a target data table, and generating a data report indicating changes in transaction risk based on the table.

Benefits of technology

It realizes automated acquisition and integration of multiple data reports, reduces manual operations, significantly improves data processing speed, ensures data accuracy and consistency, and the generated data reports can more accurately reflect the transaction risk changes of the target product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830868A_ABST
    Figure CN119830868A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data report generation method and device, a storage medium and electronic device.The method comprises the steps that N data reports in a target time period are obtained, the N data reports are tables for recording transaction data of a target product based on N recording angles, and N is a natural number larger than 1; data processing operation is executed on the N data reports to obtain a target data table, and the data processing operation sequentially comprises data integration operation, data verification operation, data cleaning operation and data format conversion operation; a data report of the target product is generated according to the target data table, and the data report is used for representing the transaction risk change of the target product in the target time period. Through the data report generation method and device, the problem that the data report cannot be accurately generated in related technologies is solved, and the effect of accurately generating the data report is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and specifically, to a method and device for generating a data report, a storage medium, and an electronic device. Background Art

[0002] With the development of society, people's demand for network products and services is increasing, and various products and services have emerged. However, network platforms also have various risks, such as: product services cannot meet user needs; network attacks; moral risks of internal or external employees of the network platform, etc. Therefore, in the operation of the network platform, it is necessary to monitor various transaction data of the network platform in order to timely judge the operation of the network platform, predict transaction risks, and optimize operation strategies.

[0003] In order to monitor the operation of the network platform faster and better, data reports need to be generated. However, existing data reports are usually written manually, which takes a long time to generate and the data is prone to errors. Summary of the invention

[0004] The embodiments of the present application provide a method and device for generating a data report, a storage medium, and an electronic device, so as to at least solve the problem that data reports cannot be accurately generated in the related art.

[0005] According to one embodiment of the present application, a method for generating a data report is provided, comprising: obtaining N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1; performing data processing operations on the N data reports to obtain a target data table, wherein the data processing operations include, in sequence: data integration operations, data verification operations, data cleaning operations, and data format conversion operations; generating a data report of the target product according to the target data table, wherein the data report is used to indicate changes in transaction risk of the target product within the target time period.

[0006] In an exemplary embodiment, obtaining N data reports within a target time period includes: identifying a data source based on the product type and transaction type of the target product to determine the storage location and report format of the N data reports from the data source; configuring the access rights of a data access script to access the data source according to the storage location and the report format through the access script; and downloading the N data reports from the data source.

[0007] In an exemplary embodiment, data processing operations are performed on N data reports to obtain a target data table, including: performing the data integration operation on the N data reports to obtain a first data table; performing the data verification operation on the first data table to obtain a second data table; performing the data cleansing operation on the second data table to obtain a third data table; performing the data format conversion operation on the third data table to obtain the target data table.

[0008] In an exemplary embodiment, the data integration operation is performed on N data reports to obtain a first data table, including: establishing a correspondence between the first data report and the second data report according to the product identification of the target product, wherein the first data report is a customer transaction details table of the target product, and the second data report is a market transaction details table of the target product, and the first data report and the second data report are both reports among the N data reports; using a third data report to verify the transaction information in the second data report, wherein the third data report is a ledger details table among the N data reports; and when the transaction information in the second data report is correct, merging the matching transaction information in the first data report and the second data report according to the correspondence to obtain the first data table.

[0009] In an exemplary embodiment, the data verification operation is performed on the first data table to obtain the second data table, including: obtaining a first data list and a second data list from the first data table, wherein the first data list includes customer transaction information of the target product, and the second data list includes market transaction information of the target product; when a first transaction parameter in the first data list matches a second transaction parameter in the second data list, and the first data list and the second data list are both complete, determining the first data table as the first data table.

[0010] In an exemplary embodiment, performing the data cleaning operation on the second data table to obtain a third data table includes: determining a data table format of the second data table and attribute data of each column of the table; generating a plurality of data cleaning instructions according to the data table format and the attribute data; loading the plurality of data cleaning instructions into the second data table to delete duplicate data, erroneous data and complete missing data in the second data table to obtain the third data table.

[0011] In an exemplary embodiment, performing the data format conversion operation on the third data table to obtain the target data table includes: obtaining attribute data of each column of the table in the third data table; generating format conversion instructions based on the attribute data of each column of the table; loading a plurality of the format conversion instructions into the third data table to convert the data of each column of the table in the third data table according to the data format in the conversion instructions to obtain the target data table.

[0012] In an exemplary embodiment, a data report of the target product is generated according to the target data table, including: receiving a user request, and responding to the user request, extracting data in an N-column table corresponding to the request category included in the user request from the target data table, wherein the user request is used to request generation of the data report; inputting the data in the N-column table and the user request into a target model respectively, to obtain the data report output by the target model, wherein the target model includes a data perspective sub-model and a data visualization sub-model, the data perspective sub-model is used to extract the data format and data content of the data in the N-column table, and extract the data report form requested in the user request, the data visualization sub-model is used to select a visualization component according to the data format and the data content, the visualization component is used to generate a visualization graph or chart of the data in the N-column table corresponding to the data report form, to obtain the data report.

[0013] In an exemplary embodiment, after generating a data report for the target product according to the target data table, the method further includes: acquiring transaction data of the target product in real time; calculating a fluctuation threshold of the transaction data using a real-time change trend of the transaction data; calculating an update frequency of the data report using the fluctuation threshold; and updating the data report according to the update frequency.

[0014] According to another embodiment of the present application, a data report generating device is provided, comprising: a first acquisition module, used to acquire N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1; a first processing module, used to perform data processing operations on the N data reports to obtain a target data table, wherein the data processing operations include, in sequence: data integration operations, data verification operations, data cleaning operations, and data format conversion operations; a first generation module, used to generate a data report of the target product based on the target data table, wherein the data report is used to indicate changes in transaction risk of the target product within the target time period.

[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0016] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0017] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0018] Through this application, the data integration operation, data verification operation, data cleaning operation and data format conversion operation are performed on the N acquired data reports in sequence, and a data report of the target product is generated according to the generated target data table. That is, multiple data reports can be automatically acquired and integrated, reducing manual operations, significantly improving the speed of data processing, enabling financial institutions to complete the preparation of market risk reports in a shorter time, thereby quickly responding to market changes. Data verification and cleaning operations ensure the accuracy and completeness of the data and reduce data inconsistencies caused by human errors. The data format conversion operation ensures that all data reports are processed in a unified format, which is convenient for subsequent analysis and comparison. Based on an accurate and consistent target data table, the generated data report can more accurately reflect the changes in transaction risks of the target product within the target time period. Therefore, the problem of the inability to accurately generate data reports in the related technology can be solved, and the effect of accurately generating data reports can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a hardware structure block diagram of a server device of a method for generating a data report according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for generating a data report according to an embodiment of the present application;

[0021] Figure 3 It is a structural block diagram of a data report generating device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0024] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a method for generating a data report in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating a data report in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, a method for generating a data report is provided. Figure 2 is a flow chart of a method for generating a data report according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0028] Step S202, obtaining N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1;

[0029] Optionally, the target time period in this embodiment specifies a time span for analysis and reporting, such as one day, one week, one month, or one quarter, etc. The selection of the target time period depends on business requirements and characteristics of market risks.

[0030] Optionally, in the N data reports, N represents the number of data reports, and the N data reports are records of the transaction data of the same target product based on different recording angles. N is a natural number greater than 1 (for example, N is equal to 3, or 4), which means that at least two or more reports record the transaction information from different perspectives.

[0031] Optionally, the recording angle in this embodiment refers to different dimensions or angles of data collection and analysis, such as customer perspective, product type perspective, market change perspective, etc. The report from each angle provides information about different aspects of the transaction.

[0032] Step S204, performing data processing operations on the N data reports to obtain a target data table, wherein the data processing operations sequentially include: data integration operations, data verification operations, data cleaning operations, and data format conversion operations;

[0033] Optionally, the data integration operation in this embodiment is used to merge the data in multiple data reports into a unified data table to ensure that all relevant information is included and the data format is consistent.

[0034] Optionally, the data verification operation in this embodiment is used to check whether the integrated data is complete and accurate to ensure data consistency, for example, to check the matching of transaction records, the integrity of data fields, etc.

[0035] Optionally, the data cleaning operation in this embodiment is used to remove or correct inaccurate, incomplete or irrelevant data in the data set to improve data quality, for example, deleting duplicate records, filling missing values, correcting format errors, etc.

[0036] Optionally, the data format conversion operation in this embodiment is used to convert data into a format suitable for further analysis and reporting, for example, standardizing field names and data types to ensure that all data is presented in a unified format.

[0037] Optionally, the target data table in this embodiment is a standardized data set generated after data integration, verification, cleaning and format conversion operations, and is used to prepare a data report.

[0038] Step S206: generating a data report of the target product according to the target data table, wherein the data report is used to indicate the change in transaction risk of the target product within the target time period.

[0039] Optionally, the data report in this embodiment is a document or file compiled based on the target data table, which is used to summarize and display the changes in transaction risk of the target product within the target time period. The data report may include various charts, key indicators and analysis conclusions.

[0040] The execution subject of the above steps may be a terminal, a server, a specific processor provided in the terminal or the server, or a processor or processing device provided relatively independently from the terminal or the server, but is not limited thereto.

[0041] Through the above steps, the data integration operation, data verification operation, data cleaning operation and data format conversion operation are performed on the N acquired data reports in sequence, and the data report of the target product is generated according to the generated target data table. That is, multiple data reports can be automatically acquired and integrated, reducing manual operations, significantly improving the speed of data processing, enabling financial institutions to complete the preparation of market risk reports in a shorter time, thereby quickly responding to market changes. Data verification and cleaning operations ensure the accuracy and completeness of data and reduce data inconsistency problems caused by manual errors. Data format conversion operations ensure that all data reports are processed in a unified format, which is convenient for subsequent analysis and comparison. Based on an accurate and consistent target data table, the generated data report can more accurately reflect the changes in transaction risks of the target product within the target time period. Therefore, the problem of inability to accurately generate data reports in related technologies can be solved, and the effect of accurately generating data reports can be achieved.

[0042] The method of this embodiment can be applied to the market risk management scenario of financial institutions, and can also be applied to the risk management scenario of virtual commodity transactions in games. The target product can be a virtual commodity in the game, such as rare equipment, game coins or props. The following is a specific embodiment based on the game scenario, including the following steps:

[0043] Step 1: Get N data reports within the target time period:

[0044] Transaction record report: Obtain transaction records between players from the game server database, including transaction time, product type, quantity, price and account information of both parties to the transaction.

[0045] Market Fluctuation Report: Analyze the in-game market and record the fluctuations in the prices of virtual goods, especially those with abnormal price fluctuations.

[0046] Player credit report: Evaluate the credit status of players and record information of players who frequently conduct suspicious transactions or have a bad credit history.

[0047] Anti-fraud activity reports: Collect unusual activities recorded by the in-game anti-fraud system, such as transactions conducted by exploiting game loopholes.

[0048] Product inventory report: displays the inventory of various virtual products held by the game operator, as well as the inventory changes over time.

[0049] The above reports are based on different recording angles and together constitute a comprehensive view of in-game virtual goods transactions.

[0050] Step 2: Perform data processing operations on N data reports:

[0051] Data integration operation: Integrate the data in all the above reports into a table called "In-game Transaction Risk Data Integration Table", including player transaction records, commodity price fluctuations, player credit assessment and other information.

[0052] Data verification operations: Check whether the integrated data is complete and accurate, for example, verify whether the player's transaction records are consistent with the information in the player's credit report, and check whether the price fluctuations of goods are consistent with the actual market situation.

[0053] Data cleaning operations: Remove duplicate transaction records and fill in missing information, especially for those suspicious transactions marked by the anti-fraud system, which need to be confirmed through additional player behavior analysis to avoid false positives.

[0054] Data format conversion operation: standardize all data fields, such as unifying transaction time into the "YYYY-MM-DDHH:MM:SS" format and currency units into the standard currency units within the game to ensure data consistency and analyzability.

[0055] Step 3: Generate a data report based on the target data table:

[0056] Transaction risk overview: Displays the transaction volume, transaction amount, commodity price fluctuations, and possible market risk factors of virtual goods in the game within a target time period (such as a week or a month), such as transaction fraud and player credit risk.

[0057] Commodity price fluctuation analysis: Analyze the price fluctuation trend of specific virtual commodities, identify commodities with abnormal price changes, and evaluate their impact on the game economic system.

[0058] Player credit risk assessment: List players with higher credit risk and analyze their transaction behavior to identify any fraud or abuse of game rules.

[0059] Market risk warning: Based on the integrated data, the system automatically identifies potential market risks, such as large fluctuations in commodity prices, abnormal player behavior, etc., and provides warnings to game operators so that preventive measures can be taken.

[0060] Risk control strategy recommendations: Based on data analysis, the report proposes control strategies for risk factors, such as adjusting the prices of virtual goods and restricting the trading rights of high-risk players.

[0061] Through the above specific embodiments, the method of this application is also applicable to the internal market risk management of the game. It can help the game operator to automatically collect and process transaction data from multiple angles and generate a data report that fully reflects the risk status of virtual commodity transactions in the game. This method not only improves the efficiency and accuracy of data processing, but also ensures the real-time and professional nature of risk management. This is of great significance for maintaining the stability of the game economic system, preventing fraud, and protecting the rights and interests of players.

[0062] For another example, in a market risk management scenario of a financial institution, assuming that a commercial bank needs to prepare a quarterly market risk report on gold derivatives, the following is a specific embodiment of applying the method of this embodiment, including the following steps:

[0063] Step 1: Get N data reports:

[0064] At the end of the first quarter of 2029, the following reports will be automatically obtained from the bank's trading system: "Summary of gold derivative transactions on behalf of customers": From the customer's perspective, it records all customers' gold derivative transactions in the first quarter, including transaction size, direction, execution price and expiration date. "Flat-end gold derivative transaction records": From the bank's own risk management perspective, it records the gold derivative transactions conducted by the bank to hedge customer transaction risks. "Gold derivative market data": provides information such as price fluctuations and transaction volume in the gold market in the first quarter.

[0065] Step 2: Perform data processing operations:

[0066] Data integration operation: Use data merging and splicing techniques to integrate the data from the three reports into a table called "Quarterly Gold Derivatives Trading Data".

[0067] Data verification operation: Through data comparison and integrity check, ensure that there are no omissions or errors in the data in the "Quarterly Gold Derivatives Trading Data" and that all transaction records match the bank's transaction system and financial records.

[0068] Data cleaning operations: remove duplicate transaction records, fill in missing fields, correct format errors, and especially delete transaction records that have been closed in advance but not delivered to avoid duplicate calculation of risk exposure.

[0069] Data format conversion operation: Standardize all data fields, such as standardizing date fields into the "YYYY-MM-DD" format and currency fields into the "XX.XX" format, to ensure data consistency and analyzability.

[0070] Step 3: Generate data report:

[0071] Generate the "Gold Derivatives Market Risk Quarterly Report" based on the processed "Quarterly Gold Derivatives Trading Data".

[0072] The report includes: "Overview of Market Risk Situation": Displays the changes in the nominal balance, market value revaluation, risk exposure and floating profit and loss of gold derivatives in the first quarter. "Customer Transaction Risk Analysis": Lists the trading conditions of the top ten customers in the first quarter, including trading varieties, scale, risk exposure and customer credit risk assessment. "Product Type Risk Segmentation": Analyzes risk exposure and market performance by type of gold derivatives (such as options, forwards, swaps), and identifies product types with higher risks. "Market Dynamics and Risk Factors": Analyzes price fluctuations, trading volume changes and other dynamics in the gold market in the first quarter, and explores the impact on market risks. The report uses charts, key indicators and detailed analysis to show the bank's gold derivative trading risk status in the first quarter in an intuitive and professional way, providing key decision-making information for the risk management team.

[0073] Through the above examples, it can be seen that the method of this embodiment can effectively integrate, verify, clean and convert data reports from multiple angles to generate a data report that comprehensively reflects the changes in market risk of the target product within the target time period. This method not only improves the efficiency and accuracy of data processing, but also ensures the quality of the report, which helps financial institutions to monitor and manage market risks in real time.

[0074] In an exemplary embodiment, obtaining N data reports within a target time period includes: identifying a data source based on the product type and transaction type of the target product to determine the storage location and report format of the N data reports from the data source; configuring the access rights of a data access script to access the data source according to the storage location and the report format through the access script; and downloading the N data reports from the data source.

[0075] Optionally, the data source is a system or platform for storing data reports, for example, it may be a transaction system, database, file server within a bank, or an external data supplier or exchange.

[0076] Optionally, the target products can be divided into different types, such as options, forwards, swaps, etc.; transaction types generally include buying, selling, closing, etc. When identifying the data source, it is necessary to clarify which product type and transaction type the data is for.

[0077] Optionally, the storage location refers to a specific location or path of the data report in the data source; the report format involves the organization form of the data, such as Excel, CSV or database table, and the naming and data type of the fields.

[0078] Optionally, a data access script is an automated tool or program that is used to extract data reports from a data source. The access script needs to have appropriate access permissions to correctly read the data according to the predetermined storage location and report format.

[0079] For example, assuming that the market risk management department of a financial institution needs to generate a data report on the gold derivatives market risk at the end of each month, the following is a specific step for implementing this embodiment, including:

[0080] Step 1: Identify data sources and data reports: Product type: gold derivatives, including gold options, gold forwards and gold swaps. Transaction type: including customer buying, customer selling, bank closing, etc. Data source: internal trading system (client transaction data), bank risk management system (closing end transaction data), external market data supplier (gold market price data). Each data source stores data reports related to the above product types and transaction types. Storage location: client transaction data is stored in the path of "trading system / derivatives / gold / client transaction"; closing end transaction data is stored in the path of "risk management / derivatives / gold / bank closing"; gold market price data is obtained from external suppliers through API. Report format: transaction data of the client and closing end are stored in Excel format, and market data is provided in CSV format.

[0081] Step 2: Configure access permissions for data access scripts: Access scripts: Use Python scripts, combined with the pandas and xlrd libraries, to read data reports in Excel and CSV formats. Access permissions: Configure network access permissions (such as HTTPS access) in the script to obtain external market data, and internal system access permissions (such as database username and password) to read internal trading data.

[0082] Step 3: Download N data reports: According to the configured storage location and report format, the Python script accesses the internal trading system and external market data supplier respectively, and downloads the "Customer Gold Derivatives Transaction Details", "Bank Gold Derivatives Flat Transaction Details" and "Gold Market Price Data" from the specified path. After the data is downloaded, the script will check whether there is new data update. If so, it will download the latest version of the report data to ensure the timeliness and accuracy of the analysis and report. During the script running process, the access log and error information of each step will be recorded to facilitate subsequent debugging and auditing.

[0083] Through the above specific implementation steps, financial institutions can automatically obtain gold derivatives transaction data without manual search and downloading, which improves the efficiency and accuracy of data collection. This lays a solid foundation for subsequent data processing and the generation of market risk reports. In actual applications, data access scripts may also include error handling mechanisms to ensure that the system can automatically adjust or issue an alarm when the data source is unavailable or the data format changes, thereby maintaining the stability and flexibility of the data processing process.

[0084] In an exemplary embodiment, data processing operations are performed on N data reports to obtain a target data table, including: performing the data integration operation on the N data reports to obtain a first data table; performing the data verification operation on the first data table to obtain a second data table; performing the data cleansing operation on the second data table to obtain a third data table; performing the data format conversion operation on the third data table to obtain the target data table.

[0085] Optionally, the data integration operation is performed on N of the data reports to obtain a first data table, including: establishing a correspondence between a first data report and a second data report according to a product identifier of the target product, wherein the first data report is a customer transaction details table of the target product, and the second data report is a market transaction details table of the target product, and the first data report and the second data report are both reports among the N data reports; using a third data report to verify transaction information in the second data report, wherein the third data report is a ledger details table among the N data reports; when the transaction information in the second data report is correct, merging the matching transaction information in the first data report and the second data report according to the correspondence to obtain the first data table.

[0086] In this embodiment, the product identifier is a code or name used to uniquely identify a specific trading product in the transaction data, for example, the ISIN (International Securities Identification Number) of a certain derivative or the SKU (Stock Keeping Unit) of a commodity.

[0087] The first data report can be a customer transaction details table, which records the transaction details between the customer and the financial institution, including customer information, transaction time, transaction type (buy / sell), transaction volume, price, etc. The second data report can be a market transaction details table, which reflects the transaction behavior of the financial institution in the market, including flat transactions with different counterparties, and possible proprietary transactions. The third data report can be a ledger details table, which is the general ledger of all transactions within the financial institution, containing complete transaction information, such as transaction number, transaction time, transaction type, counterparty, transaction volume, price, status, etc., which is used to verify the information in the market transaction details table. The corresponding relationship is based on the product identification, and the association between the customer transaction details table and the market transaction details table is established to ensure that the transaction records of both parties can be correctly matched when the data is integrated.

[0088] Optionally, performing the data verification operation on the first data table to obtain the second data table includes: obtaining a first data list and a second data list from the first data table, wherein the first data list includes customer transaction information of the target product, and the second data list includes market transaction information of the target product; when a first transaction parameter in the first data list matches a second transaction parameter in the second data list, and the first data list and the second data list are both complete, determining the first data table as the first data table.

[0089] In this embodiment, the first data list: In the first data list, a data set of customer transaction information is included. This information usually includes detailed data of customer transactions, such as transaction date, transaction time, transaction product type, transaction direction (buy / sell), transaction volume, transaction price, customer ID, etc. The first data list is an abstract representation of the customer transaction details list, in which each record (i.e., the first transaction parameter) represents a specific customer transaction.

[0090] Second data list: In the first data list, a data set containing market transaction information is included. This information involves the bank's transaction behavior in the market, including bank transaction number, transaction time, transaction product type, transaction direction, transaction volume, transaction price, transaction counterparty, etc. The second data list is an abstract representation of the market transaction details list, and each record (i.e., the second transaction parameter) represents a market transaction of the bank.

[0091] First transaction parameter and second transaction parameter: refer to the key fields of customer transaction information in the first data list and the key fields of market transaction information in the second data list respectively. These parameters may include product type, transaction volume, transaction price, etc., which are used to judge the matching and integrity of transaction information.

[0092] Data verification operation: After the data integration operation, the information in the first data table is verified to ensure the consistency and accuracy of customer transaction information and market transaction information. Data verification mainly involves data integrity verification and logical consistency check, for example, confirming that all transactions have corresponding counterparties, transaction volumes and prices are within reasonable ranges, and the rationality of transaction time.

[0093] Optionally, performing the data cleaning operation on the second data table to obtain a third data table includes: determining the data table format of the second data table and attribute data of each column of the table; generating multiple data cleaning instructions according to the data table format and the attribute data; loading multiple data cleaning instructions into the second data table to delete duplicate data, erroneous data and complete missing data in the second data table to obtain the third data table.

[0094] Optionally, data table format: refers to the structure and layout of data in the second data table, including column names, data types, column order, etc. The data table format is specified to ensure data consistency and standardization, and facilitate subsequent data cleaning, analysis, and report generation.

[0095] Attribute data: refers to the specific characteristics and requirements of each column (or field) in the data table, including the type of data (such as date, number, text), the range of data (such as the date format should be "yyyy-mm-dd"), the integrity requirements of the data (such as all transaction records should contain key fields such as transaction date and transaction volume), and the logical relationship of the data (such as the transaction volume and transaction price cannot be zero at the same time).

[0096] Data cleaning instructions: Rules or commands for data cleaning generated based on the data table format and attribute data. These instructions may include specific operations such as deleting duplicate records, filling missing values, and correcting erroneous data, aiming to improve data quality and ensure data accuracy and completeness.

[0097] Duplicate data: In a data table, if there are identical records or data points, this will be considered duplicate data. For example, two identical transaction records, or multiple records of the same day, the same product, or the same transaction volume are all duplicate data and need to be identified and deleted during the data cleaning process.

[0098] Error data: refers to data in the data table that does not meet the attribute data requirements or logical rules. This may include format errors (such as incorrect date format), value range errors (such as negative transaction volume), logical errors (such as transaction date later than expiration date), etc.

[0099] Missing data: refers to data in which certain fields in a data table are not filled in or are blank. For example, if a transaction record lacks transaction price or counterparty information, this will be considered missing data and needs to be identified and appropriate filling or correction measures taken during data cleaning operations.

[0100] Optionally, performing the data format conversion operation on the third data table to obtain the target data table includes: obtaining attribute data of each column of the table in the third data table; generating format conversion instructions based on the attribute data of each column of the table; loading a plurality of the format conversion instructions into the third data table to convert the data of each column of the table in the third data table according to the data format in the conversion instructions to obtain the target data table.

[0101] Optionally, the algorithm logic used for data integration operations, data verification operations, data cleaning operations, and data format conversion operations depends largely on the specific characteristics of the data and business requirements. For example, the data integration operation can use the Join algorithm: merge multiple data tables into one data table based on specified keys (such as product ID, customer ID, etc.). This can be done using the SQL JOIN operation or the merge function of the Python pandas library. If the data involves time series, use a timestamp alignment algorithm to ensure that the data is correctly merged in chronological order to avoid time misalignment. When integrating data, it may be necessary to summarize or average certain fields, which requires the use of aggregation algorithms, such as sum, average, etc. Identify and delete duplicate records by hashing or comparing key fields to ensure that each transaction in the data set has a unique representation.

[0102] For data verification operations, you can use integrity verification: use statistical methods to check whether each column has data to ensure that no key fields are missing. Consistency verification: compare the relevant fields in the customer transaction information list (first data list) and the market transaction information list (second data list), such as transaction volume and transaction price, to ensure that they are logically consistent. Range and format verification: use regular expressions or conditional judgments to check whether the data is within the valid range, such as whether the transaction date conforms to a specific format and whether the transaction price is within a reasonable range. Anomaly detection algorithm: apply outlier detection algorithms in statistics, such as Z-score, IQR, etc., to identify and mark potential abnormal transaction data.

[0103] Data cleaning operations can use missing value filling: For missing values, statistical methods (such as mean, median) can be used to fill them, or machine learning model predictions based on other fields can be used to fill them. Error value correction: Use conditional judgments to identify incorrect values ​​that do not conform to logic or format, such as negative trading volume, and then correct or delete these values ​​according to specific rules. Deduplication: Use hash tables or comparison algorithms based on key fields to identify and delete duplicate records to reduce data redundancy. Data type conversion: Make sure the data types of all fields are consistent with expectations, and use type conversion functions such as pandas' astype() function for conversion.

[0104] Data format conversion operations can use date and time format conversion: use Python's datetime library or pandas' to_datetime() function to convert string dates into a unified date and time format, such as "yyyy-mm-ddHH:MM:SS". Numeric format standardization: After data cleaning operations, ensure that all numeric fields have the same precision and format, such as unified currency units, unified decimal places, etc. Text field formatting: Clean up text fields, remove extra spaces, unify uppercase and lowercase, etc. to improve data readability and consistency. Data structure conversion: If necessary, convert wide tables to long tables, or convert long tables to wide tables, using pandas' melt() and pivot() functions. Standardized field naming: Ensure that the naming of all fields complies with established specifications to facilitate subsequent data analysis and report generation.

[0105] For example, the above embodiment is described below in conjunction with a specific embodiment. Assuming that a game company needs to generate a quarterly market risk report on its virtual commodity transactions, the following are specific steps for implementing this embodiment:

[0106] Step 1: Data integration operation: Obtain the following four data reports from the game's internal database, player transaction record system, and market analysis tools:

[0107] "Player Transaction Records": records the transaction details of virtual goods between players, including transaction time, product type, quantity, price and account information of both parties to the transaction.

[0108] "Commodity Price Fluctuation Record": records the changes in virtual commodity prices within a quarter, including the highest price, lowest price, average price, etc.

[0109] "Suspicious Transaction Activity List": lists all transaction activities marked as suspicious during the quarter, including abnormal transaction amounts, excessively high transaction frequencies, etc.

[0110] "Player Credit Assessment Report": Assess the player's credit status based on the player's historical behavior data, including credit level, violation record, etc.

[0111] Use the pandas library in Python to integrate the above report data into a first data table called "Quarterly Virtual Commodity Transaction Data Integration Table" to ensure that all relevant transaction data are included. Use the pandas merge function to perform a JOIN operation based on the product ID. Use the time series alignment algorithm to ensure that all transaction records are correctly sorted according to the transaction time.

[0112] Step 2: Data verification operation: Perform data verification operation on the first data table to check the integrity and consistency of the data, such as verifying whether the quantity and price of goods in the transaction record are consistent with the data in the commodity price fluctuation record, and confirming whether the mark of suspicious transaction activities is correct. Correct or remove the data that does not meet the rules and generate the second data table.

[0113] Step 3: Data cleaning operation: Clean the second data table, remove duplicate transaction records, fill in missing commodity price data, correct date format errors, handle suspicious transactions, and ensure data accuracy and quality. After this step, generate the third data table for subsequent data format conversion. Use pandas' dropna function to check and mark missing values. Use pandas' fillna function to fill missing values. Use conditional judgment to delete records with negative transaction volume. Use pandas' drop_duplicates function to delete duplicate transaction records. Convert data types through pandas' astype function.

[0114] Step 4: Data format conversion operation: Perform data format conversion operation on the third data table, standardize field names (such as unifying "transaction time" as "trans_time" and "commodity type" as "item_type", etc.), adjust the numerical format (such as expressing the price as a fixed decimal point), unify the date format (such as "YYYY-MM-DD"), and generate the target data table, i.e. the fourth data table. Use pandas' to_datetime function to unify the format of transaction dates. Use pandas' pivot_table function to convert transaction data from long format to wide format to facilitate the production of multi-dimensional reports.

[0115] Step 5: Generate data report: Based on the target data table, use report generation tools (such as Python's matplotlib library to draw graphics, pandas library to perform data analysis, and Jinja2 template engine to generate report text) to automatically generate the "Quarterly Virtual Commodity Trading Market Risk Report". The report includes but is not limited to the following:

[0116] Overview of Virtual Commodity Trading Risks: displays the trading volume, transaction amount, price fluctuation range, etc. of virtual commodities within a quarter, as well as the trend of market risk changes.

[0117] Analysis of Suspicious Transaction Activities: Detailed list and analysis of transaction activities marked as suspicious, including transaction amount, transaction time, products and players involved, etc.

[0118] 《Player Credit Risk Assessment》: Analyze player credit risk and identify high-risk players based on integrated transaction data and credit assessment reports.

[0119] "Market Risk Warning and Response Strategy": Based on data analysis, the system automatically identifies potential market risk factors, such as abnormal price fluctuations, player fraud, etc., provides warnings to game operators, and recommends corresponding risk control strategies.

[0120] Through the above specific implementation steps, game companies can systematically process and analyze virtual commodity transaction data, ensure the accuracy and consistency of data, and improve the efficiency and professionalism of report preparation. This plays an important role in internal market risk management, fraud prevention, and maintaining the stability of the game economic system. In addition, this method can also help game companies better understand player behavior and optimize game design and operation strategies.

[0121] For another example, a specific embodiment in a financial scenario includes the following steps:

[0122] Bank Objective: Generate monthly report on market risk of precious metals derivatives.

[0123] Step 1: Data integration operations:

[0124] The first data report: "Customer Precious Metals Derivatives Transaction Details List".

[0125] The second data report: "Bank Precious Metals Derivatives Market Transaction Details".

[0126] The third data report: "Precious Metals Derivatives Transaction Ledger Details".

[0127] Product Identification: ISIN code of precious metal derivatives.

[0128] Use Python's pandas library to establish the correspondence between the customer transaction table and the market transaction table based on the ISIN code (product identifier).

[0129] Check market transaction records through the transaction ledger details to ensure that the data is accurate.

[0130] Merge the matching transaction information in the two detailed tables to generate the "Precious Metals Derivatives Transaction Consolidation Table" (i.e. the first data table).

[0131] Step 2: Data verification operation:

[0132] Separate the "Customer Precious Metals Derivatives Transaction List" and the "Bank Precious Metals Derivatives Market Transaction List" from the "Precious Metals Derivatives Transaction Consolidation List".

[0133] Verify the consistency of transaction parameters in the two lists, such as transaction volume and transaction price, which should be consistent with the records in the transaction ledger.

[0134] When the transaction parameters match and the data is complete, the validity of the data sheet is confirmed to obtain the "Verified Precious Metals Derivatives Transaction Sheet" (i.e., the second data sheet).

[0135] Step 3: Data cleaning operations:

[0136] Clarify the data format and attribute data requirements of the "Verified Precious Metals Derivatives Transaction Table".

[0137] Generate data cleaning instructions, such as deleting duplicate transactions, correcting transaction date formats, filling in counterparty information, etc.

[0138] Execute the cleaning instruction and obtain the "Precious Metals Derivatives Transaction Table after Cleaning" (i.e. the third data table).

[0139] Step 4: Data format conversion operation:

[0140] According to the attribute data requirements, the format requirements of the date, price and other fields in the "Post-cleaning Precious Metals Derivatives Transaction Table" are obtained.

[0141] Generate format conversion instructions, such as converting date fields to the "yyyy-mm-dd" format, ensuring that numeric fields use fixed decimal points, etc.

[0142] Apply format conversion instructions to ensure that each record in the data table conforms to a unified data format and obtain the "Standardized Precious Metals Derivatives Trading Table" (i.e. the target data table).

[0143] Through the above embodiments, whether in the gaming industry or the financial industry, enterprises can adopt a systematic approach to process and prepare data, laying a solid data foundation for generating high-quality market risk reports. This method not only improves the accuracy and efficiency of data processing, but also ensures the consistency and standardization of data, providing a reliable data source for subsequent data analysis and report generation. In addition, through data cleaning and format conversion, enterprises can effectively reduce errors and omissions in the data processing process and improve the accuracy and timeliness of market risk assessment.

[0144] In an exemplary embodiment, a data report of the target product is generated according to the target data table, including: receiving a user request, and responding to the user request, extracting data in an N-column table corresponding to the request category included in the user request from the target data table, wherein the user request is used to request generation of the data report; inputting the data in the N-column table and the user request into a target model respectively, to obtain the data report output by the target model, wherein the target model includes a data perspective sub-model and a data visualization sub-model, the data perspective sub-model is used to extract the data format and data content of the data in the N-column table, and extract the data report form requested in the user request, the data visualization sub-model is used to select a visualization component according to the data format and the data content, the visualization component is used to generate a visualization graph or chart of the data in the N-column table corresponding to the data report form, to obtain the data report.

[0145] Optionally, in this embodiment, the target data table is a standardized data set after data integration, verification, cleaning and format conversion, ready for data analysis and report generation.

[0146] User requests are requests triggered automatically by business analysts, risk managers or the system to specify the type, format, analysis dimension and data scope of the report.

[0147] Request categories are the classifications of report types included in user requests, such as market risk analysis reports, customer activity overview reports, trend forecast reports, etc.

[0148] The data in the N-column table are multiple data subsets extracted from the target data table based on user requests, and each subset corresponds to a different analysis dimension or report requirement.

[0149] The target model plays a core role in the process of generating data reports. It consists of two parts: the pivot model and the data visualization model. The target model is designed to extract data from the target data table, perform multi-dimensional analysis, and present the analysis results to the user in an intuitive visual form. The following is a detailed description of the target model:

[0150] The pivot sub-model is used to extract data from N-column tables and summarize and pivot the data according to the analysis dimensions specified in the user request. The core of this sub-model is the ability to flexibly process data from different tables and dynamically generate pivot tables based on business needs. The following are the key functions and implementation methods of the pivot sub-model:

[0151] Multidimensional data aggregation: Ability to aggregate data based on multiple dimensions such as time, product type, customer classification, etc., and calculate statistical indicators such as total, average, maximum, minimum, etc.

[0152] Dynamic data filtering: Filter data based on specific conditions in user requests (such as date range, product type, transaction volume threshold, etc.) and only retain data records that meet the requirements.

[0153] Pivot and cross-analysis: Ability to perform complex pivot analysis on data, such as calculating the market share of different product types in different time periods, or analyzing the transaction behavior of different customers on specific products.

[0154] Outlier detection and processing: During the data pivoting process, it is possible to detect and mark abnormal values, such as extreme values, missing values, etc., and provide options to correct or delete these outliers.

[0155] Data format conversion: Ensure that the data format used in the data pivot process is consistent with the target data report requirements, such as date format, decimal precision, etc.

[0156] A widely used data processing and analysis library in Python that provides powerful data structures and data manipulation functions, such as DataFrame and Series, suitable for data pivoting and data filtering. SQL is a structured query language used for data query and aggregation, suitable for data pivoting operations in large database environments.

[0157] The function of the data visualization sub-model is to present the data output by the data perspective sub-model in the form of charts or graphs, which is convenient for users to understand and analyze. This sub-model needs to select the most suitable visualization components according to the characteristics of the data and the user's preferences, and generate corresponding charts. The following are the key functions and implementation methods of the data visualization sub-model:

[0158] Chart type selection: Automatically or manually select the most appropriate chart type based on the data report format and data characteristics, such as line chart, bar chart, pie chart, scatter chart, heat map, etc.

[0159] Chart generation: Use chart generation libraries or tools, such as Matplotlib, Seaborn, Plotly, Power BI, etc., to generate visual charts based on data format and content.

[0160] Chart style customization: The chart style can be customized according to user needs, such as color, title, legend, coordinate axis, etc., to improve the aesthetics and professionalism of the data report.

[0161] Interactive chart creation: Where applicable, create interactive charts that allow users to explore data using the mouse or touch screen, for example, by hovering to see specific values ​​or dragging to adjust time ranges.

[0162] Chart layout and integration: Rationally layout multiple charts and integrate them into a complete data report, which may involve page design, layout adjustment and the application of report templates.

[0163] Matplotlib, Seaborn: Important libraries for data visualization in Python, providing a rich variety of chart types and customization options. Plotly: An interactive chart library that supports dynamic updates and user interaction, suitable for visualization needs of real-time data reports. Power BI, Tableau: Business intelligence tools for creating complex visual dashboards and reports, supporting multiple data sources and advanced data visualization capabilities.

[0164] The overall process of the target model includes:

[0165] Receive user requests: Obtain report generation requests submitted by users through the interface or API. The request should include the type, format, and analysis dimensions of the data report.

[0166] Data extraction and pivoting: The pivoting sub-model extracts the data specified by the user from the target data table and performs data aggregation, filtering and pivoting analysis.

[0167] Chart type selection and generation: The data visualization sub-model selects the appropriate chart type and generates the corresponding visualization chart based on the data perspective results and report requirements.

[0168] Report integration and delivery: Integrate charts and other text information into the final data report, output the report according to the format requested by the user (such as PDF, Word, online report, etc.), and send it to the user via email, system interface or API interface.

[0169] The advantage of the target model is that it can automatically and efficiently process large amounts of data and present it to users in an easy-to-understand visual form, significantly improving the speed and accuracy of data report generation. In addition, through flexible configuration and parameter settings, the target model can adapt to different business scenarios and user needs, and has high scalability and adaptability.

[0170] For example, in the scenario of financial derivatives trading risk reporting, the target model can set multiple predefined analysis dimensions and chart types to meet the needs of decision makers at different levels. For business departments, the model may generate charts containing market trends, trading volumes, and customer behavior; while for senior management, the model may focus on high-level views of key indicators such as risk exposure, profit forecasts, and market stability.

[0171] In the scenario of processing in-game transactions, the target model needs to adapt to the data structure and analysis requirements within the game, such as transaction frequency, player behavior patterns, changes in market supply and demand, etc., which may involve more user interaction design and game data analysis techniques.

[0172] In summary, the target model, through the combined capabilities of its data perspective sub-model and data visualization sub-model, provides users with a fast, accurate, personalized and intuitive data report generation solution, improving the efficiency of data analysis and the timeliness of decision-making.

[0173] In an exemplary embodiment, after generating a data report for the target product according to the target data table, the method further includes: acquiring transaction data of the target product in real time; calculating a fluctuation threshold of the transaction data using a real-time change trend of the transaction data; calculating an update frequency of the data report using the fluctuation threshold; and updating the data report according to the update frequency.

[0174] Optionally, in this embodiment, real-time transaction data refers to transaction information generated instantly in the market, including but not limited to transaction price, transaction volume, transaction time, etc., which is usually obtained through an API interface or real-time data streaming technology.

[0175] The volatility threshold is a quantitative indicator calculated based on the trend of historical data and real-time trading data to measure the magnitude of market volatility. When market volatility exceeds this threshold, it is considered a significant change in market conditions and requires triggering corresponding response measures.

[0176] Update frequency refers to the periodic time interval at which data reports are generated and updated, which can be regular (such as daily, weekly, monthly) or event-driven (such as when market volatility exceeds a certain threshold).

[0177] Dynamic report updates: This is an automated process that automatically adjusts the content and update frequency of data reports based on market conditions and data changes to ensure the timeliness and accuracy of the reports.

[0178] For example, in the scenario of in-game transactions, transaction data is obtained in real time: the game operator continuously collects transaction data between players in the game through real-time data collection systems such as Kafka or Redis Streams, including transaction time, transaction volume, transaction price, etc.

[0179] Calculate the volatility threshold: Use the sliding window statistical method to monitor the average and standard deviation of a commodity transaction price in the past period of time (such as the last hour) in real time. Calculate the real-time volatility based on the standard deviation and compare it with the historical volatility. Set the volatility threshold to 1.5 times the historical volatility.

[0180] Calculation update frequency: If the real-time volatility exceeds the volatility threshold, the system will automatically adjust the update frequency from once a day to once every 4 hours to quickly respond to market changes.

[0181] Dynamic report update: The system regularly extracts new data fragments from real-time transaction data and integrates them with historical data according to the update frequency. Re-execute data integration, verification, cleaning and format conversion operations to update the target data table. Generate the latest "Quarterly Trading Risk Analysis Report" and highlight the time period and transaction details of abnormal price fluctuations. If the volatility exceeds the threshold for multiple consecutive periods, the system automatically sends an alert email to the game operation team to remind them to pay attention to market fluctuations.

[0182] Another example is in the scenario of bank precious metal derivatives trading.

[0183] Real-time acquisition of transaction data: The bank continuously obtains real-time transaction data of precious metal derivatives, including transaction volume, transaction price, counterparty and other information, through API interfaces with major precious metal exchanges and trading platforms around the world.

[0184] Calculate the volatility threshold: Based on time series analysis, calculate the mean and volatility of precious metal prices over the past period of time (such as the last week). Set a volatility threshold based on the calculated volatility, for example, set the volatility threshold to 1.2 times the volatility of the past week.

[0185] Calculation update frequency: If the real-time monitoring shows that the price fluctuation of precious metals exceeds the fluctuation threshold, the system will automatically adjust the update frequency of the market risk report from once a month to once a week or once a day.

[0186] Dynamic report update: The system automatically obtains new data sets from real-time transaction data and merges them with historical data based on the adjusted update frequency. Re-execute data cleaning and format conversion operations to update the target data table "Standardized Precious Metals Derivatives Trading Table". Generate the latest "Monthly Precious Metals Derivatives Market Risk Report" using data pivot and visualization sub-models, and highlight the varieties and time periods with abnormal price fluctuations in the report. If volatility continues to be high, the system will automatically increase the dimensions of risk analysis, such as adding stress testing scenarios or introducing advanced analysis models to more comprehensively assess market risks.

[0187] Through the above examples, we can see that the acquisition and analysis of real-time transaction data can not only improve the timeliness of data reports, but also dynamically adjust the update frequency according to market changes to ensure that the report content is synchronized with the latest market conditions, which is of great significance for quickly responding to market fluctuations and effectively managing and controlling risks. In the financial and gaming industries, this dynamic report update mechanism has become an important tool for improving data analysis capabilities and risk management efficiency.

[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0189] In this embodiment, a data report generation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0190] Figure 3 is a structural block diagram of a data report generating device according to an embodiment of the present application, such as Figure 3 As shown, the device comprises:

[0191] A first acquisition module 32 is used to acquire N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1;

[0192] The first processing module 34 is used to perform data processing operations on the N data reports to obtain a target data table, wherein the data processing operations sequentially include: data integration operations, data verification operations, data cleaning operations, and data format conversion operations;

[0193] The first generating module 36 is used to generate a data report of the target product according to the target data table, wherein the data report is used to indicate the transaction risk change of the target product within the target time period.

[0194] In an exemplary embodiment, the above-mentioned first acquisition module 32 includes: a first identification unit, used to identify the data source based on the product type and transaction type of the target product, so as to determine the storage location and report format of N data reports from the data source; a first configuration unit, used to configure the access rights of the data access script, so as to access the data source according to the storage location and the report format through the access script; a first downloading unit, used to download N data reports from the data source.

[0195] In an exemplary embodiment, the above-mentioned first processing module 34 includes: a first integration unit, used to perform the data integration operation on N data reports to obtain a first data table; a first verification unit, used to perform the data verification operation on the first data table to obtain a second data table; a first cleaning unit, used to perform the data cleaning operation on the second data table to obtain a third data table; a first conversion unit, used to perform the data format conversion operation on the third data table to obtain the target data table.

[0196] In an exemplary embodiment, the above-mentioned first integration unit includes: a first establishment sub-module, used to establish a correspondence between a first data report and a second data report according to the product identification of the target product, wherein the first data report is a customer transaction details table of the target product, the second data report is a market transaction details table of the target product, and the first data report and the second data report are both reports among N of the data reports; a first verification sub-module, used to use a third data report to verify the transaction information in the second data report, wherein the third data report is a ledger details table among the N data reports; a first merging sub-module, used to merge the matching transaction information in the first data report and the second data report according to the corresponding relationship to obtain the first data table when the transaction information in the second data report is correct.

[0197] In an exemplary embodiment, the above-mentioned first verification unit includes: a first acquisition submodule, used to obtain a first data list and a second data list from the first data table, wherein the first data list includes customer transaction information of the target product, and the second data list includes market transaction information of the target product; a first matching submodule, used to determine the first data table as the first data table when the first transaction parameter in the first data list matches the second transaction parameter in the second data list and the first data list and the second data list are complete.

[0198] In an exemplary embodiment, the first cleaning unit includes: a first determination submodule, used to determine the data table format of the second data table and the attribute data of each column of the table; a first generation submodule, used to generate multiple data cleaning instructions according to the data table format and the attribute data; a first loading submodule, used to load multiple data cleaning instructions into the second data table to delete duplicate data, erroneous data and complete missing data in the second data table to obtain the third data table.

[0199] In an exemplary embodiment, the first conversion unit includes: a second acquisition submodule, used to acquire attribute data of each column of the table in the third data table; a second generation submodule, used to generate format conversion instructions based on the attribute data of each column of the table; and a second loading submodule, used to load a plurality of the format conversion instructions into the third data table to convert the data of each column of the table in the third data table according to the data format in the conversion instructions to obtain the target data table.

[0200] In an exemplary embodiment, the above-mentioned first generation module includes: a first receiving unit, used to receive a user request, and in response to the user request, extract data in an N-column table corresponding to the request category included in the user request from the target data table, wherein the user request is used to request generation of the data report; a first input unit, used to input the data in the N-column table and the user request into the target model respectively, to obtain the data report output by the target model, wherein the target model includes a data perspective sub-model and a data visualization sub-model, the data perspective sub-model is used to extract the data format and data content of the data in the N-column table, and extract the data report form requested in the user request, the data visualization sub-model is used to select a visualization component according to the data format and the data content, and the visualization component is used to generate a visualization graph or chart of the data in the N-column table corresponding to the data report form to obtain the data report.

[0201] In an exemplary embodiment, the above-mentioned device also includes: a second acquisition module, which is used to acquire the transaction data of the target product in real time after generating the data report of the target product according to the target data table; a first calculation module, which is used to calculate the fluctuation threshold of the transaction data using the real-time change trend of the transaction data; a second calculation module, which is used to calculate the update frequency of the data report using the fluctuation threshold; and a first update module, which is used to update the data report according to the update frequency.

[0202] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0203] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0204] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0205] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0206] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0207] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0208] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0209] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0210] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0211] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0212] The above description is only the preferred 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 modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating a data report, characterized in that: include: Obtaining N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1; Performing data processing operations on the N data reports to obtain a target data table, wherein the data processing operations sequentially include: data integration operations, data verification operations, data cleaning operations, and data format conversion operations; A data report of the target product is generated according to the target data table, wherein the data report is used to indicate changes in transaction risk of the target product within the target time period.

2. The method according to claim 1, characterized in that Get N data reports within the target time period, including: Identifying a data source based on the product type and transaction type of the target product to determine the storage location and report format of N data reports from the data source; Configuring access rights of a data access script so as to access the data source according to the storage location and the report format through the access script; Download N data reports from the data source.

3. The method according to claim 1, characterized in that Performing data processing operations on the N data reports to obtain a target data table, including: Performing the data integration operation on the N data reports to obtain a first data table; Performing the data verification operation on the first data table to obtain a second data table; Performing the data cleaning operation on the second data table to obtain a third data table; The data format conversion operation is performed on the third data table to obtain the target data table.

4. The method according to claim 3, characterized in that Performing the data integration operation on the N data reports to obtain a first data table includes: Establishing a correspondence between a first data report and a second data report according to the product identification of the target product, wherein the first data report is a customer transaction details report of the target product, the second data report is a market transaction details report of the target product, and the first data report and the second data report are both reports among the N data reports; Using a third data report to check the transaction information in the second data report, wherein the third data report is a detailed account list in the N data reports; When the transaction information in the second data report is correct, the matching transaction information in the first data report and the second data report are merged according to the corresponding relationship to obtain the first data table.

5. The method according to claim 3, characterized in that: Performing the data verification operation on the first data table to obtain a second data table includes: Acquire a first data list and a second data list from the first data table, wherein the first data list includes customer transaction information of the target product, and the second data list includes market transaction information of the target product; When the first transaction parameter in the first data list matches the second transaction parameter in the second data list, and both the first data list and the second data list are complete, the first data table is determined as the first data table.

6. The method according to claim 3, characterized in that: Performing the data cleaning operation on the second data table to obtain a third data table includes: Determine the data table format of the second data table and attribute data of each column; Generate multiple data cleaning instructions according to the data table format and the attribute data; Loading a plurality of the data cleaning instructions into the second data table to delete duplicate data, erroneous data and complete missing data in the second data table to obtain the third data table.

7. The method according to claim 3, characterized in that Performing the data format conversion operation on the third data table to obtain the target data table includes: Obtaining attribute data of each column of the third data table; Generate format conversion instructions based on attribute data of each column of the table; A plurality of the format conversion instructions are loaded into the third data table to convert the data in each column of the third data table according to the data format in the conversion instructions to obtain the target data table.

8. The method according to claim 1, characterized in that: Generating a data report of the target product according to the target data table includes: receiving a user request, and in response to the user request, extracting data in N columns of a table corresponding to a request category included in the user request from the target data table, wherein the user request is used to request generation of the data report; The data in the N-column table and the user request are respectively input into the target model to obtain the data report output by the target model, wherein the target model includes a data perspective sub-model and a data visualization sub-model, the data perspective sub-model is used to extract the data format and data content of the data in the N-column table, and extract the data report form requested in the user request, the data visualization sub-model is used to select a visualization component according to the data format and the data content, and the visualization component is used to generate a visualization graph or chart of the data in the N-column table corresponding to the data report form to obtain the data report.

9. The method according to claim 1, characterized in that: After generating a data report of the target product according to the target data table, the method further includes: Acquire transaction data of the target product in real time; Calculating a fluctuation threshold of the transaction data using the real-time change trend of the transaction data; calculating an update frequency of the data report using the fluctuation threshold; The data report is updated according to the update frequency.

10. A data report generating device, characterized in that: include: A first acquisition module is used to acquire N data reports within a target time period, wherein the N data reports are tables that record transaction data of a target product based on N recording angles, and N is a natural number greater than 1; A first processing module is used to perform data processing operations on the N data reports to obtain a target data table, wherein the data processing operations sequentially include: data integration operations, data verification operations, data cleaning operations, and data format conversion operations; The first generating module is used to generate a data report of the target product according to the target data table, wherein the data report is used to indicate the change of transaction risk of the target product within the target time period.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 9 when executed by a processor.

12. An electronic 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 computer program, the steps of the method described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Data report generation method and device, electronic equipment and storage medium

    CN114818635A

  • Custom report generation method and custom report generation device

    CN114996268A

  • Method and device for generating interpretation report, computer equipment and storage medium

    CN117521623A

  • Data processing method and device based on domain model

    CN118093731A

  • Intelligent data report analysis system and method

    CN118861034A

Cited By

  • Cluster state evaluation method, storage medium, electronic equipment and program product

    CN120763006A

  • Cluster state evaluation method, storage medium, electronic device, and program product

    CN120763006B