Log generation method, device, computer system, and readable storage medium
Patent Information
- Application Number
- CN202210352858.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2042-04-01
AI Technical Summary
[0003]在实现本公开构思的过程中,发明人发现相关技术中至少存在如下问题:在业务数据采集程序中添加生成日志的代码,形成入侵式日志记录方式,不利于日志记录方式的改造
[0036]According to embodiments of this disclosure, by employing a log aspect dynamic proxy device to obtain business information using aspect technology; determining the business type based on the business information; using the log aspect dynamic proxy device to determine a target business record rule matching the business type from multiple business record rules, wherein the multiple business record rules are pre-set by a log record rule configuration device; when it is determined that the target business record rule is used to represent the recording of business information, using the log aspect dynamic proxy device to determine target information matching the target log field record rule from the business information, the target log field record rule is determined from multiple log field record rules, the target log field record rule is a log field record rule matching the business type, the multiple log field record rules are pre-set by a log record rule configuration device; and using a log record device to generate target logs based on the target information, a non-intrusive user operation behavior log recording method can be provided to the business system using the log aspect dynamic proxy device and aspect technology, which can quickly and effectively complete the recording of user operation behavior logs. Meanwhile, for existing business systems, given the large amount of code files and the complexity of business scenarios and types, a combination of pre-setting rules through a log recording rule configuration device and dynamically calling log aspect dynamic proxy devices based on business types can be used to ensure that the user operation behavior logging method can be modified without modifying the existing business module program. This reduces the impact on existing business systems and minimizes risks.
Smart Images

