CN108400888B - Log processing method, storage medium and terminal equipment - Google Patents

Log processing method, storage medium and terminal equipment Download PDF

Info

Publication number
CN108400888B
CN108400888B CN201810084599.XA CN201810084599A CN108400888B CN 108400888 B CN108400888 B CN 108400888B CN 201810084599 A CN201810084599 A CN 201810084599A CN 108400888 B CN108400888 B CN 108400888B
Authority
CN
China
Prior art keywords
log
application program
transmission rate
target terminal
network transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810084599.XA
Other languages
Chinese (zh)
Other versions
CN108400888A (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201810084599.XA priority Critical patent/CN108400888B/en
Publication of CN108400888A publication Critical patent/CN108400888A/en
Application granted granted Critical
Publication of CN108400888B publication Critical patent/CN108400888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention belongs to the technical field of computers, and particularly relates to a log processing method, a storage medium and a terminal device. The method comprises the following steps: acquiring the current available network transmission rate of a target terminal; acquiring the current log generation rate of a specified application program in the target terminal; if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate; transmitting the first log to a preset log processing server according to the available network transmission rate; and storing the second log into a designated storage space of the target terminal. Even when the transmission resource can not meet the transmission requirement of the log, the log can be stored in time, and the completeness of the log is ensured.

Description

Log processing method, storage medium and terminal equipment
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a log processing method, a storage medium and a terminal device.
Background
With the continuous development of the mobile internet technology, various application programs (APPs) are installed on mobile terminals such as mobile phones or tablet computers for use, but in the use process of the APPs, the operation is often abnormal due to some design defects, and in order to quickly locate the problem, the logs of the APPs generally need to be collected and analyzed.
The LOG, also called LOG, is a recording mechanism, which allows developers to insert some special output codes into the program code, and output the current running state of the program at any time, so as to record information under unattended condition, and analyze the processing procedure of the program afterwards.
The logs are generally transmitted from the mobile terminal of the user to the background server in real time so that the background server can analyze and process the logs, but the transmission resources available to the mobile terminal are limited and are in continuous fluctuation, and in some cases, during the process of sending the logs to the background server by the application program, the transmission resources available to the mobile terminal cannot meet the transmission requirements of the logs, so that part of the logs are lost.
Disclosure of Invention
In view of this, embodiments of the present invention provide a log processing method, a storage medium, and a terminal device, so as to solve the problem that a log is lost when a transmission resource available to a mobile terminal cannot meet a transmission requirement of the log.
A first aspect of an embodiment of the present invention provides a log processing method, which may include:
acquiring the current available network transmission rate of a target terminal;
acquiring the current log generation rate of a specified application program in the target terminal;
if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate;
transmitting the first log to a preset log processing server according to the available network transmission rate;
and storing the second log into a designated storage space of the target terminal.
A second aspect of embodiments of the present invention provides a computer-readable storage medium storing computer-readable instructions, which when executed by a processor implement the steps of:
acquiring the current available network transmission rate of a target terminal;
acquiring the current log generation rate of a specified application program in the target terminal;
if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate;
transmitting the first log to a preset log processing server according to the available network transmission rate;
and storing the second log into a designated storage space of the target terminal.
A third aspect of the embodiments of the present invention provides a log processing terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer readable instructions to implement the following steps:
acquiring the current available network transmission rate of a target terminal;
acquiring the current log generation rate of a specified application program in the target terminal;
if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate;
transmitting the first log to a preset log processing server according to the available network transmission rate;
and storing the second log into a designated storage space of the target terminal.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the embodiment of the invention firstly obtains the current available network transmission rate of a target terminal and the current log generation rate of a specified application program in the target terminal, if the log generation rate is greater than the available network transmission rate, then if the logs are all transmitted to a preset log processing server, the loss of partial logs can be caused, therefore, the embodiment of the invention divides the current log to be transmitted of the specified application program into a first log and a second log, then transmits the first log to the log processing server according to the available network transmission rate, stores the second log to a specified storage space of the target terminal, and as the ratio of the data volume of the first log to the total data volume of the logs to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate, therefore, the first log is transmitted to the log processing server according to the available network transmission rate, so that the first log can be ensured to be transmitted in time, the second log is stored in the designated storage space of the target terminal, and the logs which are lost originally can be stored in time, so that the completeness of the logs is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of an embodiment of a log processing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of step S101 of a log processing method in an application scenario according to an embodiment of the present invention;
FIG. 3 is a block diagram of an embodiment of a log processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a log processing terminal device in an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, 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 invention.
Referring to fig. 1, an embodiment of a log processing method according to an embodiment of the present invention may include:
and step S101, acquiring the current available network transmission rate of the target terminal.
The target terminal can comprise terminal equipment such as a mobile phone, a tablet computer, an intelligent watch, an intelligent bracelet and intelligent glasses.
As shown in fig. 2, step S101 may specifically include:
and step S1011, determining the current access network of the target terminal.
Taking the android system as an example, what kind of network the target terminal currently accesses can be known through the following functions provided by the system:
ConnectivityManagerconnectivityManager=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfonetworkInfo=connectivityManager.getActiveNetworkInfo()。
the returned result is a WIFI network or a cellular mobile network (2G/3G/4G) provided by an operator.
Step S1012, acquiring the current network parameters of the access network.
The network parameters may include Signal strength and Signal-to-Noise Ratio (SINR), and the Signal strength may be measured by Reference Signal Received Power (RSRP), and the Signal-to-Interference plus Noise Ratio (SINR), for example, 4G.
Step S1013, calculating the current maximum transmission rate of the target terminal according to the network parameters and preset parameters of the target terminal.
Still taking the 4G network as an example, the parameters of the target terminal may include a terminal level thereof, and different terminal levels correspond to different uplink limited rates, for example, if the terminal level of the target terminal is CAT1, the uplink limited rate is 5Mbps, if the terminal level of the target terminal is CAT2, the uplink limited rate is 25Mbps, if the terminal level of the target terminal is CAT3, CAT4, or CAT6, the uplink limited rate is 50Mbps, and if the terminal level of the target terminal is CAT5, the uplink limited rate is 75Mbps, and so on.
However, in practice, the target terminal cannot reach its uplink limit rate, its actual maximum transmission rate is affected by both RSRP and SINR, and the maximum transmission rate is positively correlated with RSRP and negatively correlated with SINR.
And step S1014, determining the preferred application program with the priority higher than the designated application program in the target terminal according to the preset application program priority.
The preset process of the application program priority can comprise the following steps: acquiring a historical operation record of the target terminal in a preset statistical time period; counting the use times of each application program from the historical operation records; and determining the priority of each application program according to the counted use times of each application program, wherein the priority is positively correlated with the use times of the application programs.
For example, the target terminal has 4 applications in total, and the number of times of using the application 1 is counted as 35 times, the number of times of using the application 2 is counted as 127 times, the number of times of using the application 3 is counted as 3 times, and the number of times of using the application 4 is counted as 332 times according to the historical operation records, and then the priorities of the applications can be determined to be sequentially ranked from high to low: application 4, application 2, application 1, and application 3.
And step S1015, acquiring the network transmission rate occupied by the preferred application program.
It should be noted that the network transmission rate mentioned in this embodiment refers to an uplink network transmission rate, i.e., an upload rate from the terminal to the server.
Step S1016, calculating the current available network transmission rate of the target terminal according to the maximum transmission rate and the network transmission rate occupied by the preferred application program.
Specifically, the network transmission rate occupied by each of the preferred applications may be sequentially subtracted from the maximum transmission rate, and a final obtained value is the current available network transmission rate of the target terminal.
And step S102, acquiring the current log generation rate of the specified application program in the target terminal.
In this embodiment, in order to relieve the pressure of log transmission and reduce the log transmission amount, compression processing may be performed on the log in the log generation process, and in consideration of the compression processing, step S102 may specifically include: acquiring an original log generated by the specified application program within a preset statistical time length; performing data compression processing on the original log to obtain a compressed log; calculating the data volume of the compressed log; and calculating the log generation rate according to the data volume of the compressed log and the statistical duration.
Since the log records a large amount of time, a large amount of redundant information in the log is mainly generated by recording time data, and compression processing can be mainly performed on the time data in the embodiment. Specifically, the complete time information is recorded once at preset time intervals as reference time, and the time of other logs only records the offset from the last reference time.
For example, the time of the first log is 17: 00: 00: 000, set it as the reference time, with a preset time interval of 10 seconds, the time of the second log is 17: 00: 00: 001, the offset from the reference time is 1 millisecond, the time information in the log is only recorded as 1, and so on, until the time of the 10000 th log is 17: 00: 10: 001, whose offset from the reference time is already greater than the preset actual interval, records its complete time information in the log and takes it as the new reference time.
In this embodiment, the data size of the complete time information can be used as STimeIndicating that the data size of the simplified time information is STimeShowing that the data volume of each log body is SLogRepresenting, the number of the logs in the preset time interval is represented by N, and the data volume of the original log is represented by SCompleteIndicating that the data volume of the compressed log is SCompressThen the data amount of the compressed log can be calculated according to the following formula:
Figure BDA0001562025060000071
step S103, judging whether the log generation rate is greater than the available network transmission rate.
If the log generation rate is greater than the available network transmission rate, step S104, step S105, and step S106 are performed, and if the log generation rate is less than or equal to the available network transmission rate, step S107 is performed.
And step S104, dividing the current log to be transmitted of the specified application program into a first log and a second log.
The ratio of the data volume of the first log to the total data volume of the logs to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate, so that the first log is transmitted to the log processing server according to the available network transmission rate, and the first log can be guaranteed to be transmitted in time.
And step S105, transmitting the first log to a preset log processing server according to the available network transmission rate.
And step S106, storing the second log into a designated storage space of the target terminal.
The storage rate of the second log may be a difference between the log generation rate and the available network transmission rate, so that the logs which would otherwise be lost can be stored in time for subsequent continuous transmission, thereby ensuring the integrity of the logs.
And step S107, transmitting the log to the log processing server according to the log generation rate.
The available network transmission rate at this time is enough to transmit the log in real time, so that the log does not need to be cached in the designated storage space and can be directly transmitted to the log processing server.
Further, if the log is stored in the designated storage space, the log stored in the designated storage space is transmitted to the log processing server, and the transmission rate may be a difference between the available network transmission rate and the log generation rate. Namely, when the transmission resource is sufficient, the buffered log when the transmission resource is insufficient is transmitted again. Due to the existence of the designated storage space, the transmission of the log is effectively regulated, and the integrity of the log is always kept.
To sum up, in the embodiments of the present invention, first, a current available network transmission rate of a target terminal and a current log generation rate of a designated application program in the target terminal are obtained, and if the log generation rate is greater than the available network transmission rate, if logs are all transmitted to a preset log processing server at this time, a loss of a part of the logs is caused, so that in the embodiments of the present invention, the current transmission log of the designated application program is divided into a first log and a second log, then the first log is transmitted to the log processing server according to the available network transmission rate, the second log is stored in a designated storage space of the target terminal, and since a ratio of a data amount of the first log to a total data amount of the logs to be transmitted is equal to a ratio of the available network transmission rate to the log generation rate, therefore, the first log is transmitted to the log processing server according to the available network transmission rate, so that the first log can be ensured to be transmitted in time, the second log is stored in the designated storage space of the target terminal, and the logs which are lost originally can be stored in time, so that the completeness of the logs is ensured.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 shows a structure diagram of an embodiment of a log processing apparatus according to an embodiment of the present invention, which corresponds to the log processing method described in the foregoing embodiment.
In this embodiment, a log processing apparatus may include:
an available network transmission rate obtaining module 301, configured to obtain a current available network transmission rate of a target terminal;
a log generation rate obtaining module 302, configured to obtain a current log generation rate of a specified application program in the target terminal;
a log dividing module 303, configured to divide a current log to be transmitted of the specified application into a first log and a second log if the log generation rate is greater than the available network transmission rate, where a ratio of a data amount of the first log to a total data amount of the log to be transmitted is equal to a ratio of the available network transmission rate to the log generation rate;
a log transmission module 304, configured to transmit the first log to a preset log processing server according to the available network transmission rate;
a log storage module 305, configured to store the second log in a specified storage space of the target terminal.
Further, the log processing apparatus may further include:
a first transmission module, configured to transmit the log to the log processing server according to the log generation rate if the log generation rate is less than the available network transmission rate;
and the second transmission module is used for transmitting the log stored in the designated storage space to the log processing server if the log is stored in the designated storage space.
Further, the available network transmission rate obtaining module may include:
an access network determining unit, configured to determine a current access network of the target terminal;
a network parameter acquiring unit, configured to acquire a current network parameter of the access network;
a maximum transmission rate calculation unit, configured to calculate a current maximum transmission rate of the target terminal according to the network parameter and a preset parameter of the target terminal;
a preferred application program determining unit, configured to determine, according to a preset application program priority, a preferred application program having a priority higher than the designated application program in the target terminal;
a network transmission rate obtaining unit, configured to obtain a network transmission rate occupied by the preferred application;
and the available network transmission rate calculating unit is used for calculating the current available network transmission rate of the target terminal according to the maximum transmission rate and the network transmission rate occupied by the preferred application program.
Further, the log processing apparatus may further include:
the historical operation record acquisition module is used for acquiring the historical operation record of the target terminal in a preset statistical time period;
the using frequency counting module is used for counting the using frequency of each application program from the historical operation records;
and the priority determining module is used for determining the priority of each application program according to the counted use times of each application program, and the priority is positively correlated with the use times of the application programs.
Further, the log generation rate obtaining module may include:
the original log acquiring unit is used for acquiring an original log generated by the specified application program within a preset statistical time length;
the compression processing unit is used for carrying out data compression processing on the original log to obtain a compressed log;
a data amount calculation unit for calculating a data amount of the compression log;
and the log generation rate calculation unit is used for calculating the log generation rate according to the data volume of the compressed log and the statistical duration.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Fig. 4 shows a schematic block diagram of a log processing terminal device according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown.
In this embodiment, the log processing terminal device 4 may be a computing device such as a mobile phone, a tablet computer, an intelligent watch, an intelligent bracelet, and intelligent glasses. The log processing terminal device 4 may include: a processor 40, a memory 41, and computer readable instructions 42 stored in the memory 41 and executable on the processor 40, such as computer readable instructions to perform the log processing method described above. The processor 40, when executing the computer readable instructions 42, implements the steps in the various log processing method embodiments described above, such as the steps S101-S107 shown in fig. 1. Alternatively, the processor 40, when executing the computer readable instructions 42, implements the functions of the modules/units in the above device embodiments, such as the functions of the modules 301 to 305 shown in fig. 3.
Illustratively, the computer readable instructions 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions, which are used for describing the execution process of the computer readable instructions 42 in the log processing terminal device 4.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the log processing terminal device 4, such as a hard disk or a memory of the log processing terminal device 4. The memory 41 may also be an external storage device of the log processing terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are equipped on the log processing terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the log processing terminal device 4. The memory 41 is used for storing the computer readable instructions and other instructions and data required by the log processing terminal device 4. The memory 41 may also be used to temporarily store data that has been output or is to be output.
Each functional unit in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of computer readable instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, which can store computer readable instructions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A log processing method, comprising:
acquiring the current available network transmission rate of a target terminal;
acquiring the current log generation rate of a specified application program in the target terminal;
if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate;
transmitting the first log to a preset log processing server according to the available network transmission rate;
storing the second log into a designated storage space of the target terminal;
the acquiring the current log generation rate of the specified application program in the target terminal comprises:
acquiring an original log generated by the specified application program within a preset statistical time length;
performing data compression processing on the original log, recording complete time information once at preset time intervals as reference time, and recording the offset of the time information of other logs with the last reference time to obtain a compressed log;
calculating the data amount of the compressed log according to the following formula:
Figure FDA0003058219000000011
wherein S isTimeIs the data quantity, S ', of the time information before compression'TimeIs the data volume of the compressed time information, SLogThe data volume of each log text is calculated, N is the number of logs in the preset time interval, SCompleteFor the data volume of the original log, SCompressThe data volume of the compressed log;
and calculating the log generation rate according to the data volume of the compressed log and the statistical duration.
2. The log processing method according to claim 1, further comprising:
if the log generation rate is less than the available network transmission rate, transmitting the log to the log processing server according to the log generation rate;
and if the log is stored in the designated storage space, transmitting the log stored in the designated storage space to the log processing server.
3. The log processing method according to claim 1, wherein the obtaining of the current available network transmission rate of the target terminal comprises:
determining the current access network of the target terminal;
acquiring the current network parameters of the access network;
calculating the current maximum transmission rate of the target terminal according to the network parameters and preset parameters of the target terminal;
determining a preferred application program with a priority higher than the designated application program in the target terminal according to a preset application program priority;
acquiring the network transmission rate occupied by the preferred application program;
and calculating the current available network transmission rate of the target terminal according to the maximum transmission rate and the network transmission rate occupied by the preferred application program.
4. The log processing method according to claim 3, wherein the presetting of the application priority includes:
acquiring a historical operation record of the target terminal in a preset statistical time period;
counting the use times of each application program from the historical operation records;
and determining the priority of each application program according to the counted use times of each application program, wherein the priority is positively correlated with the use times of the application programs.
5. A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the steps of the log processing method according to any one of claims 1 to 4.
6. A log processing terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions performs the steps of:
acquiring the current available network transmission rate of a target terminal;
acquiring the current log generation rate of a specified application program in the target terminal;
if the log generation rate is greater than the available network transmission rate, dividing the current log to be transmitted of the specified application program into a first log and a second log, wherein the ratio of the data volume of the first log to the total data volume of the log to be transmitted is equal to the ratio of the available network transmission rate to the log generation rate;
transmitting the first log to a preset log processing server according to the available network transmission rate;
storing the second log into a designated storage space of the target terminal;
the acquiring the current log generation rate of the specified application program in the target terminal comprises:
acquiring an original log generated by the specified application program within a preset statistical time length;
performing data compression processing on the original log, recording complete time information once at preset time intervals as reference time, and recording the offset of the time information of other logs with the last reference time to obtain a compressed log;
calculating the data amount of the compressed log according to the following formula:
Figure FDA0003058219000000031
wherein S isTimeIs the data quantity, S ', of the time information before compression'TimeIs the data volume of the compressed time information, SLogThe data volume of each log text is calculated, N is the number of logs in the preset time interval, SCompleteFor the data volume of the original log, SCompressThe data volume of the compressed log;
and calculating the log generation rate according to the data volume of the compressed log and the statistical duration.
7. The log processing terminal device according to claim 6, further comprising:
if the log generation rate is less than the available network transmission rate, transmitting the log to the log processing server according to the log generation rate;
and if the log is stored in the designated storage space, transmitting the log stored in the designated storage space to the log processing server.
8. The log processing terminal device of claim 6, wherein the obtaining of the current available network transmission rate of the target terminal comprises:
determining the current access network of the target terminal;
acquiring the current network parameters of the access network;
calculating the current maximum transmission rate of the target terminal according to the network parameters and preset parameters of the target terminal;
determining a preferred application program with a priority higher than the designated application program in the target terminal according to a preset application program priority;
acquiring the network transmission rate occupied by the preferred application program;
and calculating the current available network transmission rate of the target terminal according to the maximum transmission rate and the network transmission rate occupied by the preferred application program.
9. The log processing terminal device according to any one of claims 6 to 8, wherein the preset process of the application priority includes:
acquiring a historical operation record of the target terminal in a preset statistical time period;
counting the use times of each application program from the historical operation records;
and determining the priority of each application program according to the counted use times of each application program, wherein the priority is positively correlated with the use times of the application programs.
CN201810084599.XA 2018-01-29 2018-01-29 Log processing method, storage medium and terminal equipment Active CN108400888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810084599.XA CN108400888B (en) 2018-01-29 2018-01-29 Log processing method, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810084599.XA CN108400888B (en) 2018-01-29 2018-01-29 Log processing method, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN108400888A CN108400888A (en) 2018-08-14
CN108400888B true CN108400888B (en) 2021-07-23

Family

ID=63095133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810084599.XA Active CN108400888B (en) 2018-01-29 2018-01-29 Log processing method, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN108400888B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857713A (en) * 2018-12-24 2019-06-07 中国电力科学研究院有限公司 A kind of distributed information log acquisition processing system and method towards power business terminal
CN110266514A (en) * 2019-05-15 2019-09-20 平安科技(深圳)有限公司 Journal obtaining method, device, terminal and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8656005B2 (en) * 2003-09-29 2014-02-18 Siemens Enterprise Communications Gmbh & Co. Kg Method for providing performance characteristics on demand
JP2014059661A (en) * 2012-09-14 2014-04-03 Canon Inc Information processing device, method of controlling the same, and program
CN104468222A (en) * 2014-12-15 2015-03-25 北京奇虎科技有限公司 Method, device and system for reporting log information
CN105208607B (en) * 2015-08-25 2019-03-12 Oppo广东移动通信有限公司 Dispatching method, device and the mobile terminal of terminal network data transmission
CN107135088B (en) * 2016-02-29 2020-09-11 华为技术有限公司 Method and device for processing logs in cloud computing system
CN106354774B (en) * 2016-08-22 2019-07-23 东北大学 A kind of industrial process in real-time big data compression storage system and method

Also Published As

Publication number Publication date
CN108400888A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN107239339B (en) System performance optimization parameter determination method, system performance optimization method and device
US11991091B2 (en) Network resource pre-allocation method, device, and system, and medium
CN108400888B (en) Log processing method, storage medium and terminal equipment
US20170351546A1 (en) Resource predictors indicative of predicted resource usage
CN109902103A (en) Service data management method, device, equipment and computer readable storage medium
CN111263153A (en) Video encoding method, device, equipment and storage medium
CN108769684A (en) Image processing method based on WebP image compression algorithms and device
CN109246731B (en) Optimization method and device for PRB interference index, computer storage medium and equipment
CN107734360B (en) Control method and device of streaming media server
CN110751045A (en) Fault recording method, system and terminal equipment
CN112672405B (en) Power consumption calculation method, device, storage medium, electronic equipment and server
CN109213965A (en) A kind of power system capacity prediction technique, computer readable storage medium and terminal device
CN108418730B (en) Network flow testing method, device, equipment and computer readable storage medium
CN107846586B (en) Monitoring method, device and the server-side of video flow quality
CN111314124B (en) Network problem analysis method, device, equipment and storage medium for high-speed rail network
US20150278031A1 (en) Adaptive file backup system
CN112394882B (en) Data storage method and device, storage medium and electronic device
CN111510715B (en) Video processing method, system, computer device and storage medium
CN111641959A (en) Method and device for detecting network environment information
CN102956208A (en) Method, device and system for counting image frame rates of terminal
KR102255252B1 (en) Method and server for deciding summary value from big raw data
US20240320040A1 (en) Audio multithreaded profiling
CN112953690B (en) Carrier aggregation control method, device, storage medium and base station
CN113676273B (en) Method, terminal and base station for acquiring signal-to-noise ratio of reference signal
CN115022206B (en) Network stability determination method and device, computer equipment and readable storage medium

Legal Events

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