Configuration method, system and equipment for log record generation and medium

By determining business scenario rules and matching log data in log records, the problem of scattered log records and complex updates is solved, efficient log query and storage is achieved, and troubleshooting difficulty and storage costs are reduced.

CN118779292APending Publication Date: 2024-10-15CTRIP TRAVEL NETWORK TECH SHANGHAI0
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410913643.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The existing logging method in a multi-threaded environment leads to scattered log records, disordered order, interference from irrelevant logs, complex database associated queries, high troubleshooting complexity, and log content updates rely on code modifications, poor hot update support, and increased Troubleshooting time and storage costs.

Method used

By obtaining log data from the log collection interface of each business line, determine the logging rules of each product in different business scenarios, match log data to generate records, support log data compression storage and query, and parse query instructions to display abnormal logs. Provide simple query tools to reduce professional requirements.

Benefits of technology

It simplifies the complexity of log troubleshooting, improves query efficiency, reduces storage costs, supports hot updates of log content, and reduces professional requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779292A_ABST
    Figure CN118779292A_ABST
Patent Text Reader

Abstract

The invention discloses a configuration method, system and equipment for log record generation and a medium. The configuration method comprises the following steps: acquiring log data corresponding to each product from a log collection interface of each service line; determining log recording rules of each product in different business scenes; and matching the log data with the corresponding log recording rule to generate log recording data. According to the method and the device, the log data corresponding to the products of the business lines are recorded according to the preset log recording rule, a simple and easy-to-use query tool is provided to replace a log query tool with relatively high professional requirements, the complexity and difficulty of abnormal log troubleshooting are reduced, the professional property of log query is reduced, and the query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of log processing technology, and in particular to a configuration method, system, device and medium for generating log records. Background Art

[0002] At present, log recording mainly relies on the ELK (a log solution composed of open source software) distributed log storage system, but there are several problems in this log recording mode.

[0003] For example, because log records are scattered and the log order is disordered in a multi-threaded environment, there is interference from irrelevant logs, which makes database association queries complex and troubleshooting complex, so there is a high demand for professional troubleshooters; log content updates depend on code modifications and application releases, and do not support hot updates of log content; in complex business scenarios, in order to reduce troubleshooting time, a large number of logs need to be recorded, which takes up a lot of memory and increases log storage costs. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the defects of the log recording method in the prior art, which makes it difficult to troubleshoot problem logs and is inefficient, and to provide a configuration method, system, device and medium for log record generation.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] In a first aspect, the present invention provides a configuration method for log record generation, the configuration method comprising:

[0007] Obtain the log data corresponding to each product from the log collection interface of each business line;

[0008] Determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between product name, scenario information and log abnormality reason information;

[0009] The log data is matched with the corresponding log record rule to generate log record data.

[0010] Preferably, the configuration method further includes:

[0011] The log record data is compressed and stored in a log database; the log database includes a number of abnormal logs;

[0012] After receiving an external log query instruction, the log query instruction is parsed to determine the display form of the target exception log; the display form corresponds to a log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

[0013] Preferably, the product includes an insurance product, the business scenario includes an insurance sales scenario, and the step of determining the log recording rules for each product in different business scenarios includes:

[0014] Obtaining a first reason for abnormal use of the insurance product in the insurance sales scenario;

[0015] Establishing a first correspondence between the insurance product, the insurance sales scenario, and the first reason, and determining the log recording rule according to the first correspondence;

[0016] and / or,

[0017] The product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and the step of determining the log recording rules for each product in different business scenarios includes:

[0018] Obtaining a second reason for abnormal use of the coupon product in the coupon selling scenario or the coupon using scenario;

[0019] A second correspondence between the coupon product, the coupon sales scenario, or the coupon usage scenario and the second reason is established, and the log recording rule is determined according to the second correspondence.

[0020] Preferably, the product includes a lounge product, the business scenario includes a lounge gift scenario and a lounge sales scenario, and the step of determining the log recording rules for each product in different business scenarios includes:

