[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102195795B - Intelligent district log system and log recording method thereof - Google Patents

Intelligent district log system and log recording method thereof Download PDF

Info

Publication number
CN102195795B
CN102195795B CN201010128664.8A CN201010128664A CN102195795B CN 102195795 B CN102195795 B CN 102195795B CN 201010128664 A CN201010128664 A CN 201010128664A CN 102195795 B CN102195795 B CN 102195795B
Authority
CN
China
Prior art keywords
log
submodule
module
tcp
memory queue
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.)
Expired - Fee Related
Application number
CN201010128664.8A
Other languages
Chinese (zh)
Other versions
CN102195795A (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.)
TCL Corp
Original Assignee
TCL 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 TCL Corp filed Critical TCL Corp
Priority to CN201010128664.8A priority Critical patent/CN102195795B/en
Publication of CN102195795A publication Critical patent/CN102195795A/en
Application granted granted Critical
Publication of CN102195795B publication Critical patent/CN102195795B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides an intelligent district log system. The intelligent district log system comprises at least one indoor terminal and a log server, wherein the indoor terminal includes a log collection module for collecting the log information of at least one terminal process module, and also includes a log agent module; the log agent module includes a UDP (user datagram protocol) monitoring sub-module, a memory queue management sub-module and a TCP (transmission control protocol) transmission sub-module; the UDP monitoring sub-module is used for receiving the log information transmitted by the log collection module, storing the log information in the memory queue of the memory queue management sub-module, and sending a message to inform the TCP transmission sub-module; and the TCP transmission sub-module is used for extracting the log information from the memory queue of the memory queue management sub-module and forwarding the log information. The intelligent district log system provided by the invention can collect the log information in the UDP transmission manner, and can transmit the log information in the TPC transmission manner, thereby improving the log information processing efficiency and facilitating information query.

Description

