CN114780361A - Log generation method, device, computer system and readable storage medium - Google Patents

Log generation method, device, computer system and readable storage medium Download PDF

Info

Publication number
CN114780361A
CN114780361A CN202210352858.9A CN202210352858A CN114780361A CN 114780361 A CN114780361 A CN 114780361A CN 202210352858 A CN202210352858 A CN 202210352858A CN 114780361 A CN114780361 A CN 114780361A
Authority
CN
China
Prior art keywords
log
target
service
rule
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210352858.9A
Other languages
Chinese (zh)
Inventor
张建荣
魏亚东
吴俊轶
王晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210352858.9A priority Critical patent/CN114780361A/en
Publication of CN114780361A publication Critical patent/CN114780361A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The disclosure provides a log generation method, which can be used in the financial field or other fields. The method comprises the following steps: acquiring service information of a service to be processed by using a tangent plane technology through a log tangent plane dynamic proxy device; determining the service type of the service to be processed based on the service information; determining a target business record rule matched with the business type from a plurality of business record rules by using a log section dynamic proxy device; under the condition that the target business recording rule is used for representing and recording business information, a log section dynamic proxy device is used for determining target information matched with a target log field recording rule from the business information; and generating, with the logging device, a target log based on the target information. The disclosure also provides a log generation apparatus, a computer system, a readable storage medium, and a computer program product.

Description

