CN106161074A - A kind of cloud terminal log processing method, Apparatus and system - Google Patents

A kind of cloud terminal log processing method, Apparatus and system Download PDF

Info

Publication number
CN106161074A
CN106161074A CN201510189031.0A CN201510189031A CN106161074A CN 106161074 A CN106161074 A CN 106161074A CN 201510189031 A CN201510189031 A CN 201510189031A CN 106161074 A CN106161074 A CN 106161074A
Authority
CN
China
Prior art keywords
log
daily record
cloud terminal
module
configuration parameter
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
CN201510189031.0A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510189031.0A priority Critical patent/CN106161074A/en
Priority to PCT/CN2015/085461 priority patent/WO2016169145A1/en
Publication of CN106161074A publication Critical patent/CN106161074A/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

Abstract

The invention provides a kind of cloud terminal log processing method, Apparatus and system.Described cloud terminal log processing method, is applied to server end, including: receive the log information of the client upload being connected with the module in cloud terminal;Obtain daily record set in advance and preserve configuration parameter;Preserve configuration parameter according to described daily record, described log information is stored to embedded database.Such scheme, stores in embedded database by the daily record in cloud terminal is preserved configuration parameter according to daily record, facilitates the management to cloud terminal upper module daily record, save resource overhead, facilitate the transplanting of cloud terminal log processing system simultaneously.

Description