[0021] Acquire a third reason for abnormal use of the lounge product in the lounge gifting scenario or the lounge selling scenario;

[0022] establishing a third correspondence between the lounge product, the lounge gifting scenario or the lounge selling scenario and the third reason, and determining the log recording rule according to the third correspondence;

[0023] and / or,

[0024] The product includes an in-flight meal product, the business scenario includes a paid meal scenario and a free meal scenario, and the step of determining a log recording rule for each product in different business scenarios includes:

[0025] Obtaining a fourth reason for abnormal use of the in-flight meal product in the paid meal scenario and the free meal scenario;

[0026] A fourth correspondence between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason is established, and the log recording rule is determined according to the fourth correspondence.

[0027] In a second aspect, the present invention provides a configuration system for log record generation, the configuration system comprising:

[0028] The acquisition module is used to obtain the log data corresponding to each product from the log collection interface of each business line;

[0029] A determination module is used to determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between the product name, scenario information and log abnormality reason information;

[0030] The matching module is used to match the log data with the corresponding log record rules to generate log record data.

[0031] Preferably, the configuration system comprises:

[0032] A storage module, used for compressing the log record data and storing it in a log database; the log database includes a number of abnormal logs;

[0033] The parsing module is used to parse the log query instruction after receiving the external log query instruction to determine the display form of the target exception log; the display form corresponds to the log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

[0034] Preferably, the product includes an insurance product, the business scenario includes an insurance sales scenario, and the determination module includes:

[0035] A first obtaining unit, configured to obtain a first reason for abnormal use of the insurance product in the insurance sales scenario;

[0036] a first determining unit, configured to establish a first correspondence between the insurance product, the insurance sales scenario, and the first reason, and determine the log recording rule according to the first correspondence;

[0037] and / or,

[0038] The product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and the determination module includes:

[0039] A second obtaining unit, configured to obtain a second reason for abnormal use of the coupon product in the coupon selling scenario or the coupon using scenario;

[0040] The second determining unit is used to establish a second corresponding relationship between the coupon product, the coupon sales scenario or the coupon usage scenario and the second reason, and determine the log recording rule according to the second corresponding relationship.

[0041] Preferably, the product includes a lounge product, the business scenario includes a lounge gift scenario and a lounge sales scenario, and the determination module includes:

[0042] A third obtaining unit, configured to obtain a third reason for abnormal use of the lounge product in the lounge gifting scenario or the lounge selling scenario;

[0043] A third determining unit, configured to establish a third correspondence between the lounge product, the lounge gifting scenario or the lounge selling scenario and the third reason, and determine the log recording rule according to the third correspondence;

[0044] and / or,

[0045] The product includes an in-flight meal product, the business scenario includes a paid meal scenario and a free meal scenario, and the determination module includes:

[0046] A fourth obtaining unit, configured to obtain a fourth reason for abnormal use of the in-flight meal product in the paid meal scenario and the free meal scenario;

[0047] The fourth determining unit is used to establish a fourth corresponding relationship between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason, and determine the log recording rule according to the fourth corresponding relationship.

[0048] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the configuration method for generating log records as described in any one of the first aspects is implemented.

[0049] In a fourth aspect, the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the configuration method for generating log records as described in any one of the first aspects.

[0050] The positive and progressive effects of the present invention are: providing a configuration method, system, device and medium for log record generation, obtaining log data corresponding to each product from the log collection interface of each business line; determining the log record rules for each product in different business scenarios; matching the log data with the corresponding log record rules to generate log record data. The present invention records the log data corresponding to the products of each business line according to the preset log record rules, provides a simple and easy-to-use query tool to replace the log query tool with strong professional requirements, reduces the complexity and difficulty of abnormal log troubleshooting, reduces the professionalism of log query, and improves query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a partial flow chart of the configuration method for log record generation in Example 1 of the present invention.

[0052] Figure 2 A schematic diagram of the first module of the configuration system for log record generation according to Embodiment 2 of the present invention.

[0053] Figure 3 A schematic diagram of the second module of the configuration system for log record generation according to Embodiment 2 of the present invention.

