Automatic transaction log acquisition method, device and equipment, medium and program product
By automatically obtaining transaction exception levels and determining the log collection strategy, and generating and uploading additional transaction logs in real time, the problems of poor timeliness of traditional transaction log acquisition and large impact range of log level adjustment are solved, and efficient and targeted transaction log collection and abnormal diagnosis are achieved.
Patent Information
- Application Number
- CN202411856693.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional transaction log acquisition timeliness is poor, and the impact of log level adjustment is large, resulting in the inability to obtain target transaction-related logs in a targeted manner, consuming system resources and affecting system stability.
When it is detected that the success rate of the target transaction in the trading system is lower than the preset threshold, the transaction exception level is automatically obtained, and the log collection strategy is determined based on the level, and additional transaction logs are generated in real time until the number defined by the strategy is reached and uploaded to the log center.
It realizes the targeted and effective nature of transaction log collection, avoids the generation and storage of invalid logs, saves system resources, and improves the diagnosis and processing efficiency of transaction exceptions.
Smart Images

Figure CN119809822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a method, device, equipment, medium and program product for automatically collecting transaction logs. Background Art
[0002] The location analysis of transaction production problems in banking systems often relies on transaction log files. In the prior art, the log level is often temporarily adjusted to print error messages or a small amount of other information, and then the log file is obtained for problem analysis.
[0003] However, manual adjustment of log levels has poor timeliness, and automatic adjustment of log levels has a wide impact range and will cause a large number of logs to be printed for other transactions. It is not possible to print only logs related to the target transaction, and it will consume a large amount of system resources, affecting system stability. Summary of the invention
[0004] Based on this, the present invention provides a transaction log automatic collection method, device, equipment, medium and program product to solve the problems of poor timeliness of traditional transaction log acquisition and large impact range of log level adjustment.
[0005] In a first aspect, an embodiment of the present invention provides a method for automatically collecting transaction logs, the method comprising:
[0006] When it is detected that the success rate of the target transaction in the transaction system is lower than a preset success rate threshold, obtaining a transaction abnormality level matching the target transaction;
[0007] Determine a log collection strategy that matches the target transaction according to the transaction anomaly level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log;
[0008] In the process of recording transaction logs normally in the transaction system, additional transaction logs are generated in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy;
[0009] When it is determined that the generated additional transaction logs reach the number of logs defined in the log collection policy, the additional transaction logs of the number of logs are uploaded to the log center for business personnel to locate the cause of the transaction anomaly of the target transaction.
[0010] In a second aspect, an embodiment of the present invention provides a transaction log automatic collection device, the device comprising:
[0011] A transaction anomaly level acquisition module, configured to acquire a transaction anomaly level matching the target transaction when detecting that the success rate of the target transaction in the transaction system is lower than a preset success rate threshold;
[0012] A log collection strategy determination module, used to determine a log collection strategy that matches a target transaction according to the transaction abnormality level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log;
[0013] The additional transaction log generation module is used to generate additional transaction logs in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy during the normal recording of the transaction log by the transaction system;
[0014] The transaction log uploading module is used to upload the additional transaction logs of the number of logs defined in the log collection strategy to the log center when it is determined that the additional transaction logs generated have reached the number of logs defined in the log collection strategy, so that the business personnel can locate the cause of the transaction anomaly of the target transaction.
[0015] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a transaction log automatic collection method described in any embodiment of the present invention.
[0019] In a fourth aspect, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a transaction log automatic collection method described in any embodiment of the present invention when executed.
[0020] In a fifth aspect, a computer program product is also provided, the computer program product comprising a computer program, and the computer program, when executed by a processor, implements a transaction log automatic collection method as described in any embodiment of the present invention.
[0021] The technical solution of the embodiment of the present invention can automatically execute an adaptive transaction log extraction strategy according to the transaction anomaly level when the success rate is detected to be lower than a preset threshold, thereby extracting and uploading a certain number of additional transaction logs to the log center, ensuring the pertinence and effectiveness of log collection, avoiding the generation and storage of invalid logs, saving system resources, and further helping business personnel to quickly locate the cause of the transaction anomaly of the target transaction based on the additional transaction logs, thereby improving the efficiency of diagnosing and processing transaction anomalies.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of a transaction log automatic collection method provided according to the first embodiment of the present invention;
[0025] Figure 2 is a flow chart of another transaction log automatic collection method provided according to the second embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a transaction log automatic collection device provided according to Embodiment 3 of the present invention;
[0027] Figure 4 It is a structural schematic diagram of an electronic device for an automatic transaction log collection method provided according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 This is a flow chart of a transaction log automatic collection method provided in the first embodiment of the present invention. This embodiment is applicable to the case of automatically collecting transaction monitoring logs corresponding to transaction production problems. The method can be executed by a transaction log automatic collection device, which can be implemented in the form of hardware and / or software, and can be configured in a bank transaction system. Figure 1 As shown, the method includes:
[0032] S110: When it is detected that the success rate of a target transaction in the transaction system is lower than a preset success rate threshold, a transaction abnormality level matching the target transaction is obtained.
[0033] The transaction system refers to a subsystem in the banking system used to monitor the operation of transactions. When the target transaction is started, an operation log is automatically generated. The operation log may include some transaction information and system performance indicators, wherein the transaction information includes but is not limited to transaction time, transaction volume, etc., and the performance indicators include but are not limited to memory usage, response time, success rate, etc. Generally, the success rate refers to the probability of success of the system under load, which can be directly calculated based on the number of transactions or requests. For systems with good stability, the error is most likely caused by timeout, which is the timeout rate. Different systems often have different requirements for the success rate. In the embodiment of the present invention, a threshold is pre-set for the success rate to determine whether there is an abnormality in the transaction. It is usually required that the success rate is not lower than the set threshold. That is, if the set threshold is 99.4%, the error rate cannot exceed 0.6%.
[0034] S120. Determine a log collection strategy that matches the target transaction according to the transaction abnormality level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log.
[0035] According to the difference between the success rate and the set threshold, multiple levels of transaction anomaly are divided. Different log collection strategies are used under different transaction anomaly levels. The log collection strategy is to extract part of the log information corresponding to the transaction anomaly level that meets actual needs in the transaction system.
[0036] S130. In the process of recording transaction logs normally in the transaction system, an additional transaction log is generated in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy.
[0037] The transaction system will record the entire process of the target transaction and generate a complete transaction log. The log items can be understood as the configuration items in the log, and the additional log transaction refers to the specified partial output content corresponding to the transaction anomaly level extracted from the complete transaction log that meets the current log collection strategy.
[0038] S140. When it is determined that the generated additional transaction logs reach the number of logs defined in the log collection policy, the additional transaction logs of the number of logs are uploaded to the log center so that the business personnel can locate the cause of the transaction abnormality of the target transaction.
[0039] Since different transaction anomaly levels correspond to different log collection strategies, the transaction anomaly levels have different requirements for the number of logs obtained. In order not to affect the normal log files, the specified number of additional logs extracted will be uploaded to the log center for temporary storage. Business personnel do not need to use traditional methods to adjust the levels of transaction logs in the transaction system, but can directly obtain the required log data in the log center.
[0040] Optionally, after uploading the number of logs and the transaction log to the log center, the following steps may also be performed:
[0041] If a custom log collection strategy matching the target transaction is received from the log center, a new additional transaction log is generated in real time according to the custom log collection strategy based on the transaction information of the target transaction in the transaction system during the normal recording of the transaction log by the transaction system;
[0042] The newly generated additional transaction logs are provided to business personnel for accurate location of abnormal causes.
[0043] After obtaining relevant logs from the log center, business personnel will correct the log content according to the actual needs corresponding to the transaction abnormality level. If there is missing information in the log stored in the log center, the business personnel will establish a customized log collection strategy for the missing content, and the log center will feedback the customized log collection strategy, and extract it again from the complete transaction log of the transaction system to obtain a new additional transaction log. Business personnel customize the log collection strategy according to new transaction requirements and exception handling strategies. This scalability and flexibility can better adapt to the ever-changing business environment and further ensure the accuracy and effectiveness of log collection.
[0044] The embodiments of the present invention can automatically execute an adaptive transaction log extraction strategy according to the transaction anomaly level when the success rate is detected to be lower than a preset threshold, thereby extracting and uploading a certain number of additional transaction logs to the log center, ensuring the pertinence and effectiveness of log collection, avoiding the generation and storage of invalid logs, saving system resources, and further helping business personnel to quickly locate the cause of the transaction anomaly of the target transaction based on the additional transaction logs, thereby improving the efficiency of diagnosing and processing transaction anomalies.
[0045] Embodiment 2
[0046] Figure 2 This is a flow chart of another transaction log automatic collection method provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. Figure 2 As shown, the method specifically includes:
[0047] S210: When receiving the log warning information for the target transaction sent by the transaction monitoring system, it is determined that the success rate of the target transaction detected in the transaction system is lower than a preset success rate threshold.
[0048] The transaction monitoring system is used to receive the transaction operation information uploaded by the transaction system in real time, and perform detection based on the configuration information matching the success rate obtained by parsing the transaction operation information.
[0049] Different from the transaction system in the above-mentioned embodiment, the transaction monitoring system is used to obtain the transaction operation information in the transaction system in real time, and obtain the specified configuration item information and calculate the success rate after parsing the transaction operation information. Specifically, by comparing the calculated success rate with the threshold, it is determined whether it is necessary to issue a log alarm information. If the success rate is less than the success rate threshold, the transaction monitoring system issues a log alarm information. In the embodiment of the present invention, by using the received log alarm information as a judgment condition for determining that the success rate is lower than the threshold, this mechanism enables log collection to be differentiated according to transactions with different abnormalities, thereby improving the pertinence of log collection.
[0050] S220: Extract the success rate and the success rate threshold from the log alarm information.
[0051] S230: Calculate the target ratio between the success rate and the success rate threshold.
[0052] S240: Determine the transaction abnormality level according to the numerical range of the target ratio.
[0053] In the embodiment of the present invention, the specific calculation method of the target ratio is clarified by extracting the success rate and the success rate threshold, and the transaction abnormality level is determined for the target transaction corresponding to the target ratio according to the preset numerical interval. The above process avoids the tedious process of manually adjusting the log level in the traditional method, and can dynamically adjust the log collection strategy according to the different transaction abnormality levels, thereby improving the automation of the method.
[0054] Optionally, the lower the target ratio, the higher the transaction anomaly level corresponding to the target ratio; and
[0055] The higher the transaction anomaly level is, the more logs need to be collected in the log collection strategy corresponding to the transaction anomaly level, and the richer the types of log items need to be included in each log.
[0056] According to the log alarm information, further judgment is needed on the transaction anomaly level. Multiple numerical intervals are pre-defined for the target ratio. Different numerical intervals correspond to different levels of transaction anomalies, so as to determine the numerical difference between the success rate and the success rate threshold. Generally speaking, the lower the target ratio, the lower the success rate, and the higher the corresponding transaction anomaly level. The higher the transaction anomaly level, the more complex the transaction anomaly. Therefore, more logs need to be collected and the more types of log items are richer. This targeted log collection method can ensure that business personnel obtain enough data to locate and solve transaction anomalies, reducing unnecessary log review work.
[0057] S250. Determine a log collection strategy that matches the target transaction according to the transaction abnormality level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log.
[0058] S260. In the process of recording transaction logs normally in the transaction system, an additional transaction log is generated in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy.
[0059] S270. When it is determined that the generated additional transaction logs reach the number of logs defined in the log collection policy, the additional transaction logs of the number of logs are uploaded to the log center so that the business personnel can locate the cause of the transaction anomaly of the target transaction.
[0060] The technical solution of the embodiment of the present invention refines the overall solution and focuses on the determination of the transaction anomaly level. Specifically, by introducing the transaction anomaly level system, log resources can be reasonably allocated. For situations with low transaction anomaly levels, the system only needs to collect a small number of key log items, thereby avoiding the generation of a large amount of redundant log information; for situations with high transaction anomaly levels, the system will collect more detailed and comprehensive log information to ensure that business personnel can obtain sufficient data to locate and resolve transaction anomalies.
[0061] Embodiment 3
[0062] Figure 3 This is a schematic diagram of the structure of a transaction log automatic collection device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0063] The transaction anomaly level acquisition module 310 is used to acquire the transaction anomaly level matching the target transaction when detecting that the success rate of the target transaction in the transaction system is lower than a preset success rate threshold;
[0064] The log collection strategy determination module 320 is used to determine the log collection strategy that matches the target transaction according to the transaction abnormality level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log;
[0065] The additional transaction log generating module 330 is used to generate additional transaction logs in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy during the normal recording of the transaction log by the transaction system;
[0066] The transaction log uploading module 340 is used to upload the additional transaction logs of the number of logs defined in the log collection strategy to the log center when it is determined that the additional transaction logs generated have reached the number of logs defined in the log collection strategy, so that the business personnel can locate the cause of the transaction anomaly of the target transaction.
[0067] The embodiments of the present invention can automatically execute an adaptive transaction log extraction strategy according to the transaction anomaly level when the success rate is detected to be lower than a preset threshold, thereby extracting and uploading a certain number of additional transaction logs to the log center, ensuring the pertinence and effectiveness of log collection, avoiding the generation and storage of invalid logs, saving system resources, and further helping business personnel to quickly locate the cause of the transaction anomaly of the target transaction based on the additional transaction logs, thereby improving the efficiency of diagnosing and processing transaction anomalies.
[0068] Optionally, based on the above embodiments, the transaction abnormality level acquisition module 310 may include:
[0069] An alarm information receiving unit, configured to determine, upon receiving a log alarm information for a target transaction issued by a transaction monitoring system, that a success rate for the target transaction in the transaction system is lower than a preset success rate threshold;
[0070] The transaction monitoring system is used to receive the transaction operation information uploaded by the transaction system in real time, and perform detection based on the configuration information matching the success rate obtained by parsing the transaction operation information.
[0071] Optionally, based on the above embodiments, the transaction abnormality level acquisition module 310 may further include:
[0072] An alarm information extraction unit, used to extract the success rate and the success rate threshold from the log alarm information;
[0073] a target ratio calculation unit, used to calculate a target ratio between the success rate and the success rate threshold;
[0074] The numerical interval matching unit is used to determine the transaction abnormality level according to the numerical interval in which the target ratio is located.
[0075] Optionally, based on the above embodiments, the lower the target ratio is, the higher the transaction anomaly level corresponding to the target ratio is; and
[0076] The higher the transaction anomaly level is, the more logs need to be collected in the log collection strategy corresponding to the transaction anomaly level, and the richer the types of log items need to be included in each log.
[0077] Optionally, on the basis of the above embodiments, an additional transaction log updating unit is further included, which is used to, after uploading the number of additional transaction logs to the log center, if a custom log collection strategy matching the target transaction is received from the log center, then in the process of the transaction system normally recording the transaction log, generate a new additional transaction log in real time according to the transaction information for the target transaction in the transaction system according to the custom log collection strategy;
[0078] The newly generated additional transaction logs are provided to business personnel for accurate location of abnormal causes.
[0079] An automatic transaction log collection device provided by an embodiment of the present invention can execute an automatic transaction log collection method provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0080] Embodiment 4
[0081] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0082] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0083] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0084] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a transaction log automatic collection method.
[0085] That is, when it is detected that the success rate of the target transaction in the transaction system is lower than the preset success rate threshold, the transaction abnormality level matching the target transaction is obtained;
[0086] Determine a log collection strategy that matches the target transaction according to the transaction anomaly level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log;
[0087] In the process of recording transaction logs normally in the transaction system, additional transaction logs are generated in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy;
[0088] When it is determined that the generated additional transaction logs reach the number of logs defined in the log collection policy, the additional transaction logs of the number of logs are uploaded to the log center for business personnel to locate the cause of the transaction anomaly of the target transaction.
[0089] In some embodiments, a transaction log automatic collection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the transaction log automatic collection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a transaction log automatic collection method in any other appropriate manner (e.g., by means of firmware).
[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0092] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0093] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0094] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0095] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0096] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A transaction log automatic collection method, characterized in that: include: When it is detected that the success rate of the target transaction in the transaction system is lower than a preset success rate threshold, obtaining a transaction abnormality level matching the target transaction; Determine a log collection strategy that matches the target transaction according to the transaction anomaly level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log; In the process of recording transaction logs normally in the transaction system, additional transaction logs are generated in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy; When it is determined that the generated additional transaction logs reach the number of logs defined in the log collection policy, the additional transaction logs of the number of logs are uploaded to the log center for business personnel to locate the cause of the transaction anomaly of the target transaction.
2. The method according to claim 1, characterized in that: It is detected that the success rate of the target transaction in the trading system is lower than the preset success rate threshold, including: When receiving the log alarm information for the target transaction issued by the transaction monitoring system, determining that the success rate of the target transaction in the transaction system is detected to be lower than a preset success rate threshold; The transaction monitoring system is used to receive the transaction operation information uploaded by the transaction system in real time, and perform detection based on the configuration information matching the success rate obtained by parsing the transaction operation information.
3. The method according to claim 2, characterized in that Obtaining the transaction anomaly level matching the target transaction, including: Extract the success rate and the success rate threshold from the log alarm information; Calculating a target ratio between the success rate and the success rate threshold; The transaction abnormality level is determined according to the numerical range of the target ratio.
4. The method according to claim 3, characterized in that: The lower the target ratio, the higher the transaction anomaly level corresponding to the target ratio; as well as The higher the transaction anomaly level is, the more logs need to be collected in the log collection strategy corresponding to the transaction anomaly level, and the richer the types of log items need to be included in each log.
5. The method according to any one of claims 1 to 4, characterized in that: After uploading the number of logs and the additional transaction logs to the log center, it also includes: If a custom log collection strategy matching the target transaction is received from the log center, a new additional transaction log is generated in real time according to the custom log collection strategy based on the transaction information of the target transaction in the transaction system during the normal recording of the transaction log by the transaction system; The newly generated additional transaction logs are provided to business personnel for accurate location of abnormal causes.
6. A transaction log automatic collection device, characterized in that: include: A transaction anomaly level acquisition module, configured to acquire a transaction anomaly level matching the target transaction when detecting that the success rate of the target transaction in the transaction system is lower than a preset success rate threshold; A log collection strategy determination module, used to determine a log collection strategy that matches a target transaction according to the transaction abnormality level, wherein the log collection strategy includes the number of logs to be collected and the log items to be included in each log; The additional transaction log generation module is used to generate additional transaction logs in real time according to the transaction information of the target transaction in the transaction system and the log items required to be included in each log defined in the log collection strategy during the normal recording of the transaction log by the transaction system; The transaction log uploading module is used to upload the additional transaction logs of the number of logs defined in the log collection strategy to the log center when it is determined that the additional transaction logs generated have reached the number of logs defined in the log collection strategy, so that the business personnel can locate the cause of the transaction anomaly of the target transaction.
7. The device according to claim 6, characterized in that The transaction abnormality level acquisition module specifically includes: An alarm information receiving unit, configured to determine, upon receiving a log alarm information for a target transaction issued by a transaction monitoring system, that a success rate for the target transaction in the transaction system is lower than a preset success rate threshold; The transaction monitoring system is used to receive the transaction operation information uploaded by the transaction system in real time, and perform detection based on the configuration information matching the success rate obtained by parsing the transaction operation information.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a transaction log automatic collection method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a transaction log automatic collection method according to any one of claims 1 to 5 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements a transaction log automatic collection method according to any one of claims 1-5.