CN110825465A - Log data processing method and device, electronic equipment and storage medium - Google Patents

Log data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110825465A
CN110825465A CN201911075979.8A CN201911075979A CN110825465A CN 110825465 A CN110825465 A CN 110825465A CN 201911075979 A CN201911075979 A CN 201911075979A CN 110825465 A CN110825465 A CN 110825465A
Authority
CN
China
Prior art keywords
log data
processing function
log
interface
program interface
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
CN201911075979.8A
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.)
Reach Best Technology Co Ltd
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Reach Best Technology 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 Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN201911075979.8A priority Critical patent/CN110825465A/en
Publication of CN110825465A publication Critical patent/CN110825465A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Abstract

The disclosure relates to a log data processing method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: when a call instruction of a target program interface in a plurality of program interfaces is triggered, the call instruction is intercepted through an interception interface, a processing function is called, log data corresponding to the target program interface is generated by adopting the processing function, and the log data is stored and used for recording the operation of calling the target program interface. The intercepting interface intercepts the call instruction of other program interfaces, calls the processing function to monitor the other program interfaces and generate the log function, so that the monitoring of a plurality of program interfaces can be realized by calling one processing function, the processing function does not need to be written in each program interface needing to be monitored, the universality of the processing function is improved, the operation is simple and convenient, the labor and the time can be saved, and the operation efficiency is improved.

Description