Log generation method, device, computer system and readable storage medium
Technical Field
The disclosure relates to the field of finance, and may be used in any field other than the field of finance, and the application field of the disclosure is not limited. And more particularly, to a log generation method, apparatus, computer system, readable storage medium, and computer program product.
Background
With the increase of the complexity of the service system, the running state, daily operation details, service flow details and the like of the system can be recorded in a log mode.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: the codes for generating the logs are added in the service data acquisition program to form an invasive log recording mode, which is not beneficial to the reconstruction of the log recording mode.
Disclosure of Invention
In view of the above, the present disclosure provides a log generation method, apparatus, computer system, readable storage medium, and computer program product.
One aspect of the present disclosure provides a log generation method, including:
acquiring service information of a service to be processed by using a tangent plane technology through a log tangent plane dynamic proxy device;
determining the service type of the service to be processed based on the service information;
determining a target business record rule matched with the business type from a plurality of business record rules by using the log section dynamic proxy device, wherein the business record rules are preset by a log record rule configuration device;
under the condition that the target business record rule is determined to be used for representing and recording the business information, utilizing the log tangent plane dynamic proxy device to determine target information matched with a target log field record rule from the business information, wherein the target log field record rule is determined from a plurality of log field record rules, the target log field record rule is a log field record rule matched with the business type, and the plurality of log field record rules are preset by the log record rule configuration device; and
a target log is generated by the log recording device based on the target information.
According to an embodiment of the present disclosure, the log generation method further includes:
and in response to receiving an update request for updating the business record rule or the log field record rule, utilizing the log record rule configuration device to execute an update operation on the business record rule or the log field record rule to be updated based on the update request.
According to an embodiment of the present disclosure, the log generation method further includes:
in response to receiving an addition request for adding a service record rule of a new service type or a log field record rule of the new service type, based on the addition request, performing an addition operation on the service record rule of the new service type or the log field record rule of the new service type by using the log record rule configuration device.
According to an embodiment of the present disclosure, the determining, by using the log section dynamic proxy device, target information matched with a target log field record rule from the service information includes:
determining a target log operation recording rule from a plurality of log operation recording rules by using the log section dynamic proxy device based on the service type, wherein the plurality of log operation recording rules are preset by the log operation recording rule configuration device; and
and determining the target information matched with the target log field record rule from the service information based on the target log operation record rule.
According to an embodiment of the present disclosure, the generating, by the log recording apparatus, the target log based on the target information includes:
determining the format of the target information by using the log record rule configuration device;
converting the target information into information conforming to a predetermined format by using the log recording device when the format of the target information is determined not to conform to the predetermined format; and
and generating the target log based on the information conforming to the predetermined format by using the log recording device.
According to an embodiment of the present disclosure, the acquiring service information by using a profile technology through the log profile dynamic proxy apparatus includes:
and responding to a service request received from a user, and acquiring the service information of the service to be processed by using the profile technology through the log profile dynamic proxy device, wherein the service request comprises the service information.
According to an embodiment of the present disclosure, the log generating method further includes:
storing the target log in a target storage space by using the logging device,
wherein the target storage space comprises at least one of: database, log file, cloud space.
Another aspect of the present disclosure provides a log generating apparatus including:
the acquisition module is used for acquiring the service information of the service to be processed by using a section technology through the log section dynamic proxy device;
a type determining module, configured to determine a service type of the service to be processed based on the service information;
a rule determining module, configured to determine, by using the log tangent plane dynamic proxy device, a target service recording rule matching the service type from multiple service recording rules, where the multiple service recording rules are preset by a log recording rule configuration device;
an information matching module, configured to, in a case that it is determined that the target service recording rule is used for characterizing and recording the service information, determine, by using the dynamic proxy device for log section, target information that matches a target log field recording rule from the service information, where the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule that matches the service type, and the plurality of log field recording rules are preset by the log recording rule configuration device; and
and the generating module is used for generating a target log based on the target information by using the log recording device.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to implement the method as described above.
Another aspect of the disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the service information is acquired by using the section technology through the log section dynamic proxy device; determining a service type based on the service information; determining a target business recording rule matched with the business type from a plurality of business recording rules by using a log section dynamic proxy device, wherein the plurality of business recording rules are preset by a log recording rule configuration device; under the condition that the target business recording rule is determined to be used for representing and recording the business information, a log section dynamic proxy device is utilized to determine the target information matched with a target log field recording rule from the business information, the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule matched with the business type, and the plurality of log field recording rules are preset through a log recording rule configuration device; and a technical means of generating a target log by using a log recording device based on target information can provide a non-invasive user operation behavior log recording method for a service system by using a face technology through a log face dynamic proxy device, and can quickly and effectively complete the recording of a user operation behavior log. Meanwhile, aiming at the stock business system, under the conditions of large code file quantity, complicated business scenes and complicated business types, rules can be preset through the log recording rule configuration device, and the reconstruction of a user operation behavior log recording mode is ensured to be implemented on the premise of not modifying the stock business module program through a combined mode of dynamic calling of the log section dynamic proxy device according to the business types, so that the influence on the stock business system is reduced, and the risk is reduced to the maximum extent.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture for log generation methods and apparatus to which the present disclosure may be applied;
FIG. 2 schematically shows a flow diagram of a method of log generation according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow diagram of a method of log generation according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram for generating a target log according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a block diagram of a log generation apparatus according to an embodiment of the present disclosure; and
FIG. 6 schematically shows a block diagram of a computer system suitable for implementing a method of log generation according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that these descriptions are illustrative only and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a log generation method. The method comprises the steps that service information is obtained by a log section dynamic proxy device through a section technology; determining a service type based on the service information; determining a target business recording rule matched with the business type from a plurality of business recording rules by using a log section dynamic proxy device, wherein the plurality of business recording rules are preset by a log recording rule configuration device; under the condition that the target business recording rule is determined to be used for representing and recording the business information, utilizing a log section dynamic proxy device to determine the target information matched with a target log field recording rule from the business information, wherein the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule matched with the business type, and the log field recording rules are preset through a log recording rule configuration device; and generating, with the logging device, a target log based on the target information.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the log generation method and apparatus may be applied, according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The backend management server may analyze and process the received data such as the user request, and feed back a processing result (for example, a web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the log generation method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the log generation apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The log generation method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the log generating apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the log generation method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Accordingly, the log generating apparatus provided by the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or disposed in another terminal device different from the terminal device 101, 102, or 103.
For example, the service information of the service to be processed may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, but not limited to, the terminal device 101), or may be stored on an external storage device and may be imported into the terminal device 101. The service information of the service to be processed is sent to other terminal devices, servers, or server clusters, and the log generation method provided by the embodiment of the present disclosure is executed by the other terminal devices, servers, or server clusters receiving the service to be processed.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a log generation method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S250.
In operation S210, service information of a service to be processed is acquired by the log profile dynamic proxy apparatus using the profile technology.
In operation S220, a service type of the service to be processed is determined based on the service information.
In operation S230, a target service record rule matching the service type is determined from a plurality of service record rules by using the logging facet dynamic proxy apparatus, wherein the plurality of service record rules are preset by the logging rule configuration apparatus.
In operation S240, in case that it is determined that the target service recording rule is used for characterizing the recorded service information, the log tangent plane dynamic proxy device is used to determine target information matching with a target log field recording rule from the service information, wherein the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule matching with the service type, and the plurality of log field recording rules are preset by the log recording rule configuration device.
In operation S250, a target log is generated based on the target information using a logging apparatus.
According to the embodiment of the present disclosure, the field related to the to-be-processed service is not limited, and for example, the to-be-processed service may be a to-be-processed service in a financial field, or a to-be-processed service in a field such as education, production, or manufacturing, as long as a log needs to be recorded for a processing flow of the service.
According to the embodiment of the disclosure, the service information includes information such as an identifier and a detail of the service to be processed. The service information of the service to be processed may include one or more of identification information, account information, name information, single number information, amount information, time information, geographical location information, service type information, and flow information.
According to the embodiment of the present disclosure, taking the to-be-processed service in the financial field as an example, the service type of the to-be-processed service may include a remittance type, a deposit type, a loan type, a settlement type, and the like, as long as the service type relates to the financial field, which is not described herein again.
According to the embodiment of the present disclosure, service information of a service to be processed may be acquired by a logging tangent plane dynamic proxy apparatus using tangent plane (AOP) technology. The log section dynamic proxy device can perform user behavior log record in proxy before all service function modules are executed through the section technology of the dynamic proxy on the premise of ensuring that all stock service function module programs are not modified.
According to the embodiment of the disclosure, the plurality of service recording rules are preset by the log recording rule configuration device, and the plurality of service recording rules are matched with the plurality of service types one by one. The dynamic proxy device of the log section can determine a target business record rule matched with the business type of the business to be processed from a plurality of business record rules. In a case that the target service recording rule is determined to be used for characterizing the recorded service information, the log recording rule configuration device may be used to determine the target log field recording rule from the plurality of log field recording rules, and further, the target log field recording rule may be used to determine the target information from the service information of the service to be processed. Thereby, the target log can be generated based on the target information by the logging means. In case it is determined that the target traffic logging rule is used to characterize that no traffic information is logged, the execution of the subsequent operations of the log generation method may be stopped.
According to the embodiment of the disclosure, a log section dynamic proxy device can provide a non-invasive user operation behavior log recording method for a service system by using a section technology, and can quickly and effectively complete the recording of a user operation behavior log. Meanwhile, aiming at the stock service system, under the conditions of large code file quantity, complicated service scene and service type, the rules can be preset through the log recording rule configuration device, and the log section dynamic proxy device is dynamically called according to the service type, so that the improvement of the log recording mode of user operation behaviors is ensured on the premise of not modifying the stock service module program, the influence on the stock service system is reduced, and the risk is reduced to the maximum extent.
It should be noted that the log recording rule configuration device, the log recording device, and the log tangent plane dynamic proxy device provided in the embodiment of the present disclosure may be understood as an electronic device, a module, a unit, or the like, respectively. The logging rule configuration device, the logging device, and the dynamic log-cut agent device may each be loaded with one or more programs, and when the programs are executed, the functions provided by the embodiments of the present disclosure can be implemented.
The method shown in fig. 2 is further described with reference to fig. 3-4 in conjunction with specific embodiments.
Fig. 3 schematically shows a flow diagram of a log generation method according to an embodiment of the present disclosure.
As shown in fig. 3, the logging service end may include a logging-plane dynamic proxy device 310, a logging rule configuration device 320, and a logging device 330.
The log profile dynamic proxy device 310 may receive a service request from a user, for example, the clients 341, 342, 343, and in response to receiving the service request from the user, obtain service information of a service to be processed by using the profile technology. The service request may include service information of the service to be processed. But is not limited thereto. The service request from the user can be received by other modules of the log generation server, and the service information of the service to be processed is acquired by using the profile technology in response to the received service request from the user through the log profile dynamic proxy device.
The log profile dynamic proxy device 310 may determine the traffic type of the pending traffic based on the traffic information. And invokes a plurality of service recording rules in the logging rule configuration device 320, and matches a target service recording rule matched with the service to be processed from the plurality of service recording rules.
The logging rule configuration device 320 may preset a plurality of service logging rules, but is not limited to this, and may also preset a plurality of logging field logging rules and a plurality of logging operation logging rules.
The log-tangent dynamic proxy device 310 may determine whether the pending service needs to generate a target log based on the target service recording rule. In the case that the target service recording rule is determined to be used for characterizing the recorded service information, the log recording rule configuring device 320 may be used to determine the target log field recording rule from the plurality of log field recording rules, and further, the target log field recording rule may be used to determine the target information from the service information of the service to be processed.
The logging-plane dynamic proxy device 310 may send the target information to the logging device 330, generate a target log based on the target information by using the logging device 330, and store the target log in the target storage space. The target storage space includes at least one of: database, log file, disk, cloud space.
According to the embodiment of the disclosure, the log recording device can determine the target storage space of the target log based on the target log operation recording rule matched with the service to be processed. But is not limited thereto. The logging apparatus may determine a target storage space of the target log based on a service request from a user. The service request or the target log operation record rule contains information of the target storage space.
According to the embodiment of the disclosure, the log section dynamic proxy device, the log recording rule configuration device and the log recording device are matched with each other, so that the log recording rule matched with the service to be processed and the log field recording rule are dynamically called to generate the target log aiming at the service to be processed of different service types, and the flexibility and the intelligence of generating the target log are improved.
According to an embodiment of the present disclosure, for operation S240, determining, by the log-tangent-plane dynamic proxy apparatus, target information matching the target log field recording rule from the service information may include the following specific operations.
For example, a target logging rule is determined from a plurality of logging rules based on the traffic type using a logging facet dynamic proxy device. The plurality of logging rule configuration means are provided in advance. And determining target information matched with the target log field record rule from the service information based on the target log operation record rule.
According to the embodiment of the disclosure, the log operation recording rule may include a storage rule, and the storage rule is used for characterizing the rule of the storage space. But is not limited thereto. The logging rules may also include rules for characterizing logging operations behavior. A target logging rule matching the pending traffic may be determined from the plurality of logging rules. And in the case that the target log operation rule is determined to be used for representing the record target operation behavior, determining target information matched with the target log field record rule from the service information. And in the case that the target log operation rule is determined to be used for representing that the target operation behavior is not recorded, stopping executing the operation of recording the operation behavior.
According to the embodiment of the disclosure, one to-be-processed service is executed, and generally, a plurality of operation behaviors need to be executed. For each of the plurality of operational behaviors, it may be determined whether logging is required by a target logging operation logging rule.
For example, the operation behaviors include an operation behavior of changing a table name, an operation behavior of adding, an operation behavior of deleting, and an operation behavior of querying. The recording rule can be operated based on the target log, and the operation behavior of the query is determined not to need to be recorded. And recording the newly added operation behavior, and taking the newly added operation behavior as a target operation behavior. In the case where the target log operation rule is determined to be used for characterizing the recording target operation behavior, target information matching the target log field recording rule may be determined from the traffic information. It should be noted that the target log field record rule includes a rule for recording an operation type field.
According to an embodiment of the present disclosure, the log generation method may further include an update rule operation.
For example, in response to receiving an update request for updating a business record rule or a log field record rule, based on the update request, the log record rule configuration device is used for executing an update operation on the business record rule or the log field record rule to be updated.
According to the embodiment of the disclosure, the log recording rule configuration device can be utilized to update the service recording rule to be updated or the log field recording rule to be updated in real time and rapidly according to the update request. But is not limited thereto. An update operation may also be performed on the log operation record rule to be updated.
According to the embodiment of the present disclosure, the type of the update operation is not limited, and for example, the target update business record rule included in the update request may be used to replace the business record rule to be updated.
According to the embodiment of the disclosure, according to the transformation requirement of the target log, the log recording rule configuration device can be used for updating and modifying one or more of the service recording rule, the log field recording rule and the log operation recording rule, so that the modification mode of the code file by using a log recording program is avoided, and the operation and maintenance cost and the implementation risk are reduced.
According to an embodiment of the present disclosure, the log generation method may further include an add rule operation.
For example, in response to receiving an addition request for adding a service recording rule of a new service type or a log field recording rule of a new service type, based on the addition request, the adding operation is performed on the service recording rule of the new service type or the log field recording rule of the new service type by using the log recording rule configuration means.
According to the embodiment of the disclosure, the log record rule configuration device can be used for performing addition operation on a new business record rule or a new log field record rule according to an addition request in real time and rapidly.
According to the embodiment of the disclosure, the log recording rule configuration device can be used for increasing and modifying one or more of the business recording rules and the log field recording rules according to the modification requirements of the target log, so that the modification mode of code files by using a log recording program is avoided, and thus, the operation and maintenance cost and the implementation risk are reduced.
FIG. 4 schematically shows a flow diagram for generating a target log according to another embodiment of the present disclosure.
As shown in fig. 4, the operation S250 of generating the target log based on the target information using the logging apparatus may specifically include operations S251 to S253.
In operation S251, it may be determined whether the format of the target information conforms to a predetermined format using the logging rule configuration means. In the case where it is determined that the format of the target information does not conform to the predetermined format, operations S252 and S253 are performed. In a case where it is determined that the format of the target information coincides with the predetermined format, operation S253 is performed.
In operation S252, the target information is converted into information conforming to a predetermined format using the logging apparatus.
In operation S253, a target log is generated based on information conforming to a predetermined format using a logging apparatus.
According to an embodiment of the present disclosure, the predetermined format may be determined from log field record rules. The predetermined format may refer to a preset format of the target information. For example, the predetermined format may refer to a recording form of time information, a case recording form of money amount, or whether field information to be recorded is sensitized or not.
According to the embodiment of the disclosure, the target information is converted into the information conforming to the predetermined format to generate the target log, which is beneficial to the unified management and recording of the target log.
It should be noted that, unless explicitly stated that there is an execution sequence between different operations or there is an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may not be sequential, or multiple operations may be executed simultaneously in the flowchart in this disclosure.
Fig. 5 schematically shows a block diagram of a log generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the log generating apparatus 500 includes an obtaining module 501, a type determining module 502, a rule determining module 503, an information matching module 504, and a generating module 505.
An obtaining module 501, configured to obtain service information of a service to be processed by using a tangent plane technology through a log tangent plane dynamic proxy device.
A type determining module 502, configured to determine a service type of the service to be processed based on the service information.
The rule determining module 503 is configured to determine, by using the log-tangent dynamic proxy apparatus, a target service record rule matching the service type from a plurality of service record rules, where the plurality of service record rules are preset by the log record rule configuration apparatus.
And an information matching module 504, configured to, in a case that it is determined that the target service recording rule is used to characterize and record the service information, determine, by using the log tangent plane dynamic proxy apparatus, target information that matches the target log field recording rule from the service information, where the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule that matches the service type, and the plurality of log field recording rules are preset by the log recording rule configuration apparatus.
A generating module 505, configured to generate a target log based on the target information by using the log recording apparatus.
According to an embodiment of the present disclosure, the log generating apparatus may further include a rule updating module.
And the rule updating module is used for responding to an updating request for updating the business recording rule or the log field recording rule and executing updating operation on the business recording rule to be updated or the log field recording rule to be updated by using the log recording rule configuration device based on the updating request.
According to an embodiment of the present disclosure, the log generating apparatus may further include a rule adding module.
And the rule adding module is used for responding to the received adding request for adding the business record rule of the new business type or the log field record rule of the new business type, and performing adding operation on the business record rule of the new business type or the log field record rule of the new business type by utilizing the log record rule configuration device based on the adding request.
According to an embodiment of the present disclosure, an information matching module may include a first determination unit, and a second determination unit.
The first determining unit is used for determining a target log operation recording rule from a plurality of log operation recording rules based on the service type by using the log section dynamic proxy device, wherein the plurality of log operation recording rules are preset by the log operation recording rule configuration device; and
and the second determining unit is used for determining target information matched with the target log field recording rule from the service information based on the target log operation recording rule.
According to an embodiment of the present disclosure, a generation module may include a format determination unit, a format conversion unit, and a log generation unit.
A format determination unit for determining a format of the target information by the log recording rule configuration means;
a format conversion unit for converting the target information into information conforming to a predetermined format by using the log recording device in a case where it is determined that the format of the target information does not conform to the predetermined format; and
a log generating unit for generating a target log based on the information conforming to the predetermined format by the log recording device.
According to an embodiment of the present disclosure, the acquisition module may include an acquisition unit.
And the acquisition unit is used for responding to a service request received from a user and acquiring the service information of the service to be processed by using the profile technology through the log profile dynamic proxy device, wherein the service request comprises the service information.
According to an embodiment of the present disclosure, the log generating apparatus may further include a storage module.
A storage module for storing the target log in the target storage space by using the log recording device,
according to an embodiment of the present disclosure, the target storage space comprises at least one of: database, log file, disk, cloud space.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the obtaining module 501, the type determining module 502, the rule determining module 503, the information matching module 504, and the generating module 505 may be combined into one module/unit/sub-unit to be implemented, or any one of the modules/units/sub-units may be split into multiple modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the obtaining module 501, the type determining module 502, the rule determining module 503, the information matching module 504, and the generating module 505 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or any suitable combination of any of them. Alternatively, at least one of the obtaining module 501, the type determining module 502, the rule determining module 503, the information matching module 504, and the generating module 505 may be implemented at least in part as a computer program module that, when executed, may perform corresponding functions.
It should be noted that, the log generation apparatus part in the embodiment of the present disclosure corresponds to the log generation method part in the embodiment of the present disclosure, and the description of the log generation apparatus part specifically refers to the log generation method part, which is not described herein again.
Fig. 6 schematically shows a block diagram of a computer system suitable for implementing the above described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 6 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 6, a computer system 600 according to an embodiment of the present 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 section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include on-board memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the system 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, system 600 may also include an input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604. The system 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. A driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609 and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being adapted to cause the electronic device to carry out the method of log generation provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 601, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, downloaded and installed via the communication section 609, and/or installed from a removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures 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 the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the disclosure, and these alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A method of log generation, comprising:
acquiring service information of a service to be processed by using a tangent plane technology through a log tangent plane dynamic proxy device;
determining the service type of the service to be processed based on the service information;
determining a target business record rule matched with the business type from a plurality of business record rules by using the log section dynamic proxy device, wherein the business record rules are preset by a log record rule configuration device;
under the condition that the target service recording rule is determined to be used for characterizing and recording the service information, determining target information matched with a target log field recording rule from the service information by using the log section dynamic proxy device, wherein the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule matched with the service type, and the plurality of log field recording rules are preset by the log recording rule configuration device; and
and generating a target log by using a log recording device based on the target information.
2. The method of claim 1, further comprising:
and in response to receiving an update request for updating the business record rule or the log field record rule, utilizing the log record rule configuration device to execute an update operation on the business record rule or the log field record rule to be updated based on the update request.
3. The method of claim 1, further comprising:
in response to receiving an addition request for adding a service record rule of a new service type or a log field record rule of the new service type, performing an addition operation on the service record rule of the new service type or the log field record rule of the new service type by using the log record rule configuration device based on the addition request.
4. The method of claim 3, wherein the determining, by the logging tangent dynamic proxy device, target information from the traffic information that matches a target log field record rule comprises:
determining a target log operation recording rule from a plurality of log operation recording rules by using the log section dynamic proxy device based on the service type, wherein the plurality of log operation recording rules are preset by the log operation recording rule configuration device; and
and determining the target information matched with the target log field record rule from the service information based on the target log operation record rule.
5. The method of any of claims 1-4, wherein generating, with the logging device, a target log based on the target information comprises:
determining the format of the target information by using the log recording rule configuration device;
under the condition that the format of the target information is determined not to be in accordance with the preset format, converting the target information into information in accordance with the preset format by using the log recording device; and
generating, with the logging device, the target log based on the information conforming to the predetermined format.
6. The method of any one of claims 1 to 4, wherein the obtaining, by the log-slice dynamic proxy device, traffic information using a slice technique comprises:
and responding to a service request received from a user, and acquiring the service information of the service to be processed by using the section technology through the log section dynamic proxy device, wherein the service request comprises the service information.
7. The method of any of claims 1 to 4, further comprising:
storing the target log in a target storage space by using the logging device,
wherein the target storage space comprises at least one of: database, log file, disk, cloud space.
8. A log generation apparatus, comprising:
the acquisition module is used for acquiring the service information of the service to be processed by using a section technology through the log section dynamic proxy device;
the type determining module is used for determining the service type of the service to be processed based on the service information;
the rule determining module is used for determining a target business record rule matched with the business type from a plurality of business record rules by using the log section dynamic proxy device, wherein the business record rules are preset by a log record rule configuration device;
the information matching module is used for determining target information matched with a target log field recording rule from the service information by using the log section dynamic proxy device under the condition that the target service recording rule is determined to be used for representing and recording the service information, wherein the target log field recording rule is determined from a plurality of log field recording rules, the target log field recording rule is a log field recording rule matched with the service type, and the plurality of log field recording rules are preset by the log recording rule configuration device; and
and the generating module is used for generating a target log based on the target information by using a log recording device.
9. An electronic device, comprising:
one or more processors;
a memory to store one or more instructions that,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202210352858.9A 2022-04-01 2022-04-01 Log generation method, device, computer system and readable storage medium Pending CN114780361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210352858.9A CN114780361A (en) 2022-04-01 2022-04-01 Log generation method, device, computer system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210352858.9A CN114780361A (en) 2022-04-01 2022-04-01 Log generation method, device, computer system and readable storage medium