[0054] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0055] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0056] Example 1

[0057] In this embodiment, a configuration method for generating log records is provided, such as Figure 1 As shown, the configuration method includes the following steps:

[0058] S11. Obtain log data corresponding to each product from the log collection interface of each business line;

[0059] S12. Determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between the product name, scenario information and log abnormality reason information;

[0060] S13: Match the log data with corresponding log record rules to generate log record data.

[0061] S14, compressing the log record data and storing it in a log database; the log database includes a number of abnormal logs;

[0062] S15. After receiving an external log query instruction, parse the log query instruction to determine the display form of the target exception log; the display form corresponds to a log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

[0063] For the above steps S11-S15, log data corresponding to each product is obtained from the log collection interfaces of several business lines. The log data includes normal logs and abnormal logs. Products may include insurance products, coupon products, lounge products and in-flight meal products.

[0064] Insurance products only include sales scenarios, coupon products can include sales scenarios and usage scenarios, lounge products can include gifting scenarios, sales scenarios, and gifting and selling scenarios, and in-flight meal scenarios can include paid scenarios and free scenarios. For example, the log recording rules for insurance products in sales scenarios include insurance, sales scenarios, and abnormal reasons why insurance products cannot be sold. The log recording rules for coupon products in usage scenarios include coupons, usage scenarios, and abnormal reasons why coupon products cannot be used. The log recording rules for coupon products in sales scenarios include coupons, sales scenarios, and abnormal reasons why coupon products cannot be sold. According to the matching of corresponding log recording rules for each product included in the log data, the log recording data corresponding to each product is generated. The log recording data obtained by each business line is compressed and stored in the log database at the same time. The storage space occupied by the log recording data is significantly reduced compared to the storage space of traditional log data.

[0065] After receiving the log query instruction of the exception log triggered by the user by entering a keyword, parsing the log query instruction triggered externally, determining the corresponding log template type based on the abnormal use reason of the product, and displaying the target exception log in the corresponding log template type. For example, the reason why insurance product A cannot be sold is insufficient inventory, product ID123; the reason why insurance product B cannot be sold is that the number of people does not meet the conditions, and at least two people can purchase this product; the reason why coupon product C cannot be sold in the sales scenario is that this product can only be used for CA Airlines, product ID321; the reason why coupon product C cannot be used in the use scenario is that this product can only be used by adults, and the current user is a child. The exception log can intuitively understand the cause of the problem through the process log visualization function, display the exception configuration data, and can also directly query the display data through the link button. You only need to modify the text configuration corresponding to the log template type to change the text information finally displayed in the exception log. This method solves the defect of high complexity in traditional code modification to update log content.

[0066] In this embodiment, when troubleshooting abnormal log problems, the log is queried through the log display tool, the compressed and serialized log content is parsed, and finally the entire process log is displayed on the tool page, reducing the professionalism of the log content query and reducing the complexity of the log query; it supports simultaneous query of multiple related product logs to improve query efficiency, and the configuration content of the log template type can be changed in real time. Refresh the log display page again to complete the hot update of the log content.

[0067] In one embodiment, the product includes an insurance product, the business scenario includes an insurance sales scenario, and step S12 includes:

[0068] S121. Obtaining the primary reason for abnormal use of the insurance product in the insurance sales scenario;

[0069] S122: Establish a first correspondence between the insurance product, the insurance sales scenario, and the first reason, and determine a log recording rule according to the first correspondence.

[0070] Specifically, the first reason for abnormal use of insurance products is insufficient inventory, and the parameter to be passed in the log record rule is the product ID. The log record data is "The reason why insurance product F cannot be sold is insufficient inventory, and the insurance product ID is 123", and the code format in the log record data is "log.info(50001, ID123)", and the log template type when displaying the abnormal log is 50001.

[0071] In one embodiment, the product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and step S12 includes:

[0072] S123, obtaining a second reason for abnormal use of the coupon product in the coupon sales scenario or the coupon use scenario;