Log data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log data processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of computer technology, various program interfaces are provided in an operating system to implement different functions, and operations corresponding to the program interfaces may be performed by calling the program interfaces. In order to record the execution condition of the program interface, the program interface needs to be monitored.
In the related art, when a program interface needs to be monitored, a processing function for monitoring is written in the program interface. And subsequently, when the program interface is called, the processing function can be adopted to generate log data and store the log data.
However, when a plurality of program interfaces need to be monitored, processing functions need to be written in each program interface, which is tedious to operate, consumes much labor and time, and has low operation efficiency.
Disclosure of Invention
The present disclosure provides a log data processing method, apparatus, electronic device and storage medium, which can overcome the problem of low operation efficiency caused by the need to write a processing function in each program interface respectively in the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a log data processing method, including:
acquiring configuration information, an interception interface and a processing function, wherein the configuration information comprises a plurality of program interfaces;
when a call instruction of a target program interface in the plurality of program interfaces is triggered, intercepting the call instruction through the interception interface, and calling the processing function, wherein the target program interface is any one of the plurality of program interfaces;
and generating log data corresponding to the target program interface by adopting the processing function, and storing the log data, wherein the log data is used for recording and calling the operation of the target program interface.
In a possible implementation manner, the call instruction carries an interface identifier of the target program interface, and the method further includes:
calling the processing function according to the interface identifier of the target program interface;
and generating log data corresponding to the interface identifier by adopting the processing function.
In another possible implementation manner, the call instruction carries user information, and the configuration information further includes a record mark of a user identifier, where the record mark includes a first mark or a second mark, the first mark is used to indicate that the user identifier is recorded, and the second mark is used to indicate that the user identifier is not recorded;
the generating, by using the processing function, log data corresponding to the target program interface includes:
and if the record mark is the first mark, acquiring a user identifier in the user information by adopting the processing function as log data.
In another possible implementation manner, the configuration information further includes an authentication manner, where the authentication manner is a single sign-on manner or a password sign-on manner, and if the record mark is the first mark, the processing function is used to obtain a user identifier in the user information, where the user identifier is used as log data, and the method includes:
if the record mark is the first mark and the identity authentication mode is the single sign-on mode, acquiring a user identifier from a first field in the user information as log data, wherein the first field is generated by a single sign-on system; alternatively, the first and second electrodes may be,
and if the record mark is the first mark and the authentication mode is the password login mode, acquiring a user identifier from a second field in the user information as log data, wherein the second field is generated by a password login system.
In another possible implementation manner, the processing function includes a storage path of a log file, and the storing the log data includes:
if a log file is created under the storage path, writing the log data into the log file; alternatively, the first and second electrodes may be,
and if the log file is not created under the storage path, creating the log file under the storage path, and writing the log data into the log file.
In another possible implementation manner, the configuration information further includes a recording period, the processing function includes a storage path of a log file, and the storing the log data includes:
acquiring a first log file with the latest creation time under the storage path;
when the difference value between the creation time of the first log file and the generation time of the log data is not more than the recording period, writing the log data into the first log file;
and when the difference value between the creation time of the first log file and the generation time of the log data is larger than the recording period, creating a second log file under the storage path, and writing the log data into the second log file.
In another possible implementation manner, the configuration information further includes a translation list, where the translation list includes text data of the multiple program interfaces, where the text data is used to describe operations corresponding to the program interfaces, and the generating, by using the processing function, log data corresponding to the target program interface includes:
and acquiring the text data of the target program interface in the translation list as the log data by adopting the processing function.
According to a second aspect of the embodiments of the present disclosure, there is provided a log data processing apparatus, the apparatus including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire configuration information, an interception interface and a processing function, and the configuration information comprises a plurality of program interfaces;
the function calling unit is configured to intercept a calling instruction through the interception interface and call the processing function when the calling instruction of a target program interface in the plurality of program interfaces is triggered, wherein the target program interface is any one of the plurality of program interfaces;
and the data generation unit is configured to generate log data corresponding to the target program interface by using the processing function, wherein the log data is used for recording the operation of calling the target program interface.
A data storage unit configured to store the log data.
In a possible implementation manner, the calling instruction carries an interface identifier of the target program interface, and the apparatus further includes:
the function calling unit is further configured to call the processing function according to the interface identifier of the target program interface;
the data generation unit is further configured to generate log data corresponding to the interface identifier by using the processing function.
In another possible implementation manner, the call instruction carries user information, and the configuration information further includes a record mark of a user identifier, where the record mark includes a first mark or a second mark, the first mark is used to indicate that the user identifier is recorded, and the second mark is used to indicate that the user identifier is not recorded;
the data generation unit includes:
and the identification acquisition subunit is configured to acquire the user identification in the user information as log data by adopting the processing function if the record mark is the first mark.
In another possible implementation manner, the configuration information further includes an authentication manner, where the authentication manner is a single sign-on manner or a password sign-on manner, and the data generating unit includes:
a first obtaining subunit, configured to, if the record mark is the first mark and the authentication mode is the single sign-on mode, obtain a user identifier from a first field in the user information as log data, where the first field is generated by a single sign-on system; alternatively, the first and second electrodes may be,
and the second obtaining subunit is configured to, if the record mark is the first mark and the authentication mode is the password login mode, obtain a user identifier from a second field in the user information as log data, where the second field is generated by a password login system.
In another possible implementation manner, the processing function includes a storage path of a log file, and the data storage unit includes:
a first storage subunit configured to write the log data to a log file if the log file has been created under the storage path; alternatively, the first and second electrodes may be,
and the second storage subunit is configured to create a log file under the storage path and write the log data into the log file if the log file is not created under the storage path.
In another possible implementation manner, the configuration information further includes a recording period, the processing function includes a storage path of a log file, and the data storage unit includes:
a file acquisition subunit configured to acquire a first log file with the latest creation time under the storage path;
a third storage subunit configured to write the log data into the first log file when a difference between a creation time of the first log file and a generation time of the log data is not more than the recording period;
a fourth storage subunit configured to create a second log file under the storage path and write the log data into the second log file when a difference between a creation time of the first log file and a generation time of the log data is greater than the recording period.
In another possible implementation manner, the configuration information further includes a translation list, where the translation list includes text data of the multiple program interfaces, and the text data is used to describe operations corresponding to the program interfaces, and the data generation unit includes:
a text acquisition subunit configured to acquire, as the log data, text data of the target program interface in the translation list using the processing function.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device for processing log data, the electronic device including:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the log data processing method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a computer device, enable the computer device to perform the log data processing method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of a computer device, enable the computer device to perform the log data processing method of the first aspect.
According to the log data processing method, the device, the electronic device and the storage medium provided by the embodiment of the disclosure, when a call instruction to a target program interface in a plurality of program interfaces is triggered, the call instruction is intercepted through an interception interface, a processing function is called, the processing function is adopted, log data corresponding to the target program interface is generated, and the log data is stored and used for recording the operation of calling the target program interface. The intercepting interface intercepts the call instruction of other program interfaces, calls the processing function to monitor the other program interfaces and generate the log function, so that the monitoring of a plurality of program interfaces can be realized by calling one processing function, the processing function does not need to be written in each program interface needing to be monitored, the universality of the processing function is improved, the operation is simple and convenient, the labor and the time can be saved, and the operation efficiency is improved.
And the configuration information also comprises a record mark of the user identifier, and when the record mark is a first mark, the user identifier in the user information is acquired by adopting a processing function and is used as log data. Therefore, each log data of the target program interface corresponds to one user identification, different users using the target program interface can be distinguished through the user identifications, the information quantity of the log data is improved, and the subsequent analysis of the operation behaviors of the different users is facilitated.
And the configuration information also comprises a recording period, and the log data is written into the corresponding log file according to the recording period. Therefore, different recording periods can be set for different application scenes, log data can be conveniently inquired according to the recording periods, and the orderliness of log files is enhanced.
And the configuration information also comprises text data of a plurality of program interfaces, the text data is used for describing the operation corresponding to the program interfaces, and the text data of the target program interface in the translation list is acquired as log data by adopting a processing function. The operation of calling the program interface is translated into the text data which can intuitively reflect the operation behavior of the user, so that the text data is used as log data, and the readability of the log data is enhanced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram illustrating one implementation environment in accordance with an example embodiment.
Fig. 2 is a flowchart illustrating a log data processing method according to an example embodiment.
Fig. 3 is a flow chart illustrating another log data processing method according to an example embodiment.
Fig. 4 is a flowchart illustrating another log data processing method according to an example embodiment.
Fig. 5 is a block diagram illustrating a log data processing apparatus according to an example embodiment.
Fig. 6 is a block diagram illustrating another log data processing apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a terminal according to an example embodiment.
FIG. 8 is a block diagram illustrating a server in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the disclosure provides a log data processing method, which can be implemented by an electronic device, and the electronic device can generate log data through configuration information, an interception interface and a processing function.
FIG. 1 is a schematic illustration of an implementation environment provided in accordance with an example embodiment, the implementation environment comprising: an electronic device 101 and a management device 102. The electronic device 101 and the management device 102 interact through a network connection.
The electronic device 101 and the management device 102 may be a server, a server cluster composed of a plurality of servers, a cloud computing service center, or a terminal, such as a mobile phone, a tablet computer, a desktop computer, or the like.
The management device 102 stores configuration information, an interception interface, and a processing function, the management device 102 provides the configuration information, the interception interface, and the processing function to the electronic device 101, the electronic device 101 may monitor a program interface in the electronic device 101 through the configuration information, the interception interface, and the processing function, generate log data, and store the log data, where the log data may record an operation of calling the program interface. The electronic device 101 may also send the log data to the management device 102, the management device 102 stores the log data, and a subsequent technician queries the log data on the management device 102
Fig. 2 is a flowchart illustrating a log data processing method according to an exemplary embodiment, and referring to fig. 2, the method is applied to a server, and includes the following steps:
in step 201, configuration information, an interception interface, and a processing function are obtained, where the configuration information includes a plurality of program interfaces.
In step 202, when a call instruction to a target program interface among the plurality of program interfaces is triggered, the call instruction is intercepted by the interception interface, and a processing function is called, where the target program interface is any one of the plurality of program interfaces.
In step 203, a processing function is used to generate log data corresponding to the target program interface, and the log data is stored, and is used to record the operation of calling the target program interface.
The method provided by the embodiment of the disclosure includes the steps of obtaining configuration information, an interception interface and a processing function, intercepting the call instruction through the interception interface when the call instruction of a target program interface in a plurality of program interfaces is triggered, calling the processing function, generating log data corresponding to the target program interface by adopting the processing function, and storing the log data, wherein the log data is used for recording the operation of calling the target program interface. The intercepting interface intercepts the call instruction of other program interfaces, calls the processing function to monitor the other program interfaces and generate the log function, so that the monitoring of a plurality of program interfaces can be realized by calling one processing function, the processing function does not need to be written in each program interface needing to be monitored, the universality of the processing function is improved, the operation is simple and convenient, the labor and the time can be saved, and the operation efficiency is improved.
In one possible implementation, the call instruction carries an interface identifier of the target program interface, and the method further includes:
calling a processing function according to the interface identifier of the target program interface;
and generating log data corresponding to the interface identifier by adopting a processing function.
In another possible implementation manner, the call instruction carries user information, the configuration information further includes a record mark of the user identifier, the record mark includes a first mark or a second mark, the first mark is used for indicating to record the user identifier, and the second mark is used for indicating not to record the user identifier;
generating log data corresponding to the target program interface by adopting a processing function, wherein the log data comprises the following steps:
and if the record mark is the first mark, acquiring a user identifier in the user information by adopting a processing function as log data.
In another possible implementation manner, the configuration information further includes an authentication manner, where the authentication manner is a single sign-on manner or a password sign-on manner, and if the record mark is the first mark, the processing function is adopted to obtain the user identifier in the user information, and the obtaining is used as log data, and includes:
if the record mark is a first mark and the authentication mode is a single sign-on mode, acquiring a user identifier from a first field in user information as log data, wherein the first field is generated by the single sign-on system; alternatively, the first and second electrodes may be,
and if the record mark is the first mark and the authentication mode is the password login mode, acquiring the user identification from a second field in the user information as log data, wherein the second field is generated by the password login system.
In another possible implementation manner, the processing function includes a storage path of a log file, and stores log data, and includes:
if the log file is created under the storage path, the log data is written into the log file; alternatively, the first and second electrodes may be,
and if the log file is not created under the storage path, creating the log file under the storage path, and writing the log data into the log file.
In another possible implementation manner, the configuration information further includes a recording period, the processing function includes a storage path of a log file, and the storing log data includes:
acquiring a first log file with the latest creation time under a storage path;
when the difference value between the creation time of the first log file and the generation time of the log data is not more than the recording period, writing the log data into the first log file;
and when the difference value between the creation time of the first log file and the generation time of the log data is larger than the recording period, creating a second log file under the storage path, and writing the log data into the second log file.
In another possible implementation manner, the configuration information further includes a translation list, where the translation list includes text data of a plurality of program interfaces, the text data is used to describe operations corresponding to the program interfaces, and the generating, by using a processing function, log data corresponding to the target program interface includes:
and acquiring text data of the target program interface in the translation list as log data by adopting a processing function.
Fig. 3 is a flowchart illustrating another log data processing method according to an exemplary embodiment, and referring to fig. 3, the method is applied to an electronic device, and includes the following steps:
in step 301, the electronic device obtains configuration information, an interception interface, and a processing function.
The operating system provides a program interface (api), which is a set of definitions, programs and protocols, and realizes mutual communication among the programs of the electronic device through the program interface, thereby providing data sharing for various programs. The programmer requests the operating system to provide services through a program interface in the program, for example, various functions such as uploading pictures, opening a camera, retrieving keywords, positioning, obtaining address book information, sending messages and the like may be implemented by calling different types of program interfaces, and the program interface may also be other types of interfaces, which is not limited herein.
In order to understand the operation behavior of the user based on the program interface, so as to improve and perfect the corresponding program according to the operation behavior of the user in the following, the program interface can be monitored, and the operation of calling the program interface is recorded. In the embodiment of the present disclosure, the electronic device acquires the configuration information, the interception interface, and the processing function, and generates log data for recording an operation of calling the program interface by using the configuration information, the interception interface, and the processing function.
The processing function is used for monitoring any program interface and generating log data.
The interception interface is used for intercepting a call instruction of any program interface and calling a processing function according to the call instruction.
The configuration information is used to specify operations to be performed by the processing function. The configuration information includes a plurality of program interfaces for monitoring the processing function, and the program interfaces can be set by developers or by default by the electronic device. In addition, the configuration information may also set other information to specify the operation performed by the processing function, such as the type of data generated by the processing function, the storage mode of the data, and the like.
The processing function, the configuration information and the interception interface acquired by the electronic device may be uploaded to the electronic device by a developer, or sent to the electronic device by other electronic devices.
In step 302, when a call instruction to a target program interface among the plurality of program interfaces is triggered, the electronic device intercepts the call instruction through the interception interface, and calls a processing function according to an interface identifier of the target program interface.
The electronic equipment can provide different services through a plurality of program interfaces, when the electronic equipment is required to provide a certain service, a call instruction of a target program interface corresponding to the service is triggered, and the electronic equipment intercepts the call instruction through an interception interface and calls a processing function. The target program interface is any one of a plurality of program interfaces.
In a possible implementation manner, the electronic device intercepts the call instruction through an interception interface, and determines whether the target program interface belongs to any program interface in the plurality of program interfaces in the configuration information. When the target program interface is any one of the plurality of program interfaces, determining that the target program interface needs to be monitored. The electronic device calls a handling function. When the target program interface is not any program interface of the plurality of program interfaces, it is determined that the target program interface does not need to be monitored, and the electronic device does not need to call a processing function.
In one possible implementation, the third flag or the fourth flag is included in the configuration information. And when the electronic equipment intercepts the calling instruction through the interception interface, judging whether the configuration information comprises a third mark or a fourth mark. If the configuration information includes the third flag, which indicates that any program interface needs to be monitored, that is, the target program interface needs to be monitored, the electronic device calls the processing function. And if the configuration information comprises the fourth mark, which indicates that the multiple program interfaces in the configuration information need to be monitored, judging whether the target program interface belongs to any one of the multiple program interfaces in the configuration information according to the interface identifier.
In another possible implementation manner, when the electronic device intercepts a call instruction of the target program interface through the interception interface, the electronic device calls the processing function first, and then executes the call instruction to call the target program interface. Or when the electronic equipment intercepts the call instruction of the target program through the interception interface, the electronic equipment executes the call instruction firstly, calls the target program interface, and then calls the processing function to generate log data.
In another possible implementation, each program interface has an interface identification, which may be the name, number, etc. of the program interface. In this embodiment, the call instruction carries an interface identifier of the target program interface, and the electronic device intercepts the call instruction through the interception interface and transfers the interface identifier of the target program interface to the processing function to call the processing function. And the processing function determines the target program interface according to the interface identifier and generates the log data of the target program interface. When the processing function receives any interface identifier, the processing function can generate log data corresponding to the interface identifier, that is, the processing function has universality, and the processing function can be used to generate log data corresponding to any program interface.
In step 303, when the configuration information further includes a record flag of the user identifier, if the record flag is the first flag, the electronic device obtains the user identifier in the user information as log data by using a processing function.
The calling instruction of the target program interface also carries user information, the user information refers to information of a user calling the target program interface, the user information comprises a user identifier, and the user identifier is used for representing the identity of the user and can be a user account, a telephone number, a user nickname, an email and the like.
The configuration information includes a record flag of the user identifier, where the record flag is used to specify an operation executed by the processing function, and specify whether the processing function records the user identifier in the user information, that is, whether the processing function records a user that triggers the program interface. Wherein the recording mark comprises a first mark or a second mark, the first mark is used for indicating that the user identification is recorded, and the second mark is used for indicating that the user identification is not recorded.
And if the record mark is the first mark, the electronic equipment determines that the user identification needs to be recorded, and then the user identification in the user information is acquired by adopting a processing function and is used as log data. If the record mark is the second mark, the electronic device determines that the user identifier does not need to be recorded, and the electronic device does not need to adopt a processing function to acquire the user identifier in the user information.
In a possible implementation manner, the configuration information further includes an authentication manner, where the authentication manner is used to specify an operation performed by the processing function, and specifies a manner in which the processing function is used to obtain the user identifier in the user information. The identity authentication mode is a single sign-on mode or a password sign-on mode.
And if the record mark is a first mark and the authentication mode is a single sign-on mode, acquiring a user identifier from a first field in the user information as log data. Wherein the first field is generated by a single sign-on system.
Single sign-on refers to that in a plurality of application systems, a user only needs to log on once to access all mutually trusted application systems. The single sign-on system is provided with the authentication equipment, when a user logs in a certain application system, the user can access any other application system within the authority range after the login authentication of the authentication equipment, and the login authentication is not required to be repeatedly carried out.
For example, the application system 1 is associated with the application system 2 and registered by a single sign-on method. When a user logs in for the first time, that is, accesses the application system 1, the user provides login information, the login information includes a user identifier, a login password, and the like, according to the user information provided by the user, the authentication device of the single sign-on system performs identity verification on the user, if the identity of the user passes the verification, the authentication device allows the user to log in the application system 1, and returns an authenticated Token (credential) to the user. When the user logs in for the second time, that is, accesses the application system 2, the Token is carried in the login request, and after receiving the login request, the application system 2 sends the Token to the authentication device for verification, so as to check the validity of the Token. If verified, the user may access the application system 2 without providing login information.
Therefore, when the identity verification mode is the single sign-on mode and the authentication device successfully verifies the Token in the sign-on request, the user identifier is used as a first field according to the sign-on information of the user, the user information comprising the first field is generated, and the user information is returned to the user.
And if the record mark is the first mark and the authentication mode is the password login mode, acquiring the user identification from a second field in the user information as log data. Wherein the second field is generated by the password entry system.
The password login method is that a user logs in by providing login information such as user identification and a user password, and the password login system takes the user identification as a second field according to the login information provided by the user and generates user information comprising the second field. Therefore, when the identity authentication mode is the password login mode, the electronic device acquires the user identifier from the second field in the user information as log data.
The user password may be a static password set by the user, such as a digital password, a pattern password, or the like, or a biological password such as a fingerprint, an iris, a face, or the like, or a dynamic password issued by the electronic device to the user, such as a short message authentication code, or the like. When the electronic equipment verifies that the password provided by the user is correct, login is allowed to be performed based on the user identification, and corresponding login information is stored.
In step 304, when the configuration information further includes the translation list, the electronic device obtains the text data of the target program interface in the translation list as log data by using a processing function.
The configuration information also comprises a translation list, wherein the translation list comprises text data of a plurality of program interfaces, and the text data is used for describing the corresponding operation of the program interfaces. When the electronic equipment monitors the target program interface by adopting the processing function, the text data of the target program interface in the translation list is obtained and is used as the log data corresponding to the target program interface. The operation of calling the program interface is translated into the text data which can visually reflect the operation behavior of the user, and the text data is used as log data, so that the readability of the log data can be improved.
For example, the program interface 1 is used for executing an operation of uploading a picture, the program interface 2 is used for executing an operation of opening a camera, the program interface 3 is used for executing an operation of retrieving a keyword, and the program interface 4 is used for executing an operation of sending a message. The translation list may be as shown in table 1 below.
TABLE 1
Program interface 1 Program interface 2 Program interface 3 Program interface 4
Uploading pictures Opening the camera Search key word Sending messages
It should be noted that, in the above-mentioned steps 303-304, the process of generating the log data corresponding to the interface identifier by using the processing function, that is, the process of generating the log data corresponding to the target program interface is adopted. The embodiment of the present disclosure is described by taking the steps 303 and 304 as examples. In another embodiment, step 304 may be performed first, and then step 303 may be performed, or both step 303 and step 304 may not be performed.
Further, while the above-mentioned step 304 describes the case where the user identifier is used as log data, and the above-mentioned step 305 describes the case where the text data is used as log data, in another embodiment, other types of data generated when the program interface is called may also be used as log data, for example, when the program interface executes operations such as uploading pictures, searching keywords, sending messages, etc., pictures, keywords, messages, etc. provided by the user may be acquired by using a processing function, and the pictures, keywords, messages may be used as log data.
In step 305, when the configuration information further includes a recording period, the electronic device writes the log data into a corresponding log file according to the recording period.
The configuration information may further include a recording period, which defines a storage period of the log data, for example, the recording period may be one day, one week, one month, and the like. The electronic equipment monitors the target program interface by adopting a processing function, generates log data corresponding to the target program interface, determines the recording period of the target program interface in the configuration information, and writes the log data into a log file corresponding to the recording period.
The process of writing the log data into the corresponding log file according to the recording period comprises the following steps: the electronic equipment acquires a first log file with the latest creation time under the storage path, and writes the log data into the first log file when the difference value between the creation time of the first log file and the generation time of the log data is not more than the recording period. And when the difference value between the creation time of the first log file and the generation time of the log data is larger than the recording period, creating a second log file under the storage path, and writing the log data into the second log file.
The processing function comprises a storage path of the log file, the storage path comprises a plurality of log files, each log file corresponds to one recording period, and only the log data generated in the recording period is allowed to be written. The electronic equipment acquires a first log file with the latest creation time under the storage path, namely the first log file is a newly created log file under the storage path. The electronic equipment acquires the creation time of the first log file and the generation time of the log data, and determines the difference value between the creation time and the generation time. When the difference is not greater than the recording period, it indicates that the creation time and the generation time are in the same recording period, that is, the log data is in the range of the first log file allowed to be written, and then the log data is written into the first log file. When the difference is greater than the recording period, it indicates that the creating time and the generating time are not in the same recording period, that is, the log data is not in the range in which the first log file is allowed to be written, then a second log file is created under the storage path, the recording period corresponding to the second log file is the same as the recording period corresponding to the log data, and the log data is written into the second log file.
For example, the recording period is one day, i.e., one log file corresponds to log data generated within 24 hours. If the creation time of the first log file is nine points at 10/18/2019 and the generation time of the log data is 6 points at 10/19/2019, the difference between the creation time and the generation time is 21 hours and is not greater than 24 hours of the recording period, so that the log data is written into the first log file. Or, if the creation time of the first log file is nine points of 10/18/2019 and the generation time of the log data is 11 points of 10/19/2019, the difference between the creation time and the generation time is 26 hours, which is greater than the recording period of 24 hours, and therefore, it is necessary to create a second log file under the storage path and write the log data into the second log file.
In one possible implementation, the processing function includes a storage path of the log file, and if the log file is created under the storage path, the log data is written into the log file, and if the log file is not created under the storage path, the log file is created under the storage path, and the log data is written into the log file.
The electronic equipment uniformly stores the log data generated at different times in a log file. When the log data are generated by adopting the processing function, the electronic equipment inquires the log file under the storage path of the log file, and if the log file is inquired, the log file is established under the storage path, and the log data are written into the log file. If the log file cannot be inquired, the description is that the log data corresponding to the target program interface is generated according to the processing function for the first time, and therefore the log file is not created in the storage path, the electronic equipment creates the log file in the storage path and writes the log data into the log file.
In another possible implementation manner, the processing function includes a log folder identifier, where the log folder identifier is used to uniquely determine one log folder, and may be a name of the log folder, or the like. The log folder corresponding to the log folder identifier is used for storing log files.
When the electronic equipment generates log data by adopting a processing function, inquiring whether a log folder corresponding to a log folder identifier is created or not, if so, inquiring a corresponding log file in the log folder, and writing the log data into the log file; and if the log folder corresponding to the log folder identifier is not inquired, creating the log folder according to the log folder identifier, creating a corresponding log file in the log folder, and writing the log data into the current date file.
Step 305 above describes the process of storing the log data by writing the log data into the log file, and besides, other methods may be used to store the log data, which is not limited in this embodiment.
The method provided by the embodiment of the disclosure includes the steps of obtaining configuration information, an interception interface and a processing function, intercepting the call instruction through the interception interface when the call instruction of a target program interface in a plurality of program interfaces is triggered, calling the processing function, generating log data corresponding to the target program interface by adopting the processing function, and storing the log data, wherein the log data is used for recording the operation of calling the target program interface. The intercepting interface intercepts the call instruction of other program interfaces, calls the processing function to monitor the other program interfaces and generate the log function, so that the monitoring of a plurality of program interfaces can be realized by calling one processing function, the processing function does not need to be written in each program interface needing to be monitored, the universality of the processing function is improved, the operation is simple and convenient, the labor and the time can be saved, and the operation efficiency is improved.
And the configuration information also comprises a record mark of the user identifier, and when the record mark is a first mark, the user identifier in the user information is acquired by adopting a processing function and is used as log data. Therefore, each log data of the target program interface corresponds to one user identification, different users using the target program interface can be distinguished through the user identifications, the information quantity of the log data is improved, and the subsequent analysis of the operation behaviors of the different users is facilitated.
And the configuration information also comprises a recording period, and the log data is written into the corresponding log file according to the recording period. Therefore, different recording periods can be set for different application scenes, log data can be conveniently inquired according to the recording periods, and the orderliness of log files is enhanced.
And the configuration information also comprises text data of a plurality of program interfaces, the text data is used for describing the operation corresponding to the program interfaces, and the text data of the target program interface in the translation list is acquired as log data by adopting a processing function. The operation of calling the program interface is translated into the text data which can intuitively reflect the operation behavior of the user, so that the text data is used as log data, and the readability of the log data is enhanced.
Fig. 4 is a flowchart illustrating another log data processing method according to an exemplary embodiment, and referring to fig. 4, when the execution condition of the program interface needs to be recorded, the configuration information, the interception interface, and the processing function are acquired.
1. When a call instruction to the target program interface is intercepted, the electronic equipment inquires configuration information, and if the configuration information comprises a third mark, the next step is executed; and if the configuration information comprises the fourth mark, judging whether the target program interface is a plurality of program interfaces in the configuration information, if so, executing the next step, and if not, stopping the processing.
2. The electronic equipment inquires whether a log folder exists, and if the log folder exists, the next step is executed; if no log folder exists, a log folder is created.
3. The electronic equipment inquires an authentication mode in the configuration information, if the authentication mode is single sign-on, a user identifier in a first field is obtained from the user information, and the user identifier is used as log data; and if the authentication mode is password login, acquiring the user identification in the second field from the user information, and taking the user identification as log data.
4. The electronic equipment inquires whether the configuration information comprises a translation list, and if the configuration information does not comprise the translation list, the next step is executed; if the translation list is included, the text data of the target program interface in the translation list is acquired as log data.
5. And the electronic equipment inquires the recording period in the configuration information, if the recording period is one day, the log data is written into the log file of the day, and if the recording period is one week, the log data is written into the log file of the week.
Fig. 5 is a block diagram illustrating a log data processing apparatus according to an example embodiment. Referring to fig. 5, the apparatus includes an acquisition unit 501, a relationship establishment unit 502, a function call unit 503, a data generation unit 504, and a data storage unit 505.
An obtaining unit 501 configured to obtain configuration information, an interception interface, and a processing function, where the configuration information includes a plurality of program interfaces;
a function calling unit 502 configured to intercept a calling instruction through an interception interface and call a processing function when the calling instruction to a target program interface among the plurality of program interfaces is triggered, wherein the target program interface is any one of the plurality of program interfaces;
and a data generating unit 503 configured to generate log data corresponding to the target program interface by using the processing function, the log data being used for recording an operation of calling the target program interface.
A data storage unit 504 configured to store log data.
In a possible implementation manner, referring to fig. 6, the call instruction carries an interface identifier of the target program interface, and the apparatus further includes:
a function calling unit 502, further configured to call a processing function according to the interface identifier of the target program interface;
the data generating unit 503 is further configured to generate the log data corresponding to the interface identifier by using a processing function.
In a possible implementation manner, the call instruction carries user information, the configuration information further includes a record mark of the user identifier, the record mark includes a first mark or a second mark, the first mark is used for indicating to record the user identifier, and the second mark is used for indicating not to record the user identifier;
the data generation unit 503 includes:
an identity obtaining sub-unit 5031 configured to obtain the user identity in the user information as log data using a processing function if the record mark is the first mark.
In another possible implementation manner, the configuration information further includes an authentication manner, where the authentication manner is a single sign-on manner or a password sign-on manner, and the data generating unit 503 includes:
a first obtaining sub-unit 5032 configured to, if the record mark is a first mark and the authentication mode is a single sign-on mode, obtain the user identifier from a first field in the user information as log data, where the first field is generated by the single sign-on system; alternatively, the first and second electrodes may be,
a second obtaining sub-unit 5033 configured to, if the record mark is the first mark and the authentication mode is the password login mode, obtain the user identifier from a second field in the user information as log data, where the second field is generated by the password login system.
In another possible implementation manner, the processing function includes a storage path of the log file, and the data storage unit 504 includes:
a first storage sub-unit 5041 configured to write log data to a log file if the log file has been created under the storage path; alternatively, the first and second electrodes may be,
and a second storage sub-unit 5042 configured to create a log file under the storage path and write log data into the log file if the log file has not been created under the storage path.
In another possible implementation manner, the configuration information further includes a recording period, the processing function includes a storage path of the log file, and the data storage unit 504 includes:
a file acquiring sub-unit 5043 configured to acquire a first log file whose creation time is latest under the storage path;
a third storage sub-unit 5044 configured to write the log data into the first log file when a difference between a creation time of the first log file and a generation time of the log data is not more than a recording period;
and a fourth storage sub-unit 5045 configured to create a second log file under the storage path and write the log data into the second log file when a difference between a creation time of the first log file and a generation time of the log data is greater than a recording period.
In another possible implementation manner, the configuration information further includes a translation list, where the translation list includes text data of a plurality of program interfaces, and the text data is used to describe operations corresponding to the program interfaces, and the data generating unit 503 includes:
a text acquiring sub-unit 5034 configured to acquire the text data of the target program interface in the translation list as log data using a processing function.
Fig. 7 shows a block diagram of a terminal 700 according to an exemplary embodiment of the present disclosure. The terminal 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer or a desktop computer. Terminal 700 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so on.
In general, terminal 700 includes: one or more processors 701 and one or more memories 702.
The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include volatile memory or non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 702 is used to store at least one instruction for being possessed by the processor 701 to implement the log data processing method provided by the method embodiments in the present disclosure.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, touch screen display 705, camera 706, audio circuitry 707, positioning components 708, and power source 709.
The peripheral interface 703 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 704 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 704 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 13G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuits, which are not limited by this disclosure.
The display screen 705 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to capture touch signals on or over the surface of the display screen 705. The touch signal may be input to the processor 701 as a control signal for processing. At this point, the display 705 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 705 may be one, providing the front panel of the terminal 700; in other embodiments, the display 705 can be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in still other embodiments, the display 705 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display 705 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 706 is used to capture images or video. Optionally, camera assembly 706 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing or inputting the electric signals to the radio frequency circuit 704 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 707 may also include a headphone jack.
The positioning component 708 is used to locate the current geographic position of the terminal 700 to implement navigation or LBS (location based Service). The positioning component 708 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 709 is provided to supply power to various components of terminal 700. The power source 709 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When power source 709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyro sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 701 may control the touch screen 705 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 712 may cooperate with the acceleration sensor 711 to acquire a 3D motion of the terminal 700 by the user. From the data collected by the gyro sensor 712, the processor 701 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 713 may be disposed on a side bezel of terminal 700 and/or an underlying layer of touch display 705. When the pressure sensor 713 is disposed on a side frame of the terminal 700, a user's grip signal on the terminal 700 may be detected, and the processor 701 performs right-left hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at a lower layer of the touch display 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 705. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 714 is used for collecting a fingerprint of a user, and the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 701 authorizes the user to have relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 714 may be disposed on the front, back, or side of the terminal 700. When a physical button or a vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical button or the vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the touch display 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch display 705 is turned down. In another embodiment, processor 701 may also dynamically adjust the shooting parameters of camera assembly 706 based on the ambient light intensity collected by optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically disposed on a front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front surface of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually decreases, the processor 701 controls the touch display 705 to switch from the bright screen state to the dark screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually becomes larger, the processor 701 controls the touch display 705 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of terminal 700 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 8 is a schematic structural diagram of a server according to an embodiment of the present disclosure, where the server 800 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 801 to implement the log data processing method provided by each method embodiment. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a computer device, enable the computer device to perform the steps performed by the computer device in the log data processing method.
In an exemplary embodiment, a computer program product is also provided, in which instructions, when executed by a processor of a computer device, enable the computer device to perform the steps performed by the computer device in the log data processing method described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of processing log data, the method comprising:
acquiring configuration information, an interception interface and a processing function, wherein the configuration information comprises a plurality of program interfaces;
when a call instruction of a target program interface in the plurality of program interfaces is triggered, intercepting the call instruction through the interception interface, and calling the processing function, wherein the target program interface is any one of the plurality of program interfaces;
and generating log data corresponding to the target program interface by adopting the processing function, and storing the log data, wherein the log data is used for recording and calling the operation of the target program interface.
2. The method of claim 1, wherein the call instruction carries an interface identification of the target program interface, the method further comprising:
calling the processing function according to the interface identifier of the target program interface;
and generating log data corresponding to the interface identifier by adopting the processing function.
3. The method of claim 1, wherein the call instruction carries user information, and the configuration information further includes a record mark of a user identifier, and the record mark includes a first mark or a second mark, the first mark is used for indicating to record the user identifier, and the second mark is used for indicating not to record the user identifier;
the generating, by using the processing function, log data corresponding to the target program interface includes:
and if the record mark is the first mark, acquiring a user identifier in the user information by adopting the processing function as log data.
4. The method according to claim 3, wherein the configuration information further includes an authentication manner, the authentication manner is a single sign-on manner or a password sign-on manner, and the obtaining the user identifier in the user information as log data by using the processing function if the record mark is the first mark comprises:
if the record mark is the first mark and the identity authentication mode is the single sign-on mode, acquiring a user identifier from a first field in the user information as log data, wherein the first field is generated by a single sign-on system; alternatively, the first and second electrodes may be,
and if the record mark is the first mark and the authentication mode is the password login mode, acquiring a user identifier from a second field in the user information as log data, wherein the second field is generated by a password login system.
5. The method of claim 1, wherein the processing function includes a storage path for a log file, and wherein the storing the log data includes:
if a log file is created under the storage path, writing the log data into the log file; alternatively, the first and second electrodes may be,
and if the log file is not created under the storage path, creating the log file under the storage path, and writing the log data into the log file.
6. The method of claim 1, wherein the configuration information further includes a logging period, the processing function includes a storage path of a log file, and the storing the log data includes:
acquiring a first log file with the latest creation time under the storage path;
when the difference value between the creation time of the first log file and the generation time of the log data is not more than the recording period, writing the log data into the first log file;
and when the difference value between the creation time of the first log file and the generation time of the log data is larger than the recording period, creating a second log file under the storage path, and writing the log data into the second log file.
7. The method of claim 1, wherein the configuration information further includes a translation list, the translation list includes text data of the plurality of program interfaces, the text data is used for describing operations corresponding to the program interfaces, and the generating, by the processing function, log data corresponding to the target program interface includes:
and acquiring the text data of the target program interface in the translation list as the log data by adopting the processing function.
8. An apparatus for processing log data, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire configuration information, an interception interface and a processing function, and the configuration information comprises a plurality of program interfaces;
the function calling unit is configured to intercept a calling instruction through the interception interface and call the processing function when the calling instruction of a target program interface in the plurality of program interfaces is triggered, wherein the target program interface is any one of the plurality of program interfaces;
and the data generation unit is configured to generate log data corresponding to the target program interface by using the processing function, wherein the log data is used for recording the operation of calling the target program interface.
A data storage unit configured to store the log data.
9. An electronic device for processing log data, the electronic device comprising:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the log data processing method of any one of claim 1 to claim 7.
10. A non-transitory computer-readable storage medium, instructions in which, when executed by a processor of a computer device, enable the computer device to perform the log data processing method of any one of claim 1 to claim 7.
CN201911075979.8A 2019-11-06 2019-11-06 Log data processing method and device, electronic equipment and storage medium Pending CN110825465A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911075979.8A CN110825465A (en) 2019-11-06 2019-11-06 Log data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911075979.8A CN110825465A (en) 2019-11-06 2019-11-06 Log data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110825465A true CN110825465A (en) 2020-02-21