Publications (1)

Publication Number Publication Date
CN114780361A true CN114780361A (en) 2022-07-22

Family

ID=82427359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210352858.9A Pending CN114780361A (en) 2022-04-01 2022-04-01 Log generation method, device, computer system and readable storage medium

Country Status (1)

Country Link
CN (1) CN114780361A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882379A (en) * 2023-06-21 2023-10-13 武汉博易讯信息科技有限公司 Log template processing method and device based on DPI

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882379A (en) * 2023-06-21 2023-10-13 武汉博易讯信息科技有限公司 Log template processing method and device based on DPI

Similar Documents

Publication Publication Date Title
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN112948900A (en) Method and device for acquiring data under link applied to block chain system
CN115168398A (en) Data query method and device, electronic equipment and storage medium
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN111258988A (en) Asset management method, device, electronic device, and medium
CN113132400B (en) Business processing method, device, computer system and storage medium
CN114780807A (en) Service detection method, device, computer system and readable storage medium
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN114925066A (en) Data processing method and device, electronic equipment and storage medium
CN114201508A (en) Data processing method, data processing apparatus, electronic device, and storage medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113347250B (en) Data access method, data access device, electronic equipment and readable storage medium
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
CN114817314A (en) Data processing method and device, electronic equipment and storage medium
CN115695342A (en) Message processing method, device, equipment, medium and program product
CN113419922A (en) Method and device for processing batch job running data of host
CN117395314A (en) Request processing method, request processing device, electronic equipment and storage medium
CN117170805A (en) Batch job processing method and device, electronic equipment and storage medium
CN114202046A (en) SAP system-based method, device, equipment and medium for generating two-dimensional code
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN116757689A (en) Request processing method and device, electronic equipment and computer readable storage medium

Legal Events

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