Transaction data processing method and device, equipment, medium and program product
By obtaining the time window and associated objects configured by the user, dynamically query transaction data and generate multi-dimensional data, it solves the problems of fixed query time span and high number of database queries in the existing technology, and achieves flexible data processing and efficient data export.
Patent Information
- Application Number
- CN202411528492.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-21
AI Technical Summary
When handling internal transaction limits and data export, the query time span is fixed, lacks flexibility, and the database query times are large and the effective data volume is small, making it difficult to meet the diverse data export needs.
By responding to the target user's processing request, obtain the configuration time window and associated objects in the configuration parameters, and query the usage quota and transaction limit of different transaction types within the time window. Divide the time window into preset periods, generate multi-dimensional data, and dynamically supplement the variable information of the preset limit template based on these data to generate transaction data processing results.
It realizes the flexible adjustment of query time granularity according to configuration parameters, reduces the number of database queries, improves query efficiency, and improves the flexibility and efficiency of data export by dynamically adjusting the number of template rows and columns.
Smart Images

Figure CN119336807A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data or cloud computing, and more specifically to a method, device, equipment, medium and program product for processing transaction data. Background Art
[0002] With the increasing frequency of trading activities, standardizing transactions and risk prevention and control have become particularly important. The setting of internal transaction limits and data export monitoring have become key. However, the current method for processing internal transaction limits mainly obtains the used amount of related transactions by transaction type and month by year, then queries the sum of transaction limits of transaction types in all years, and then obtains the limit amount of each transaction category in the year and writes it into a fixed position in the template. At the same time, it is also necessary to record the transaction type with the used amount of related transactions, fill in 12 months into the template, and finally match the transaction records according to the existing transaction types in the template. Therefore, the query time span is fixed and lacks flexibility. At the same time, the number of database queries is large and the amount of valid data is small, and the template writing method is fixed, which makes it difficult to meet the diverse data export needs. Summary of the invention
[0003] In view of the above problems, embodiments of the present disclosure provide a method, apparatus, device, medium and program product for processing transaction data.
[0004] According to a first aspect of the present disclosure, a method for processing transaction data is provided, the method comprising: in response to a target user's request for processing transaction data, obtaining configuration parameters input by the target user; based on a configuration time window and associated objects in the configuration parameters, querying usage amounts and transaction limits of different transaction types within the configuration time window; dividing the configuration time window into preset periods, and generating first multidimensional data according to the transaction type, the preset period and the usage amount, and generating second multidimensional data according to the transaction type, the preset period and the transaction limit; based on the first multidimensional data and the second multidimensional data, completing variable information of a preset limit template to generate a processing result of the transaction data.
[0005] According to an embodiment of the present disclosure, the method also includes: determining whether the associated object is a positive integer greater than or equal to 2; the querying of the usage amount of different transaction types within the configured time window based on the configured time window and the associated object in the configuration parameters includes: when the associated object is a positive integer greater than or equal to 2, summarizing the usage amount of all the associated objects in different transaction types to obtain the summarized usage amount within the time window.
[0006] According to an embodiment of the present disclosure, generating the first multidimensional data according to the transaction type, the preset period and the usage amount, and generating the second multidimensional data according to the transaction type, the preset period and the transaction limit include: traversing the transaction data; based on the transaction data, mapping the transaction type, the preset period and the usage amount to a first nested structure, and constructing the first multidimensional data, wherein the key of the first nested structure is a combination of the transaction type and the preset period, and the value of the first nested structure is the usage amount; based on the transaction data, mapping the transaction type, the preset period and the transaction limit to a second nested structure, and constructing the second multidimensional data, wherein the key of the second nested structure is a combination of the transaction type and the preset period, and the value of the second nested structure is the transaction limit.
[0007] According to an embodiment of the present disclosure, the method further includes: dynamically writing the preset period into the preset limit template based on the configured time window.
[0008] According to an embodiment of the present disclosure, the variable information of the preset limit template is supplemented based on the first multidimensional data and the second multidimensional data to generate the processing result of the transaction data, including: checking whether the first multidimensional data and the second multidimensional data are empty; when the first multidimensional data and the second multidimensional data are not empty, replacing the variable information in the preset limit template with a specific value based on the first multidimensional data and the second multidimensional data; based on the replaced preset limit template, generating and exporting the processing result of the transaction data.
[0009] According to an embodiment of the present disclosure, the querying of transaction limits of different transaction types within the configured time window based on the configured time window and associated objects in the configuration parameters includes: identifying and acquiring all relevant transaction data within the configured time window based on the associated objects; for each transaction type of the transaction data, intercepting a preset time period of the configured time window, the preset time period being used to characterize the time range for querying the transaction limit; and acquiring the transaction limits aggregated for each of the transaction types within the intercepted preset time period.
[0010] According to an embodiment of the present disclosure, the method further includes: verifying the legality of the configuration parameters; and terminating the processing of the transaction data when the configuration parameters are illegal.
[0011] The second aspect of the present disclosure provides a transaction data processing device, the device comprising: an acquisition module, used to respond to a target user's request for processing transaction data and acquire configuration parameters input by the target user; a query module, used to query the usage amount and transaction limit of different transaction types within the configuration time window based on the configuration time window and associated objects in the configuration parameters; a generation module, used to divide the configuration time window into a preset period, and generate first multidimensional data according to the transaction type, the preset period and the usage amount, and generate second multidimensional data according to the transaction type, the preset period and the transaction limit; a writing module, used to complete the variable information of the preset limit template based on the first multidimensional data and the second multidimensional data to generate a processing result of the transaction data.
[0012] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0013] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0014] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0015] According to the transaction data processing method, device, equipment, medium and program product provided by the embodiments of the present disclosure, the original fixed-time query mode is changed to be determined by configuration parameters, thereby improving the granularity of the data. At the same time, all data can be found at one time, reducing the number of database accesses and improving query efficiency. In addition, the number of rows and columns of the preset limit template is determined by the data obtained from the query, which improves flexibility and can meet diverse data export requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 A diagram schematically illustrates an application scenario of a transaction data processing method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0018] Figure 2 A flowchart schematically shows a method for processing transaction data according to an embodiment of the present disclosure;
[0019] Figure 3 Another flow chart schematically shows a method for processing transaction data according to an embodiment of the present disclosure;
[0020] Figure 4 A block diagram schematically shows a structure of a device for processing transaction data according to an embodiment of the present disclosure; and
[0021] Figure 5 A block diagram of an electronic device suitable for implementing a method for processing transaction data according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0023] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0024] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0025] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0026] It should be noted that the transaction data processing method and device disclosed in the present invention can be used in the financial field, the big data field or the cloud computing field, and can also be used in any field other than the financial field. The application field of the transaction data processing method and device disclosed in the present invention is not limited.
[0027] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0028] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0030] Embodiments of the present disclosure provide a transaction data processing method, apparatus, device, medium, and program product.
[0031] Figure 1 The application scenario diagram of the transaction data processing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0032] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0033] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0034] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0035] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0036] It should be noted that the transaction data processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the transaction data processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The transaction data processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the transaction data processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0037] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0038] The following will be based on Figure 1 The scene described by Figures 2 to 3 The method for processing transaction data in an embodiment of the present disclosure is described in detail.
[0039] The inventor has found through research that in the relevant technology, the data export method of the internal transaction limit of related-party transactions mainly involves technical fields such as data management, financial analysis and risk management. In terms of data management, it is necessary to efficiently collect, organize and store a large amount of related-party transaction data. In the field of financial analysis, various analysis tools and methods are used to deeply mine these data to determine reasonable transaction limits. In the field of risk management, the monitoring and evaluation of limit data are used to ensure that enterprises conduct related-party transactions within a safe range. The main disadvantages of the existing internal transaction limit export method for related-party transactions are: the query time span is fixed, that is, the time span of the query data is only to the year level, which means that it is impossible to query data according to smaller granularity, such as quarter, month or even day. This limitation hinders the deeper and more accurate mining and analysis of data, and cannot meet the business analysis needs with higher requirements for data timeliness and granularity. In addition, the number of database queries is large and the amount of valid data is small, that is, when obtaining the sum of the used quotas of different transaction types and months and the transaction limits of the year, the database is frequently accessed through loop statements to query the sum of the annual limits of transaction types with internal transaction limits. Each query to the database takes a certain amount of time. Performing multiple queries will cause the overall data acquisition process to become extremely slow. It may even cause the database to crash or freeze, seriously affecting business continuity. At the same time, only the related transaction limits between institutions within the company can be obtained, and the overall situation cannot be obtained. In addition, the method of writing the queried data into the template is relatively fixed and lacks flexibility. When it is necessary to add new information or adjust the presentation order of information, it may be limited by the writing method, and it is necessary to modify the template and the code at the same time to achieve it. Therefore, in response to the above problems, the embodiments of the present disclosure provide a method for processing transaction data.
[0040] Figure 2 The flowchart of the method for processing transaction data according to an embodiment of the present disclosure is schematically shown.
[0041] like Figure 2 As shown, the transaction data processing method of this embodiment includes operations S210 to S240.
[0042] In operation S210, in response to a target user's request for processing transaction data, configuration parameters input by the target user are obtained.
[0043] In an embodiment of the present disclosure, before obtaining the configuration parameters input by the target user, the user's consent or authorization may be obtained. For example, before operation S210, a request to obtain the configuration parameters input by the target user may be issued to the user. When the user agrees or authorizes that the configuration parameters input by the target user may be obtained, operation S210 is performed.
[0044] In operation S220, based on the configuration time window and the associated objects in the configuration parameters, the usage quotas and transaction limits of different transaction types within the configuration time window are queried.
[0045] In operation S230, the configuration time window is divided into preset periods, and first multidimensional data is generated according to the transaction type, the preset period and the usage amount, and second multidimensional data is generated according to the transaction type, the preset period and the transaction limit.
[0046] In operation S240, variable information of a preset limit template is completed based on the first multi-dimensional data and the second multi-dimensional data to generate a processing result of the transaction data.
[0047] In an embodiment of the present disclosure, a corresponding operation portal may be provided for the user to choose to agree or reject the automated decision result. That is, before the first multidimensional data and the second multidimensional data (in this embodiment, the multidimensional data may be three-dimensional data) are written into the preset limit template and processed / decision-making is performed, an instruction of the user to agree or reject the processing / decision-making input through the corresponding operation portal may be obtained. If the user agrees to process / decision-making, the first multidimensional data and the second multidimensional data are written into the preset limit template and processed / decision-making is performed, that is, step S240 is executed. If the user refuses to process / decision-making, the expert decision-making process is entered.
[0048] The target user may be an enterprise, a financial institution or an individual customer. When the target user makes a request to process the transaction data, the system receives the request and may provide a user interface or API interface so that the user can enter a series of configuration parameters according to actual needs. Configuration parameters include but are not limited to configuration time windows (such as the past month, a quarter or any time period defined by the user), associated objects (such as specific institutions, specific accounts or user groups, etc.). Then, based on the configuration time window and associated objects provided by the user, the usage quota (i.e., the actual transaction amount) and the preset transaction limit (i.e., the maximum allowed amount of the transaction) of different transaction types (such as transfer, payment, recharge or withdrawal, etc.) within the specified time window can be queried in the backend database or data warehouse. In this process, the queried transaction limit and usage quota are all based on the date range (i.e., the configuration time window) to the specific transaction data and limit data of the day. At the same time, the internal transaction limit and transaction usage quota of each transaction type can be written into the preset limit template according to the input date range. Then, the configuration time window is subdivided into smaller preset periods (such as daily, weekly, monthly, etc.). Based on the transaction type, preset period, and the queried usage amount, the first set of multidimensional data can be generated; similarly, based on the transaction type, preset period, and transaction limit, the second set of multidimensional data can be generated. Based on these two sets of multidimensional data, the variable information of the limit template is supplemented and written. During the writing process, only the date range entered by the target user is involved, and the presentation order of the information can be flexibly adjusted or new information can be added. Finally, the template content can be exported directly, or a series of processing steps can be performed on the data, such as data cleaning, aggregation, and comparative analysis, to generate the final transaction data processing results, such as analysis reports or early warning information.
[0049] For example, the finance department of a certain enterprise makes a request to query the associated transaction data. After the system receives the request, the finance department enters the configuration parameters through the user interface, including the configuration time window (such as the past year), the associated object (such as the enterprise finance department), and the transaction type to be queried (such as the sale of goods and the provision of services). According to the configuration parameters, the system queries the usage quota and transaction limit of different transaction types that occurred in the enterprise finance department within the specified time window in the background database. Then, the configuration time window is divided into smaller preset periods, such as monthly, and the first multidimensional data of transaction type-month-usage quota is generated according to the configuration time window and quota usage data, and the second multidimensional data of transaction type-month-transaction limit is generated according to the configuration time window and limit data. Then, based on the first multidimensional data and the second multidimensional data, the variable information in the template is written to generate the query results of the transaction data.
[0050] It can be understood that the embodiments of the present disclosure provide a method for processing transaction data with high time granularity and high efficiency. Specifically, by introducing configuration parameters to determine the date range of the query, compared with the original fixed time query method, flexible adjustment of time granularity is achieved, making the query results more accurate and in line with actual needs. At the same time, the original method of querying the usage of the quota in the database in a circular manner is optimized to query all data at one time, which significantly reduces the number of database accesses and improves query efficiency. In addition, the number of columns of the generated preset limit template is determined by the input configuration time window (date range), and the number of rows is determined by the number of transaction types queried, that is, the original fixed row and column template is changed to the number of rows and columns dynamically determined by the data obtained from the query. Compared with the original fixed number of rows and columns, the optimized export file structure is more streamlined, avoids unnecessary redundant information, and improves the flexibility and efficiency of export.
[0051] In an embodiment of the present disclosure, the method further includes: verifying the legality of the configuration parameters; and terminating the processing of the transaction data when the configuration parameters are illegal.
[0052] For the configuration parameters input by the target user, the legality of the parameters can be verified. For example, check whether the user has selected the configuration time window (date range), that is, the start date and the end date. If no date is selected, the system will regard it as invalid input and terminate the processing flow. In addition, verify whether the format of the input date is correct. The system can support standard date formats (such as YYYY-MM-DD) and reject any input that does not conform to this format. At the same time, check the rationality of the start date and the end date to ensure that the start date is earlier than or equal to the end date to avoid logical errors in the time sequence. In addition, it can be checked whether the user has selected a specific associated object (such as an institution or company). In some cases, the user may need to process the transaction data of a specific object. If no specific object is selected and the processing flow depends on the information of the associated object, the system will regard it as invalid input. When performing the above verification, if any illegal or unexpected configuration parameters are found, the system can immediately terminate the processing of the transaction data and return the corresponding error message or prompt to the user.
[0053] It can be understood that by verifying the legitimacy of the configuration parameters, not only can data processing failures due to parameter errors be avoided, but the stability of the system and user experience can also be improved.
[0054] In an embodiment of the present disclosure, the method also includes: determining whether the associated object is a positive integer greater than or equal to 2; based on the configuration time window and the associated object in the configuration parameters, querying the usage amount of different transaction types within the configuration time window includes: when the associated object is a positive integer greater than or equal to 2, summarizing the usage amount of all the associated objects in different transaction types to obtain the summarized usage amount within the time window.
[0055] When obtaining the transaction usage quotas of different transaction types, the associated object is a key parameter that determines the logic of subsequent queries and summaries. Specifically, if the associated object is not a positive integer greater than or equal to 2, that is, if the associated object is a specific object, the usage quotas of different transaction types of the object can be obtained normally. If the associated object meets the conditions (that is, a positive integer greater than or equal to 2), it is necessary to summarize the usage quotas of multiple associated objects in different transaction types to obtain the total usage quotas of different transaction types for all objects within a specific time window. For example, when the associated object is multiple branches, calculate the usage quotas of each branch for each transaction type separately, and then summarize them to obtain the total usage quota of each transaction type.
[0056] It is understandable that by clarifying the judgment criteria for associated objects, refining the query logic and optimizing the presentation of query results, we can more accurately understand the usage of different transaction types on different associated objects (such as institutions), thereby ensuring the integrity and accuracy of the data.
[0057] On the basis of the above embodiments, in this embodiment, the querying of transaction limits of different transaction types within the configuration time window based on the configuration time window and associated objects in the configuration parameters includes: identifying and acquiring all relevant transaction data within the configuration time window according to the associated objects; for each transaction type of the transaction data, intercepting a preset time period of the configuration time window, the preset time period being used to represent the time range for querying the transaction limit; and acquiring the transaction limits aggregated for each of the transaction types within the intercepted preset time period.
[0058] When querying transaction limits, you can intercept the limits of different transaction types in a preset time period (such as month, year) according to the configured time window, and specify one or more such time periods for querying according to needs to obtain the aggregated limit, that is, the transaction amount used by the associated objects, whether individually or in aggregate, which does not exceed the limit of the corresponding transaction type.
[0059] For example, when the configured time window is from 2023 to 2024, the system queries all relevant transaction data based on the associated objects. Then, for each transaction type of the transaction data, the preset time period specified by the user (such as each year) can be intercepted according to the date range, that is, 2023 and 2024. Within the intercepted preset time period, based on the queried transaction limit in the configured time window, the annual limit of each transaction type is calculated to obtain the transaction limit of different transaction types of the company's affiliated institutions in the entire year.
[0060] It should be noted that for details not included in this embodiment, please refer to the implementation details of the aforementioned embodiment.
[0061] It is understandable that by intercepting the preset time period within the configured time window, it is possible to customize the time range and analyze transaction data that has a direct impact on the transaction limit within the time range, thereby not only further improving the flexibility of data processing, but also being able to accurately adapt to various complex and changing business needs.
[0062] In an embodiment of the present disclosure, the method further includes: dynamically writing the preset period into the preset limit template based on the configured time window.
[0063] According to the configured time window, the preset period (such as month, quarter, etc.) information is dynamically written into the preset limit template, avoiding the previous situation of fixedly writing 12 months into the template. Instead, the information is dynamically determined and filled in according to the actual date range.
[0064] In some exemplary embodiments, the target user can input a date range specific to the day according to actual needs, and the system can automatically identify and extract the month information in the date range, and then accurately write it into the corresponding position in the preset limit template.
[0065] It should be noted that although the date range entered by the target user can be specific to the day, that is, when querying the limit and quota usage, it is based on the transaction data and limit data specific to the day. That is, the user can query the transaction limit and usage quota within any date range according to actual needs. However, when writing the template, it can be dynamically configured according to the preset period, such as accurate to the month.
[0066] It is understandable that traditional limit templates often contain fixed time periods (such as a fixed 12 months), which limits the applicability of the template in different business scenarios. The embodiments of the present disclosure dynamically write preset period information into the preset limit template, which can flexibly adjust the template content according to the configuration time window actually set by the user, thereby adapting to various complex business needs and simplifying the data processing process.
[0067] On the basis of the above embodiments, in this embodiment, the generation of first multidimensional data according to the transaction type, the preset period and the usage amount, and the generation of second multidimensional data according to the transaction type, the preset period and the transaction limit include: traversing the transaction data; based on the transaction data, mapping the transaction type, the preset period and the usage amount to a first nested structure, and constructing the first multidimensional data, wherein the key of the first nested structure is a combination of the transaction type and the preset period, and the value of the first nested structure is the usage amount; based on the transaction data, mapping the transaction type, the preset period and the transaction limit to a second nested structure, and constructing the second multidimensional data, wherein the key of the second nested structure is a combination of the transaction type and the preset period, and the value of the second nested structure is the transaction limit.
[0068] In some exemplary embodiments, the nested structure may be a nested Map structure. During the traversal process, for each combination of transaction type and preset period, if the key of the preset period does not yet exist in the inner Map, it is created and the usage limit is initialized to the value of the current record; if it already exists, the usage limit of the current record is added to the existing value.
[0069] Based on the usage of the acquired transaction quota, the transaction type-preset period-usage quota is generated in combination with the date data. The first three-dimensional data (i.e. multidimensional data) here can be represented as Map <String,Map<String,String> >, the three strings represent the transaction type, preset period, and the used amount of each type of associated transaction. After generating the three-dimensional data, when writing the preset limit template, the time complexity changes from the original O(n*m) (n represents the number of preset periods, generally 12, and m represents the number of transaction types) to O(j) (j represents the number of used amount data, j≤n*m). Under normal circumstances, O(j) will be much smaller than O(n*m), because not every transaction type of a specific associated object can have a corresponding transaction every month.
[0070] Based on the acquired transaction limit, the second three-dimensional data of transaction type-preset period-transaction limit is generated in combination with date data. The three-dimensional data here is Map in the code <String,Map<String,String> >, the three strings represent the transaction type, preset period and transaction limit of each type of related transaction. The time complexity analysis is consistent with the above, which is O(j) (j represents the number of transaction limit data entered).
[0071] It should be noted that since the limit may be pre-set and may not change every month, during the traversal process, for months that have not changed or are not explicitly set, you can choose not to add new key-value pairs, or use default values based on business rules.
[0072] It is understandable that the use of nested structures enables structured storage of data, making the data clearer, easier to understand and analyze. At the same time, the process of traversing transaction data and building a multidimensional data structure can be automated, thereby reducing the time and labor costs of manual data processing and improving data processing efficiency.
[0073] On the basis of the above embodiments, in this embodiment, the variable information of the preset limit template is supplemented based on the first multidimensional data and the second multidimensional data to generate the processing result of the transaction data, including: checking whether the first multidimensional data and the second multidimensional data are empty; when the first multidimensional data and the second multidimensional data are not empty, based on the first multidimensional data and the second multidimensional data, replacing the variable information in the preset limit template with a specific value; based on the replaced preset limit template, generating and exporting the processing result of the transaction data.
[0074] Before completing the variable information of the preset limit template based on the first multidimensional data and the second multidimensional data, the integrity check of the first multidimensional data and the second multidimensional data can be performed to determine whether each dimension has been correctly filled and there are no missing values or abnormal values. If the check finds that the multidimensional data is empty or incomplete, the processing flow is immediately terminated and an error message is returned to prompt the user to check and supplement the relevant data. If it is not empty, the specific values in the transaction usage limit data and the transaction limit data are matched and replaced with the variable placeholders in the preset limit template to generate a customized report or processing result containing the actual transaction limit and usage limit. Finally, the processing results can be exported to a specified location or sent to a specified recipient.
[0075] Figure 3 Another flow chart of the method for processing transaction data according to an embodiment of the present disclosure is schematically shown.
[0076] In some exemplary embodiments, Figure 3As shown, first, the processing request for transaction data from the target user is received, and the legality of the obtained configuration parameters is verified. When the configuration parameters are legal, the usage quota data of the associated object (such as a specific institution or aggregating institution) is obtained according to the configured time window (i.e., date range), and the transaction limits of different transaction types are obtained according to the preset time period (such as year). Then, according to the configured time window, the preset cycle (month) information can be dynamically written into the preset limit template, and then the first three-dimensional data is generated according to the transaction type-month-usage quota, and at the same time, the second three-dimensional data is generated according to the transaction type-month-transaction limit. Furthermore, it can be determined whether the three-dimensional data is empty. If it is not empty, the corresponding position of the preset limit template is written according to the three-dimensional data to obtain the final transaction data processing result.
[0077] It can be understood that by determining whether the multidimensional data is empty, processing errors caused by missing or abnormal data are avoided, ensuring the accuracy and reliability of the processing results.
[0078] Based on the above transaction data processing method, the present disclosure also provides a transaction data processing device. Figure 4 The device is described in detail.
[0079] Figure 4 The structural block diagram of the transaction data processing device according to the embodiment of the present disclosure is schematically shown.
[0080] like Figure 4 As shown, the transaction data processing device 400 of this embodiment includes an acquisition module 410 , a query module 420 , a generation module 430 and a writing module 440 .
[0081] The acquisition module 410 is used to respond to the target user's request for processing transaction data and acquire the configuration parameters input by the target user. In one embodiment, the acquisition module 410 can be used to perform the operation S210 described above, which will not be described in detail here.
[0082] The query module 420 is used to query the usage amount and transaction limit of different transaction types within the configured time window based on the configured time window and the associated objects in the configuration parameters. In one embodiment, the query module 420 can be used to perform the operation S220 described above, which will not be repeated here.
[0083] The generation module 430 is used to divide the configuration time window into preset periods, and generate first multidimensional data according to the transaction type, the preset period and the usage amount, and generate second multidimensional data according to the transaction type, the preset period and the transaction limit. In one embodiment, the generation module 430 can be used to perform the operation S230 described above, which will not be repeated here.
[0084] The writing module 440 is used to complete the variable information of the preset limit template based on the first multidimensional data and the second multidimensional data to generate the processing result of the transaction data. In one embodiment, the writing module 440 can be used to perform the operation S240 described above, which will not be repeated here.
[0085] According to an embodiment of the present disclosure, the query module 420 is specifically used to: determine whether the associated object is a positive integer greater than or equal to 2; when the associated object is a positive integer greater than or equal to 2, summarize the usage amounts of all the associated objects in different transaction types to obtain the summarized usage amounts within the time window.
[0086] According to an embodiment of the present disclosure, the generation module 430 is specifically used to: traverse the transaction data; based on the transaction data, map the transaction type, the preset period and the usage amount to a first nested structure to construct the first multidimensional data, wherein the key of the first nested structure is a combination of the transaction type and the preset period, and the value of the first nested structure is the usage amount; based on the transaction data, map the transaction type, the preset period and the transaction limit to a second nested structure to construct the second multidimensional data, wherein the key of the second nested structure is a combination of the transaction type and the preset period, and the value of the second nested structure is the transaction limit.
[0087] According to an embodiment of the present disclosure, the writing module 440 may also be used to: dynamically write the preset period into the preset limit template based on the configured time window.
[0088] According to an embodiment of the present disclosure, the writing module 440 is specifically used to: check whether the first multidimensional data and the second multidimensional data are empty; when the first multidimensional data and the second multidimensional data are not empty, based on the first multidimensional data and the second multidimensional data, replace the variable information in the preset limit template with a specific value; based on the replaced preset limit template, generate and export the processing result of the transaction data.
[0089] According to an embodiment of the present disclosure, the query module 420 is specifically used to: identify and obtain all transaction data related to the configured time window based on the associated objects; for each transaction type of the transaction data, intercept a preset time period of the configured time window, and the preset time period is used to represent the time range for querying the transaction limit; within the intercepted preset time period, obtain the transaction limit summarized for each transaction type.
[0090] According to an embodiment of the present disclosure, the acquisition module 410 may also be used to: verify the legality of the configuration parameters; and terminate the processing of the transaction data when the configuration parameters are illegal.
[0091] According to an embodiment of the present disclosure, any multiple modules of the acquisition module 410, the query module 420, the generation module 430 and the writing module 440 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 410, the query module 420, the generation module 430 and the writing module 440 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 410, the query module 420, the generation module 430 and the writing module 440 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0092] Figure 5 A block diagram schematically shows an electronic device for a method for processing transaction data according to an embodiment of the present disclosure.
[0093] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0094] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.
[0095] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the I / O interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.
[0096] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0097] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0098] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the transaction data processing method provided by the embodiment of the present disclosure.
[0099] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 501. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0100] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0101] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0102] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0103] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0104] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0105] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for processing transaction data, characterized in that: The method comprises: In response to a target user's request for processing transaction data, obtaining configuration parameters input by the target user; Based on the configuration time window and the associated objects in the configuration parameters, query the usage quota and transaction limit of different transaction types within the configuration time window; Dividing the configured time window into preset periods, and generating first multidimensional data according to the transaction type, the preset period and the usage amount, and generating second multidimensional data according to the transaction type, the preset period and the transaction limit; Based on the first multidimensional data and the second multidimensional data, the variable information of the preset limit template is completed to generate a processing result of the transaction data.
2. The method according to claim 1, characterized in that The method further comprises: Determine whether the associated object is a positive integer greater than or equal to 2; The querying of usage quotas of different transaction types within the configuration time window based on the configuration time window and the associated objects in the configuration parameters includes: When the associated object is a positive integer greater than or equal to 2, the usage quotas of all the associated objects in different transaction types are aggregated to obtain the aggregated usage quotas within the time window.
3. The method according to claim 1, characterized in that The generating of first multidimensional data according to the transaction type, the preset period and the usage amount, and the generating of second multidimensional data according to the transaction type, the preset period and the transaction limit include: Traversing the transaction data; Based on the transaction data, the transaction type, the preset period, and the usage quota are mapped to a first nested structure to construct the first multidimensional data, wherein a key of the first nested structure is a combination of the transaction type and the preset period, and a value of the first nested structure is the usage quota; Based on the transaction data, the transaction type, the preset period and the transaction limit are mapped to a second nested structure to construct the second multidimensional data, wherein the key of the second nested structure is a combination of the transaction type and the preset period, and the value of the second nested structure is the transaction limit.
4. The method according to claim 1, characterized in that: The method further comprises: Based on the configured time window, the preset period is dynamically written into the preset limit template.
5. The method according to claim 1, characterized in that The processing result of supplementing the variable information of the preset limit template based on the first multi-dimensional data and the second multi-dimensional data to generate the transaction data includes: Check whether the first multi-dimensional data and the second multi-dimensional data are empty; When the first multi-dimensional data and the second multi-dimensional data are not empty, based on the first multi-dimensional data and the second multi-dimensional data, the variable information in the preset limit template is replaced with a specific value; Based on the replaced preset limit template, the processing result of the transaction data is generated and exported.
6. The method according to claim 1, characterized in that The querying of transaction limits of different transaction types within the configured time window based on the configured time window and the associated objects in the configuration parameters includes: According to the associated object, identifying and acquiring all transaction data related to the configured time window; For each transaction type of the transaction data, intercepting a preset time period of the configured time window, the preset time period being used to represent a time range for querying the transaction limit; Within the intercepted preset time period, the transaction limit summarized for each of the transaction types is obtained.
7. The method according to claim 1, characterized in that The method further comprises: Verify the legitimacy of the configuration parameters; When the configuration parameters are illegal, the processing of the transaction data is terminated.
8. A transaction data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire configuration parameters input by a target user in response to a request by the target user for processing transaction data; A query module, used to query the usage quota and transaction limit of different transaction types within the configured time window based on the configured time window and the associated objects in the configuration parameters; A generating module, configured to divide the configured time window into preset periods, and generate first multidimensional data according to the transaction type, the preset period and the usage amount, and generate second multidimensional data according to the transaction type, the preset period and the transaction limit; A writing module is used to complete the variable information of the preset limit template based on the first multidimensional data and the second multidimensional data to generate a processing result of the transaction data.
9. An electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, It is characterized in that when the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor executes the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.