Intelligent residential district log system and log recording method thereof
Technical field
The present invention relates to a kind of diary record system and method, relate in particular to a kind of intelligent residential district log system and log recording method thereof.
Background technology
Diagnosis after log system goes wrong for terminal plays very important effect, the daily record that terminal is collected by Internet Transmission to server, terminal maintenance personnel just can understand the ruuning situation of all terminals on server like this, can quick positioning question by log content, greatly saved maintenance cost, also promoted the efficiency of dealing with problems simultaneously, so a lot of terminals have syslog collection in the market, be transferred to server capability, but in the realization of this function, all there is some problems at present, perfect not.
More existing log systems are by UDP transmission means transmission journal file, but because UDP does not have the reliability of mechanism transfer of data, therefore on network, between distinct device, by UDP transmission means transmission data, can bring and lose data problem, and log system constantly to server end transmission data, also strengthened the expense of server, also having in addition some log systems is by TCP transmission means transmission journal file, because TCP mode is passed through three-way handshake, the mechanisms such as overtime re-transmission reliability, thereby can guarantee between distinct device, to transmit on network the reliability of data, but the connect hours of these mechanism meeting increase terminals and transmission time etc., brought the problem of terminal execution efficiency.Especially for present intelligent residential district, a common server will be managed in community even thousands of intercommunication terminals of hundreds of, if adopt UDP transmission means, if loss of data meeting makes server end cannot obtain correct terminal log information in time, if adopt TCP transmission means, a large amount of terminals is carried out the stand-by period that transfer of data brings can affect the ageing of log system again.
Summary of the invention
The object of the invention is to overcome the problems of the prior art, at aspects such as the network pressure of terminal execution efficiency, Log Sender reliability, server end, terminal maintenance people finder log information convenience, provided a perfect solution.
For achieving the above object, the technical solution used in the present invention is as follows:
A kind of intelligent residential district log system, comprise: at least one indoor terminal and a log server, described indoor terminal comprises that one for collecting the log collection module of at least one terminal processes module log information, wherein, described indoor terminal also comprises a journaling agent module, described journaling agent module comprises that a UDP monitors submodule, one memory queue management submodule and a TCP send submodule, described UDP monitors the log information that submodule sends for receiving log collection module, put it in the memory queue of memory queue management submodule, concurrent message notice TCP sends submodule, described TCP sends submodule for taking out log information and forward from the memory queue of memory queue management submodule,
Described intelligent residential district log system also comprises the unit doorway machine of being located between indoor terminal and server, described unit doorway machine comprises a unit doorway machine journaling agent module, described unit doorway machine journaling agent module comprises that a TCP monitors submodule, one database, one written document submodule and a TCP send submodule, the log information that described TCP monitoring submodule is used for receiving indoor terminal transmission is to be saved in database, described written document submodule is for writing journal file by the record of database, the TCP of described unit doorway machine journaling agent module sends submodule for journal file is sent to log server.
Described intelligent residential district log system, wherein, described memory queue management submodule carries out mutual exclusion lock operation and first in first out management to memory queue.
Described intelligent residential district log system, wherein, described unit doorway machine journaling agent module also comprises an inquiry submodule, described TCP monitors submodule also for receiving the Query Information that log server sends and Query Information being sent to inquiry submodule, qualified record send it to TCP and send submodule in described inquiry submodule Query Database, the TCP by described unit doorway machine journaling agent module sends submodule the record inquiring is sent to log server.
A log recording method as intelligent residential district log system, comprises step:
A, by UDP transmission means, collect the log information of each process;
B, log information is put into memory queue;
C, by TCP transmission means, send the log information in memory queue;
The further A of described step comprises step:
A1, log collection module are collected the log information of each process;
A2, log collection module send to the first journaling agent module by the log information of collection by UDP transmission means, and described the first journaling agent module is arranged in indoor terminal;
D, the second daily record proxy module receive the log information of described first agent's module transmission and are saved in database, and described the second daily record proxy module is arranged in unit doorway machine;
E, the log information in database is write as to journal file and uploaded to log server.
Described intelligent residential district log recording method, wherein: described step B specifically comprises: the UDP of described the first journaling agent module monitors submodule and receives log information, when memory queue non-locking, log information is put into memory queue, and notify the TCP of the first journaling agent module to send submodule.
Described intelligent residential district log recording method, wherein: described step C specifically comprises: the TCP of described the first journaling agent module sends the notified rear locking page in memory queue of submodule, from memory queue, take out all log informations and send with TCP transmission means, and releasing memory queue is locked after being sent.
Described intelligent residential district log recording method, wherein: described step D also comprises: the second daily record proxy module also receives the Query Information of described log server, and sends to log server by corresponding log information in database.
Intelligent residential district provided by the invention log system has increased by two journaling agent modules in the log system of original intelligent residential district, one on indoor terminal, another is in unit doorway machine, the journaling agent module that indoor terminal increases is responsible for receiving the log information that log collection module sends by UDP transmission means, and this log information is sent to unit doorway machine by TCP transmission means, the journaling agent module that unit doorway machine increases is responsible for receiving the log information that indoor terminal sends, be saved in local data base, and upload in log server according to certain strategy formation journal file, thereby improve log information treatment effeciency, and convenient inquiry.
Accompanying drawing explanation
Fig. 1 is the structural representation of intelligent residential district of the present invention log system preferred embodiments;
Fig. 2 is the flow chart of intelligent residential district of the present invention log system log recording method preferred embodiments.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Proposition of the present invention has solved problem mentioned in background technology, at the network pressure of terminal execution efficiency, Log Sender reliability, server end and the aspects such as convenience of terminal maintenance people finder log information, has provided a perfect solution.
With reference to figure 1, intelligent residential district of the present invention log system preferred embodiments comprises: indoor terminal 10, be located at unit doorway machine journaling agent module 20 and log server 30 in unit doorway machine, described indoor terminal 10 comprises terminal processes module 12, log collection module 14 and journaling agent module 16, described journaling agent module 16 comprises that UDP monitors submodule 162, memory queue management submodule 164 and TCP send submodule 166, described unit doorway machine journaling agent module 20 comprises that TCP monitors submodule 21, database 22, written document submodule 24, TCP sends submodule 26 and inquiry submodule 28.
The log information that the log collection module 14 of described indoor terminal 10 produces for collecting the some terminal processes modules 12 of indoor terminal 10; Described UDP monitors the log information that submodule 162 sends for receiving log collection module 14, puts it in the memory queue of memory queue management submodule 164, and concurrent message notice TCP sends submodule 166; Described TCP sends submodule 166 for taking out log information from the memory queue of memory queue management submodule 164, and forwards this log information to unit doorway machine; 164 pairs of memory queues of described memory queue management submodule carry out mutual exclusion lock operation and first in first out management, the operation that writes, takes out that guarantees memory queue does not conflict, even if TCP sends submodule 166 and sends data when slow, guarantee that log information can not lose, can also according to the order of receiving arrange continue etc. to be sent.
The TCP of described unit doorway machine journaling agent module 20 monitor submodule 21 for the log information that receives indoor terminal 10 and send to be saved in database 22, the Query Information also sending for receiving log server 30, and Query Information is sent to inquiry submodule 28; Described written document submodule 28 is for writing journal file by the record of database 22; Qualified record in described inquiry submodule 28 Query Databases, and send it to TCP transmission submodule 26; Described TCP sends submodule 26 for the record inquiring or journal file are sent to log server 30.
With reference to figure 2, intelligent residential district of the present invention log recording method preferred embodiments comprises step: S1, each process module of indoor terminal are by calling log collection module interface, and the log information that will export imports log collection module into; S2, log collection module are added some additional informations on the log information basis of each process module input again, information such as time, host name, to facilitate classification and the reading of daily record, then log collection module sends log information to journaling agent module by UDP transmission means; The UDP of S3, journaling agent module monitors submodule and receives log information; The UDP of S4, journaling agent module monitors submodule after receiving log information, and invoke memory management submodule, judges that whether memory queue is locked, if locked, enters step S5, and non-locking enters step S6; S5, wait TCP send submodule and discharge queue lock; The UDP of S6, journaling agent module monitors the queue of submodule invoke memory management submodule locking page in memory, log information is put in memory queue according to first in first out, then invoke memory management submodule releasing memory queue lock; The UDP of S7, journaling agent module monitors submodule and judges the log information that whether has last time in memory queue, exists and directly enters step S10, does not exist and enters step 9; S9, UDP monitoring submodule is sent out message and is sent submodule to TCP, notify it to have log information to need to send, in memory queue, exist the log information of last time to illustrate to have sent out message and TCP sends the submodule log information that also do not have enough time to get, no longer to TCP, send submodule and send out message; The TCP of S10, journaling agent module sends submodule and receives after message, and the queue of invoke memory management submodule locking page in memory is taken out all log informations according to first in first out from memory queue; The TCP of S11, journaling agent module sends submodule invoke memory management submodule releasing memory queue lock, makes UDP monitor submodule and can continue to write; The TCP of S12, journaling agent module sends submodule and sends log information to affiliated unit doorway machine; The TCP of the unit doorway machine journaling agent module in S13, unit doorway machine monitors submodule the information type receiving is judged, if enter step S14 from the Query Information of log server, be that the log information from indoor terminal enters step S15; After S14, notice inquiry submodule Query Database, enter step S17; S15, log information is saved in local data base according to fields such as time, room number and log content after receiving log information, then judge whether the log recording in database surpasses a set point, for example 10000, surpass and enter step S16, otherwise finish; S16, call written document submodule and write the log information of each indoor set in database as journal file; S17, call TCP and send submodule journal file is uploaded to log server; S18, log server receive Query Result or journal file.
Wherein, details are as follows for the querying flow of log server: by log server in the log query page of backstage input time the condition such as interval, room number to inquire about the log information in certain period of certain indoor terminal, log server sends this Query Information to unit doorway machine, unit doorway machine TCP monitors submodule and receives after Query Information, call inquiry submodule Query Database, inquiry submodule calls TCP transmission submodule will inquire log information recording, and Query Result is returned to log server.
The present invention has increased by two journaling agent modules in the log system of original intelligent residential district, one on indoor terminal, another is in unit doorway machine, the journaling agent module that indoor terminal increases is responsible for receiving the log information that log collection module sends by UDP transmission means, and this log information is sent to unit doorway machine by TCP transmission means, the journaling agent module that unit doorway machine increases is responsible for receiving the log information that indoor terminal sends, be saved in local data base, and upload in log server according to certain strategy formation journal file.
Indoor set log collection module is used UDP transmission means, guaranteed the high efficiency of log collection, journaling agent module receives UDP message by the machine udp port, overcome UDP message by the insecure shortcoming of Internet Transmission, accomplished that the machine log information do not lose, again by TCP transmission means, to unit doorway machine transmission log information, guaranteed the reliability of log information Internet Transmission, and indoor set sends log information to unit doorway machine, server end network pressure is shared in each unit doorway machine, and log information in machine data storehouse, doorway, unit has facilitated terminal maintenance personnel's inquiry, can be by the time, the log information of each indoor terminal under in the condition fast search unit doorway machine such as room number, improve journal file treatment effeciency.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (7)