[0073] S124: Establish a second correspondence between the coupon product, the coupon sales scenario, or the coupon usage scenario and the second reason, and determine a log recording rule according to the second correspondence.

[0074] Specifically, the second reason for the abnormal use of the coupon product is that the coupon does not meet the full discount rules. The log record data is "The reason why D coupon product cannot be used is that it does not meet the full discount rules. The minimum order amount that meets the use is 100 yuan, and the current order is 50 yuan." The code format in the log record is "log.info (10001, 100 yuan)", and the log template type when displaying the abnormal log is 10001.

[0075] In one embodiment, the product includes lounge products, the business scenario includes a lounge gift scenario and a lounge sales scenario, and step S12 includes:

[0076] S125. Obtaining a third reason for abnormal use of the lounge product in the lounge gifting scenario or lounge selling scenario;

[0077] S126: Establish a third correspondence between the lounge product, lounge gift scenario, or lounge sales scenario and the third reason, and determine a log recording rule according to the third correspondence.

[0078] Specifically, the third reason for abnormal use of lounge products is the mismatch of the departure airport. The log record rule needs to input the parameters of the terminal and the departure airport. The log record data is "The reason why lounge product A cannot be sold is that the departure airport of the ticket does not match. Lounge product A is the lounge of Terminal T1 of Pudong Airport, and the departure airport of the ticket is Hongqiao Airport." The code format in the log record data is "log.info(20001, Pudong, T1, Hongqiao)", and the log template type when displaying the abnormal log is 20001.

[0079] In one embodiment, the product includes an in-flight meal product, and the business scenario includes a paid meal scenario and a free meal scenario. Step S12 includes:

[0080] S127. Obtain the fourth reason for abnormal use of in-flight meal products in paid meal scenarios and free meal scenarios;

[0081] S128. Establish a fourth correspondence between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason, and determine a log recording rule according to the fourth correspondence.

[0082] Specifically, the fourth reason for abnormal use of in-flight meal products in the paid meal scenario is that the current airline only sells snacks and does not sell meals. The parameter required to be passed in the log recording rule is the airline flight number. The log recording data is "The reason why the meal product on board B cannot be sold is that the airline flight number does not match. The meal product on board B is China Eastern Airlines flight S18001". The log template type when displaying the abnormal log is "log.info (30001, China Eastern Airlines, S18001)", and the log template type when displaying the abnormal log is 30001.

[0083] This embodiment provides a configuration method for log record generation, which records the log data corresponding to the products of each business line according to preset log record rules, provides a simple and easy-to-use query tool to replace the log query tool with strong professional requirements, reduces the complexity and difficulty of abnormal log troubleshooting, reduces the professionalism of log query, and improves query efficiency.

[0084] Example 2

[0085] In this embodiment, a configuration system for generating log records is provided, such as Figure 2As shown, the configuration system includes: an acquisition module 210, a determination module 220, a matching module 230, a storage module 240 and a parsing module 250.

[0086] The acquisition module 210 is used to obtain the log data corresponding to each product from the log collection interface of each business line;

[0087] The determination module 220 is used to determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between the product name, scenario information and log abnormality reason information;

[0088] The matching module 230 is used to match the log data with the corresponding log record rules to generate log record data.

[0089] The storage module 240 is used to compress the log record data and store it in the log database; the log database includes a number of abnormal logs;

[0090] The parsing module 250 is used to parse the log query instruction after receiving the external log query instruction to determine the display form of the target exception log; the display form corresponds to the log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

[0091] The acquisition module 210 acquires log data corresponding to each product from the log collection interfaces of several business lines. The log data includes normal logs and abnormal logs. Products may include insurance products, coupon products, lounge products, and in-flight meal products.