Family

ID=69552992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911075979.8A Pending CN110825465A (en) 2019-11-06 2019-11-06 Log data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110825465A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111913847A (en) * 2020-07-21 2020-11-10 上海冰鉴信息科技有限公司 Method and system for acquiring remote task execution progress
CN115033910A (en) * 2021-11-12 2022-09-09 荣耀终端有限公司 Access record display method and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156300A (en) * 2013-05-14 2014-11-19 利德科技发展有限公司 Log management system and log management method
CN104881284A (en) * 2015-05-22 2015-09-02 国云科技股份有限公司 Efficient log operating method
US20160098325A1 (en) * 2013-06-19 2016-04-07 Hewlett-Packard Development Company, L.P. Unifying application log messages using runtime instrumentation
CN106682119A (en) * 2016-12-08 2017-05-17 杭州销冠网络科技有限公司 System and method for asynchronous data synchronization on basis of http service aspect and log system
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN108804644A (en) * 2018-06-05 2018-11-13 中国平安人寿保险股份有限公司 Interface log storing method, device, computer equipment and storage medium
CN109271331A (en) * 2018-08-20 2019-01-25 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of log
CN109739735A (en) * 2018-12-04 2019-05-10 东软集团股份有限公司 Log generation method and device
CN110096419A (en) * 2019-04-22 2019-08-06 厦门网宿有限公司 Acquisition methods, interface log management server and the service server of interface log
CN110134615A (en) * 2019-04-10 2019-08-16 百度在线网络技术(北京)有限公司 The method and device of application program acquisition daily record data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156300A (en) * 2013-05-14 2014-11-19 利德科技发展有限公司 Log management system and log management method
US20160098325A1 (en) * 2013-06-19 2016-04-07 Hewlett-Packard Development Company, L.P. Unifying application log messages using runtime instrumentation
CN104881284A (en) * 2015-05-22 2015-09-02 国云科技股份有限公司 Efficient log operating method
CN106682119A (en) * 2016-12-08 2017-05-17 杭州销冠网络科技有限公司 System and method for asynchronous data synchronization on basis of http service aspect and log system
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN108804644A (en) * 2018-06-05 2018-11-13 中国平安人寿保险股份有限公司 Interface log storing method, device, computer equipment and storage medium
CN109271331A (en) * 2018-08-20 2019-01-25 平安普惠企业管理有限公司 Generation method, device, computer equipment and the storage medium of log
CN109739735A (en) * 2018-12-04 2019-05-10 东软集团股份有限公司 Log generation method and device
CN110134615A (en) * 2019-04-10 2019-08-16 百度在线网络技术(北京)有限公司 The method and device of application program acquisition daily record data
CN110096419A (en) * 2019-04-22 2019-08-06 厦门网宿有限公司 Acquisition methods, interface log management server and the service server of interface log

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
钱艳菊: "基于SSH2框架的数据日志插件研究", CNKI优秀硕士学位论文全文库/基于SSH2框架的数据日志插件研究, no. 04, 15 April 2018 (2018-04-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111913847A (en) * 2020-07-21 2020-11-10 上海冰鉴信息科技有限公司 Method and system for acquiring remote task execution progress
CN111913847B (en) * 2020-07-21 2021-04-27 上海冰鉴信息科技有限公司 Method and system for acquiring remote task execution progress
CN115033910A (en) * 2021-11-12 2022-09-09 荣耀终端有限公司 Access record display method and electronic equipment

Similar Documents

Publication Publication Date Title
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN108874496B (en) Application management method, device, terminal, server and storage medium
CN111949680A (en) Data processing method and device, computer equipment and storage medium
CN111858382A (en) Application program testing method, device, server, system and storage medium
CN110851823A (en) Data access method, device, terminal and storage medium
CN110515962B (en) Method and device for caching data, electronic equipment and storage medium
CN110825465A (en) Log data processing method and device, electronic equipment and storage medium
CN111881423A (en) Method, device and system for limiting function use authorization
CN110597840A (en) Partner relationship establishing method, device, equipment and storage medium based on block chain
CN113377647B (en) Page processing method, device, server, terminal and readable storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN114816600B (en) Session message display method, device, terminal and storage medium
CN110971692B (en) Method and device for opening service and computer storage medium
CN114900559A (en) Management system, terminal, management method, and storage medium
CN112765571A (en) Authority management method, system, device, server and storage medium
CN111131619B (en) Account switching processing method, device and system
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN107948171B (en) User account management method and device
CN113051015A (en) Page rendering method and device, electronic equipment and storage medium
CN112732282A (en) Installation package downloading method and device
CN111191254A (en) Access verification method and device, computer equipment and storage medium
CN111158780A (en) Method, device, electronic equipment and medium for storing application data
CN111008381B (en) Terminal detection method, device, terminal and storage medium
CN113746831B (en) Authority verification method and device and 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