CN110545296A - Log data acquisition method, device and equipment - Google Patents

Log data acquisition method, device and equipment Download PDF

Info

Publication number
CN110545296A
CN110545296A CN201810523837.2A CN201810523837A CN110545296A CN 110545296 A CN110545296 A CN 110545296A CN 201810523837 A CN201810523837 A CN 201810523837A CN 110545296 A CN110545296 A CN 110545296A
Authority
CN
China
Prior art keywords
log data
client
length
file server
request message
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
CN201810523837.2A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810523837.2A priority Critical patent/CN110545296A/en
Publication of CN110545296A publication Critical patent/CN110545296A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

the application provides a log data acquisition method, a device and equipment thereof, wherein the method comprises the following steps: determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server; if yes, obtaining the third log data from the file server; the third log data is log data that is present in the second log data and is not present in the first log data. Through the technical scheme, the log data can be stored persistently, client resources are saved, client processing performance is improved, and user experience is improved.

Description

log data acquisition method, device and equipment
Technical Field
The present application relates to the field of internet, and in particular, to a method, an apparatus, and a device for acquiring log data.
Background
the log data mainly comprises a system log, an application program log and a safety log, and users (such as system operation and maintenance personnel, developers and the like) can analyze software and hardware information, load, performance and safety of the application server through the log data and analyze whether an abnormality exists in the task running process through the log data. When the task is abnormal, the reason of the task abnormality can be analyzed through log data, and then measures are taken to correct errors.
in order to realize the presentation of the log data, the client needs to establish a connection (such as a long connection based on a socket protocol) with the application server, and the application server can push the log data to the client for presentation.
When a large number of application servers exist, each application server generates log data, and therefore, a client needs to establish connection with each application server, so that the client establishes a large number of connections, occupies a large number of resources of the client, affects the processing performance of the client, and reduces user experience. Moreover, once there is an application server exception, after the application server exception is recovered, the client needs to establish a connection with the application server again.
disclosure of Invention
The application provides a log data acquisition method, which comprises the following steps:
Determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server;
if yes, obtaining the third log data from the file server; wherein the third log data is log data that is present in the second log data and is not present in the first log data.
The application provides a log data acquisition method, which comprises the following steps:
Sending a second length of second log data stored by the file server to the client;
Receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client;
acquiring third log data from the second log data; wherein the third log data is log data that is present in the second log data and that is not present in the first log data;
and sending the third log data to the client.
the application provides a log data acquisition method, which comprises the following steps:
Sending a request message for requesting log data to a file server;
Receiving a response message returned by the file server aiming at the request message;
and acquiring the log data stored by the file server from the response message.
The application provides a log data acquisition method, which comprises the following steps:
Receiving a request message which is sent by a client and used for requesting log data;
acquiring log data corresponding to the request message from the file server;
And sending a response message carrying the log data to the client.
The application provides a log data acquisition device, includes:
the determining module is used for determining whether third log data are included in the second log data according to a first length of the first log data stored by the client and a second length of the second log data stored by the file server;
An obtaining module, configured to obtain third log data from the file server when the second log data includes the third log data; wherein the third log data is log data that is present in the second log data and is not present in the first log data.
The application provides a log data acquisition device, includes:
The sending module is used for sending the second length of the second log data stored by the file server to the client;
The receiving module is used for receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client;
The acquisition module is used for acquiring third log data from the second log data; the third log data is log data that exists in the second log data and does not exist in the first log data;
The sending module is further configured to send the third log data to the client.
The application provides a terminal device, the terminal device includes: a processor and a machine-readable storage medium having stored thereon a plurality of computer instructions, the processor when executing the computer instructions performs: determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server; if yes, obtaining the third log data from the file server; the third log data is log data that is present in the second log data and is not present in the first log data.
The present application provides a file server, the file server comprising: a processor and a machine-readable storage medium having stored thereon a plurality of computer instructions, the processor when executing the computer instructions performs: sending a second length of second log data stored by the file server to the client; receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client; acquiring third log data from the second log data; wherein the third log data is log data that is present in the second log data and that is not present in the first log data; and sending the third log data to the client.
Based on the technical scheme, in the embodiment of the application, the file server can acquire the log data from the plurality of application servers, and store the log data of the application servers in the file server, so that the log data can be persistently stored. The client can acquire the log data only by accessing the file server without establishing connection with the application server, so that the resources of the client are saved, the processing performance of the client is improved, and the user experience is improved. The client can acquire log data from the file server in an HTTP (Hyper Text Transfer Protocol) mode without establishing a long connection based on a socket Protocol between the client and the file server. Further, the client may determine whether the second log data includes third log data according to the first length of the first log data and the second length of the second log data, and send the request message to the file server instead of sending the request message periodically when the third log data is included, so that the number of sent request messages may be reduced, and the network bandwidth may be saved. Further, the file server transmits the third log data (i.e., the log data that the client does not exist) to the client, instead of transmitting the second log data (including the first log data that the client exists and the third log data that the client does not exist) to the client, thereby avoiding transmitting duplicate log data to the client, assuming a transmission amount.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
FIG. 2 is a flow chart of a log data acquisition method in one embodiment of the present application;
FIG. 3 is a flow chart of a log data acquisition method in another embodiment of the present application;
fig. 4 is a block diagram of a log data acquisition apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of a log data acquisition apparatus according to another embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
it should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a log data acquisition method which can be applied to systems comprising a client, an application server and a file server, such as systems of artificial intelligence, big data computing and the like. Referring to fig. 1, which is a schematic structural diagram of the system, in fig. 1, 1 client, 3 application servers, and 1 file server are taken as examples, and in practical applications, the number of clients, the number of application servers, and the number of file servers may also be other values, which is not limited to this, and the following description will be given by taking fig. 1 as an example.
The client may be an APP (application program) of a terminal device (e.g., a Personal Computer (PC), a notebook Computer, a mobile terminal, a smart phone, etc.), or may be a browser of the terminal device, which is not limited thereto. The application server is a server having an application function, and may generate log data (such as a system log, an application log, and a security log), which is not limited in this respect. The file server is a server for storing log data, and may be an OSS (Object Storage Service) or a minio (open source Object Storage server), which is not limited thereto.
in a traditional mode, a client establishes connection with each application server, so that the client establishes a large number of connections, a large number of resources of the client need to be occupied, the processing performance of the client is affected, and the user experience is reduced.
different from the above manner, in the embodiment of the present application, a file server may be deployed, each application server may send log data to the file server after generating the log data, and the file server may store the log data, for example, persistently store the log data. The client may obtain the log data from the File server in an HTTP manner without establishing a long connection based on a socket Protocol between the client and the File server, and of course, the client may also obtain the log data from the File server in other manners, such as FTP (File Transfer Protocol), without limitation. After the client side obtains the log data, the log data can be displayed, and therefore a high-availability log display system is achieved.
For convenience of distinction, in the embodiment of the present application, the log data may be distinguished into the first log data, the second log data, and the third log data. The log data stored in the client may be referred to as first log data, the log data stored in the file server may be referred to as second log data, and the log data existing in the second log data and not existing in the first log data may be referred to as third log data.
For example, the client stores log data a, and the file server stores log data a and log data B, and in addition, the log data a may be referred to as first log data, the log data a and the log data B may be referred to as second log data, and the log data B may be referred to as third log data.
in practical applications, the application server may process a plurality of tasks, and the application server generates log data for each task, and each task has a unique task identifier. Based on this, the first log data, the second log data, and the third log data are all log data for the same task, that is, the task identifier corresponding to the first log data may be the same as the task identifier corresponding to the second log data, and the task identifier corresponding to the first log data may be the same as the task identifier corresponding to the third log data.
because the processing manner of the log data for each task is the same, in this embodiment, taking the processing process of the log data of one task as an example, the processing of the log data of other tasks is not repeated.
In the application scenario, referring to fig. 2, a flowchart of a log data obtaining method provided in the embodiment of the present application is shown, where the method may be applied to a client, and the method may include the following steps:
Step 201, determining whether the second log data includes third log data according to a first length of the first log data stored by the client and a second length of the second log data stored by the file server. If so, step 202 may be performed; if not, the next period is waited, and the step 201 is continued.
step 202, obtaining the third log data from the file server; the third log data is present in the second log data and absent in the first log data.
specifically, the obtaining the third log data from the file server may include: sending a first request message for requesting third log data to the file server, receiving a first response message returned by the file server aiming at the first request message, and acquiring the third log data from the first response message.
in an example, the execution sequence is only an example given for convenience of description, and in practical applications, the execution sequence between steps may also be changed, and the execution sequence is not limited. Moreover, in other embodiments, the steps of the respective methods do not have to be performed in the order shown and described herein, and the methods may include more or less steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
in one example, before step 201, a second length of second log data stored by the file server may also be obtained from the file server. Specifically, the client may send a second request message for requesting the length of the log to the file server, receive a second response message returned by the file server for the second request message, and obtain the second length of the second log data stored by the file server from the second response message. The client may then determine whether to include third log data using the first length and the second length.
In one example, after step 201, if the second log data does not include the third log data, the client may prohibit obtaining the log data from the file server (i.e., step 202 is not performed again), and wait for the next period, re-obtain the second length of the second log data stored by the file server from the file server, perform step 201, determine whether the second log data includes the third log data, and so on.
In one example, for step 201, determining whether the second log data includes the third log data according to the first length and the second length may include, but is not limited to, the following: if the second length is greater than the first length, it may be determined that third log data is included in the second log data; if the second length is equal to the first length, it may be determined that third log data is not included in the second log data.
in one example, after step 204, the client may further append a third log data to the first log data to obtain a new first log data; the new first log data may then be presented to the user.
in the above-described embodiments, the first request message may include, but is not limited to, an HTTP request message, and the first response message may include, but is not limited to, an HTTP response message. The second request message may include, but is not limited to, an HTTP request message and the second response message may include, but is not limited to, an HTTP response message.
In another example, referring to fig. 3, which is a flowchart of a log data obtaining method provided in an embodiment of the present application, the method may be applied to a file server, and the method may include the following steps:
Step 301, sending the second length of the second log data stored by the file server to the client.
Step 302, a first request message sent by the client for requesting the third log data is received.
The first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client.
Step 303, obtaining third log data from the second log data; wherein the third log data is present in the second log data and absent in the first log data.
And step 304, sending the third log data to the client.
For example, the file server sends a first response message carrying the third log data to the client.
in an example, the execution sequence is only an example given for convenience of description, and in practical applications, the execution sequence between steps may also be changed, and the execution sequence is not limited. Moreover, in other embodiments, the steps of the respective methods do not have to be performed in the order shown and described herein, and the methods may include more or less steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
In one example, for step 301, sending the second length of the second log data stored by the file server to the client may include: and receiving a second request message which is sent by the client and used for requesting the log length, and sending the second length of the second log data to the client. For example, the file server may send a second response message of a second length carrying second log data to the client.
in an example, for step 303, the first request message may further carry a third length of third log data, and based on this, acquiring the third log data from the second log data may include: and acquiring a third length of third log data from the first request message, and acquiring the third log data from the second log data according to the third length. For example, the third length of log data is read from the rearmost of the second log data, and the read log data is the third log data.
in one example, the log data generated by the application server connected to the file server may be acquired, and the acquired log data may be appended to the second log data to obtain new second log data.
In the above-described embodiments, the first request message may include, but is not limited to, an HTTP request message, and the first response message may include, but is not limited to, an HTTP response message. The second request message may include, but is not limited to, an HTTP request message and the second response message may include, but is not limited to, an HTTP response message.
Based on the technical scheme, in the embodiment of the application, the file server can acquire the log data from the plurality of application servers, and store the log data of the application servers in the file server, so that the log data can be persistently stored. The client can acquire the log data only by accessing the file server without establishing connection with the application server, so that the resources of the client are saved, the processing performance of the client is improved, and the user experience is improved. The client can acquire log data from the file server in an HTTP mode, and long connection based on a socket protocol is not required to be established between the client and the file server. The client can determine whether the second log data includes the third log data according to the first length of the first log data and the second length of the second log data, and send the request message to the file server instead of sending the request message periodically when the third log data is included, so that the sending number of the request message can be reduced, and the network bandwidth can be saved. Furthermore, the file server transmits the third log data (i.e., the log data that does not exist at the client) to the client, instead of transmitting the second log data (including the first log data that exists at the client and the third log data that does not exist at the client) to the client, thereby avoiding transmitting duplicate log data to the client.
The technical solutions of the embodiments of the present application will be described in detail below with reference to specific embodiments.
In step 411, the application server generates log data a, where the log data a corresponds to the task identifier 1.
in step 412, the application server sends the log data a to the file server, and the file server may store the log data a locally and record the corresponding relationship between the task identifier 1 and the log data a.
in step 413, when the client needs to request log data corresponding to the task identifier 1, the client may send an HTTP request message 1 (i.e., the second request message) carrying the task identifier 1 to the file server.
Wherein the client may periodically send HTTP request messages 1 to the file server.
In step 414, after receiving the HTTP request message 1, the file server obtains the task identifier 1 from the HTTP request message 1, and determines the log data a corresponding to the task identifier 1 and the length a of the log data a.
Wherein the log data a is the second log data and the length a is the second length.
step 415, the file server sends HTTP response message 1 carrying length a to the client.
in step 416, the client acquires length a from HTTP response message 1, and since the log data of task identifier 1 is not stored locally, the first length of the first log data is 0, and the first length is smaller than length a.
In step 417, the client determines that the second log data includes third log data, and sends an HTTP request message 2 (i.e., the first request message) carrying the task identifier 1 and the length a to the file server.
Step 418, the file server obtains the task identifier 1 and the length a from the HTTP request message 2, determines the log data a corresponding to the task identifier 1, and reads the log data of the length a from the rearmost of the log data a, that is, reads the log data a, where the log data a is the third log data.
Step 419, the file server sends HTTP response message 2 carrying log data a to the client.
in step 420, the client acquires the log data a from the HTTP response message 2, stores the log data a locally (at this time, the log data a is the first log data), and presents the log data a to the user.
In the subsequent process, the client may periodically send the HTTP request message 1, and since the HTTP response message 1 for the HTTP request message 1 carries the length a, and the first length of the locally stored log data a is also the length a, the client may no longer send the HTTP request message 2.
In the subsequent process, if the application server generates the log data B, the following steps may be further included:
In step 421, the application server generates log data B, where the log data B corresponds to the task identifier 1.
In step 422, the application server sends the log data B to the file server, the file server attaches the log data B to the back of the log data a, and the log data a and the log data B form second log data, and the total length R (length a + length B) of the log data a and the log data B is the second length.
step 423, the client sends HTTP request message 1 carrying task identifier 1 to the file server.
step 424, the file server obtains the task identifier 1 from the HTTP request message 1, and determines the log data a and the log data B corresponding to the task identifier 1, and the total length R of the log data a and the log data B.
Step 425, the file server sends HTTP response message 1 carrying length R to the client.
In step 426, the client obtains the length R from the HTTP response message 1, and obtains a first length of the log data a of the task identifier 1 stored locally by the client, where the first length may be the length a.
In step 427, the client compares the length a with the length R, and since the length a is smaller than the length R, the client may determine that the second log data includes third log data, and send an HTTP request message 2 carrying the task identifier 1 and the length B (i.e., the difference between the length R and the length a) to the file server.
in step 428, after receiving the HTTP request message 2, the file server obtains the task identifier 1 and the length B from the HTTP request message 2, determines second log data (the second log data are the log data a and the log data B) corresponding to the task identifier 1, and reads the log data of the length B from the rearmost of the second log data, that is, reads the log data B, where the log data B is the third log data.
Step 429, the file server sends HTTP response message 2 carrying log data B to the client.
in step 430, after receiving the HTTP response message 2, the client may obtain the log data B from the HTTP response message 2, and attach the log data B to the back of the log data a, where the log data a and the log data B constitute first log data, and a total length R of the log data a and the log data B is the first length. Thereafter, the client may also present log data a and log data B to the user.
based on the same application concept as the method, the embodiment of the present application further provides a log data obtaining method, which may be applied to a client, and the method may include the following steps: sending a request message for requesting log data to a file server; then, a response message returned by the file server for the request message may be received, and the log data stored by the file server may be acquired from the response message.
In one example, the client may periodically send a request message to the file server and receive a response message returned by the file server, and obtain the log data stored by the file server from the response message.
In another example, the client may determine whether the second log data includes third log data according to a first length of the first log data stored by the client and a second length of the second log data stored by the file server, and if so, send a request message to the file server, receive a response message returned by the file server, and obtain the third log data stored by the file server from the response message.
Based on the same application concept as the method, the embodiment of the present application further provides a log data obtaining method, which may be applied to a file server, and the method may include the following steps: receiving a request message for requesting log data sent by a client, acquiring the log data corresponding to the request message from a file server, and sending a response message carrying the log data to the client.
Based on the same application concept as the method, an embodiment of the present application further provides a log data obtaining apparatus, which can be applied to a client, as shown in fig. 4, and is a structural diagram of the apparatus, where the apparatus includes:
A determining module 401, configured to determine whether third log data is included in second log data according to a first length of the first log data stored by the client and a second length of the second log data stored by the file server; an obtaining module 402, configured to obtain third log data from the file server when the second log data includes the third log data; wherein the third log data is log data that is present in the second log data and is not present in the first log data.
In an example, the obtaining module 402 is further configured to obtain, from the file server, a second length of second log data stored by the file server.
Based on the same application concept as the method, an embodiment of the present application further provides a log data obtaining apparatus, which can be applied to a file server, as shown in fig. 5, and is a structural diagram of the apparatus, where the apparatus includes: a sending module 501, configured to send a second length of second log data stored by the file server to the client; a receiving module 502, configured to receive a first request message sent by the client for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client; an obtaining module 503, configured to obtain third log data from the second log data; the third log data is log data that exists in the second log data and does not exist in the first log data; the sending module 501 is further configured to send the third log data to the client.
the sending module 501, when sending the second length of the second log data stored in the file server to the client, is specifically configured to: receiving a second request message which is sent by the client and used for requesting the log length; and sending the second length of the second log data to the client.
Based on the same application concept as the method, an embodiment of the present application further provides a terminal device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing: determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server; if yes, obtaining the third log data from the file server; the third log data is log data that is present in the second log data and is not present in the first log data.
Based on the same application concept as the method, an embodiment of the present application further provides a file server, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing: sending a second length of second log data stored by the file server to the client; receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client; acquiring third log data from the second log data; wherein the third log data is log data that is present in the second log data and that is not present in the first log data; and sending the third log data to the client.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
the present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (19)