Figure CN114780361B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the financial field, but can also be used in any field other than finance; the application areas of this disclosure are not limited. More specifically, it relates to a log generation method, apparatus, computer system, readable storage medium, and computer program product. Background Technology
[0002] As business systems become more complex, the system's operational status, daily operational details, and business process details can all be recorded through logs.
[0003] In realizing the concept disclosed herein, the inventors discovered at least the following problems in the related technology: adding code to generate logs in the business data collection program creates an intrusive log recording method, which is not conducive to the transformation of the log recording method. Summary of the Invention
[0004] In view of the above, this disclosure provides a log generation method, apparatus, computer system, readable storage medium, and computer program product.
[0005] One aspect of this disclosure provides a log generation method, including:
[0006] The log-based aspect-driven dynamic proxy device utilizes aspect technology to obtain business information for the tasks to be processed.
[0007] Based on the above business information, the business type of the above pending business is determined;
[0008] The aforementioned log aspect dynamic proxy device is used to determine the target business record rule that matches the aforementioned business type from multiple business record rules, wherein the aforementioned multiple business record rules are pre-set by the log record rule configuration device;
[0009] When it is determined that the aforementioned target business recording rule is used to characterize the recording of the aforementioned business information, the aforementioned log aspect dynamic proxy device is used to determine the target information matching the target log field recording rule from the aforementioned business information. The target log field recording rule is determined from multiple log field recording rules, and the target log field recording rule is a log field recording rule matching the aforementioned business type. The multiple log field recording rules are pre-set by the aforementioned log recording rule configuration device.
[0010] Based on the aforementioned target information, a target log is generated using a logging device.
[0011] According to embodiments of this disclosure, the log generation method further includes:
[0012] In response to receiving an update request for updating business record rules or log field record rules, the log record rule configuration device performs an update operation on the business record rules or log field record rules to be updated based on the update request.
[0013] According to embodiments of this disclosure, the log generation method further includes:
[0014] In response to receiving a request to add a business record rule for a new business type or a log field record rule for the new business type, the log record rule configuration device performs an add operation on the business record rule for the new business type or the log field record rule for the new business type based on the add request.
[0015] According to embodiments of this disclosure, the above-mentioned determination of target information matching the target log field recording rules from the above-mentioned business information using the above-mentioned log aspect dynamic proxy device includes:
[0016] Based on the aforementioned business type, the log aspect dynamic proxy device determines the target log operation rule from multiple log operation rules, wherein the multiple log operation rules are pre-configured by the aforementioned log rule configuration device; and
[0017] Based on the above target log operation recording rules, the target information that matches the above target log field recording rules is determined from the above business information.
[0018] According to embodiments of this disclosure, the above-mentioned generation of a target log using a log recording device based on the target information includes:
[0019] The format of the target information is determined using the aforementioned log recording rule configuration device.
[0020] If it is determined that the format of the target information does not conform to the predetermined format, the target information is converted into information conforming to the predetermined format using the aforementioned log recording device; and
[0021] The aforementioned log recording device generates the aforementioned target log based on information that conforms to the aforementioned predetermined format.
[0022] According to embodiments of this disclosure, the above-mentioned acquisition of business information using aspect technology via a log-aspect-oriented dynamic proxy device includes:
[0023] In response to receiving a service request from a user, the aforementioned log aspect dynamic proxy device uses the aforementioned aspect technology to obtain the aforementioned service information of the service to be processed, wherein the aforementioned service request includes the aforementioned service information.
[0024] According to embodiments of this disclosure, the log generation method further includes:
[0025] The target log is stored in the target storage space using the aforementioned logging device.
[0026] The target storage space mentioned above includes at least one of the following: database, log file, cloud space.
[0027] Another aspect of this disclosure provides a log generation apparatus, comprising:
[0028] The acquisition module is used to acquire business information of the business to be processed by the log aspect dynamic proxy device using aspect technology.
[0029] The type determination module is used to determine the business type of the above-mentioned business to be processed based on the above-mentioned business information.
[0030] The rule determination module is used to determine the target business record rule that matches the above-mentioned business type from multiple business record rules using the above-mentioned log aspect dynamic proxy device, wherein the above-mentioned multiple business record rules are preset by the log record rule configuration device;
[0031] The information matching module is used to, when it is determined that the target business record rule is used to characterize the recording of the aforementioned business information, utilize the aforementioned log aspect dynamic proxy device to determine target information matching the target log field record rule from the aforementioned business information. The target log field record rule is determined from multiple log field record rules, and the target log field record rule is a log field record rule matching the aforementioned business type. The multiple log field record rules are pre-set by the aforementioned log record rule configuration device.
[0032] The generation module is used to generate target logs based on the aforementioned target information using a log recording device.
[0033] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more instructions, wherein, when the one or more instructions are executed by the one or more processors, they cause the one or more processors to implement the method described above.
[0034] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to implement the method described above.
[0035] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, are used to implement the method described above.
[0036] According to embodiments of this disclosure, by employing a log aspect dynamic proxy device to obtain business information using aspect technology; determining the business type based on the business information; using the log aspect dynamic proxy device to determine a target business record rule matching the business type from multiple business record rules, wherein the multiple business record rules are pre-set by a log record rule configuration device; when it is determined that the target business record rule is used to represent the recording of business information, using the log aspect dynamic proxy device to determine target information matching the target log field record rule from the business information, the target log field record rule is determined from multiple log field record rules, the target log field record rule is a log field record rule matching the business type, the multiple log field record rules are pre-set by a log record rule configuration device; and using a log record device to generate target logs based on the target information, a non-intrusive user operation behavior log recording method can be provided to the business system using the log aspect dynamic proxy device and aspect technology, which can quickly and effectively complete the recording of user operation behavior logs. Meanwhile, for existing business systems, given the large amount of code files and the complexity of business scenarios and types, a combination of pre-setting rules through a log recording rule configuration device and dynamically calling log aspect dynamic proxy devices based on business types can be used to ensure that the user operation behavior logging method can be modified without modifying the existing business module program. This reduces the impact on existing business systems and minimizes risks. Attached Figure Description
[0037] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0038] Figure 1 This illustration schematically shows an exemplary system architecture for log generation methods and apparatus to which the present disclosure can be applied;
[0039] Figure 2 A flowchart illustrating a log generation method according to an embodiment of the present disclosure is shown schematically;
[0040] Figure 3 A schematic flowchart of a log generation method according to another embodiment of the present disclosure is shown;
[0041] Figure 4 A flowchart illustrating the generation of target logs according to an embodiment of the present disclosure is shown schematically;
[0042] Figure 5 A block diagram of a log generation apparatus according to an embodiment of the present disclosure is schematically shown; and
[0043] Figure 6A block diagram of a computer system suitable for implementing a log generation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0044] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0045] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0046] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0047] When using expressions such as "at least one of A, B, and C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Similarly, when using expressions such as "at least one of A, B, or C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, or C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0048] This disclosure provides a log generation method. The method includes: acquiring business information using aspect-oriented programming (AOP) technology via a log aspect-driven dynamic proxy device; determining a business type based on the business information; determining a target business record rule matching the business type from multiple business record rules using the log aspect-driven dynamic proxy device, wherein the multiple business record rules are pre-set by a log record rule configuration device; if the target business record rule is determined to represent the recording of business information, determining target information matching a target log field record rule from the business information using the log aspect-driven dynamic proxy device, wherein the target log field record rule is determined from multiple log field record rules, and the target log field record rule is a log field record rule matching the business type, and the multiple log field record rules are pre-set by the log record rule configuration device; and generating a target log based on the target information using a log record device.
[0049] Figure 1 An exemplary system architecture 100 to which log generation methods and apparatus can be applied according to embodiments of this disclosure is illustrated schematically. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0050] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0051] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).
[0052] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0053] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0054] It should be noted that the log generation method provided in this embodiment can generally be executed by server 105. Correspondingly, the log generation device provided in this embodiment can generally be located in server 105. The log generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the log generation device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Alternatively, the log generation method provided in this embodiment can also be executed by terminal devices 101, 102, or 103, or by other terminal devices different from terminal devices 101, 102, or 103. Correspondingly, the log generation device provided in this embodiment can also be located in terminal devices 101, 102, or 103, or in other terminal devices different from terminal devices 101, 102, or 103.
[0055] For example, the service information of the pending service can be originally stored in any one of terminal devices 101, 102, or 103 (e.g., terminal device 101, but not limited thereto), or stored on an external storage device and can be imported into terminal device 101. The service information of the pending service is sent to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the pending service execute the log generation method provided in the embodiments of this disclosure.
[0056] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0057] Figure 2 A flowchart illustrating a log generation method according to an embodiment of the present disclosure is shown schematically.
[0058] like Figure 2 As shown, the method includes operations S210 to S250.
[0059] During operation S210, the log aspect dynamic proxy device uses aspect technology to obtain the business information of the business to be processed.
[0060] In operation S220, the business type of the business to be processed is determined based on the business information.
[0061] In operation S230, the log aspect dynamic agent device is used to determine the target business record rule that matches the business type from multiple business record rules. These multiple business record rules are pre-configured by the log record rule configuration device.
[0062] In operation S240, when it is determined that the target business recording rule is used to represent the recording business information, the log aspect dynamic proxy device is used to determine the target information that matches the target log field recording rule from the business information. The target log field recording rule is determined from multiple log field recording rules. The target log field recording rule is a log field recording rule that matches the business type. The multiple log field recording rules are preset by the log recording rule configuration device.
[0063] When operating S250, the logging device generates a target log based on the target information.
[0064] According to the embodiments of this disclosure, the field involved in the business to be processed is not limited. For example, it can be a business to be processed in the financial field, or it can be a business to be processed in the fields of education, production, or manufacturing, as long as it is a field where the processing flow of the business needs to be logged.
[0065] According to embodiments of this disclosure, business information includes the identifier and details of the business to be processed. The business information of the business to be processed may include one or more of the following: identifier information, account information, name information, order number information, amount information, time information, geographical location information, business type information, and process information.
[0066] According to the embodiments of this disclosure, taking pending business in the financial field as an example, the business type of pending business may include remittance type, deposit type, loan type, settlement type, etc., as long as it involves the business type in the financial field, which will not be elaborated here.
[0067] According to embodiments of this disclosure, a log aspect-based dynamic proxy device can utilize Aspect-Oriented Programming (AOP) technology to obtain business information of the business to be processed. This log aspect-based dynamic proxy device can, through dynamic proxy aspect technology, proxy the recording of user behavior logs before all existing business function modules are executed, without modifying any existing business function modules.
[0068] According to embodiments of this disclosure, multiple business recording rules are pre-configured by a log recording rule configuration device, and each of these rules is matched one-to-one with multiple business types. The log aspect dynamic proxy device can determine a target business recording rule from among the multiple business recording rules that matches the business type of the business to be processed. If it is determined that the target business recording rule is used to represent recording business information, the log recording rule configuration device can determine the target log field recording rule from among the multiple log field recording rules, and then use the target log field recording rule to determine the target information from the business information of the business to be processed. Thus, the log recording device can generate a target log based on the target information. If it is determined that the target business recording rule is used to represent not recording business information, subsequent operations of the log generation method can be stopped.
[0069] According to embodiments of this disclosure, a non-intrusive user operation behavior logging method can be provided to business systems using aspect-based technology via a log aspect-driven dynamic proxy device, enabling rapid and effective logging of user operation behavior. Simultaneously, for existing business systems with large code files and complex business scenarios and types, a combination of a log rule configuration device for pre-setting rules and a log aspect-driven dynamic proxy device for dynamically invoking rules based on business type can ensure that the user operation behavior logging method can be modified without altering existing business module programs, minimizing the impact on existing business systems and reducing risks to the greatest extent possible.
[0070] It should be noted that the log recording rule configuration device, log recording device, and log aspect dynamic proxy device provided in the embodiments of this disclosure can be understood as electronic devices, devices, modules, or units, etc. Each of the log recording rule configuration device, log recording device, and log aspect dynamic proxy device can load one or more programs, and when the programs are executed, they can realize the functions provided in the embodiments of this disclosure.
[0071] The following is for reference. Figures 3-4 In conjunction with specific embodiments, Figure 2 The method shown will be further explained.
[0072] Figure 3 A schematic flowchart of a log generation method according to an embodiment of the present disclosure is shown.
[0073] like Figure 3 As shown, the log generation server may include a log aspect dynamic proxy device 310, a log recording rule configuration device 320, and a log recording device 330.
[0074] The log aspect-oriented dynamic proxy device 310 can receive business requests from users, such as clients 341, 342, and 343, and in response to these requests, use aspect-oriented programming to obtain the business information of the pending business. The business request may include, but is not limited to, the business information of the pending business. Other modules on the log generation server can also receive business requests from users and, through the log aspect-oriented dynamic proxy device, obtain the business information of the pending business using aspect-oriented programming.
[0075] The log aspect dynamic proxy device 310 can determine the business type of the business to be processed based on business information. It then calls multiple business record rules in the log recording rule configuration device 320 and matches the target business record rule that matches the business to be processed from among the multiple business record rules.
[0076] The log recording rule configuration device 320 can pre-set multiple business recording rules, but it is not limited to this. It can also pre-set multiple log field recording rules and multiple log operation recording rules.
[0077] The log aspect dynamic proxy device 310 can determine whether the business to be processed needs to generate a target log based on the target business recording rule. If the target business recording rule is determined to represent the recording of business information, the log recording rule configuration device 320 can be used to determine the target log field recording rule from multiple log field recording rules, and then the target information can be determined from the business information of the business to be processed using the target log field recording rule.
[0078] The log aspect dynamic proxy device 310 can send target information to the log recording device 330, which then generates a target log based on the target information and stores the target log in the target storage space. The target storage space includes at least one of the following: a database, log files, a disk, or cloud space.
[0079] According to embodiments of this disclosure, the logging device can determine the target storage space of the target log based on a target log operation recording rule that matches the service to be processed. However, it is not limited to this. The logging device can also determine the target storage space of the target log based on a service request from a user. The service request or the target log operation recording rule contains information about the target storage space.
[0080] According to embodiments of this disclosure, by utilizing a log aspect dynamic proxy device, a log recording rule configuration device, and a log recording device in cooperation, target logs can be generated by dynamically invoking log recording rules and log field recording rules that match the pending business for different business types, thereby improving the flexibility and intelligence of target log generation.
[0081] According to embodiments of this disclosure, for operation S240, using the log aspect dynamic proxy device to determine the target information that matches the target log field recording rule from the business information may include the following specific operations.
[0082] For example, a log aspect-based dynamic proxy device can determine a target log operation rule from multiple log operation rules based on business type. These multiple log operation rules are pre-configured using a log rule configuration device. Based on the target log operation rule, target information matching the target log field recording rule is determined from business information.
[0083] According to embodiments of this disclosure, log operation recording rules may include storage rules, which are rules used to characterize storage space. However, this is not the case. Log operation recording rules may also include rules used to characterize recording operation behavior. A target log operation recording rule matching the business to be processed can be determined from multiple log operation recording rules. If it is determined that the target log operation rule is used to characterize recording the target operation behavior, target information matching the target log field recording rule is determined from the business information. If it is determined that the target log operation rule is used to characterize not recording the target operation behavior, the operation of recording that operation behavior is stopped.
[0084] According to embodiments of this disclosure, executing a pending service typically requires performing multiple operations. For each of these operations, it can be determined whether or not it needs to be recorded using target log operation recording rules.
[0085] For example, operations include changing table names, adding entries, deleting entries, and querying entries. Based on the target log operation recording rules, it can be determined that querying entries do not need to be recorded. Adding entries needs to be recorded, and this added entry will be considered the target operation. When the target log operation rules are determined to characterize the recording of the target operation, target information matching the target log field recording rules can be identified from business information. It should be noted that these target log field recording rules include rules for recording operation type fields.
[0086] According to embodiments of this disclosure, the log generation method may further include an update rule operation.
[0087] For example, in response to receiving an update request for updating business record rules or log field record rules, the log record rule configuration device performs an update operation on the business record rule to be updated or the log field record rule to be updated based on the update request.
[0088] According to embodiments of this disclosure, a log recording rule configuration device can be used to perform update operations on business record rules or log field recording rules to be updated in real time and quickly based on update requests. However, it is not limited to this. Update operations can also be performed on log operation recording rules to be updated.
[0089] According to embodiments of this disclosure, the type of update operation is not limited. For example, the target update business record rule included in the update request can be used to replace the business record rule to be updated.
[0090] According to embodiments of this disclosure, one or more of the following can be updated or modified using a log recording rule configuration device, depending on the need to modify the target log: business recording rules, log field recording rules, and log operation recording rules. This avoids the need to modify code files using a log recording program, thereby reducing operation and maintenance costs and implementation risks.
[0091] According to embodiments of this disclosure, the log generation method may further include adding rule operations.
[0092] For example, in response to receiving an add request for adding a business record rule or a log field record rule for a new business type, the log record rule configuration device performs an add operation on the business record rule or the log field record rule for the new business type based on the add request.
[0093] According to embodiments of this disclosure, a log recording rule configuration device can be used to add new business record rules or new log field record rules in real time and quickly based on add requests.
[0094] According to embodiments of this disclosure, one or more of the business recording rules and log field recording rules can be added or modified using the log recording rule configuration device according to the needs of modifying the target log, thereby avoiding the method of modifying code files using a log recording program, thereby reducing operation and maintenance costs and implementation risks.
[0095] Figure 4 A flowchart illustrating the generation of a target log according to another embodiment of this disclosure is shown schematically.
[0096] like Figure 4 As shown, operation S250 utilizes a logging device to generate a target log based on target information, which may specifically include operations S251 to S253.
[0097] In operation S251, the log recording rule configuration device can be used to determine whether the format of the target information matches the predetermined format. If it is determined that the format of the target information does not match the predetermined format, operations S252 and S253 are executed. If it is determined that the format of the target information matches the predetermined format, operation S253 is executed.
[0098] In operation S252, the target information is converted into information conforming to a predetermined format using a log recording device.
[0099] In operation S253, the target log is generated using a logging device based on information conforming to a predetermined format.
[0100] According to embodiments of this disclosure, the predetermined format can be determined from log field recording rules. The predetermined format can refer to a pre-set format for the target information. For example, the predetermined format can refer to the recording format of time information, the recording format of amounts in both uppercase and lowercase letters, or whether the field information to be recorded is anonymized, etc.
[0101] According to embodiments of this disclosure, converting target information into information conforming to a predetermined format before generating target logs facilitates the unified management and recording of target logs.
[0102] It should be noted that, unless it is explicitly stated that there is a sequential order of execution between different operations, or that there is a sequential order of execution between different operations in terms of technical implementation, the execution order between multiple operations may not be significant, and multiple operations may be executed simultaneously.
[0103] Figure 5 A block diagram of a log generation apparatus according to an embodiment of the present disclosure is shown schematically.
[0104] like Figure 5 As shown, the log generation device 500 includes an acquisition module 501, a type determination module 502, a rule determination module 503, an information matching module 504, and a generation module 505.
[0105] The acquisition module 501 is used to acquire business information of the business to be processed by the log aspect dynamic proxy device using aspect technology.
[0106] The type determination module 502 is used to determine the business type of the business to be processed based on the business information.
[0107] The rule determination module 503 is used to determine the target business record rule that matches the business type from multiple business record rules using the log aspect dynamic proxy device. The multiple business record rules are pre-set by the log record rule configuration device.
[0108] The information matching module 504 is used to determine the target information that matches the target log field recording rule from the business information when it is determined that the target business recording rule is used to represent the recording business information. The target log field recording rule is determined from multiple log field recording rules. The target log field recording rule is a log field recording rule that matches the business type. The multiple log field recording rules are preset by the log recording rule configuration device.
[0109] The generation module 505 is used to generate a target log based on the target information using a log recording device.
[0110] According to embodiments of this disclosure, the log generation apparatus may further include a rule update module.
[0111] The rule update module is used to respond to received update requests for updating business record rules or log field record rules, and based on the update requests, to perform update operations on the business record rules or log field record rules to be updated using the log record rule configuration device.
[0112] According to embodiments of this disclosure, the log generation apparatus may further include a rule addition module.
[0113] The rule addition module is used to respond to a request to add a new business record rule or a new business field record rule for a new business type, and to perform an addition operation on the new business record rule or the new business field record rule for the new business type based on the addition request, using the log record rule configuration device.
[0114] According to embodiments of this disclosure, the information matching module may include a first determining unit and a second determining unit.
[0115] The first determining unit is used to determine a target log operation recording rule from multiple log operation recording rules based on the business type using a log aspect dynamic proxy device; wherein the multiple log operation recording rules are pre-configured by a log recording rule configuration device; and
[0116] The second determining unit is used to determine the target information that matches the target log field recording rules from the business information based on the target log operation recording rules.
[0117] According to embodiments of this disclosure, the generation module may include a format determination unit, a format conversion unit, and a log generation unit.
[0118] The format determination unit is used to determine the format of the target information using the log recording rule configuration device.
[0119] A format conversion unit is used to convert the target information into information that conforms to the predetermined format using a log recording device when it is determined that the format of the target information does not conform to the predetermined format; and
[0120] The log generation unit is used to generate a target log using a log recording device based on information conforming to a predetermined format.
[0121] According to embodiments of this disclosure, the acquisition module may include an acquisition unit.
[0122] The acquisition unit is used to respond to a business request received from a user by acquiring business information of the business to be processed through the log aspect dynamic proxy device using aspect technology. The business request includes business information.
[0123] According to embodiments of this disclosure, the log generation apparatus may further include a storage module.
[0124] The storage module is used to store target logs in the target storage space using a logging device.
[0125] According to embodiments of this disclosure, the target storage space includes at least one of the following: a database, log files, a disk, and cloud space.
[0126] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), Systems-on-Chip, Systems-on-Substrate, Systems-on-Package, Application-Specific Integrated Circuits (ASICs), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0127] For example, any multiple of the acquisition module 501, type determination module 502, rule determination module 503, information matching module 504, and generation module 505 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the acquisition module 501, type determination module 502, rule determination module 503, information matching module 504, and generation module 505 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the acquisition module 501, type determination module 502, rule determination module 503, information matching module 504, and generation module 505 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0128] It should be noted that the log generation device part in the embodiments of this disclosure corresponds to the log generation method part in the embodiments of this disclosure. For a detailed description of the log generation device part, please refer to the log generation method part, which will not be repeated here.
[0129] Figure 6 A block diagram of a computer system suitable for implementing the methods described above, according to embodiments of the present disclosure, is illustrated schematically. Figure 6 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0130] like Figure 6As shown, a computer system 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0131] RAM 603 stores various programs and data required for the operation of system 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0132] According to embodiments of this disclosure, system 600 may further include an input / output (I / O) interface 605, which is also connected to bus 604. System 600 may also include one or more of the following components connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. Communication section 609 performs communication processing via a network such as the Internet. Drive 610 is also connected to I / O interface 605 as needed. Removable media 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 610 as needed so that computer programs read from there are installed into storage section 608 as needed.
[0133] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by processor 601, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0134] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0135] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0136] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0137] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the log generation method provided in the embodiments of this disclosure.
[0138] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0139] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0140] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0142] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A log generation method, comprising: The log-based aspect-driven dynamic proxy device utilizes aspect technology to obtain business information for the tasks to be processed. Based on the business information, determine the business type of the business to be processed; The log aspect dynamic proxy device is used to determine the target business record rule that matches the business type from multiple business record rules. The multiple business record rules are preset by the log record rule configuration device, and the business record rules are used to determine whether to record the business information. When it is determined that the target business recording rule is used to characterize the recording of the business information, the log aspect dynamic proxy device is used to determine the target information that matches the target log field recording rule from the business information. The target log field recording rule is determined from multiple log field recording rules, and the target log field recording rule is a log field recording rule that matches the business type. The multiple log field recording rules are preset by the log recording rule configuration device. The log field recording rule is used to determine the field information to be recorded from the business information of the business to be processed. The target log is generated using a logging device based on the target information.
2. The method according to claim 1, further comprising: In response to receiving an update request for updating business record rules or log field record rules, the log record rule configuration device performs an update operation on the business record rule to be updated or the log field record rule to be updated based on the update request.
3. The method according to claim 1, further comprising: In response to receiving a request to add a business record rule or a log field record rule for a new business type, the log record rule configuration device performs an add operation on the business record rule or the log field record rule for the new business type based on the add request.
4. The method according to claim 3, wherein, The step of using the log aspect dynamic proxy device to determine the target information that matches the target log field recording rule from the business information includes: The log aspect dynamic proxy device, based on the business type, determines a target log operation rule from multiple log operation rules, wherein the multiple log operation rules are pre-configured by the log rule configuration device; and Based on the target log operation recording rules, the target information that matches the target log field recording rules is determined from the business information.
5. The method according to any one of claims 1 to 4, wherein, The process of generating a target log based on the target information using a log recording device includes: The format of the target information is determined using the log recording rule configuration device. If it is determined that the format of the target information does not conform to the predetermined format, the log recording device is used to convert the target information into information conforming to the predetermined format; and The target log is generated using the logging device based on the information that conforms to the predetermined format.
6. The method according to any one of claims 1 to 4, wherein, The method of obtaining business information through the log aspect dynamic proxy device using aspect technology includes: In response to receiving a service request from a user, the log aspect dynamic proxy device uses the aspect technology to obtain the service information of the service to be processed, wherein the service request includes the service information.
7. The method according to any one of claims 1 to 4, further comprising: The target log is stored in the target storage space using the log recording device. The target storage space includes at least one of the following: database, log file, disk, and cloud space.
8. A log generation apparatus, comprising: The acquisition module is used to obtain business information of the business to be processed by the log aspect dynamic proxy device using aspect technology. A type determination module is used to determine the business type of the business to be processed based on the business information. The rule determination module is used to determine the target business record rule that matches the business type from multiple business record rules using the log aspect dynamic proxy device, wherein the multiple business record rules are preset by the log record rule configuration device, and the business record rule is used to determine whether to record the business information; An information matching module is used to, when it is determined that the target business recording rule is used to characterize the recording of the business information, utilize the log aspect dynamic proxy device to determine target information from the business information that matches the target log field recording rule, wherein the target log field recording rule is determined from multiple log field recording rules, the target log field recording rule is a log field recording rule that matches the business type, the multiple log field recording rules are preset by the log recording rule configuration device, and the log field recording rule is used to determine the field information to be recorded from the business information of the business to be processed; and The generation module is used to generate a target log based on the target information using a log recording device.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more instructions. When the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 7.
11. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Log data processing method and device, electronic equipment and storage medium
CN113986864A