CN115391827B - Log information storage method, apparatus, device, computer readable medium and product - Google Patents

Log information storage method, apparatus, device, computer readable medium and product Download PDF

Info

Publication number
CN115391827B
CN115391827B CN202211330727.7A CN202211330727A CN115391827B CN 115391827 B CN115391827 B CN 115391827B CN 202211330727 A CN202211330727 A CN 202211330727A CN 115391827 B CN115391827 B CN 115391827B
Authority
CN
China
Prior art keywords
operation request
information
preset
service type
micro
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211330727.7A
Other languages
Chinese (zh)
Other versions
CN115391827A (en
Inventor
李洪琳
王国伟
戎袁杰
刘明巍
方茂欢
张萌
梁志洲
都俊超
陈曦
燕鹏
隋志巍
陈恩光
潘建宏
李深山
高翔
毛硕
程志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
State Grid Materials Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
State Grid Materials Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Information and Telecommunication Co Ltd, Beijing Guodiantong Network Technology Co Ltd, State Grid Materials Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202211330727.7A priority Critical patent/CN115391827B/en
Publication of CN115391827A publication Critical patent/CN115391827A/en
Application granted granted Critical
Publication of CN115391827B publication Critical patent/CN115391827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/107License processing; Key processing
    • G06F21/1078Logging; Metering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

Embodiments of the present disclosure disclose log information storage methods, apparatus, devices, computer readable media and products. One embodiment of the method comprises: and determining historical operation request information of the user corresponding to the operation request information. The time difference between the operation request time and the historical operation request time is determined as an operation request interval duration. And determining whether the operation request interval duration meets a preset operable duration condition. And in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information. And performing combined processing on the parameter assembly template, the operation request time and the operation request parameters to generate operation log information. And determining the micro-service type corresponding to the operation request information. And calling the log micro-service corresponding to the micro-service type to store the operation log information into a database corresponding to the log micro-service. This embodiment may improve the security of the database.

Description

Log information storage method, apparatus, device, computer readable medium and product
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, a device, a computer-readable medium, and a product for storing log information.
Background
The log information is information for recording an operation performed on the client. At present, when log information is stored, the following methods are generally adopted: and after the user executes the operation on the terminal, the server receives and stores the operation request information corresponding to the operation.
However, the inventor has found that when log information is stored in the above manner, the following technical problems often occur:
first, the interval time of the user operation is not confirmed, but the operation request information corresponding to any operation is directly stored, and when the time is long, the information corresponding to the operation performed by the non-login user is easily stored in the database, which results in low security of the database.
Second, it is not determined whether operation log information corresponding to an operation performed by a non-login user is stored according to the stored operation log information, resulting in low security of the database.
Thirdly, new prompt information is not sent to the monitoring terminal of the application according to the stored operation log information, so that the developer cannot be prompted to optimize the application, and the adaptability of the application and the user is poor.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art in this country.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Some embodiments of the present disclosure propose log information storage methods, apparatuses, electronic devices, computer-readable media and computer program products to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a log information storage method, including: in response to receiving operation request information which is sent by a related terminal and aims at a target application, determining historical operation request information of a user corresponding to the operation request information, wherein the operation request information comprises operation request time and operation request parameters, and the historical operation request information comprises historical operation request time; determining the time difference between the operation request time and the historical operation request time as an operation request interval duration; determining whether the operation request interval duration meets a preset operable duration condition; in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information; performing combined processing on the parameter assembly template, the operation request time and the operation request parameters to generate operation log information; determining a micro service type corresponding to the operation request information according to a preset micro service type configuration information set, wherein preset micro service type configuration information in the preset micro service type configuration information set comprises a preset service type and a preset micro service type; and calling the log micro-service corresponding to the micro-service type to store the operation log information into a database corresponding to the log micro-service.
In a second aspect, some embodiments of the present disclosure provide a log information storage apparatus, the apparatus including: a first determining unit, configured to determine, in response to receiving operation request information for a target application sent by an associated terminal, historical operation request information of a user corresponding to the operation request information, wherein the operation request information includes an operation request time and an operation request parameter, and the historical operation request information includes a historical operation request time; a second determination unit configured to determine a time difference between the operation request time and the historical operation request time as an operation request interval duration; a third determining unit configured to determine whether the operation request interval duration satisfies a preset operable duration condition; a fourth determining unit, configured to, in response to determining that the operation request interval duration satisfies the preset operable duration condition, determine, according to request control information corresponding to the operation request information, a parameter assembly template corresponding to the operation request information; a combination unit configured to perform a combination process on the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information; a fifth determining unit, configured to determine a micro service type corresponding to the operation request information according to a preset micro service type configuration information set, where preset micro service type configuration information in the preset micro service type configuration information set includes a preset service type and a preset micro service type; and the calling unit is configured to call the log micro-service corresponding to the micro-service type so as to store the operation log information into a database corresponding to the log micro-service.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
In a fifth aspect, some embodiments of the present disclosure provide a computer program product comprising a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantages: by the log information storage method of some embodiments of the present disclosure, the security of the database can be improved. Specifically, the reasons for the low security of the database are: the operation request information corresponding to any operation is directly stored without confirming the interval time of the user operation, and when the time is long, the operation performed by the non-login user is easy to be stored in the database. Based on this, the log information storage method of some embodiments of the disclosure first determines, in response to receiving operation request information for a target application sent by an associated terminal, historical operation request information of a user corresponding to the operation request information, where the operation request information includes an operation request time and an operation request parameter, and the historical operation request information includes the historical operation request time. Therefore, the historical operation request information can be determined through the received operation request information, and the time length of the interval between the operation request information and the historical operation request information can be conveniently determined according to the operation request information and the historical operation request information. Then, the time difference between the operation request time and the historical operation request time is determined as an operation request interval duration. Therefore, how long the user has not operated the target application can be determined. Then, whether the operation request interval duration meets a preset operable duration condition is determined. Therefore, whether the user needs to log in again when the user executes the operation corresponding to the operation request information can be determined. And then, in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information. Therefore, when the user executes the operation corresponding to the operation request information and does not need to log in again, the parameter assembly template corresponding to the operation request information can be directly selected from the parameter assembly template configuration table which is set in advance. Then, the parameter assembly template, the operation request time and the operation request parameter are combined to generate operation log information. Thus, the parameter assembly template and the operation request time and the operation request parameter included in the operation request information can be combined to obtain the operation log information. And then, determining the micro-service type corresponding to the operation request information according to a preset micro-service type configuration information set, wherein the preset micro-service type configuration information in the preset micro-service type configuration information set comprises a preset service type and a preset micro-service type. Therefore, the micro-service type corresponding to the operation request information can be determined. And finally, calling the log micro-service corresponding to the micro-service type to store the operation log information to a database corresponding to the log micro-service. Therefore, the operation log information can be stored in a corresponding database, and background workers can conveniently look up the operation log information. The parameter assembly template corresponding to the operation request information is determined only when the operation request interval duration meets the preset operable duration condition. Therefore, the operation request information can be accurately determined to be the information operated by the login user, and the safety of the database can be improved. Thus, the safety of the database can be improved through the log information storage method of some embodiments of the disclosure.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a flow diagram of some embodiments of a log information storage method according to the present disclosure;
FIG. 2 is a schematic block diagram of some embodiments of a log information storage apparatus according to the present disclosure;
FIG. 3 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence of the functions performed by the devices, modules or units.
It is noted that references to "a" or "an" in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will appreciate that references to "one or more" are intended to be exemplary and not limiting unless the context clearly indicates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The operations of collecting, storing, using, etc., personal information (e.g., user identification) of a user, which are referred to in the present disclosure, include, before performing the corresponding operations, the related organizations or individuals as much as possible, including the carrying out of evaluation of security influence of personal information, the fulfillment of an obligation informing a personal information body, the acquisition of an authorization approval of the personal information body in advance, and the like, and the compliance with the regulations of the related laws and regulations.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Referring to fig. 1, a flow 100 of some embodiments of a log information storage method according to the present disclosure is shown. The log information storage method comprises the following steps:
step 101, in response to receiving operation request information for a target application sent by an associated terminal, determining historical operation request information of a user corresponding to the operation request information.
In some embodiments, in response to receiving operation request information for a target application sent by an associated terminal, an executing subject (e.g., a computing device) of the log information storage method may determine historical operation request information of a user corresponding to the operation request information. The associated terminal may be a terminal device that communicates with the execution main body by a wired connection method or a wireless connection method. For example, the associated terminal may be a mobile phone, a computer, or the like. The target application may be any application installed on the terminal and associated with the execution subject. For example, the target application may be a spreadsheet-like application. The execution subject may serve as a background server for the target application. The operation request information may be information representing an operation performed by a user on the target application. For example, the operation request information may be "XX operation for XX minutes and XX seconds". The operation request information may include an operation request time and an operation request parameter. The above-mentioned historical operation request information may include a historical operation request time. The operation request time may be a time point when the user performs an operation on the target application. The operation request parameter may include at least one of: operation type, user identification, service type and request control information. The operation type may be a type used to characterize an operation corresponding to the operation request information. For example, the operation type may be any one of the following: delete operation, add operation, export operation, and query operation. The user identifier may uniquely represent a user corresponding to the operation request information. For example, the user identifier may be "user 01". The service type may be a type representing a service to be processed corresponding to the operation request information. For example, the type of service may be an audit service. The request control information may be information representing a position of a control corresponding to the operation request information. For example, the control position parameter may be page information of a control corresponding to the operation request information. The historical operation request information may be operation request information received before the operation request information and having the closest time. In practice, the execution main body may use the operation request information received last time before the operation request information is received as the history operation request information. It is noted that the wireless connection may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a UWB (ultra wideband) connection, and other wireless connection now known or developed in the future.
The computing device may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. And is not particularly limited herein.
Therefore, through the received operation request information, the historical operation request information can be determined, and the time length of the interval between the operation request information and the historical operation request information can be conveniently determined according to the operation request information and the historical operation request information.
And 102, determining the time difference between the operation request time and the historical operation request time as the operation request interval duration.
In some embodiments, the execution main body may determine a time difference between the operation request time and the historical operation request time as an operation request interval duration. Therefore, the method can determine how long the user has not operated the target application.
Step 103, determining whether the operation request interval duration meets a preset operable duration condition.
In some embodiments, the execution main body may determine whether the operation request interval duration satisfies a preset operable duration condition. The preset operable duration condition may be that the operation request interval duration is less than a preset operable duration. The preset operable duration may be a duration representing that the user may not log in again within a time range smaller than the preset operable duration after operating the target application. Therefore, whether the user needs to log in again when the user executes the operation corresponding to the operation request information can be determined.
And step 104, in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information.
In some embodiments, in response to determining that the operation request interval duration satisfies the preset operable duration condition, the execution main body may determine, according to request control information corresponding to the operation request information, a parameter assembly template corresponding to the operation request information. The parameter assembly template may be a character string template for assembling with the operation request information to generate operation log information. For example, the parameter assembly template may be "In thatIn thatImplement". The underlined part in the parameter assembly template described above may characterize the filling. The first underlined section in the parameter assembly template described above may be used to populate the user identification. The second underlined portion of the parameter assembly template may be used to fill in the operation request time. The third underlined section in the parameter assembly template described above may be used to populate the request control information. The fourth underlined section in the parameter assembly template described above may be used for the type of fill operation. In practice, the execution main body may determine the parameter assembly template corresponding to the operation request information according to a preset parameter assembly template configuration table. The preset parameter assembly template configuration table may include preset request control information and a preset parameter assembly template. The preset parameter assembly template configuration table may be used to represent a corresponding relationship between the preset request control information and the preset parameter assembly template. As an example, the execution body may determine a preset parameter assembly template corresponding to the preset request control information in the preset parameter assembly template configuration table and identical to the request control information as the parameter assembly template corresponding to the operation request information. Therefore, when the user executes the operation corresponding to the operation request information and does not need to log in again, the parameter assembly template corresponding to the operation request information can be directly selected from the preset parameter assembly template configuration table.
In some optional implementations of some embodiments, the operation request parameter may include an operation type.
Optionally, the executing body may execute the following steps:
and step one, selecting a preset parameter template group corresponding to the operation request information from a preset parameter template group set according to the request control information. Each preset parameter template set in the preset parameter template set corresponds to different request control information, and each preset parameter template in the preset parameter template set corresponds to different operation types. The preset parameter template may be a preset character string template for assembling with the operation request information to generate operation log information. Each preset parameter template in the preset parameter template group can correspond to the same request control information. In practice, the execution main body may determine a preset parameter template group, in which request control information corresponding to the preset parameter template group set is the same as the request control information, as the preset parameter template group corresponding to the operation request information.
And secondly, determining a preset parameter template corresponding to the operation type in the preset parameter template group as a parameter assembly template corresponding to the operation request information. In practice, the execution main body may determine a preset parameter template, in the preset parameter template group, corresponding to the operation type that is the same as the operation type, as a parameter assembly template corresponding to the operation request information.
Therefore, the parameter assembly template corresponding to the operation request information is selected according to the request control information and the operation type corresponding to the operation request information. The degree of engagement of the parameter assembly template and the operation request information can be improved.
And 105, combining the parameter assembly template, the operation request time and the operation request parameters to generate operation log information.
In some embodiments, the execution subject may perform a combined process on the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information. In practice, the execution body may concatenate the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information. Thus, the parameter assembly template and the operation request time and the operation request parameter included in the operation request information can be combined to obtain the operation log information.
Optionally, before the combining processing is performed on the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information, the executing body may further perform the following steps:
and step one, in response to the fact that the operation request interval duration does not meet the preset operable duration condition, sending re-login information to the terminal. The re-login information may represent information for reminding a user to re-login the account. For example, the re-login information may be presented in the form of a pop-up window.
And secondly, responding to the received user login success information which is sent by the terminal and corresponds to the re-login information, and determining whether the user identification corresponding to the user login success information is consistent with the user identification corresponding to the operation request information. The user login success information may be information representing that the user login is successful, which is sent by the terminal. For example, the user login success information may be "user logged in".
And thirdly, in response to the fact that the user identification corresponding to the user login success information is consistent with the user identification corresponding to the operation request information, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information.
Therefore, when the user executes the operation corresponding to the operation request information but does not need to log in again, the re-login information can be sent to enable the user to log in again, so that when the user identification corresponding to the re-login is consistent with the user identification corresponding to the operation request information, the parameter assembly template corresponding to the operation request information is determined again, and the accuracy of the operation request information can be improved.
In some optional implementations of some embodiments, the operation request parameter may further include a user identifier.
Optionally, the executing body may execute the following steps:
and step one, filling the operation request time, the operation type and the user identification included in the operation request parameters into the parameter assembly template to obtain the filled parameter assembly template. As an example, the parameter assembly template may be "In thatImplement". First, the execution body may fill the user identifier into a first underlined portion of the parameter assembly template to obtain the parameter assembly template with the user identifier filled. Then, the execution body may fill the operation request time into the second underlined part in the parameter assembly template after the user identifier is filled, to obtain the parameter assembly template after the operation request time is filled. Finally, the execution body may fill the operation type into the third underlined part in the parameter assembly template after the operation request time is filled, so as to obtain the filled parameter assembly template.
And secondly, determining the filled parameter assembly template as log information.
Therefore, the operation request time, the operation type and the user identification corresponding to the operation request information can be represented on the log information at the same time, so that a user can know the operation request information more comprehensively when looking up the log information.
And step 106, determining the micro service type corresponding to the operation request information according to a preset micro service type configuration information set.
In some embodiments, the execution subject may determine the micro service type corresponding to the operation request information according to a preset micro service type configuration information set. The preset micro service type configuration information in the preset micro service type configuration information set may include a preset service type and a preset micro service type. The preset micro service type configuration information may be preset information for representing a configuration relationship between a preset service type and a preset micro service type. For example, the preset micro service type configuration information may be preset information for representing a configuration relationship between a preset service type and a preset micro service type. The type of the micro-service may be a type of the micro-service that the operation request information needs to invoke. For example, the microservice type described above may be an audit microservice. The preset service type may be a preset service type. The preset micro-service type may be a preset micro-service type. In practice, the execution main body may determine the micro service type corresponding to the operation request information in various ways according to a preset micro service type configuration information set. Therefore, the micro-service type corresponding to the operation request information can be determined.
In some optional implementations of some embodiments, the executing body may perform the following steps:
and step one, responding to the operation request parameters including the service types, and determining the service types included in the operation request information as target service types. The service type may be a type used to characterize a service correspondingly processed by the operation request information.
In the second step, in response to that the operation request parameter does not include the service type, the execution subject may perform the following steps:
the first substep is to determine the service type corresponding to the operation request information according to the request control information corresponding to the operation request information. In practice, the execution main body may determine, as the service type corresponding to the operation request information, a preset service type in which preset request control information corresponding to the preset service type configuration table and the request control information are consistent. The preset service type configuration table comprises preset request control information and preset service types. The preset service type configuration table is used for representing the corresponding relation between the preset request control information and the preset service type.
And a second substep of determining the service type corresponding to the operation request information as a target service type.
And thirdly, according to the target service type, selecting preset micro service type configuration information meeting preset screening conditions from the preset micro service type configuration information set as target micro service type configuration information, wherein the preset screening conditions can be that the preset service type included in the preset micro service type configuration information is the same as the target service type. The preset micro service type configuration information set may include at least one preset micro service type configuration information. Each preset micro service type configuration information in the preset micro service type configuration information set may include a preset service type and a preset micro service type. The preset micro service type configuration information may be information for representing a corresponding relationship between a preset service type and a preset micro service type. In practice, the executing body may determine a preset service type included in the preset micro service type configuration information set and preset micro service type configuration information of the target service type as target micro service type configuration information.
And fourthly, determining a preset micro service type included in the target micro service type configuration information as the micro service type corresponding to the operation request information.
Therefore, the micro-service type can be determined according to the service type corresponding to the operation request information, so that the operation log information can be conveniently classified and stored according to the log micro-service called corresponding to the operation request information in the follow-up process, the storage efficiency is improved, and the user can conveniently look up the operation log information.
Step 107, the log microservice corresponding to the microservice type is called, so as to store the operation log information into the database corresponding to the log microservice.
In some embodiments, the execution subject may call a log microservice corresponding to the microservice type to store the operation log information in a database corresponding to the log microservice. Therefore, the operation log information can be stored in the corresponding database, and the user can conveniently look up the operation log information.
In some optional implementations of some embodiments, the executing body may perform the following steps:
and step one, calling the log micro-service corresponding to the micro-service type.
And step two, in response to receiving the calling failure information corresponding to the log micro-service, re-calling the log micro-service. The call failure information may be information indicating that the call logging microservice fails.
And thirdly, in response to the fact that the number of the received calling failure information corresponding to the log micro-service meets a preset calling number condition, storing the operation log information to a standby database. The preset calling quantity condition may be that the quantity of the received calling failure information corresponding to the log microservice is greater than or equal to a preset calling quantity. For example, the preset number of calls may be 3. The backup database may be a database for backup. In practice, in response to that the number of the received call failure information corresponding to the log microservice is greater than or equal to a preset call number, the execution main body may store the operation log information to a standby database.
And fourthly, responding to the condition that the current time meets the preset interval duration, calling the log micro-service corresponding to the micro-service type, and storing the operation log information stored in the standby database into a database corresponding to the log micro-service. The preset interval duration condition can represent that the time interval between the current time and the time of receiving the call failure information corresponding to the log microservice for the last time is larger than the preset interval duration. In practice, in response to that the current time meets a preset interval duration condition, the execution main body may call the log microservice corresponding to the microservice type, so as to store the operation log information stored in the standby database to the database corresponding to the log microservice.
And fifthly, in response to receiving the calling success information corresponding to the log microservice and the standby database, deleting the operation log information stored in the database from the standby database. The calling success information may be information representing that the log microservice is successfully called.
Therefore, when the log micro-service cannot be called for many times, the operation log information can be stored in the standby database, the log micro-service is called again after the preset interval duration, and when the calling is successful, the operation log information stored in the standby database is stored in the database corresponding to the log micro-service and deleted, so that the probability of losing the operation log information can be reduced.
In some optional implementations of some embodiments, the operation type may include any one of: adding operation, deleting operation, inquiring operation and exporting operation.
Optionally, the executing body may execute the following operations:
the first step, for each operation log information in the database, executing the following steps:
and a first substep, grouping the operation log information according to the request control information corresponding to the operation log information to obtain operation log information groups. The request control information corresponding to each operation log information group may be different. In practice, the execution main body may divide the operation log information with the same request control information in each operation log information into a group, so as to obtain each operation log information group.
A second substep of executing, for each operation log information group included in the respective operation log information groups, the processing steps of:
firstly, determining the operation log information of which the operation type is the new operation and which is included in the operation log information group as the new operation log information to obtain a new operation log information set.
Secondly, determining the quantity of each new operation log information included in the new operation log information set as the quantity of the new operation log information.
Thirdly, the number of each operation log information included in the operation log information group is determined as the number of the operation log information.
Fourthly, determining the ratio of the number of the newly added operation log information to the number of the operation log information as the ratio of the newly added operation log information.
Fifthly, in response to the fact that the proportion of the newly added operation log information is larger than a preset threshold value, newly added prompt information is generated according to the request control information corresponding to the operation log information group. The preset threshold may be a threshold indicating that the operation log information corresponding to the newly added operation log information ratio is abnormal when the newly added operation log information ratio is greater than the preset threshold. The new prompt information may be information representing that a developer is prompted to perform new optimization on a page corresponding to the request control information in the target application. In practice, in response to determining that the ratio of the newly added operation log information is greater than the preset threshold, the execution main body may perform combination processing on the request control information corresponding to the operation log information group and a preset newly added prompt template to obtain newly added prompt information. For example, the predetermined newly added prompt template may be a suggestion pairAnd (6) performing new optimization. The underlined part in the preset newly-added prompt template can represent the part to be filled. The underlined part in the preset newly-added prompt template can be used for filling the request control information.
And secondly, sending each generated newly-added prompt message to the monitoring terminal of the target application. The monitoring terminal of the target application may be a terminal device connected to the execution main body and configured to monitor the target application. For example, the monitoring terminal of the target application may be a mobile phone, a computer, or the like.
Therefore, the operation types of the operation log information corresponding to the same user identifier and the same request control information are grouped, and the proportion of the newly added operation is determined, so that newly added prompt information can be sent to the monitoring terminal of the target application according to the proportion of the newly added operation, and developers are prompted to optimize the target application.
The first step and the second step are used as an invention point of the embodiment of the disclosure, and the technical problem mentioned in the background art is solved, namely, the technical problem that the newly added prompt information is not sent to the monitoring terminal of the application according to the stored operation log information, so that the developer cannot be prompted to optimize the application, and the adaptability of the application and the user is poor. The reason for poor adaptation of the application to the user is: and sending new prompt information to the monitoring terminal of the application without the stored operation log information, so that a developer cannot be prompted to optimize the application. If the above factors are solved, the effect of improving the adaptability of the application and the user can be achieved. In order to achieve the effect, the operation types of the operation log information corresponding to the same user identifier and the same request control information are grouped, and the proportion of the operation log information of which the corresponding operation type is the newly increased operation is determined, so that when the proportion of the operation log information of which the corresponding operation type is the newly increased operation is larger, the newly increased prompt information can be generated and sent to the monitoring terminal of the target application, and then developers are prompted to optimize the target application, so that the adaptability of the application and the user is improved.
Optionally, the executing body may execute the following operations:
the first step is that for each operation log information in the database, according to each user identification corresponding to each operation log information, each operation log information is classified to obtain each operation log information set as each user operation log information set. Wherein, each user identifier corresponding to each user operation log information set may be different. In practice, the execution main body may divide the operation log information corresponding to the same user identifier in each operation log information into the same set, so as to obtain each operation log information set.
The second step, for each user operation log information set in the user operation log information sets, executing the following steps:
and a first substep, classifying the user operation log information sets according to the request control information corresponding to the user operation log information in the user operation log information sets to obtain the user operation log information sets as the control operation log information sets. The control operation log information sets may be different from each other in terms of request control information corresponding to the control operation log information sets. In practice, the execution main body may divide the user operation log information corresponding to the same request control information in the user operation log information sets into the same set, so as to obtain each control operation log information set.
A second substep, for each control operation log information set in the above control operation log information sets, performing the following steps:
firstly, classifying the control operation log information included in the control operation log information set according to the operation type corresponding to each control operation log information in the control operation log information set to obtain each control operation log information group. And the control operation log information groups are respectively associated with the control operation log information groups. In practice, the execution main body may divide the control operation log information corresponding to the same operation type in the control operation log information set into one group, so as to obtain each control operation log information group.
Secondly, determining the number of the control operation log information included in the control operation log information set as the total amount of the control operation log information.
And thirdly, determining the number of the control operation log information included in each control operation log information group as a control operation log information component to obtain a control operation log information component set.
Fourthly, determining the ratio of each control operation log information component in the control operation log information component set to the total control operation log information as the operation type log information proportion.
And fifthly, determining the control operation log information group with the corresponding operation type log information proportion meeting the preset proportion condition as a target operation log information group. The preset proportion condition may be that the operation type log information proportion corresponding to the operation log information group is less than or equal to a preset proportion threshold, and the operation type log information proportion corresponding to the operation log information group is the smallest proportion among the operation type log information proportions corresponding to the operation log information groups. The preset proportion threshold may be a threshold indicating that an operation corresponding to the operation log information group corresponding to the operation type log information proportion greater than or equal to the preset proportion threshold is an abnormal operation. For example, the preset ratio threshold may be 0.03.
Sixth, for each target operation log information in the target operation log information group, the following steps may be performed:
first, historical operation log information corresponding to the target operation log information is determined.
Then, a time difference between the operation request time corresponding to the target operation log information and the operation request time corresponding to the history operation log information is determined as an interval time difference.
And thirdly, determining the target operation log information with the corresponding interval time difference larger than a preset time difference threshold value as abnormal operation log information to obtain at least one piece of abnormal operation log information. The preset time difference threshold may be a threshold that represents user abnormality when the interval time difference is greater than the preset time difference threshold.
And fourthly, generating user abnormal information corresponding to the abnormal operation log information according to each abnormal operation log information in the at least one abnormal operation log information to obtain at least one user abnormal information. The user abnormal information may be information indicating that the user corresponding to the abnormal operation log information may have an abnormality. In practice, the execution main body may perform combination processing on the abnormal operation log information and a preset user abnormal template to obtain user abnormal information corresponding to the abnormal operation log information. As an example, the preset user exception template may be: (a)) There may be an abnormality in the user corresponding to the operation log information. The underlined part in the preset user exception template can represent the part to be filled in. The underlined part in the preset user exception template can be used for filling exception operation log information.
And fifthly, sending each user abnormal information in the at least one user abnormal information to the terminal.
The first step to the fifth step are an inventive point of the embodiment of the present disclosure, and solve the technical problem mentioned in the background art that "it is not determined whether the operation log information corresponding to the operation performed by the non-login user is stored according to the stored operation log information, thereby resulting in lower security of the database". The reasons for the low security of the database are: it is not determined whether or not operation log information corresponding to an operation performed by a non-login user is stored based on the stored operation log information. If the above-mentioned factors are solved, the effect of further improving the accuracy of the operation log information stored in the database can be achieved. In order to achieve the effect, the method groups operation types corresponding to operation log information of the same user identifier and the same request control information, further determines the time difference between the operation request time corresponding to the operation log information and the operation request time corresponding to historical operation information when the operation log information with the smaller proportion of the corresponding operation types in all the operation types exists, and generates user abnormal information and sends the user abnormal information to a terminal of a user according to the abnormal operation log information when the time difference is larger than a preset time difference threshold value. Therefore, whether abnormal operation of the user exists or not can be accurately determined, the user is reminded, and therefore the safety of the database is improved.
The above embodiments of the present disclosure have the following advantages: by the log information storage method of some embodiments of the present disclosure, the security of the database can be improved. Specifically, the reasons for the low security of the database are: the operation request information corresponding to any operation is directly stored without confirming the time interval of the user operation, and when the time is long, the operation performed by the non-login user is easy to be stored in the database. Based on this, the log information storage method of some embodiments of the present disclosure first determines, in response to receiving operation request information for a target application sent by an associated terminal, historical operation request information of a user corresponding to the operation request information, where the operation request information includes an operation request time and an operation request parameter, and the historical operation request information includes the historical operation request time. Therefore, the historical operation request information can be determined through the received operation request information, and the duration of the interval between the operation request information and the historical operation request information can be conveniently determined according to the operation request information and the historical operation request information. Then, the time difference between the operation request time and the historical operation request time is determined as an operation request interval duration. Therefore, how long the user has not operated the target application can be determined. Then, whether the operation request interval duration meets a preset operable duration condition is determined. Therefore, whether the user needs to log in again when the user executes the operation corresponding to the operation request information can be determined. And then, in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information. Therefore, when the user executes the operation corresponding to the operation request information and does not need to log in again, the parameter assembly template corresponding to the operation request information can be directly selected from the preset parameter assembly template configuration table. Then, the parameter assembly template, the operation request time and the operation request parameter are combined to generate operation log information. Thus, the parameter assembly template and the operation request time and the operation request parameter included in the operation request information can be combined to obtain the operation log information. And then, determining the micro-service type corresponding to the operation request information according to a preset micro-service type configuration information set, wherein the preset micro-service type configuration information in the preset micro-service type configuration information set comprises a preset service type and a preset micro-service type. Therefore, the micro-service type corresponding to the operation request information can be determined. And finally, calling the log micro-service corresponding to the micro-service type to store the operation log information into a database corresponding to the log micro-service. Therefore, the operation log information can be stored in a corresponding database, and background workers can conveniently look up the operation log information. When the operation request interval duration meets the preset operable duration condition, the parameter assembly template corresponding to the operation request information is determined. Therefore, the operation request information can be accurately determined to be the information operated by the login user, and the safety of the database can be improved. Thus, the security of the database can be improved by the log information storage method of some embodiments of the present disclosure.
With further reference to fig. 2, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a log information storage apparatus, which correspond to those shown in fig. 1, and which may be applied in various electronic devices in particular.
As shown in fig. 2, the fault alarm device 200 applied to the power transmission line of some embodiments includes: a first determining unit 201, a second determining unit 202, a third determining unit 203, a fourth determining unit 204, a combining unit 205, a fifth determining unit 206 and a calling unit 207. The first determining unit 201 is configured to determine historical operation request information of a user corresponding to operation request information in response to receiving the operation request information, sent by an associated terminal, aiming at a target application, wherein the operation request information comprises operation request time and operation request parameters, and the historical operation request information comprises historical operation request time; a second determining unit 202 configured to determine a time difference between the operation request time and the historical operation request time as an operation request interval duration; a third determining unit 203 configured to determine whether the operation request interval duration satisfies a preset operable duration condition; a fourth determining unit 204, configured to, in response to determining that the operation request interval duration satisfies the preset operable duration condition, determine, according to request control information corresponding to the operation request information, a parameter assembly template corresponding to the operation request information; a combining unit 205 configured to perform a combining process on the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information; a fifth determining unit 206, configured to determine, according to a preset micro service type configuration information set, a micro service type corresponding to the operation request information, where preset micro service type configuration information in the preset micro service type configuration information set includes a preset service type and a preset micro service type; the calling unit 207 is configured to call the log microservice corresponding to the microservice type, so as to store the operation log information into a database corresponding to the log microservice.
It will be understood that the units described in the apparatus 200 correspond to the various steps in the method described with reference to fig. 1. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 200 and the units included therein, and are not described herein again.
Referring now to FIG. 3, a block diagram of an electronic device 300 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, or the like; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate with other devices, wireless or wired, to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 3 may represent one device or may represent multiple devices, as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. The computer program, when executed by the processing apparatus 301, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, 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 some embodiments of the 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. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving operation request information which is sent by a related terminal and aims at a target application, determining historical operation request information of a user corresponding to the operation request information, wherein the operation request information comprises operation request time and operation request parameters, and the historical operation request information comprises historical operation request time; determining the time difference between the operation request time and the historical operation request time as an operation request interval duration; determining whether the operation request interval duration meets a preset operable duration condition; in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information; combining the parameter assembly template, the operation request time and the operation request parameters to generate operation log information; determining a micro service type corresponding to the operation request information according to a preset micro service type configuration information set, wherein preset micro service type configuration information in the preset micro service type configuration information set comprises a preset service type and a preset micro service type; and calling the log micro-service corresponding to the micro-service type to store the operation log information into a database corresponding to the log micro-service.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, a combining unit, a fifth determining unit, and a calling unit. Where the names of these units do not constitute a limitation of the unit itself in some cases, for example, the third determination unit may also be described as a "unit that determines whether or not the above-described operation request interval duration satisfies the preset operable duration condition".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
Some embodiments of the present disclosure also provide a computer program product comprising a computer program that, when executed by a processor, implements any of the log information storage methods described above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (9)