1. an intelligent residential district log system, comprise: at least one indoor terminal and a log server, described indoor terminal comprises that one for collecting the log collection module of at least one terminal processes module log information, it is characterized in that: described indoor terminal also comprises a journaling agent module, described journaling agent module comprises that a UDP monitors submodule, one memory queue management submodule and a TCP send submodule, described UDP monitors the log information that submodule sends for receiving log collection module, put it in the memory queue of memory queue management submodule, concurrent message notice TCP sends submodule, described TCP sends submodule for taking out log information and forward from the memory queue of memory queue management submodule,
Described intelligent residential district log system also comprises the unit doorway machine of being located between indoor terminal and server, described unit doorway machine comprises a unit doorway machine journaling agent module, described unit doorway machine journaling agent module comprises that a TCP monitors submodule, one database, one written document submodule and a TCP send submodule, the log information that described TCP monitoring submodule is used for receiving indoor terminal transmission is to be saved in database, described written document submodule is for writing journal file by the record of database, the TCP of described unit doorway machine journaling agent module sends submodule for journal file is sent to log server.
2. intelligent residential district according to claim 1 log system, is characterized in that: described memory queue management submodule carries out mutual exclusion lock operation and first in first out management to memory queue.
3. intelligent residential district according to claim 1 log system, it is characterized in that: described unit doorway machine journaling agent module also comprises an inquiry submodule, described TCP monitors submodule also for receiving the Query Information that log server sends and Query Information being sent to inquiry submodule, qualified record send it to TCP and send submodule in described inquiry submodule Query Database, the TCP by described unit doorway machine journaling agent module sends submodule the record inquiring is sent to log server.
4. a log recording method for intelligent residential district as claimed in claim 1 log system, comprises step:
A, by UDP transmission means, collect the log information of each process;
B, log information is put into memory queue;
C, by TCP transmission means, send the log information in memory queue;
Described steps A further comprises:
A1, log collection module are collected the log information of each process;
A2, log collection module send to the first journaling agent module by the log information of collection by UDP transmission means, and described the first journaling agent module is arranged in indoor terminal;
D, the second daily record proxy module receive the log information of described the first journaling agent module transmission and are saved in database, and described the second daily record proxy module is arranged in unit doorway machine;
E, the log information in database is write as to journal file and uploaded to log server.
5. intelligent residential district according to claim 4 log recording method, it is characterized in that: described step B specifically comprises: the UDP of described the first journaling agent module monitors submodule and receives log information, when memory queue non-locking, log information is put into memory queue, and notify the TCP of the first journaling agent module to send submodule.
6. intelligent residential district according to claim 5 log recording method, it is characterized in that: described step C specifically comprises: the TCP of described the first journaling agent module sends the notified rear locking page in memory queue of submodule, from memory queue, take out all log informations and send with TCP transmission means, and releasing memory queue is locked after being sent.
7. according to right, want the intelligent residential district log recording method described in 4, it is characterized in that: described step D also comprises: the second daily record proxy module also receives the Query Information of described log server, and corresponding log information in database is sent to log server.
CN201010128664.8A 2010-03-19 2010-03-19 Intelligent district log system and log recording method thereof Expired - Fee Related CN102195795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010128664.8A CN102195795B (en) 2010-03-19 2010-03-19 Intelligent district log system and log recording method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010128664.8A CN102195795B (en) 2010-03-19 2010-03-19 Intelligent district log system and log recording method thereof