1. A log data acquisition method is characterized by comprising the following steps:
Determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server;
if yes, obtaining the third log data from the file server; wherein the third log data is log data that is present in the second log data and is not present in the first log data.
2. the method of claim 1,
Before the determining whether the second log data includes third log data, the method further includes:
And acquiring a second length of second log data stored by the file server from the file server.
3. The method of claim 2,
After determining whether third log data is included in the second log data, the method further includes:
and if not, forbidding to acquire the log data from the file server, and waiting for the next period to acquire the second length of the second log data stored by the file server again from the file server.
4. the method according to claim 1 or 3,
The determining whether the second log data includes third log data includes:
If the second length is larger than the first length, determining that the second log data comprises third log data;
And if the second length is equal to the first length, determining that third log data are not included in the second log data.
5. The method of claim 1,
After the obtaining the third log data from the file server, the method further includes:
Appending the third log data to the first log data to obtain new first log data;
And displaying the new first log data to a user.
6. The method of claim 1, wherein a task identification corresponding to the first log data is the same as a task identification corresponding to the second log data.
7. a log data acquisition method is characterized by comprising the following steps:
sending a second length of second log data stored by the file server to the client;
Receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client;
acquiring third log data from the second log data; wherein the third log data is log data that is present in the second log data and that is not present in the first log data;
And sending the third log data to the client.
8. the method of claim 7,
Sending the second length of the second log data stored by the file server to the client, including:
Receiving a second request message which is sent by the client and used for requesting the log length;
and sending the second length of the second log data to the client.
9. the method of claim 7, wherein the first request message carries a third length of third log data, and wherein the obtaining third log data from the second log data comprises:
obtaining a third length of third log data from the first request message;
and acquiring third log data from the second log data according to the third length.
10. The method of claim 7, further comprising:
Acquiring log data generated by an application server connected with the file server;
And adding the acquired log data to the second log data to obtain new second log data.
11. The method of claim 7, wherein the task identification corresponding to the first log data is the same as the task identification corresponding to the second log data.
12. A log data acquisition method is characterized by comprising the following steps:
Sending a request message for requesting log data to a file server;
Receiving a response message returned by the file server aiming at the request message;
and acquiring the log data stored by the file server from the response message.
13. A log data acquisition method is characterized by comprising the following steps:
receiving a request message which is sent by a client and used for requesting log data;
Acquiring log data corresponding to the request message from the file server;
And sending a response message carrying the log data to the client.
14. a log data acquisition apparatus, comprising:
the determining module is used for determining whether third log data are included in the second log data according to a first length of the first log data stored by the client and a second length of the second log data stored by the file server;
an obtaining module, configured to obtain third log data from the file server when the second log data includes the third log data; wherein the third log data is log data that is present in the second log data and is not present in the first log data.
15. The apparatus of claim 14, wherein the obtaining module is further configured to obtain a second length of second log data stored by the file server from the file server.
16. A log data acquisition apparatus, comprising:
The sending module is used for sending the second length of the second log data stored by the file server to the client;
the receiving module is used for receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client;
The acquisition module is used for acquiring third log data from the second log data; the third log data is log data that exists in the second log data and does not exist in the first log data;
The sending module is further configured to send the third log data to the client.
17. The apparatus of claim 16,
the sending module is specifically configured to, when sending the second length of the second log data stored by the file server to the client: receiving a second request message which is sent by the client and used for requesting the log length; and sending the second length of the second log data to the client.
18. A terminal device, characterized in that the terminal device comprises: a processor and a machine-readable storage medium having stored thereon a plurality of computer instructions, the processor when executing the computer instructions performs: determining whether third log data are included in second log data according to a first length of the first log data stored by a client and a second length of the second log data stored by a file server; if yes, obtaining the third log data from the file server; the third log data is log data that is present in the second log data and is not present in the first log data.
19. a file server, characterized in that the file server comprises: a processor and a machine-readable storage medium having stored thereon a plurality of computer instructions, the processor when executing the computer instructions performs: sending a second length of second log data stored by the file server to the client; receiving a first request message which is sent by the client and used for requesting third log data; the first request message is sent when the client determines that the second log data comprises third log data according to the first length and the second length of the first log data stored by the client; acquiring third log data from the second log data; wherein the third log data is log data that is present in the second log data and that is not present in the first log data; and sending the third log data to the client.
CN201810523837.2A 2018-05-28 2018-05-28 Log data acquisition method, device and equipment Pending CN110545296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810523837.2A CN110545296A (en) 2018-05-28 2018-05-28 Log data acquisition method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810523837.2A CN110545296A (en) 2018-05-28 2018-05-28 Log data acquisition method, device and equipment