[0092] Insurance products only include sales scenarios, coupon products can include sales scenarios and usage scenarios, lounge products can include gift scenarios, sales scenarios, and gift and sales scenarios, and in-flight meal scenarios can include paid scenarios and free scenarios. The log recording rules of the insurance product in the sales scenario of the determination module 220 include insurance, sales scenarios, and abnormal reasons why the insurance product cannot be sold. The log recording rules of the coupon product in the usage scenario include coupons, usage scenarios, and abnormal reasons why the coupon product cannot be used. The log recording rules of the coupon product in the sales scenario include coupons, sales scenarios, and abnormal reasons why the coupon product cannot be sold. The matching module 230 matches the corresponding log recording rules according to each product included in the log data, thereby generating log recording data corresponding to each product. The storage module 240 compresses the log recording data obtained by each business line and stores it in the log database at the same time. The storage space occupied by the log recording data is significantly reduced compared to the storage space of traditional log data.

[0093] After receiving the log query instruction of the exception log triggered by the user by inputting keywords, the parsing module 250 parses the log query instruction triggered externally, determines the corresponding log template type based on the abnormal use reason of the product, and displays the target exception log in the corresponding log template type. For example, the reason why insurance product A cannot be sold is insufficient inventory, product ID123; the reason why insurance product B cannot be sold is that the number limit does not meet the conditions, and at least two people can purchase this product; the reason why coupon product C cannot be sold in the sales scenario is that this product can only be used for CA airlines, product ID321; the reason why coupon product C cannot be used in the use scenario is that this product can only be used by adults, and the current user is a child. The exception log can intuitively understand the cause of the problem through the process log visualization function, display the abnormal configuration data, and can also directly query the display data through the link button. Only the text configuration corresponding to the log template type needs to be modified to change the text information finally displayed in the exception log. This method solves the defect of high complexity in updating log content by modifying the traditional code.

[0094] In this embodiment, when troubleshooting abnormal log problems, the log is queried through the log display tool, the compressed and serialized log content is parsed, and finally the entire process log is displayed on the tool page, reducing the professionalism of the log content query and reducing the complexity of the log query; it supports simultaneous query of multiple related product logs to improve query efficiency, and the configuration content of the log template type can be changed in real time. Refresh the log display page again to complete the hot update of the log content.

[0095] In one embodiment, Figure 3 As shown, the product includes an insurance product, the business scenario includes an insurance sales scenario, and the determination module 220 includes:

[0096] A first acquisition unit 221 is used to acquire a first reason for abnormal use of an insurance product in an insurance sales scenario;

[0097] The first determining unit 222 is used to establish a first corresponding relationship between the insurance product, the insurance sales scenario and the first reason, and determine a log recording rule according to the first corresponding relationship.

[0098] Specifically, the first reason for abnormal use of insurance products is insufficient inventory, and the parameter to be passed in the log record rule is the product ID. The log record data is "The reason why insurance product F cannot be sold is insufficient inventory, and the insurance product ID is 123", and the code format in the log record data is "log.info(50001, ID123)", and the log template type when displaying the abnormal log is 50001.

[0099] In one embodiment, the product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and the determination module 220 includes:

[0100] The second acquisition unit 223 is used to acquire a second reason for abnormal use of the coupon product in the coupon selling scenario or the coupon using scenario;

[0101] The second determining unit 224 is used to establish a second correspondence between the coupon product, the coupon selling scenario or the coupon using scenario and the second reason, and determine the log recording rule according to the second correspondence.

[0102] Specifically, the second acquisition unit 223 acquires the second reason for the abnormal use of the coupon product, which is that the coupon does not meet the full-reduction rule. The log record data is "The reason why the D coupon product cannot be used is that it does not meet the full-reduction rule. The minimum order amount that meets the use is 100 yuan, and the current order is 50 yuan." The code format in the log record is "log.info (10001, 100 yuan)", and the log template type when displaying the abnormal log is 10001.

[0103] In one embodiment, the product includes a lounge product, the business scenario includes a lounge gift scenario and a lounge sales scenario, and the determination module 220 includes:

[0104] The third obtaining unit 225 is used to obtain a third reason for abnormal use of the lounge product in the lounge gifting scenario or the lounge selling scenario;

[0105] The third determining unit 226 is used to establish a third corresponding relationship between the lounge product, lounge gift scenario or lounge sales scenario and the third reason, and determine the log recording rule according to the third corresponding relationship.

