CN110321364B - Transaction data query method, device and terminal of credit card management system - Google Patents

Transaction data query method, device and terminal of credit card management system Download PDF

Info

Publication number
CN110321364B
CN110321364B CN201910441417.4A CN201910441417A CN110321364B CN 110321364 B CN110321364 B CN 110321364B CN 201910441417 A CN201910441417 A CN 201910441417A CN 110321364 B CN110321364 B CN 110321364B
Authority
CN
China
Prior art keywords
transaction data
data
cache
transaction
service system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910441417.4A
Other languages
Chinese (zh)
Other versions
CN110321364A (en
Inventor
邹延鑫
徐丽萍
安娜娜
包六十三
徐晶
姚伏霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN201910441417.4A priority Critical patent/CN110321364B/en
Publication of CN110321364A publication Critical patent/CN110321364A/en
Application granted granted Critical
Publication of CN110321364B publication Critical patent/CN110321364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of transaction data query, and provides a transaction data query method, device and terminal of a credit card management system. The transaction data query method comprises the following steps: transaction data generated by each client are obtained in real time through a data server, first transaction data with history inquiry frequency larger than a preset value are screened out from the transaction data, and the first transaction data are backed up to a cache of a service system; screening first transaction data of transaction time before a preset transaction time node from a cache of a service system, and backing up the first transaction data into a database; and responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client. The invention realizes the transfer of part of transaction data inquiry work to the service system for processing, so as to reduce the load of the data server and avoid the excessive consumption of the data server resources to influence the processing of other tasks.

Description

Transaction data query method, device and terminal of credit card management system
Technical Field
The present invention relates to the field of transaction data query technologies, and in particular, to a transaction data query method, device, terminal, and storage medium for a credit card management system.
Background
Currently, most large business fields (such as banks, telecommunications, etc.) internationally use mainframe parallel coupling systems to run their core business systems. Transaction data queries of credit card management systems are typically involved in the use of mainframes. To improve data storage and retrieval efficiency, many companies utilize databases to store transaction data, such as some transaction platform setup databases, for recording each transaction of a merchant in real time. However, as stored data increases dramatically, the amount of data stored in many databases is very large.
Therefore, when a data server built on a mainframe is used for processing a transaction data inquiry request, the data server is required to consume a large amount of resources to find target data from huge data. In addition, when a large number of users query data at the same time, the data server needs to process transaction data query requests of each user, which also causes the data server to have overhigh load and overlarge resource consumption, and affects the processing of other tasks.
Disclosure of Invention
The invention provides a transaction data query method, a device, a terminal and a storage medium of a credit card management system, which are used for solving the problems that when a current data server processes transaction data query, the load is too high, the resource consumption is too high, and the processing of other tasks is affected.
In order to solve the problems, the invention adopts the following technical scheme:
the invention provides a transaction data query method of a credit card management system, which comprises the following steps:
transaction data generated by each client are obtained in real time through a data server, first transaction data with history inquiry frequency larger than a preset value are screened out from the transaction data, and the first transaction data are backed up to a cache of a service system; the service system comprises a database and a cache;
screening first transaction data of transaction time before a preset transaction time node from a cache of the service system, backing up the first transaction data to a database, and periodically clearing the first transaction data backed up to the database in the cache;
and responding to a transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client.
In one embodiment, the step of obtaining the target transaction data from the cache, the data server or the database according to the preset condition includes:
calculating the current CPU utilization rate of the data server; wherein the CPU utilization of the data server is an average CPU utilization of the data server in a predetermined period;
and when the CPU utilization rate of the data server is lower than a preset value, acquiring the target transaction data from the data server.
In one embodiment, after calculating the current CPU utilization of the data server, the method further includes:
when the CPU utilization rate of the data server is higher than a preset value, extracting the transaction time of target transaction data to be acquired from the transaction data inquiry request;
and acquiring target transaction data from a cache or a database according to the transaction time.
In one embodiment, the step of obtaining the target transaction data from the cache or the database according to the transaction time includes:
when the transaction time is in front of a preset transaction time node, acquiring the target transaction data from the database;
otherwise, the target transaction data is obtained from the cache of the service system.
In one embodiment, the step of backing up the first transaction data to the cache of the service system includes:
acquiring a data type of first transaction data;
inquiring a target service system corresponding to the data type from a pre-configured list according to the data type;
and backing up the first transaction data into a cache of the target service system.
In one embodiment, the step of backing up the first transaction data in the cache of the target service system includes:
periodically monitoring the operation state of the data server;
when the data server is monitored to be in an idle state, backing up the first transaction data into a cache of a target service system;
when the data server is monitored to enter a busy state from an idle state in the process of backing up the first transaction data to the cache of the target service system, recording a backup breakpoint of the current backing up the first transaction data to the cache of the target service system;
and when the data server is monitored to be in the idle state again, continuing to backup the first transaction data to the cache of the target service system from the backup breakpoint.
In an embodiment, before the backing up the first transaction data to the cache of the service system, the method further includes:
establishing a transmission network taking a data server as a center;
accessing each service system to a network node of the transmission network nearby; wherein the number of service systems accessed by each network node is less than a predetermined threshold.
The invention provides a transaction data inquiry device of credit card management system, comprising:
the backup module is used for acquiring transaction data generated by each client in real time through the data server, screening first transaction data with history inquiry frequency larger than a preset value from the transaction data, and backing up the first transaction data to a cache of the service system; the service system comprises a database and a cache;
the clearing module is used for screening first transaction data of which the transaction time is before a preset transaction time node from a cache of the service system, backing up the first transaction data to a database, and regularly clearing the first transaction data backed up to the database in the cache;
the acquisition module is used for responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client.
The present invention provides a terminal comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the transaction data querying method of a credit card management system as defined in any one of the above.
The present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction data query method of a credit card management system as described in any one of the above.
Compared with the prior art, the technical scheme of the invention has at least the following advantages:
according to the transaction data query method of the credit card management system, transaction data generated by each client are obtained in real time through the data server, first transaction data with history query frequency larger than a preset value are screened out from the transaction data, and the first transaction data with higher query frequency are backed up to a cache of a service system; the service system comprises a database and a cache; then, first transaction data of transaction time before a preset transaction time node is screened out from a cache of the service system and backed up to a database, and the first transaction data backed up to the database in the cache is cleared periodically, so that the data storage and query efficiency is improved; when a client initiates a transaction data query request, responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client, so that part of transaction data query work is transferred to a service system, and the target transaction data is acquired through the cache or the database of the service system, so that the load of the data server is reduced, and the excessive consumption of resources of the data server and the influence on the processing of other tasks are avoided.
Drawings
FIG. 1 is a diagram of an environment for implementing a transaction data query method for a credit card management system according to one embodiment of the invention;
FIG. 2 is a flow chart of one embodiment of a transaction data query method of the credit card management system of the present invention;
FIG. 3 is a block diagram illustrating one embodiment of a transaction data query device of the credit card management system of the present invention;
fig. 4 is a block diagram illustrating an internal structure of a terminal according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present invention and in the foregoing figures, a plurality of operations appearing in a particular order are included, but it should be clearly understood that the operations may be performed in other than the order in which they appear herein or in parallel, the sequence numbers of the operations such as S11, S12, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by one of ordinary skill in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those of ordinary skill in the art that unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Fig. 1 is a diagram of an implementation environment of a transaction data query method of a credit card management system provided in one embodiment, as shown in fig. 1, in which a data server 100 and a service system 200 are included. The data server 100 is connected to the service system 200 through a network to transmit data, and the service system 200 includes a cache 2001 and a database 2002 connected to the cache 2001. The network may include the Internet, 2G/3G/4G, wifi, etc.
The data server 100 and the service system 200 may be independent physical servers or terminals, or may be a server cluster formed by a plurality of physical servers, and may be a cloud server providing basic cloud computing services such as a cloud server, a cloud database, a cloud storage, a CDN, and the like.
Referring to fig. 2, the transaction data query method of the credit card management system provided by the invention solves the problems that the load is too high, the resource consumption is too high, and the processing of other tasks is affected when the current data server processes the transaction data query of the credit card management system. In one embodiment, the method comprises the following steps:
s21, transaction data generated by each client are obtained in real time through a data server, first transaction data with history query frequency larger than a preset value are screened out from the transaction data, and the first transaction data are backed up to a cache of a service system; the service system comprises a database and a cache;
in this embodiment, the data server is connected to each client, and obtains transaction data generated by each client in real time. And screening the first transaction data with the history query frequency larger than the preset value from the transaction data, and backing up the first transaction data with the higher data query frequency into a cache of a service system, wherein the operation speed of the cache is much faster than that of a memory, so that the target transaction data can be quickly acquired in the follow-up query.
S22, screening first transaction data of transaction time before a preset transaction time node from a cache of the service system, backing up the first transaction data to a database, and periodically clearing the first transaction data backed up to the database in the cache;
in the embodiment, the first transaction data stored in the cache is filtered to obtain the first transaction data with transaction time before the preset transaction time node, the first transaction data is backed up to the database, and the first transaction data backed up to the database in the cache is cleared periodically, so that only the first transaction data generated by the client in a short period of time is reserved in the cache, and the influence of the full cache on the subsequent backup of the first transaction data is avoided. It should be noted that the preset transaction time node may be a transaction time node that is adjusted according to an actual application scenario and situation, which is not limited in this embodiment.
S23, responding to a transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client.
In this embodiment, when one or more clients initiate a transaction data query request, in response to the query request of each client, target transaction data is queried and acquired from a cache, a data server or a database according to a preset condition, and the acquired target transaction data is returned to the client, so that the transaction data query task is prevented from being centralized in the data server for processing, and other tasks are prevented from being processed by the data server. The preset condition can set an optimal acquisition mode of the target transaction data according to the type of the transaction data query request, for example, when the transaction data query request is urgent, the data server is considered to suspend processing of other tasks, and the transaction data query task is preferentially processed.
In order to better understand the technical scheme, the following specific description is made by taking bank transaction data query as an embodiment:
in one embodiment, the data server may download the first transaction data with higher query frequency generated by each bank client transaction to a cache of a service system (may include multiple servers), then screen the first transaction data with transaction time before a preset transaction time node, such as the first transaction data before one day, one week or one month, from the cache of the service system, and back up the first transaction data to a database of the service system. When a client initiates a transaction data query request, responding to the transaction data query request of the client, and judging whether the current service system downloads transaction data to a cache in batches or whether a data server backs up the transaction data in batches; when the data server downloads transaction data to the cache of the service system in batches, the target transaction data is queried from the cache or the database of the service system and is sent to the client, so that the transaction data query task proportion of the data server is not more than 10%, and 90% of transaction data query tasks are borne by the service system.
According to the transaction data query method of the credit card management system, transaction data generated by each client are obtained in real time through the data server, first transaction data with history query frequency larger than a preset value are screened out from the transaction data, and the first transaction data with higher query frequency are backed up to a cache of a service system; the service system comprises a database and a cache; then, first transaction data of transaction time before a preset transaction time node is screened out from a cache of the service system and backed up to a database, and the first transaction data backed up to the database in the cache is cleared periodically, so that the data storage and query efficiency is improved; when a client initiates a transaction data query request, responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client, so that part of transaction data query work is transferred to a service system, and the target transaction data is acquired through the cache or the database of the service system, so that the load of the data server is reduced, and the excessive consumption of resources of the data server and the influence on the processing of other tasks are avoided.
In one embodiment, in step S23, the step of obtaining the target transaction data from the cache, the data server or the database according to the preset condition may specifically include:
a1, calculating the current CPU utilization rate of the data server; wherein the CPU utilization of the data server is an average CPU utilization of the data server in a predetermined period;
in this embodiment, the usage rate of the CPU of the data server may be monitored in real time by the system monitoring tool. Since CPU usage may appear glitches at some point in time, it is not true that the data server is overloaded. In order to avoid misleading of these glitches, the judgment of the system monitoring tool needs to be based on an average of the CPU usage of the data server over a period of time, so the CPU usage of the data server is the average CPU usage of the data server over a predetermined period. For example, at a certain point in time Z, the average value of all sampling points between Z-1 minute and Z is calculated, and the current CPU utilization of the data server is calculated from this average value.
A2, when the CPU utilization rate of the data server is lower than a preset value, acquiring the target transaction data from the data server.
In this embodiment, after the CPU utilization rate of the data server is calculated, it is determined whether the CPU utilization rate is lower than a preset CPU utilization rate, if yes, it is indicated that the processing pressure of the current data server is smaller, and other tasks may be processed, so that the target transaction data may be queried and obtained from the data server, so as to improve the efficiency of obtaining the transaction data.
In one embodiment, after the calculating the current CPU usage of the data server in step A1, the method may further include:
a3, when the CPU utilization rate of the data server is higher than a preset value, extracting the transaction time of the target transaction data to be acquired from the transaction data inquiry request;
a4, acquiring target transaction data from a cache or a database according to the transaction time.
In this embodiment, when the CPU utilization rate of the data server is higher than the preset CPU utilization rate, the pressure of the data server may be high, resulting in slow operation of the data server, and at this time, the transaction data query task needs to be shunted to the service system for processing, the transaction time of the target transaction data to be obtained is extracted from the transaction data query request, and the target transaction data is obtained from the cache or the database of the service system according to the transaction time.
When the load of the data server is recovered to be normal, namely, the CPU utilization rate is lower than a preset value, part of tasks of transaction data inquiry can be automatically returned to the data server for processing. By the method, the requirement of short-time rapid growth of transaction data query requests can be met, resources of a data server are flexibly and effectively utilized, and the overall processing capacity of the system is improved. In the embodiment of the present invention, the preset CPU usage rate may be set to 40%, and the present invention is not limited thereto.
In one embodiment, in step A4, the step of obtaining the target transaction data from the cache or the database according to the transaction time may specifically include:
a41, acquiring the target transaction data from the database when the transaction time is in front of a preset transaction time node;
a42, otherwise, acquiring the target transaction data from the cache of the service system.
In this embodiment, since the transaction time is related to the frequency of the subsequent use of the data, for example, the longer the transaction data generation time is, the lower the frequency of the subsequent use will be, and the shorter the transaction data generation time is, the higher the frequency of the subsequent use will be. Therefore, the embodiment classifies the data according to the sequence of the transaction time, stores the data with the previous transaction time in the database, and stores the data with the subsequent transaction time in the cache. When the transaction time of the target transaction data to be acquired is before the preset transaction time node, the data of which the transaction time is before the preset transaction time node is backed up to the database in advance, so that the target transaction data needs to be acquired from the database. When the transaction time is after the preset transaction time node, the target transaction data can be directly obtained from the cache of the service system, and the data obtaining efficiency is improved.
In one embodiment, in step S21, the step of backing up the first transaction data to the cache of the service system may specifically include:
b1, acquiring a data type of first transaction data;
b2, inquiring a target service system corresponding to the data type from a pre-configured list according to the data type;
and B3, backing up the first transaction data to a cache of a target service system.
Each service system can handle different services, such as a service system handling account opening service, a service system of account selling service, a service system of starting service, a service system of stopping service, and the like. In this embodiment, in the process of backing up the first transaction data to the cache of the service system, the data may be classified according to the data type, and the first transaction data may be backed up to the corresponding service system according to the classification result, and the corresponding data may be managed by different service systems. And during inquiry, analyzing the acquired transaction data inquiry request, extracting the data type of the transaction data, searching a corresponding target service system from a pre-configured list according to the data type, and acquiring target transaction data from the target service system. Wherein, the list records the service system corresponding to each transaction data type. For example, when the credit information needs to be queried, the credit query request is distributed to the credit management service system, the credit query is performed through the credit management service system, and the query result is returned to the client.
In one embodiment, in step S21, the step of backing up the first transaction data in the cache of the target service system may specifically include:
(1) Periodically monitoring the operation state of the data server;
(2) When the data server is monitored to be in an idle state, backing up the first transaction data into a cache of a target service system;
(3) When the data server is monitored to enter a busy state from an idle state in the process of backing up the first transaction data to the cache of the target service system, recording a backup breakpoint of the current backing up the first transaction data to the cache of the target service system;
(4) And when the data server is monitored to be in the idle state again, continuing to backup the first transaction data to the cache of the target service system from the backup breakpoint.
In this embodiment, the data server may need to process various tasks during certain time periods of the day, so that the data server is relatively busy, and therefore, the time for backing up the first transaction data to the cache of the target service system is usually set during the time period when the data server is relatively idle, so as to reduce the response time of the data server for processing other tasks, thereby improving the processing speed and efficiency of the data server.
In addition, the data server of the embodiment also supports breakpoint continuous transmission, and when the data server is monitored to enter a busy state from an idle state in the process of backing up the first transaction data to the cache of the target service system, the backup breakpoint of the current backing up the first transaction data to the cache of the target service system is recorded; when the data server is monitored to be in the idle state again, the first transaction data is backed up to the cache of the target service system from the backup breakpoint, and the backup from the beginning is not needed again, so that the pressure of the data server is increased due to the fact that repeated backup is needed in the data backup process.
In an embodiment, before the backing up the first transaction data to the cache of the service system in step S21, the method may further include:
establishing a transmission network taking a data server as a center;
accessing each service system to a network node of the transmission network nearby; wherein the number of service systems accessed by each network node is less than a predetermined threshold.
In this embodiment, a transmission network of the data server and each service system is pre-established, any network node is uniformly loaded with the service systems, and each service system is accessed to the network node nearby, so as to quickly respond to the transaction data query task distributed by the data server, thereby improving the data query efficiency.
Referring to fig. 3, an embodiment of the present invention further provides a transaction data query device of a credit card management system, which includes a backup module 31, a clearing module 32 and an obtaining module 33. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the backup module 31 is configured to obtain, in real time, transaction data generated by each client through the data server, screen first transaction data with a history query frequency greater than a preset value from the transaction data, and backup the first transaction data to a cache of the service system; the service system comprises a database and a cache;
in this embodiment, the data server is connected to each client, and obtains transaction data generated by each client in real time. And screening the first transaction data with the history query frequency larger than the preset value from the transaction data, and backing up the first transaction data with the higher data query frequency into a cache of a service system, wherein the operation speed of the cache is much faster than that of a memory, so that the target transaction data can be quickly acquired in the follow-up query.
The clearing module 32 is configured to screen the cache of the service system for the first transaction data of the transaction time before the preset transaction time node to be backed up to the database, and periodically clear the first transaction data backed up to the database in the cache;
in the embodiment, the first transaction data stored in the cache is filtered to obtain the first transaction data with transaction time before the preset transaction time node, the first transaction data is backed up to the database, and the first transaction data backed up to the database in the cache is cleared periodically, so that only the first transaction data generated by the client in a short period of time is reserved in the cache, and the influence of the full cache on the subsequent backup of the first transaction data is avoided. It should be noted that the preset transaction time node may be a transaction time node that is adjusted according to an actual application scenario and situation, which is not limited in this embodiment.
The obtaining module 33 is configured to obtain target transaction data from the cache, the data server or the database according to a preset condition in response to a transaction data query request of the client, and return the target transaction data to the client.
In this embodiment, when one or more clients initiate a transaction data query request, in response to the query request of each client, target transaction data is queried and acquired from a cache, a data server or a database according to a preset condition, and the acquired target transaction data is returned to the client, so that the transaction data query task is prevented from being centralized in the data server for processing, and other tasks are prevented from being processed by the data server. The preset condition can set an optimal acquisition mode of the target transaction data according to the type of the transaction data query request, for example, when the transaction data query request is urgent, the data server is considered to suspend processing of other tasks, and the transaction data query task is preferentially processed.
Taking a bank transaction data query as an example, the data server may real-time download the first transaction data with higher query frequency generated by each bank client transaction to a cache of a service system (which may include a plurality of servers), then screen the first transaction data with transaction time before a preset transaction time node, such as the first transaction data before one day, one week or one month, from the cache of the service system, and back up the first transaction data to a database of the service system. When a client initiates a transaction data query request, responding to the transaction data query request of the client, and judging whether the current service system downloads transaction data to a cache in batches or whether a data server backs up the transaction data in batches; when the data server downloads transaction data to the cache of the service system in batches, the target transaction data is queried from the cache or the database of the service system and is sent to the client, so that the transaction data query task proportion of the data server is not more than 10%, and 90% of transaction data query tasks are borne by the service system.
The transaction data query device of the credit card management system provided by the invention acquires transaction data generated by each client in real time through the data server, screens out first transaction data with history query frequency larger than a preset value from the transaction data, and backs up the first transaction data with higher query frequency into a cache of a service system; the service system comprises a database and a cache; then, first transaction data of transaction time before a preset transaction time node is screened out from a cache of the service system and backed up to a database, and the first transaction data backed up to the database in the cache is cleared periodically, so that the data storage and query efficiency is improved; when a client initiates a transaction data query request, responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client, so that part of transaction data query work is transferred to a service system, and the target transaction data is acquired through the cache or the database of the service system, so that the load of the data server is reduced, and the excessive consumption of resources of the data server and the influence on the processing of other tasks are avoided.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The terminal provided by the invention comprises a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, enable the processor to execute the steps of the transaction data query method of the credit card management system.
In an embodiment, the terminal is a computer device, as shown in fig. 4. The computer device described in this embodiment may be a server, a personal computer, a network device, or the like. The computer device comprises a processor 402, a memory 403, an input unit 404, a display unit 405 and the like. Those skilled in the art will appreciate that the device architecture shown in fig. 4 does not constitute a limitation of all devices, and may include more or fewer components than shown, or may combine certain components. The memory 403 may be used to store a computer program 401 and functional modules, and the processor 402 runs the computer program 401 stored in the memory 403 to execute various functional applications of the device and data processing. The memory may be internal memory or external memory, or include both internal memory and external memory. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory disclosed herein is by way of example only and not by way of limitation.
The input unit 404 is used for receiving input of a signal and receiving keywords input by a user. The input unit 404 may include a touch panel and other input devices. The touch panel may collect touch operations on or near the user (e.g., the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, mouse, joystick, etc. The display unit 405 may be used to display information entered by a user or provided to a user as well as various menus of a computer device. The display unit 405 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 402 is the control center of the computer device, connects the various parts of the overall computer using various interfaces and lines, performs various functions and processes data by running or executing software programs and/or modules stored in the memory 402, and invoking data stored in the memory.
As one embodiment, the computer device includes: one or more processors 402, a memory 403, one or more computer programs 401, wherein the one or more computer programs 401 are stored in the memory 403 and configured to be executed by the one or more processors 402, the one or more computer programs 401 are configured to perform the transaction data query method of the credit card management system described in the above embodiments.
In one embodiment, the present invention also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the transaction data query method of the credit card management system described above. For example, the storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored in a storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
As can be seen from the above embodiments, the present invention has the following advantages:
the transaction data query method, the device, the terminal and the storage medium of the credit card management system provided by the invention are characterized in that transaction data generated by each client are obtained in real time through a data server, first transaction data with history query frequency larger than a preset value are screened out from the transaction data, and the first transaction data with higher query frequency is backed up to a cache of a service system; the service system comprises a database and a cache; then, first transaction data of transaction time before a preset transaction time node is screened out from a cache of the service system and backed up to a database, and the first transaction data backed up to the database in the cache is cleared periodically, so that the data storage and query efficiency is improved; when a client initiates a transaction data query request, responding to the transaction data query request of the client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client, so that part of transaction data query work is transferred to a service system, and the target transaction data is acquired through the cache or the database of the service system, so that the load of the data server is reduced, and the excessive consumption of resources of the data server and the influence on the processing of other tasks are avoided.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (8)

1. A transaction data query method for a credit card management system, comprising:
transaction data generated by each client are obtained in real time through a data server, first transaction data with history inquiry frequency larger than a preset value are screened out from the transaction data, and the first transaction data are backed up to a cache of a service system; the service system comprises a database and a cache;
screening first transaction data of transaction time before a preset transaction time node from a cache of the service system, backing up the first transaction data to a database, and periodically clearing the first transaction data backed up to the database in the cache;
responding to a transaction data query request of a client, acquiring target transaction data from the cache, a data server or a database according to preset conditions, and returning the target transaction data to the client;
the step of backing up the first transaction data to the cache of the service system specifically includes:
acquiring a data type of first transaction data;
inquiring a target service system corresponding to the data type from a pre-configured list according to the data type;
backing up the first transaction data to a cache of a target service system;
the step of backing up the first transaction data in the cache of the target service system specifically includes:
periodically monitoring the operation state of the data server;
when the data server is monitored to be in an idle state, backing up the first transaction data into a cache of a target service system;
when the data server is monitored to enter a busy state from an idle state in the process of backing up the first transaction data to the cache of the target service system, recording a backup breakpoint of the current backing up the first transaction data to the cache of the target service system;
and when the data server is monitored to be in the idle state again, continuing to backup the first transaction data to the cache of the target service system from the backup breakpoint.
2. The transaction data query method according to claim 1, wherein the step of acquiring the target transaction data from the cache, the data server or the database according to a preset condition comprises:
calculating the current CPU utilization rate of the data server; wherein the CPU utilization of the data server is an average CPU utilization of the data server in a predetermined period;
and when the CPU utilization rate of the data server is lower than a preset value, acquiring the target transaction data from the data server.
3. The transaction data query method of claim 2, wherein after calculating the current CPU utilization of the data server, further comprising:
when the CPU utilization rate of the data server is higher than a preset value, extracting the transaction time of target transaction data to be acquired from the transaction data inquiry request;
and acquiring target transaction data from a cache or a database according to the transaction time.
4. A transaction data query method according to claim 3, wherein the step of retrieving target transaction data from a cache or database in accordance with the transaction time comprises:
when the transaction time is in front of a preset transaction time node, acquiring the target transaction data from the database;
otherwise, the target transaction data is obtained from the cache of the service system.
5. The transaction data query method of claim 1, wherein prior to backing up the first transaction data to the cache of the service system, further comprising:
establishing a transmission network taking a data server as a center;
accessing each service system to a network node of the transmission network nearby; wherein the number of service systems accessed by each network node is less than a predetermined threshold.
6. A transaction data query device of a credit card management system, comprising:
the backup module is used for acquiring transaction data generated by each client in real time through the data server, screening first transaction data with history inquiry frequency larger than a preset value from the transaction data, and backing up the first transaction data to a cache of the service system; the service system comprises a database and a cache;
the clearing module is used for screening first transaction data of which the transaction time is before a preset transaction time node from a cache of the service system, backing up the first transaction data to a database, and regularly clearing the first transaction data backed up to the database in the cache;
the acquisition module is used for responding to a transaction data query request of a client, acquiring target transaction data from the cache, the data server or the database according to preset conditions, and returning the target transaction data to the client;
the step of backing up the first transaction data to the cache of the service system specifically includes:
acquiring a data type of first transaction data;
inquiring a target service system corresponding to the data type from a pre-configured list according to the data type;
backing up the first transaction data to a cache of a target service system;
the step of backing up the first transaction data in the cache of the target service system specifically includes:
periodically monitoring the operation state of the data server;
when the data server is monitored to be in an idle state, backing up the first transaction data into a cache of a target service system;
when the data server is monitored to enter a busy state from an idle state in the process of backing up the first transaction data to the cache of the target service system, recording a backup breakpoint of the current backing up the first transaction data to the cache of the target service system;
and when the data server is monitored to be in the idle state again, continuing to backup the first transaction data to the cache of the target service system from the backup breakpoint.
7. A terminal comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the transaction data query method of a credit card management system as claimed in any one of claims 1 to 5.
8. A storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction data query method of a credit card management system as claimed in any one of claims 1 to 5.
CN201910441417.4A 2019-05-24 2019-05-24 Transaction data query method, device and terminal of credit card management system Active CN110321364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910441417.4A CN110321364B (en) 2019-05-24 2019-05-24 Transaction data query method, device and terminal of credit card management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910441417.4A CN110321364B (en) 2019-05-24 2019-05-24 Transaction data query method, device and terminal of credit card management system

Publications (2)

Publication Number Publication Date
CN110321364A CN110321364A (en) 2019-10-11
CN110321364B true CN110321364B (en) 2023-07-25

Family

ID=68119087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910441417.4A Active CN110321364B (en) 2019-05-24 2019-05-24 Transaction data query method, device and terminal of credit card management system

Country Status (1)

Country Link
CN (1) CN110321364B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104454A (en) * 2019-12-19 2020-05-05 国网湖南省电力有限公司 Multi-dimensional data processing method, system and medium for monitoring requirements of power grid on cloud
CN113222735B (en) * 2021-05-21 2024-03-29 中国农业银行股份有限公司 Transaction associated information query method and related device
US20230409575A1 (en) * 2022-06-16 2023-12-21 International Business Machines Corporation Database query processing with database clients

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145020A (en) * 2018-07-23 2019-01-04 程之琴 Information query method, from server, client and computer readable storage medium
CN109241067A (en) * 2018-08-21 2019-01-18 中国平安人寿保险股份有限公司 transaction data management method and device
CN109739885A (en) * 2018-12-12 2019-05-10 平安科技(深圳)有限公司 Data query method, apparatus, equipment and storage medium based on local cache

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7127463B2 (en) * 2002-04-18 2006-10-24 International Business Machines Corporation Optimization of database network traffic based upon data-use analysis
US20180095835A1 (en) * 2016-10-05 2018-04-05 International Business Machines Corporation Resilient analytics utilizing dark data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145020A (en) * 2018-07-23 2019-01-04 程之琴 Information query method, from server, client and computer readable storage medium
CN109241067A (en) * 2018-08-21 2019-01-18 中国平安人寿保险股份有限公司 transaction data management method and device
CN109739885A (en) * 2018-12-12 2019-05-10 平安科技(深圳)有限公司 Data query method, apparatus, equipment and storage medium based on local cache

Also Published As

Publication number Publication date
CN110321364A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
US11941017B2 (en) Event driven extract, transform, load (ETL) processing
US11074560B2 (en) Tracking processed machine data
US10372723B2 (en) Efficient query processing using histograms in a columnar database
US10552287B2 (en) Performance metrics for diagnosing causes of poor performing virtual machines
CN108683720B (en) Container cluster service configuration method and device
US9389916B1 (en) Job scheduling management
CN110321364B (en) Transaction data query method, device and terminal of credit card management system
US20080313502A1 (en) Systems, methods and computer products for trace capability per work unit
US20210096977A1 (en) Handling of workload surges in a software application
US9792231B1 (en) Computer system for managing I/O metric information by identifying one or more outliers and comparing set of aggregated I/O metrics
CN108228322B (en) Distributed link tracking and analyzing method, server and global scheduler
CN109842621A (en) A kind of method and terminal reducing token storage quantity
CN108696559B (en) Stream processing method and device
US9405786B2 (en) System and method for database flow management
US8938479B1 (en) Systems and methods for dynamically selecting a logical location for an index
US20180225325A1 (en) Application resiliency management using a database driver
CN108664322A (en) Data processing method and system
CN110764985A (en) Method, system, equipment and readable storage medium for recording command line
CN114218471A (en) Data query method, device, system, electronic equipment and storage medium
CN111625588A (en) Method and system for sharing distributed data acquisition data
US11762860B1 (en) Dynamic concurrency level management for database queries
US20220308976A1 (en) Automatically detecting workload type-related information in storage systems using machine learning techniques
CN115037799A (en) Current limiting method, apparatus, device and medium
CN116112442A (en) Request response method, request response device, computer device, storage medium, and program product
CN117478743A (en) Data caching method, device, equipment and medium for balancing freshness and access frequency

Legal Events

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