Publications (1)

Publication Number Publication Date
CN110545296A true CN110545296A (en) 2019-12-06

Family

ID=68700690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810523837.2A Pending CN110545296A (en) 2018-05-28 2018-05-28 Log data acquisition method, device and equipment

Country Status (1)

Country Link
CN (1) CN110545296A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858273A (en) * 2020-07-02 2020-10-30 五八有限公司 Display method and device for processing logs
CN113742172A (en) * 2021-08-18 2021-12-03 苏州浪潮智能科技有限公司 Server log acquisition method, system and related device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651707A (en) * 2009-09-22 2010-02-17 西安交通大学 Method for automatically acquiring user behavior log of network
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log
CN106101264A (en) * 2016-07-20 2016-11-09 腾讯科技(深圳)有限公司 Content distributing network daily record method for pushing, device and system
CN106294470A (en) * 2015-06-03 2017-01-04 北京京东尚科信息技术有限公司 The method that real-time incremental log information based on cutting daily record reads
CN106506709A (en) * 2017-01-04 2017-03-15 飞天诚信科技股份有限公司 A kind of remote journal acquisition methods and system
US20170110118A1 (en) * 2015-10-19 2017-04-20 Google Inc. Speech endpointing
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method
US20170235970A1 (en) * 2016-02-11 2017-08-17 Daniel CONNER Scalable data verification with immutable data storage
US20180082273A1 (en) * 2016-09-16 2018-03-22 Toshiba Tec Kabushiki Kaisha Information processing device and program
CN108052675A (en) * 2017-12-28 2018-05-18 惠州Tcl家电集团有限公司 Blog management method, system and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651707A (en) * 2009-09-22 2010-02-17 西安交通大学 Method for automatically acquiring user behavior log of network
CN106294470A (en) * 2015-06-03 2017-01-04 北京京东尚科信息技术有限公司 The method that real-time incremental log information based on cutting daily record reads
US20170110118A1 (en) * 2015-10-19 2017-04-20 Google Inc. Speech endpointing
US20170235970A1 (en) * 2016-02-11 2017-08-17 Daniel CONNER Scalable data verification with immutable data storage
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log
CN106101264A (en) * 2016-07-20 2016-11-09 腾讯科技(深圳)有限公司 Content distributing network daily record method for pushing, device and system
US20180082273A1 (en) * 2016-09-16 2018-03-22 Toshiba Tec Kabushiki Kaisha Information processing device and program
CN106506709A (en) * 2017-01-04 2017-03-15 飞天诚信科技股份有限公司 A kind of remote journal acquisition methods and system
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method
CN108052675A (en) * 2017-12-28 2018-05-18 惠州Tcl家电集团有限公司 Blog management method, system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彭骞,党引等: "基于大数据技术的服务器日志采集分析方法", 《电力大数据 专题研讨》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858273A (en) * 2020-07-02 2020-10-30 五八有限公司 Display method and device for processing logs
CN113742172A (en) * 2021-08-18 2021-12-03 苏州浪潮智能科技有限公司 Server log acquisition method, system and related device
CN113742172B (en) * 2021-08-18 2023-08-15 苏州浪潮智能科技有限公司 Method, system and related device for collecting server logs