[0106] Specifically, the third acquisition unit 225 acquires the third reason for abnormal use of the lounge product as the departure airport does not match, and the log record rule needs to input parameters of the terminal and the departure airport. The log record data is "The reason why lounge product A cannot be sold is that the departure airport of the ticket does not match, lounge product A is the lounge of Terminal T1 of Pudong Airport, and the departure airport of the ticket is Hongqiao Airport", and the code form in the log record data is "log.info (20001, Pudong, T1, Hongqiao)", and the log template type when displaying the abnormal log is 20001.

[0107] In one embodiment, the product includes an in-flight meal product, the business scenario includes a paid meal scenario and a free meal scenario, and the determination module 220 includes:

[0108] A fourth obtaining unit 227, configured to obtain a fourth reason for abnormal use of the in-flight meal product in a paid meal scenario and a free meal scenario;

[0109] The fourth determining unit 228 is used to establish a fourth corresponding relationship between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason, and determine the log recording rule according to the fourth corresponding relationship.

[0110] Specifically, the fourth acquisition unit 227 acquires the fourth reason for abnormal use of the in-flight meal product in the paid meal scenario, which is that the current airline only sells snacks and does not sell meals, and the parameter required to be input in the log recording rule is the airline flight number. The log recording data is "The reason why the meal product on board B cannot be sold is that the airline flight number does not match, and the meal product on board B is China Eastern Airlines flight S18001", and the log template type when displaying the abnormal log is "log.info (30001, China Eastern Airlines, S18001)", and the log template type when displaying the abnormal log is 30001.

[0111] This embodiment provides a configuration system for log record generation, which records the log data corresponding to the products of each business line according to preset log record rules, and provides a simple and easy-to-use query tool to replace the log query tool with strong professional requirements, thereby reducing the complexity and difficulty of abnormal log troubleshooting, reducing the professionalism of log query, and improving query efficiency.

[0112] Example 3

[0113] Figure 4 The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the configuration method for generating log records in Example 1 is implemented. Figure 4 The electronic device 60 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0114] The electronic device 60 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 60 may include but are not limited to: at least one processor 61, at least one memory 62, and a bus 63 connecting different system components (including the memory 62 and the processor 61).

[0115] The bus 63 includes a data bus, an address bus, and a control bus.

[0116] The memory 62 may include a volatile memory, such as a random access memory (RAM) 621 and / or a cache memory 622 , and may further include a read-only memory (ROM) 623 .

[0117] The memory 62 may also include a program / utility 625 having a set (at least one) of program modules 624, such program modules 624 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0118] The processor 61 executes various functional applications and data processing by running the computer programs stored in the memory 62, such as the configuration method for log record generation in embodiment 1 of the present invention.

[0119] The electronic device 60 may also communicate with one or more external devices 64 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 65. Furthermore, the model-generated device 60 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 66. As shown, the network adapter 66 communicates with other modules of the model-generated device 60 via a bus 63. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 60, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0120] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0121] Example 4

[0122] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the log record generation configuration method of Embodiment 1 are implemented.

[0123] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0124] In a possible implementation manner, the present invention may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the configuration method for log record generation of Example 1.

[0125] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0126] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A configuration method for log record generation, characterized in that: The configuration method comprises: Obtain the log data corresponding to each product from the log collection interface of each business line; Determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between product name, scenario information and log abnormality reason information; The log data is matched with the corresponding log record rule to generate log record data.

2. The log record generation configuration method according to claim 1, characterized in that: The configuration method further includes: The log record data is compressed and stored in a log database; the log database includes a number of abnormal logs; After receiving an external log query instruction, the log query instruction is parsed to determine the display form of the target exception log; the display form corresponds to a log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