Publications (2)

Publication Number Publication Date
CN102195795A CN102195795A (en) 2011-09-21
CN102195795B true CN102195795B (en) 2014-03-12

Family

ID=44603220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010128664.8A Expired - Fee Related CN102195795B (en) 2010-03-19 2010-03-19 Intelligent district log system and log recording method thereof

Country Status (1)

Country Link
CN (1) CN102195795B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394790A (en) * 2011-09-29 2012-03-28 航天科工深圳(集团)有限公司 On-line monitoring device and monitoring method of analog transmission line
CN103944744B (en) * 2013-01-21 2019-02-19 博雅网络游戏开发(深圳)有限公司 Log collection method and system
CN103150149B (en) * 2013-03-26 2015-11-25 华为技术有限公司 Process database is reformed the method and apparatus of data
CN103326896B (en) * 2013-06-07 2016-04-27 合一信息技术(北京)有限公司 The system and method for the information data that a kind of user of collection produces on the internet
CN104506822B (en) * 2015-01-08 2017-08-29 广州列丰信息科技有限公司 A kind of remote visible doorbell monitoring method and system based on Android platform
CN106559241B (en) * 2015-09-29 2019-11-08 阿里巴巴集团控股有限公司 Using the collection of log, sending method, device, system and log server
CN107483567B (en) * 2017-08-03 2021-08-10 广州华多网络科技有限公司 Distributed log searching method and system
CN107517261A (en) * 2017-08-31 2017-12-26 深圳市中兴物联科技有限公司 Gateway, server, method, apparatus, storage medium and Internet of things system
CN110399350A (en) * 2018-04-19 2019-11-01 沪江教育科技(上海)股份有限公司 Processing method, device, storage medium and the electronic equipment of log information
CN108718295A (en) * 2018-04-20 2018-10-30 新华三技术有限公司 A kind of system log transmission method and device
CN111416767A (en) * 2020-03-16 2020-07-14 广东科徕尼智能科技有限公司 Log output method, device and storage medium of edge intelligent gateway

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1350385A (en) * 2001-10-15 2002-05-22 东方通信股份有限公司 Reliable message transmitting method of simple network management protocol
CN1642104A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method and device for realizing system journal
CN1825812A (en) * 2005-02-25 2006-08-30 华为技术有限公司 System and method for managing network web log information
CN1932812A (en) * 2005-09-16 2007-03-21 腾讯科技(深圳)有限公司 Method and apparatus for holding journal
CN101286888A (en) * 2008-05-21 2008-10-15 天柏宽带网络科技(北京)有限公司 Operating method of log system
CN101662480A (en) * 2009-09-01 2010-03-03 卡斯柯信号有限公司 Log system based on access control

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633080A (en) * 2003-12-24 2005-06-29 华为技术有限公司 Method for implementing log in network management system
US7356590B2 (en) * 2005-07-12 2008-04-08 Visible Measures Corp. Distributed capture and aggregation of dynamic application usage information
CN1858738B (en) * 2006-02-15 2010-08-25 华为技术有限公司 Method and device for access data bank

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1350385A (en) * 2001-10-15 2002-05-22 东方通信股份有限公司 Reliable message transmitting method of simple network management protocol
CN1642104A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method and device for realizing system journal
CN1825812A (en) * 2005-02-25 2006-08-30 华为技术有限公司 System and method for managing network web log information
CN1932812A (en) * 2005-09-16 2007-03-21 腾讯科技(深圳)有限公司 Method and apparatus for holding journal
CN101286888A (en) * 2008-05-21 2008-10-15 天柏宽带网络科技(北京)有限公司 Operating method of log system
CN101662480A (en) * 2009-09-01 2010-03-03 卡斯柯信号有限公司 Log system based on access control