1. A log information storage method, comprising:
in response to receiving operation request information which is sent by an associated terminal and aims at a target application, determining historical operation request information of a user corresponding to the operation request information, wherein the operation request information comprises operation request time and operation request parameters, and the historical operation request information comprises the historical operation request time;
determining the time difference between the operation request time and the historical operation request time as an operation request interval duration;
determining whether the operation request interval duration meets a preset operable duration condition;
in response to the fact that the operation request interval duration meets the preset operable duration condition, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information;
the parameter assembly template, the operation request time and the operation request parameters are combined to generate operation log information;
determining a micro service type corresponding to the operation request information according to a preset micro service type configuration information set, wherein the preset micro service type configuration information in the preset micro service type configuration information set comprises a preset service type and a preset micro service type;
and calling the log micro-service corresponding to the micro-service type to store the operation log information to a database corresponding to the log micro-service.
2. The method of claim 1, wherein prior to the combined processing of the parameter assembly template, the operation request time, and the operation request parameters to generate operation log information, the method further comprises:
responding to the condition that the operation request interval duration does not meet the preset operable duration condition, and sending re-login information to the terminal;
responding to the received user login success information which is sent by the terminal and corresponds to the re-login information, and determining whether a user identifier corresponding to the user login success information is consistent with a user identifier corresponding to the operation request information;
and in response to determining that the user identifier corresponding to the user login success information is consistent with the user identifier corresponding to the operation request information, determining a parameter assembly template corresponding to the operation request information according to the request control information corresponding to the operation request information.
3. The method of claim 1 or 2, wherein the operation request parameter comprises an operation type; and
the determining, according to the request control information corresponding to the operation request information, a parameter assembly template corresponding to the operation request information includes:
selecting a preset parameter template set corresponding to the operation request information from a preset parameter template set according to the request control information, wherein each preset parameter template set in the preset parameter template set corresponds to different request control information, and each preset parameter template in the preset parameter template set corresponds to different operation types;
and determining a preset parameter template corresponding to the operation type in the preset parameter template group as a parameter assembly template corresponding to the operation request information.
4. The method of claim 3, wherein the operation request parameters further include a user identification; and
the combining the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information includes:
filling the operation request time, the operation type included in the operation request parameters and the user identification into the parameter assembly template to obtain a filled parameter assembly template;
and determining the filled parameter assembly template as log information.
5. The method of claim 1, wherein the determining, according to a preset micro service type configuration information set, a micro service type corresponding to the operation request information includes:
determining the service type included in the operation request information as a target service type in response to the operation request parameter including the service type;
in response to the operation request parameter not including a traffic type, performing the steps of:
determining a service type corresponding to the operation request information according to the request control information corresponding to the operation request information;
determining the service type corresponding to the operation request information as a target service type;
according to the target service type, selecting preset micro service type configuration information meeting preset screening conditions from the preset micro service type configuration information set as target micro service type configuration information, wherein the preset screening conditions are that the preset service type included by the preset micro service type configuration information is the same as the target service type;
and determining the preset micro-service type included in the target micro-service type configuration information as the micro-service type corresponding to the operation request information.
6. The method of claim 1, wherein the invoking a log microservice corresponding to the microservice type to store the operation log information to a database corresponding to the log microservice comprises:
calling the log micro-service corresponding to the micro-service type;
in response to receiving the calling failure information corresponding to the log micro-service, re-calling the log micro-service;
responding to the fact that the number of the received calling failure information corresponding to the log micro service meets a preset calling number condition, and storing the operation log information to a standby database;
responding to the condition that the current time meets the preset interval duration, calling the log micro-service corresponding to the micro-service type, and storing the operation log information stored in the standby database into a database corresponding to the log micro-service;
and in response to receiving the calling success information corresponding to the log microservice and the standby database, deleting the operation log information stored in the database from the standby database.
7. A log information storage apparatus comprising:
a first determining unit, configured to determine, in response to receiving operation request information for a target application sent by an associated terminal, historical operation request information of a user corresponding to the operation request information, wherein the operation request information includes an operation request time and an operation request parameter, and the historical operation request information includes a historical operation request time;
a second determination unit configured to determine a time difference between the operation request time and the historical operation request time as an operation request interval duration;
a third determination unit configured to determine whether the operation request interval duration satisfies a preset operable duration condition;
a fourth determining unit, configured to, in response to determining that the operation request interval duration satisfies the preset operable duration condition, determine, according to request control information corresponding to the operation request information, a parameter assembly template corresponding to the operation request information;
a combination unit configured to perform a combination process on the parameter assembly template, the operation request time, and the operation request parameter to generate operation log information;
a fifth determining unit, configured to determine, according to a preset micro service type configuration information set, a micro service type corresponding to the operation request information, where preset micro service type configuration information in the preset micro service type configuration information set includes a preset service type and a preset micro service type;
and the calling unit is configured to call the log micro-service corresponding to the micro-service type so as to store the operation log information to a database corresponding to the log micro-service.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-6.
9. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1 to 6.
CN202211330727.7A 2022-10-28 2022-10-28 Log information storage method, apparatus, device, computer readable medium and product Active CN115391827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211330727.7A CN115391827B (en) 2022-10-28 2022-10-28 Log information storage method, apparatus, device, computer readable medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211330727.7A CN115391827B (en) 2022-10-28 2022-10-28 Log information storage method, apparatus, device, computer readable medium and product