A kind of cloud terminal log processing method, Apparatus and system
Technical field
The present invention relates to cloud terminal journaling technique field, particularly to a kind of cloud terminal log processing method, Apparatus and system.
Background technology
Log system is to assist cloud terminal development and the requisite instrument of accident analysis debugging and means.? In current cloud terminal system, operating system includes the various operation such as andriod, linux, windows and is System, from exploitation angle, log system needs to be prone to transplant;Owing to cloud terminal typically configures relatively low, day aspiration System must tie up disk, internal memory, cpu resource;Owing to cloud termination function module is complicated, daily record must facilitate Location and problem analysis.
Existing log system tends not to respect to all of aspect, there is portable poor, resource and accounts for By one or several problems such as height or analysis efficiency are low.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of cloud terminal log processing method, Apparatus and system, Portable poor, resource occupation height or analysis efficiency is there is in order to solve existing cloud terminal log system The problem such as low.
In order to solve above-mentioned technical problem, the embodiment of the present invention provides a kind of cloud terminal log processing method, should For server end, including:
Receive the log information of the client upload being connected with the module in cloud terminal;
Obtain daily record set in advance and preserve configuration parameter;
Preserve configuration parameter according to described daily record, described log information is stored to embedded database.
Further, described acquisition daily record set in advance preserve configuration parameter step particularly as follows:
The daily record obtained in the shared drive shared with described client preserves configuration parameter, and described daily record preserves Configuration parameter is mapped in described shared drive by configuration file.
Further, described according to described daily record preservation configuration parameter, described log information is stored to embedding Step in formula data base includes:
Described log information is stored in buffer queue;
When meeting pre-conditioned, preserve configuration parameter according to described daily record, by the day in described buffer queue Will information stores to embedded database.
Further, when meeting pre-conditioned, preserve configuration parameter according to described daily record, by described caching Log information in queue store the step to embedded database particularly as follows:
When in described buffer queue, the bar number of the log information of caching reaches preset value or buffering time periods arrives, And embedded database is when being in the state not being filled with, preserve the day preset in configuration parameter according to described daily record Will writing rate, stores the log information in described buffer queue to embedded database.
Further, described cloud terminal log processing method, also include:
Obtaining exterior arrangement order, described exterior arrangement order comprises the configuration letter that daily record preserves configuration parameter Breath;
The described configuration information comprised in described exterior arrangement order is stored in configuration file;
Described configuration file is mapped in the shared drive shared with described client.
Further, described cloud terminal log processing method, also include:
Obtaining external operating commands, described external operating commands includes the daily record in described embedded database The order that information is read out and/or deletes;
Obtain the daily record in configuration file and preserve configuration parameter, and preserve configuration parameter to institute according to described daily record State the log information in embedded database to be read out and/or deletion action.
The embodiment of the present invention provides a kind of cloud terminal log processing device, is applied to server end, including:
Receiver module, for receiving the log information of the client upload being connected with the module in cloud terminal;
Parameter acquisition module, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module, for preserving configuration parameter according to described daily record, stores described log information to embedding In formula data base.
Further, described memory module includes:
Buffer unit, for being stored in buffer queue by described log information;
Memory element, for when meeting pre-conditioned, preserves configuration parameter according to described daily record, by described Log information in buffer queue stores to embedded database.
Further, described cloud terminal log processing device, also include:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file in the shared drive shared with described client.
Further, described cloud terminal log processing device, also include:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
The embodiment of the present invention provides a kind of cloud terminal log processing method, is applied to client, including:
Set up the annexation with cloud terminal upper module;
Obtain the log content of described module;
Configuration parameter is preserved, it would be desirable to the described log content of preservation generates correspondence according to daily record set in advance Log information;
Described log information is uploaded to server end so that described log information is stored by described server end To embedded database.
Further, the annexation of described foundation and cloud terminal upper module step particularly as follows:
By calling daily record client process interface, set up the annexation with described cloud terminal upper module.
Further, described according to daily record set in advance preservation configuration parameter, it would be desirable to the described day of preservation Will content generates the step of corresponding log information and includes:
The daily record obtained in the shared drive shared with described server end preserves configuration parameter;
The module level information in configuration parameter is preserved, it would be desirable in the described daily record of preservation according to described daily record Hold and generate corresponding log information.
Further, described according to the module level information in described daily record preservation configuration parameter, it would be desirable to protect The described log content deposited generates the step of corresponding log information and includes:
If described module level information shows that the log content that described module generates needs to preserve, then by default length The described log content of degree generates the log information of reference format.
Further, the log information of described reference format comprises: daily record rank, daily record generate the time, Module name that described log information is corresponding and the described log content of generation.
The embodiment of the present invention provides a kind of cloud terminal log processing device, is applied to client, including:
Link block, for setting up the annexation with cloud terminal upper module;
Log acquisition module, for obtaining the log content of described module;
Generation module, for preserving configuration parameter according to daily record set in advance, it would be desirable to the described day of preservation Will content generates corresponding log information;
Upper transmission module, for being uploaded to server end by described log information so that described server end is by institute State log information to store to embedded database.
Further, described generation module includes:
First acquiring unit, joins for obtaining the daily record preservation in the shared drive shared with described server end Put parameter;
Signal generating unit, for preserving the module level information in configuration parameter, it would be desirable to protect according to described daily record The described log content deposited generates corresponding log information.
The embodiment of the present invention provides a kind of cloud terminal log processing system, including:
Cloud terminal the first log processing device and cloud terminal the second log processing device;Wherein,
Described cloud terminal the first log processing device includes:
Link block, for setting up the annexation with cloud terminal upper module;
Log acquisition module, for obtaining the log content of described module;
Generation module, for preserving configuration parameter according to daily record set in advance, it would be desirable to the described day of preservation Will content generates corresponding log information;
Upper transmission module, for described log information is uploaded to described cloud terminal the second log processing device, makes Obtain described cloud terminal the second log processing device to be stored to embedded database by described log information;
Described cloud terminal the second log processing device includes:
Receiver module, for receiving described cloud terminal the first log processing being connected with the module in cloud terminal The log information that device is uploaded;
Parameter acquisition module, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module, for preserving configuration parameter according to described daily record, stores described log information to embedding In formula data base.
Further, described cloud terminal the second log processing device also includes:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file with described cloud terminal the first log processing device altogether Shared drive in.
Further, described cloud terminal the second log processing device also includes:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
The invention has the beneficial effects as follows:
Such scheme, stores embedding by the daily record in cloud terminal is preserved configuration parameter according to the daily record preset Enter in formula data base, facilitate the management to cloud terminal upper module daily record, save resource overhead, while side The transplanting of cloud terminal log processing system.
Accompanying drawing explanation
Fig. 1 represents the total of the described cloud terminal log processing method being applied to server end of the embodiment of the present invention Body flow chart;
Fig. 2 represents the mould of the described cloud terminal log processing device being applied to server end of the embodiment of the present invention Block schematic diagram;
Fig. 3 represents the overall of the described cloud terminal log processing method being applied to client of the embodiment of the present invention Flow chart;
Fig. 4 represents the module of the described cloud terminal log processing device being applied to client of the embodiment of the present invention Schematic diagram;
Fig. 5 represents the static map of the described cloud terminal log processing system of the embodiment of the present invention;
Fig. 6 represents the main flowchart of the described daily record client of the embodiment of the present invention;
Fig. 7 represents the main flowchart of the described log server end of the embodiment of the present invention;
Fig. 8 represents the main handling process of the described configurator of the embodiment of the present invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing and specifically real Execute example to describe the present invention.
The present invention is directed to existing cloud terminal log system there is portable poor, resource occupation height or divide Analyse inefficient problem, it is provided that a kind of cloud terminal log processing method, Apparatus and system.
As it is shown in figure 1, the embodiment of the present invention provides a kind of cloud terminal log processing method, it is applied to server End, including:
Step 11, receives the log information of the client upload being connected with the module in cloud terminal;
Step 12, obtains daily record set in advance and preserves configuration parameter;
Step 13, preserves configuration parameter according to described daily record, stores described log information to embedded data In storehouse.
Such scheme, by being saved in embedded by the log information that the module in cloud terminal operationally generates In data base, facilitate the management to module daily record, when cloud terminal goes wrong, can be according to embedded number According to the log information in storehouse, quick positioning question, problem analysis and solution problem.
Here it should be noted that, the natural feature with according to keywords query analysis of factor data bank, can meet Complicated analysis needs, and simple to operate, uses embedded database to carry out log information in the present invention, Facilitate the lookup to log information and location;The present invention is preferably used SQLite3 data base (SQLite, Being a light-duty data base, be the Relational DBMS in accordance with ACID, described ACID is i.e. Atomicity: atomicity, Consistency: concordance, Isolation: isolation, Durability: persistently Property), SQLite3 data base be a kind of completely free, open, support multi-platform embedded database, There is not copyright and legal risk;Native system portability is fairly good, for the transplanting of each platform, it is only necessary to Change SQLite3 library file;System resource takies low, and analysis efficiency is high, can improve research and development and the effect safeguarded Rate, like this so that product has the advantage of uniqueness relative to the other products in current industry.
The described step 12 of the embodiment of the present invention particularly as follows:
The daily record obtained in the shared drive shared with described client preserves configuration parameter, and described daily record preserves Configuration parameter is mapped in described shared drive by configuration file.
It is stored in configuration file it should be noted that, described daily record preserves configuration parameter, by by civilian for configuration Information MAP in part, in shared drive, directly carries out the reading of data in internal memory, improves data Reading rate.
The described step 13 of the embodiment of the present invention includes:
Step 131, is stored in buffer queue by described log information;
Step 132, when meeting pre-conditioned, preserves configuration parameter according to described daily record, by described caching team Log information in row stores to embedded database.
It should be noted that, in the present invention, the log information of described received server-side is the pre-Mr. of client The log information of the preset format become, described log information can be directly stored in embedded database, this The log information of the described preset format of inventive embodiments, including: daily record rank, daily record generate time, institute State the described log content of module name corresponding to log information and generation;Such as, described log information form For: debug 2012-11-29 19:40:40.792362proc1:this is test log.
It should be noted that, preservation grade (the i.e. guarantor of the daily record that module is corresponding that described daily record rank is daily record Deposit grade, it is also possible to be considered the rank of module), in the present invention, described daily record rank can be defined as following Four grades:
Nothing is expressed as not preserving any information;Debug is expressed as Debugging message;Info is expressed as typically Information;Error is expressed as error log.
The basic format of the configuration file defined in the present invention includes:
The preservation grade of daily record and the database performance parameter of daily record are arranged, such as the speed of daily record write into Databasce Rate, the capacity etc. of data base.
Specifically, a kind of implementation of the described step 132 provided in the present invention is:
When in described buffer queue, the bar number of the log information of caching reaches preset value or buffering time periods arrives, And embedded database is when being in the state not being filled with, preserve the day preset in configuration parameter according to described daily record Will writing rate (i.e. the speed of daily record write into Databasce), the log information in described buffer queue is stored to In embedded database.
Above-mentioned implementation is illustrated below:
Server end, when receiving a plurality of log information, is first according to the reception order of log information, by day Will information temporary storage is in buffer queue, and buffer queue limit carries out storing limit and adds up the bar number of log information, When storing, can by when the log information in described buffer queue bar number more than or equal to preset Daily record writing rate as carrying out the foundation that stores, here it should be noted that, described daily record writing rate with The bar number of log information is that unit stores, and illustrates and is: the speed of the daily record write into Databasce preset Be 200 per second, when the daily record bar number detected in buffer queue reaches 200, just by buffer queue In log information store in embedded database;Or when storing, can be by buffer queue Time cycle as carrying out the foundation that stores, when the time cycle of described buffer queue arrives, just need Log information in buffer queue is stored in embedded database, such as: preset buffer queue time Between the cycle be 100 milliseconds, 100 milliseconds time cycles arrive time, i.e. showing need to be by buffer queue Log information is stored in embedded database;When writing, the write into Databasce of described log information Speed is not to be exceeded the daily record writing rate preset, it is assumed that default daily record writing rate be 200 per second, When needs, to carry out log write fashionable, and the log information bar number in described buffer queue is 210, described daily record Writing rate be 200 per second;And fashionable when need to carry out log write, daily record in described buffer queue Information bar number is 180, the writing rate of described daily record be 180 per second;There is also the need to explanation, When carrying out log information write, first have to judge whether data base is not filled with, if the memory capacity of data base Reach preset capacity value, do not carried out the write of log information, directly log information is abandoned.
It should be noted that, the present invention also achieves the amendment to configuration file and configuration, therefore, this In bright embodiment, described cloud terminal log processing method, also include:
Obtaining exterior arrangement order, described exterior arrangement order comprises the configuration letter that daily record preserves configuration parameter Breath;
The described configuration information comprised in described exterior arrangement order is stored in configuration file;
Described configuration file is mapped in the shared drive shared with described client.
It should be noted that, described exterior arrangement order mainly comprises the configuration order to logging level, logarithm According to the configuration order of storage capacity and the configuration order to daily record writing rate.
When carrying out the use of configuration file, directly the information in configuration file can be written to shared drive, Wait calling of other programs, it is also possible to during information in using described configuration file, by configuration file In information be written to shared drive.
The present invention additionally provides the method for log information operation, the most described cloud terminal log processing in data base Method, also includes:
Obtaining external operating commands, described external operating commands includes the daily record in described embedded database The order that information is read out and/or deletes;
Obtain the daily record in configuration file and preserve configuration parameter, and preserve configuration parameter to institute according to described daily record State the log information in embedded database to be read out and/or deletion action.
It should be noted that the present invention provides reading and the deletion action of log information in data base, when When needing to read log information, it is necessary first to set the reading rule of log information to be read, as by rank Read, by module reading etc., then described rule is carried out with the daily record preservation configuration parameter in configuration file Comparison: as described in read rule be by daily record keyword reading, and described daily record preservation configuration parameter in not Record the keyword message of described daily record, then cannot realize the reading to log information.
Such scheme of the present invention, by the log information that client obtains is stored in embedded database, convenient Management to log information, and use the embedded database that transplantability is good so that such scheme, tool There is good versatility.
Corresponding to above-mentioned cloud terminal log processing method, as in figure 2 it is shown, the embodiment of the present invention provides a kind of cloud Terminal log processing device, is applied to server end, including:
Receiver module 110, for receiving the log information of the client upload being connected with the module in cloud terminal;
Parameter acquisition module 120, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module 130, for preserving configuration parameter according to described daily record, stores described log information to embedding Enter in formula data base.
Concrete, described parameter acquisition module 120 predominantly obtains the shared drive shared with described client In daily record preserve configuration parameter, described daily record preserve configuration parameter by configuration file be mapped to described share in In depositing.
Alternatively, described memory module 130 includes:
Buffer unit, for being stored in buffer queue by described log information;
Memory element, for when meeting pre-conditioned, preserves configuration parameter according to described daily record, by described Log information in buffer queue stores to embedded database.
Having particular application as of described memory element: when in described buffer queue, the bar number of the log information of caching reaches Arrive to preset value or buffering time periods, and when embedded database is in the state not being filled with, according to institute State daily record and preserve the daily record writing rate preset in configuration parameter, the log information in described buffer queue is deposited Store up to embedded database.
Alternatively, described cloud terminal log processing device, also include:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file in the shared drive shared with described client.
Alternatively, described cloud terminal log processing device, also include:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
Corresponding to above-mentioned server end, as it is shown on figure 3, the embodiment of the present invention provides at a kind of cloud terminal daily record Reason method, is applied to client, including:
Step 21, sets up the annexation with cloud terminal upper module;
Step 22, obtains the log content of described module;
Step 23, preserves configuration parameter according to daily record set in advance, it would be desirable to the described log content of preservation Generate corresponding log information;
Step 24, is uploaded to server end by described log information so that described server end is by described daily record Information stores to embedded database.
Alternatively, described step 21 particularly as follows:
By calling daily record client process interface, set up the annexation with described cloud terminal upper module.
The described step 23 of the embodiment of the present invention includes:
Step 231, the daily record obtained in the shared drive shared with described server end preserves configuration parameter;
Step 232, preserves the module level information in configuration parameter according to described daily record, it would be desirable to the institute of preservation State log content and generate corresponding log information.
Specifically, described step 232 particularly as follows:
If described module level information shows that the log content that described module generates needs to preserve, then by default length The described log content of degree generates the log information of reference format.
It should be noted that, after the module in client with cloud terminal establishes a connection, just start to obtain The log content that cloud terminal upper module operationally generates, client can read the module in shared drive simultaneously Class information, if described module level information shows that described log content needs to preserve, then in acquisition In described log content, intercept the log content of preset length successively, then by the daily record of described preset length Content is packaged into reference format, forms log information, in the embodiment of the present invention, the daily record of described reference format Information comprises: daily record rank, daily record generate module name corresponding to time, described log information and generation Described log content.
When log information is uploaded to server end, is mainly realized by socket (socket) mode and take The communication of business device end.
Corresponding to said method, as shown in Figure 4, the embodiment of the present invention provides a kind of cloud terminal log processing dress Put, be applied to client, including:
Link block 210, for setting up the annexation with cloud terminal upper module;
Log acquisition module 220, for obtaining the log content of described module;
Generation module 230, for preserving configuration parameter according to daily record set in advance, it would be desirable to preservation described Log content generates corresponding log information;
Upper transmission module 240, for being uploaded to server end by described log information so that described server end will Described log information stores to embedded database.
Specifically, described link block 210, by calling daily record client process interface, is set up with described cloud eventually The annexation of end upper module.
Specifically, described generation module 230 includes:
First acquiring unit 231, preserves for obtaining the daily record in the shared drive shared with described server end Configuration parameter;
Signal generating unit 232, for preserving the module level information in configuration parameter according to described daily record, it would be desirable to The described log content preserved generates corresponding log information.
If signal generating unit 232 is particularly as follows: described module level information shows the log content that described module generates Need to preserve, then the described log content of preset length is generated the log information of reference format.
Corresponding to client terminal device and server-side device, the embodiment of the present invention provides at a kind of cloud terminal daily record Reason system, including:
Cloud terminal the first log processing device and cloud terminal the second log processing device;Wherein,
Described cloud terminal the first log processing device includes:
Link block, for setting up the annexation with cloud terminal upper module;
Log acquisition module, for obtaining the log content of described module;
Generation module, for preserving configuration parameter according to daily record set in advance, it would be desirable to the described day of preservation Will content generates corresponding log information;
Upper transmission module, for described log information is uploaded to described cloud terminal the second log processing device, makes Obtain described cloud terminal the second log processing device to be stored to embedded database by described log information;
Described cloud terminal the second log processing device includes:
Receiver module, for receiving described cloud terminal the first log processing being connected with the module in cloud terminal The log information that device is uploaded;
Parameter acquisition module, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module, for preserving configuration parameter according to described daily record, stores described log information to embedding In formula data base.
Further, described cloud terminal the second log processing device also includes:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file with described cloud terminal the first log processing device altogether Shared drive in.
Further, described cloud terminal the second log processing device also includes:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
It should be noted that, described configuration order acquisition module, described preservation module, described mapping block, Operational order acquisition module and operation module constitute the configuration module of described cloud terminal log processing system, institute Stating configuration module, the log information in data base is carried out by main realization by logging level, date, module name Read, deletion action, and to the capacity of data base, the configuration of daily record writing rate, described configuration module One can be set to, it is also possible to independent of described cloud terminal second day with cloud terminal the second log processing device Will processing means, constitutes single module.
As it is shown in figure 5, as a example by configuration module is separately provided, cloud terminal log processing system of the present invention Including: daily record client (corresponding to above-mentioned cloud terminal the first log processing device) and log server end are (right Should be in above-mentioned cloud terminal the second log processing device), described daily record client call daily record client-side interface is logical Cross and use multiple daily record client process that the daily record of cloud terminal module is acquired, i.e. one daily record client process A corresponding cloud terminal module, after the log information that the need obtaining cloud terminal module preserve, passes through socket To log server send log information, log services end after obtaining described log information by packet receiving thread, First log information is hung over sequentially on the chained list of relief area, the most on a preset condition based, pass through data base Insert thread, call the insertion of sql interface affairs and log information is inserted in SQLite3 data base;By day Will configurator realizes the reading to the log information in SQLite3 data base and deletion action, and daily record simultaneously is joined Put program (the most above-mentioned configuration module) and the configuration information preserving daily record is written to shared drive, for day Will client and log server end call.
As shown in Figure 6, the main flow process that realizes of described daily record client is:
Step S11, client process calls log interface and sets up the annexation with cloud terminal upper module;
Step S12, reads the class information of this module in shared drive;
Whether step S13, preserve according to the daily record that the described module of described class information judgement is corresponding;If no Need to preserve and then perform step S15, abandon this daily record;If needing to preserve, then perform step S14, add The time of daily record, module name information are assembled into sql reference format;
Step S16, is sent to log server end by log information from socket.
As it is shown in fig. 7, the main flow process that realizes of described log server end is:
Step S21, service processes starts;
Step S22, reads shared drive by configuration file;
Step S23, checks socket packet receiving;
Step S24, it is judged that whether socket receives log information;If not receiving log information, then redirect To step S23, if receiving log information, then perform step S25, log information is saved in cache list;
Step S26, it is judged that whether whether cache node number arrive more than or equal to preset value or time cycle; If cache node number is not up to preset value or the time cycle does not arrives, then jump to step S23;If caching Node number reaches preset value or the time cycle arrives, then carry out step S27, it is judged that whether data base is filled with, If data base is not filled with, then carry out step S28, described log information is pressed scheduled rate and inserts data base, so After jump to step S24;If data base is filled with, then performs step S29, abandon this cache node, jump to Step S23.
As shown in Figure 8, the main handling process of configurator is:
Step S31, calls configurator;
Step S32, reads shared drive by configuration file;
Step S33, carries out the judgement of parameter selection, if parameter is arranged, then carries out step S34, arranges mould The grade of block, database volume value or daily record write rate value;If log read, then carry out step S35, Daily record is read from data base by module, grade, time;If daily record is deleted, then carry out step S36, by mould Block, grade, time delete daily record from data base.
It should be noted that, described cloud terminal log processing system achieves the daily record to the module in cloud terminal Storage, by embedded database preserve preset format log information, facilitate the reading to log information Write, be also convenient for query analysis simultaneously;By the way of using shared drive, configuration file is written and read, Owing to being internal memory operation, both can transmit configuration information to all processes in real time, the most not affect holding of each module Line efficiency, improves the efficiency of cloud terminal log processing system, by log information is stored in embedded data Storehouse, cross-platform compatibility is preferable, only need to change library file when carrying out system transplantation;In sum, Described cloud terminal log processing system is easy to operate, be prone to transplanting, low-resource takies, analyze efficiently, for cloud The log processing of terminal is provided convenience.
Above-described is the preferred embodiment of the present invention, it should be pointed out that for the ordinary people of the art For Yuan, some improvements and modifications can also be made under without departing from principle premise of the present invention, these Improvements and modifications are the most within the scope of the present invention.

