CN112711518A - Log uploading method and device - Google Patents

Log uploading method and device Download PDF

Info

Publication number
CN112711518A
CN112711518A CN201911021785.XA CN201911021785A CN112711518A CN 112711518 A CN112711518 A CN 112711518A CN 201911021785 A CN201911021785 A CN 201911021785A CN 112711518 A CN112711518 A CN 112711518A
Authority
CN
China
Prior art keywords
log
uploading
uploaded
running
determining
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.)
Granted
Application number
CN201911021785.XA
Other languages
Chinese (zh)
Other versions
CN112711518B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911021785.XA priority Critical patent/CN112711518B/en
Publication of CN112711518A publication Critical patent/CN112711518A/en
Application granted granted Critical
Publication of CN112711518B publication Critical patent/CN112711518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations

Abstract

The embodiment of the application provides a log uploading method and device, and relates to the technical field of communication. The log uploading method comprises the following steps: acquiring running data and a user identifier of a target application program; generating an operation log according to the operation data and the user identification; determining a log to be uploaded from the running logs according to a preset log uploading condition; and uploading the log to be uploaded. According to the embodiment of the application, after the operation logs are generated, the logs to be uploaded are determined from the operation logs according to the preset log uploading conditions, the logs to be uploaded are actively uploaded, the log uploading instantaneity is guaranteed, the log uploading efficiency is improved, and the problem that when developers get user side logs after the user feedback problems are avoided, the users are off-line, and the user side logs cannot be timely obtained is solved.

Description