Publications (2)

Publication Number Publication Date
CN115391827A CN115391827A (en) 2022-11-25
CN115391827B true CN115391827B (en) 2023-01-17

Family

ID=84115002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211330727.7A Active CN115391827B (en) 2022-10-28 2022-10-28 Log information storage method, apparatus, device, computer readable medium and product

Country Status (1)

Country Link
CN (1) CN115391827B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241049A (en) * 2020-01-06 2020-06-05 深圳市同洲电子股份有限公司 Distributed operation log implementation system based on micro-service architecture
CN112685706A (en) * 2020-12-29 2021-04-20 平安普惠企业管理有限公司 Request authentication method and related equipment
CN114647698A (en) * 2022-03-02 2022-06-21 广东省电信规划设计院有限公司 Data synchronization method and device and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180121669A1 (en) * 2016-10-27 2018-05-03 International Business Machines Corporation Extended security scrutiny of data access requests in a dispersed storage network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241049A (en) * 2020-01-06 2020-06-05 深圳市同洲电子股份有限公司 Distributed operation log implementation system based on micro-service architecture
CN112685706A (en) * 2020-12-29 2021-04-20 平安普惠企业管理有限公司 Request authentication method and related equipment
CN114647698A (en) * 2022-03-02 2022-06-21 广东省电信规划设计院有限公司 Data synchronization method and device and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Log2: a cost-aware logging mechanism for performance diagnosis;Rui Ding等;《Proceedings of the 2015 USENIX Conference on Usenix Annual Technical Conference》;20150708;第139–150页 *
基于日志的微服务化系统监测与故障预测的研究与实现;王帅;《中国优秀硕士学位论文全文数据库 信息科技辑》;20200315;第11-35页 *