3. The log record generation configuration method according to claim 1, characterized in that: The product includes an insurance product, the business scenario includes an insurance sales scenario, and the step of determining the log recording rules for each product in different business scenarios includes: Obtaining a first reason for abnormal use of the insurance product in the insurance sales scenario; Establishing a first correspondence between the insurance product, the insurance sales scenario, and the first reason, and determining the log recording rule according to the first correspondence; and / or, The product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and the step of determining the log recording rules for each product in different business scenarios includes: Obtaining a second reason for abnormal use of the coupon product in the coupon selling scenario or the coupon using scenario; A second correspondence between the coupon product, the coupon sales scenario, or the coupon usage scenario and the second reason is established, and the log recording rule is determined according to the second correspondence.

4. The log record generation configuration method according to claim 1, characterized in that: The product includes a lounge product, the business scenario includes a lounge gift scenario and a lounge sales scenario, and the step of determining the log recording rules for each product in different business scenarios includes: Acquire a third reason for abnormal use of the lounge product in the lounge gifting scenario or the lounge selling scenario; establishing a third correspondence between the lounge product, the lounge gifting scenario or the lounge selling scenario and the third reason, and determining the log recording rule according to the third correspondence; and / or, The product includes an in-flight meal product, the business scenario includes a paid meal scenario and a free meal scenario, and the step of determining a log recording rule for each product in different business scenarios includes: Obtaining a fourth reason for abnormal use of the in-flight meal product in the paid meal scenario and the free meal scenario; A fourth correspondence between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason is established, and the log recording rule is determined according to the fourth correspondence.

5. A configuration system for generating log records, characterized in that: The configuration system comprises: The acquisition module is used to obtain the log data corresponding to each product from the log collection interface of each business line; A determination module is used to determine the log recording rules for each product in different business scenarios; the log recording rules include the corresponding relationship between the product name, scenario information and log abnormality reason information; The matching module is used to match the log data with the corresponding log record rules to generate log record data.

6. The log record generation configuration system as claimed in claim 5, characterized in that: The configuration system comprises: A storage module, used for compressing the log record data and storing it in a log database; the log database includes a number of abnormal logs; The parsing module is used to parse the log query instruction after receiving the external log query instruction to determine the display form of the target exception log; the display form corresponds to the log template type with a unique template identifier. In different business scenarios, the log template type corresponding to each abnormal usage reason of each product is different.

7. The log record generation configuration system as claimed in claim 5, characterized in that: The product includes an insurance product, the business scenario includes an insurance sales scenario, and the determination module includes: A first obtaining unit, configured to obtain a first reason for abnormal use of the insurance product in the insurance sales scenario; a first determining unit, configured to establish a first correspondence between the insurance product, the insurance sales scenario, and the first reason, and determine the log recording rule according to the first correspondence; and / or, The product includes a coupon product, the business scenario includes a coupon sales scenario and a coupon use scenario, and the determination module includes: A second obtaining unit, configured to obtain a second reason for abnormal use of the coupon product in the coupon selling scenario or the coupon using scenario; The second determining unit is used to establish a second corresponding relationship between the coupon product, the coupon sales scenario or the coupon usage scenario and the second reason, and determine the log recording rule according to the second corresponding relationship.

8. The log record generation configuration system as claimed in claim 5, characterized in that: The product includes a lounge product, the business scenario includes a lounge gift scenario and a lounge sales scenario, and the determination module includes: A third obtaining unit, configured to obtain a third reason for abnormal use of the lounge product in the lounge gifting scenario or the lounge selling scenario; A third determining unit, configured to establish a third correspondence between the lounge product, the lounge gifting scenario or the lounge selling scenario and the third reason, and determine the log recording rule according to the third correspondence; and / or, The product includes an in-flight meal product, the business scenario includes a paid meal scenario and a free meal scenario, and the determination module includes: A fourth obtaining unit, configured to obtain a fourth reason for abnormal use of the in-flight meal product in the paid meal scenario and the free meal scenario; The fourth determining unit is used to establish a fourth corresponding relationship between the in-flight meal product, the paid meal scenario or the free meal scenario and the fourth reason, and determine the log recording rule according to the fourth corresponding relationship.

9. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for configuring log record generation according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the configuration method for log record generation according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Service scene prediction and classification method, system and device and storage medium

    CN110197188A

  • Dynamic log record management method and system of micro-service gateway

    CN113407421A