Also Published As

Publication number Publication date
CN102195795A (en) 2011-09-21

Similar Documents

Publication Publication Date Title
CN102195795B (en) Intelligent district log system and log recording method thereof
WO2023000797A1 (en) Hplc-based plug and play method for power distribution internet of things device
CN102938770B (en) A kind of method and relevant apparatus, system realizing multi-protocols message unified interface
CN103064731A (en) Device and method for improving message queue system performance
CN110855493B (en) Application topological graph drawing device for mixed environment
CN101830240B (en) Track traffic centralized alarming management system and method thereof
CN110096545A (en) One kind being based on big data platform data processing domain architecting method
CN103856534B (en) A kind of daily record gathering method and system based on peer-to-peer network
TWI448975B (en) Dispersing-type algorithm system applicable to image monitoring platform
US20080084876A1 (en) System and method for intelligent data routing
CN102486838B (en) Multi-criteria radio frequency identification (RFID) tag data integration and conversion method
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN109039427B (en) Ship monitoring management device
CN116204573A (en) Configurable multi-protocol data acquisition device and method based on real-time database
CN108012085A (en) A kind of method for processing multimedia information, server and storage medium
CN1627752A (en) General method for controlling interconnecting device based on UPNP protocol
CN115996385A (en) Anti-telecommunication fraud blockchain application system
CN114328638A (en) Service message pushing system based on database polling
CN201371835Y (en) Railway transportation centralized alarm management system
CN107330089B (en) Cross-network structured data collection system
CN117768663B (en) Multi-protocol cascade gateway
CN105095248A (en) Database cluster system, restoring method for same and management node of same
CN111509850A (en) Power grid dispatching information interaction method, platform and system
CN102075405B (en) Service signaling transmission method and system based on subscription registration
CN114428682B (en) Overtime task processing method, overtime task processing system, storage medium and storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: Li Jianzhong

Document name: Notification of Passing Examination on Formalities

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140312