Claims (20)

1. a cloud terminal log processing method, is applied to server end, it is characterised in that including:
Receive the log information of the client upload being connected with the module in cloud terminal;
Obtain daily record set in advance and preserve configuration parameter;
Preserve configuration parameter according to described daily record, described log information is stored to embedded database.
Cloud terminal log processing method the most according to claim 1, it is characterised in that described acquisition is pre- The daily record that first sets preserve configuration parameter step particularly as follows:
The daily record obtained in the shared drive shared with described client preserves configuration parameter, and described daily record preserves Configuration parameter is mapped in described shared drive by configuration file.
Cloud terminal log processing method the most according to claim 1, it is characterised in that described according to institute State daily record and preserve configuration parameter, the step that described log information stores to embedded database is included:
Described log information is stored in buffer queue;
When meeting pre-conditioned, preserve configuration parameter according to described daily record, by the day in described buffer queue Will information stores to embedded database.
Cloud terminal log processing method the most according to claim 3, it is characterised in that preset meeting During condition, preserve configuration parameter according to described daily record, the log information in described buffer queue is stored to embedding Enter the step in formula data base particularly as follows:
When in described buffer queue, the bar number of the log information of caching reaches preset value or buffering time periods arrives, And embedded database is when being in the state not being filled with, preserve the day preset in configuration parameter according to described daily record Will writing rate, stores the log information in described buffer queue to embedded database.
Cloud terminal log processing method the most according to claim 1, it is characterised in that described cloud terminal Log processing method, also includes:
Obtaining exterior arrangement order, described exterior arrangement order comprises the configuration letter that daily record preserves configuration parameter Breath;
The described configuration information comprised in described exterior arrangement order is stored in configuration file;
Described configuration file is mapped in the shared drive shared with described client.
Cloud terminal log processing method the most according to claim 5, it is characterised in that described cloud terminal Log processing method, also includes:
Obtaining external operating commands, described external operating commands includes the daily record in described embedded database The order that information is read out and/or deletes;
Obtain the daily record in configuration file and preserve configuration parameter, and preserve configuration parameter to institute according to described daily record State the log information in embedded database to be read out and/or deletion action.
7. a cloud terminal log processing device, is applied to server end, it is characterised in that including:
Receiver module, for receiving the log information of the client upload being connected with the module in cloud terminal;
Parameter acquisition module, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module, for preserving configuration parameter according to described daily record, stores described log information to embedding In formula data base.
Cloud terminal log processing device the most according to claim 7, it is characterised in that described storage mould Block includes:
Buffer unit, for being stored in buffer queue by described log information;
Memory element, for when meeting pre-conditioned, preserves configuration parameter according to described daily record, by described Log information in buffer queue stores to embedded database.
Cloud terminal log processing device the most according to claim 7, it is characterised in that described cloud terminal Log processing device, also includes:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file in the shared drive shared with described client.
Cloud terminal log processing device the most according to claim 9, it is characterised in that described cloud is eventually End log processing device, also includes:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
11. 1 kinds of cloud terminal log processing methods, are applied to client, it is characterised in that including:
Set up the annexation with cloud terminal upper module;
Obtain the log content of described module;
Configuration parameter is preserved, it would be desirable to the described log content of preservation generates correspondence according to daily record set in advance Log information;
Described log information is uploaded to server end so that described log information is stored by described server end To embedded database.
12. cloud terminal log processing methods according to claim 11, it is characterised in that described foundation With the step of the annexation of cloud terminal upper module particularly as follows:
By calling daily record client process interface, set up the annexation with described cloud terminal upper module.
13. cloud terminal log processing methods according to claim 11, it is characterised in that described basis Daily record set in advance preserves configuration parameter, it would be desirable to the described log content of preservation generates corresponding daily record letter The step of breath includes:
The daily record obtained in the shared drive shared with described server end preserves configuration parameter;
The module level information in configuration parameter is preserved, it would be desirable in the described daily record of preservation according to described daily record Hold and generate corresponding log information.
14. cloud terminal log processing methods according to claim 13, it is characterised in that described basis Described daily record preserves the module level information in configuration parameter, it would be desirable to it is right that the described log content of preservation generates The step of the log information answered includes:
If described module level information shows that the log content that described module generates needs to preserve, then by default length The described log content of degree generates the log information of reference format.
15. cloud terminal log processing methods according to claim 14, it is characterised in that described standard The log information of form comprises: daily record rank, the module that daily record generates the time, described log information is corresponding Name and the described log content generated.
16. 1 kinds of cloud terminal log processing devices, are applied to client, it is characterised in that including:
Link block, for setting up the annexation with cloud terminal upper module;
Log acquisition module, for obtaining the log content of described module;
Generation module, for preserving configuration parameter according to daily record set in advance, it would be desirable to the described day of preservation Will content generates corresponding log information;
Upper transmission module, for being uploaded to server end by described log information so that described server end is by institute State log information to store to embedded database.
17. cloud terminal log processing devices according to claim 16, it is characterised in that described generation Module includes:
First acquiring unit, joins for obtaining the daily record preservation in the shared drive shared with described server end Put parameter;
Signal generating unit, for preserving the module level information in configuration parameter, it would be desirable to protect according to described daily record The described log content deposited generates corresponding log information.
18. 1 kinds of cloud terminal log processing systems, it is characterised in that including:
Cloud terminal the first log processing device and cloud terminal the second log processing device;Wherein,
Described cloud terminal the first log processing device includes:
Link block, for setting up the annexation with cloud terminal upper module;
Log acquisition module, for obtaining the log content of described module;
Generation module, for preserving configuration parameter according to daily record set in advance, it would be desirable to the described day of preservation Will content generates corresponding log information;
Upper transmission module, for described log information is uploaded to described cloud terminal the second log processing device, makes Obtain described cloud terminal the second log processing device to be stored to embedded database by described log information;
Described cloud terminal the second log processing device includes:
Receiver module, for receiving described cloud terminal the first log processing being connected with the module in cloud terminal The log information that device is uploaded;
Parameter acquisition module, is used for obtaining daily record set in advance and preserves configuration parameter;
Memory module, for preserving configuration parameter according to described daily record, stores described log information to embedding In formula data base.
19. cloud terminal log processing systems according to claim 18, it is characterised in that described cloud is eventually The second log processing device is held also to include:
Configuration order acquisition module, is used for obtaining exterior arrangement order, and described exterior arrangement order comprised day Will preserves the configuration information of configuration parameter;
Preserve module, for the described configuration information comprised in described exterior arrangement order is stored in configuration file;
Mapping block, for being mapped to described configuration file with described cloud terminal the first log processing device altogether Shared drive in.
20. cloud terminal log processing systems according to claim 19, it is characterised in that described cloud is eventually The second log processing device is held also to include:
Operational order acquisition module, is used for obtaining external operating commands, and described external operating commands includes institute State the order that the log information in embedded database is read out and/or deletes;
Operation module, preserves configuration parameter for obtaining the daily record in configuration file, and protects according to described daily record Deposit configuration parameter the log information in described embedded database is read out and/or deletion action.
CN201510189031.0A 2015-04-21 2015-04-21 A kind of cloud terminal log processing method, Apparatus and system Pending CN106161074A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510189031.0A CN106161074A (en) 2015-04-21 2015-04-21 A kind of cloud terminal log processing method, Apparatus and system
PCT/CN2015/085461 WO2016169145A1 (en) 2015-04-21 2015-07-29 Cloud terminal log processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510189031.0A CN106161074A (en) 2015-04-21 2015-04-21 A kind of cloud terminal log processing method, Apparatus and system