Similar Documents

Publication Publication Date Title
CN105787077B (en) Data synchronization method and device
CN109995877B (en) Information pushing method and device
CN111163130B (en) Network service system and data transmission method thereof
CN108259533B (en) Data transmission method and device
CN110377440B (en) Information processing method and device
CN110022260B (en) Cross-environment receipt message processing method and system
CN110297944B (en) Distributed XML data processing method and system
CN110007936B (en) Data processing method and device
CN111880948A (en) Data refreshing method and device, electronic equipment and computer readable storage medium
CN111158637A (en) Block chain-based random number generation method, equipment and storage medium
CN110909521A (en) Synchronous processing method and device for online document information and electronic equipment
CN108875035B (en) Data storage method of distributed file system and related equipment
CN111338834B (en) Data storage method and device
CN110545296A (en) Log data acquisition method, device and equipment
EP3828705A1 (en) Method and apparatus for processing a service of an abnormal server
CN110442439B (en) Task process processing method and device and computer equipment
JP5961471B2 (en) Output comparison method in multiple information systems
CN111818179A (en) User request processing method and device, computing equipment and medium
CN109389306B (en) User order synchronization method and device
CN111161072A (en) Block chain-based random number generation method, equipment and storage medium
CN111090818B (en) Resource management method, resource management system, server and computer storage medium
EP3276914A1 (en) Data sharing method and device for virtual desktop
CN109218338B (en) Information processing system, method and device
CN112650710B (en) Data migration sending method and device, storage medium and electronic device
CN112231408B (en) Data integration method and device, electronic equipment 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191206