Log uploading method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a log uploading method and apparatus.
Background
With the development of computer technology, applications on the market are gradually increased, and when a user uses an application, the user often has an abnormality, an error or a crash. The log can record a lot of key information, including error information, debugging information generated during the running of the application program, and other useful state information, running data information, etc.
However, most of the applications are not connected to the development environment and the test environment, and due to the limited testing and development equipment and the complexity of the external network environment, developers cannot conveniently acquire log information on the user side. For example, some application programs need to acquire the log of the user side in an office environment while the user needs to be online, and in reality, after the user side feeds back a problem, a product dockee needs to notify a developer, and the developer needs to acquire the log of the user side again.
Disclosure of Invention
The embodiment of the application provides a log uploading method and device, and the instantaneity of log uploading is guaranteed.
The embodiment of the application provides a log uploading method, which comprises the following steps:
acquiring running data and a user identifier of a target application program;
generating an operation log according to the operation data and the user identification;
determining a log to be uploaded from the running logs according to a preset log uploading condition;
and uploading the log to be uploaded.
An embodiment of the present application further provides a log uploading apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the running data and the user identification of a target application program;
the generating unit is used for generating an operation log according to the operation data and the user identification;
the determining unit is used for determining the log to be uploaded from the running logs according to preset log uploading conditions;
and the uploading unit is used for uploading the log to be uploaded.
Further, the generation unit includes:
the first monitoring unit is used for monitoring the log tracking identifier;
the target data determining unit is used for determining target operation data corresponding to the log tracking identifier when the log tracking identifier is monitored;
and the first generating unit is used for generating an operation log according to the target operation data and the user identification.
Further, the first monitoring unit is specifically configured to: detecting whether a log tracking identifier is generated; and when the generation of the log tracking identifier is detected, determining to monitor the log tracking identifier.
Further, the first monitoring unit is specifically configured to: detecting whether an interaction request is received; determining to monitor the log tracking identity when the interaction request is detected.
Further, the determining unit includes:
the identification detection unit is used for detecting whether the running log comprises the log tracking identification or not;
and the first determining unit is used for determining the running log as the log to be uploaded if the running log comprises the log tracking identifier.
Further, the determining unit includes:
the type acquisition unit is used for acquiring the log type of the running log, wherein the log type comprises an abnormal type;
and the second determining unit is used for determining the running log comprising the abnormal type as a log to be uploaded, wherein the abnormal type comprises a network request failure abnormity.
Further, the determining unit includes:
the folder acquisition unit is used for acquiring the running log in the starting abnormal folder;
and the third determining unit is used for determining the acquired running log as a log to be uploaded.
Further, the determining unit includes:
a level acquiring unit configured to acquire a log level of the operation log and a target log level;
and the fourth determining unit is used for determining the running log with the log level as the target log level as the log to be uploaded.
Further, the level obtaining unit includes a target level obtaining unit, and the target level obtaining unit is specifically configured to receive a log obtaining instruction sent by the server; and determining the target log level according to the log acquisition instruction.
Further, the determining unit includes:
a second content acquiring unit for acquiring the data content of the operation log and the target data content;
and the fifth determining unit is used for determining the running log including the target data content in the data content as the log to be uploaded.
Further, the uploading unit is specifically configured to upload the log to be uploaded to a block chain.
The embodiment of the application also provides computer equipment, which comprises a memory and a processor connected with the memory; the memory is used for storing a computer program; the processor is used for operating the computer program stored in the memory to execute any log uploading method.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for uploading logs is implemented.
The method comprises the steps of obtaining running data and a user identifier of a target application program; generating an operation log according to the operation data and the user identification; determining a log to be uploaded from the running logs according to a preset log uploading condition; and uploading the log to be uploaded. According to the embodiment of the application, after the operation logs are generated, the logs to be uploaded are determined from the operation logs according to the preset log uploading conditions, and the logs to be uploaded are actively uploaded, so that the log uploading real-time performance is guaranteed, and after the log uploading efficiency is improved so as to avoid the problem of user feedback, when developers obtain user side logs, users are off-line, and the problem that the user side logs cannot be timely obtained is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a system schematic diagram of a log uploading system provided in an embodiment of the present application;
fig. 1b is a schematic view of a scenario for generating a log obtaining instruction according to an embodiment of the present application;
fig. 1c is a schematic flowchart of a log uploading method provided in an embodiment of the present application;
fig. 1d is a schematic sub-flow diagram of a log uploading method provided in an embodiment of the present application;
FIG. 1e is a schematic diagram of a scenario related to log tracking identifiers according to an embodiment of the present application;
fig. 1f is a schematic view of a scenario of triggering a log upload instruction according to an embodiment of the present application;
FIG. 1g is a schematic diagram of a scenario related to a target log level according to an embodiment of the present disclosure;
fig. 2a is a schematic block diagram of a log uploading apparatus provided by an embodiment of the present application;
fig. 2b is a schematic block diagram of a generating unit provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is to be understood that in the description of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first terminal may be termed a second terminal, and, similarly, a second terminal may be termed a first terminal, without departing from the scope of the present invention. The first terminal and the second terminal are both terminals, but they are not the same terminal.
Before explaining the embodiments of the present invention in detail, some terms related to the embodiments of the present invention are explained.
The interactive data includes data when a plurality of terminals interact with each other, such as data sent from one terminal to another terminal.
The log tracking identifier is used for tracking the sending condition and the receiving condition of an interactive datum, and a log is generated according to the sending condition, the receiving condition and the like of the interactive datum, so that the log tracking identifier is called as a log tracking identifier. The log trace flag may be represented by a character string of a predetermined length, or may be represented by other data. A log tracking identifier is used for identifying a piece of interactive data so as to track the sending condition and the receiving condition of the piece of interactive data and the like. In this way, the log tracking identifier is used in a scenario where interactive data exists, for example, in a target application program related to live video, a teacher broadcasts a course to a student live through video, and when the teacher sends a piece of interactive data to the student, the log tracking identifier is carried to identify the piece of interactive data sent by the teacher. When the teacher sends another piece of interaction data to the student, another log tracking identifier is carried, and the another log tracking identifier is used for identifying the other piece of interaction data sent by the teacher.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The information of a batch of network transactions can also be understood as input information of a batch, which refers to a running log to be stored on a block chain in the embodiment of the present application. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain link point devices and used for verifying the effectiveness of service requests (such as a storage request for uploading and storing logs to be uploaded to a block chain in the embodiment of the application), and recording the effective requests to a storage after consensus is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, and transmits the encrypted service information to a shared account (network communication) completely and consistently, and records and stores the service request; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like. The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
The embodiment of the application provides a log uploading method and device, computer equipment and a storage medium.
The embodiment of the application provides a log uploading system which comprises any log uploading device provided by the embodiment of the application. Fig. 1a is a schematic diagram of a log uploading system provided in an embodiment of the present application. The log uploading system comprises a first terminal, a second terminal and a server. The first terminal includes at least one and the second terminal includes at least one. The first terminal can be understood as a client where a common user is located, the target application program is installed in the first terminal, and the second terminal can be understood as a client where a developer is located. The server may be a single server or a server cluster, the server includes a storage function and a service function, and the storage function and the service function may be implemented in a single server or may be implemented by a server cluster. As in fig. 1a, the server includes a business server and a cloud server. Further, the server performing the storage function may include a block chain and the like in addition to the cloud server. The first terminal and the second terminal are connected with the server through a network, and the network comprises network entities such as a router, a gateway and the like.
Acquiring running data and a user identifier of a target application program in the first terminal; generating an operation log according to the operation data of the target application program and the user identification; determining a log to be uploaded from the generated running logs according to a preset log uploading condition; and uploading the log to be uploaded to a server.
In the second terminal, acquiring a user identifier in the running log and acquiring a time identifier; generating a log obtaining instruction according to the user identification and the time identification, and sending the log obtaining instruction to a server; receiving operation log data returned by the server based on the log acquisition instruction; and analyzing the returned running log data.
As shown in fig. 1b, a user identifier (the user identifier is denoted by uin) is obtained, the obtained user identifier is input on the interface where the second terminal is located, the start time and the time range (duration) of the log to be obtained are input, and the time identifier is determined according to the start time and the time range. And generating a log acquisition instruction according to the user identifier and the time identifier.
And after receiving the running log sent by the first terminal, the server side stores the sent running log. And after receiving the log acquisition instruction sent by the second terminal, the server side inquires in the stored running log to obtain running log data and sends the running log data to the second terminal. Or after receiving the log obtaining instruction sent by the second terminal, the server side sends the log obtaining instruction to the first terminal, receives running log data returned by the first terminal based on the log obtaining instruction, and sends the running log data to the second terminal.
The first terminal can actively send the running log to the server in real time, so that the real-time property of log uploading is ensured, the efficiency of log uploading is improved, the second terminal can acquire the running log data of the first terminal in real time, the real-time property of the second terminal for acquiring the log is ensured, the efficiency of log acquisition is improved, and the efficiency of log analysis and processing is further improved.
It can be understood that the log uploading method in the embodiment of the present application may also be applied to the service server side. For convenience of understanding, the following embodiments of the log uploading method are described by taking the log uploading method applied to the first terminal as an example.
Fig. 1c is a schematic flowchart of a log uploading method provided in an embodiment of the present application, where the method is applied to a first terminal, and a specific flow of the log uploading method may be as follows:
101, acquiring the running data and the user identification of the target application program.
The target application program can generate a lot of running data in the running process, and the running data mainly comprises two categories: abnormal operation data, normal operation data and the like. The abnormal operation data includes start abnormality, login failure and the like, and the normal operation data includes various data generated in the operation process of the target application program, such as interactive data sent from one user terminal using the target application program to another user terminal, parameter data related to the target application program and the like. The operation data generated in the operation process of the target application program can be classified in other modes. The user identifier is used to identify a user, and the user identifier may be a nickname, a mailbox, a micro signal, a communication number, an identification card, a two-dimensional code, and the like of a user logging in a target application program, or a character string allocated to the user by a server of the target application program when it is detected that the user uses the target application program, and the specific limitations are not limited.
And 102, generating an operation log according to the operation data and the user identification.
According to different specific operation data, different modes of generating the operation log exist.
Fig. 1d is a schematic sub-flow chart of step 102 provided in the embodiment of the present application. Specifically, step 102, namely the step of generating the operation log according to the operation data and the user identifier, includes:
1021, monitoring log tracking identification.
Namely, in the running process of the target application program, the log tracking identification is monitored. The log tracking identification also belongs to the running data of the target application program in the running process.
Specifically, the step of monitoring the log tracking identifier includes: detecting whether a log tracking identifier is generated; and when the generation of the log tracking identifier is detected, determining that the log tracking identifier is monitored. The step of generating the log tracking identifier comprises the following steps: detecting whether a preset operation is triggered on a target application program; and if the preset operation is detected to be triggered on the target application program, generating a log tracking identifier.
The preset operation includes a transmission operation. It can be understood that the log tracking flag is used for tracking the sending and receiving conditions of an interactive data, so that the log tracking flag is generated when the sending operation is triggered when the interactive data is to be sent by the first terminal. The sending operation may be an operation triggered by clicking/touching a "send" control, "a" confirm "control, and the like on the target application program interface after the interactive data is edited, or an operation triggered in other manners for interacting with other terminals (such as a server). For example, in a target application involving live video, a teacher live a course to a student via video may involve the teacher sending a message to the student, such as the teacher editing a message "what do you have? And after the control is clicked, generating a log tracking identifier. The message is treated as interactive data, so the log trace identifier is used to identify the teacher sending "what do you have? "of the user.
The log tracking identifier may be obtained by obtaining current time data and/or a user identifier, and performing hash calculation or encryption calculation on the current time data and/or the user identifier, for example, performing encryption calculation by using a Message Digest Algorithm MD5(Message-Digest Algorithm); the log trace identification may also be generated by retrieving his data or by other means.
When interactive data is edited and a sending operation is triggered, a log tracking identifier is generated. After detecting the trigger sending operation, the first terminal generates a sending request according to the interactive data (e.g., "what do you have a problem. The sending request is sent to a server, and the server forwards the sending request to other terminals, such as another first terminal. Therefore, after the other first terminal receives the sending request, the sending request still carries the log tracking identifier.
Specifically, the step of monitoring the log tracking identifier includes: detecting whether an interaction request is received; when the interaction request is detected, determining that the log tracking identification is monitored. The interactive request is a request generated for data interaction between a plurality of terminals. The interaction request is sent by the other first terminal (possibly forwarded via the server) or may be sent by the server, for example, a sending request sent by the other first terminal. The sending request carries the log tracking identification and the interactive data. Therefore, the first terminal detects whether the interactive request is received; and if the interactive request is detected to be received, determining that the log tracking identifier is monitored. It should be noted that the interactive request here includes not only the transmission request but also any data transmitted by other terminals where there is interaction.
1022, when the log tracking identifier is monitored, determining target operation data corresponding to the log tracking identifier.
The target operation data comprises sending data and receiving data. Such as data corresponding to the request to send; data received from other terminals interacting, etc. For example, in the stage of sending interactive data, when the interactive data is edited and the sending operation is triggered, a log tracking identifier is generated, that is, the log tracking identifier is monitored; generating a sending request according to the interactive data, the log tracking identifier and the sending operation, wherein the sending request carries the log tracking identifier; and determining the data corresponding to the sending request as target operation data corresponding to the log tracking identifier. In the data receiving stage, if a sending request is received, the sending request carries the log tracking identifier, so whether the sending request is received or not is detected, if the sending request is detected to be received, the log tracking identifier is monitored, and the received data, such as the received sending request, is determined as the target operation data corresponding to the log tracking identifier.
1023, generating an operation log according to the target operation data and the user identification.
Specifically, a data structure of a running log is obtained; acquiring a corresponding field in a data structure of the running log; determining the data content corresponding to each field; and generating an operation log according to the data content corresponding to each field. For example, the corresponding fields in the data structure of the running log include target running data, a log tracking identifier, a user identifier, a current timestamp, a running log level, and the like. Determining the data content corresponding to each field, such as determining the data content of the current timestamp includes: acquiring current time, and taking the current time as the data content of a current timestamp field; or acquiring the current time, performing conversion processing on the current time, and taking the data after the conversion processing as the data content of the current timestamp field. And generating a running log according to the determined data content corresponding to each field. The log corresponding to the transmission data is referred to as a transmission operation log, and the log corresponding to the reception data is referred to as a reception operation log.
As shown in fig. 1e, the server includes a service server and a cloud server, where the first terminal a sends a CS request (client request) to the service server, where the CS request carries a log tracking identifier traceid; after receiving the CS request, the service server pushes (forwards) the CS request to the first terminal B, where the CS request still carries the traceid. A first terminal C sends a CGI request (another request different from a CS request) to a service server, wherein the CGI request carries a log tracking identifier traceid; and after receiving the CGI request, the service server responds to the CGI request and sends the CGI request to the first terminal C, wherein the CGI request carries the traceid. It should be noted that the log trace identifier traceid carried in the CS request is different from the log trace identifier traceid carried in the CGI request.
For example, the first terminal a is to send "what are you there? "this interactive data, after detecting and triggering the sending operation, produce the tracking identification traceid of the journal, monitor the tracking identification of the journal; and generating a CS request according to the interactive data, the sending operation and the traceid, wherein the CS request carries the traceid, and the generated CS request is taken as target operation data. And generating a running log by the generated CS request and the user identification. The generated CS request is sent to the service server, which pushes to the first terminal B. The first terminal B receives the CS request, and because the CS request carries the traceid, when the CS request is detected to be received, the log tracking identification is determined to be monitored, the received CS request is used as target operation data, and an operation log is generated according to the received CS request and the user identification.
Understandably, at the first terminal a (assumed to be the teacher) a transmission is sent "what do you have a question? "when the interaction data is sent to the first terminal B (assuming that there are a plurality of first terminals B, that is, there are a plurality of students), a running log is generated. The first terminal B receiving the interactive data generates an operation log when receiving the interactive data, and the first terminal B not receiving the interactive data does not generate the operation log. In this way, whether the interactive data has been successfully transmitted to all the first terminals B can be checked according to the operation log generated by the first terminal a and the operation log generated by the first terminal B.
The above-mentioned scheme of generating the operation log according to the operation data and the user identifier tracks the sending condition and the receiving condition of the interactive data by using the log tracking identifier, or it can also be understood that the sending operation log and the receiving operation log are obtained by tracking the link information (the sending condition and the receiving condition) of one piece of interactive data by using the log tracking identifier, so as to obtain the full link log of the interactive data.
In a scenario involving a network request failure exception, specifically, step 102, generating a running log according to the running data and the user identifier, includes: detecting whether an error code corresponding to network request failure abnormity of a target application program is received; and if an error code corresponding to the network request failure abnormity of the target application program is received, generating an operation log of the network request failure abnormity according to the network request, the error code and the user identification. Wherein the network request failure exception comprises: login failure, house entry failure (entering a certain room to check live broadcast or playback, etc.), playback play failure, etc. It should be noted that, when the operation log is generated according to the log tracking identifier, the data structure of the operation log may be the same as or different from the data structure of the operation log corresponding to the network request failure exception. If different data structures are adopted, the data structure of the running log corresponding to the network request failure exception comprises a network request, an error code, a user identifier, a log level, a current timestamp and the like, and in some cases, further comprises fields such as a log type and the like. It should be noted that, if a network request failure exception occurs, the log type of the generated operation log is also set as the exception type.
The scheme for generating the operation log according to the network request failure abnormity generates the operation log according to the abnormal condition of the network request failure abnormity so as to record the abnormal condition of the network request failure abnormity and conveniently eliminate the network request failure abnormity.
It can be understood that, in the scheme of generating the operation log according to the network request failure exception, if the user has entered the target application program or has logged into the target application program, the operation log may be generated according to the user identifier, the error code, the network request, and the like.
In some scenarios, when the user does not enter the target application program or the user does not log in the target application program, the target application program does not start the operation log reading and writing module, and therefore the target application program does not generate the operation log. If the starting exception occurs, the target application program is running as soon as the target application program is started (crash). In the current technology, the running log in such a scenario cannot be acquired.
In this scenario, specifically, step 102, generating a running log according to the running data and the user identifier, includes: detecting whether a target application program has abnormal starting or not; if the target application program is detected to have abnormal starting, storing stack information when the abnormal starting occurs, and modifying a starting abnormal zone bit; and generating an abnormal starting operation log according to the saved stack information, and saving the generated abnormal starting operation log in the first terminal. Such as in a system log of the first terminal or in a folder of a preset directory. The folder where the system log is located or the folder of the preset directory are collectively called as a startup abnormal folder.
And the user marks whether the target application program has abnormal starting or not. The start exception flag is represented by two numbers or two strings, etc., such as setting the start exception flag to 0 and 1, or yes and no, etc. If 0 and no are used to indicate normal start, 1 and yes identify abnormal start. If the target application program is abnormal in starting, the flag bit of the abnormal starting is changed from 0 or no to 1 or yes, so that the abnormal starting of the target application program is identified. Wherein, the stack information may hold what location and what cause of the boot exception. Because the content of the stack information changes when the stack information is started next time, and the other stack information may be, the stack information when the abnormal start occurs is stored to ensure that the running log of the abnormal start can be obtained; in addition, the stack information in the abnormal starting process is saved locally, so that the running log of the abnormal starting process can be acquired.
In some scenarios, such as some anomalies or BUGs (abbreviated as BUGs) that occur for individual users, developers have no equipment or environment to reproduce these BUG scenarios. Specifically, step 102, namely the step of generating the operation log according to the operation data and the user identifier, includes: acquiring the abnormal or loophole information; and generating an operation log according to the abnormal or loophole information and the user identification.
In some scenarios, there are some important parameter data, such as live first frame data, live audio-video asynchronous data, pause data, data indicating whether push is arriving, transmission delay, and reception delay. These important parameter data are collected for further analysis processing by developers. Specifically, step 102, namely the step of generating the operation log according to the operation data and the user identifier, includes: monitoring parameter data; when the parameter data are monitored, acquiring the data content of the parameter data; and generating an operation log according to the data content and the user identification of the parameter data.
It will be appreciated that in addition to the system log, the data structure of the execution log includes fields for execution data, user identification, log level, current timestamp, etc. The operation data field may also be different according to different scenarios, for example, in some scenarios, the operation data field includes lower-level fields such as a network request, an error code, and the like, and in some scenarios, the operation data field does not have the lower-level fields and only includes corresponding contents, such as data contents of preset parameter data. It should be noted that these exemplified fields do not constitute a limitation on the data structure of the execution log, and only for convenience of understanding the scheme in the embodiment of the present application, the data structure of the execution log may further include more or less fields.
103, determining a log to be uploaded from the running logs according to a preset log uploading condition.
In the embodiment of the present application, the preset log uploading condition includes a plurality of different log uploading conditions. And selecting an operation log matched with the preset log uploading condition from the operation logs according to the preset log uploading condition, and determining the selected operation log as a log to be uploaded.
In some scenarios, specifically, step 103, namely, the step of determining the log to be uploaded from the running log according to a preset log uploading condition, includes: detecting whether a log uploading instruction is triggered or not; and if a log uploading triggering instruction is detected, acquiring the running log in a preset time period from the running log, and determining the running log as the log to be uploaded.
Wherein, the log uploading instruction can be triggered by a user. And if the fact that the user clicks/touches the corresponding uploading control on the target application program interface is detected, a log uploading triggering instruction is detected. The preset time period may be within the day when the log uploading instruction is triggered, within one day, namely within 24h, within 1h when the log uploading instruction is triggered, or within other time periods. It is understood that the uploading of the running log within the preset time period is due to the fact that the general user is considered to encounter a problem or an abnormality, which may be caused by the foregoing other operations; or if only the operation log corresponding to the problem or the abnormality is uploaded, it is difficult to locate the cause of the problem from the operation log. And uploading the running logs in the preset time period to improve the efficiency of positioning problems of subsequent developers.
Referring to fig. 1f, a control for "uploading the log" exists on the interface of the target application program, and if it is detected that the user clicks/touches the control for "uploading the log", a log uploading instruction is detected.
It will be appreciated that in this case, the user may actively upload the log of execution. If the user has problems, the log uploading instruction can be triggered to actively upload the running log. Therefore, the situation that the user is offline and cannot acquire the running log in time when the user encounters a problem and feeds back the problem to the developer and the developer acquires the running log again is avoided. In addition, the running logs are actively uploaded, and the real-time performance of log uploading is also ensured.
In a scenario of a full link log, specifically, step 103 is a step of determining a log to be uploaded from an operating log according to a preset log uploading condition, and includes: detecting whether the running log comprises a log tracking identifier or not; and if the log tracking identifier is included, determining the log to be uploaded. In some embodiments it may also be: detecting whether a log tracking identifier in the running log is not null; and if not, determining the log to be uploaded.
In this case, after the running log is generated, whether the running log includes the log tracking identifier or whether the log tracking identifier is not empty is detected, if yes, the running log is determined as the log to be uploaded, and the log to be uploaded is uploaded in step 104. Therefore, the running logs can be automatically uploaded in real time, the log uploading real-time performance is guaranteed, the log uploading efficiency is improved, and the problem that when developers acquire the running logs, users are off-line and cannot acquire the running logs in time is solved; meanwhile, the log tracking identifier is used for tracking link information (sending condition and receiving condition) of one interactive data, and a sending running log and a receiving running log can be obtained, so that a full link log of the interactive data can be obtained, the abnormality existing in the multi-terminal interaction can be checked according to the full link log of the interactive data, and the abnormal condition existing in the multi-terminal interaction is solved.
In a scenario where a network request is designed to fail abnormally, specifically, step 103 is a step of determining a log to be uploaded from an operation log according to a preset log uploading condition, and includes: acquiring a log type of an operation log, wherein the log type comprises an abnormal type; and determining the running log comprising an exception type as a log to be uploaded, wherein the exception type comprises a network request failure exception. The log to be uploaded comprises an abnormal running log, and the following conditions exist: the log to be uploaded only comprises an abnormal type running log; the log to be uploaded includes multiple operation logs including the operation log of the abnormal type, such as all operation logs within a preset time period including the operation log of the abnormal type. And uploading a plurality of running logs to improve the efficiency of positioning problems of subsequent developers.
In this case, it is to be understood that, after the operation log of the network request failure exception is generated, the operation log including the network request failure exception is determined as the log to be uploaded, and the log to be uploaded is uploaded in step 104. Therefore, the running logs are automatically uploaded in real time, the log uploading real-time performance is guaranteed, and the log uploading efficiency is improved.
In a scenario where the target application program is abnormally started, specifically, step 103 is to determine a log to be uploaded from the running log according to a preset log uploading condition, where the step includes: acquiring an operation log in a starting abnormal folder; and determining the acquired running log as a log to be uploaded. The method for starting the running log in the abnormal folder comprises the following steps of: when the target application program is detected to be started, detecting whether a start abnormal zone bit is identified as abnormal start; and if the abnormal starting flag bit marks abnormal starting, acquiring an operation log in the abnormal starting folder. The starting abnormal folder comprises a folder where the system log is located or a folder of a preset directory. If the started abnormal folder is the folder where the system log is located, acquiring the running log of the target application program from the system log, and determining the acquired running log of the target application program as the log to be uploaded.
If a start exception occurs, in one embodiment, the function implemented in step 103 may be implemented by a log salvage assistant. The log fishing assistant may be a module in the target application, or may be an application or applet separate from the target application.
It can be understood that, after the target application program is abnormally started and the running log of the abnormal start is generated, the running log of the abnormal start is determined as the log to be uploaded when the target application program is started again next time, and the log to be uploaded is uploaded in step 104. Therefore, the running logs are automatically uploaded in real time, the log uploading real-time performance is guaranteed, and the log uploading efficiency is improved; the problem that the running log of the target application program which is abnormally started cannot be obtained at present is solved.
In a certain abnormal or bug scene occurring in an individual user, specifically, step 103 is a step of determining a log to be uploaded from a running log according to a preset log uploading condition, and includes: acquiring the log level of the running log and the target log level; and determining the running log with the log level as the target log level as the log to be uploaded. The step of obtaining the target log level comprises the following steps: receiving a log acquisition instruction sent by a server; and determining the target log level according to the log obtaining instruction.
Wherein the log includes a plurality of different levels. As shown in fig. 1g, the log levels include a Debug level, an Info level, a Warn level, an Error level, and a Key level, which may be respectively represented by 1, 2, 3, 4, and 5, or represented by other strings, and the corresponding operation logs are respectively a Debug log, an InfoLog, a warlogg, an ErrorLog, and a KeyLog. It can be understood that, in a default case, a user uploads the running logs of the Error level and the Key level, but if some abnormalities or bugs occur in an individual user and a developer does not have equipment or an environment to reproduce the scenes of the abnormalities or bugs, the user is required to upload relatively comprehensive running log information, such as running log information of all levels, in real time to enable the developer to perform positioning analysis. Or in some cases, if a developer needs to obtain a certain type or types of operation logs, a user needs to upload the certain type or types of operation logs in real time to allow the developer to perform positioning analysis.
Therefore, the second terminal where the developer is located can obtain the running log of the corresponding user, the user identification of the user is obtained according to the running log, the log level of the running log needing to be uploaded by the first terminal is set, a log obtaining instruction is generated according to the set log level of the running log needing to be uploaded, the log obtaining instruction is sent to the server, and the server receives the log obtaining instruction and then sends the log obtaining instruction to the first terminal, namely the terminal with some abnormity or loophole occurs, so that the default log uploading level can be adjusted. Or directly acquiring the running log of the corresponding user through the server, acquiring the user identifier of the user according to the running log, setting the log level of the running log to be uploaded by the first terminal, generating a log acquisition instruction according to the set log level, and sending the log acquisition instruction to the first terminal so as to adjust the default log uploading level. The log level of the running log to be uploaded may be only one level, such as a Key level, or may include some log levels therein, or may include all log levels. A first terminal receives a log obtaining instruction sent by a server; and determining the target log level according to the log obtaining instruction. And acquiring the log level of the running log to be uploaded in the log acquisition instruction and determining the log level as the target log level, wherein the log acquisition instruction comprises the set log level of the running log to be uploaded.
Further, the second terminal or the server may set a log level of the operation log to be uploaded, may also set an upload time of the log level of the operation log to be uploaded, and may generate a log obtaining instruction according to the set log level of the operation log to be uploaded and the upload time. In this way, the log obtaining instruction includes the set log level of the running log to be uploaded and also includes the set uploading time. The uploading time of the running log to be uploaded can be set by two times, such as 2018.1.1 and 2018.3.1, and can be specific to minutes or seconds. The two times may be (historical time, current time), (historical time, future time), (current time, future time), etc. The uploading time of the running logs to be uploaded can be set through a time and a time duration, wherein the time can be any one of historical time, current time and future time, and represents that the corresponding running logs in the time duration are determined to be the logs to be uploaded from the time.
Correspondingly, according to a preset log uploading condition, determining a log to be uploaded from the running logs, wherein the step comprises the following steps of: acquiring the log level of the running log, the target log level and the target uploading time; and determining the running log with the log level as the target log level in the target uploading time as the log to be uploaded. The method for acquiring the target log level and the target uploading time comprises the following steps: receiving a log acquisition instruction sent by a server; and determining the target log level and the target uploading time according to the log obtaining instruction. The method comprises the following steps of determining target log level and target uploading time according to a log obtaining instruction, wherein the steps comprise: acquiring the log level and uploading time of the running log to be uploaded in the log acquisition instruction; and determining the log level of the acquired running log to be uploaded as a target log level, and determining the uploading time as the target uploading time. Therefore, the uploading time of the running logs at the target log level is determined as the target uploading time, namely the uploading time of the logs to be uploaded is determined as the target uploading time. It is to be understood that the target log-level execution log is not determined as the log to be uploaded at all times, but only the target log-level execution log within the target upload time is determined as the log to be uploaded.
Further, if the target uploading time is set by (current time, future time), the running log of the target log level from the current time to the expiration of the future time is determined as the log to be uploaded. Or the target uploading time is set according to the current time and the time length, namely the running logs of the target log level in the time length are determined as the logs to be uploaded from the current time. In these cases, the log to be uploaded is generated over time, and in order to reduce the number of times the log to be uploaded is uploaded so as to further reduce the interaction with the server, a timer is set in the first terminal.
Therefore, according to the preset log uploading condition, the step of determining the log to be uploaded from the running log comprises the following steps: starting a timer; acquiring the log level of the running log, the target log level and the target uploading time; detecting whether the current time is within the target uploading time or not; if the current time is within the target uploading time, detecting whether the timing time of the current timer reaches the preset time or not; and if the preset time is reached, determining the stored running log with the log level as the target log level as the log to be uploaded, and resetting the timer. It can be understood that, if the current time is not within the target uploading time, the running log with the log level being the default log level is determined as the log to be uploaded. Wherein, the running log with the log level as the target log level can be stored in the cache. In this case, the time point of determining and uploading the log to be uploaded is controlled within the target upload time by the timer of the first terminal, and it is determined whether the current time is within the target upload time by the first terminal.
As shown in fig. 1f, a timer is provided in the first terminal. And in the target uploading time, if the time of the timer reaches the preset time, determining the running log which is stored in the cache and has the log level as the target log level as the log to be uploaded, and uploading the log to the server.
In the above-described scheme of setting the target upload time, the target upload time is included in the log acquisition instruction, and in some cases, the target upload time is stored in the server although the target upload time is set. The target log level is included in the log retrieval instruction, and the target upload time is not included. Thus, the server receives the log to be uploaded by the first terminal; judging whether the current time is within the target uploading time or not; if the target log is uploaded within the time, a log obtaining instruction is sent to the first terminal, and the log obtaining instruction comprises a target log level; and if the target is not uploaded within the time, sending a log obtaining instruction to the first terminal, wherein the log obtaining instruction comprises a default log level. Thus, the server determines whether the current time is within the target uploading time.
It can be understood that, in the above scheme related to the target log level, the log uploading level of the user is modified in real time, so that the running log corresponding to the user can be uploaded in real time. For example, the comprehensive running log of the user can be uploaded in real time, and the problem that developers do not have equipment or the environment reappears some abnormity or bugs of individual users is solved. In addition, the corresponding running logs are automatically uploaded in real time, so that the log uploading real-time performance is guaranteed, and the log uploading efficiency is improved.
In a scene related to important parameter data, some or all of the important parameter data are used as preset parameter data. Specifically, step 103, namely, the step of determining the log to be uploaded from the running logs according to the preset log uploading condition, includes: acquiring data content of the running log and target data content; and determining the running log including the target data content in the data content as the log to be uploaded. The target data content comprises data content corresponding to one or more preset parameter data. And determining the running log including the target data content in the data content as the log to be uploaded. Or, it may also be understood that the operation log is determined as the log to be uploaded as long as the data content of the operation log includes one or more preset parameter data. Wherein, the running log of the data content including the preset parameter data comprises: a running log of data contents including only preset parameter data; the operation logs including the data content of the preset parameter data include all the operation logs within a predetermined time period including the operation logs of the data content of the preset parameter data. And uploading a plurality of running logs to improve the efficiency of positioning problems of subsequent developers.
It is to be understood that, in this case, the running log in which the target data content is included in the data content is determined as the log to be uploaded, and the log to be uploaded is uploaded in step 104. Therefore, the running logs are automatically uploaded in real time, the log uploading real-time performance is guaranteed, and the log uploading efficiency is improved.
Further, after receiving the running logs (the data content includes the data content of the preset parameter data) sent by the plurality of first terminals, the server performs statistical processing on the data content of the preset parameter data to obtain preset index data, where the preset index data includes a live broadcast sound-picture asynchronization rate, a pause rate, a push arrival rate, a delay time, and the like. If an average value of the transmission delay times in the plurality of first terminals is obtained, the average value is used as the total delay time; judging whether the calculated total delay time is greater than a preset delay time or not; and if the time is longer than the preset delay time, sending an alarm prompt to a second terminal where the developer is located, so as to realize real-time monitoring and alarm of important parameter data.
And 104, uploading the log to be uploaded.
The log to be uploaded is uploaded through an HTTP (Hypertext Transfer Protocol). Namely, the first terminal and the server establish an HTTP connection so as to upload the log to be uploaded through an HTTP protocol. Since the established HTTP connection is a single connection, other connection requests between the first terminal and the server are not affected. As shown in fig. 1e and 1 g.
Specifically, step 104, namely the step of uploading the log to be uploaded, includes: and uploading the log to be uploaded to a block chain. And uploading the log to be uploaded to the block chain, and saving the uploaded running log through the block chain. If a storage request is generated according to the log to be uploaded, the storage request is used for uploading and storing the log to be uploaded to the block chain, the storage request is sent to the node equipment of the block chain, the node equipment verifies the validity of the storage request, and records the valid storage request on the storage after consensus is completed.
The scenes listed in the embodiment of the application almost cover all scenes for uploading logs, so that the problems of offline of a user in the background art, difficulty in positioning an external network due to the fact that equipment or environment of a first terminal cannot be reproduced are solved, and meanwhile the problems that multi-terminal interaction problems are positioned, corresponding running logs cannot be uploaded due to abnormal starting and the like are solved. The log uploading method in the embodiment of the application is suitable for uploading the running logs of all projects. The log uploading method in the embodiment of the application can upload the running logs corresponding to the user in real time according to the preset log uploading condition, automatically upload the corresponding running logs in real time, ensure the real-time log uploading and improve the log uploading efficiency.
According to the method described in the foregoing embodiment, this embodiment will be further described from the perspective of a log uploading device, which may be specifically implemented as an independent entity, or may be implemented by being integrated in a first terminal or a service server.
As shown in fig. 2a, the log uploading apparatus includes a unit corresponding to the log uploading method in fig. 1 c. The apparatus may include an acquisition unit 201, a generation unit 202, a determination unit 203, and an upload unit 204.
An obtaining unit 201, configured to obtain the running data of the target application and the user identifier.
The generating unit 202 is configured to generate an operation log according to the operation data and the user identifier.
Specifically, as shown in fig. 2b, the generating unit 202 includes: a first monitoring unit 2021, a target data determining unit 2022, and a first generating unit 2023. The first monitoring unit 2021 is configured to monitor the log tracking identifier. The target data determining unit 2022 is configured to determine target operation data corresponding to the log tracking identifier when the log tracking identifier is monitored. A first generating unit 2023, configured to generate an operation log according to the target operation data and the user identifier.
Specifically, the generating unit 202 further includes: a failure detection unit and a second generation unit. The failure detection unit is used for detecting whether an error code corresponding to the network request failure abnormity of the target application program is received. And the second generation unit is used for generating an operation log of the network request failure abnormity according to the network request, the error code and the user identifier if the error code corresponding to the network request failure abnormity of the target application program is received.
Specifically, the generating unit 202 further includes: the device comprises a starting abnormality detection unit, a storage modification unit and a third generation unit. The starting abnormity detection unit is used for detecting whether the target application program has starting abnormity. And the saving and modifying unit is used for saving stack information when the abnormal starting occurs and modifying the flag bit of the abnormal starting if the abnormal starting occurs in the target application program. And a third generating unit configured to generate an operation log of the startup abnormality according to the saved stack information, and save the generated operation log of the startup abnormality in the first terminal.
Specifically, the generating unit 202 further includes: an information acquisition unit and a fourth generation unit. The information acquisition unit is used for acquiring the abnormal or loophole information. And the fourth generation unit is used for generating an operation log according to the abnormal or loophole information and the user identification.
Specifically, the generating unit 202 further includes: the device comprises a second detection unit, a first content acquisition unit and a fifth generation unit. And the second detection unit is used for monitoring parameter data. And the first content acquisition unit is used for acquiring the data content of the parameter data when the parameter data is monitored. And the fifth generating unit is used for generating the running log according to the data content and the user identification of the parameter data.
The determining unit 203 is configured to determine a log to be uploaded from the running logs according to a preset log uploading condition.
Specifically, the determination unit 203 includes: the device comprises an identification detection unit and a first determination unit. The identification detection unit is used for detecting whether the running log comprises a log tracking identification or not. And the first determining unit is used for determining the running log as the log to be uploaded if the running log comprises the log tracking identifier.
Specifically, the determining unit 203 further includes: the device comprises a type acquisition unit and a second determination unit. The type obtaining unit is used for obtaining the log type of the running log, and the log type comprises an abnormal type. And the second determining unit is used for determining the operation log comprising the abnormal type as the log to be uploaded, wherein the abnormal type comprises a network request failure abnormity.
Specifically, the determining unit 203 further includes: a folder obtaining unit and a third determining unit. The folder obtaining unit is used for obtaining the running log in the abnormal starting folder. And the third determining unit is used for determining the acquired running log as a log to be uploaded.
Specifically, the determining unit 203 further includes: a level acquiring unit and a fourth determining unit. The level acquiring unit is used for acquiring the log level of the running log and the target log level. And the fourth determining unit is used for determining the running log with the log level as the target log level as the log to be uploaded. The level acquisition unit comprises a target level acquisition unit. And the target level acquiring unit is used for acquiring a target log level. The target level acquisition unit is specifically used for receiving a log acquisition instruction sent by the server; and determining the target log level according to the log acquisition instruction.
Specifically, the determining unit 203 further includes: a second content acquisition unit and a fifth determination unit. The second content obtaining unit is used for obtaining the data content of the running log and the target data content. And the fifth determining unit is used for determining the running log including the target data content in the data content as the log to be uploaded.
Specifically, the determining unit 203 further includes: the instruction detection unit and the sixth uploading unit. The instruction detection unit is used for detecting whether a log uploading instruction is triggered or not. And the sixth uploading unit is used for acquiring the running log in the preset time period from the running log if the log uploading triggering instruction is detected, and determining the running log as the log to be uploaded.
And the uploading unit 204 is used for uploading the log to be uploaded. The uploading unit 204 is specifically configured to upload the log to be uploaded to the block chain.
In specific implementation, the above units may be implemented as independent entities, or may be implemented as one or several entities by any combination. The specific implementation processes of the above apparatus and each unit, and the achieved beneficial effects, may refer to the corresponding descriptions in the foregoing method embodiments applied to the node of the block chain, and for convenience and brevity of description, no further description is given here.
The embodiment of the present application further provides a computer device, as shown in fig. 3, which shows a schematic structural diagram of the computer device according to the embodiment of the present application, specifically:
the computer device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, Radio Frequency (RF) circuitry 303, a power supply 304, an input unit 305, and a display unit 306. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, performs various functions of the computer device and processes data by running or executing computer programs, such as software programs and/or modules, stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the computer device. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The RF circuit 303 may be used for receiving and transmitting signals during information transmission and reception, and in particular, for receiving downlink information of a base station and then processing the received downlink information by the one or more processors 301; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 303 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 303 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The computer device further includes a power supply 304 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 304 is logically connected to the processor 301 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 304 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 305, and the input unit 305 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 305 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 301, and can receive and execute commands sent by the processor 301. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 305 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The computer device may also include a display unit 306, the display unit 306 may be used to display information input by or provided to the user as well as various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 306 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 301 to determine the type of the touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of the touch event. Although in the figures the touch sensitive surface and the display panel are shown as two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
Although not shown, the computer device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 301 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions as follows:
acquiring running data and a user identifier of a target application program;
generating an operation log according to the operation data and the user identification;
determining a log to be uploaded from the running logs according to a preset log uploading condition;
and uploading the log to be uploaded.
The computer device may implement the steps in any embodiment of the log uploading method applied to the first terminal and the service server provided by the embodiment of the present application, and therefore, beneficial effects that any log uploading method applied to the first terminal and the service server provided by the embodiment of the present application can implement may be achieved, which are detailed in the foregoing embodiments and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, where a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps of any embodiment of the log uploading method applied in the first terminal and the service server provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any log uploading method embodiment provided by the embodiment of the present invention, beneficial effects that can be achieved by any log uploading method provided by the embodiment of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The log uploading method, apparatus, computer device and storage medium provided by the embodiments of the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A log uploading method, comprising:
acquiring running data and a user identifier of a target application program;
generating an operation log according to the operation data and the user identification;
determining a log to be uploaded from the running logs according to a preset log uploading condition;
and uploading the log to be uploaded.
2. The log uploading method of claim 1, wherein the step of generating a run log based on the run data and the user identification comprises:
monitoring a log tracking identifier;
when the log tracking identification is monitored, determining target operation data corresponding to the log tracking identification;
and generating an operation log according to the target operation data and the user identification.
3. The log uploading method according to claim 2, wherein the step of determining the log to be uploaded from the running logs according to a preset log uploading condition comprises:
detecting whether the running log comprises the log tracking identification or not;
and if the log tracking identifier is included, determining the log to be uploaded.
4. The log uploading method as claimed in claim 2, wherein said step of monitoring log trace identification comprises:
detecting whether a log tracking identifier is generated;
and when the generation of the log tracking identifier is detected, determining to monitor the log tracking identifier.
5. The log uploading method as claimed in claim 2, wherein said step of monitoring log trace identification comprises:
detecting whether an interaction request is received;
determining to monitor the log tracking identity when the interaction request is detected.
6. The log uploading method according to claim 1, wherein the determining, according to a preset log uploading condition, a log to be uploaded from the running logs comprises:
acquiring a log type of the running log, wherein the log type comprises an abnormal type;
and determining the running log comprising the exception type as a log to be uploaded, wherein the exception type comprises a network request failure exception.
7. The log uploading method according to claim 1, wherein the determining, according to a preset log uploading condition, a log to be uploaded from the running logs comprises:
acquiring an operation log in a starting abnormal folder;
and determining the acquired running log as a log to be uploaded.
8. The log uploading method according to claim 1, wherein the determining, according to a preset log uploading condition, a log to be uploaded from the running logs comprises:
acquiring the log level of the running log and the target log level;
and determining the running log with the log level as the target log level as the log to be uploaded.
9. The log uploading method of any of claims 1-8, wherein uploading the log to be uploaded comprises:
and uploading the log to be uploaded to a block chain.
10. An apparatus for log uploading, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the running data and the user identification of a target application program;
the generating unit is used for generating an operation log according to the operation data and the user identification;
the determining unit is used for determining the log to be uploaded from the running logs according to preset log uploading conditions;
and the uploading unit is used for uploading the log to be uploaded.
CN201911021785.XA 2019-10-25 2019-10-25 Log uploading method and device Active CN112711518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911021785.XA CN112711518B (en) 2019-10-25 2019-10-25 Log uploading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911021785.XA CN112711518B (en) 2019-10-25 2019-10-25 Log uploading method and device

Publications (2)

Publication Number Publication Date
CN112711518A true CN112711518A (en) 2021-04-27
CN112711518B CN112711518B (en) 2024-04-12

Family

ID=75541440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911021785.XA Active CN112711518B (en) 2019-10-25 2019-10-25 Log uploading method and device

Country Status (1)

Country Link
CN (1) CN112711518B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312321A (en) * 2021-05-31 2021-08-27 中国民航信息网络股份有限公司 Abnormal monitoring method for traffic and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429775A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Method and device for reporting log
CN105975373A (en) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 Running monitoring method and apparatus for software program
CN107018046A (en) * 2017-06-06 2017-08-04 上海鋆创信息技术有限公司 A kind of collecting method, device, terminal and storage medium
CN110069463A (en) * 2019-03-12 2019-07-30 北京奇艺世纪科技有限公司 User behavior processing method, device electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429775A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Method and device for reporting log
CN105975373A (en) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 Running monitoring method and apparatus for software program
CN107018046A (en) * 2017-06-06 2017-08-04 上海鋆创信息技术有限公司 A kind of collecting method, device, terminal and storage medium
CN110069463A (en) * 2019-03-12 2019-07-30 北京奇艺世纪科技有限公司 User behavior processing method, device electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312321A (en) * 2021-05-31 2021-08-27 中国民航信息网络股份有限公司 Abnormal monitoring method for traffic and related equipment

Also Published As

Publication number Publication date
CN112711518B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN107852416A (en) The life cycle of monitoring computer network connection
US20160285781A1 (en) Data processing method, apparatus, client, server and system
US9565562B1 (en) Knowledge based authentication using mobile devices
CN108200180B (en) Method and device for limiting request frequency and computer equipment
CN112235303B (en) Account logout method and device and computer equipment
CN110784374A (en) Method, device, equipment and system for monitoring operation state of service system
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
US20220414372A1 (en) Scene detection method and apparatus, electronic device and computer storage medium
CN111209338A (en) Advertisement frequency control method and device, electronic equipment and storage medium
WO2016040198A1 (en) Automated tenant upgrades for multi-tenant services
CN111694743A (en) Service system detection method and device
CN110061876B (en) Optimization method and system of operation and maintenance auditing system
WO2022256330A1 (en) Detecting datacenter mass outage with near real-time/offline data using ml models
CN108039956A (en) Using monitoring method, system and computer-readable recording medium
CN112711518B (en) Log uploading method and device
CN108650123A (en) Fault message recording method, device, equipment and storage medium
US20170091712A1 (en) Apparatus and Method for Employee Time Entry and Accounting
CN116684489A (en) Remote test method, system, device and storage medium
CN105681291A (en) Method and system for realizing unified authentication of multiple clients
CN114971662A (en) Data tracking method, device, equipment and storage medium
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium
RU2671999C1 (en) Method and system for diagnostics of mobile computer devices
Khalid et al. Intelligent use of fog devices in edge‐cloud paradigm to assist in E‐polling
CN110399716A (en) A kind of cryptographic validity test method, system and electronic equipment and storage medium
CN113542103B (en) Method and device for monitoring invitations of accounts in social communication group and mobile terminal

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