Publications (1)

Publication Number Publication Date
CN106161074A true CN106161074A (en) 2016-11-23

Family

ID=57143505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510189031.0A Pending CN106161074A (en) 2015-04-21 2015-04-21 A kind of cloud terminal log processing method, Apparatus and system

Country Status (2)

Country Link
CN (1) CN106161074A (en)
WO (1) WO2016169145A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170585A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
CN108170576A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
CN108255884A (en) * 2016-12-29 2018-07-06 大唐移动通信设备有限公司 A kind of data processing method and device of the log information of OMC
CN109981652A (en) * 2019-03-28 2019-07-05 北京中安兴坤科技有限公司 Inspection computer security system and method
CN111143218A (en) * 2019-12-27 2020-05-12 深圳市共进电子股份有限公司 Log debugging method and device suitable for 5G embedded equipment and readable storage medium
US11455292B2 (en) 2018-09-21 2022-09-27 Microsoft Technology Licensing, Llc Brokering persisted and unpersisted log records

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885496B (en) * 2019-02-20 2022-06-07 北京百佑科技有限公司 Test log management method and system
CN111835562B (en) * 2020-07-01 2023-10-17 北京爱笔科技有限公司 Log uploading method, log inquiring method and system
CN114625595A (en) * 2020-12-14 2022-06-14 网联清算有限公司 Method, device and system for rechecking dynamic configuration information of service system
CN112764961A (en) * 2021-01-28 2021-05-07 西安超越申泰信息科技有限公司 Online operation and maintenance management method and device for cloud terminal
CN114780353B (en) * 2022-06-15 2022-09-27 统信软件技术有限公司 File log monitoring method and system and computing device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100449543C (en) * 2005-09-16 2009-01-07 腾讯科技(深圳)有限公司 Method and apparatus for holding journal
JP2007299284A (en) * 2006-05-01 2007-11-15 Hitachi Software Eng Co Ltd Log collection system, client device, and log collection agent device
CN101465765B (en) * 2008-12-31 2011-04-13 东信和平智能卡股份有限公司 Log system and use method thereof
JP6043682B2 (en) * 2013-05-22 2016-12-14 日本電信電話株式会社 Terminal operation history collection system and terminal operation history collection method
CN103532754B (en) * 2013-10-12 2016-08-17 北京首信科技股份有限公司 A kind of by high-speed internal memory, the system and method for distributed treatment massive logs
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255884A (en) * 2016-12-29 2018-07-06 大唐移动通信设备有限公司 A kind of data processing method and device of the log information of OMC
CN108170585A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
CN108170576A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
CN108170576B (en) * 2017-12-26 2021-12-07 Oppo广东移动通信有限公司 Log processing method and device, terminal equipment and storage medium
US11455292B2 (en) 2018-09-21 2022-09-27 Microsoft Technology Licensing, Llc Brokering persisted and unpersisted log records
CN109981652A (en) * 2019-03-28 2019-07-05 北京中安兴坤科技有限公司 Inspection computer security system and method
CN111143218A (en) * 2019-12-27 2020-05-12 深圳市共进电子股份有限公司 Log debugging method and device suitable for 5G embedded equipment and readable storage medium
CN111143218B (en) * 2019-12-27 2024-03-26 深圳市共进电子股份有限公司 Log debugging method and device suitable for 5G embedded equipment and readable storage medium

Also Published As

Publication number Publication date
WO2016169145A1 (en) 2016-10-27

Similar Documents

Publication Publication Date Title
CN106161074A (en) A kind of cloud terminal log processing method, Apparatus and system
CN105138592B (en) A kind of daily record data storage and search method based on distributed structure/architecture
CN103532754B (en) A kind of by high-speed internal memory, the system and method for distributed treatment massive logs
CN103944744B (en) Log collection method and system
CN103488704B (en) A kind of date storage method and device
CN101853287B (en) Data compression quick retrieval file system and method thereof
CN107515933A (en) Change method, server, system and the storage medium of source data database table structure
CN106503158B (en) Data synchronization method and device
CN105786998A (en) Database middleware system and method for processing data through database middleware system
CN107092552A (en) A kind of blog management method and device
CN104639658A (en) Realization method for accessing object storage by file system mounting
CN100378663C (en) Method, system and module for dynamic downloading of applied programe to user identification
CN110278143A (en) E-mail data processing method, device, computer equipment and storage medium
CN102622296A (en) Search engine module testing method, search engine module testing system and devices
CN104426838A (en) Internet cache scheduling method and system
CN108564462A (en) Acquisition methods, terminal device and the medium of collage-credit data
CN106021566A (en) Method, device and system for improving concurrent processing capacity of single database
CN109842621A (en) A kind of method and terminal reducing token storage quantity
CN110321374A (en) Standard file I/O operations system and method based on distributed network
CN104765792B (en) A kind of method, apparatus and system of dimension data storage
CN105099735B (en) A kind of method and system for obtaining magnanimity more detailed logging
CN110633301A (en) Method and system for extracting data based on engine setting
CN114020689A (en) Data processing method, data processing device, electronic device, and storage medium
CN101404797B (en) Storage method, storage management apparatus and storage system for long and short messages
CN102571381B (en) A kind of information storage means and information-storing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161123

WD01 Invention patent application deemed withdrawn after publication