Also Published As

Publication number Publication date
CN115391827A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN111343009B (en) Service alarm notification method and device, storage medium and electronic equipment
CN115599640B (en) Abnormal supply end warning method, electronic device and medium
CN113268761B (en) Information encryption method and device, electronic equipment and computer readable medium
CN113760674A (en) Information generation method and device, electronic equipment and computer readable medium
CN115293657B (en) Carbon emission index information generation method, apparatus, electronic device, and medium
CN117156012B (en) Exception request data processing method, device, equipment and computer readable medium
CN111930709A (en) Data storage method and device, electronic equipment and computer readable medium
CN114584480A (en) Method and apparatus for service degradation handling
CN113656194A (en) Account checking result data notification method and device, electronic device and storage medium
CN116700907B (en) Service call demand document storage method, device, electronic equipment and readable medium
CN113760503A (en) Task migration method and device, electronic equipment and computer readable medium
CN116150249B (en) Table data export method, apparatus, electronic device and computer readable medium
WO2024066374A1 (en) Service degradation method and apparatus, device, computer-readable medium and program product
CN115391827B (en) Log information storage method, apparatus, device, computer readable medium and product
CN111639086A (en) Data reconciliation method, device, equipment and storage medium
CN115086347A (en) Data synchronization method and device, electronic equipment and storage medium
CN114428815A (en) Data storage method and device, electronic equipment and computer readable medium
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN114091909A (en) Collaborative development method, system, device and electronic equipment
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN110262756B (en) Method and device for caching data
CN113704063B (en) Performance monitoring method, device, equipment and storage medium of cloud mobile phone
CN113537028B (en) Control method, apparatus, device and medium for face recognition system
CN116915870B (en) Task creation request processing method, device, electronic equipment and readable medium
CN113378041B (en) Prompt message pushing method, device, electronic equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant